// JavaScript Document


		
		
		 $(document).ready(function() {
		 
			$(".dropdown").css("visibility","visible");	$(".dropdown").hide();	 
			$(".services").hover(function () { $(".serv").show(); }, function () { $(".serv").hide(); });
			$(".customer").hover(function () { $(".cust").show(); }, function () { $(".cust").hide(); });
			$(".learning").hover(function () { $(".lear").show(); }, function () { $(".lear").hide(); });
			$(".loyalty").hover(function () { $(".loya").show(); }, function () { $(".loya").hide(); });

			$(".dropdown").hover(
     		 function () { $(this).show(); var newclass = $(this).attr("id");  $("#nav").addClass(newclass); }, 
      		 function () { $(this).hide(); var newclass = $(this).attr("id");  $("#nav").removeClass(newclass);}
    		);
			
			$(".wmrdrop").css("visibility","visible");$(".wmrdrop").hide();
			$("li.lube").hover(function () { $(".wmrlube").show(); }, function () { $(".wmrlube").hide(); });
			$("li.wash").hover(function () { $(".wmrspas").show(); }, function () { $(".wmrspas").hide(); });
			$("li.repair").hover(function () { $(".wmrrepair").show(); }, function () { $(".wmrrepair").hide(); });
			
			$(".uberdrop").css("visibility","visible");	$(".uberdrop").hide();	 
			$(".fleetservices").hover(function () { $(".flee").show(); }, function () { $(".flee").hide(); });
			$(".corporate").hover(function () { $(".corp").show(); }, function () { $(".corp").hide(); });

			$(".uberdrop").hover(
     		 function () { $(this).show();}, 
      		 function () { $(this).hide();}
    		);
			
   			$('#mycarousel').jcarousel({ wrap: 'circular'});	
			$("#faqs").tabs();
			$("#hours").tabs();
			
			$("#faqs div a").click(function() {
    			$(this).next("div.slider").slideToggle('fast');
			});
			
			$("#checkform").validate();
			
			

				 
			$('#localphoto').cycle({ 
   				delay:  2000, 
    			speed:  500 
				});
			
			  $('.slideshow').cycle({
				fx: 'scrollLeft',
				timeout: 10000,
				height: 370,
				pager: '#shownav'
				});

			 $('#testimonials').cycle({
				fx: 'fade',
				timeout: 8000
				});
			
			
			$('#testtest').tooltip({
				track: true,
				delay: 0,
				showURL: false,
				showBody: " - ",
				fade: 250
			});
			
			$('.tooltip').tooltip({
				track: true,
				delay: 0,
				showURL: false,
				showBody: " - ",
				fade: 250
			});
			
			$("a.checkmark").tooltip({
				bodyHandler: function() {
					return $($(this).attr("href")).html();
					},
				showURL: false
			});
			
			/* These are for the dropdown change movement out */
			$("#servicejump").change(function () {
	  			var quick = "";
	  			$("#servicejump option:selected").each(function () {
					quick = $(this).attr("value");
					window.location = quick;
					var quick = "";
		 		 });
			});
			
			$(".careerscomp").live("change keyup", function () {
                $("#careersform").submit();
            });
			$(".careerscomppage").live("change keyup", function () {
                $("#careersformpage").submit();
            });	
			
			/* These are for the dropdown for make and model */
			$(".make").change( function() {
       			$(".model").hide();
				var typex = $(this).attr("value");
				$.get('../makemodel/'+ typex + '.html', function(data) {
 						$('.model').html(data);
				 		$(".model").show();
				},'HTML');
				
   			 });
			
			/* These are for the zipcode clear out */
			$(".fal").focus(function() {
        		var val = $(this).attr("value");
				if (val == 'Zip or City, State') {
					$(this).attr("value","");
				}
			});
			
			$(".ftfind").focus(function() {
        		var val = $(this).attr("value");
				if (val == 'Zip or City, State') {
					$(this).attr("value","");
				}
			});			 
 		});
