$(document).ready(function() {
	
/////////////////////////////////////
// Custom commant for the Dropdown //
/////////////////////////////////////

$(function(){
    $(".nav>li").hover(function(){
        $(this).addClass("hover");
        $(this).find('ul.subnav',this).css('visibility', 'visible');
		$(this).find('a.drop',this).toggleClass('hover');
    }, function(){
        $(this).removeClass("hover");
        $(this).find('ul.subnav',this).css('visibility', 'hidden');
		$(this).find('a.drop',this).toggleClass('hover');
		});		
});

/////////////////////////////////////
// Custom commant for the Fancybox //
/////////////////////////////////////
  
$("#email").fancybox({
   'width'		    : 660,
   'height'		    : 240,
   'autoScale'     	: false,
   'transitionIn'	: 'none',
   'transitionOut'	: 'none',
   'type'			: 'iframe'
});
$("#wach-vid a").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'  	: false,
			'transitionIn'	: 'none',
			'transitionOut' : 'none',
			'width'		    : 680,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			'wmode'		    : 'transparent',
			'allowfullscreen'	: 'true'
			}
		});

	return false;
});


///////////////////////////////////////
// Custom commant for the Img Slider //
///////////////////////////////////////

$("#slider").carousel({
	 effect: "fade",
	 animSpeed: "slow",
	 pagination: false,
	 autoSlide: true,
	 nextBtn: false,
	 prevBtn: false,
	 autoSlideInterval:3000
});  

});
