
		jQuery(document).ready(function($) {
			$("a.inline").fancybox({});
			$("div.inline").fancybox({});

			Boxgrid();

		    // Initialise the first and second carousel by class selector.
			// Note that they use both the same configuration options (none in this case).
			jQuery('#main-feature-scroller').jcarousel({
        		scroll: 1,
        		auto: 6,
        		wrap: 'last',
        		initCallback: mainFeature_initCallback
        	});


		});
		
function Boxgrid(){
	jQuery('.reveal-box-holder').hover(function(){
		jQuery(".cover", this).stop().animate({top:'0px'},{queue:false,duration:200});
	}, function() {
		jQuery(".cover", this).stop().animate({top:'145px'},{queue:false,duration:200});
	});
	
}


function mainFeature_initCallback(carousel) {
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });


    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });
 
    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });
 
    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};
