jQuery(document).ready(function(){
																	
	
$('a.media').media( { width: 240, height: 215 } );
	
$("#Map").click(function () {
    $(".media").show();
});	
	
	  
	// 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();
	
	 
	 //shows and hides the boiler urgency form depending on if New boilers is selected in the Service dropdown
	 $('#service').change(function() {
           selected = $(this).val();
           if (selected == 'boilers') {
               // Show the boiler form
               $('#boiler-form').show();
               $('#boilerurgency').removeAttr("disabled"); 
           }
           else {
               // Hide the boiler form and reset inputs
               $('#boiler-form').hide();
               $('#boilerurgency').attr("disabled", true); 
           }
     });

 	  $('#found').change(function() {
           selected = $(this).val();
           if (selected == 'Radio') {
               // Show the boiler form
               $('#radio-form').show();
               $('#radio').removeAttr("disabled"); 
           }
           else {
               // Hide the boiler form and reset inputs
               $('#radio-form').hide();
               $('#radio').attr("disabled", true); 
           }
     });
	  
 	  $('#found').change(function() {
           selected = $(this).val();
           if (selected == 'Yellow Pages') {
               // Show the boiler form
               $('#yellow-form').show();
               $('#yellow').removeAttr("disabled"); 
           }
           else {
               // Hide the boiler form and reset inputs
               $('#yellow-form').hide();
               $('#yellow').attr("disabled", true); 
           }
     });
	  
 	  $('#found').change(function() {
           selected = $(this).val();
           if (selected == 'Local Press') {
               // Show the boiler form
               $('#local-form').show();
               $('#local').removeAttr("disabled"); 
           }
           else {
               // Hide the boiler form and reset inputs
               $('#local-form').hide();
               $('#local').attr("disabled", true); 
           }
     });
	  
 	  $('#found').change(function() {
           selected = $(this).val();
           if (selected == 'BT Phonebook') {
               // Show the boiler form
               $('#bt-form').show();
               $('#bt').removeAttr("disabled"); 
           }
           else {
               // Hide the boiler form and reset inputs
               $('#bt-form').hide();
               $('#bt').attr("disabled", true); 
           }
     });	  
	  
 	  $('#found').change(function() {
           selected = $(this).val();
           if (selected == 'Engineer Passback') {
               // Show the boiler form
               $('#engineer-form').show();
               $('#engineer').removeAttr("disabled"); 
           }
           else {
               // Hide the boiler form and reset inputs
               $('#engineer-form').hide();
               $('#engineer').attr("disabled", true); 
           }
     });
	  
 	  $('#found').change(function() {
           selected = $(this).val();
           if (selected == 'Internet Search Engine') {
               // Show the boiler form
               $('#search-form').show();
               $('#search').removeAttr("disabled"); 
           }
           else {
               // Hide the boiler form and reset inputs
               $('#search-form').hide();
               $('#search').attr("disabled", true); 
           }
     });	  
 	  $('#found').change(function() {
           selected = $(this).val();
           if (selected == 'Existing Customer') {
               // Show the boiler form
               $('#existing-form').show();
               $('#existing').removeAttr("disabled"); 
           }
           else {
               // Hide the boiler form and reset inputs
               $('#existing-form').hide();
               $('#existing').attr("disabled", true); 
           }
     });	  
	  
	  
	  
	  
});

	// 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 );
		});
		
		