// Bind Slide functions to productboxpop lineup

$(".slidey").hoverIntent({
 sensitivity: 25, // number = sensitivity threshold (must be 1 or higher)
 interval: 100, // number = milliseconds for onMouseOver polling interval
 over: prodGrow, // function = onMouseOver callback (required)
 timeout: 100, // number = milliseconds delay before onMouseOut
 out: prodShrink // function = onMouseOut callback (required)
});

//grab the product from the .initial box's child div's id attribute

var productboxpopDivId = $(".initial").children("div").attr("id");
if(productboxpopDivId){
	setActiveProduct(".initial", productboxpopDivId.substring(productboxpopDivId.indexOf("_") + 1));
}
// Sign In Box Events

$("#sign_in_box .hdr").hover(function() {
	var target = $(this).children("img");	
	target.attr("src", "/images/btn-sign-in-to-turbotax-hover.png");
}, function() {
	var target = $(this).children("img");
	target.attr("src", "/images/btn-sign-in-to-turbotax.png");
});

$("#sign_in_box .hdr").toggle(function() {
	var target = $(this).children("img");
	target.attr("src", "/images/bg_signin_hdr_hover.png");
	target.width(177);
	target.height(32);
	$("#sign_in_box .container").show();
	$(this).parent().addClass("on");	
	$("#sign_in_box .hdr").hover(function() {
		var target = $(this).children("img");	
		target.attr("src", "/images/bg_signin_hdr_hover.png");
	}, function() {
		var target = $(this).children("img");
		target.attr("src", "/images/bg_signin_hdr.png");
	});
}, function() {
	var target = $(this).children("img");
	target.attr("src", "/images/btn-sign-in-to-turbotax-hover.png");
	target.width(117);
	target.height(38);
	$("#sign_in_box .container").hide();
	$(this).parent().removeClass("on");	
	$("#sign_in_box .hdr").hover(function() {
		var target = $(this).children("img");	
		target.attr("src", "/images/btn-sign-in-to-turbotax-hover.png");
	}, function() {
		var target = $(this).children("img");
		target.attr("src", "/images/btn-sign-in-to-turbotax.png");
	});
});

/*
$("#sign_in_box .hdr").hover(function() {
	if ($(this).parent().attr("class")!="on") {
		$(this).click();
	}
}, function() {});
*/

$(".BVStars").hoverIntent(function(){jQuery(this).children(".bvBubble").show();}, function(){jQuery(this).children(".bvBubble").fadeOut();});

$(function() {
	//preload images
	$.preloadImages("/images/bg_signin_hdr.png","/images/bg_signin_box_010308.png","/images/productbox/bg_productboxpop4_active_free.png","/images/productbox/bg_productboxpop4_active_deluxe.png","/images/productbox/bg_productboxpop4_active_premier.png","/images/productbox/bg_productboxpop4_active_homebiz.png","/images/productbox/bg_productboxpop4_active_ppro.png");

});