jQuery(document).ready(function(){
	
	/* Contact Form */
	
	$("#contactForm fieldset#contactDetails input, #contactForm textarea").css("-moz-border-radius","10px");
	$("#contactForm fieldset#contactDetails input, #contactForm textarea").css("-webkit-border-radius","10px");
	$("#contactForm fieldset#contactDetails input, #contactForm textarea").css("border-radius","10px");
	$("#contactForm fieldset input, #contactForm textarea").css("-moz-border-radius","10px");
	$("#contactForm fieldset input, #contactForm textarea").css("border-radius","10px");
	$("#contactForm fieldset input, #contactForm textarea").css("-webkit-border-radius","10px");	
	
	// Text Shadow
     $(".headline").css("text-shadow","2px 2px 2px #6b9626");
	
	// Lightbox
	$(function() {
		$(".lightbox").lightbox();
	});
	
	// Hide/Show Specifications
	$("p.spec").addClass("switchOff").click(function() {
													 
		if($(this).is(".switchOff")) {
			$(this).next().slideDown("slow", function() { 
				$(this).prev().removeClass("switchOff").addClass("switchOn");
			});
			
		} 
		if ($(this).is(".switchOn")) {
			$(this).next().slideUp("slow", function() { 
				$(this).prev().removeClass("switchOn").addClass("switchOff");
			});
		}
		
		return false;
		
	}).next().hide();
	
	//Dropdowns
		  $("#navigation ul li a.pitches-a").hover(function() {
			 $("#dropdown").stop(true, true).slideToggle('medium'); },
			 function() {
			 $("#dropdown").stop(true, true).slideToggle('medium');
		  });
		 
		  $("#dropdown").hover(function() {
			 $(this).stop(true, true).show(); },
		  function() {
			 $(this).stop(true,true).slideUp('medium');
		  }); 
		  
// Gallery Styling
	$("#galleryContainer img, #cta-testimonials").css("opacity","1.0");
	
	  $("#galleryContainer img, #cta-testimonials").hover(function() {
					$(this).css("opacity","0.8"); },
					function() {
					$(this).css("opacity","1.0"); 
	});		  
		  	
});

	// SlideShow
		function slideSwitch() {
			var $active = $('#slideshow img.active');
		
			if ( $active.length == 0 ) $active = $('#slideshow img:last');
		
			var $next =  $active.next().length ? $active.next()
				: $('#slideshow img:first');
		
			$active.addClass('last-active');
		
			$next.css({opacity: 0.0})
				.addClass('active')
				.animate({opacity: 1.0}, 1000, function() {
					$active.removeClass('active last-active');
				});
		}
		
		$(function() {
			setInterval( "slideSwitch()", 3000 );
		});
