function mycarousel_initCallback(carousel)
{
    // 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 () {
		$('.anythingSlider').anythingSlider({
			easing: "swing",        // Anything other than "linear" or "swing" requires the easing plugin
			autoPlay: false,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
			delay: 3000,                    // How long between slide transitions in AutoPlay mode
			startStopped: false,            // If autoPlay is on, this can force it to start stopped
			animationTime: 1000,             // How long the slide transition takes
			hashTags: true,                 // Should links change the hashtag in the URL?
			buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
			pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
			startText: "Go",             // Start text
			stopText: "Stop"               // Stop text
		});
		
		$(".thumbnails a").click(function(){
			 $('.anythingSlider').anythingSlider(parseInt($(this).attr('rel')));
		});
});
			
jQuery(document).ready(function() {
	/*
	$("#sponsors").jCarouselLite({
		auto: 1000,
		speed: 1000,
		visible: 4
	});
	*/
	$('#slideshow').cycle({ 
		delay:  900, 
		speed:  800
	});
	
	/*INITIATING FANCY BOX*/
	$("a[rel=album]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'overlayOpacity'	: 0.6,
		'overlayColor'		: '#000',
		'titleShow'			: true,
		'showCloseButton'	: true,
		'showNavArrows'		: true,
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
});

