var mycarousel_itemList = [
	{url: '/store/skin2/images/carousel_image_tweety.png', title: 'Tweety Super Combo', href: '/store/Tweety-super-combo-bounce-house-slide.html'},
	{url: '/store/skin2/images/carousel_image_4_no1.png', title: 'NO Delivery Charges', href: '/index.php'},
	{url: '/store/skin2/images/carousel_image_2B.png', title: 'Marlin Splash', href: '/store/Marlin-Splash-Slide.html'},
	{url: '/store/skin2/images/carousel_image_4_no2.png', title: 'NO Setup Fees', href: '/index.php'},
    {url: '/store/skin2/images/carousel_image_3.png', title: 'Sesame Street Learning Town', href: '/store/Sesame-Street-Learning-Town-Toddlers.html'},
	{url: '/store/skin2/images/carousel_image_4_no3.png', title: 'NO Hidden Charges', href: '/index.php'}
	
];

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 mycarousel_itemVisibleInCallback(carousel, item, i, state, evt)
{
    // The index() method calculates the index from a
    // given index who is out of the actual item range.
    var idx = carousel.index(i, mycarousel_itemList.length);
    carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1]));
};

function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt)
{
    carousel.remove(i);
};

/**
 * Item html creation helper.
 */
function mycarousel_getItemHTML(item)
{
    return '<a href="' + item.href + '"><img src="' + item.url + '" width="534" height="213" border="0" alt="' + item.title + '" /></a>';
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
		wrap: 'circular', 
		vertical: true,
		auto: 5,
		scroll: 1,
		animation: 500,
        itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback},
        itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback}
    });
});

$(function(){
	// Tabs
	// Tabs
	$('#tabs').tabs();


	// Datepicker
	$("#datepicker").datepicker();
});