/*----------------------------------------------------------------
[wc_insight_page_js.js]

Project					:		Wildcraft
Version					:		1.1
Last change				:		10/20/09 []
Author					:		Ranjoy Sen
Primary use				:		Commom js for all the pages
Dependency 				:		jquery-1.3.2.min_.js,
								jquery.corner.js,
								jquery.easing.1.3.js,
								jquery.scrollTo.js,
								jquery.pngfix.js,
								jScrollPane.js,
------------------------------------------------------------------*/
var cal_warr=false;
var cal_ss=false;
var cal_si=false;
/*img png transperency*/
$(document).ready
(
	function() 
	{
		$(".select, .unselect , .wc_1st_stage_menu , .wc_Compare_Products_icon , .wc_popup_opener_icon").pngfix
		(
			{
				sizingMethod: "scale"
			}
		);
	}
);
/*img png transperency*/
$(document).ready
(
	function() 
	{
		/*scrall window*/
		$('#wc_links_warr_con_placeholder_details1')
										.fadeIn()
										.jScrollPane({showArrows:true});
		/*scrall window*/

		/*Round corcer*/
		$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("bottom cc:#161618");
		$('.wc_insight_page_content_placeholder .wc_footer .wc_links .wc_warranty_link').corner("bl cc:#161618");
		$('.wc_insight_page_content_placeholder .wc_footer .wc_links .wc_shipping_info_link').corner("br cc:#161618");
		$('.wc_insight_page_content_placeholder .wc_links_warr_con_placeholder .round_c').corner("bottom cc:#161618");
		$('.wc_insight_page_content_placeholder .wc_links_warr_con_placeholder .round_c').corner("br cc:#000000");
		$('.wc_insight_page_content_placeholder .wc_links_shipping_info_cont_placeholder .round_c').corner("bottom cc:#161618");
		$('.wc_insight_page_content_placeholder .wc_links_secured_shopping_con_placeholder .round_c').corner("bottom cc:#161618");
		$('.wc_insight_page_content_placeholder .wc_footer .wc_share_corner .wc_Find_About_Contact').corner("cc:#0e0f10 5px");
		
		$('.wc_insight_page_content_placeholder .wc_mid .wc_mid_left .wc_pnqheader').corner("top cc:#000000 10px");
		$('.wc_insight_page_content_placeholder .wc_mid .wc_mid_left .wc_menus_container').corner("bottom cc:#161618 10px");
		
		$('.wc_insight_page_content_placeholder .wc_mid .wc_mid_right .wc_toppanel .wc_Compare_Products').corner("cc:#000000 10px");
		$('.wc_insight_page_content_placeholder .wc_mid .wc_mid_right .wc_toppanel .wc_product_preview_checkout').corner("cc:#000000 10px");
		/*Round corcer*/
		
		/*Chenge class on warrenty mouse over */
		$(".fun_wc_warranty_link")
			.bind
			(
			 	"mouseenter",
				function()
				{
					fun_wc_warranty_link_mouseenter();
    			}
			)
			.bind
			(
			 	"mouseleave",
				function()
				{					
					if(cal_warr == true)
					{
						
					}
					else
					{
						fun_wc_warranty_link_mouseleave();
					}
   		 		}
			);
		/*Chenge class on warrenty mouse over */
		
		/*Chenge class on secured shopping mouse over */
		$(".fun_wc_secured_shopping_link")
			.bind
			(
			 	"mouseenter",
				function()
				{
					fun_wc_secured_shopping_link_mouseenter();
    			}
			)
			.bind
			(
			 	"mouseleave",
				function()
				{
					
					if(cal_ss == true)
					{
						//
					}
					else
					{
						fun_wc_secured_shopping_link_mouseleave();
					}
   		 		}
			);
		/*Chenge class on secured shopping mouse over */
		
		/*Chenge class on shipping info mouse over */
		$(".fun_wc_shipping_info_link")
			.bind
			(
			 	"mouseenter",
				function()
				{
					fun_wc_shipping_info_link_mouseenter();
    			}
			)
			.bind
			(
			 	"mouseleave",
				function()
				{
					
					if(cal_si == true)
					{
						//
					}
					else
					{
						fun_wc_shipping_info_link_mouseleave();
					}
   		 		}
			);
		/*Chenge class on shipping info mouse over */
		
		/*warranty popup window open*/
		$(".fun_wc_warranty_link")
			.click
			(
				function()
				{
					if(cal_ss == true)
					{
						ss_pop_off();
						setTimeout("warr_pop_on();fun_wc_warranty_link_mouseenter()",1500);
					}
					else if(cal_si == true)
					{
						si_pop_off();
						setTimeout("warr_pop_on();fun_wc_warranty_link_mouseenter()",1500);
					}
					else
					{
						warr_pop_on();
						fun_wc_warranty_link_mouseenter();
					}
					/*si_pop_off();
					ss_pop_off();
					setTimeout("warr_pop_on()",1500);*/
				},
				function()
				{
					if(cal_ss == true)
					{
						ss_pop_off();
						setTimeout("warr_pop_on();fun_wc_warranty_link_mouseenter()",1500);
					}
					else if(cal_si == true)
					{
						si_pop_off();
						setTimeout("warr_pop_on();fun_wc_warranty_link_mouseenter()",1500);
					}
					else
					{
						warr_pop_off();
					}
    			}
			);
		/*warranty popup window open*/
		/*secured shopping popup window open*/
		$(".fun_wc_secured_shopping_link")
			.toggle
			(
				function()
				{
					if(cal_warr == true)
					{
						warr_pop_off();
						setTimeout("ss_pop_on();fun_wc_secured_shopping_link_mouseenter()",1500);
					}
					else if(cal_si == true)
					{
						si_pop_off();
						setTimeout("ss_pop_on();fun_wc_secured_shopping_link_mouseenter()",1500);
					}
					else
					{
						ss_pop_on();
						fun_wc_secured_shopping_link_mouseenter();
					}
				},
				function()
				{
					if(cal_warr == true)
					{
						warr_pop_off();
						setTimeout("ss_pop_on();fun_wc_secured_shopping_link_mouseenter()",1500);
					}
					else if(cal_si == true)
					{
						si_pop_off();
						setTimeout("ss_pop_on()fun_wc_secured_shopping_link_mouseenter()",1500);
					}
					else
					{
						ss_pop_off();
					}
					
    			}
			);
		/*secured shopping popup window open*/
		
		/*shipping info popup window open*/
		$(".fun_wc_shipping_info_link")
			.toggle
			(
				function()
				{
					if(cal_warr == true)
					{
						warr_pop_off();
						setTimeout("si_pop_on();fun_wc_shipping_info_link_mouseenter()",1500);
					}
					else if(cal_ss == true)
					{
						ss_pop_off();
						setTimeout("si_pop_on();fun_wc_shipping_info_link_mouseenter()",1500);
					}
					else
					{
						si_pop_on();
						;fun_wc_shipping_info_link_mouseenter();
					}
				},
				function()
				{
					if(cal_warr == true)
					{
						warr_pop_off();
						setTimeout("si_pop_on();fun_wc_shipping_info_link_mouseenter()",1500);
					}
					else if(cal_ss == true)
					{
						ss_pop_off();
						setTimeout("si_pop_on();fun_wc_shipping_info_link_mouseenter()",1500);
					}
					else
					{
						si_pop_off();
					}
					
    			}
			);
		/*warranty popup window open*/
		
		
	}
);
function warr_pop_on()
{
	cal_warr = true;
	/*bottom left round corder color cccccc*/
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("bl cc:#cccccc");
	/*bottom left round corder color cccccc*/
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links_placeholder')
		.css
		(
			{
				height			:	"215px"
			}
		);
	/*Open popup */
	$(".wc_links_warr_con_placeholder")
		.animate
		(
			{ 
				top				: 	163 
			}, 
			{
				duration: 'slow',
				easing: 'easeInOutBack', 
				complete: 
				function () 
				{
					
					$('.wc_insight_page_content_placeholder .wc_links_warr_con_placeholder .round_c')
						.animate
						(
							{ 
								width				: 	267 
							}, 
							{
								duration: 'slow',
								easing: 'easeOutExpo', 
								complete: 
								function () 
								{
									$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("br cc:#cccccc");
									$('.wc_insight_page_content_placeholder .wc_footer .wc_links_warr_con_placeholder .round_c .jScrollPaneContainer')
										.fadeIn();
									$('#wc_links_warr_con_placeholder_details')
										.fadeIn()
										.jScrollPane({showArrows:true});
									$('.warranty_image')
										.fadeIn();
									
								} 
							}
						);
				} 
			}
		);
	/*Open popup */	
}
function warr_pop_off()
{
	cal_warr = false;
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links_warr_con_placeholder .round_c .jScrollPaneContainer')
		.hide();
	$('.warranty_image')
		.hide();
	/*default wc_product_e_com bottom right corner color*/
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("br cc:#161618");
	/*default wc_product_e_com bottom right corner color*/
	/*close popup*/
	$('.wc_insight_page_content_placeholder .wc_links_warr_con_placeholder .round_c')
		.animate
		(
			{ 
				width				: 	71 
			}, 
			{
				duration: 'slow',
				easing: 'easeOutExpo', 
				complete: 
				function () 
				{
					$(".wc_links_warr_con_placeholder")
						.animate
						(
							{ 
								top				: 	0 
							}, 
							{
								duration: 'slow',
								easing: 'easeInOutBack', 
								complete: 
								function () 
								{
									$('.wc_product_e_com').corner("bl cc:#0b0b0c");
									if($('.wc_links_warr_con_placeholder').css("top") > "0px")
									{
										//
									}
									else
									{
										$(".wc_warranty_link_placeholder")
											.css
											(
												{
													background		:	"#333333"
												}
											);
										$(".wc_warranty_link")
											.css
											(
												{
													color			:	"#ffffff"
												}
											);
										$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("bl cc:#161618");
										$('.wc_insight_page_content_placeholder .wc_footer .wc_links_placeholder')
										.css
										(
											{
												height			:	"30px"
											}
										);
									}
									
								} 
							}
						);
				} 
			}
		);
	/*close popup*/
}
function ss_pop_on()
{
	cal_ss = true;
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links_placeholder')
		.css
		(
			{
				height			:	"215px"
			}
		);
	/*Open popup */
	$(".wc_links_secured_shopping_con_placeholder")
		.animate
		(
			{ 
				top				: 	163 
			}, 
			{
				duration: 'slow',
				easing: 'easeInOutBack', 
				complete: 
				function () 
				{
					
					$('.wc_insight_page_content_placeholder .wc_links_secured_shopping_con_placeholder .round_c')
						.animate
						(
							{ 
								width				:	267,
								marginLeft			:	0
							}, 
							{
								duration: 'slow',
								easing: 'easeOutExpo', 
								complete: 
								function () 
								{
									$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("bottom cc:#cccccc");
									$('.wc_insight_page_content_placeholder .wc_footer .wc_links_secured_shopping_con_placeholder .round_c .jScrollPaneContainer')
										.fadeIn();
									$('#wc_links_secured_shopping_con_placeholder_details')
										.fadeIn()
										.jScrollPane({showArrows:true});
								} 
							}
						);
				} 
			}
		);
	/*Open popup */	
}
function ss_pop_off()
{
	cal_ss = false;
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links_secured_shopping_con_placeholder .round_c .jScrollPaneContainer')
		.hide();
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("bottom cc:#161618");
	/*close popup*/
	$('.wc_insight_page_content_placeholder .wc_links_secured_shopping_con_placeholder .round_c')
		.animate
		(
			{ 
				width				:	102,
				marginLeft			:	71
			}, 
			{
				duration: 'slow',
				easing: 'easeOutExpo', 
				complete: 
				function () 
				{
					$(".wc_links_secured_shopping_con_placeholder")
						.animate
						(
							{ 
								top				: 	0 
							}, 
							{
								duration: 'slow',
								easing: 'easeInOutBack', 
								complete: 
								function () 
								{
									if($('.wc_links_secured_shopping_con_placeholder').css("top") > "0px")
									{
										//
									}
									else
									{
										$(".wc_secured_shopping_link_placeholder")
											.css
											(
												{
													background		:	"#333333"
												}
											);
										$(".wc_secured_shopping_link")
											.css
											(
												{
													color			:	"#ffffff"
												}
											);
										$('.wc_insight_page_content_placeholder .wc_footer .wc_product_e_com .wc_bottom').corner("cc:#333333 bl");
										$('.wc_insight_page_content_placeholder .wc_footer .wc_links_placeholder')
											.css
											(
												{
													height			:	"30px"
												}
											);
									}
									
								} 
							}
						);
				} 
			}
		);
	/*close popup*/
}
function si_pop_on()
{
	cal_si = true;
	/*bottom left round corder color cccccc*/
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("br cc:#cccccc");
	/*bottom left round corder color cccccc*/
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links_placeholder')
		.css
		(
			{
				height			:	"215px"
			}
		);
	/*Open popup */
	$(".wc_links_shipping_info_cont_placeholder")
		.animate
		(
			{ 
				top				: 	163 
			}, 
			{
				duration: 'slow',
				easing: 'easeInOutBack', 
				complete: 
				function () 
				{
					
					$('.wc_insight_page_content_placeholder .wc_links_shipping_info_cont_placeholder .round_c')
						.animate
						(
							{ 
								width				:	267,
								marginLeft			:	0
							}, 
							{
								duration: 'slow',
								easing: 'easeOutExpo', 
								complete: 
								function () 
								{
									$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("bl cc:#cccccc");
									$('.wc_insight_page_content_placeholder .wc_footer .wc_links_shipping_info_con_placeholder .round_c .jScrollPaneContainer')
										.fadeIn();
									$('#wc_links_shipping_info_con_placeholder_details')
										.fadeIn()
										.jScrollPane({showArrows:true});
								} 
							}
						);
				} 
			}
		);
	/*Open popup */	
}
function si_pop_off()
{
	cal_si = false;
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links_shipping_info_cont_placeholder .round_c .jScrollPaneContainer')
		.hide();
	/*default wc_product_e_com bottom right corner color*/
	$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("bl cc:#161618");
	/*default wc_product_e_com bottom right corner color*/
	/*close popup*/
	$('.wc_insight_page_content_placeholder .wc_links_shipping_info_cont_placeholder .round_c')
		.animate
		(
			{ 
				width				:	94,
				marginLeft			:	173
			}, 
			{
				duration: 'slow',
				easing: 'easeOutExpo', 
				complete: 
				function () 
				{
					$(".wc_links_shipping_info_cont_placeholder")
						.animate
						(
							{ 
								top				: 	0 
							}, 
							{
								duration: 'slow',
								easing: 'easeInOutBack', 
								complete: 
								function () 
								{
									$('.wc_product_e_com').corner("br cc:#0b0b0c");
									if($('.wc_links_shipping_info_cont_placeholder').css("top") > "0px")
									{
										//
									}
									else
									{
										$(".wc_shipping_info_link_placeholder")
											.css
											(
												{
													background		:	"#333333"
												}
											);
										$(".wc_shipping_info_link")
											.css
											(
												{
													color			:	"#ffffff"
												}
											);
										$('.wc_insight_page_content_placeholder .wc_footer .wc_links').corner("br cc:#161618");
										$('.wc_insight_page_content_placeholder .wc_footer .wc_links_placeholder')
										.css
										(
											{
												height			:	"30px"
											}
										);
									}
									
								} 
							}
						);
				} 
			}
		);
		/*close popup*/
}

