// Bind Slide functions to productboxpop lineup

$(".pop .productbox").hoverIntent({
 sensitivity: 25, // number = sensitivity threshold (must be 1 or higher)
 interval: 100, // number = milliseconds for onMouseOver polling interval
 over: prodPop, // function = onMouseOver callback (required)
 timeout: 100, // number = milliseconds delay before onMouseOut
 out: prodUnPop // function = onMouseOut callback (required)
});

/*
*/
//grab the product from the .initial box's child div's id attribute

var prodPopDivId = $(".initial").children("div").attr("id");
if(prodPopDivId){
	prodActivate(".initial", prodPopDivId.substring(prodPopDivId.indexOf("_") + 1));
}


/*---------------------------   Sign In Box ----------------------------*/

$("#sign_in_box .shadow .tc, #sign_in_box .shadow .bc").width($("#sign_in_box .hdr_open img").width()-10);
$("#sign_in_box .shadow .ml, #sign_in_box .shadow .mr").height($("#sign_in_box .hdr_open img").height()-10);
$("#sign_in_box .shadow").show();


$("#sign_in_box .hdr_open").click(function() {
	$(this).hide();
	$("#sign_in_box .hdr_close, #sign_in_box .container").show();
	$("#sign_in_box .shadow .tc, #sign_in_box .shadow .bc").width($("#sign_in_box .hdr_close img").width()-10);
	$("#sign_in_box .shadow .ml, #sign_in_box .shadow .mr").height($("#sign_in_box .container").height()+24);
});

$("#sign_in_box .hdr_close").click(function() {
	$(this).hide();
	$("#sign_in_box .container").hide();
	$("#sign_in_box .hdr_open").show();	
	$("#sign_in_box .shadow .tc, #sign_in_box .shadow .bc").width($("#sign_in_box .hdr_open img").width()-10);
	$("#sign_in_box .shadow .ml, #sign_in_box .shadow .mr").height($("#sign_in_box .hdr_open img").height()-10);
});

$("#sign_in_box .hdr_open").hover(function() {
	var target = $(this).children("img");	
	target.attr("src", "/images/btn-sign-in-to-turbotax-hover.gif");
}, function() {
	var target = $(this).children("img");
	target.attr("src", "/images/btn-sign-in-to-turbotax.gif");
});

$("#sign_in_box .hdr_close").hover(function() {
	var target = $(this).children("img");	
	target.attr("src", "../image_files/live-support.gif");
}, function() {
	var target = $(this).children("img");
	target.attr("src", "../image_files/live-support.gif");
});




$(".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");

});