function addShowcase(sc) { if (sc){ v5.showcaseList.push(sc); } } function removeShowcase(sc) { for (i = 0; i < v5.showcaseList.length; i++){ if (v5.showcaseList[i] == sc){ if (typeof(v5.showcaseList[i].stopAutoRotate) == 'function') { v5.showcaseList[i].stopAutoRotate(); } v5.showcaseList.splice(i, 1); break; } } } function removeAllShowcases() { removeAllShowcaseIntervals(); v5.showcaseList.splice(0); v5.showcaseList.length = 0; } function addShowcaseInterval(intv, playFunc) { v5.showcaseIntervals.push(intv); v5.showcasePlayFunctions.push(playFunc); } function removeShowcaseInterval(intv, keepPlay) { for (i = 0; i < v5.showcaseIntervals.length; i++){ if (v5.showcaseIntervals[i] == intv){ v5.showcaseIntervals.splice(i, 1); v5.showcasePlayFunctions.splice(i, 1); break; } } clearInterval(intv); } function removeAllShowcaseIntervals() { for (i = 0; i < v5.showcaseIntervals.length; i++){ clearInterval(v5.showcaseIntervals[i]); } v5.showcaseIntervals.length = 0; //alert('showcase intervals cleared'); } function removeAllPlayFunctions() { v5.showcasePlayFunctions.length = 0; } function stopAllShowcases() { removeAllShowcaseIntervals(); /* for (i = 0; i < v5.showcaseList.length; i++){ v5.showcaseList[i].sliderShowcase.showcaseWrapper.stopAutoRotate(); } */ } function startAllShowcases() { for (i = 0; i < v5.showcasePlayFunctions.length; i++){ if (typeof(v5.showcasePlayFunctions[i]) == 'function'){ interval = v5.showcasePlayFunctions[i](); setTimeout(function() { addShowcaseInterval(interval, v5.showcasePlayFunctions[i]); }, 0); } } }