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

jQuery(document).ready(function(){	

//Dropdowns
	  $("#navigation ul li a.removals-a").hover(function() {
		 $("#dropdown-removals").stop(true, true).slideToggle('medium'); },
		 function() {
		 $("#dropdown-removals").stop(true, true).slideToggle('medium');
	  });
	 
	  $("#dropdown-removals").hover(function() {
		 $(this).stop(true, true).show(); },
	  function() {
		 $(this).stop(true,true).slideUp('medium');
	  }); 
	  
	  $("#navigation ul li a.storage-a").hover(function() {
		 $("#dropdown-storage").stop(true, true).slideToggle('medium'); },
		 function() {
		 $("#dropdown-storage").stop(true, true).slideToggle('medium');
	  });
	 
	  $("#dropdown-storage").hover(function() {
		 $(this).stop(true, true).show(); },
	 	 function() {
		 $(this).stop(true,true).slideUp('medium');
	  }); 
  
 // Lightbox
	 $(function() {
		  $(".lightbox").lightbox();
	 });
 
 // Slideshow
	$(function() {
		 setInterval( "slideSwitch()", 3000 );
	});
	
// Gallery Styling
	$("#galleryContainer img, #sidebar a, .service").css("opacity","1.0");
	
	  $("#galleryContainer img, #sidebar a, .service").hover(function() {
		$(this).css("opacity","0.8"); },
		function() {
		$(this).css("opacity","1.0"); 
	});
	
// Date Picker
	$(function() {
		$( "input.date-field" ).datepicker({dateFormat: 'dd-mm-yy'});
	});
	
// Contact Form Blur States
	$(".form-field, .text-input").focus(function (){
		$(this).animate({backgroundColor:"#f2ede4"},  500);
		i = $(this).val(); 
		//this.select();
		$(this).val("");	
	});
	
// Contact Form Focus States
	$(".form-field, .text-input").blur(function (){
		 if($(this).val() == ''){ 
			$(this).val(i);
		 }
		 $(this).animate({backgroundColor:"#fff"},  500);
	}); 
					
});
