// ---------- start of jQuery document.ready() ----------
  
$(document).ready(function() {   
  
	// hide unnecessary element when Javascript is enabled
		$('a.services').hide();
		
	// Call to action slider	
		$('.mover').click(function(){
			$('ul#slide').animate({"left": "-130px"}, "slow");
		});
		
	// Set images to a grid-friendly height
		$('div.post img').each(function() {
		    var overage = 0; // pixels over even multiple of 18
		    var gridHeight = 0; // grid-friendly height
		    var ratio = 0;  // aspect ratio
		    var width = $(this).width(); // current width
		    var height = $(this).height();  // current height
		    
		    // Get the grid-friendly height
		    overage = height%18; // remainder of height divided by 18
		    gridHeight = height - overage - 4; // new grid-friendly height (ours needs extra 4 off!)
		    ratio = gridHeight / height; // get ratio for scaling width
		    
		    // Set new measurements
		    $(this).css("height", gridHeight); // set new height
		    $(this).css("width", width * ratio); // set new width
		});	
});


// ---------- end of jQuery document.ready() ----------
