function ShowElement(id){if(document.getElementById) {var mydiv = document.getElementById(id);mydiv.style.display = 'block';}}
$(document).ready( function() {ShowElement('mycarousel');ShowElement('jcarousel-control');document.getElementById('AutoStatus').innerHTML = 'Play';});
function mycarousel_initCallback(carousel, state) {carousel.clip.hover(function() {carousel.stopAuto();document.getElementById('AutoStatus').innerHTML = 'Pause';}, function() {document.getElementById('AutoStatus').innerHTML = 'Play';carousel.startAuto();});jQuery('.jcarousel-control a').bind('click', function() {carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));return false;});};
function mycarousel_itemAddCallback(carousel, xml) {var $items = jQuery('item', xml);$items.each(function(i) {carousel.add(i + 1, mycarousel_getItemHTML(this));});carousel.size($items.size());carousel.unlock();carousel.setup();};
function mycarousel_truncate(str, length, suffix) {if (str.length <= length) {return str;}if (suffix == undefined) {suffix = '...';}return str.substr(0, length).replace(/\s+?(\S+)?$/g, '') + suffix;};
jQuery(document).ready(function() {jQuery().ajaxStart(function() {jQuery(".jcarousel-clip-vertical").addClass('loading');});
jQuery().ajaxStop(function() {jQuery(".jcarousel-clip-vertical").removeClass('loading');});
jQuery('#mycarousel').jcarousel({scroll: 1,auto: 7,wrap: 'last',visible: 1,initCallback: mycarousel_initCallback,buttonPrevHTML: '',buttonNextHTML: '',animation: 3000,easing: 'easeInOutCubic'});});
