function mycarousel_initCallback(carousel)
{
	$(".carousel-mini").animate({opacity: 0.5}, 200);
    // 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();
    });
};


function callback1(carousel)			// Homepage carousel setup (changing the big image with fade effect)
	{
		/*$(".holder-home img").hide();	
		$(".holder-home img").animate({opacity: 1.0}, 300)
		$(".img").attr("src", "http://www.digital-partners.co.uk/dev/plastech/resources/images/carousel-home-car-"+carousel.first+"-med.jpg");
		$(".holder-home img").fadeIn(250);
		$(".holder-home a").attr("href", "http://www.digital-partners.co.uk/dev/plastech/resources/images/carousel-home-car-"+carousel.first+"-large.jpg");
		$(".holder-home a").attr("title", $(this).attr("title"));*/
	}
	
function callback2(carousel)			// Subpage carousel setup (changing the big image with fade effect)
	{
		/*$(".holder img").hide();	
		$(".holder img").animate({opacity: 1.0}, 300)
		$(".img").attr("src", "");
		$(".holder img").fadeIn(250);
		$(".holder a").attr("href", "");
		$(".holder a").attr("title", $(this).attr("title"));*/
	}

jQuery(document).ready(function() {
    $('a[@rel*=lightbox]').lightBox();				// Initialise the lightbox for the quick galleries
	$(".carousel-mini").hover(function(){			// Handle thumbnail hovering on galleries
		$(this).animate({opacity: 1.0}, 300);
	}, function(){
		$(this).animate({opacity: 1.0}, 300);
	});
$('#innerfade').innerfade({ speed: 'slow', timeout: 4000, type: 'sequence'}); 
});




// Easing plugin for bounce effect on carousels
jQuery.easing['BounceEaseOut'] = function(p, t, b, c, d) {
	if ((t/=d) < (1/2.75)) {
		return c*(7.5625*t*t) + b;
	} else if (t < (2/2.75)) {
		return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
	} else if (t < (2.5/2.75)) {
		return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
	} else {
		return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
	}
};
