function tofade() {
   $(".fader").hover(
  function () {$(this).animate({opacity: '.5'}, {duration: 300});}, 
  function () {$(this).animate({opacity: '1'}, {duration: 300});}
  );   
}

$(document).ready(function(){
	  tofade();
	
		 $('.ddown').hover(function () {
			$('.ddown2', this).stop(true,true).slideDown(200);
 				}, 
			function () {
			$('.ddown2', this).stop(true,true).slideUp(200);		
				}
		);
		
		$('.ddown3').hover(function () {
			$('.ddown4', this).stop(true,true).slideDown(200);
 				}, 
			function () {
			$('.ddown4', this).stop(true,true).slideUp(200);		
				}
		);
	
		$('.slideshow').cycle({
		fx: 'fade' , // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout: 5000 ,
		speed: 2000 ,
		sync: 1 ,
		easing: "expoinout"
		});
		
	  $('a.fbox').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	400, 
		'speedOut'		:	400, 
		'overlayShow'	:	true,
		'titleShow'		:	false,
		'easingIn'		:	'expoinout',
		'easingOut'		:	'expoinout',
		'overlayOpacity'	: '0.7',
		'overlayColor'	: '#000'
	});
	
	$("a.youtube").click(function() {
                 $.fancybox({
				  'easingIn'		:	'expoinout',
			      'easingOut'		:	'expoinout',
				  'transitionIn'	:	'elastic',
				  'transitionOut'	:	'elastic',
			      'overlayOpacity'	: '0.7',
				  'overlayColor'	: '#000',
                  'autoScale'   : false,
                  'title'               : this.title,
                  'width'               : 680,
                  'height'              : 495,
                  'href'                : this.href = this.href.replace(new RegExp("watch\\?v=", "i"), 'v/') + '&autoplay=1' + '&fs=1',
                  'type'                : 'swf',    // <--add a comma here
                  'swf'                 : {'wmode':'transparent','allowfullscreen':'true'} // <-- flashvars here
                  });
                 return false;

            }); 
	  	
   });


