$(function() {   
	
// background code
	
		var theWindow        = $(window);
		    $bg              = $("#bg");
		    aspectRatio      = $bg.width() / $bg.height();
				    		
		function resizeBg() {
			
			if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
			    $bg.removeClass().addClass('bgheight');
			} else {
			    $bg.removeClass().addClass('bgwidth');
			}
						
		}
		                   			
		theWindow.resize(function() {
			resizeBg();
		}).trigger("resize");
	

});


$(function(){
	
	$('span.show-comments').click(function(){
		$(this).siblings('.comment-container-main').slideToggle('slow');
	});
	
	
});







// rollover code
$(function() { 
$("#access .menu li a").hover(
 function () {
       $(this).animate({
		paddingTop: 12+"px"
       }, 50 );
 },
 function () {
       $(this).animate({
		paddingTop: 7+"px"

       }, 50 );
 }
);

});




// home page slider


	$(function(){
		$('#slides').slides({
			preload: false,
			play: 10000,
			pause: 7000,
			hoverPause: true,
			generatePagination: false,
			generateNextPrev: false,
			slideEasing: "easeOutQuad"
			
			
			
		});
	});
	
	



