You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.6 KiB
JavaScript

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 = '<div class="boxy_bottom"><a onclick="Boxy.get(this).hide(); return false" class="close">CLOSE X</a></div>';
function iframe(url, w, h) {
return '<iframe id="Dialog-iframe" frameborder="0" src="' + url + '" style="width: ' + w + 'px; height: ' + h + 'px;"></iframe>';
}
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);
}