/*fun_wc_warranty_link_mouseover*/
function fun_wc_warranty_link_mouseenter()
	{
		$(".wc_warranty_link_placeholder")
			.css
			(
				{
					background		:	"#cccccc"
				}
			);
		$(".wc_warranty_link")
			.css
			(
				{
					color			:	"#000000"
				}
			);
		$('.wc_insight_page_content_placeholder .wc_footer .wc_product_e_com .wc_bottom').corner("cc:#cccccc bl");
	}
	function fun_wc_warranty_link_mouseleave()
	{
		$(".wc_warranty_link_placeholder")
			.css
			(
				{
					background		:	"#333333"
				}
			);
		$(".wc_warranty_link")
			.css
			(
				{
					color			:	"#ffffff"
				}
			);
		$('.wc_insight_page_content_placeholder .wc_footer .wc_product_e_com .wc_bottom').corner("cc:#333333 bl");
	}
/*fun_wc_warranty_link_mouseover*/

/*fun_wc_secured_shopping_link_mouseover*/
function fun_wc_secured_shopping_link_mouseenter()
{
	$(".wc_secured_shopping_link_placeholder")
		.css
		(
			{
				background		:	"#cccccc"
			}
		);
	$(".wc_secured_shopping_link")
		.css
		(
			{
				color			:	"#000000"
			}
		);
}
function fun_wc_secured_shopping_link_mouseleave()
{
	$(".wc_secured_shopping_link_placeholder")
		.css
		(
			{
				background		:	"#333333"	,
				color			:	"#ffffff"
			}
		);
	$(".wc_secured_shopping_link")
		.css
		(
			{
				color			:	"#ffffff"
			}
		);
}
/*fun_wc_secured_shopping_link_mouseover*/

/*fun_wc_shipping_info_link_mouseover*/
function fun_wc_shipping_info_link_mouseenter()
{
	$(".wc_shipping_info_link_placeholder")
		.css
		(
			{
				background		:	"#cccccc"
			}
		);
	$(".wc_shipping_info_link")
		.css
		(
			{
				color			:	"#000000"
			}
		);
	$('.wc_insight_page_content_placeholder .wc_footer .wc_product_e_com .wc_bottom').corner("cc:#cccccc br");
}
function fun_wc_shipping_info_link_mouseleave()
{
	$(".wc_shipping_info_link_placeholder")
			.css
			(
				{
					background		:	"#333333"	,
					color			:	"#ffffff"
				}
			);
		$(".wc_shipping_info_link")
			.css
			(
				{
					color			:	"#ffffff"
				}
			);
		$('.wc_insight_page_content_placeholder .wc_footer .wc_product_e_com .wc_bottom').corner("cc:#333333 br");	
}
/*fun_wc_shipping_info_link_mouseover*/
