1954 lines
49 KiB
JavaScript
1954 lines
49 KiB
JavaScript
(function (a, b) {
|
|
function u(c, d, e) {
|
|
var f = 0;
|
|
var g = e.find("#creative_layer_holder");
|
|
c.find("div").each(function (c) {
|
|
var d = a(this);
|
|
if (d.data("parent") == b) d.data("parent", d.parent());
|
|
if (d.hasClass("creative_layer")) {
|
|
d.css({
|
|
opacity: "0.0"
|
|
});
|
|
d.appendTo(g)
|
|
}
|
|
});
|
|
e.find("#creative_layer_holder div").each(function (c) {
|
|
var e = a(this);
|
|
if (e.hasClass("creative_layer")) {
|
|
e.css({
|
|
opacity: "1.0"
|
|
});
|
|
if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) {
|
|
e.addClass("noFilterClass");
|
|
e.css({
|
|
display: "none"
|
|
})
|
|
}
|
|
}
|
|
if (e.attr("id") != "ext_ext_before" && !e.hasClass("freshslice") && !e.hasClass("freshbox")) {
|
|
e.stop(true, true)
|
|
}
|
|
if (e.data("_top") == b) e.data("_top", e.position().top);
|
|
if (e.data("_left") == b) e.data("_left", e.position().left);
|
|
if (e.data("_op") == b) {
|
|
e.data("_op", e.css("opacity"))
|
|
}
|
|
e.css({
|
|
"z-index": 1200
|
|
});
|
|
if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) {
|
|
if (e.hasClass("creative_layer")) {
|
|
e.css({
|
|
display: "block"
|
|
})
|
|
}
|
|
} else {
|
|
if (e.hasClass("slideup")) {
|
|
e.animate({
|
|
top: e.data("_top") + 20 + "px"
|
|
}, {
|
|
duration: 0,
|
|
queue: false
|
|
}).delay(d + (f + 1) * 200).animate({
|
|
top: e.data("_top") - 20 + "px"
|
|
}, {
|
|
duration: 300,
|
|
queue: true
|
|
});
|
|
f++
|
|
}
|
|
if (e.hasClass("slideright")) {
|
|
e.animate({
|
|
left: e.data("_left") - 20 + "px"
|
|
}, {
|
|
duration: 0,
|
|
queue: false
|
|
}).delay(d + (f + 1) * 200).animate({
|
|
left: e.data("_left") + 20 + "px"
|
|
}, {
|
|
duration: 300,
|
|
queue: true
|
|
});
|
|
f++
|
|
}
|
|
if (e.hasClass("slidedown")) {
|
|
e.animate({
|
|
top: e.data("_top") - 20 + "px"
|
|
}, {
|
|
duration: 0,
|
|
queue: false
|
|
}).delay(d + (f + 1) * 200).animate({
|
|
top: e.data("_top") + 20 + "px"
|
|
}, {
|
|
duration: 300,
|
|
queue: true
|
|
});
|
|
f++
|
|
}
|
|
if (e.hasClass("slideleft")) {
|
|
e.animate({
|
|
left: e.data("_left") + 20 + "px"
|
|
}, {
|
|
duration: 0,
|
|
queue: false
|
|
}).delay(d + (f + 1) * 200).animate({
|
|
left: e.data("_left") - 20 + "px"
|
|
}, {
|
|
duration: 300,
|
|
queue: true
|
|
});
|
|
f++
|
|
}
|
|
if (e.hasClass("fadeup")) {
|
|
e.animate({
|
|
top: e.data("_top") + 20 + "px",
|
|
opacity: 0
|
|
}, {
|
|
duration: 0,
|
|
queue: false
|
|
}).delay(d + (f + 1) * 200).animate({
|
|
top: e.data("_top") - 20 + "px",
|
|
opacity: e.data("_op")
|
|
}, {
|
|
duration: 300,
|
|
queue: true
|
|
});
|
|
f++
|
|
}
|
|
if (e.hasClass("faderight")) {
|
|
e.animate({
|
|
left: e.data("_left") - 20 + "px",
|
|
opacity: 0
|
|
}, {
|
|
duration: 0,
|
|
queue: false
|
|
}).delay(d + (f + 1) * 200).animate({
|
|
left: e.data("_left") + 20 + "px",
|
|
opacity: e.data("_op")
|
|
}, {
|
|
duration: 300,
|
|
queue: true
|
|
});
|
|
f++
|
|
}
|
|
if (e.hasClass("fadedown")) {
|
|
e.animate({
|
|
top: e.data("_top") - 20 + "px",
|
|
opacity: 0
|
|
}, {
|
|
duration: 0,
|
|
queue: false
|
|
}).delay(d + (f + 1) * 200).animate({
|
|
top: e.data("_top") + 20 + "px",
|
|
opacity: e.data("_op")
|
|
}, {
|
|
duration: 300,
|
|
queue: true
|
|
});
|
|
f++
|
|
}
|
|
if (e.hasClass("fadeleft")) {
|
|
e.animate({
|
|
left: e.data("_left") + 20 + "px",
|
|
opacity: 0
|
|
}, {
|
|
duration: 0,
|
|
queue: false
|
|
}).delay(d + (f + 1) * 200).animate({
|
|
left: e.data("_left") - 20 + "px",
|
|
opacity: e.data("_op")
|
|
}, {
|
|
duration: 300,
|
|
queue: true
|
|
});
|
|
f++
|
|
}
|
|
if (e.hasClass("fade")) {
|
|
e.animate({
|
|
opacity: 0
|
|
}, {
|
|
duration: 0,
|
|
queue: false
|
|
}).delay(d + (f + 1) * 200).animate({
|
|
opacity: e.data("_op")
|
|
}, {
|
|
duration: 300,
|
|
queue: true
|
|
});
|
|
f++
|
|
}
|
|
}
|
|
})
|
|
}
|
|
function t(a) {
|
|
jQuery(a.find("#drag")).animaDrag({
|
|
speed: 0,
|
|
interval: 0,
|
|
easing: null,
|
|
direction: "vertical",
|
|
boundary: a.find("#mask"),
|
|
boundary_offset: 30,
|
|
grip: null,
|
|
overlay: false,
|
|
afterDiv: a.data("currentSlide")
|
|
})
|
|
}
|
|
function s(b, c) {
|
|
b.each(function () {
|
|
$this = a(this);
|
|
n($this, c)
|
|
});
|
|
b.find("li").each(function (b) {
|
|
$this = a(this);
|
|
o($this, b, c)
|
|
});
|
|
b.find("ul").css({
|
|
display: "block"
|
|
});
|
|
b.find("#toolbox").animate({
|
|
opacity: "1.0"
|
|
}, 1e3);
|
|
if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) {
|
|
b.find("ul li").css({
|
|
display: "block",
|
|
opacity: "0.0"
|
|
});
|
|
b.find("ul li").animate({
|
|
opacity: "1.0"
|
|
}, 300)
|
|
} else {
|
|
b.find("ul li").css({
|
|
display: "block"
|
|
})
|
|
}
|
|
b.find("#mainloader").animate({
|
|
opacity: "0.3"
|
|
}, {
|
|
duration: 500,
|
|
complete: function () {
|
|
var b = a(this);
|
|
b.remove()
|
|
}
|
|
});
|
|
u(b.data("currentSlide"), 500, b)
|
|
}
|
|
function r(c, d) {
|
|
var e = a('<div id="toolbox" style="opacity:0"></div>');
|
|
if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) {
|
|
e.css({
|
|
"z-index": "4200"
|
|
});
|
|
e.addClass("noFilterClass")
|
|
} else {
|
|
e.css({
|
|
"z-index": "4200"
|
|
})
|
|
}
|
|
c.append(e);
|
|
var f = a("<div id='previous'></div>");
|
|
var g = a("<div id='next'></div>");
|
|
var h = function (b) {
|
|
b.hover(function () {
|
|
var b = a(this);
|
|
if (b.attr("id") == "previous") b.css({
|
|
"background-position": "bottom right"
|
|
});
|
|
else b.css({
|
|
"background-position": "bottom left"
|
|
})
|
|
}, function () {
|
|
$this = a(this);
|
|
if ($this.attr("id") == "previous") $this.css({
|
|
"background-position": "top right"
|
|
});
|
|
else $this.css({
|
|
"background-position": "top left"
|
|
})
|
|
})
|
|
};
|
|
var i = function (b) {
|
|
b.click(function () {
|
|
var b = a(this);
|
|
var e = c.data("currentSlide").index();
|
|
if (b.attr("id") == "previous") e++;
|
|
else e--;
|
|
if (e == c.data("currentSlide").parent().find("li").size()) e = 0;
|
|
if (e == -1) e = c.data("currentSlide").parent().find("li").size() - 1;
|
|
var f = c.find("li").each(function (f) {
|
|
b = a(this);
|
|
if (f == e) {
|
|
m(c.data("currentSlide"), b, c, d)
|
|
}
|
|
})
|
|
})
|
|
};
|
|
h(f);
|
|
i(f);
|
|
h(g);
|
|
i(g);
|
|
e.append(f);
|
|
e.append(g);
|
|
var j = a("<div id='mini_divider'></div>");
|
|
e.append(j);
|
|
c.find("li").each(function (f) {
|
|
var g = a(this);
|
|
var h = g.parent().find("li").size() - 1;
|
|
var i = a("<div id='" + (h - f) + "' class='mini_thumbnail_buttons'></div>");
|
|
e.append(i);
|
|
if (c.data("currentSlide").index() == h - f) {
|
|
i.data("on", true);
|
|
i.css({
|
|
"background-position": "bottom left"
|
|
})
|
|
}
|
|
var j = a('<div id="cd" class="countdown" style="display:none;background-position:0px 0px"></div>');
|
|
j.data("idNum", h - f);
|
|
i.append(j);
|
|
if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) j.addClass("noFilterClass");
|
|
if (h - f == 0) {
|
|
j.css({
|
|
display: "block"
|
|
})
|
|
}
|
|
i.hover(function () {
|
|
var d = a(this);
|
|
d.css({
|
|
"background-position": "top right"
|
|
});
|
|
if (d.data().on == true) d.css({
|
|
"background-position": "bottom right"
|
|
});
|
|
var e = a('<div id="image_thumbnail" style="opacity:0.0;left:' + d.position().left + "px;top:" + (d.position().top + 10) + 'px"></div>');
|
|
d.parent().append(e);
|
|
if (d.hasClass("wedding_mini_thumbnail_buttons")) {
|
|
e.addClass("wedding_image_thumbnail")
|
|
} else {
|
|
if (d.hasClass("fashion_mini_thumbnail_buttons")) {
|
|
e.addClass("fashion_image_thumbnail")
|
|
} else {
|
|
if (d.hasClass("custom_mini_thumbnail_buttons")) {
|
|
e.addClass("custom_image_thumbnail")
|
|
}
|
|
}
|
|
}
|
|
var f = a(this).attr("id");
|
|
var g = "";
|
|
var h = 0;
|
|
var i = 0;
|
|
c.find("li").each(function () {
|
|
var c = a(this);
|
|
if (c.index() == f) {
|
|
var d = c.find("#before");
|
|
g = d.attr("src");
|
|
if (c.data("orgWidth") == b) c.data("orgWidth", d.width());
|
|
if (c.data("orgHeight") == b) c.data("orgHeight", d.height());
|
|
h = c.data("orgWidth");
|
|
i = c.data("orgHeight")
|
|
}
|
|
});
|
|
if (e.width() == 0) {
|
|
h = h / 5;
|
|
i = i / 5;
|
|
e.css({
|
|
width: h + "px",
|
|
height: i + "px"
|
|
})
|
|
} else {
|
|
h = e.width();
|
|
i = e.height()
|
|
}
|
|
var j = h - 6;
|
|
var k = i - 6;
|
|
var l = parseInt(e.css("margin-top"), 0);
|
|
if (l == 0) l = 0 - k - 6;
|
|
e.css({
|
|
left: d.position().left + 5 + -j / 2 + "px",
|
|
width: j + 6 + "px",
|
|
height: k + 6 + "px",
|
|
"margin-top": (l-10) + "px"
|
|
});
|
|
e.append('<div><div><img id="thimg" style="position:absolute;top:3px;left:3px;width:' + j + "px;height:" + k + 'px" src="' + g + '"></div></div>');
|
|
e.append('<div id="loader" style="loader"></div>');
|
|
e.append('<div id="image_thumbnail_arrow" style="position:absolute;left:' + (h / 2.3) + "px;top:" + (i) + 'px"></div>');
|
|
if (d.hasClass("wedding_mini_thumbnail_buttons")) {
|
|
e.find("#image_thumbnail_arrow").addClass("wedding_image_thumbnail_arrow")
|
|
} else {
|
|
if (d.hasClass("fashion_mini_thumbnail_buttons")) {
|
|
e.find("#image_thumbnail_arrow").addClass("fashion_image_thumbnail_arrow")
|
|
} else {
|
|
if (d.hasClass("custom_mini_thumbnail_buttons")) {
|
|
e.find("#image_thumbnail_arrow").addClass("custom_image_thumbnail_arrow")
|
|
}
|
|
}
|
|
}
|
|
e.animate({
|
|
opacity: 1,
|
|
top: +1
|
|
}, {
|
|
duration: 200
|
|
})
|
|
}, function () {
|
|
var b = a(this);
|
|
b.css({
|
|
"background-position": "top left"
|
|
});
|
|
if (b.data().on == true) b.css({
|
|
"background-position": "bottom left"
|
|
});
|
|
b.parent().find("#image_thumbnail").remove()
|
|
});
|
|
i.click(function () {
|
|
var b = a(this);
|
|
if (b.data().on != true) {
|
|
var e = a(this).attr("id");
|
|
var f = c.find("li").each(function (b) {
|
|
var f = a(this);
|
|
if (b == e) {
|
|
m(c.data("currentSlide"), f, c, d)
|
|
}
|
|
})
|
|
}
|
|
})
|
|
});
|
|
c.find("#toolbox").css({
|
|
width: c.find("#toolbox").width() + "px"
|
|
})
|
|
}
|
|
function q(b, c) {
|
|
var d = b.data().dragH;
|
|
b.each(function () {
|
|
$this = a(this);
|
|
n($this, c)
|
|
});
|
|
b.find("li").each(function (b) {
|
|
$this = a(this);
|
|
o($this, b, c)
|
|
});
|
|
b.css({
|
|
opacity: "0.0",
|
|
display: "block"
|
|
});
|
|
b.animate({
|
|
opacity: "1.0"
|
|
}, 1500);
|
|
r(b, c, b.data("currentSlide"))
|
|
}
|
|
function p(a, b) {
|
|
a.find("ul").wrap("<div id='mask'></div>");
|
|
a.find("#mask").css({
|
|
overflow: "hidden",
|
|
width: b.width + "px",
|
|
height: b.height + "px",
|
|
position: "absolute"
|
|
})
|
|
}
|
|
function o(b, c, d) {
|
|
a(b).css({
|
|
width: d.width + "px",
|
|
height: d.height + "px",
|
|
"z-index": "200",
|
|
position: "relative",
|
|
overflow: "hidden",
|
|
left: 0,
|
|
top: 0
|
|
});
|
|
if (c > 0) a(b).css({
|
|
opacity: 0
|
|
})
|
|
}
|
|
function n(a, b) {
|
|
a.find(".creative_layer").css({
|
|
width: b.width + "px",
|
|
height: b.height + "px",
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px"
|
|
});
|
|
a.css({
|
|
width: b.width + "px",
|
|
height: b.height + "px",
|
|
position: "relative"
|
|
})
|
|
}
|
|
function m(c, d, e, f) {
|
|
var g = false;
|
|
e.find("#creative_layer_holder div").each(function (b) {
|
|
var c = a(this);
|
|
var d = c.data("parent");
|
|
c.appendTo(d)
|
|
});
|
|
e.find("li").each(function (b) {
|
|
var e = a(this);
|
|
if (e.index() != c.index() && e.index() != d.index()) {
|
|
e.css({
|
|
"z-index": "950",
|
|
opacity: "0.0"
|
|
});
|
|
if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) e.addClass("noFilterClass")
|
|
}
|
|
});
|
|
c.css({
|
|
"z-index": "995"
|
|
});
|
|
d.css({
|
|
"z-index": "1000"
|
|
});
|
|
if (c.data("orgWidth") == b) {
|
|
c.data("orgWidth", c.find("#before").width());
|
|
c.find("#before").data("orgWidth", c.data("orgWidth"))
|
|
}
|
|
if (c.data("orgHeight") == b) {
|
|
c.data("orgHeight", c.find("#before").height());
|
|
c.find("#before").data("orgHeight", c.data("orgHeight"))
|
|
}
|
|
if (d.data("orgWidth") == b) {
|
|
d.data("orgWidth", d.find("#before").width());
|
|
d.find("#before").data("orgWidth", d.data("orgWidth"))
|
|
}
|
|
if (d.data("orgHeight") == b) {
|
|
d.data("orgHeight", d.find("#before").height());
|
|
d.find("#before").data("orgHeight", d.data("orgHeight"))
|
|
}
|
|
var m = f.pt + f.height / 2 - d.data("orgHeight") / 2;
|
|
var n = f.pl + f.width / 2 - d.data("orgWidth") / 2;
|
|
var o = d.data("orgWidth");
|
|
var p = d.data("orgHeight");
|
|
if (o > f.width) o = f.width;
|
|
if (p > f.height) p = f.height;
|
|
if (m < f.pt) m = f.pt;
|
|
if (n < f.pl) n = f.pl;
|
|
e.find("#mask:first").css({
|
|
top: m + "px",
|
|
left: n + "px",
|
|
width: o + "px",
|
|
height: p + "px"
|
|
});
|
|
c.find("#before").css({
|
|
width: c.data("orgWidth") + "px",
|
|
height: c.data("orgHeight") + "px"
|
|
});
|
|
d.find("#before").css({
|
|
width: d.data("orgWidth") + "px",
|
|
height: d.data("orgHeight") + "px"
|
|
});
|
|
c.css({
|
|
width: f.width + "px",
|
|
height: f.height + "px"
|
|
});
|
|
d.css({
|
|
width: f.width + "px",
|
|
height: f.height + "px"
|
|
});
|
|
c.find("#before").stop(true, true);
|
|
d.find("#before").stop(true, true);
|
|
d.stop(true, true);
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
c.remove()
|
|
});
|
|
d.find(".freshbox").each(function (b) {
|
|
var c = a(this);
|
|
c.remove()
|
|
});
|
|
if (!(a.browser.msie && a.browser.version >= 7 && a.browser.version < 9)) {
|
|
if (d.data("transition") == "gradientfade" || d.data("transition") == "1") {
|
|
g = true;
|
|
k(d, d.width() / 5);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
c.css({
|
|
height: d.height() + "px",
|
|
top: "0px"
|
|
});
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(b).animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: b * 30 + 40,
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(b).animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: b * 20 + 40,
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "gradientfade2" || d.data("transition") == "2") {
|
|
g = true;
|
|
j(d, d.height() / 5);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
c.css({
|
|
width: d.width() + "px",
|
|
left: "0px"
|
|
});
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(b).animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: b * 40 + 100,
|
|
queue: true,
|
|
ease: "linear",
|
|
complete: l
|
|
});
|
|
else c.delay(b).animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: b * 30 + 100,
|
|
queue: true,
|
|
ease: "linear"
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "box-randomfade" || d.data("transition") == "3") {
|
|
g = true;
|
|
h(d, f.width / 80, f.height / 80);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
var q = [];
|
|
d.find(".freshbox").each(function (a) {
|
|
q[a] = a
|
|
});
|
|
for (var r = 0; r < q.length; r++) {
|
|
var s = Math.round(Math.random() * q.length);
|
|
var t = q[s];
|
|
q[s] = q[r];
|
|
q[r] = t
|
|
}
|
|
d.find(".freshbox").each(function (b) {
|
|
var c = a(this);
|
|
if (b == d.find(".freshbox").size() - 1) c.delay(b * 15 + 150).animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: Math.random() * 1e3 + 300,
|
|
ease: "linear",
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(q[b] * 12 + 120).animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: Math.random() * 1e3 + 300,
|
|
ease: "linear",
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "box-randomzoom" || d.data("transition") == "4") {
|
|
g = true;
|
|
h(d, f.width / 80, f.height / 80);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
var q = [];
|
|
d.find(".freshbox").each(function (a) {
|
|
q[a] = a
|
|
});
|
|
for (var r = 0; r < q.length; r++) {
|
|
var s = Math.round(Math.random() * q.length);
|
|
var t = q[s];
|
|
q[s] = q[r];
|
|
q[r] = t
|
|
}
|
|
d.find(".freshbox").each(function (b) {
|
|
var c = a(this);
|
|
var e = c.width();
|
|
var f = c.height();
|
|
var e = c.width();
|
|
var f = c.height();
|
|
c.css({
|
|
width: "0px",
|
|
height: "0px",
|
|
opacity: "1.0",
|
|
"-webkit-border-radius": "5px",
|
|
"-moz-border-radius": "5px",
|
|
"border-radius": "5px"
|
|
});
|
|
if (b == d.find(".freshbox").size() - 1) c.delay(b * 30 + 170).animate({
|
|
width: e + 10 + "px",
|
|
height: f + 10 + "px"
|
|
}, {
|
|
duration: 250,
|
|
ease: "linear",
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(q[b] * 28 + 120).animate({
|
|
width: 10 + e + "px",
|
|
height: f + 10 + "px"
|
|
}, {
|
|
duration: 250,
|
|
ease: "linear",
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "box-diagonalzoom" || d.data("transition") == "5") {
|
|
g = true;
|
|
h(d, f.width / 80, f.height / 80);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0.0"
|
|
});
|
|
var v = false;
|
|
var w = 1;
|
|
var x = 0;
|
|
var y = 1;
|
|
var z = Math.round(f.width / 80);
|
|
var A = Math.round(f.height / 80);
|
|
var B = d.find(".freshbox").size();
|
|
for (var C = 0; C < B; C++) {
|
|
var D = d.find(".freshbox:eq(" + (w - 1) + ")");
|
|
if (w - (z - 1) > x * z) {
|
|
w = w - (z - 1)
|
|
} else {
|
|
w = y;
|
|
w = w + z;
|
|
y = w
|
|
}
|
|
if (w - z * (x + 1) == 0) x++;
|
|
if (w > B) {
|
|
v = true;
|
|
w = y - z + 1;
|
|
y = w
|
|
}
|
|
var E = D.width();
|
|
var F = D.height();
|
|
D.css({
|
|
width: "0px",
|
|
height: "0px",
|
|
opacity: "1.0",
|
|
"-webkit-border-radius": "5px",
|
|
"-moz-border-radius": "5px",
|
|
"border-radius": "5px"
|
|
});
|
|
if (C == d.find(".freshbox").size() - 1) D.delay(C * 30).animate({
|
|
width: E + 10 + "px",
|
|
height: F + 10 + "px"
|
|
}, {
|
|
duration: 660,
|
|
ease: "linear",
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else D.delay(C * 30).animate({
|
|
width: 10 + E + "px",
|
|
height: F + 10 + "px"
|
|
}, {
|
|
duration: 660,
|
|
ease: "linear",
|
|
queue: true
|
|
})
|
|
}
|
|
}
|
|
if (d.data("transition") == "box-diagonalfade" || d.data("transition") == "6") {
|
|
g = true;
|
|
h(d, f.width / 80, f.height / 80);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0.0"
|
|
});
|
|
var v = false;
|
|
var w = 1;
|
|
var x = 0;
|
|
var y = 1;
|
|
var z = Math.round(f.width / 80);
|
|
var A = Math.round(f.height / 80);
|
|
var B = d.find(".freshbox").size();
|
|
for (var C = 0; C < B; C++) {
|
|
var D = d.find(".freshbox:eq(" + (w - 1) + ")");
|
|
if (w - (z - 1) > x * z) {
|
|
w = w - (z - 1)
|
|
} else {
|
|
w = y;
|
|
w = w + z;
|
|
y = w
|
|
}
|
|
if (w - z * (x + 1) == 0) x++;
|
|
if (w > B) {
|
|
v = true;
|
|
w = y - z + 1;
|
|
y = w
|
|
}
|
|
var E = D.width();
|
|
var F = D.height();
|
|
D.css({
|
|
opacity: "0.0"
|
|
});
|
|
if (C == d.find(".freshbox").size() - 1) D.delay(C * 30).animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: 660,
|
|
ease: "linear",
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else D.delay(C * 30).animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: 660,
|
|
ease: "linear",
|
|
queue: true
|
|
})
|
|
}
|
|
}
|
|
if (d.data("transition") == "box-leftfade" || d.data("transition") == "7") {
|
|
g = true;
|
|
h(d, f.width / 80, f.height / 80);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0.0"
|
|
});
|
|
var v = false;
|
|
var w = 1;
|
|
var x = 2;
|
|
var y = 1;
|
|
var z = Math.round(f.width / 80);
|
|
var A = Math.round(f.height / 80);
|
|
var B = d.find(".freshbox").size();
|
|
for (var C = 0; C < B; C++) {
|
|
var D = d.find(".freshbox:eq(" + (w - 1) + ")");
|
|
w = w + z;
|
|
if (w > B) {
|
|
w = x;
|
|
x++
|
|
}
|
|
D.css({
|
|
opacity: "0.0"
|
|
});
|
|
if (C == d.find(".freshbox").size() - 1) D.delay(C * 30).animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: 660,
|
|
ease: "linear",
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else D.delay(C * 30).animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: 660,
|
|
ease: "linear",
|
|
queue: true
|
|
})
|
|
}
|
|
}
|
|
if (d.data("transition") == "box-leftzoom" || d.data("transition") == "8") {
|
|
g = true;
|
|
h(d, f.width / 80, f.height / 80);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0.0"
|
|
});
|
|
var v = false;
|
|
var w = 1;
|
|
var x = 2;
|
|
var y = 1;
|
|
var z = Math.round(f.width / 80);
|
|
var A = Math.round(f.height / 80);
|
|
var B = d.find(".freshbox").size();
|
|
for (var C = 0; C < B; C++) {
|
|
var D = d.find(".freshbox:eq(" + (w - 1) + ")");
|
|
w = w + z;
|
|
if (w > B) {
|
|
w = x;
|
|
x++
|
|
}
|
|
var E = D.width();
|
|
var F = D.height();
|
|
D.css({
|
|
width: "0px",
|
|
height: "0px",
|
|
opacity: "1.0",
|
|
"-webkit-border-radius": "5px",
|
|
"-moz-border-radius": "5px",
|
|
"border-radius": "5px"
|
|
});
|
|
if (C == d.find(".freshbox").size() - 1) D.delay(C * 30).animate({
|
|
width: E + 10 + "px",
|
|
height: F + 10 + "px"
|
|
}, {
|
|
duration: 660,
|
|
ease: "linear",
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else D.delay(C * 30).animate({
|
|
width: E + 10 + "px",
|
|
height: F + 10 + "px"
|
|
}, {
|
|
duration: 660,
|
|
ease: "linear",
|
|
queue: true
|
|
})
|
|
}
|
|
}
|
|
if (d.data("transition") == "ghost" || d.data("transition") == "9") {
|
|
g = true;
|
|
i(d, 3);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
var e = 140;
|
|
if (b == 1) e = 80;
|
|
if (b == 2) e = 20;
|
|
c.css({
|
|
opacity: "0",
|
|
top: "0px",
|
|
left: e + "px"
|
|
});
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(b * 290).animate({
|
|
opacity: "1.0",
|
|
left: "0px"
|
|
}, {
|
|
duration: 800,
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(b * 290).animate({
|
|
opacity: "1.0",
|
|
left: "0px"
|
|
}, {
|
|
duration: 800,
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "camfocus" || d.data("transition") == "10") {
|
|
g = true;
|
|
i(d, 15);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
c.css({
|
|
opacity: "0.0"
|
|
});
|
|
c.animate({
|
|
opacity: Math.random() * .7,
|
|
top: Math.random() * 20 - 10 + "px",
|
|
left: Math.random() * 20 - 10 + "px"
|
|
}, {
|
|
duration: 600
|
|
});
|
|
if (b == d.find(".freshslice").size() - 1) c.animate({
|
|
opacity: "1.0",
|
|
left: "0px",
|
|
top: "0px"
|
|
}, {
|
|
duration: 600,
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.animate({
|
|
opacity: "1.0",
|
|
left: "0px",
|
|
top: "0px"
|
|
}, {
|
|
duration: 600,
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "rollo2" || d.data("transition") == "11") {
|
|
g = true;
|
|
j(d, 5);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
c.css({
|
|
width: d.width() + "px",
|
|
left: "0px",
|
|
top: parseInt(c.css("top"), 0) + 100 + "px"
|
|
});
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(b * 125).animate({
|
|
opacity: "1.0",
|
|
top: parseInt(c.css("top"), 0) - 100 + "px"
|
|
}, {
|
|
duration: 310,
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(b * 125).animate({
|
|
opacity: "1.0",
|
|
top: parseInt(c.css("top"), 0) - 100 + "px"
|
|
}, {
|
|
duration: 310,
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "curtain2" || d.data("transition") == "12") {
|
|
g = true;
|
|
k(d, 5);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
c.css({
|
|
height: d.height() + "px",
|
|
top: "0px",
|
|
left: parseInt(c.css("left"), 0) + 100 + "px"
|
|
});
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(b * 165).animate({
|
|
opacity: "1.0",
|
|
left: parseInt(c.css("left"), 0) - 100 + "px"
|
|
}, {
|
|
duration: 260,
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(b * 165).animate({
|
|
opacity: "1.0",
|
|
left: parseInt(c.css("left"), 0) - 100 + "px"
|
|
}, {
|
|
duration: 260,
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "rain" || d.data("transition") == "13") {
|
|
g = true;
|
|
k(d, f.width / 30);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
var e = f.width / 32;
|
|
c.css({
|
|
height: d.height() + "px",
|
|
top: 0 - f.height + "px"
|
|
});
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(b * (80 - b) + 50).animate({
|
|
opacity: "1.0",
|
|
top: "0px"
|
|
}, {
|
|
duration: 680,
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(Math.random() * b * (80 - b) + 50).animate({
|
|
opacity: "1.0",
|
|
top: "0px"
|
|
}, {
|
|
duration: 680,
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "fountain" || d.data("transition") == "14") {
|
|
g = true;
|
|
k(d, f.width / 30);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
var G = f.width / 30;
|
|
var H = 100 + 70 * G / 2;
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
c.css({
|
|
height: d.height() + "px",
|
|
top: 0 - f.height + "px"
|
|
});
|
|
if (b < G / 2) H = H - 70;
|
|
else H = H + 70;
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(H).animate({
|
|
opacity: "1.0",
|
|
top: "0px"
|
|
}, {
|
|
duration: 690,
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(H).animate({
|
|
opacity: "1.0",
|
|
top: "0px"
|
|
}, {
|
|
duration: 690,
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "wave" || d.data("transition") == "15") {
|
|
g = true;
|
|
k(d, f.width / 30);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
var e = f.width / 32;
|
|
c.css({
|
|
height: d.height() + "px",
|
|
top: 0 - f.height + "px"
|
|
});
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(b * (90 - b)).animate({
|
|
opacity: "1.0",
|
|
top: "0px"
|
|
}, {
|
|
duration: 670,
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(b * (90 - b)).animate({
|
|
opacity: "1.0",
|
|
top: "0px"
|
|
}, {
|
|
duration: 670,
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "zipper" || d.data("transition") == "16") {
|
|
g = true;
|
|
k(d, f.width / 30);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
var I = 0;
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
var e = f.width / 32;
|
|
if (I == 0) {
|
|
c.css({
|
|
height: d.height() + "px",
|
|
top: 0 - f.height + "px"
|
|
});
|
|
I = 1
|
|
} else {
|
|
c.css({
|
|
height: d.height() + "px",
|
|
top: f.height + "px"
|
|
});
|
|
I = 0
|
|
}
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(b * 70).animate({
|
|
opacity: "1.0",
|
|
top: "0px"
|
|
}, {
|
|
duration: 560,
|
|
easing: "easeOutSine",
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(b * 70).animate({
|
|
opacity: "1.0",
|
|
top: "0px"
|
|
}, {
|
|
duration: 560,
|
|
easing: "easeOutSine",
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "curtain" || d.data("transition") == "17") {
|
|
g = true;
|
|
k(d, f.width / 30);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
var e = f.width / 30;
|
|
c.css({
|
|
height: d.height() + "px",
|
|
top: "0px",
|
|
left: parseInt(c.css("left"), 0) + e + "px"
|
|
});
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(b * (80 - b)).animate({
|
|
opacity: "1.0",
|
|
left: parseInt(c.css("left"), 0) - e + "px"
|
|
}, {
|
|
duration: 610,
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(b * (80 - b)).animate({
|
|
opacity: "1.0",
|
|
left: parseInt(c.css("left"), 0) - e + "px"
|
|
}, {
|
|
duration: 610,
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "rollo" || d.data("transition") == "18") {
|
|
g = true;
|
|
j(d, f.height / 30);
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
var e = f.height / 30;
|
|
c.css({
|
|
width: d.width() + "px",
|
|
left: "0px",
|
|
top: parseInt(c.css("top"), 0) + e + "px"
|
|
});
|
|
if (b == d.find(".freshslice").size() - 1) c.delay(b * (80 - b)).animate({
|
|
opacity: "1.0",
|
|
top: parseInt(c.css("top"), 0) - e + "px"
|
|
}, {
|
|
duration: 610,
|
|
queue: true,
|
|
complete: l
|
|
});
|
|
else c.delay(b * (80 - b)).animate({
|
|
opacity: "1.0",
|
|
top: parseInt(c.css("top"), 0) - e + "px"
|
|
}, {
|
|
duration: 610,
|
|
queue: true
|
|
})
|
|
})
|
|
}
|
|
if (d.data("transition") == "zoomme" || d.data("transition") == "19") {
|
|
g = true;
|
|
c.css({
|
|
"z-index": "1000"
|
|
});
|
|
d.css({
|
|
"z-index": "995"
|
|
});
|
|
c.stop(true, true);
|
|
d.stop(true, true);
|
|
c.find("#before").css({
|
|
width: c.data("orgWidth") + "px",
|
|
height: c.data("orgHeight") + "px"
|
|
});
|
|
d.find("#before").css({
|
|
width: d.data("orgWidth") + "px",
|
|
height: d.data("orgHeight") + "px"
|
|
});
|
|
c.animate({
|
|
width: 2 * f.width + "px",
|
|
height: 2 * f.height + "px",
|
|
left: 0 - f.width / 2 + "px",
|
|
top: 0 - f.height / 2 + "px",
|
|
opacity: "0.0"
|
|
}, {
|
|
duration: 800,
|
|
queue: false
|
|
});
|
|
c.find("#before").animate({
|
|
width: 2 * f.width + "px",
|
|
height: 2 * f.height + "px"
|
|
}, {
|
|
duration: 800,
|
|
queue: false
|
|
});
|
|
d.css({
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: "0px",
|
|
opacity: "1.0"
|
|
});
|
|
d.find("#before").css({
|
|
opacity: "0"
|
|
});
|
|
d.find("#before").animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: 600
|
|
})
|
|
}
|
|
}
|
|
if (d.data("transition") == "slide-updown" || d.data("transition") == "20") {
|
|
g = true;
|
|
var J = true;
|
|
e.find("li").each(function () {
|
|
D = a(this);
|
|
if (D.index() != c.index() && D.index() != d.index()) D.css({
|
|
opacity: 0
|
|
})
|
|
});
|
|
if (c.index() > d.index()) J = false;
|
|
if (c.index() == 0 && d.index() != 1) J = false;
|
|
if (c.index() == c.parent().find("li").size() - 1 && d.index() == 0) J = true;
|
|
if (J) {
|
|
c.animate({
|
|
top: 0 - f.height
|
|
}, {
|
|
duration: 650,
|
|
queue: false
|
|
});
|
|
d.css({
|
|
opacity: "1.0",
|
|
position: "absolute",
|
|
top: f.height,
|
|
left: "0px",
|
|
width: f.width,
|
|
height: f.height
|
|
});
|
|
d.animate({
|
|
left: "0px",
|
|
top: "0px",
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: 650,
|
|
queue: false
|
|
})
|
|
} else {
|
|
c.animate({
|
|
top: f.height
|
|
}, {
|
|
duration: 650,
|
|
queue: false
|
|
});
|
|
d.css({
|
|
opacity: "1.0",
|
|
position: "absolute",
|
|
top: 0 - f.height + "px",
|
|
left: "0px",
|
|
width: f.width,
|
|
height: f.height
|
|
});
|
|
d.animate({
|
|
left: "0px",
|
|
top: "0px",
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: 650,
|
|
queue: false
|
|
})
|
|
}
|
|
}
|
|
if (g == false) {
|
|
var J = true;
|
|
e.find("li").each(function () {
|
|
D = a(this);
|
|
if (D.index() != c.index() && D.index() != d.index()) D.css({
|
|
opacity: 0
|
|
})
|
|
});
|
|
if (c.index() > d.index()) J = false;
|
|
if (c.index() == 0 && d.index() != 1) J = false;
|
|
if (c.index() == c.parent().find("li").size() - 1 && d.index() == 0) J = true;
|
|
if (J) {
|
|
c.animate({
|
|
left: 0 - f.width
|
|
}, {
|
|
duration: 650,
|
|
queue: false
|
|
});
|
|
d.css({
|
|
opacity: "1.0",
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: f.width,
|
|
width: f.width,
|
|
height: f.height
|
|
});
|
|
d.animate({
|
|
left: "0px",
|
|
top: "0px",
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: 650,
|
|
queue: false
|
|
})
|
|
} else {
|
|
c.animate({
|
|
left: f.width
|
|
}, {
|
|
duration: 650,
|
|
queue: false
|
|
});
|
|
d.css({
|
|
opacity: "1.0",
|
|
position: "absolute",
|
|
top: "0px",
|
|
left: 0 - f.width,
|
|
width: f.width,
|
|
height: f.height
|
|
});
|
|
d.animate({
|
|
left: "0px",
|
|
top: "0px",
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: 650,
|
|
queue: false
|
|
})
|
|
}
|
|
}
|
|
c.parent().parent().parent().find(".mini_thumbnail_buttons").each(function (b) {
|
|
var c = a(this);
|
|
c.css({
|
|
"background-position": "top left"
|
|
});
|
|
c.data("on", false);
|
|
c.find("#cd").css({
|
|
display: "none"
|
|
});
|
|
if (b == d.parent().find("li").size() - d.index() - 1) {
|
|
c.data("on", true);
|
|
c.find("#cd").data("t", 0);
|
|
c.find("#cd").css({
|
|
display: "block"
|
|
});
|
|
c.css({
|
|
"background-position": "bottom left"
|
|
})
|
|
}
|
|
});
|
|
e.data("currentSlide", d);
|
|
u(d, 1500, e)
|
|
}
|
|
function l() {
|
|
var b = a(this).parent();
|
|
b.find("#before").css({
|
|
opacity: "1"
|
|
});
|
|
b.find(".freshslice").each(function (b) {
|
|
var c = a(this);
|
|
c.remove()
|
|
});
|
|
b.find(".freshsbox").each(function (b) {
|
|
var c = a(this);
|
|
c.remove()
|
|
})
|
|
}
|
|
function k(b, c) {
|
|
for (var d = 0; d < c; d++) {
|
|
var e = Math.round(b.width() / c);
|
|
var f = b.find("#before").attr("src");
|
|
if (d == c - 1) {
|
|
b.append(a('<div class="freshslice"></div>').css({
|
|
left: e * d + "px",
|
|
width: b.width() - e * d + "px",
|
|
position: "absolute",
|
|
height: "0px",
|
|
opacity: "0",
|
|
background: "url(" + f + ") no-repeat -" + (e + d * e - e) + "px 0%"
|
|
}))
|
|
} else {
|
|
b.append(a('<div class="freshslice"></div>').css({
|
|
left: e * d + "px",
|
|
width: e + "px",
|
|
position: "absolute",
|
|
height: "0px",
|
|
opacity: "0",
|
|
background: "url(" + f + ") no-repeat -" + (e + d * e - e) + "px 0%"
|
|
}))
|
|
}
|
|
}
|
|
}
|
|
function j(b, c) {
|
|
for (var d = 0; d < c; d++) {
|
|
var e = Math.round(b.height() / c);
|
|
var f = b.find("#before").attr("src");
|
|
if (d == c - 1) {
|
|
b.append(a('<div class="freshslice"></div>').css({
|
|
top: e * d + "px",
|
|
height: b.height() - e * d + "px",
|
|
position: "absolute",
|
|
width: b.width() + "px",
|
|
opacity: "0",
|
|
background: "url(" + f + ") no-repeat -0px " + (0 - d * e) + "px"
|
|
}))
|
|
} else {
|
|
b.append(a('<div class="freshslice"></div>').css({
|
|
top: e * d + "px",
|
|
height: e + "px",
|
|
position: "absolute",
|
|
width: b.width() + "px",
|
|
opacity: "0",
|
|
background: "url(" + f + ") no-repeat -0px " + (0 - d * e) + "px"
|
|
}))
|
|
}
|
|
}
|
|
}
|
|
function i(b, c) {
|
|
for (var d = 0; d < c; d++) {
|
|
var e = b.find("#before").attr("src");
|
|
b.append(a('<div class="freshslice"></div>').css({
|
|
left: "0px",
|
|
position: "absolute",
|
|
height: b.height() + "px",
|
|
width: b.width() + "px",
|
|
opacity: "0",
|
|
background: "url(" + e + ") no-repeat"
|
|
}))
|
|
}
|
|
}
|
|
function h(b, c, d) {
|
|
var e = Math.round(b.width() / c);
|
|
var f = Math.round(b.height() / d);
|
|
var g = b.find("#before").attr("src");
|
|
for (var h = 0; h < d; h++) {
|
|
for (var i = 0; i < c; i++) {
|
|
if (i == c - 1) {
|
|
b.append(a('<div class="freshbox"></div>').css({
|
|
position: "absolute",
|
|
opacity: 0,
|
|
left: e * i + "px",
|
|
top: f * h + "px",
|
|
width: b.width() - e * i + "px",
|
|
height: f + "px",
|
|
background: "url(" + g + ") no-repeat -" + (e + i * e - e) + "px -" + (f + h * f - f) + "px"
|
|
}))
|
|
} else {
|
|
b.append(a('<div class="freshbox"></div>').css({
|
|
position: "absolute",
|
|
opacity: 0,
|
|
left: e * i + "px",
|
|
top: f * h + "px",
|
|
width: e + "px",
|
|
height: f + "px",
|
|
background: "url(" + g + ") no-repeat -" + (e + i * e - e) + "px -" + (f + h * f - f) + "px"
|
|
}))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function g(b) {
|
|
b.find("li >img").each(function () {
|
|
var b = a(this);
|
|
b.attr({
|
|
id: "before"
|
|
});
|
|
b.parent().find("#before").wrapAll("<div id='ba_images'></div>");
|
|
b.parent().find("#before").wrap("<div id='ext_ext_before'><div id='ext_before'></div></div>");
|
|
var c = b.parent().parent().parent().find("#before").parent().parent();
|
|
var d = c.find("#before").parent();
|
|
var e = d.find("#before");
|
|
c.css({
|
|
position: "absolute",
|
|
"z-index": "1",
|
|
top: "0px",
|
|
left: "0px"
|
|
});
|
|
d.css({
|
|
position: "absolute",
|
|
"z-index": "1",
|
|
top: "0px",
|
|
left: "0px"
|
|
})
|
|
})
|
|
}
|
|
function f(b, c) {
|
|
var d = b.data("ba_images");
|
|
var e = b.data("ba_imagesLoaded");
|
|
var g = new Image;
|
|
a(g).css("display", "none");
|
|
a(g).attr("src", d[e]);
|
|
if (g.complete || g.readyState === 4) {
|
|
e++;
|
|
if (e == d.length) {
|
|
b.data("loaded", "true");
|
|
s(b, c)
|
|
} else {
|
|
b.data("ba_imagesLoaded", e);
|
|
f(b, c)
|
|
}
|
|
} else {
|
|
a(g).load(function () {
|
|
e++;
|
|
if (e == d.length) {
|
|
b.data("loaded", "true");
|
|
s(b, c)
|
|
} else {
|
|
b.data("ba_imagesLoaded", e);
|
|
f(b, c)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
function e(b) {
|
|
var c = new Array;
|
|
var d = 0;
|
|
b.find("ul li img").each(function (b) {
|
|
var e = a(this);
|
|
c[d] = e.attr("src");
|
|
d++
|
|
});
|
|
b.data("ba_images", c)
|
|
}
|
|
function d(b, d) {
|
|
if (d.theme == "none") {}
|
|
if (d.theme == "custom") {
|
|
b.addClass("custom_frame_basic");
|
|
b.addClass("custom_frame_bg");
|
|
c(d, b);
|
|
b.append('<div id="screw_lt" class="custom_topleftscrew" style="top:' + d.t + "px;left:" + d.l + 'px"></div>');
|
|
b.append('<div id="screw_rt" class="custom_toprightscrew" style="top:' + d.t + "px;left:" + d.r + 'px"></div>');
|
|
b.append('<div id="screw_lb" class="custom_bottomleftscrew" style="top:' + d.b + "px;left:" + d.l + 'px"></div>');
|
|
b.append('<div id="screw_rb" class="custom_bottomrightscrew" style="top:' + d.b + "px;left:" + d.r + 'px"></div>');
|
|
b.find("#toolbox").addClass("custom_toolbox");
|
|
b.find("#cd").addClass("custom_countdown");
|
|
b.find("#mini_divider").addClass("custom_mini_divider");
|
|
b.find("#previous").addClass("custom_previous");
|
|
b.find("#next").addClass("custom_next");
|
|
b.find("#mask").addClass("custom_mask");
|
|
b.find(".mini_thumbnail_buttons").each(function (b) {
|
|
var c = a(this);
|
|
c.addClass("custom_mini_thumbnail_buttons")
|
|
});
|
|
b.append('<div id="frame_innershadow" class="frame_custom_innershadow" style="top:' + 2 * d.t + "px;z-index:1002;position:absolute;width:" + d.width + "px;height:" + d.height + 'px"></div>');
|
|
b.append('<div id="reflection" class="frame_custom_reflection" style="top:' + 2 * d.t + "px;z-index:1005;position:absolute;width:" + d.width + "px;height:" + d.height + 'px"></div>');
|
|
if (b.find("#creative_layer_holder").size() == 0) b.append('<div id="creative_layer_holder" class="creative_layer" style="z-index:1007;position:absolute;width:' + d.width + "px;height:" + d.height + 'px"></div>')
|
|
} else {
|
|
if (d.theme == "sport") {
|
|
b.addClass("sport_frame_basic");
|
|
b.addClass("sport_frame_bg");
|
|
c(d, b);
|
|
d.r = -8 + d.r;
|
|
d.b = -8 + d.b;
|
|
d.m = 2 * d.l + d.width / 2;
|
|
d.w = 290;
|
|
d.off = d.m - 145;
|
|
if (d.off < 2 * d.l) {
|
|
d.off = 2 * d.l;
|
|
d.w = d.r - d.pr / 2 - d.off
|
|
}
|
|
d.e = d.r + d.pr / 2;
|
|
b.append('<div id="top_decor" class="sport_decor" style="top:0px;left:' + d.off + "px;width:" + d.w + 'px"></div>');
|
|
b.append('<div id="right_decor" class="sport_right_decor_button" style="top:' + 2 * d.t + "px;left:" + (5 + d.e) + 'px"></div>');
|
|
b.append('<div id="screw_lt" class="sport_topscrew" style="top:' + d.t + "px;left:" + d.l + 'px"></div>');
|
|
b.append('<div id="screw_rt" class="sport_topscrew" style="top:' + d.t + "px;left:" + d.r + 'px"></div>');
|
|
b.append('<div id="screw_lb" class="sport_bottomscrew" style="top:' + d.b + "px;left:" + d.l + 'px"></div>');
|
|
b.append('<div id="screw_rb" class="sport_bottomscrew" style="top:' + d.b + "px;left:" + d.r + 'px"></div>');
|
|
var e = b.find("#toolbox");
|
|
e.addClass("sport_toolbox");
|
|
b.find("#cd").addClass("sport_countdown");
|
|
b.find("#mini_divider").addClass("sport_mini_divider");
|
|
b.find("#previous").addClass("sport_previous");
|
|
b.find("#next").addClass("sport_next");
|
|
b.find("#mask").addClass("sport_mask");
|
|
b.find(".mini_thumbnail_buttons").each(function (b) {
|
|
var c = a(this);
|
|
c.addClass("sport_mini_thumbnail_buttons")
|
|
});
|
|
e.css({
|
|
top: d.height - 10 + "px"
|
|
});
|
|
b.append('<div id="frame_innershadow" class="frame_sport_innershadow" style="top:' + 2 * d.t + "px;z-index:1002;position:absolute;width:" + d.width + "px;height:" + d.height + 'px"></div>');
|
|
b.append('<div id="reflection" class="frame_sport_reflection" style="top:' + 2 * d.t + "px;z-index:1005;position:absolute;width:" + d.width + "px;height:" + d.height + 'px"></div>');
|
|
if (b.find("#creative_layer_holder").size() == 0) b.append('<div id="creative_layer_holder" class="creative_layer" style="z-index:1007;position:absolute;width:' + d.width + "px;height:" + d.height + 'px"></div>')
|
|
} else {
|
|
if (d.theme == "wedding") {
|
|
b.addClass("wedding_frame_basic");
|
|
b.addClass("wedding_frame_bg");
|
|
c(d, b);
|
|
d.r = -8 + d.r;
|
|
d.b = d.pt + d.height + d.pb - 57;
|
|
d.m = 2 * d.l + d.width / 2;
|
|
d.w = d.width;
|
|
d.e = d.r + d.pr / 2;
|
|
d.off = d.tl;
|
|
b.append('<div id="top_decor" class="wedding_decor_top" style="top:' + (d.pt / 2 - 24) + "px;left:" + d.off + "px;width:" + d.w + 'px"></div>');
|
|
b.append('<div id="bottom_decor" class="wedding_decor_top" style="top:' + d.b + "px;left:" + d.off + "px;width:" + d.w + 'px"></div>');
|
|
b.append('<div id="frame_innershadow" class="frame_wedding_innershadow" style="top:' + 2 * d.t + "px;z-index:1002;position:absolute;width:" + d.width + "px;height:" + d.height + 'px"></div>');
|
|
b.append('<div id="reflection" class="frame_wedding_reflection" style="top:' + 2 * d.t + "px;z-index:1005;position:absolute;width:" + d.width + "px;height:" + d.height + 'px"></div>');
|
|
if (b.find("#creative_layer_holder").size() == 0) b.append('<div id="creative_layer_holder" class="creative_layer" style="z-index:1007;position:absolute;width:' + d.width + "px;height:" + d.height + 'px"></div>');
|
|
b.append('<div id="fineborder" class="wedding_fine_border" style="top:' + (2 * d.t - 5) + "px;left:" + (2 * d.l - 5) + "px;z-index:1005;width:" + (d.width + 8) + "px;height:" + (d.height + 8) + 'px;"></div>');
|
|
var e = b.find("#toolbox");
|
|
e.addClass("wedding_toolbox");
|
|
b.find("#cd").addClass("wedding_countdown");
|
|
b.find("#mini_divider").addClass("wedding_mini_divider");
|
|
b.find("#previous").addClass("wedding_previous");
|
|
b.find("#next").addClass("wedding_next");
|
|
b.find(".mini_thumbnail_buttons").each(function (b) {
|
|
var c = a(this);
|
|
c.addClass("wedding_mini_thumbnail_buttons")
|
|
});
|
|
e.css({
|
|
top: d.height + 10 + "px"
|
|
})
|
|
} else {
|
|
if (d.theme == "fashion") {
|
|
b.addClass("fashion_frame_basic");
|
|
b.addClass("fashion_frame_bg");
|
|
c(d, b);
|
|
d.r = d.r - 8;
|
|
d.b = d.pt + d.height + d.pb - 57;
|
|
d.m = 2 * d.l + d.width / 2;
|
|
d.w = d.width + 2 * d.l + d.pr + 26;
|
|
d.e = d.r + d.pr / 2;
|
|
var f = 35;
|
|
var g = 2 * d.t + d.height;
|
|
b.append('<div id="toolbox2" class="fashion_toolbox_background" style="top:' + g + "px;height:" + f + "px;left:" + (0 - 13) + "px;width:" + d.w + 'px"></div>');
|
|
b.append('<div id="toolbox_turnback_left" class="fashion_toolbox_background_turnback_left" style="top:' + (g - 6) + "px;left:" + (0 - 13) + 'px"></div>');
|
|
b.append('<div id="toolbox_turnback_right" class="fashion_toolbox_background_turnback_right" style="top:' + (g - 6) + "px;left:" + (d.w - 26) + 'px"></div>');
|
|
b.find("#toolbox").addClass("fashion_toolbox");
|
|
b.find("#cd").addClass("fashion_countdown");
|
|
b.find("#mini_divider").addClass("fashion_mini_divider");
|
|
b.find("#previous").addClass("fashion_previous");
|
|
b.find("#next").addClass("fashion_next");
|
|
b.find(".mini_thumbnail_buttons").each(function (b) {
|
|
var c = a(this);
|
|
c.addClass("fashion_mini_thumbnail_buttons")
|
|
});
|
|
b.find("#toolbox").css({
|
|
top: g - 15 + "px"
|
|
});
|
|
b.append('<div id="frame_innershadow" class="frame_fashion_innershadow" style="top:' + 2 * d.t + "px;z-index:1002;position:absolute;width:" + d.width + "px;height:" + d.height + 'px"></div>');
|
|
b.append('<div id="reflection" class="frame_fashion_reflection" style="top:' + 2 * d.t + "px;z-index:1005;position:absolute;width:" + d.width + "px;height:" + d.height + 'px"></div>');
|
|
if (b.find("#creative_layer_holder").size() == 0) b.append('<div id="creative_layer_holder" class="creative_layer" style="z-index:1007;position:absolute;width:' + d.width + "px;height:" + d.height + 'px"></div>')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
var h = b.find("#creative_layer_holder");
|
|
h.css({
|
|
position: "absolute",
|
|
"margin-top": d.pt + "px",
|
|
"margin-left": d.pl + "px"
|
|
})
|
|
}
|
|
function c(a, b) {
|
|
a.pt = parseInt(b.css("padding-top"), 0);
|
|
a.pl = parseInt(b.css("padding-left"), 0);
|
|
a.pr = parseInt(b.css("padding-right"), 0);
|
|
a.pb = parseInt(b.css("padding-bottom"), 0);
|
|
a.l = a.pl / 2;
|
|
a.t = a.pt / 2;
|
|
a.r = a.pl + a.width + a.pr / 2;
|
|
a.b = a.pt + a.height + a.pb / 2
|
|
}
|
|
a.fn.extend({
|
|
frames_slider: function (c) {
|
|
var h = {
|
|
width: 876,
|
|
height: 300,
|
|
theme: "none",
|
|
timer: 2e3,
|
|
hidetoolbar: 0
|
|
};
|
|
var c = a.extend({}, a.fn.frames_slider.defaults, c);
|
|
return this.each(function () {
|
|
var h = new Array;
|
|
var i = 0;
|
|
var j = a(this);
|
|
j.css({
|
|
display: "none"
|
|
});
|
|
var k = c;
|
|
k.ie = a.browser.msie && a.browser.version >= 7 && a.browser.version < 9;
|
|
if (k.timer == b) k.timer = 2e3;
|
|
if (k.hidetoolbar == b) k.hidetoolbar = 0;
|
|
j.data("off", parseInt(j.css("padding-top"), 0));
|
|
j.data("ba_imagesLoaded", 0);
|
|
var l = j.find("li").first();
|
|
j.data("currentSlide", l);
|
|
p(j, k);
|
|
g(j);
|
|
var n = a("<div id='mainloader' class='loader'></div>");
|
|
j.append(n);
|
|
j.find("ul").css({
|
|
display: "none"
|
|
});
|
|
j.find("ul li").css({
|
|
display: "none"
|
|
});
|
|
q(j, k);
|
|
d(j, k);
|
|
e(j);
|
|
f(j, k);
|
|
j.hover(function () {
|
|
var b = a(this);
|
|
b.data("mouseOver", "0");
|
|
b.data("hideT", 0);
|
|
b.find("#toolbox").stop(true, true);
|
|
if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) {
|
|
b.find("#toolbox").css({
|
|
display: "block"
|
|
})
|
|
} else {
|
|
b.find("#toolbox").animate({
|
|
opacity: "1.0"
|
|
}, {
|
|
duration: 100
|
|
})
|
|
}
|
|
if (k.ie) var c = a('<div id="fh_pause" class="pause_sign" style="left:' + (k.width + k.pl - 45) + "px;top:" + (k.pt + 10) + 'px"></div>');
|
|
else var c = a('<div id="fh_pause" class="pause_sign" style="opacity:0.0;left:' + (k.width + k.pl - 55) + "px;top:" + (k.pt + 10) + 'px"></div>');
|
|
b.append(c);
|
|
if (!k.ie) c.animate({
|
|
opacity: "1.0",
|
|
left: k.width + k.pl - 45 + "px"
|
|
}, {
|
|
duration: 300
|
|
})
|
|
}, function () {
|
|
var b = a(this);
|
|
b.data("mouseOver", "1");
|
|
b.data("hideT", 0);
|
|
b.find("#fh_pause").remove()
|
|
});
|
|
j.data("hideT", 0);
|
|
if (k.hidetoolbar != 0) {
|
|
setInterval(function () {
|
|
if (j.data("loaded") == "true") {
|
|
if (j.data("mouseOver") != "0") j.data("hideT", j.data("hideT") + 100);
|
|
if (j.data("hideT") >= k.hidetoolbar) {
|
|
if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) {
|
|
j.find("#toolbox").css({
|
|
display: "none"
|
|
})
|
|
} else {
|
|
j.find("#toolbox").animate({
|
|
opacity: "0.0"
|
|
}, {
|
|
duration: 400
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}, 100)
|
|
}
|
|
setInterval(function () {
|
|
if (j.data("loaded") == "true") {
|
|
j.find("#cd").each(function () {
|
|
var c = a(this);
|
|
if (c.data("idNum") == j.data("currentSlide").index()) {
|
|
if (k.timer != 0) {
|
|
if (c.data("t") == b) c.data("t", 0);
|
|
var d = c.data("t");
|
|
c.css({
|
|
"background-position": "0px " + (d - 10) + "px"
|
|
});
|
|
if (d <= -1e3) {
|
|
var e = j.data("currentSlide").index();
|
|
e++;
|
|
if (e == j.data("currentSlide").parent().find("li").size()) e = 0;
|
|
if (e == -1) e = j.data("currentSlide").parent().find("li").size() - 1;
|
|
d = 0;
|
|
var f = j.find("li").each(function (b) {
|
|
c = a(this);
|
|
if (b == e) {
|
|
m(j.data("currentSlide"), c, j, k)
|
|
}
|
|
})
|
|
}
|
|
if (j.data("mouseOver") != "0") c.data("t", d - 10)
|
|
} else {};
|
|
}
|
|
})
|
|
}
|
|
}, k.timer / 100)
|
|
})
|
|
}
|
|
});
|
|
})(jQuery) |