$(document).ready(function() {
	
	// scrollable
	$("#scrollable").scrollable({ easing: 'easeInBounce', speed: 2000, size: 1, clickable: true}).autoscroll(9000).circular().navigator();
	
	api = $('div#scrollable').scrollable();

	api.onBeforeSeek(function(event,index){

	// Use a recursive* function approach here, if the image is faded out
//	 * we will allow advancing to the next slide, which will trigger the
//	 * onSeek event to fade the slides back in 
	var element = jQuery("div#scrollable");
	if (element.css('opacity') == 0.6) {
		return true;
	}

	// The slide has not yet started fading out, so we will fade the item
//	 * out 
	element.fadeTo("slow", 0.6, function(){
//		 Once the fade is complete we will call api.seekTo() to trigger
//		 * the onBeforeSeek event again, which will now advance the slide
//		 * because we will be returning true instead of false 
		api.seekTo(index);
	});

	// Prevent advancing the slide on the first call to onBeforeSeek
	return false;

	}).onSeek(function(){

		// Fade the item back in
		jQuery("div#scrollable").fadeTo('slow', 1);

	});

	// efekti
	$.preloadCssImages();
	
	
	
/*	$("#wrapper").hide();
	$("#wrapper").fadeIn("slow");
	$("#slider").hide();
	$("#slider").fadeIn("slow");
	$("#content").hide();
	$("#content").fadeIn("slow");
			
	$("li.redvoznje").click(function() {
		$("#content").hide();
		$("#content").slideDown("slow");
	});
*/


});
