
	
	$(document).ready(function() {


	
		$(".vestOverviewNav img").hover(
			function()
			{
				this.src = this.src.replace("_off","_over");
			},
			function()
			{
				this.src = this.src.replace("_over","_off");
			}
		);



		$("#homeActionPromoImage").hover(
			function()
			{
		      $("#homeActionPromo").show();
				$("#homeActionPromo").hover(
					function()
					{ 
					},
					function()
					{
						$("#homeActionPromo").hide();	
					});				
		
			},
			function()
			{
				
			}
		);

		$("#homeResearchPromoImage").hover(
			function()
			{
		      $("#homeResearchPromo").show();
				$("#homeResearchPromoBox").hover(
					function()
					{ 
					},
					function()
					{
						$("#homeResearchPromo").hide();	
					});				
		
			},
			function()
			{
				
			}
		);

	

		/*These handle the rollovers and hide shows. Need a better way to do this. It's cludgy */
	 	$("#aboutOn").click(function () {
	      $("#vestContainer1").hide();
	      $("#vestContainer2").show();
	      $("#vestContainer3").hide();
	    });

	 	$("#aboutOn1").click(function () {
	      $("#vestContainer1").hide();
	      $("#vestContainer2").show();
	      $("#vestContainer3").hide();
	    });
	

	 	$("#specsOn").click(function () {
	      $("#vestContainer1").hide();
	      $("#vestContainer2").hide();
	      $("#vestContainer3").show();
	    });

	 	$("#specsOn1").click(function () {
	      $("#vestContainer1").hide();
	      $("#vestContainer2").hide();
	      $("#vestContainer3").show();
	    });

	 	$("#featuresOn").click(function () {
	      $("#vestContainer1").show();
	      $("#vestContainer2").hide();
	      $("#vestContainer3").hide();
	    });

	 	$("#featuresOn1").click(function () {
	      $("#vestContainer1").show();
	      $("#vestContainer2").hide();
	      $("#vestContainer3").hide();
	    });


		//$("#vestContainer1").show();
		
		
		/*The pop ups for the vest. Again, would like something generalized */
		$("#ftrAir").hover(
	      function () {
	        $("#ftrAir_pop").show();
		   $("#ftrAir").attr({ 
		          src: "../images/featureDotBg.png"
		        });
			      }, 
	      function () {
	        $("#ftrAir_pop").hide();
		   $("#ftrAir").attr({ 
		          src: "../images/featureDot.png"
		        });
	      }
	    );


		$("#ftrInflate").hover(
	      function () {
	        $("#ftrInflate_pop").show();
		   $("#ftrInflate").attr({ 
		          src: "../images/featureDotBg.png"
		        });
	      }, 
	      function () {
	        $("#ftrInflate_pop").hide();
		   $("#ftrInflate").attr({ 
		          src: "../images/featureDot.png"
		        });
	      }
	    );

		$("#ftrColor").hover(
	      function () {
	        $("#ftrColor_pop").show();
		   $("#ftrColor").attr({ 
		          src: "../images/featureDotBg.png"
		        });
	
	      }, 
	      function () {
	        $("#ftrColor_pop").hide();
		   $("#ftrColor").attr({ 
		          src: "../images/featureDot.png"
		        });
	
	      }
	    );

		$("#ftrCord").hover(
	      function () {
	        $("#ftrCord_pop").show();
		   $("#ftrCord").attr({ 
		          src: "../images/featureDotBg.png"
		        });
	
	      }, 
	      function () {
	        $("#ftrCord_pop").hide();
		   $("#ftrCord").attr({ 
		          src: "../images/featureDot.png"
		        });	
	      }
	    );
		
		$("#ftrWeight").hover(
	      function () {
	        $("#ftrWeight_pop").show();
		   $("#ftrWeight").attr({ 
		          src: "../images/featureDotBg.png"
		        });
	
	      }, 
	      function () {
	        $("#ftrWeight_pop").hide();
		   $("#ftrWeight").attr({ 
		          src: "../images/featureDot.png"
		        });
	      }
	    );
		
		$("#ftrCavity").hover(
	      function () {
	        $("#ftrCavity_pop").show();
		   $("#ftrCavity").attr({ 
		          src: "../images/featureDotBg.png"
		        });
	
	      }, 
	      function () {
	        $("#ftrCavity_pop").hide();
		   $("#ftrCavity").attr({ 
		          src: "../images/featureDot.png"
		        });
	
	      }
	    );

		
		
		/* $("ul.sf-menu").superfish({

			speed: 'fast'
		}); */
		
		
		
		$("#sf-menu li ul").hide(); 

			$("#sf-menu li").hover(
		        function () {
				$(this).children("ul").show();
		        },function(){
				$(this).children("ul").hide();
			});//hover

		    $('#s4').after('<div id="nav" class="nav">').cycle({
		        fx:     'fade',
		        speed:  'slow',
		        timeout: 7000,
		        before: function() { if (window.console) console.log(this.src); }
		    });
		
		$('#contactForm').validate();
		
		$('.photoThumb a').lightBox();
		

	});
