(function(a) { a.fn.photobucket = function(q) { var d = a.extend(a.fn.photobucket.defaults, q); var l = 27; var g = 138; var m = 224; var n = 126; var j = 174; var p = 76; var k = 500; var o = (m + j) - (g * 2); var i = a("#photobucket ul li").length; var e; var c = 1; var h = true; function b() { var r; if (c == i - 1) { r = 0 } else { r = c + 1 } f(r); c = r; a("#photobucket .latPhotos div").html(c + 1 + "/" + i) } function f(r) { h = false; if (a("#photobucket ul li:eq(" + r + ")").attr("class") == "pb_pos_1") { a(".pb_pos_3").animate({ left: o + 30 }, 200, "linear"); a(".pb_pos_2 img").animate({ width: m - 20, height: n - 20 }, 400, "linear"); a(".pb_pos_2 canvas").animate({ width: m - 20 }, 400, "linear"); a(".pb_pos_2").animate({ left: j - g + 30, top: "10px" }, 400, "linear", function() { if (i == 3) { a(".pb_pos_3").animate({ left: "0px" }, k, "linear") } else { a(".pb_pos_3").animate({ left: o + j }, k, "linear") } a(".pb_pos_2").animate({ left: o, top: l }, k, "linear"); a(".pb_pos_2 img").animate({ width: j, height: p }, k, "linear"); a(".pb_pos_1").animate({ left: j - g, top: "0px" }, k, "linear", function() { h = true }); a(".pb_pos_1 img").animate({ width: m, height: n }, k, "linear"); if (a(".pb_pos_0").length > 0) { a(".pb_pos_0").animate({ left: "0px", top: l }, k, "linear") } else { if (a(".pb_pos_1").prev().length > 0) { a(".pb_pos_1").prev().animate({ left: "0px", top: l }, k, "linear") } else { a("#photobucket ul li:last").animate({ left: "0px", top: l }, k, "linear") } } var s; if (i > 4) { s = a(".pb_pos_0"); a(".pb_pos_4").removeClass(); a(".pb_pos_3").removeClass().addClass("pb_pos_4"); a(".pb_pos_2").removeClass().addClass("pb_pos_3"); a(".pb_pos_1").removeClass().addClass("pb_pos_2"); s.removeClass().addClass("pb_pos_1"); if (s.prev().length > 0) { s.prev().removeClass().addClass("pb_pos_0") } else { a("#photobucket ul li:last").removeClass().addClass("pb_pos_0") } } else { if (i == 2) { s = a(".pb_pos_1"); a(".pb_pos_2").removeClass().addClass("pb_pos_1"); s.removeClass().addClass("pb_pos_2") } else { if (i == 3) { s = a(".pb_pos_1"); a(".pb_pos_3").removeClass().addClass("pb_pos_1"); a(".pb_pos_2").removeClass().addClass("pb_pos_3"); s.removeClass().addClass("pb_pos_2") } else { if (i == 4) { if (a(".pb_pos_0").length > 0) { s = a(".pb_pos_0") } else { s = a(".pb_pos_4") } a(".pb_pos_4").removeClass().addClass("pb_pos_0"); a(".pb_pos_3").removeClass().addClass("pb_pos_4"); a(".pb_pos_2").removeClass().addClass("pb_pos_3"); a(".pb_pos_1").removeClass().addClass("pb_pos_2"); s.removeClass().addClass("pb_pos_1") } } } } a(".pb_pos_0").css("left", -j); a("#photobucket ul li canvas:not(:eq(" + r + "))").animate({ width: j }, k, "linear"); a("#photobucket ul li canvas:eq(" + r + ")").animate({ width: "224px" }, k, "linear"); a("#photobucket .photoTitle").html(a(".pb_pos_2 .hiddenTitle").text()); a("#photobucket .photoCopyright").html(a(".pb_pos_2 .hiddenCopyright").text()) }) } else { if (a("#photobucket ul li:eq(" + r + ")").attr("class") == "pb_pos_3") { a(".pb_pos_1").animate({ left: "-10px" }, 400, "linear"); a(".pb_pos_2 img").animate({ width: m - 20, height: n - 20 }, 400, "linear"); a(".pb_pos_2 canvas").animate({ width: m - 20 }, 400, "linear"); a(".pb_pos_2").animate({ left: j - g - 10, top: "10px" }, 400, "linear", function() { if (i == 3) { a(".pb_pos_1").animate({ left: o }, k, "linear") } else { a(".pb_pos_1").animate({ left: -j }, k, "linear") } a(".pb_pos_2").animate({ left: "0px", top: l }, k, "linear"); a(".pb_pos_2 img").animate({ width: j, height: p }, k, "linear"); a(".pb_pos_3").animate({ left: j - g, top: "0px" }, k, "linear", function() { h = true }); a(".pb_pos_3 img").animate({ width: m, height: n }, k, "linear"); a(".pb_pos_4").animate({ left: o }, k, "linear"); var s; if (i > 4 || i == 2) { s = a(".pb_pos_4"); a(".pb_pos_0").removeClass(); a(".pb_pos_1").removeClass().addClass("pb_pos_0"); a(".pb_pos_2").removeClass().addClass("pb_pos_1"); a(".pb_pos_3").removeClass().addClass("pb_pos_2"); s.removeClass().addClass("pb_pos_3"); if (s.next().length > 0) { s.next().removeClass().addClass("pb_pos_4") } else { a("#photobucket ul li:first").removeClass().addClass("pb_pos_4") } } else { if (i == 3) { s = a(".pb_pos_3"); a(".pb_pos_1").removeClass().addClass("pb_pos_3"); a(".pb_pos_2").removeClass().addClass("pb_pos_1"); s.removeClass().addClass("pb_pos_2") } else { if (i == 4) { if (a(".pb_pos_4").length > 0) { s = a(".pb_pos_4") } else { s = a(".pb_pos_0") } a(".pb_pos_0").removeClass().addClass("pb_pos_4"); a(".pb_pos_1").removeClass().addClass("pb_pos_0"); a(".pb_pos_2").removeClass().addClass("pb_pos_1"); a(".pb_pos_3").removeClass().addClass("pb_pos_2"); s.removeClass().addClass("pb_pos_3"); if (s.next().length > 0) { s.next().removeClass().addClass("pb_pos_4") } else { a("#photobucket ul li:first").removeClass().addClass("pb_pos_4") } } } } a(".pb_pos_4").css("left", o + j); a("#photobucket ul li canvas:not(:eq(" + r + "))").animate({ width: j }, k, "linear"); a("#photobucket ul li canvas:eq(" + r + ")").animate({ width: "224px" }, k, "linear"); a("#photobucket .photoTitle").html(a(".pb_pos_2 .hiddenTitle").text()); a("#photobucket .photoCopyright").html(a(".pb_pos_2 .hiddenCopyright").text()) }) } } } return this.each(function() { j_gallery = a(this); j_gallery.css("visibility", "hidden"); if (i == 1) { a("#photobucket ul li:eq(0)").removeClass().addClass("pb_pos_2"); a(".pb_pos_2").animate({ left: j - g, top: "0px" }, k, "linear", function() { h = true }); a(".pb_pos_2 img").animate({ width: m, height: n }, k, "linear"); a("#photobucket .photoTitle").html(a(".pb_pos_2 .hiddenTitle").text()); a("#photobucket .photoCopyright").html(a(".pb_pos_2 .hiddenCopyright").text()); a("#photobucket .latPhotos div").html(c + "/" + i); a("#photobucket ul li").click(function() { return false }); a("#photobucket .prev").click(function() { return false }); a("#photobucket .next").click(function() { return false }) } else { a("#photobucket ul li:last").removeClass().addClass("pb_pos_0"); a("#photobucket ul li:eq(0)").removeClass().addClass("pb_pos_1"); a("#photobucket ul li:eq(1)").removeClass().addClass("pb_pos_2"); a("#photobucket ul li:eq(2)").removeClass().addClass("pb_pos_3"); a("#photobucket ul li:eq(3)").removeClass().addClass("pb_pos_4"); a("#photobucket ul li").css("left", -j); a("#photobucket ul li").css("top", l); a("#photobucket ul li img").attr("width", j).attr("height", p); a(".pb_pos_0").css("left", -j); a(".pb_pos_1").css("left", "0px"); a(".pb_pos_2").css("top", "0px").css("left", j - g); a(".pb_pos_2 img").attr("width", m).attr("height", n); a(".pb_pos_3").css("left", o); a(".pb_pos_4").css("left", o + j); a("#photobucket .latPhotos div").html(c + 1 + "/" + i); a("#photobucket .photoTitle").html(a(".pb_pos_2 .hiddenTitle").text()); a("#photobucket .photoCopyright").html(a(".pb_pos_2 .hiddenCopyright").text()); e = setInterval(function() { b() }, d.displayTime); a("#photobucket ul li").click(function() { if (h) { clearInterval(e); var r = a("#photobucket ul li").index(this); if (r != c) { f(r); c = r; a("#photobucket .latPhotos div").html(c + 1 + "/" + i) } e = setInterval(function() { b() }, d.displayTime) } return false }); a("#photobucket .prev").click(function() { if (h) { clearInterval(e); var r; if (c == 0) { r = i - 1 } else { r = c - 1 } f(r); c = r; a("#photobucket .latPhotos div").html(c + 1 + "/" + i); e = setInterval(function() { b() }, d.displayTime) } return false }); a("#photobucket .next").click(function() { if (h) { clearInterval(e); b(); e = setInterval(function() { b() }, d.displayTime) } return false }) } j_gallery.css("visibility", "visible") }) }; a.fn.photobucket.defaults = { displayTime: 8000} })(jQuery);
if (!document.myGetElementsByClassName) { document.myGetElementsByClassName = function(d) { var c = document.getElementsByTagName("*") || document.all; var e = new Array(); for (var b = 0; b < c.length; b++) { var g = c[b]; var f = g.className.split(" "); for (var a = 0; a < f.length; a++) { if (f[a] == d) { e.push(g); break } } } return e } } var Reflection = { defaultHeight: 0.5, defaultOpacity: 0.5, add: function(f, t) { Reflection.remove(f); doptions = { height: Reflection.defaultHeight, opacity: Reflection.defaultOpacity }; if (t) { for (var m in doptions) { if (!t[m]) { t[m] = doptions[m] } } } else { t = doptions } try { var q = document.createElement("div"); var b = f; var g = b.className.split(" "); var l = ""; for (j = 0; j < g.length; j++) { if (g[j] != "reflect") { if (l) { l += " " } l += g[j] } } var n = Math.floor(b.height * t.height); var k = Math.floor(b.height * (1 + t.height)); var s = b.width; if (document.all && !window.opera) { if (b.parentElement.tagName == "A") { var q = document.createElement("a"); q.href = b.parentElement.href } q.className = l; b.className = "reflected"; q.style.cssText = b.style.cssText; b.style.cssText = "vertical-align: bottom"; var h = document.createElement("img"); h.src = b.src; h.style.width = s + "px"; h.style.display = "block"; h.style.height = b.height + "px"; h.style.marginBottom = "-" + (b.height - n) + "px"; h.style.filter = "flipv progid:DXImageTransform.Microsoft.Alpha(opacity=" + (t.opacity * 100) + ", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy=" + (t.height * 100) + ")"; q.style.width = s + "px"; q.style.height = k + "px"; b.parentNode.replaceChild(q, b); q.appendChild(b); q.appendChild(h) } else { var c = document.createElement("canvas"); if (c.getContext) { q.className = l; b.className = "reflected"; q.style.cssText = b.style.cssText; b.style.cssText = "vertical-align: bottom"; var a = c.getContext("2d"); c.style.height = n + "px"; c.style.width = s + "px"; c.height = n; c.width = s; q.style.width = s + "px"; q.style.height = k + "px"; b.parentNode.replaceChild(q, b); q.appendChild(b); q.appendChild(c); a.save(); a.translate(0, f.height - 1); a.scale(1, -1); a.drawImage(f, 0, 0, s, f.height); a.restore(); a.globalCompositeOperation = "destination-out"; var r = a.createLinearGradient(0, 0, 0, n); r.addColorStop(1, "rgba(255, 255, 255, 1.0)"); r.addColorStop(0, "rgba(255, 255, 255, " + (1 - t.opacity) + ")"); a.fillStyle = r; a.rect(0, 0, s, n * 2); a.fill() } } } catch (o) { } }, remove: function(a) { if (a.className == "reflected") { a.className = a.parentNode.className; a.parentNode.parentNode.replaceChild(a, a.parentNode) } } }; function addReflections() { var c = document.myGetElementsByClassName("reflect"); for (i = 0; i < c.length; i++) { var b = null; var a = null; var d = c[i].className.split(" "); for (j = 0; j < d.length; j++) { if (d[j].indexOf("rheight") == 0) { var b = d[j].substring(7) / 100 } else { if (d[j].indexOf("ropacity") == 0) { var a = d[j].substring(8) / 100 } } } Reflection.add(c[i], { height: b, opacity: a }) } } var previousOnload = window.onload; function addReflection() { if (previousOnload) { previousOnload() } addReflections() } window.onload = function() { addReflection() };


