$(document).ready(function(){
	
    $(".btHome").delay(2000);
	$(".btHome").fadeIn(1500);
    $(".home123Btn").delay(2000);
	$(".home123Btn").fadeIn(1500);
    $(".homeTvBtn").delay(2000);
	$(".homeTvBtn").fadeIn(1500);
	$("nav li:first").addClass("noBk");
	$("nav ul li ul li:last").addClass("noBk");
	$(".prodDetailWrap:last").addClass("lastProdWrap");
	
    $('.homeAvailable, .whySlide').cycle({
	    fx:      'fade', 
	    speed:    500, 
	    timeout:  3000
	});

	$("a.home123Btn").fancybox({
		'padding'		:	0,
		'speedIn'		:	300, 
		'speedOut'		:	300,
		'opacity'		:	true,
		'overlayColor'	:	'black',
		'overlayOpacity':	'0.5',
		'width'			: 	640,
		'height'		: 	370,
/* 		'href'			: 	'http://www.youtube.com/watch?v=V042TLMFO_w', */
		'type'			: 	'iframe'		
	});

	$("a.homeTvBtn").fancybox({
		'padding'		:	0,
		'speedIn'		:	300, 
		'speedOut'		:	300,
		'opacity'		:	true,
		'overlayColor'	:	'black',
		'overlayOpacity':	'0.5',
		'width'			: 	640,
		'height'		: 	370,
/* 		'href'			: 	'http://www.youtube.com/watch?v=V042TLMFO_w', */
		'type'			: 	'iframe'		
	});

	$('.commNewsSwitch') 
	.before('<div class="commNewsNav">') 
	.cycle({ 
	    fx:     'fade',
	    speed:  'fast',
	    timeout: 3000,
	    pager:  '.commNewsNav' 
	});

	$(".subnavTrigger").hoverIntent(function(){
		$(".subnav").slideDown('fast');
		}, function(){
		$(".subnav").slideUp("fast");
	});	

	$(".subnavTrigger2").hoverIntent(function(){
		$(".subnav2").slideDown('fast');
		}, function(){
		$(".subnav2").slideUp("fast");
	});	

	$(".whyIcon_01, .pLandingIcon_01").hover(function(){
		$(".whyHover_01").fadeIn('fast');
		}, function(){
		$(".whyHover_01").fadeOut("fast");
	});	

	$(".whyIcon_02, .pLandingIcon_02").hover(function(){
		$(".whyHover_02").fadeIn('fast');
		}, function(){
		$(".whyHover_02").fadeOut("fast");
	});	

	$(".whyIcon_03, .pLandingIcon_03").hover(function(){
		$(".whyHover_03").fadeIn('fast');
		}, function(){
		$(".whyHover_03").fadeOut("fast");
	});	

	$(".whyIcon_04, .pLandingIcon_04").hover(function(){
		$(".whyHover_04").fadeIn('fast');
		}, function(){
		$(".whyHover_04").fadeOut("fast");
	});	
   $("#callOutPromoImage")
        .mouseover(function() { 
            var src = $(this).attr("src").match(/[^\.]+/) + "2.png";
            $(this).attr("src", src);
        })
        .mouseout(function() {
            var src = $(this).attr("src").replace("2", "");
            $(this).attr("src", src);
        });

});
