if(started) {
started = false;
window.clearInterval(oInterval);
}
},
isStarted: function() {
return started;
}
};
function initData() {
if(zsliderSetting) {
var temp_callbacks = zsliderSetting.callbacks;
$.extend(setting, zsliderSetting);
$.extend(setting.callbacks, temp_callbacks);
itemLenght = setting.imagePanels.length;
}
//convert to the jquery object
setting.imagePanels = $(setting.imagePanels);
setting.ctrlItems = $(setting.ctrlItems);
setting.flipBtn.container = $(setting.flipBtn.container);
setting.flipBtn.preBtn = $(setting.flipBtn.preBtn);
setting.flipBtn.nextBtn = $(setting.flipBtn.nextBtn);
}
function initLook() {
//show the first image panel and hide other
setting.imagePanels.hide();
setting.imagePanels.filter(':first').show();
//activate the first control item and deactivate other
setting.ctrlItems.removeClass(setting.ctrlItemHoverCls);
setting.ctrlItems.filter(':first').addClass(setting.ctrlItemHoverCls);
$(that).css('overflow', 'hidden');
if(setting.panelHoverShowFlipBtn) {
showFlipBtn(false);
}
}
function initEvent() {
$(concatArray(setting.imagePanels,
setting.flipBtn.preBtn, setting.flipBtn.nextBtn, true)).hover(function() {
if(setting.panelHoverStop) {
slider.stop();
}
if(setting.panelHoverShowFlipBtn) {
showFlipBtn(true);
}
}, function() {
slider.start();
if(setting.panelHoverShowFlipBtn) {
showFlipBtn(false);
}
});
if(setting.ctrlItemActivateType === 'click') {
setting.ctrlItems.unbind('click');
setting.ctrlItems.bind('click', function() {
slider.to($(this).index());
});
} else {
setting.ctrlItems.hover(function() {
slider.stop();
slider.to($(this).index());
}, function() {
slider.start();
});
}
setting.flipBtn.preBtn.unbind('click');
setting.flipBtn.preBtn.bind('click', function() {
slider.pre();
});
setting.flipBtn.nextBtn.unbind('click');
setting.flipBtn.nextBtn.bind('click', function() {
slider.next();
});
}
function init() {
initData();
initLook();
initEvent();
}
function showFlipBtn(show) {
var hasContainer = setting.flipBtn.container.length > 0,










