	
	$(document).ready(function(){
		
		$(".featureBox,.detailsBox").each(function(){
				$(this).css("cursor", "pointer");
				$(this).click(function(){
					location.href = $(this).children("h3").children("a").attr("href");
				});
		});
		
		$(".newsPhotoHome").click(function(){
			location.href = $(this).children("div").children("div").children("a").attr("href");
		});
		
		$('.homeSlideshow').cycle({
			fx: 'fade',
			speed:  2000,
			timeout:  5000,
			pause: 1
		});
		
		 $('#newsPhotoSlideshow').cycle({
	        fx:     'fade',
	        speed:  'fast',
	        timeout: 0,
	        pager:  '#newsNav', 
		     pagerAnchorBuilder: function(idx, slide) { 
		        // return selector string for existing anchor 
		        return '#newsNav li:eq(' + idx + ') a'; 
		     },
			  allowPagerClickBubble: true
	    });

	   $("#newsNav li a,.bannerImageBig").lazyload();
	    
	    if ($("#newsNav li#selected").size()) {
		    $("#newsNavContainer").scrollTo("#selected", 800, { axis: "x", offset: -435 });
		    $('#newsPhotoSlideshow').cycle($("#newsNav li#selected").index());
		 }
	   
		$("#newsNav li a").click(function(){
			$("#newsNavContainer").scrollTo($(this), 800, { axis: "x", offset: -435 });
			return false;
		});
		
		
	});

