function reloadOthers( index ) { for( var i in carousels ) if( index.toString( ) != i.toString( ) ) cReload( i ); } function cStop( index, isIE6 ) { index = index.toString( ); var c = carousels[index]; c.setup( ); c.reload( ); if( isIE6 ) { var newHeight = (200*Math.ceil(c.size( )/5)) +"px"; document.getElementById("c"+ index +"-carousel-clip").style.height = newHeight; } jQuery(".jcarousel-skin-tango").addClass('jcarousel-skin-tango-expanded'); document.getElementById("c"+ index +"-carousel-clip").style.marginLeft = "5px"; document.getElementById("c"+ index +"-carousel-ul").style.width = "600px"; c.lock(); document.getElementById("c"+ index +"-carousel-reload").style.display = "inline"; document.getElementById("c"+ index +"-carousel-stop").style.display = "none"; return false; } function cReload( index ) { index = index.toString( ); var c = carousels[index]; jQuery(".jcarousel-skin-tango").removeClass('jcarousel-skin-tango-expanded'); document.getElementById("c"+ index +"-carousel-clip").style.height = "auto"; document.getElementById("c"+ index +"-carousel-clip").style.marginLeft = "5px"; c.unlock(); c.setup(); c.reload(); document.getElementById("c"+ index +"-carousel-stop").style.display = "inline"; document.getElementById("c"+ index +"-carousel-reload").style.display = "none"; return false; } var carousels = {}; function mycarousel_initCallback(carousel, state) { var myID = (carousel.container.attr("id")).split("-"); myID = myID[0].substring( 1 ); carousels[myID] = carousel; }; jQuery(document).ready(function() { var i = 1; var c = document.getElementById( 'c'+ i +'-carousel' ); var jc, p, stuff; while( c ) { jc = jQuery('#c'+ i +'-carousel'); jc.jcarousel({ visible: 5, scroll: 5, animation: "slow", easing: "swing", initCallback: mycarousel_initCallback }); i++; c = document.getElementById( 'c'+ i +'-carousel' ); } }); //This function is called after HTML block is inserted into a page through AJAX call //The controls in the HTML block need to be registered with the jQuery //This is just the copy of function mentioned above function jQueryUpdate() { jQuery(document).ready(function() { var i = 1; var c = document.getElementById( 'c'+ i +'-carousel' ); var jc, p, stuff; while( c) { jc = jQuery('#c'+ i +'-carousel'); jc.jcarousel({ visible: 5, scroll: 5, animation: "slow", easing: "swing", initCallback: mycarousel_initCallback }); i++; c = document.getElementById( 'c'+ i +'-carousel' ); } }); }