// JavaScript Document

$(document).ready(function(){
						   var pageID = $('body').attr('id');
						   //alert(pageID);
						   
						   
						   if (pageID == 'HomePage' || pageID == 'ProductPage') {
							   //$('.infoList').hide();
							   $('#BackHeatpack').hover(function(){
																 //$(this).css('background','#e5e5e5');
																 $(this).animate({backgroundColor: "#e5e5e5"}, 500);
																 $(this).find('h2 a').animate({color: "#008998"}, 500);
																 $(this).find('p a').animate({color: "#000"}, 500);
																 $(this).find('img').animate({borderBottomColor: "#f89a2a", borderTopColor: "#f89a2a", borderRightColor: "#f89a2a", borderLeftColor: "#f89a2a"}, 500);
																 },
																 function(){
																	$(this).animate({backgroundColor: "#fff"}, 500);
																	$(this).find('h2 a').animate({color: "#333"}, 500);
																	$(this).find('p a').animate({color: "#7a7b7e"}, 500);
																	$(this).find('img').animate({borderBottomColor: "#fff", borderTopColor: "#fff", borderRightColor: "#fff", borderLeftColor: "#fff"}, 500);
																 }
																 );
							    $('#NeckHeatpack').hover(function(){
																 //$(this).css('background','#e5e5e5');
																 $(this).animate({backgroundColor: "#e5e5e5"}, 500);
																 $(this).find('h2 a').animate({color: "#ff6f1f"}, 500);
																 $(this).find('p a').animate({color: "#000"}, 500);
																 $(this).find('img').animate({borderBottomColor: "#f89a2a", borderTopColor: "#f89a2a", borderRightColor: "#f89a2a", borderLeftColor: "#f89a2a"}, 500);
																 },
																 function(){
																	$(this).animate({backgroundColor: "#fff"}, 500);
																	$(this).find('h2 a').animate({color: "#333"}, 500);
																	$(this).find('p a').animate({color: "#7a7b7e"}, 500);
																	$(this).find('img').animate({borderBottomColor: "#fff", borderTopColor: "#fff", borderRightColor: "#fff", borderLeftColor: "#fff"}, 500);
																 }
																 );
								 $('#KneeHeatpack').hover(function(){
																 //$(this).css('background','#e5e5e5');
																 $(this).animate({backgroundColor: "#e5e5e5"}, 500);
																 $(this).find('h2 a').animate({color: "#e70034"}, 500);
																 $(this).find('p a').animate({color: "#000"}, 500);
																 $(this).find('img').animate({borderBottomColor: "#f89a2a", borderTopColor: "#f89a2a", borderRightColor: "#f89a2a", borderLeftColor: "#f89a2a"}, 500);
																 },
																 function(){
																	$(this).animate({backgroundColor: "#fff"}, 500);
																	$(this).find('h2 a').animate({color: "#333"}, 500);
																	$(this).find('p a').animate({color: "#7a7b7e"}, 500);
																	$(this).find('img').animate({borderBottomColor: "#fff", borderTopColor: "#fff", borderRightColor: "#fff", borderLeftColor: "#fff"}, 500);
																 }
																 );
								  $('#MenstrualHeatpack').hover(function(){
																 //$(this).css('background','#e5e5e5');
																 $(this).animate({backgroundColor: "#e5e5e5"}, 500);
																 $(this).find('h2 a').animate({color: "#ff77b3"}, 500);
																 $(this).find('p a').animate({color: "#000"}, 500);
																 $(this).find('img').animate({borderBottomColor: "#f89a2a", borderTopColor: "#f89a2a", borderRightColor: "#f89a2a", borderLeftColor: "#f89a2a"}, 500);
																 },
																 function(){
																	$(this).animate({backgroundColor: "#fff"}, 500);
																	$(this).find('h2 a').animate({color: "#333"}, 500);
																	$(this).find('p a').animate({color: "#7a7b7e"}, 500);
																	$(this).find('img').animate({borderBottomColor: "#fff", borderTopColor: "#fff", borderRightColor: "#fff", borderLeftColor: "#fff"}, 500);
																 }
																 );
								   $('#HandHeatpack').hover(function(){
																 //$(this).css('background','#e5e5e5');
																 $(this).animate({backgroundColor: "#e5e5e5"}, 500);
																 $(this).find('h2 a').animate({color: "#008628"}, 500);
																 $(this).find('p a').animate({color: "#000"}, 500);
																 $(this).find('img').animate({borderBottomColor: "#f89a2a", borderTopColor: "#f89a2a", borderRightColor: "#f89a2a", borderLeftColor: "#f89a2a"}, 500);
																 },
																 function(){
																	$(this).animate({backgroundColor: "#fff"}, 500);
																	$(this).find('h2 a').animate({color: "#333"}, 500);
																	$(this).find('p a').animate({color: "#7a7b7e"}, 500);
																	$(this).find('img').animate({borderBottomColor: "#fff", borderTopColor: "#fff", borderRightColor: "#fff", borderLeftColor: "#fff"}, 500);
																 }
																 );
						   }
						   
						   
						   
						   if (pageID =='ProductPage') {
							   var browser=navigator.appName;
							   var b_version=navigator.appVersion;
							   var version=parseFloat(b_version);
								
								$('.bigImage').hover(function(){
															  $('.zoomButton').show();
															  },
															  function(){
																  $('.zoomButton').hide();
																  });
								$('#TickerThis').newsticker(5000);
								//ThumbNail Swap
								var currentImage = $('#ImageSwap').attr('src');
								var imageName = currentImage.split("\/");
								var zoomUrl = "images\/Product-Images\/Zoom\/"+imageName[3];
								$('.thumbImage').click(function(){
																var imageOldUrl = $(this).find('img').attr('src');
																var imageAlt = $(this).find('img').attr('alt');
																var imageName = imageOldUrl.split("\/");
																var imageNewUrl = "images\/Product-Images\/Big\/"+imageName[3];
																zoomUrl = "images\/Product-Images\/Zoom\/"+imageName[3];
																var newImageTag = "<img id='ImageSwap' style='display:none;' src='"+imageNewUrl+"' alt='"+imageAlt+"' width='340' height='283'";
																$('#ImageSwap').attr('id','OldImage').after("<img id='ImageSwap' style='display:none;' src='"+imageNewUrl+"' alt='"+imageAlt+"' width='340' height='283' />").fadeOut();
																$('#OldImage').remove();
																$('#ImageSwap').fadeIn();
																//alert(zoomUrl);
																});
								//ColorBox Image Zoom
								//alert (zoomUrl);
								$('.bigImage').click(function(){
															  $.fn.colorbox({href:zoomUrl,open:true});
															  });
								if (ie6var != 1) {
								   $('.productHeader').bg(['0','0','16px','16px']);
							   }
						   }
						 
						   });