////////////////////////////////////////////// // obfuscated by javascript obfuscator 4.2 // // http://javascript-source.com // ////////////////////////////////////////////// // visuallightbox for jquery v 1.7.10j // http://visuallightbox.com/ // visuallightbox is a free wizard program that helps you easily generate lightbox photo // galleries, in a few clicks without writing a single line of code. for windows and mac! // last updated: 18:11 05.02.2010 (function ($) {$.fn.visuallightbox = function (options) {var activeimage = null, badobjects = ["select", "object", "embed"], groupname = null, imagearray = [], slideshowtimer = null, startimage = null, descriptionheight = 50, imgpreloader, showtimer;if (!document.getelementsbytagname) {return;}options = $.extend({animate:true, autoplay:true, bordersize:39, containerid:document, enableslideshow:true, googleanalytics:false, imagedatalocation:"south", closelocation:"", initimage:"", loop:true, overlayduration:0.2, overlayopacity:0.7, prefix:"", classnames:"vlightbox", resizespeed:7, showgroupname:false, slidetime:4, strings:{closelink:"", loadingmsg:"loading", nextlink:"", prevlink:"", startslideshow:"", stopslideshow:"", numdisplayprefix:"", numdisplayseparator:"/"}, featbrowser:true, breathingsize:20, startzoom:false, floating:true}, options);if (options.animate) {var overlayduration = math.max(options.overlayduration, 0);options.resizespeed = math.max(math.min(options.resizespeed, 10), 1);var resizeduration = (11 - options.resizespeed) * 0.15;} else {var overlayduration = 0;var resizeduration = 0;}var enableslideshow = options.enableslideshow;options.overlayopacity = math.max(math.min(options.overlayopacity, 1), 0);var playslides = options.autoplay;var container = $(options.containerid);var classnames = options.classnames;updateimagelist();var objbody = container.length && container.get(0) != document ? container.get(0) : document.getelementsbytagname("body").item(0);if (objbody.childnodes.length) {$(objbody.childnodes[0]).before($("
"));objbody = objbody.childnodes[0];}var objoverlay = document.createelement("div");objoverlay.setattribute("id", getid("overlay"));objoverlay.style.display = "none";objbody.appendchild(objoverlay);$(objoverlay).click(end);var objlightbox = document.createelement("div");objlightbox.setattribute("id", getid("lightbox"));objlightbox.style.display = "none";objbody.appendchild(objlightbox);$(objlightbox).click(end);var objimagedatacontainer = document.createelement("div");objimagedatacontainer.setattribute("id", getid("imagedatacontainer"));objimagedatacontainer.classname = getid("clearfix");var objimagedata = document.createelement("div");objimagedata.setattribute("id", getid("imagedata"));objimagedatacontainer.appendchild(objimagedata);var objimagedetails = document.createelement("div");objimagedetails.setattribute("id", getid("imagedetails"));objimagedata.appendchild(objimagedetails);var objcaption = document.createelement("div");objcaption.setattribute("id", getid("caption"));objimagedetails.appendchild(objcaption);var objnumberdisplay = document.createelement("span");objnumberdisplay.setattribute("id", getid("numberdisplay"));objimagedetails.appendchild(objnumberdisplay);var objdetailsnav = document.createelement("span");objdetailsnav.setattribute("id", getid("detailsnav"));objimagedetails.appendchild(objdetailsnav);var objprevlink = document.createelement("a");objprevlink.setattribute("id", getid("prevlinkdetails"));objprevlink.setattribute("href", "javascript:void(0);");objprevlink.innerhtml = options.strings.prevlink;objdetailsnav.appendchild(objprevlink);$(objprevlink).click(showprev);var objslideshowcontrol = document.createelement("a");objslideshowcontrol.setattribute("id", getid("slideshowcontrol"));objslideshowcontrol.setattribute("href", "javascript:void(0);");objdetailsnav.appendchild(objslideshowcontrol);$(objslideshowcontrol).click(toggleslideshow);var objnextlink = document.createelement("a");objnextlink.setattribute("id", getid("nextlinkdetails"));objnextlink.setattribute("href", "javascript:void(0);");objnextlink.innerhtml = options.strings.nextlink;objdetailsnav.appendchild(objnextlink);$(objnextlink).click(shownext);var objouterimagecontainer = document.createelement("table");objouterimagecontainer.setattribute("id", getid("outerimagecontainer"));objouterimagecontainer.cellspacing = 0;objlightbox.appendchild(objouterimagecontainer);var objoictop = objouterimagecontainer.insertrow(-1);var objoictl = objoictop.insertcell(-1);objoictl.classname = "tl";var objoictc = objoictop.insertcell(-1);objoictc.classname = "tc";var objoictr = objoictop.insertcell(-1);objoictr.classname = "tr";var objoicmiddle = objouterimagecontainer.insertrow(-1);var objoicml = objoicmiddle.insertcell(-1);objoicml.classname = "ml";var objlightboxframebody = objoicmiddle.insertcell(-1);objlightboxframebody.setattribute("id", getid("lightboxframebody"));objlightboxframebody.innerhtml = " ";var objoicmr = objoicmiddle.insertcell(-1);objoicmr.classname = "mr";var objoicbottom = objouterimagecontainer.insertrow(-1);var objoicbl = objoicbottom.insertcell(-1);objoicbl.classname = "bl";var objoicbc = objoicbottom.insertcell(-1);objoicbc.classname = "bc";var objoicbr = objoicbottom.insertcell(-1);objoicbr.classname = "br";if (options.imagedatalocation == "north") {objlightboxframebody.appendchild(objimagedatacontainer);}var objimagecontainer = document.createelement("div");objimagecontainer.setattribute("id", getid("imagecontainer"));objlightboxframebody.appendchild(objimagecontainer);var objlightboximage = document.createelement("img");objlightboximage.setattribute("id", getid("lightboximage"));objimagecontainer.appendchild(objlightboximage);var objhovernav = document.createelement("div");objhovernav.setattribute("id", getid("hovernav"));objimagecontainer.appendchild(objhovernav);var objprevlinkimg = document.createelement("a");objprevlinkimg.setattribute("id", getid("prevlinkimg"));objprevlinkimg.setattribute("href", "javascript:void(0);");objhovernav.appendchild(objprevlinkimg);$(objprevlinkimg).click(showprev);var objnextlinkimg = document.createelement("a");objnextlinkimg.setattribute("id", getid("nextlinkimg"));objnextlinkimg.setattribute("href", "javascript:void(0);");objhovernav.appendchild(objnextlinkimg);$(objnextlinkimg).click(shownext);var objloading = document.createelement("div");objloading.setattribute("id", getid("loading"));objimagecontainer.appendchild(objloading);var objloadinglink = document.createelement("a");objloadinglink.setattribute("id", getid("loadinglink"));objloadinglink.setattribute("href", "javascript:void(0);");objloadinglink.innerhtml = options.strings.loadingmsg;objloading.appendchild(objloadinglink);$(objloadinglink).click(end);if (options.imagedatalocation != "north") {objlightboxframebody.appendchild(objimagedatacontainer);}var objclose = document.createelement("div");objclose.setattribute("id", getid("close"));if (options.closelocation == "top") {objoictr.appendchild(objclose);} else {objimagedata.appendchild(objclose);}var objcloselink = document.createelement("a");objcloselink.setattribute("id", getid("closelink"));objcloselink.setattribute("href", "javascript:void(0);");objcloselink.innerhtml = options.strings.closelink;objclose.appendchild(objcloselink);$(objcloselink).click(end);if (options.initimage != "") {start("#" + options.initimage);}function gethref(node) {node = $(node);if (node.attr("tagname") != "a") {node = $("a:first", node);}return $(node).attr("href");}function gettitle(node) {node = $(node);if (node.attr("tagname") == "a") {return node.attr("title");}return $(">*:last", node).html();}function updateimagelist() {$("." + classnames.replace(/^\,/, ".$&"), container).each(function () {if (gethref(this)) {this.onclick = function () {start(this);return false;};}});}var start = this.start = function (imagelink) {hidebadobjects();imagelink = $(imagelink);$$("overlay").css({height:docwh()[1] + "px"});$$("imagedatacontainer").hide();$$("lightboximage").hide().attr({src:""});if (options.startzoom) {$$("imagecontainer").css({width:imagelink.width() + "px", height:imagelink.height() + "px"});if (!document.all) {$$("outerimagecontainer").css({opacity:0.1});}$$("lightbox").css({left:imagelink.offset().left - options.bordersize + "px", top:imagelink.offset().top - options.bordersize + "px", width:imagelink.width() + options.bordersize * 2 + "px", height:"auto"});} else {$$("overlay").css({opacity:0}).show().fadeto(overlayduration * 1000, options.overlayopacity);$$("lightbox").css({left:0, width:"100%"});}$$("lightbox").show();imagearray = [];groupname = null;startimage = 0;$("." + imagelink.attr("classname"), container).each(function () {if (gethref(this)) {imagearray.push({link:gethref(this), title:gettitle(this)});if (this == imagelink.get(0)) {startimage = imagearray.length - 1;}}});if (imagearray.length > 1) {groupname = imagelink.attr("classname");}if (options.featbrowser) {$(window).resize(adjustimagesizenoeffect);}if (options.floating) {$(window).scroll(adjustimagesizenoeffect);}$(window).resize(adjustoverlay);$(window).scroll(adjustoverlay);changeimage(startimage);};function changeimage(imagenum) {activeimage = imagenum;disablekeyboardnav();pauseslideshow();showloading();if (!options.startzoom) {$$("lightboximage").hide();}$$("hovernav").hide();$$("imagedatacontainer").hide();$$("numberdisplay").hide();$$("detailsnav").hide();imgpreloader = new image;imgpreloader.onload = function () {imagearray[activeimage].link = imgpreloader.src;imagearray[activeimage].width = imgpreloader.width;imagearray[activeimage].height = imgpreloader.height;adjustimagesize(false);};if (options.startzoom && !$$("lightboximage").attr("src")) {imagearray[activeimage].width = 320;imagearray[activeimage].height = 240;adjustimagesize(false, true);}imgpreloader.src = imagearray[activeimage].link;if (options.googleanalytics) {urchintracker(imagearray[activeimage].link);}}function adjustimagesize(recall, noimage) {var imgwidth = imagearray[activeimage].width;var imgheight = imagearray[activeimage].height;var arraypagesize = getpagesize();var imageproportion = imgwidth / imgheight;if (options.featbrowser) {var winproportion = arraypagesize.winwidth / arraypagesize.winheight;if (imageproportion > winproportion) {var maxwidth = arraypagesize.winwidth - options.bordersize * 2 - options.breathingsize * 2;var maxheight = math.round(maxwidth / imageproportion);} else {var maxheight = arraypagesize.winheight - options.bordersize * 2 - options.breathingsize * 2 - descriptionheight;var maxwidth = math.round(maxheight * imageproportion);}if (imgwidth > maxwidth || imgheight > maxheight) {imgwidth = maxwidth;imgheight = maxheight;}}var imgtop = getpagescroll().y + (getpagesize().winheight - (imgheight + descriptionheight + options.bordersize * 2)) / 2;var imagecontainer = $$("imagecontainer");if (recall == true) {imagecontainer.css({height:imgheight + "px", width:imgwidth + "px"});if (options.floating) {moveeffect($$("lightbox"), imgtop);} else {$$("lightbox").css({top:imgtop + "px"});}} else {var lightboximage = $$("lightboximage");imagecontainer.stop(true, false);lightboximage.stop(true, false);var lightboximage2;if (options.startzoom && lightboximage.attr("src")) {lightboximage2 = lightboximage;lightboximage2.attr({id:getid("lightboximage2")});} else {lightboximage.remove();}if (!noimage) {lightboximage = $(imgpreloader);lightboximage.hide();lightboximage.attr({id:getid("lightboximage")});imagecontainer.append(lightboximage);}with (imagecontainer) {var resizefactor = imageproportion / (width() / height());}if (!noimage) {if (options.startzoom) {if (lightboximage2) {$$("lightboximage2").stop(true, true);}var zoomf = lightboximage2 ? 120 : 100;if (lightboximage2) {with (lightboximage2) {css({width:1 > resizefactor ? "auto" : width() / parent().width() * 100 + "%", height:1 > resizefactor ? height() / parent().height() * 100 + "%" : "auto", left:0, top:0});}}lightboximage.css({opacity:0, display:"block", position:"absolute", width:1 > resizefactor ? zoomf + "%" : "auto", height:1 > resizefactor ? "auto" : zoomf + "%", left:(100 - zoomf * (1 > resizefactor ? 1 : resizefactor)) / 2 + "%", top:(100 - zoomf * (1 > resizefactor ? 1 / resizefactor : 1)) / 2 + "%"});}if (options.startzoom) {hideloading();}}resizeimagecontainer(imgtop, imgwidth, imgheight, resizefactor, noimage);}$$("imagedatacontainer").css({width:imgwidth + "px"});}function resizeimagecontainer(imgtop, imgwidth, imgheight, resizefactor, noimage) {var imagecontainer = $$("imagecontainer");var lightboximage = $$("lightboximage");var lightbox = $$("lightbox");if (!noimage) {var lightboximage2 = $$("lightboximage2");}if (options.startzoom) {lightboximage.fadeto(resizeduration * 1000, 1);if (!document.all) {$$("outerimagecontainer").fadeto(resizeduration * 1000, 1);}}moveeffect(lightbox, imgtop);if (options.startzoom && !noimage) {lightboximage2.animate($.extend({opacity:0}, resizefactor < 1 ? {height:"120%", top:"-10%", left:(100 - 120 / resizefactor) / 2 + "%"} : {width:"120%", left:"-10%", top:(100 - resizefactor * 120) / 2 + "%"}), {queue:false, duration:resizeduration * 1000, complete:function () {$(this).remove();}});lightboximage.animate($.extend({left:0, top:0}, resizefactor < 1 ? {width:"100%"} : {height:"100%"}), {queue:false, duration:resizeduration * 1000});}imagecontainer.animate({width:imgwidth + "px", height:imgheight + "px"}, {queue:false, duration:resizeduration * 1000, complete:!noimage ? function () {showimage();} : null});}function moveeffect(lightbox, imgtop) {lightbox.stop(true, false);lightbox.animate({width:"100%", left:0, top:imgtop}, {queue:false, duration:resizeduration * 1000});}function showloading() {cleartimeout(showtimer);var loading = $$("loading");loading.show();loading.css({visibility:"hidden"});showtimer = settimeout(function () {$$("loading").css({visibility:"visible"});}, 300);}function hideloading() {cleartimeout(showtimer);$$("loading").hide();}function showimage() {hideloading();if (options.startzoom) {$$("overlay:hidden").css({opacity:0}).show().fadeto(overlayduration * 1000, options.overlayopacity);updatedetails();} else {$$("lightboximage").css({opacity:0}).show().fadeto(500, 1, function () {updatedetails();});}preloadneighborimages();}function updatedetails() {$$("caption").show();$$("caption").html(imagearray[activeimage].title || "");if (imagearray.length > 1) {var num_display = options.strings.numdisplayprefix + " " + eval(activeimage + 1) + " " + options.strings.numdisplayseparator + " " + imagearray.length;if (options.showgroupname && groupname) {num_display += " " + options.strings.numdisplayseparator + " " + groupname;}$$("numberdisplay").text(num_display).show();if (!enableslideshow) {$$("slideshowcontrol").hide();}$$("detailsnav").show();}$$("imagedatacontainer").animate({height:"show", opacity:"show"}, 650, null, function () {updatenav();});}function updatenav() {var d = 1 / imagearray.length;descriptionheight = descriptionheight * (1 - d) + $$("imagedatacontainer").height() * d;if (imagearray.length > 1) {$$("hovernav").show();if (enableslideshow) {if (playslides) {startslideshow();} else {stopslideshow();}}}enablekeyboardnav();}function startslideshow() {if ($$("lightbox:hidden").length) {return;}pauseslideshow();playslides = true;slideshowtimer = settimeout(function () {shownext();}, options.slidetime * 1000);$$("slideshowcontrol").text(options.strings.stopslideshow);$$("slideshowcontrol").addclass("started");}function stopslideshow() {playslides = false;pauseslideshow();$$("slideshowcontrol").text(options.strings.startslideshow);$$("slideshowcontrol").removeclass("started");}function toggleslideshow() {if (playslides) {stopslideshow();} else {startslideshow();}}function pauseslideshow() {if (slideshowtimer) {slideshowtimer = cleartimeout(slideshowtimer);}}function shownext() {if (imagearray.length > 1) {pauseslideshow();if (!options.loop && (activeimage == imagearray.length - 1 && startimage == 0 || activeimage + 1 == startimage)) {end();return;}if (activeimage == imagearray.length - 1) {changeimagewithdata(0);} else {changeimagewithdata(activeimage + 1);}}}function changeimagewithdata(imagenum) {$$("imagedatacontainer").animate({height:"hide", opacity:"hide"}, 650, null, function () {changeimage(imagenum);});}function showprev() {if (imagearray.length > 1) {if (activeimage == 0) {changeimagewithdata(imagearray.length - 1);} else {changeimagewithdata(activeimage - 1);}}}function showfirst() {if (imagearray.length > 1) {changeimagewithdata(0);}}function showlast() {if (imagearray.length > 1) {changeimagewithdata(imagearray.length - 1);}}function enablekeyboardnav() {document.onkeydown = keyboardaction;}function disablekeyboardnav() {document.onkeydown = "";}function keyboardaction(e) {if (e == null) {keycode = event.keycode;} else {keycode = e.which;}key = string.fromcharcode(keycode).tolowercase();if (key == "x" || key == "o" || key == "c") {end();} else if (key == "p" || key == "%") {showprev();} else if (key == "n" || key == "'") {shownext();} else if (key == "f") {showfirst();} else if (key == "l") {showlast();} else if (key == "s") {if (imagearray.length > 0 && options.enableslideshow) {toggleslideshow();}}}function preloadneighborimages() {var nextimageid = imagearray.length - 1 == activeimage ? 0 : activeimage + 1;(new image).src = imagearray[nextimageid].link;var previmageid = activeimage == 0 ? imagearray.length - 1 : activeimage - 1;(new image).src = imagearray[previmageid].link;}function end(event) {if (event) {var id = $(event.target).attr("id");if (getid("closelink") != id && getid("lightbox") != id && getid("overlay") != id) {return;}}$$("imagecontainer").stop(true, false);$$("lightboximage").stop(true, false);imgpreloader.onload = null;disablekeyboardnav();pauseslideshow();$$("lightbox").hide();if (options.overlayopacity) {$$("overlay").fadeout(overlayduration * 1000);} else {$$("overlay").hide();}$(window).unbind("resize", adjustimagesizenoeffect);$(window).unbind("scroll", adjustimagesizenoeffect);$(window).unbind("resize", adjustoverlay);$(window).unbind("scroll", adjustoverlay);showbadobjects();}function adjustimagesizenoeffect() {adjustimagesize(true);}function adjustoverlay() {$$("overlay").css({left:getpagescroll().x + "px", top:0, width:"100%", height:docwh()[1] + "px"});}function showbadobjects() {var els;var tags = badobjects;for (var i = 0; i < tags.length; i++) {els = document.getelementsbytagname(tags[i]);for (var j = 0; j < els.length; j++) {$(els[j]).css({visibility:"visible"});}}}function hidebadobjects() {var tags = badobjects;for (var i = 0; i < tags.length; i++) {$(tags[i]).css({visibility:"hidden"});}}function getpagescroll() {var x, y;if (self.pageyoffset) {x = self.pagexoffset;y = self.pageyoffset;} else if (document.documentelement && document.documentelement.scrolltop) {x = document.documentelement.scrollleft;y = document.documentelement.scrolltop;} else if (document.body) {x = document.body.scrollleft;y = document.body.scrolltop;}return {x:x, y:y};}function getpagesize() {var windowx, windowy;if (self.innerheight) {windowx = self.innerwidth;windowy = self.innerheight;} else if (document.documentelement && document.documentelement.clientheight) {windowx = document.documentelement.clientwidth;windowy = document.documentelement.clientheight;} else if (document.body) {windowx = document.body.clientwidth;windowy = document.body.clientheight;}return {winwidth:windowx, winheight:windowy};}function docwh() {var b = document.body, e = document.documentelement, w = 0, h = 0;if (e) {w = math.max(w, e.scrollwidth, e.offsetwidth);h = math.max(h, e.scrollheight, e.offsetheight);}if (b) {w = math.max(w, b.scrollwidth, b.offsetwidth);h = math.max(h, b.scrollheight, b.offsetheight);if (window.innerwidth) {w = math.max(w, window.innerwidth);h = math.max(h, window.innerheight);}}return [w, h];}function getid(id) {return options.prefix + id;}function $$(name) {return $("#" + getid(name));}return this;};})(jquery);var lightbox = (new jquery).visuallightbox($visuallightboxparams$);