$(document).ready(function() {
	/**/
	$('#locations > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
	
	$('#locations').corner("10px");
	$('.jcarousel-skin-tango').corner("5px");
	$('.locationlist').corner("5px");
		
	
	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();
		});
	};
	
    $('.locationlist').jcarousel({
        vertical: true,
        scroll: 1,
		auto: 3, /* autorotate in seconds*/
		speed: 1, 
		wrap: 'last',
		initCallback: mycarousel_initCallback,
		buttonNextHTML: null,
        buttonPrevHTML: null
    });
/*	
	$('.jcarousel').jcarousel({
			vertical: true,
			scroll: 1,
			auto: 2,
			wrap: 'last',
			initCallback: mycarousel_initCallback
	});
	*/
/*    jQuery('#mycarousel').jcarousel({
        auto: 2,
        wrap: 'last',
        initCallback: mycarousel_initCallback
	});
*/


/*
	var top_post = 1 ;
	var bottom_post = 2 ;
	var post_length = $(".rotatelist").length;
  $("#timer_handle").everyTime(8000, function() { 
		next_post = (bottom_post % post_length)+1;
		$("#"+top_post).queue(function () {
			$(this).hide("slow");
			$("#"+next_post).show("slow");
			$(this).dequeue();
		});
		$("#"+top_post).queue(function () {
			$("#rotatelist").append($(this))
			$(this).dequeue();
		});
		top_post = bottom_post
		bottom_post = next_post
	});



*/

});

