var i = 0, before_i = 0, del_i = 0; var pid; function toppic(){ //console.log(i+'_'+ before_i+ '_'+(i-1)); $('.photoShow div').removeClass('active'); $('.photoShow div').eq(i).toggleClass('active'); //---------------------- if (i >= 5) { i = -1; } i++; } $(function(){ pid = setInterval("toppic()", 2000); $(".photoShow div").hover( function () { clearInterval(pid); $('.photoShow div').removeClass('active'); }, function () { i = $(".photoShow div").index(this); //console.log(i); pid = setInterval(toppic, 2000); } ); }); var allDialogs = []; var seq = 0; var bottomclose = '
'; function iframe(url, w, h) { return ''; } function CreateBoxy(tit, cnt, options) { options = $.extend({ title: tit }, options || {}); var dialog = new Boxy(cnt, options); allDialogs.push(dialog); return false; } function ShowIFrame(title, url, w, h, closeplace) { var options; var cnt = iframe(url, w, h); if (closeplace == 'top') { options = { fixed: false, modal: true } } else if (closeplace == 'bottom') { options = { fixed: false, modal: true, closeable: false } cnt = cnt + bottomclose; } else { options = { fixed: false, modal: true, closeable: false } } return CreateBoxy(title, cnt, options); }