function Lytebox(a,c){this.label=new Object();this.label["close"]="Close (Esc)";this.label["prev"]="Previous (\u2190)";this.label["next"]="Next (\u2192)";this.label["play"]="Play (spacebar)";this.label["pause"]="Pause (spacebar)";this.label["print"]="Print";this.label["image"]="Image %1 of %2";this.label["page"]="Page %1 of %2";
this.theme="black";this.roundedBorder=true;this.innerBorder=true;this.outerBorder=true;this.resizeSpeed=5;this.maxOpacity=80;this.borderSize=12;this.appendQS=false;this.fixedPosition=this.isMobile()?false:true;this.inherit=true;this.__hideObjects=true;this.__autoResize=true;this.__doAnimations=true;this.__animateOverlay=false;
this.__forceCloseClick=false;this.__refreshPage=false;this.__showPrint=false;this.__navType=3;this.__navTop=this.isMobile()?false:false;this.__titleTop=this.isMobile()?true:false;this.__width="80%";this.__height="80%";this.__scrolling="auto";this.__loopPlayback=false;this.__autoPlay=true;this.__autoEmbed=true;
this.__slideInterval=4000;this.__showNavigation=false;this.__showClose=true;this.__showDetails=true;this.__showPlayPause=true;this.__autoEnd=true;this.__pauseOnNextClick=false;this.__pauseOnPrevClick=true;this.__loopSlideshow=false;this.__beforeStart="";this.__afterStart="";this.__beforeEnd="";this.__afterEnd="";
this.__changeTipCursor=true;this.__tipDecoration="dotted";this.__tipStyle="classic";this.__tipRelative=true;this.navTypeHash=new Object();this.navTypeHash["Hover_by_type_1"]=true;this.navTypeHash["Display_by_type_1"]=false;this.navTypeHash["Hover_by_type_2"]=false;this.navTypeHash["Display_by_type_2"]=true;
this.navTypeHash["Hover_by_type_3"]=true;this.navTypeHash["Display_by_type_3"]=true;this.resizeWTimerArray=new Array();this.resizeWTimerCount=0;this.resizeHTimerArray=new Array();this.resizeHTimerCount=0;this.changeContentTimerArray=new Array();this.changeContentTimerCount=0;this.overlayTimerArray=new Array();
this.overlayTimerCount=0;this.imageTimerArray=new Array();this.imageTimerCount=0;this.timerIDArray=new Array();this.timerIDCount=0;this.slideshowIDArray=new Array();this.slideshowIDCount=0;this.imageArray=new Array();this.slideArray=new Array();this.frameArray=new Array();this.contentNum=null;this.aPageSize=new Array();
this.overlayLoaded=false;this.checkFrame();this.frameSrc="";this.isSlideshow=false;this.isLyteframe=false;this.tipSet=false;this.ieVersion=this.ffVersion=this.chromeVersion=this.operaVersion=this.safariVersion=-1;this.ie=this.ff=this.chrome=this.opera=this.safari=false;this.setBrowserInfo();this.classAttribute=(((this.ie&&this.doc.compatMode=="BackCompat")||(this.ie&&this.ieVersion<=7))?"className":"class");
this.classAttribute=(this.ie&&(document.documentMode==8||document.documentMode==9))?"class":this.classAttribute;if(a){this.http=c;this.bodyOnscroll=document.body.onscroll;if(this.resizeSpeed>10){this.resizeSpeed=10;}if(this.resizeSpeed<1){this.resizeSpeed=1;}var b=2;this.resizeDuration=(11-this.resizeSpeed)*(this.ie?(this.ieVersion>=9?6:(this.ieVersion==8?(this.doc.compatMode=="BackCompat"?b:b-1):3)):7);
this.resizeDuration=this.ff?(11-this.resizeSpeed)*(this.ffVersion<6?3:12):this.resizeDuration;this.resizeDuration=this.chrome?(11-this.resizeSpeed)*5:this.resizeDuration;this.resizeDuration=this.safari?(11-this.resizeSpeed)*20:this.resizeDuration;if(window.name!="lbIframe"){this.initialize();}}else{this.http=new Array();
if(typeof $=="undefined"){$=function(d){if($.cache[d]===undefined){$.cache[d]=document.getElementById(d)||false;}return $.cache[d];};$.cache={};}}}Lytebox.prototype.setBrowserInfo=function(){var ua=navigator.userAgent.toLowerCase();this.chrome=ua.indexOf("chrome")>-1;this.ff=ua.indexOf("firefox")>-1;
this.safari=!this.chrome&&ua.indexOf("safari")>-1;this.opera=ua.indexOf("opera")>-1;this.ie=
/*@cc_on!@*/
false;if(this.chrome){var re=new RegExp("chrome/([0-9]{1,}[.0-9]{0,})");if(re.exec(ua)!=null){this.chromeVersion=parseInt(RegExp.$1);}}if(this.ff){var re=new RegExp("firefox/([0-9]{1,}[.0-9]{0,})");
if(re.exec(ua)!=null){this.ffVersion=parseInt(RegExp.$1);}}if(this.ie){var re=new RegExp("msie ([0-9]{1,}[.0-9]{0,})");if(re.exec(ua)!=null){this.ieVersion=parseInt(RegExp.$1);}}if(this.opera){var re=new RegExp("opera/([0-9]{1,}[.0-9]{0,})");if(re.exec(ua)!=null){this.operaVersion=parseInt(RegExp.$1);
}}if(this.safari){var re=new RegExp("version/([0-9]{1,}[.0-9]{0,})");if(re.exec(ua)!=null){this.safariVersion=parseInt(RegExp.$1);}}};Lytebox.prototype.initialize=function(){this.updateLyteboxItems();var J=this.doc.getElementsByTagName("body").item(0);if(this.doc.$("lbOverlay")){J.removeChild(this.doc.$("lbOverlay"));
}if(this.doc.$("lbMain")){J.removeChild(this.doc.$("lbMain"));}if(this.doc.$("lbLauncher")){J.removeChild(this.doc.$("lbLauncher"));}var f=this.doc.createElement("a");f.setAttribute("id","lbLauncher");f.setAttribute(this.classAttribute,"lytebox");f.style.display="none";J.appendChild(f);var t=this.doc.createElement("div");
t.setAttribute("id","lbOverlay");t.setAttribute(this.classAttribute,this.theme);if(this.ie&&(this.ieVersion<=6||(this.ieVersion<=9&&this.doc.compatMode=="BackCompat"))){t.style.position="absolute";}t.style.display="none";J.appendChild(t);var g=this.doc.createElement("div");g.setAttribute("id","lbMain");
g.style.display="none";J.appendChild(g);var E=this.doc.createElement("div");E.setAttribute("id","lbOuterContainer");E.setAttribute(this.classAttribute,this.theme);if(this.roundedBorder){E.style.MozBorderRadius="8px";E.style.borderRadius="8px";}g.appendChild(E);var C=this.doc.createElement("div");C.setAttribute("id","lbTopContainer");
C.setAttribute(this.classAttribute,this.theme);if(this.roundedBorder){C.style.MozBorderRadius="8px";C.style.borderRadius="8px";}E.appendChild(C);var l=this.doc.createElement("div");l.setAttribute("id","lbTopData");l.setAttribute(this.classAttribute,this.theme);C.appendChild(l);var z=this.doc.createElement("span");
z.setAttribute("id","lbTitleTop");l.appendChild(z);var e=this.doc.createElement("span");e.setAttribute("id","lbNumTop");l.appendChild(e);var j=this.doc.createElement("div");j.setAttribute("id","lbTopNav");C.appendChild(j);var K=this.doc.createElement("a");K.setAttribute("id","lbCloseTop");K.setAttribute("title",this.label["close"]);
K.setAttribute(this.classAttribute,this.theme);K.setAttribute("href","javascript:void(0)");j.appendChild(K);var p=this.doc.createElement("a");p.setAttribute("id","lbPrintTop");p.setAttribute("title",this.label["print"]);p.setAttribute(this.classAttribute,this.theme);p.setAttribute("href","javascript:void(0)");
j.appendChild(p);var x=this.doc.createElement("a");x.setAttribute("id","lbNextTop");x.setAttribute("title",this.label["next"]);x.setAttribute(this.classAttribute,this.theme);x.setAttribute("href","javascript:void(0)");j.appendChild(x);var b=this.doc.createElement("a");b.setAttribute("id","lbPauseTop");
b.setAttribute("title",this.label["pause"]);b.setAttribute(this.classAttribute,this.theme);b.setAttribute("href","javascript:void(0)");b.style.display="none";j.appendChild(b);var w=this.doc.createElement("a");w.setAttribute("id","lbPlayTop");w.setAttribute("title",this.label["play"]);w.setAttribute(this.classAttribute,this.theme);
w.setAttribute("href","javascript:void(0)");w.style.display="none";j.appendChild(w);var n=this.doc.createElement("a");n.setAttribute("id","lbPrevTop");n.setAttribute("title",this.label["prev"]);n.setAttribute(this.classAttribute,this.theme);n.setAttribute("href","javascript:void(0)");j.appendChild(n);
var s=this.doc.createElement("div");s.setAttribute("id","lbIframeContainer");s.style.display="none";E.appendChild(s);var I=this.doc.createElement("iframe");I.setAttribute("id","lbIframe");I.setAttribute("name","lbIframe");I.setAttribute("frameBorder","0");if(this.innerBorder){I.setAttribute(this.classAttribute,this.theme);
}I.style.display="none";s.appendChild(I);var A=this.doc.createElement("div");A.setAttribute("id","lbImageContainer");E.appendChild(A);var r=this.doc.createElement("img");r.setAttribute("id","lbImage");if(this.innerBorder){r.setAttribute(this.classAttribute,this.theme);}A.appendChild(r);var u=this.doc.createElement("div");
u.setAttribute("id","lbLoading");u.setAttribute(this.classAttribute,this.theme);E.appendChild(u);var H=this.doc.createElement("div");H.setAttribute("id","lbBottomContainer");H.setAttribute(this.classAttribute,this.theme);if(this.roundedBorder){H.style.MozBorderRadius="8px";H.style.borderRadius="8px";
}E.appendChild(H);var B=this.doc.createElement("div");B.setAttribute("id","lbBottomData");B.setAttribute(this.classAttribute,this.theme);H.appendChild(B);var F=this.doc.createElement("span");F.setAttribute("id","lbTitleBottom");B.appendChild(F);var h=this.doc.createElement("span");h.setAttribute("id","lbNumBottom");
B.appendChild(h);var m=this.doc.createElement("span");m.setAttribute("id","lbDescBottom");B.appendChild(m);var k=this.doc.createElement("div");k.setAttribute("id","lbHoverNav");A.appendChild(k);var q=this.doc.createElement("div");q.setAttribute("id","lbBottomNav");H.appendChild(q);var y=this.doc.createElement("a");
y.setAttribute("id","lbPrevHov");y.setAttribute("title",this.label["prev"]);y.setAttribute(this.classAttribute,this.theme);y.setAttribute("href","javascript:void(0)");k.appendChild(y);var L=this.doc.createElement("a");L.setAttribute("id","lbNextHov");L.setAttribute("title",this.label["next"]);L.setAttribute(this.classAttribute,this.theme);
L.setAttribute("href","javascript:void(0)");k.appendChild(L);var D=this.doc.createElement("a");D.setAttribute("id","lbClose");D.setAttribute("title",this.label["close"]);D.setAttribute(this.classAttribute,this.theme);D.setAttribute("href","javascript:void(0)");q.appendChild(D);var G=this.doc.createElement("a");
G.setAttribute("id","lbPrint");G.setAttribute("title",this.label["print"]);G.setAttribute(this.classAttribute,this.theme);G.setAttribute("href","javascript:void(0)");G.style.display="none";q.appendChild(G);var v=this.doc.createElement("a");v.setAttribute("id","lbNext");v.setAttribute("title",this.label["next"]);
v.setAttribute(this.classAttribute,this.theme);v.setAttribute("href","javascript:void(0)");q.appendChild(v);var d=this.doc.createElement("a");d.setAttribute("id","lbPause");d.setAttribute("title",this.label["pause"]);d.setAttribute(this.classAttribute,this.theme);d.setAttribute("href","javascript:void(0)");
d.style.display="none";q.appendChild(d);var a=this.doc.createElement("a");a.setAttribute("id","lbPlay");a.setAttribute("title",this.label["play"]);a.setAttribute(this.classAttribute,this.theme);a.setAttribute("href","javascript:void(0)");a.style.display="none";q.appendChild(a);var c=this.doc.createElement("a");
c.setAttribute("id","lbPrev");c.setAttribute("title",this.label["prev"]);c.setAttribute(this.classAttribute,this.theme);c.setAttribute("href","javascript:void(0)");q.appendChild(c);};Lytebox.prototype.updateLyteboxItems=function(){var g=(this.isFrame&&window.parent.frames[window.name].document)?window.parent.frames[window.name].document.getElementsByTagName("a"):document.getElementsByTagName("a");
g=(this.isFrame)?g:document.getElementsByTagName("a");var b=(this.isFrame)?window.parent.frames[window.name].document.getElementsByTagName("area"):document.getElementsByTagName("area");var h=this.combine(g,b);var f=relAttribute=revAttribute=classAttribute=dataOptions=dataTip=tipDecoration=tipStyle=tipImage=tipHtml=aSetting=sName=sValue=sExt=null;
var e=bRelative=false;for(var d=0;d<h.length;d++){f=h[d];relAttribute=String(f.getAttribute("rel"));classAttribute=String(f.getAttribute(this.classAttribute));if(f.getAttribute("href")){sType=classAttribute.match(/lytebox|lyteshow|lyteframe/i);sType=this.isEmpty(sType)?relAttribute.match(/lytebox|lyteshow|lyteframe/i):sType;
dataOptions=String(f.getAttribute("data-lyte-options"));dataOptions=this.isEmpty(dataOptions)?String(f.getAttribute("rev")):dataOptions;sExt=f.getAttribute("href").split(".").pop().toLowerCase();e=(sExt=="png"||sExt=="jpg"||sExt=="jpeg"||sExt=="gif"||sExt=="bmp");if(sType&&sType.length>=1){if(e&&(dataOptions.match(/slide:true/i)||sType[0].toLowerCase()=="lyteshow")){f.onclick=function(){$lb.start(this,true,false);
return false;};}else{if(e){f.onclick=function(){$lb.start(this,false,false);return false;};}else{f.onclick=function(){$lb.start(this,false,true);return false;};}}}dataTip=String(f.getAttribute("data-tip"));dataTip=this.isEmpty(dataTip)?f.getAttribute("title"):dataTip;if(classAttribute.toLowerCase().match("lytetip")&&!this.isEmpty(dataTip)&&!this.tipsSet){if(this.__changeTipCursor){f.style.cursor="help";
}tipDecoration=this.__tipDecoration;tipStyle=this.__tipStyle;bRelative=this.__tipRelative;if(!this.isEmpty(dataOptions)){aOptions=dataOptions.split(" ");for(var c=0;c<aOptions.length;c++){aSetting=aOptions[c].split(":");sName=(aSetting.length>1?this.trim(aSetting[0]).toLowerCase():"");sValue=(aSetting.length>1?this.trim(aSetting[1]):"");
switch(sName){case"tipstyle":tipStyle=(/classic|info|help|warning|error/.test(sValue)?sValue:tipStyle);break;case"changetipcursor":f.style.cursor=(/true|false/.test(sValue)?(sValue=="true"?"help":""):f.style.cursor);break;case"tiprelative":bRelative=(/true|false/.test(sValue)?(sValue=="true"):bRelative);
break;case"tipdecoration":tipDecoration=(/dotted|solid|none/.test(sValue)?sValue:tipDecoration);break;}}}if(tipDecoration!="dotted"){f.style.borderBottom=(tipDecoration=="solid"?"1px solid":"none");}switch(tipStyle){case"info":tipStyle="lbCustom lbInfo";tipImage="lbTipImg lbInfoImg";break;case"help":tipStyle="lbCustom lbHelp";
tipImage="lbTipImg lbHelpImg";break;case"warning":tipStyle="lbCustom lbWarning";tipImage="lbTipImg lbWarningImg";break;case"error":tipStyle="lbCustom lbError";tipImage="lbTipImg lbErrorImg";break;case"classic":tipStyle="lbClassic";tipImage="";break;default:tipStyle="lbClassic";tipImage="";}if((this.ie&&this.ieVersion<=7)||(this.ieVersion==8&&this.doc.compatMode=="BackCompat")){tipImage="";
if(tipStyle!="lbClassic"&&!this.isEmpty(tipStyle)){tipStyle+=" lbIEFix";}}var a=this.findPos(f);if((this.ie&&(this.ieVersion<=6||this.doc.compatMode=="BackCompat"))||bRelative){f.style.position="relative";}tipHtml=f.innerHTML;f.innerHTML="";if((this.ie&&this.ieVersion<=6&&this.doc.compatMode!="BackCompat")||bRelative){f.innerHTML=tipHtml+'<span class="'+tipStyle+'">'+(tipImage?'<div class="'+tipImage+'"></div>':"")+dataTip+"</span>";
}else{f.innerHTML=tipHtml+'<span class="'+tipStyle+'" style="left:'+a[0]+"px;top:"+(a[1]+a[2])+'px;">'+(tipImage?'<div class="'+tipImage+'"></div>':"")+dataTip+"</span>";}if(classAttribute.match(/lytebox|lyteshow|lyteframe/i)==null){f.setAttribute("title","");}}}}this.tipsSet=true;};Lytebox.prototype.launch=function(e){var g=this.isEmpty(e.url)?"":String(e.url);
var c=this.isEmpty(e.options)?"":String(e.options).toLowerCase();var b=this.isEmpty(e.title)?"":e.title;var d=this.isEmpty(e.description)?"":e.description;if(this.isEmpty(g)){return false;}var h=g.split(".").pop().toLowerCase();var f=(h=="png"||h=="jpg"||h=="jpeg"||h=="gif"||h=="bmp");var a=this.doc.$("lbLauncher");
a.setAttribute("href",g);a.setAttribute("data-lyte-options",c);a.setAttribute("data-title",b);a.setAttribute("data-description",d);this.updateLyteboxItems();this.start(a,false,(f?false:true));};Lytebox.prototype.start=function(g,h,c){var p=String(g.getAttribute("data-lyte-options"));p=this.isEmpty(p)?String(g.getAttribute("rev")):p;
this.setOptions(p);this.isSlideshow=(h?true:false);this.isLyteframe=(c?true:false);if(!this.isEmpty(this.beforeStart)){var l=window[this.beforeStart];if(typeof l==="function"){if(!l()){return;}}}if(this.ie&&this.ieVersion<=6){this.toggleSelects("hide");}if(this.hideObjects){this.toggleObjects("hide");
}if(this.isFrame&&window.parent.frames[window.name].document){window.parent.$lb.printId=(this.isLyteframe?"lbIframe":"lbImage");}else{this.printId=(this.isLyteframe?"lbIframe":"lbImage");}this.aPageSize=this.getPageSize();var m=this.doc.$("lbOverlay");var q=this.doc.getElementsByTagName("body").item(0);
m.style.height=this.aPageSize[1]+"px";m.style.display="";this.fadeIn({id:"lbOverlay",opacity:(this.doAnimations&&this.animateOverlay&&(!this.ie||this.ieVersion>=9)?0:this.maxOpacity)});var d=(this.isFrame&&window.parent.frames[window.name].document)?window.parent.frames[window.name].document.getElementsByTagName("a"):document.getElementsByTagName("a");
d=(this.isFrame)?d:document.getElementsByTagName("a");var b=(this.isFrame)?window.parent.frames[window.name].document.getElementsByTagName("area"):document.getElementsByTagName("area");var j=this.combine(d,b);var a=sExt=null;this.frameArray=[];this.frameNum=0;this.imageArray=[];this.imageNum=0;this.slideArray=[];
this.slideNum=0;if(this.isEmpty(this.group)){p=String(g.getAttribute("data-lyte-options"));p=this.isEmpty(p)?String(g.getAttribute("rev")):p;if(this.isLyteframe){this.frameArray.push(new Array(g.getAttribute("href"),(!this.isEmpty(g.getAttribute("data-title"))?g.getAttribute("data-title"):g.getAttribute("title")),g.getAttribute("data-description"),p));
}else{this.imageArray.push(new Array(g.getAttribute("href"),(!this.isEmpty(g.getAttribute("data-title"))?g.getAttribute("data-title"):g.getAttribute("title")),g.getAttribute("data-description"),p));}}else{for(var f=0;f<j.length;f++){var n=j[f];p=String(n.getAttribute("data-lyte-options"));p=this.isEmpty(p)?String(n.getAttribute("rev")):p;
if(n.getAttribute("href")&&p.toLowerCase().match("group:"+this.group)){a=String(n.getAttribute(this.classAttribute)).match(/lytebox|lyteshow|lyteframe/i);a=this.isEmpty(a)?n.getAttribute("rel").match(/lytebox|lyteshow|lyteframe/i):a;sExt=n.getAttribute("href").split(".").pop().toLowerCase();bImage=(sExt=="png"||sExt=="jpg"||sExt=="jpeg"||sExt=="gif"||sExt=="bmp");
if(a&&a.length>=1){if(bImage&&(p.match(/slide:true/i)||a[0].toLowerCase()=="lyteshow")){this.slideArray.push(new Array(n.getAttribute("href"),(!this.isEmpty(n.getAttribute("data-title"))?n.getAttribute("data-title"):n.getAttribute("title")),n.getAttribute("data-description"),p));}else{if(bImage){this.imageArray.push(new Array(n.getAttribute("href"),(!this.isEmpty(n.getAttribute("data-title"))?n.getAttribute("data-title"):n.getAttribute("title")),n.getAttribute("data-description"),p));
}else{this.frameArray.push(new Array(n.getAttribute("href"),(!this.isEmpty(n.getAttribute("data-title"))?n.getAttribute("data-title"):n.getAttribute("title")),n.getAttribute("data-description"),p));}}}}}if(this.isLyteframe){this.frameArray=this.removeDuplicates(this.frameArray);while(this.frameArray[this.frameNum][0]!=g.getAttribute("href")){this.frameNum++;
}}else{if(h){this.slideArray=this.removeDuplicates(this.slideArray);try{while(this.slideArray[this.slideNum][0]!=g.getAttribute("href")){this.slideNum++;}}catch(k){}}else{this.imageArray=this.removeDuplicates(this.imageArray);while(this.imageArray[this.imageNum][0]!=g.getAttribute("href")){this.imageNum++;
}}}}this.changeContent(this.isLyteframe?this.frameNum:(this.isSlideshow?this.slideNum:this.imageNum));};Lytebox.prototype.changeContent=function(u){this.contentNum=u;if(!this.overlayLoaded){this.changeContentTimerArray[this.changeContentTimerCount++]=setTimeout("$lb.changeContent("+this.contentNum+")",250);
return;}else{for(var g=0;g<this.changeContentTimerCount;g++){window.clearTimeout(this.changeContentTimerArray[g]);}}var r=(this.isLyteframe)?this.frameArray[this.contentNum][3]:(this.isSlideshow?this.slideArray[this.contentNum][3]:this.imageArray[this.contentNum][3]);if(!this.inherit||/inherit:false/i.test(r)){this.setOptions(String(r));
}else{var l=String((this.isLyteframe)?this.frameArray[0][3]:(this.isSlideshow?this.slideArray[0][3]:this.imageArray[0][3]));if(this.isLyteframe){var c=sHeight=null;try{c=r.match(/width:\d+(%|px|)/i)[0];}catch(m){}try{sHeight=r.match(/height:\d+(%|px|)/i)[0];}catch(m){}if(!this.isEmpty(c)){l=l.replace(/width:\d+(%|px|)/i,c);
}if(!this.isEmpty(sHeight)){l=l.replace(/height:\d+(%|px|)/i,sHeight);}}this.setOptions(l);}var d=this.doc.$("lbMain");d.style.display="";var t=40;if(this.autoResize&&this.fixedPosition){if(this.ie&&(this.ieVersion<=7||this.doc.compatMode=="BackCompat")){d.style.top=(this.getPageScroll()+(this.aPageSize[3]/t))+"px";
var a=(this.aPageSize[3]/t);this.scrollHandler=function(){$lb.doc.$("lbMain").style.top=($lb.getPageScroll()+a)+"px";};this.bodyOnscroll=document.body.onscroll;if(window.addEventListener){window.addEventListener("scroll",this.scrollHandler);}else{if(window.attachEvent){window.attachEvent("onscroll",this.scrollHandler);
}}d.style.position="absolute";}else{d.style.top=((this.aPageSize[3]/t))+"px";d.style.position="fixed";}}else{d.style.position="absolute";d.style.top=(this.getPageScroll()+(this.aPageSize[3]/t))+"px";}this.doc.$("lbOuterContainer").style.paddingBottom="0";if(!this.outerBorder){this.doc.$("lbOuterContainer").style.border="none";
}else{this.doc.$("lbOuterContainer").setAttribute(this.classAttribute,this.theme);}if(this.forceCloseClick){this.doc.$("lbOverlay").onclick="";}else{this.doc.$("lbOverlay").onclick=function(){$lb.end();return false;};}this.doc.$("lbMain").onclick=function(h){var h=h;if(!h){if(window.parent.frames[window.name]&&(parent.document.getElementsByTagName("frameset").length<=0)){h=window.parent.window.event;
}else{h=window.event;}}var v=(h.target?h.target.id:h.srcElement.id);if((v=="lbMain")&&(!$lb.forceCloseClick)){$lb.end();return false;}};this.doc.$("lbPrintTop").onclick=this.doc.$("lbPrint").onclick=function(){$lb.printWindow();return false;};this.doc.$("lbCloseTop").onclick=this.doc.$("lbClose").onclick=function(){$lb.end();
return false;};this.doc.$("lbPauseTop").onclick=function(){$lb.togglePlayPause("lbPauseTop","lbPlayTop");return false;};this.doc.$("lbPause").onclick=function(){$lb.togglePlayPause("lbPause","lbPlay");return false;};this.doc.$("lbPlayTop").onclick=function(){$lb.togglePlayPause("lbPlayTop","lbPauseTop");
return false;};this.doc.$("lbPlay").onclick=function(){$lb.togglePlayPause("lbPlay","lbPause");return false;};if(this.isSlideshow&&this.showPlayPause&&this.isPaused){this.doc.$("lbPlay").style.display="";this.doc.$("lbPause").style.display="none";}if(this.isSlideshow){for(var g=0;g<this.slideshowIDCount;
g++){window.clearTimeout(this.slideshowIDArray[g]);}}if(!this.outerBorder){this.doc.$("lbOuterContainer").style.border="none";}else{this.doc.$("lbOuterContainer").setAttribute(this.classAttribute,this.theme);}var b=10;if(this.titleTop||this.navTop){this.doc.$("lbTopContainer").style.visibility="hidden";
b+=this.doc.$("lbTopContainer").offsetHeight;}else{this.doc.$("lbTopContainer").style.display="none";}this.doc.$("lbBottomContainer").style.display="none";this.doc.$("lbImage").style.display="none";this.doc.$("lbIframe").style.display="none";this.doc.$("lbPrevHov").style.display="none";this.doc.$("lbNextHov").style.display="none";
this.doc.$("lbIframeContainer").style.display="none";this.doc.$("lbLoading").style.marginTop="-"+b+"px";this.doc.$("lbLoading").style.display="";if(this.isLyteframe){var f=$lb.doc.$("lbIframe");f.src="about:blank";var q=this.trim(this.width);var j=this.trim(this.height);if(/\%/.test(q)){var k=parseInt(q);
q=parseInt((this.aPageSize[2]-50)*k/100);q=q+"px";}if(/\%/.test(j)){var k=parseInt(j);j=parseInt((this.aPageSize[3]-150)*k/100);if(this.ie&&this.ieVersion==7){j=j+10;}j=j+"px";}if(this.autoResize){var p=this.aPageSize[2]-50;var n=this.aPageSize[3]-150;if(this.ie&&this.ieVersion==7){j=parseInt(j)+10;}q=(parseInt(q)>p?p:q)+"px";
j=(parseInt(j)>n?n:j)+"px";}f.height=this.height=j;f.width=this.width=q;f.scrolling=this.scrolling;var s=f.contentWindow||f.contentDocument;try{if(s.document){s=s.document;}s.body.style.margin=0;s.body.style.padding=0;if(this.ie&&this.ieVersion<=8){s.body.scroll=this.scrolling;s.body.overflow=this.scrolling="no"?"hidden":"auto";
}}catch(m){}this.resizeContainer(parseInt(this.width),parseInt(this.height));}else{imgPreloader=new Image();imgPreloader.onload=function(){var w=imgPreloader.width;var h=imgPreloader.height;if($lb.autoResize){var e=$lb.aPageSize[2]-50;var z=$lb.aPageSize[3]-150;if(w>e){h=Math.round(h*(e/w));w=e;if(h>z){w=Math.round(w*(z/h));
h=z;}}else{if(h>z){w=Math.round(w*(z/h));h=z;if(w>e){h=Math.round(h*(e/w));w=e;}}}}var v=$lb.doc.$("lbImage");v.src=($lb.isSlideshow?$lb.slideArray[$lb.contentNum][0]:$lb.imageArray[$lb.contentNum][0]);v.width=w;v.height=h;$lb.resizeContainer(w,h);imgPreloader.onload=function(){};};imgPreloader.src=(this.isSlideshow?this.slideArray[this.contentNum][0]:this.imageArray[this.contentNum][0]);
}};Lytebox.prototype.resizeContainer=function(c,d){this.resizeWidth=c;this.resizeHeight=d;this.wCur=this.doc.$("lbOuterContainer").offsetWidth;this.hCur=this.doc.$("lbOuterContainer").offsetHeight;this.xScale=((this.resizeWidth+(this.borderSize*2))/this.wCur)*100;this.yScale=((this.resizeHeight+(this.borderSize*2))/this.hCur)*100;
var b=(this.wCur-this.borderSize*2)-this.resizeWidth;var a=(this.hCur-this.borderSize*2)-this.resizeHeight;this.wDone=(b==0);if(!(a==0)){this.hDone=false;this.resizeH("lbOuterContainer",this.hCur,this.resizeHeight+this.borderSize*2,this.getPixelRate(this.hCur,this.resizeHeight));}else{this.hDone=true;
if(!this.wDone){this.resizeW("lbOuterContainer",this.wCur,this.resizeWidth+this.borderSize*2,this.getPixelRate(this.wCur,this.resizeWidth));}}if((a==0)&&(b==0)){if(this.ie){this.pause(250);}else{this.pause(100);}}this.doc.$("lbPrevHov").style.height=this.resizeHeight+"px";this.doc.$("lbNextHov").style.height=this.resizeHeight+"px";
if(this.hDone&&this.wDone){if(this.isLyteframe){this.loadContent();}else{this.showContent();}}};Lytebox.prototype.loadContent=function(){try{var c=this.doc.$("lbIframe");var d=this.frameArray[this.contentNum][0];var b=d.split(".").pop().toLowerCase();if(!this.inline&&this.appendQS){d+=((/\?/.test(d))?"&":"?")+"request_from=lytebox";
}if(!this.autoEmbed||(this.ff&&(b=="pdf"||b=="mov"))||b=="wmv"){this.frameSource=d;this.showContent();return;}if(this.ie){c.onreadystatechange=function(){if($lb.doc.$("lbIframe").readyState=="complete"){$lb.showContent();$lb.doc.$("lbIframe").onreadystatechange=null;}};}else{c.onload=function(){$lb.showContent();
$lb.doc.$("lbIframe").onload=null;};}if(this.inline||(b=="mov"||b=="avi"||b=="wmv"||b=="mpg"||b=="mpeg"||b=="swf")){c.src="about:blank";this.frameSource="";var g=(this.inline)?this.doc.$(d.substr(d.indexOf("#")+1,d.length)).innerHTML:this.buildObject(parseInt(this.width),parseInt(this.height),d,b);var a=c.contentWindow||c.contentDocument;
if(a.document){a=a.document;}a.open();a.write(g);a.close();a.body.style.margin=0;a.body.style.padding=0;if(!this.inline){a.body.style.backgroundColor="#fff";a.body.style.fontFamily="Verdana, Helvetica, sans-serif";a.body.style.fontSize="0.9em";}this.frameSource="";}else{this.frameSource=d;c.src=d;}}catch(f){}};
Lytebox.prototype.showContent=function(){if(this.isSlideshow){if(this.contentNum==(this.slideArray.length-1)){if(this.loopSlideshow){this.slideshowIDArray[this.slideshowIDCount++]=setTimeout("$lb.changeContent(0)",this.slideInterval);}else{if(this.autoEnd){this.slideshowIDArray[this.slideshowIDCount++]=setTimeout("$lb.end('slideshow')",this.slideInterval);
}}}else{if(!this.isPaused){this.slideshowIDArray[this.slideshowIDCount++]=setTimeout("$lb.changeContent("+(this.contentNum+1)+")",this.slideInterval);}}this.doc.$("lbHoverNav").style.display=(this.ieVersion!=6&&this.showNavigation&&this.navTypeHash["Hover_by_type_"+this.navType]?"":"none");this.doc.$("lbCloseTop").style.display=(this.showClose&&this.navTop?"":"none");
this.doc.$("lbClose").style.display=(this.showClose&&!this.navTop?"":"none");this.doc.$("lbBottomData").style.display=(this.showDetails?"":"none");this.doc.$("lbPauseTop").style.display=(this.showPlayPause&&this.navTop?(!this.isPaused?"":"none"):"none");this.doc.$("lbPause").style.display=(this.showPlayPause&&!this.navTop?(!this.isPaused?"":"none"):"none");
this.doc.$("lbPlayTop").style.display=(this.showPlayPause&&this.navTop?(!this.isPaused?"none":""):"none");this.doc.$("lbPlay").style.display=(this.showPlayPause&&!this.navTop?(!this.isPaused?"none":""):"none");this.doc.$("lbPrevTop").style.display=(this.navTop&&this.showNavigation&&this.navTypeHash["Display_by_type_"+this.navType]?"":"none");
this.doc.$("lbPrev").style.display=(!this.navTop&&this.showNavigation&&this.navTypeHash["Display_by_type_"+this.navType]?"":"none");this.doc.$("lbNextTop").style.display=(this.navTop&&this.showNavigation&&this.navTypeHash["Display_by_type_"+this.navType]?"":"none");this.doc.$("lbNext").style.display=(!this.navTop&&this.showNavigation&&this.navTypeHash["Display_by_type_"+this.navType]?"":"none");
}else{this.doc.$("lbHoverNav").style.display=(this.ieVersion!=6&&this.navTypeHash["Hover_by_type_"+this.navType]&&!this.isLyteframe?"":"none");if((this.navTypeHash["Display_by_type_"+this.navType]&&!this.isLyteframe&&this.imageArray.length>1)||(this.frameArray.length>1&&this.isLyteframe)){this.doc.$("lbPrevTop").style.display=(this.navTop?"":"none");
this.doc.$("lbPrev").style.display=(!this.navTop?"":"none");this.doc.$("lbNextTop").style.display=(this.navTop?"":"none");this.doc.$("lbNext").style.display=(!this.navTop?"":"none");}else{this.doc.$("lbPrevTop").style.display="none";this.doc.$("lbPrev").style.display="none";this.doc.$("lbNextTop").style.display="none";
this.doc.$("lbNext").style.display="none";}this.doc.$("lbCloseTop").style.display=(this.navTop?"":"none");this.doc.$("lbClose").style.display=(!this.navTop?"":"none");this.doc.$("lbBottomData").style.display="";this.doc.$("lbPauseTop").style.display="none";this.doc.$("lbPause").style.display="none";this.doc.$("lbPlayTop").style.display="none";
this.doc.$("lbPlay").style.display="none";}this.doc.$("lbPrintTop").style.display=(this.showPrint&&this.navTop?"":"none");this.doc.$("lbPrint").style.display=(this.showPrint&&!this.navTop?"":"none");this.updateDetails();this.doc.$("lbLoading").style.display="none";this.doc.$("lbImageContainer").style.display=(this.isLyteframe?"none":"");
this.doc.$("lbIframeContainer").style.display=(this.isLyteframe?"":"none");if(this.isLyteframe){if(!this.isEmpty(this.frameSource)){this.doc.$("lbIframe").src=this.frameSource;}this.doc.$("lbIframe").style.display="";this.fadeIn({id:"lbIframe",opacity:(this.doAnimations&&(!this.ie||this.ieVersion>=9)?0:100)});
}else{this.doc.$("lbImage").style.display="";this.fadeIn({id:"lbImage",opacity:(this.doAnimations&&(!this.ie||this.ieVersion>=9)?0:100)});this.preloadNeighborImages();}if(!this.isEmpty(this.afterStart)){var a=window[this.afterStart];if(typeof a==="function"){a();}}};Lytebox.prototype.updateDetails=function(){var b=(this.isSlideshow?this.slideArray[this.contentNum][1]:(this.isLyteframe?this.frameArray[this.contentNum][1]:this.imageArray[this.contentNum][1]));
var g=(this.isSlideshow?this.slideArray[this.contentNum][2]:(this.isLyteframe?this.frameArray[this.contentNum][2]:this.imageArray[this.contentNum][2]));if(this.ie&&this.ieVersion<=7||(this.ieVersion>=8&&this.doc.compatMode=="BackCompat")){this.doc.$(this.titleTop?"lbTitleBottom":"lbTitleTop").style.display="none";
this.doc.$(this.titleTop?"lbTitleTop":"lbTitleBottom").style.display=(this.isEmpty(b)?"none":"block");}this.doc.$("lbDescBottom").style.display=(this.isEmpty(g)?"none":"");this.doc.$(this.titleTop?"lbTitleTop":"lbTitleBottom").innerHTML=(this.isEmpty(b)?"":b);this.doc.$(this.titleTop?"lbTitleBottom":"lbTitleTop").innerHTML="";
this.doc.$(this.titleTop?"lbNumBottom":"lbNumTop").innerHTML="";this.updateNav();if(this.titleTop||this.navTop){this.doc.$("lbTopContainer").style.display="block";this.doc.$("lbTopContainer").style.visibility="visible";}else{this.doc.$("lbTopContainer").style.display="none";}var f=(this.titleTop?this.doc.$("lbNumTop"):this.doc.$("lbNumBottom"));
if(this.isSlideshow&&this.slideArray.length>1){f.innerHTML=this.label["image"].replace("%1",this.contentNum+1).replace("%2",this.slideArray.length);}else{if(this.imageArray.length>1&&!this.isLyteframe){f.innerHTML=this.label["image"].replace("%1",this.contentNum+1).replace("%2",this.imageArray.length);
}else{if(this.frameArray.length>1&&this.isLyteframe){f.innerHTML=this.label["page"].replace("%1",this.contentNum+1).replace("%2",this.frameArray.length);}else{f.innerHTML="";}}}var h=!(this.titleTop||(this.isEmpty(b)&&this.isEmpty(f.innerHTML)));this.doc.$("lbDescBottom").innerHTML=(this.isEmpty(g)?"":(h?'<br style="line-height:0.6em;" />':"")+g);
var d=0;if(this.ie&&this.ieVersion<=7||(this.ieVersion>=8&&this.doc.compatMode=="BackCompat")){d=39+(this.showPrint?39:0)+(this.isSlideshow&&this.showPlayPause?39:0);if((this.isSlideshow&&this.slideArray.length>1&&this.showNavigation&&this.navType!=1)||(this.frameArray.length>1&&this.isLyteframe)||(this.imageArray.length>1&&!this.isLyteframe&&this.navType!=1)){d+=39*2;
}}this.doc.$("lbBottomContainer").style.display=(!(this.titleTop&&this.navTop)||!this.isEmpty(g)?"block":"none");if(this.titleTop&&this.navTop){if(d>0){this.doc.$("lbTopNav").style.width=d+"px";}this.doc.$("lbTopData").style.width=(this.doc.$("lbTopContainer").offsetWidth-this.doc.$("lbTopNav").offsetWidth-15)+"px";
if(!this.isEmpty(g)){this.doc.$("lbDescBottom").style.width=(this.doc.$("lbBottomContainer").offsetWidth-15)+"px";}}else{if((!this.titleTop||!this.isEmpty(g))&&!this.navTop){if(d>0){this.doc.$("lbBottomNav").style.width=d+"px";}if(this.ie&&this.ieVersion==8){this.doc.$("lbBottomData").style.width=(this.doc.$("lbBottomContainer").offsetWidth-this.doc.$("lbBottomNav").offsetWidth)+"px";
}else{this.doc.$("lbBottomData").style.width=(this.doc.$("lbBottomContainer").offsetWidth-this.doc.$("lbBottomNav").offsetWidth-15)+"px";}this.doc.$("lbDescBottom").style.width=this.doc.$("lbBottomData").style.width;}}this.fixBottomPadding();this.aPageSize=this.getPageSize();var c=parseInt(this.doc.$("lbMain").style.top);
if((this.ie&&this.ieVersion<=7)||(this.ieVersion>=8&&this.doc.compatMode=="BackCompat")){c=(this.ie?parseInt(this.doc.$("lbMain").style.top)-this.getPageScroll():parseInt(this.doc.$("lbMain").style.top));}var e=(this.doc.$("lbOuterContainer").offsetHeight+c)-this.aPageSize[3];var a=40;if(e>0&&this.autoResize&&this.fixedPosition){if(this.ie&&(this.ieVersion<=7||this.doc.compatMode=="BackCompat")){document.body.onscroll=this.bodyOnscroll;
if(window.removeEventListener){window.removeEventListener("scroll",this.scrollHandler);}else{if(window.detachEvent){window.detachEvent("onscroll",this.scrollHandler);}}}this.doc.$("lbMain").style.position="absolute";this.doc.$("lbMain").style.top=(this.getPageScroll()+(this.aPageSize[3]/a))+"px";}};Lytebox.prototype.updateNav=function(){if(this.isSlideshow){if(this.contentNum!=0){if(this.navTypeHash["Display_by_type_"+this.navType]&&this.showNavigation){this.doc.$(this.navTop?"lbPrevTop":"lbPrev").setAttribute(this.classAttribute,this.theme);
this.doc.$(this.navTop?"lbPrevTop":"lbPrev").style.display="";this.doc.$(this.navTop?"lbPrevTop":"lbPrev").onclick=function(){if($lb.pauseOnPrevClick){$lb.togglePlayPause($lb.navTop?"lbPauseTop":"lbPause",$lb.navTop?"lbPlayTop":"lbPlay");}$lb.changeContent($lb.contentNum-1);return false;};}if(this.navTypeHash["Hover_by_type_"+this.navType]){var a=this.doc.$("lbPrevHov");
a.style.display="";a.onclick=function(){if($lb.pauseOnPrevClick){$lb.togglePlayPause($lb.navTop?"lbPauseTop":"lbPause",$lb.navTop?"lbPlayTop":"lbPlay");}$lb.changeContent($lb.contentNum-1);return false;};}}else{if(this.navTypeHash["Display_by_type_"+this.navType]){this.doc.$(this.navTop?"lbPrevTop":"lbPrev").setAttribute(this.classAttribute,this.theme+"Off");
this.doc.$(this.navTop?"lbPrevTop":"lbPrev").onclick=function(){return false;};}}if(this.contentNum!=(this.slideArray.length-1)&&this.showNavigation){if(this.navTypeHash["Display_by_type_"+this.navType]){this.doc.$(this.navTop?"lbNextTop":"lbNext").setAttribute(this.classAttribute,this.theme);this.doc.$(this.navTop?"lbNextTop":"lbNext").style.display="";
this.doc.$(this.navTop?"lbNextTop":"lbNext").onclick=function(){if($lb.pauseOnNextClick){$lb.togglePlayPause($lb.navTop?"lbPauseTop":"lbPause",$lb.navTop?"lbPlayTop":"lbPlay");}$lb.changeContent($lb.contentNum+1);return false;};}if(this.navTypeHash["Hover_by_type_"+this.navType]){var a=this.doc.$("lbNextHov");
a.style.display="";a.onclick=function(){if($lb.pauseOnNextClick){$lb.togglePlayPause($lb.navTop?"lbPauseTop":"lbPause",$lb.navTop?"lbPlayTop":"lbPlay");}$lb.changeContent($lb.contentNum+1);return false;};}}else{if(this.navTypeHash["Display_by_type_"+this.navType]){this.doc.$(this.navTop?"lbNextTop":"lbNext").setAttribute(this.classAttribute,this.theme+"Off");
this.doc.$(this.navTop?"lbNextTop":"lbNext").onclick=function(){return false;};}}}else{if(this.isLyteframe){if(this.contentNum!=0){this.doc.$(this.navTop?"lbPrevTop":"lbPrev").setAttribute(this.classAttribute,this.theme);this.doc.$(this.navTop?"lbPrevTop":"lbPrev").style.display="";this.doc.$(this.navTop?"lbPrevTop":"lbPrev").onclick=function(){$lb.changeContent($lb.contentNum-1);
return false;};}else{this.doc.$(this.navTop?"lbPrevTop":"lbPrev").setAttribute(this.classAttribute,this.theme+"Off");this.doc.$(this.navTop?"lbPrevTop":"lbPrev").onclick=function(){return false;};}if(this.contentNum!=(this.frameArray.length-1)){this.doc.$(this.navTop?"lbNextTop":"lbNext").setAttribute(this.classAttribute,this.theme);
this.doc.$(this.navTop?"lbNextTop":"lbNext").style.display="";this.doc.$(this.navTop?"lbNextTop":"lbNext").onclick=function(){$lb.changeContent($lb.contentNum+1);return false;};}else{this.doc.$(this.navTop?"lbNextTop":"lbNext").setAttribute(this.classAttribute,this.theme+"Off");this.doc.$(this.navTop?"lbNextTop":"lbNext").onclick=function(){return false;
};}}else{if(this.contentNum!=0){if(this.navTypeHash["Display_by_type_"+this.navType]){this.doc.$(this.navTop?"lbPrevTop":"lbPrev").setAttribute(this.classAttribute,this.theme);this.doc.$(this.navTop?"lbPrevTop":"lbPrev").style.display="";this.doc.$(this.navTop?"lbPrevTop":"lbPrev").onclick=function(){$lb.changeContent($lb.contentNum-1);
return false;};}if(this.navTypeHash["Hover_by_type_"+this.navType]){var b=this.doc.$("lbPrevHov");b.style.display="";b.onclick=function(){$lb.changeContent($lb.contentNum-1);return false;};}}else{if(this.navTypeHash["Display_by_type_"+this.navType]){this.doc.$(this.navTop?"lbPrevTop":"lbPrev").setAttribute(this.classAttribute,this.theme+"Off");
this.doc.$(this.navTop?"lbPrevTop":"lbPrev").onclick=function(){return false;};}}if(this.contentNum!=(this.imageArray.length-1)){if(this.navTypeHash["Display_by_type_"+this.navType]){this.doc.$(this.navTop?"lbNextTop":"lbNext").setAttribute(this.classAttribute,this.theme);this.doc.$(this.navTop?"lbNextTop":"lbNext").style.display="";
this.doc.$(this.navTop?"lbNextTop":"lbNext").onclick=function(){$lb.changeContent($lb.contentNum+1);return false;};}if(this.navTypeHash["Hover_by_type_"+this.navType]){var b=this.doc.$("lbNextHov");b.style.display="";b.onclick=function(){$lb.changeContent($lb.contentNum+1);return false;};}}else{if(this.navTypeHash["Display_by_type_"+this.navType]){this.doc.$(this.navTop?"lbNextTop":"lbNext").setAttribute(this.classAttribute,this.theme+"Off");
this.doc.$(this.navTop?"lbNextTop":"lbNext").onclick=function(){return false;};}}}}this.enableKeyboardNav();};Lytebox.prototype.fixBottomPadding=function(){if(!((this.ieVersion==7||this.ieVersion==8||this.ieVersion==9)&&this.doc.compatMode=="BackCompat")&&this.ieVersion!=6){var b=this.doc.$("lbTopContainer").offsetHeight+5;
var a=(b==5?0:b)+this.doc.$("lbBottomContainer").offsetHeight;this.doc.$("lbOuterContainer").style.paddingBottom=(a+5)+"px";}};Lytebox.prototype.enableKeyboardNav=function(){document.onkeydown=this.keyboardAction;};Lytebox.prototype.disableKeyboardNav=function(){document.onkeydown="";};Lytebox.prototype.keyboardAction=function(b){var a=key=escape=null;
a=(b==null)?event.keyCode:b.which;key=String.fromCharCode(a).toLowerCase();escape=(b==null)?27:b.DOM_VK_ESCAPE;if((key=="x")||(key=="c")||(a==escape||a==27)){parent.$lb.end();}else{if(a==32&&$lb.isSlideshow&&$lb.showPlayPause){if($lb.isPaused){$lb.togglePlayPause($lb.navTop?"lbPlayTop":"lbPlay",$lb.navTop?"lbPauseTop":"lbPause");
}else{$lb.togglePlayPause($lb.navTop?"lbPauseTop":"lbPause",$lb.navTop?"lbPlayTop":"lbPlay");}return false;}else{if(key=="p"||a==37){if($lb.isSlideshow){if($lb.contentNum!=0){$lb.disableKeyboardNav();$lb.changeContent($lb.contentNum-1);}}else{if($lb.isLyteframe){if($lb.contentNum!=0){$lb.disableKeyboardNav();
$lb.changeContent($lb.contentNum-1);}}else{if($lb.contentNum!=0){$lb.disableKeyboardNav();$lb.changeContent($lb.contentNum-1);}}}}else{if(key=="n"||a==39){if($lb.isSlideshow){if($lb.contentNum!=($lb.slideArray.length-1)){$lb.disableKeyboardNav();$lb.changeContent($lb.contentNum+1);}}else{if($lb.isLyteframe){if($lb.contentNum!=($lb.frameArray.length-1)){$lb.disableKeyboardNav();
$lb.changeContent($lb.contentNum+1);}}else{if($lb.contentNum!=($lb.imageArray.length-1)){$lb.disableKeyboardNav();$lb.changeContent($lb.contentNum+1);}}}}}}}};Lytebox.prototype.preloadNeighborImages=function(){if(this.isSlideshow){if((this.slideArray.length-1)>this.contentNum){var a=new Image();a.src=this.slideArray[this.contentNum+1][0];
}if(this.contentNum>0){var b=new Image();b.src=this.slideArray[this.contentNum-1][0];}}else{if((this.imageArray.length-1)>this.contentNum){var a=new Image();a.src=this.imageArray[this.contentNum+1][0];}if(this.contentNum>0){var b=new Image();b.src=this.imageArray[this.contentNum-1][0];}}};Lytebox.prototype.togglePlayPause=function(c,b){if(this.isSlideshow&&(c=="lbPauseTop"||c=="lbPause")){for(var a=0;
a<this.slideshowIDCount;a++){window.clearTimeout(this.slideshowIDArray[a]);}}this.doc.$(c).style.display="none";this.doc.$(b).style.display="";if(c=="lbPlayTop"||c=="lbPlay"){this.isPaused=false;if(this.contentNum==(this.slideArray.length-1)){if(this.loopSlideshow){this.changeContent(0);}else{if(this.autoEnd){this.end();
}}}else{this.changeContent(this.contentNum+1);}}else{this.isPaused=true;}};Lytebox.prototype.end=function(f){var e=(f=="slideshow"?false:true);if(this.isSlideshow&&this.isPaused&&!e){return;}if(!this.isEmpty(this.beforeEnd)){var h=window[this.beforeEnd];if(typeof h==="function"){if(!h()){return;}}}this.disableKeyboardNav();
document.body.onscroll=this.bodyOnscroll;if(this.refreshPage){var g=top.location.href;var d=/\#.*$/g;g=g.replace(d,"");top.location.href=g;return;}this.doc.$("lbMain").style.display="none";this.fadeOut({id:"lbOverlay",opacity:(this.doAnimations&&this.animateOverlay&&(!this.ie||this.ieVersion>=9)?this.maxOpacity:0),speed:5,display:"none"});
this.toggleSelects("visible");if(this.hideObjects){this.toggleObjects("visible");}this.doc.$("lbOuterContainer").style.width="200px";this.doc.$("lbOuterContainer").style.height="200px";if(this.inline&&this.safari){var c=this.doc.$("lbIframe");var a=c.contentWindow||c.contentDocument;if(a.document){a=a.document;
}a.open();a.write("<html><head></head><body></body></html>");a.close();}if(this.isSlideshow){for(var b=0;b<this.slideshowIDCount;b++){window.clearTimeout(this.slideshowIDArray[b]);}this.isPaused=false;}if(!this.isEmpty(this.afterEnd)){var h=window[this.afterEnd];if(typeof h==="function"){h();}}};Lytebox.prototype.checkFrame=function(){if(window.parent.frames[window.name]&&(parent.document.getElementsByTagName("frameset").length<=0)&&window.name!="lbIframe"){this.isFrame=true;
this.doc=parent.document;}else{this.isFrame=false;this.doc=document;}this.doc.$=this.doc.getElementById;};Lytebox.prototype.getPixelRate=function(c,b){var a=(b>c)?b-c:c-b;if(a>=0&&a<=100){return(100/this.resizeDuration);}if(a>100&&a<=200){return(150/this.resizeDuration);}if(a>200&&a<=300){return(200/this.resizeDuration);
}if(a>300&&a<=400){return(250/this.resizeDuration);}if(a>400&&a<=500){return(300/this.resizeDuration);}if(a>500&&a<=600){return(350/this.resizeDuration);}if(a>600&&a<=700){return(400/this.resizeDuration);}if(a>700){return(450/this.resizeDuration);}};Lytebox.prototype.fadeIn=function(k){var d=this.isEmpty(k.id)?"":k.id;
var c=(this.isEmpty(k.speed)?5:(parseInt(k.speed)>5?5:parseInt(k.speed)));c=isNaN(c)?5:c;var f=this.isEmpty(k.opacity)?0:parseInt(k.opacity);f=isNaN(f)?0:f;var j=this.isEmpty(k.display)?"":k.display;var l=this.isEmpty(k.visibility)?"":k.visibility;var b=this.doc.$(d);var a=c;if(/lbImage|lbIframe|lbOverlay|lbBottomContainer|lbTopContainer/.test(d)){a=this.ff?(this.ffVersion>=6?2:5):(this.safari?3:(this.ieVersion<=8?10:5));
a=(d=="lbOverlay"?a*2:a);a=(d=="lbIframe"?100:a);}else{if(this.ieVersion==7||this.ieVersion==8){a=10;}}b.style.opacity=(f/100);b.style.filter="alpha(opacity="+(f)+")";if(f>=100&&(d=="lbImage"||d=="lbIframe")){try{b.style.removeAttribute("filter");}catch(h){}this.fixBottomPadding();}else{if(f>=this.maxOpacity&&d=="lbOverlay"){for(var g=0;
g<this.overlayTimerCount;g++){window.clearTimeout(this.overlayTimerArray[g]);}this.overlayLoaded=true;return;}else{if(f>=100&&(d=="lbBottomContainer"||d=="lbTopContainer")){try{b.style.removeAttribute("filter");}catch(h){}for(var g=0;g<this.imageTimerCount;g++){window.clearTimeout(this.imageTimerArray[g]);
}this.doc.$("lbOverlay").style.height=this.aPageSize[1]+"px";}else{if(f>=100){for(var g=0;g<this.imageTimerCount;g++){window.clearTimeout(this.imageTimerArray[g]);}}else{if(d=="lbOverlay"){this.overlayTimerArray[this.overlayTimerCount++]=setTimeout("$lb.fadeIn({ id: '"+d+"', opacity: "+(f+a)+", speed: "+c+" })",1);
}else{this.imageTimerArray[this.imageTimerCount++]=setTimeout("$lb.fadeIn({ id: '"+d+"', opacity: "+(f+a)+", speed: "+c+" })",1);}}}}}};Lytebox.prototype.fadeOut=function(h){var c=this.isEmpty(h.id)?"":h.id;var b=(this.isEmpty(h.speed)?5:(parseInt(h.speed)>5?5:parseInt(h.speed)));b=isNaN(b)?5:b;var e=this.isEmpty(h.opacity)?100:parseInt(h.opacity);
e=isNaN(e)?100:e;var g=this.isEmpty(h.display)?"":h.display;var j=this.isEmpty(h.visibility)?"":h.visibility;var a=this.doc.$(c);if(this.ieVersion==7||this.ieVersion==8){b*=2;}a.style.opacity=(e/100);a.style.filter="alpha(opacity="+e+")";if(e<=0){try{if(!this.isEmpty(g)){a.style.display=g;}if(!this.isEmpty(j)){a.style.visibility=j;
}}catch(d){}if(c=="lbOverlay"){this.overlayLoaded=false;if(this.isLyteframe){this.doc.$("lbIframe").src="about:blank";this.initialize();}}else{for(var f=0;f<this.timerIDCount;f++){window.clearTimeout(this.timerIDArray[f]);}}}else{if(c=="lbOverlay"){this.overlayTimerArray[this.overlayTimerCount++]=setTimeout("$lb.fadeOut({ id: '"+c+"', opacity: "+(e-(b*2))+", speed: "+b+", display: '"+g+"', visibility: '"+j+"' })",1);
}else{this.timerIDArray[this.timerIDCount++]=setTimeout("$lb.fadeOut({ id: '"+c+"', opacity: "+(e-b)+", speed: "+b+", display: '"+g+"', visibility: '"+j+"' })",1);}}};Lytebox.prototype.resizeW=function(c,e,g,a,f){var b=this.doc.$(c);var h=(this.doAnimations?e:g);b.style.width=(h)+"px";if(h<g){h+=(h+a>=g)?(g-h):a;
}else{if(h>g){h-=(h-a<=g)?(h-g):a;}}this.resizeWTimerArray[this.resizeWTimerCount++]=setTimeout("$lb.resizeW('"+c+"', "+h+", "+g+", "+a+", "+(f)+")",f);if(parseInt(b.style.width)==g){this.wDone=true;for(var d=0;d<this.resizeWTimerCount;d++){window.clearTimeout(this.resizeWTimerArray[d]);}if(this.isLyteframe){this.loadContent();
}else{this.showContent();}}};Lytebox.prototype.resizeH=function(f,a,c,b,h){var e=this.doc.$(f);var d=(this.doAnimations?a:c);e.style.height=(d)+"px";if(d<c){d+=(d+b>=c)?(c-d):b;}else{if(d>c){d-=(d-b<=c)?(d-c):b;}}this.resizeHTimerArray[this.resizeHTimerCount++]=setTimeout("$lb.resizeH('"+f+"', "+d+", "+c+", "+b+", "+(h+0.02)+")",h+0.02);
if(parseInt(e.style.height)==c){this.hDone=true;for(var g=0;g<this.resizeHTimerCount;g++){window.clearTimeout(this.resizeHTimerArray[g]);}this.resizeW("lbOuterContainer",this.wCur,this.resizeWidth+this.borderSize*2,this.getPixelRate(this.wCur,this.resizeWidth));}};Lytebox.prototype.getPageScroll=function(){if(self.pageYOffset){return this.isFrame?parent.pageYOffset:self.pageYOffset;
}else{if(this.doc.documentElement&&this.doc.documentElement.scrollTop){return this.doc.documentElement.scrollTop;}else{if(document.body){return this.doc.body.scrollTop;}}}};Lytebox.prototype.getPageSize=function(){var e,a,c,f;if(window.innerHeight&&window.scrollMaxY){e=this.doc.scrollWidth;a=(this.isFrame?parent.innerHeight:self.innerHeight)+(this.isFrame?parent.scrollMaxY:self.scrollMaxY);
}else{if(this.doc.body.scrollHeight>this.doc.body.offsetHeight){e=this.doc.body.scrollWidth;a=this.doc.body.scrollHeight;}else{e=this.doc.getElementsByTagName("html").item(0).offsetWidth;a=this.doc.getElementsByTagName("html").item(0).offsetHeight;e=(e<this.doc.body.offsetWidth)?this.doc.body.offsetWidth:e;
a=(a<this.doc.body.offsetHeight)?this.doc.body.offsetHeight:a;}}if(self.innerHeight){c=(this.isFrame)?parent.innerWidth:self.innerWidth;f=(this.isFrame)?parent.innerHeight:self.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){c=this.doc.documentElement.clientWidth;
f=this.doc.documentElement.clientHeight;}else{if(document.body){c=this.doc.getElementsByTagName("html").item(0).clientWidth;f=this.doc.getElementsByTagName("html").item(0).clientHeight;c=(c==0)?this.doc.body.clientWidth:c;f=(f==0)?this.doc.body.clientHeight:f;}}}var d=(a<f)?f:a;var b=(e<c)?c:e;return new Array(b,d,c,f);
};Lytebox.prototype.toggleObjects=function(g){var d=this.doc.getElementsByTagName("object");for(var b=0;b<d.length;b++){d[b].style.visibility=(g=="hide")?"hidden":"visible";}var c=this.doc.getElementsByTagName("embed");for(var b=0;b<c.length;b++){c[b].style.visibility=(g=="hide")?"hidden":"visible";}if(this.isFrame){for(var b=0;
b<parent.frames.length;b++){try{d=parent.frames[b].window.document.getElementsByTagName("object");for(var a=0;a<d.length;a++){d[a].style.visibility=(g=="hide")?"hidden":"visible";}}catch(f){}try{c=parent.frames[b].window.document.getElementsByTagName("embed");for(var a=0;a<c.length;a++){c[a].style.visibility=(g=="hide")?"hidden":"visible";
}}catch(f){}}}};Lytebox.prototype.toggleSelects=function(f){var c=this.doc.getElementsByTagName("select");for(var b=0;b<c.length;b++){c[b].style.visibility=(f=="hide")?"hidden":"visible";}if(this.isFrame){for(var b=0;b<parent.frames.length;b++){try{c=parent.frames[b].window.document.getElementsByTagName("select");
for(var a=0;a<c.length;a++){c[a].style.visibility=(f=="hide")?"hidden":"visible";}}catch(d){}}}};Lytebox.prototype.pause=function(a){var b=new Date();var c=b.getTime()+a;while(true){b=new Date();if(b.getTime()>c){return;}}};Lytebox.prototype.combine=function(b,a){var d=[];for(var c=0;c<b.length;c++){d.push(b[c]);
}for(var c=0;c<a.length;c++){d.push(a[c]);}return d;};Lytebox.prototype.removeDuplicates=function(d){var c=new Array();o:for(var b=0,f=d.length;b<f;b++){for(var a=0,e=c.length;a<e;a++){if(c[a][0].toLowerCase()==d[b][0].toLowerCase()){continue o;}}c[c.length]=d[b];}return c;};Lytebox.prototype.printWindow=function(){var k=400;
var f=300;var e=parseInt((screen.availWidth/2)-(k/2));var j=parseInt((screen.availHeight/2)-(f/2));var a="width="+k+",height="+f+",left="+e+",top="+j+"screenX="+e+",screenY="+j+"directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0";var g=new Date();var b="Print"+g.getTime();
var c=document.getElementById(this.printId).src;this.wContent=window.open(c,b,a);this.wContent.focus();var l=setTimeout("$lb.printContent()",1000);};Lytebox.prototype.printContent=function(){if(this.wContent.document.readyState=="complete"){this.wContent.print();this.wContent.close();this.wContent=null;
}else{var a=setTimeout("$lb.printContent()",1000);}};Lytebox.prototype.setOptions=function(b){this.group="";this.inline=false;this.hideObjects=this.__hideObjects;this.autoResize=this.__autoResize;this.doAnimations=this.__doAnimations;this.animateOverlay=this.__animateOverlay;this.forceCloseClick=this.__forceCloseClick;
this.refreshPage=this.__refreshPage;this.showPrint=this.__showPrint;this.navType=this.__navType;this.titleTop=this.__titleTop;this.navTop=this.__navTop;this.beforeStart=this.__beforeStart;this.afterStart=this.__afterStart;this.beforeEnd=this.__beforeEnd;this.afterEnd=this.__afterEnd;this.scrolling=this.__scrolling;
this.width=this.__width;this.height=this.__height;this.loopPlayback=this.__loopPlayback;this.autoPlay=this.__autoPlay;this.autoEmbed=this.__autoEmbed;this.slideInterval=this.__slideInterval;this.showNavigation=this.__showNavigation;this.showClose=this.__showClose;this.showDetails=this.__showDetails;this.showPlayPause=this.__showPlayPause;
this.autoEnd=this.__autoEnd;this.pauseOnNextClick=this.__pauseOnNextClick;this.pauseOnPrevClick=this.__pauseOnPrevClick;this.loopSlideshow=this.__loopSlideshow;var e=sValue="";var a=null;var d=b.split(" ");for(var c=0;c<d.length;c++){a=d[c].split(":");e=(a.length>1?this.trim(a[0]).toLowerCase():"");sValue=(a.length>1?this.trim(a[1]):"");
switch(e){case"group":this.group=(e=="group"?(!this.isEmpty(sValue)?sValue.toLowerCase():""):"");break;case"hideobjects":this.hideObjects=(/true|false/.test(sValue)?(sValue=="true"):this.__hideObjects);break;case"autoresize":this.autoResize=(/true|false/.test(sValue)?(sValue=="true"):this.__autoResize);
break;case"doanimations":this.doAnimations=(/true|false/.test(sValue)?(sValue=="true"):this.__doAnimations);break;case"animateoverlay":this.animateOverlay=(/true|false/.test(sValue)?(sValue=="true"):this.__animateOverlay);break;case"forcecloseclick":this.forceCloseClick=(/true|false/.test(sValue)?(sValue=="true"):this.__forceCloseClick);
break;case"refreshpage":this.refreshPage=(/true|false/.test(sValue)?(sValue=="true"):this.__refreshPage);break;case"showprint":this.showPrint=(/true|false/.test(sValue)?(sValue=="true"):this.__showPrint);break;case"navtype":this.navType=(/[1-3]{1}/.test(sValue)?parseInt(sValue):this.__navType);break;
case"titletop":this.titleTop=(/true|false/.test(sValue)?(sValue=="true"):this.__titleTop);break;case"navtop":this.navTop=(/true|false/.test(sValue)?(sValue=="true"):this.__navTop);break;case"beforestart":this.beforeStart=(!this.isEmpty(sValue)?sValue:this.__beforeStart);break;case"afterstart":this.afterStart=(!this.isEmpty(sValue)?sValue:this.__afterStart);
break;case"beforeend":this.beforeEnd=(!this.isEmpty(sValue)?sValue:this.__beforeEnd);break;case"afterend":this.afterEnd=(!this.isEmpty(sValue)?sValue:this.__afterEnd);break;case"scrollbars":this.scrolling=(/auto|yes|no/.test(sValue)?sValue:this.__scrolling);break;case"scrolling":this.scrolling=(/auto|yes|no/.test(sValue)?sValue:this.__scrolling);
break;case"width":this.width=(/\d(%|px|)/.test(sValue)?sValue:this.__width);break;case"height":this.height=(/\d(%|px|)/.test(sValue)?sValue:this.__height);break;case"loopplayback":this.loopPlayback=(/true|false/.test(sValue)?(sValue=="true"):this.__loopPlayback);break;case"autoplay":this.autoPlay=(/true|false/.test(sValue)?(sValue=="true"):this.__autoPlay);
break;case"autoembed":this.autoEmbed=(/true|false/.test(sValue)?(sValue=="true"):this.__autoEmbed);break;case"inline":this.inline=(/true|false/.test(sValue)?(sValue=="true"):false);case"slideinterval":this.slideInterval=(/\d/.test(sValue)?parseInt(sValue):this.__slideInterval);break;case"shownavigation":this.showNavigation=(/true|false/.test(sValue)?(sValue=="true"):this.__showNavigation);
break;case"showclose":this.showClose=(/true|false/.test(sValue)?(sValue=="true"):this.__showClose);break;case"showdetails":this.showDetails=(/true|false/.test(sValue)?(sValue=="true"):this.__showDetails);break;case"showplaypause":this.showPlayPause=(/true|false/.test(sValue)?(sValue=="true"):this.__showPlayPause);
break;case"autoend":this.autoEnd=(/true|false/.test(sValue)?(sValue=="true"):this.__autoEnd);break;case"pauseonnextclick":this.pauseOnNextClick=(/true|false/.test(sValue)?(sValue=="true"):this.__pauseOnNextClick);break;case"pauseonprevclick":this.pauseOnPrevClick=(/true|false/.test(sValue)?(sValue=="true"):this.__pauseOnPrevClick);
break;case"loopslideshow":this.loopSlideshow=(/true|false/.test(sValue)?(sValue=="true"):this.__loopSlideshow);break;}}};Lytebox.prototype.buildObject=function(j,f,a,b){var c="";var g="";var d="";var k="";var l=this.autoPlay?"true":"false";var e=this.loopPlayback?"true":"false";switch(b){case"mov":d="http://www.apple.com/qtactivex/qtplugin.cab";
k="http://www.apple.com/quicktime/";g="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";c='<object classid="'+g+'" width="'+j+'" height="'+f+'" codebase="'+d+'">'+'<param name="src" value="'+a+'">'+'<param name="autoplay" value="'+l+'">'+'<param name="loop" value="'+e+'">'+'<param name="controller" value="true">'+'<embed src="'+a+'" width="'+j+'" height="'+f+'" autoplay="'+l+'" loop="'+e+'" controller="true" pluginspage="'+k+'"></embed>'+"</object>";
if(this.getQuicktimeVersion()<=0){c='<div style="padding:1em;">'+"<h2>QUICKTIME PLAYER</h2>"+"<p>Content on this page requires a newer version of QuickTime. Please click the image link below to download and install the latest version.</p>"+'<p><a href="http://www.apple.com/quicktime/" target="_blank"><img src="http://images.apple.com/about/webbadges/images/qt7badge_getQTfreeDownload.gif" alt="Get QuickTime" border="0" /></a></p>'+"</div>";
}break;case"avi":case"mpg":case"mpeg":case"wmv":g="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";c='<object classid="'+g+'" width="'+j+'" height="'+f+'" codebase="'+d+'">'+'<param name="src" value="'+a+'">'+'<param name="autoplay" value="'+l+'">'+'<param name="loop" value="'+e+'">'+'<param name="controller" value="true">'+'<object type="video/quicktime" data="'+a+'" width="'+j+'" height="'+f+'">'+'<param name="controller" value="false">'+'<param name="autoplay" value="'+l+'">'+'<param name="loop" value="'+e+'">'+"</object>"+"</object>";
break;case"swf":g="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";c='<object classid="'+g+'" width="'+j+'" height="'+f+'" codebase="'+d+'">'+'<param name="movie" value="'+a+'">'+'<param name="quality" value="high">'+'<param name="wmode" value="opaque">'+"<!--[if !IE]>-->"+'<object type="application/x-shockwave-flash" data="'+a+'" width="'+j+'" height="'+f+'">'+"<!--<![endif]-->"+'<param name="quality" value="high">'+'<param name="wmode" value="opaque">'+'<div style="padding:1em;">'+"<h2>FLASH PLAYER</h2>"+"<p>Content on this page requires a newer version of Adobe Flash Player. Please click the image link below to download and install the latest version.</p>"+'<p><a href="http://www.adobe.com/go/getflashplayer" target="_blank"><img src="http://www.adobe.com/macromedia/style_guide/images/160x41_Get_Flash_Player.jpg" alt="Get Adobe Flash player" border="0" /></a></p>'+"</div>"+"<!--[if !IE]>-->"+"</object>"+"<!--<![endif]-->"+"</object>";
break;}return c;};Lytebox.prototype.getQuicktimeVersion=function(){var b=navigator.userAgent.toLowerCase();var a=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){for(i=0;i<navigator.plugins.length;i++){var c=navigator.plugins[i];if(c.name.indexOf("QuickTime")>-1){a=parseFloat(c.name.substring(18));
}}}else{if(this.autoEmbed&&b.indexOf("msie")!=-1&&parseInt(navigator.appVersion)>=4&&b.indexOf("win")!=-1&&b.indexOf("16bit")==-1){var f=null;try{f=new ActiveXObject("QuickTime.QuickTime");}catch(d){}if(f){isInstalled=true;}try{f=new ActiveXObject("QuickTimeCheckObject.QuickTimeCheck");}catch(d){return;
}if(f){isInstalled=true;a=f.QuickTimeVersion.toString(16);a=a.substring(0,1)+"."+a.substring(1,3);a=parseInt(a);}}}return a;};Lytebox.prototype.findPos=function(b){if(this.ie&&this.doc.compatMode=="BackCompat"){return[0,16,12];}var d=0;var c=0;var a=0;a=b.offsetHeight+6;if(b.offsetParent){do{d+=b.offsetLeft;
c+=b.offsetTop;}while(b=b.offsetParent);}return[d,c,a];};Lytebox.prototype.isMobile=function(){var a=navigator.userAgent;return(a.match(/ipad/i)!=null)||(a.match(/ipod/i)!=null)||(a.match(/iphone/i)!=null)||(a.match(/android/i)!=null)||(a.match(/opera mini/i)!=null)||(a.match(/blackberry/i)!=null)||(a.match(/(pre\/|palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine)/i)!=null)||(a.match(/(iris|3g_t|windows ce|opera mobi|windows ce; smartphone;|windows ce; iemobile)/i)!=null)||(a.match(/(mini 9.5|vx1000|lge |m800|e860|u940|ux840|compal|wireless| mobi|ahong|lg380|lgku|lgu900|lg210|lg47|lg920|lg840|lg370|sam-r|mg50|s55|g83|t66|vx400|mk99|d615|d763|el370|sl900|mp500|samu3|samu4|vx10|xda_|samu5|samu6|samu7|samu9|a615|b832|m881|s920|n210|s700|c-810|_h797|mob-x|sk16d|848b|mowser|s580|r800|471x|v120|rim8|c500foma:|160x|x160|480x|x640|t503|w839|i250|sprint|w398samr810|m5252|c7100|mt126|x225|s5330|s820|htil-g1|fly v71|s302|-x113|novarra|k610i|-three|8325rc|8352rc|sanyo|vx54|c888|nx250|n120|mtk |c5588|s710|t880|c5005|i;458x|p404i|s210|c5100|teleca|s940|c500|s590|foma|samsu|vx8|vx9|a1000|_mms|myx|a700|gu1100|bc831|e300|ems100|me701|me702m-three|sd588|s800|8325rc|ac831|mw200|brew |d88|htc\/|htc_touch|355x|m50|km100|d736|p-9521|telco|sl74|ktouch|m4u\/|me702|8325rc|kddi|phone|lg |sonyericsson|samsung|240x|x320|vx10|nokia|sony cmd|motorola|up.browser|up.link|mmp|symbian|smartphone|midp|wap|vodafone|o2|pocket|kindle|mobile|psp|treo)/i)!=null);
};Lytebox.prototype.validate=function(k){var d=sName="";var p=false;var e=this.isEmpty(k.id)?(this.isEmpty(k.element)?null:k.element):document.getElementById(k.id);var n=this.isEmpty(k.value)?"":String(k.value);var b=this.isEmpty(k.type)?"":String(k.type).toLowerCase();var m=this.isEmpty(k.regex)?"":k.regex;
var c=(/visa|mc|amex|diners|discover|jcb/.test(k.ccType)?k.ccType:"");var a=(/^\d+$/.test(k.min)?parseInt(k.min):0);var h=(/^\d+$/.test(k.max)?parseInt(k.max):0);var f=k.inclusive?true:(/true|false/.test(k.inclusive)?(k.inclusive=="true"):true);var q=k.allowComma?true:(/true|false/.test(k.allowComma)?(k.allowComma=="true"):true);
var j=k.allowWhiteSpace?true:(/true|false/.test(k.allowWhiteSpace)?(k.allowWhiteSpace=="true"):true);if((this.isEmpty(n)&&this.isEmpty(e))||(this.isEmpty(b)&&this.isEmpty(m))){return false;}var n=this.isEmpty(n)?e.value:n;if(!this.isEmpty(m)){p=m.test(n);}else{switch(b){case"alnum":p=(j?/^[a-z0-9\s]+$/i.test(n):/^[a-z0-9]+$/i.test(n));
break;case"alpha":p=(j?/^[a-z\s]+$/i.test(n):/^[a-z]+$/i.test(n));break;case"between":var l=q?parseInt(n.replace(/\,/g,"")):parseInt(n);p=(f?(l>=a&&l<=h):(l>a&&l<h));break;case"ccnum":if(this.isEmpty(c)){p=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/.test(n);
break;}else{switch(c){case"visa":p=/^4[0-9]{12}(?:[0-9]{3})?$/.test(n);break;case"mc":p=/^5[1-5][0-9]{14}$/.test(n);break;case"amex":p=/^3[47][0-9]{13}$/.test(n);break;case"diners":p=/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/.test(n);break;case"discover":p=/^6(?:011|5[0-9]{2})[0-9]{12}$/.test(n);break;case"jcb":p=/^(?:2131|1800|35\d{3})\d{11}$/.test(n);
break;default:p=false;}}case"date":var g=new Date(n);p=!(g.toString()=="NaN"||g.toString()=="Invalid Date");break;case"digits":p=/^\d+$/.test(n);break;case"email":p=/^([a-z0-9_\.\-])+\@(([a-z0-9\-])+\.)+([a-z0-9]{2,4})+$/i.test(n);break;case"float":p=/^[-+]?[0-9]*\.?[0-9]+$/.test(q?n.replace(/\,/g,""):n);
break;case"int":case"integer":p=/^[-+]?\d+$/.test(n.replace(/\,/g,""));break;case"len":case"length":p=(a==h)?(n.length==a):(n.length>=a&&n.length<=h);break;case"phone":p=/^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/.test(n);break;case"notempty":p=!this.isEmpty(n);break;case"ssn":p=/^[0-9]{3}\-?[0-9]{2}\-?[0-9]{4}$/.test(n);
break;case"url":p=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»""'']))/i.test(n);break;case"zip":p=/^\d{5}$|^\d{5}-\d{4}$/.test(n);break;}}return p;
};Lytebox.prototype.ajax=function(e){var f=this.http.length;var g=this.getRequestObject();this.http[f]=g;var d=e;d.index=f;d.method=!(/get|post/i.test(d.method))?"get":d.method;d.cache=!(/true|false/.test(d.cache))?true:(d.cache=="true"||d.cache);if(!this.isEmpty(d.timeout)&&(/^\d+$/.test(d.timeout))){d.timerId=setTimeout("$lb.http["+f+"].abort()",d.timeout);
}g.onreadystatechange=function(){return function(){if(g.readyState==4&&g.status==200){var j=g.responseText;if(document.getElementById(d.updateId)){document.getElementById(d.updateId).innerHTML=j;}if(typeof d.success==="function"){d.success(j);}window.clearTimeout(d.timerId);$lb.http[d.index]=null;}else{if(g.readyState==4&&g.status!=200){if(typeof d.fail==="function"){d.fail(g.responseText);
}window.clearTimeout(d.timerId);$lb.http[d.index]=null;}}}(g,d);};if(d.method.toLowerCase()=="post"){var h=document.getElementById(d.form);var b=!(/true|false/.test(e.stripTags))?false:(e.stripTags=="true"||e.stripTags);var c=(h==null?this.serialize({name:d.form,stripTags:b}):this.serialize({element:h,stripTags:b}));
var a=(!d.cache?((/\&/.test(c))?"&":"")+new Date().getTime():"");g.open("post",d.url,true);g.setRequestHeader("Content-type","application/x-www-form-urlencoded");g.send(c+a);}else{var a=(!d.cache?((/\?/.test(d.url))?"&":"?")+new Date().getTime():"");g.open("get",d.url+a,true);g.send();}};Lytebox.prototype.serialize=function(d){var b=sValue="";
var a=!(/true|false/.test(d.stripTags))?false:(d.stripTags=="true"||d.stripTags);var f=this.isEmpty(d.id)?(this.isEmpty(d.element)?null:d.element):document.getElementById(d.id);if(f==null){for(var e=0;e<document.forms.length;e++){if(document.forms[e].name==d.name){f=document.forms[e].elements;}}}for(var e=0;
e<f.length;e++){if((f[e].type=="checkbox"&&!f[e].checked)||(f[e].type=="radio"&&!f[e].checked)||(f[e].disabled)||(f[e].name=="")||(f[e].type=="reset")){continue;}if(f[e].type=="select-multiple"){for(var c=0;c<f[e].options.length;c++){if(f[e].options[c].selected==true){b+=(b==""?"":"&")+f[e].name+"="+encodeURIComponent(f[e].options[c].value);
}}}else{sValue=a?this.stripTags({value:f[e].value}):f[e].value;b+=(b==""?"":"&")+f[e].name+"="+encodeURIComponent(sValue);}}return b;};Lytebox.prototype.getRequestObject=function(){var b=null;if(window.XMLHttpRequest){try{b=new XMLHttpRequest();}catch(a){}}else{if(typeof ActiveXObject!="undefined"){try{b=new ActiveXObject("Msxml2.XMLHTTP");
}catch(a){try{b=new ActiveXObject("Microsoft.XMLHTTP");}catch(a){}}}}return b;};Lytebox.prototype.isEmpty=function(a){var c="";try{c=this.isEmpty(a.value)?a:a.value;}catch(b){c=a;}return(this.trim(c)==""||c=="null"||c==null||typeof(c)=="undefined");};Lytebox.prototype.stripTags=function(a){var b=this.isEmpty(a.id)?(this.isEmpty(a.element)?null:a.element):document.getElementById(a.id);
if(!this.isEmpty(b)){b.value=String(b.value).replace(/(<([^>]+)>)/ig,"");}else{var d="";try{d=this.isEmpty(a.value)?a:a.value;}catch(c){d=a;}return String(d).replace(/(<([^>]+)>)/ig,"");}};Lytebox.prototype.trim=function(a){var c="";try{c=this.isEmpty(a.value)?a:a.value;}catch(b){c=a;}return String(c).replace(/^\s+|\s+$/g,"");
};Lytebox.prototype.capitalize=function(a){return String(a.value?a.value:a).replace(/(^|\s)([a-z])/g,function(b,d,c){return d+c.toUpperCase();});};Lytebox.prototype.hasClass=function(a){var c=this.isEmpty(a.name)?"":a.name;var b=this.isEmpty(a.id)?(this.isEmpty(a.element)?null:a.element):document.getElementById(a.id);
return new RegExp("(\\s|^)"+c+"(\\s|$)").test(b.className);};Lytebox.prototype.addClass=function(a){var e=this.isEmpty(a.name)?"":a.name;var c=this.isEmpty(a.id)?(this.isEmpty(a.element)?null:a.element):document.getElementById(a.id);var d=e.split(" ");for(var b=0;b<d.length;b++){if(!this.hasClass({element:c,name:d[b]})){c.className+=" "+d[b];
}}};Lytebox.prototype.removeClass=function(a){var e=this.isEmpty(a.name)?"":a.name;var c=this.isEmpty(a.id)?(this.isEmpty(a.element)?null:a.element):document.getElementById(a.id);var d=e.split(" ");for(var b=0;b<d.length;b++){if(this.hasClass({element:c,name:d[b]})){c.className=c.className.replace(new RegExp("(\\s|^)"+d[b]+"(\\s|$)")," ").replace(/\s+/g," ").replace(/^\s|\s$/,"");
}}};if(window.addEventListener){window.addEventListener("load",initLytebox,false);}else{if(window.attachEvent){window.attachEvent("onload",initLytebox);}else{window.onload=function(){initLytebox();};}}function initLytebox(){myLytebox=$lb=new Lytebox(true,$lb.http);}myLytebox=$lb=new Lytebox(false);
