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();
    });
};

jQuery(document).ready(function() {

//	for navigation
jQuery('.top-menu ul').superfish();	

$(".auto .jCarouselLite").jCarouselLite({
	btnNext: ".nextbtn",
    btnPrev: ".prevbtn",
       

    auto: 5000,
    speed: 200
});

	// select box
	//jQuery('.changeMe1').sSelect({ddMaxHeight: '130px'}).getSetSSValue('0');

/*UPDATE LIST OF EVENTS in EVENT Register Page*/
	if($("form#cformsform select#cf_field_6").length > 0)
	{
		//-- Fetch Selected Event ID from URL with hash--
			var pathname = window.location.hash;
			var eid = "";
			if(typeof(pathname)!='undefined') eid = pathname.split("=")[1];
		//---
		$.ajax({
			type:"POST",
			url: "/wp-content/themes/annette/events-list.php",
			data:"eid=" + eid,
			beforeSend: function(){
				$("form#cformsform select#cf_field_6").attr("disabled", "disabled");
				$("form#cformsform select#cf_field_6").html('<option value="">---Loading---</option>');
			},
			success: function(msg){
				$("form#cformsform select#cf_field_6").html(msg);
			},
			complete: function(xml){
				$("form#cformsform select#cf_field_6").removeAttr("disabled");
			}
		});
	}
/************************/

});

