$(document).ready(function() {							   	$('.inner h1').css('visibility', 'visible');	var num = 0;	var slider_width = $(".product-selected:first").width();	$(".product-selected").each(function() {		$(this).css("left", parseInt(slider_width*num) + "px");		num = parseInt(num + 1);	});		$("#product-nav li a").click(function() {		var product_index = $(this).attr("rel") - 1;		var position = $(".product-selected:eq(" + product_index + ")").position();		$("#slider-container").animate({			scrollLeft: '+=' + parseInt(position.left) + 'px'		}, 500);	});		$("#utility-wrapper").hoverIntent(		function() {			//$(this).animate({ top: '0' }, 300);		},		function() {			//$(this).animate({ top: '-30px' }, 300);		}	);	    $(".inner h1 span:last-child")        .css({display: "none", fontSize:"80%"});	$(".inner h1 span:first-child")        .css({display: "none", fontSize:"80%"});			$(".dd-container").hover(		function() {			if ($.browser.msie && $.browser.version == '7.0') {				$("ul", this).css("top", "28px");				$(".bottom-cap", this).css("top", "-8px");				$(".dd li a", this).css("margin-top", "-3px");			}			if($.browser.msie) {				$("ul", this).show();			}			else {				$("ul", this).fadeIn();			}			$(".header-tab", this).css("display", "block");		},		function() {			if($.browser.msie) {				$("ul", this).hide();			}			else {				$("ul", this).fadeOut();			}			$(".header-tab", this).hide();		}	);		$(".mega-container").hover(		function() {			$(".header-tab", this).show();			$("ul", this).show();		},		function() {			$(".header-tab", this).hide();			$("ul", this).hide();		}	);			$("#contact-column-large form input, #footer-col-large input, #contact-column-large form textarea").focus(function() {		$(this).animate({'backgroundColor' : '#edf3fe'});	});	$("#contact-column-large form input, #footer-col-large input, #contact-column-large form textarea").blur(function() {		$(this).animate({'backgroundColor' : '#ffffff'});	});		  var currentPosition = 0;  var slideWidth = 439;  var slides = $('.slide');  var numberOfSlides = slides.length;  // Remove scrollbar in JS  $('#slidesContainer').css('overflow', 'hidden');  // Wrap all .slides with #slideInner div  slides    .wrapAll('<div id="slideInner"></div>')    // Float left to display horizontally, readjust .slides width	.css({      'float' : 'left',      'width' : slideWidth    });  // Set #slideInner width equal to total width of all slides  $('#slideInner').css('width', slideWidth * numberOfSlides);  // Insert controls in the DOM  $('#slideshow')    .prepend('<span class="control" id="leftControl">Clicking moves left</span>')    .append('<span class="control" id="rightControl">Clicking moves right</span>');  // Hide left arrow control on first load  manageControls(currentPosition);  // Create event listeners for .controls clicks  $('.control')    .bind('click', function(){    // Determine new position	currentPosition = ($(this).attr('id')=='rightControl') ? currentPosition+1 : currentPosition-1;    	// Hide / show controls    manageControls(currentPosition);    // Move slideInner using margin-left    $('#slideInner').animate({      'marginLeft' : slideWidth*(-currentPosition)    });  });    if($("#tab-pr").hasClass("active")) {  	$("#tab-2").show();  	$("#tab-1").hide();  }  else {  	$("#tab-2").hide();  	$("#tab-1").show();  }  // manageControls: Hides and Shows controls depending on currentPosition  function manageControls(position){    // Hide left arrow if position is first slide	if(position==0){ $('#leftControl').hide() } else{ $('#leftControl').show() }	// Hide right arrow if position is last slide    if(position==numberOfSlides-1){ $('#rightControl').hide() } else{ $('#rightControl').show() }  }		});
