Imj={version:"0.9a1",root:"http://imajico.com/imajico/",png:"html",gif:"html",imj:null};Imj.Imajico=function(){this.settings=[{id:"albums",dflt:"",title:"Album List",desc:"List of albums to display, e.g. picasa:mr.mike.meaney"},{id:"startingAlbum",dflt:null,title:"Starting Album",desc:"The id of the album to display first, e.g. picasa:mr.mike.meaney/TasmaniaPhotos"},{id:"startingPhoto",dflt:1,title:"Starting Photo",desc:"The number of the photo to display first in the starting album"},{id:"theme",dflt:"orange",values:["blue","grey","orange","smallorange"],title:"Theme",desc:"Display theme for Imajico"},{id:"defaultFit",dflt:"window/center",title:"Default Fit",desc:"Determines how a photo should be fitted within the display"},{id:"defaultFx",dflt:"fade",title:"Default FX",desc:"The default 'fx' used to transition from one photo to the next in a slideshow. A value of 'auto' chooses a transition suited to the size/orientation of the photo."},{id:"overridePhotoFx",dflt:false,title:"Override Photo FX",desc:"If set, the Default FX value will override any FX specified in the photo's tags"},{id:"doAnimations",dflt:true,title:"Do Animations",desc:"Do animations such as exploding window on resize"},{id:"slideshowOn",dflt:true,title:"Slideshow On",desc:"Tick to switch slideshow on"},{id:"slideshowDelay",dflt:8,title:"Slideshow Delay",desc:"Delay (in seconds) between photos in slideshow"},{id:"slideshowOrder",dflt:"sequential",values:["sequential","random"],title:"Slideshow Order",desc:"Order in which photos will be displayed during slideshow"},{id:"autoScrollOn",dflt:true,title:"Auto-Scroll On",desc:"Enables auto-scrolling of window with scrollbars by hovering the mouse near the top/bottom of the window"},{id:"autoScrollPhotoOn",dflt:true,title:"Auto-Scroll Photo On",desc:"Enables auto-scrolling of the photo by hovering"},{id:"hideFlash",dflt:true,title:"Hide Flash objects",desc:"controls whether or not Flash objects should be hidden"},{id:"enableKeyboard",dflt:true,title:"Enable Keyboard",desc:"Enable keyboard shortcuts"},{id:"maxOpacity",dflt:50,title:"Opacity",desc:"higher opacity = darker overlay, lower opacity = lighter overlay"},{id:"outerMargin",dflt:50,title:"Outer Margin",desc:"margin outside Imajico window"},{id:"displayMagnifyWindow",dflt:true,title:"Display Magnify Window",desc:"Display magnify window when mouse moves over photo"},{id:"displaySideControls",dflt:true,title:"Display Side Controls",desc:"Whether to display buttons on right or not"},{id:"displayPhotoControls",dflt:true,title:"Display Photo Controls",desc:"Whether to display buttons on right or not"},{id:"defaultBrowserMode",dflt:"oneCol",values:["none","oneCol"],title:"Default Browser Mode",desc:"Display magnify window when mouse moves over photo"},{id:"magnifyBy",dflt:4,title:"Magnify By",desc:"How much to magnify photo by"},{id:"magWindowWidth",dflt:Imj.isGoogleGadget()?75:150,title:"Magnify Window Width",desc:"Width of the magnify window"},{id:"magWindowHeight",dflt:Imj.isGoogleGadget()?75:150,title:"Magnify Window Width",desc:"Width of the magnify window"},{id:"isMaximized",dflt:false,title:"Maximize window",desc:""},{id:"fitImageMode",dflt:"none",title:"Fit Image Mode",desc:""},{id:"disabledButtons",dflt:"",title:"Disabled Buttons",desc:""}];Imj.imj=this;this.container=null;this.panStep=5;this.panInterval=100;this.browserMinWidth=100;this.currentImage=-1;this.albumsInfo=[];this.albumsDirty=true;this._slideshowGranularity=250;this._loadTimeout=60000;this._activeFx=[];this.buttons=[];this.buttons.close=[26,true,"imjCloseButton"];this.buttons.minmax=[26,true,"imjMaximizeButton","imjRestoreButton"];this.buttons.browser=[26,true,"imjBrowserMinButton","imjBrowserMaxButton","imjBrowserNoneButton"];this.buttons.albums=[26,true,"imjAlbumsButton"];this.buttons.story=[26,true,"imjStoryButton"];this.buttons.options=[26,true,"imjOptionsButton"];this.buttons.navTop=[12,true,"imjNavTopButton"];this.buttons.navPrev=[26,true,"imjNavPrevButton"];this.buttons.navPlayPause=[26,true,"imjNavPlayButton","imjNavPauseButton"];this.buttons.navNext=[26,true,"imjNavNextButton"];this.buttons.navBottom=[12,false,"imjNavBottomButton"];this.checkFrame();this.initializeSettings(); /*@cc_on @if (@_jscript) this.ie = (document.all && !window.opera) ? true : false; @else @*/ this.ie=false; /*@end @*/ this.ie7=(this.ie&&window.XMLHttpRequest);this.classStr=this.ie?"className":"class";if(this.ie){try{document.execCommand("BackgroundImageCache",false,true)}catch(err){}}if(Imj.isGoogleGadget()){this.googlePrefs=new _IG_Prefs();this.setAlbums(this.googlePrefs.getString("albums"));if(typeof _IG_AdjustIFrameHeight=="function"){_IG_AdjustIFrameHeight()}}this.updateImajicoItems();this.stuffQueryStringArgs();this._browserMode=this.defaultBrowserMode;this.createGui();this.initialize()};Imj.Imajico.prototype.initialize=function(){try{if(!this.theme){this.setTheme("orange")}this.view="photos";Imj.initializePlugins();this.dragInitialize();this.oldResizeHandler=window.onResize;onresize=this.resizeHandler;if(this.container){this.setButtonVisibility("close",false);this.open()}}catch(A){var C="Exception caught: ";if(typeof A=="string"){alert(C+A)}else{for(var B in A){if(A.hasOwnProperty(B)){C+=B+"="+A[B]+"; "}}alert(C)}}};Imj.Imajico.prototype.initializeSettings=function(){for(var A=0;A0?relAttribute.substr(hasOptions+1):"";if(anchor.getAttribute("href")){eval('anchor.onclick = function () { Imj.imj.open("'+optionsStr+'"); return false; };');anchor.href=""}}}}};Imj.Imajico.prototype.stuffQueryStringArgs=function(){var A=Imj.parseQueryString();Imj.putOptionsInto(this,A)};Imj.putOptionsInto=function(C,B){for(var A in B){if(B.hasOwnProperty(A)){if(A.indexOf("imj.")===0){Imj.setSetting(C,A.substr(4),B[A][0])}}}};Imj.parseQueryString=function(A){if(A===undefined){A=location.search?location.search:""}if(A.charAt(0)==="?"){A=A.substring(1)}return Imj.parseOptions(A)};Imj.parseOptions=function(F){var D={};F=F.replace("+"," ");var A=F.split(/[&;]/g);for(var C=0;C';var F=typeof E.dflt;if(F=="boolean"){D+='"}else{if(F=="string"||F=="number"){if(E.values){D+='\n"}else{D+=''}}}D+=""}D+='
 
';D+="
 
 



";A.innerHTML=D};Imj.Imajico.prototype.enableKeyboardNav=function(){if(this.enableKeyboard||!this.container){this.doc.onkeydown=this.keyboardAction}};Imj.Imajico.prototype.disableKeyboardNav=function(){this.doc.onkeydown=""};Imj.Imajico.prototype.keyboardAction=function(D){var A=(D==null)?event.keyCode:D.which;var B=String.fromCharCode(A).toLowerCase();var C=(D==null)?27:D.DOM_VK_ESCAPE;if((B=="x")||(B=="c")||(A==C)){Imj.imj.close();Imj.stopEvent(D)}else{if((B=="p")||(A==37)){Imj.imj.navRel(-1);Imj.stopEvent(D)}else{if((B=="n")||(A==39)){Imj.imj.navRel(1);Imj.stopEvent(D)}else{if((B=="+")||(A==38)){Imj.imj.zoomRel(1);Imj.stopEvent(D)}else{if((B=="-")||(A==40)){Imj.imj.zoomRel(-1);Imj.stopEvent(D)}else{if(B=="b"){if(Imj.imj._browserMode=="oneCol"){Imj.imj.setBrowserMode("max")}else{if(Imj.imj._browserMode=="max"){Imj.imj.setBrowserMode("none")}else{Imj.imj.setBrowserMode("oneCol")}}Imj.stopEvent(D)}else{if(B=="a"){Imj.imj.toggleAlbums();Imj.stopEvent(D)}else{if(B=="o"){Imj.imj.toggleOptions();Imj.stopEvent(D)}else{if(B=="s"){Imj.imj.toggleStory();Imj.stopEvent(D)}else{if(B==" "){Imj.imj.setSlideshowOn(!Imj.imj.slideshowOn);Imj.stopEvent(D)}}}}}}}}}}};Imj.stopEvent=function(A){if(!A){A=window.event}A.cancelBubble=true;A.returnValue=false;if(A.stopPropagation){A.stopPropagation();A.preventDefault()}return false};Imj.Imajico.prototype.submitOptions=function(E){var A=E.form;var F=false;for(var G=0;G0){C[C.length]=D[B]}}return C};Imj.Imajico.prototype.loadAlbums=function(){if(!Imj.plugins){alert(Imj._("Imajico: no plugins found"));return false}if(!this.albums||!this.albumsList.length){alert(Imj._("Imajico: no albums specified. Use the Options button at the right to set your albums list."));return false}this.loadingAlbum=0;this.loadNextAlbum()};Imj.Imajico.prototype.loadNextAlbum=function(){if(!this.albumsList){return }for(var B=this.loadingAlbum;B0){if(!D){D=A}if(this.startingAlbum){for(var B=0;B0){if(this.startingPhoto>0&&this.startingPhoto<=A.photos.length){this.displayPhoto(this.startingPhoto-1)}else{this.displayPhoto(0)}}this.displayThumbnails()};Imj.Imajico.prototype.displayAlbum=function(B,A){if(this.albumsInfo&&this.albumsInfo[B]&&this.albumsInfo[B].albums[A]){this.view="photos";this.albumsInfo[B].plugin.getAlbumPhotos(this.albumsInfo[B].albums[A]);this.refresh()}};Imj.Imajico.prototype.displayAlbums=function(){if(!this.albumsDirty||!this.albumsInfo||!this.allAlbumsLoaded){return }var E="";var G=0;var D;for(var I in this.albumsInfo){if(this.albumsInfo.hasOwnProperty(I)){var H=this.albumsInfo[I];for(D=0;D';E+=' "}}}E+="";Imj.imageLoader.cancelAll();this.els.albumsPane.innerHTML=E;G=0;for(I in this.albumsInfo){if(this.albumsInfo.hasOwnProperty(I)){for(D=0;DH){H=A.thumbnail.width}if(A.thumbnail.height>B){B=A.thumbnail.height}}var E="";for(D=0;D
'+(D+1)+"
"}this.browserMinWidth=H+2*(this.thumbnailMargin+1);this.refresh();this.els.browserPane.innerHTML=E;for(D=0;D'+Imj._("{num} of {total}{title}",{num:C+1,total:this.currentAlbum.photos.length,title:I?": "+I:""})+'
'}D+="";this.els.storyPane.innerHTML=D;Imj.imageLoader.cancelAll();for(C=0;C{num} of {total}: {title}",{num:N+1,total:J.currentAlbum.photos.length,title:M.title})}}if(typeof this.currentAlbum.plugin.getPhotoInfo=="function"){for(C=0;C"+B+""+(A?":"+A:""):A)};Imj.Imajico.prototype.getContainerArea=function(){var A,F,B,E;if(!this.isMaximized&&this.container){A=0;F=0;B=this.getElementById(this.container).clientWidth;E=this.getElementById(this.container).clientHeight}else{var C=this.isMaximized?0:this.outerMargin;var D=Imj.getWindowSize();A=Imj.getWindowOffsetX()+C;F=Imj.getWindowOffsetY()+C;B=D.w-2*C;E=D.h-2*C}return({x:A,y:F,width:B,height:E})};Imj.Imajico.prototype.explode=function(G,E,I,B,K,J,L,F,M){var C=10;var N=(K-G)/C;var D=(J-E)/C;var H=(L-I)/C;var A=(F-B)/C;this._animateExplode(G,E,I,B,K,J,L,F,N,D,H,A,C,M)};Imj.Imajico.prototype._animateExplode=function(H,G,I,N,K,J,L,O,B,A,C,M,F,E){var Q,P,R,D;if(0===F||!this.doAnimations){this._isExploding=false;window.clearTimeout(this._explodeTimeout);Imj.hide(this.els.exploderBox);if(E.length){this[E]()}return }else{if(1==F){Q=K;P=J;R=L;D=O}else{Q=H+B;P=G+A;R=I+C;D=N+M}}this._isExploding=true;this.els.exploderBox.style.left=Q+"px";this.els.exploderBox.style.top=P+"px";this.els.exploderBox.style.width=R+"px";this.els.exploderBox.style.height=D+"px";Imj.show(this.els.exploderBox);F-=1;this._explodeTimeout=setTimeout("Imj.imj._animateExplode("+Q+","+P+","+R+","+D+","+K+","+J+","+L+","+O+","+B+","+A+","+C+","+M+","+F+", '"+E+"')",20)};Imj.Imajico.prototype.resizeHandler=function(A){if(Imj.imj.els.container.style.display!="none"){Imj.imj.refresh()}if(Imj.imj.oldResizeHandler){Imj.imj.oldResizeHandler(A)}};Imj.Imajico.prototype.setIsMaximized=function(C){if(this.isMaximized==C){return }var D=this.getContainerArea();this.isMaximized=C;var F=this.getContainerArea();if(!this.displayCreated){return }if(this.container){var E=this.getElementById(this.container);var B=this.doc.body;var A=this.els.container;if(E&&B&&A){if(!this.isMaximized){B.removeChild(A);E.appendChild(A)}else{E.removeChild(A);B.appendChild(A)}}}this.els.maximizeButton.style.display=C?"none":"";this.els.restoreButton.style.display=C?"":"none";this.explode(D.x,D.y,D.width,D.height,F.x,F.y,F.width,F.height,"refresh")};Imj.Imajico.prototype.resizePhoto=function(){this.photoNeedsResize=false;if((this.currentPhotoIndex===undefined)||!this.currentAlbum){return }var D=this.currentAlbum.photos[this.currentPhotoIndex];var C=this.els.photoPane;var B=this.els.title;if(D.isVideo){var A=this.getElementById("imjVideo");if(A){Imj.fillContainer(C.clientWidth,C.clientHeight-this.scrollbarWidth-this.scrollbarBorder-B.clientHeight,A)}}else{if(this.currentPhoto){Imj.elToDrawable(this.currentPhoto).applyFit(this.defaultFit)}}};Imj.idToDrawable=function(A){return Imj.elToDrawable(Imj.imj.getElementById(A))};Imj.elToDrawable=function(A){return A?A.imjDrawable:null};Imj.Drawable=function(A){this.element=Imj.imj.getElementById(A);this.element.imjDrawable=this;this.area={x:this.element.offsetLeft,y:this.element.offsetTop,w:this.element.clientWidth,h:this.element.clientHeight};this.children=[];this.naturalW=this.area.w;this.naturalH=this.area.h;this.opacity=100;this.parent=null};Imj.Drawable.prototype.appendChild=function(A){if(!this.children[A.element.id]){A.parent=this;this.children[A.element.id]=A}};Imj.Drawable.prototype.removeChild=function(A){if(this.children[A]){this.children[A]=null;A.parent=null}};Imj.Drawable.prototype.setPos=function(A,B){this.setX(A);this.setY(B)};Imj.Drawable.prototype.setSize=function(A,B){this.setW(A);this.setH(B)};Imj.Drawable.prototype.setArea=function(A){if(undefined!==A.x){this.setX(A.x)}if(undefined!==A.y){this.setY(A.y)}if(undefined!==A.w){this.setW(A.w)}if(undefined!==A.h){this.setH(A.h)}};Imj.Drawable.prototype.getArea=function(){return this.area};Imj.Drawable.prototype.setNaturalW=function(A){this.naturalW=A};Imj.Drawable.prototype.setNaturalH=function(A){this.naturalH=A};Imj.Drawable.prototype.getNaturalW=function(){return this.naturalW};Imj.Drawable.prototype.getNaturalH=function(){return this.naturalH};Imj.Drawable.prototype.setX=function(A){this.area.x=A;this.element.style.left=A+"px"};Imj.Drawable.prototype.setY=function(A){this.area.y=A;this.element.style.top=A+"px"};Imj.Drawable.prototype.setW=function(A){if(A!=this.area.w){this.area.w=A;this.element.width=A;this.element.style.width=A+"px";if(Imj.imj.currentPhoto&&this==Imj.imj.currentPhoto.imjDrawable){Imj.imj.zoomSlider.setValue(A)}}};Imj.Drawable.prototype.setH=function(A){this.area.h=A;this.element.height=A;this.element.style.height=A+"px"};Imj.Drawable.prototype.applyFit=function(B){var A=B?B:Imj.imj.defaultFit;var C=Imj.toObject("fit("+B+")");if(C){C.apply(this)}};Imj.Drawable.prototype.setOpacity=function(A){if(A>100){A=100}if(A<0){A=0}if(this.opacity!=A){this.opacity=A;Imj.setOpacity(this.element,A)}};Imj.Drawable.prototype.getOpacity=function(){return this.opacity};Imj.Drawable.prototype.applyFx=function(C,B){Imj.show(this.element);for(var A in C){if(C.hasOwnProperty(A)){C[A].apply(B,this)}}};Imj.Drawable.prototype.getX=function(){return this.area.x};Imj.Drawable.prototype.getY=function(){return this.area.y};Imj.Drawable.prototype.getW=function(){return this.area.w};Imj.Drawable.prototype.getH=function(){return this.area.h};Imj.Drawable.prototype.getOrientation=function(){var B=1.2;var C=2;var A="square";if(this.getNaturalW()>B*this.getNaturalH()){A="landscape"}else{if(this.getNaturalW()>C*this.getNaturalH()){A="panorama"}else{A="portrait"}}return A};Imj.centerWithin=function(B,C){var A=Imj.elToDrawable(C);if(A){A.setX((B.clientWidth-A.getW())/2);A.setY((B.clientHeight-A.getH())/2)}else{C.style.left=((B.clientWidth-C.clientWidth)/2)+"px";C.style.top=((B.clientHeight-C.clientHeight)/2)+"px"}};Imj.fillContainer=function(D,C,E){var B,A;if(E.clientWidth/D=this.currentAlbum.photos.length){A=this.currentAlbum.photos.length-1}this.resetSlideshow();this.displayPhoto(A)};Imj.Imajico.prototype.navRel=function(B){var A;if(!this.currentAlbum||!this.currentAlbum.photos||!this.currentAlbum.photos.length){return }if(undefined===this.currentPhotoIndex){if(B<0){A=this.currentAlbum.photos.length+B}else{A=B-1}}else{A=this.currentPhotoIndex+B}if(A<0){A=this.currentAlbum.photos.length-1}else{if(A>=this.currentAlbum.photos.length){A=0}}if(A!=this.currentPhotoIndex){this.resetSlideshow();this.displayPhoto(A)}};Imj.Imajico.prototype.imajicoLogoButton=function(){window.open("http://imajico.com")};Imj.Imajico.prototype.resetSlideshow=function(){if(this.slideshowOn){clearTimeout(this.slideshowTimeout);this.els.countdownIndicator.style.width="0px"}};Imj.Imajico.prototype.setSlideshowOn=function(A){if(this.slideshowOn==A){return }this.slideshowOn=A;if(!A){this.cancelFx();if(this.slideshowTimeout){Imj.clearTime(this.slideshowTimeout);this.els.countdownIndicator.style.width="0px"}}this.refresh();if(A){this.nextInSlideshow()}};Imj.Imajico.prototype.startSlideshowCountdown=function(){this._slideshowCountdown((1000/this._slideshowGranularity)*this.slideshowDelay,0)};Imj.Imajico.prototype._slideshowCountdown=function(C,B){B+=1;var A=this.els.countdownIndicator;if(!this.slideshowOn||!this._isOpened){A.style.width="0px"}else{if(B==C){A.style.width="0px";this.nextInSlideshow()}else{A.style.width=(this.els.countdownPane.clientWidth*B/C)+"px";Imj.imj.slideshowTimeout=setTimeout("Imj.imj._slideshowCountdown("+C+","+B+")",this._slideshowGranularity)}}};Imj.Imajico.prototype.nextInSlideshow=function(){if(this.currentAlbum){if(this.slideshowOrder=="sequential"){this.navRel(1)}else{var A=Imj.rand(this.currentAlbum.photos.length);this.resetSlideshow();this.displayPhoto(A)}}};Imj.moveCursor=function(){document.body.style.cursor="move"};Imj.clearCursor=function(){document.body.style.cursor="default"};Imj.Imajico.prototype.dragInitialize=function(){this.doc.onmousemove=Imj.imj.mouseMove;this.drag={object:null,mouseOffset:null}};Imj.Imajico.prototype.getMouseOffset=function(C,B){B=B||window.event;var A=this.mouseCoords(B);return{x:A.x-C.offsetLeft,y:A.y-C.offsetTop}};Imj.Imajico.prototype.getPosition=function(C){var B=0;var A=0;while(C.offsetParent){B+=C.offsetLeft;A+=C.offsetTop;C=C.offsetParent}B+=C.offsetLeft;A+=C.offsetTop;return{x:B,y:A}};Imj.Imajico.prototype.mouseCoords=function(A){A=A||window.event;if(A.pageX||A.pageY){return{x:A.pageX,y:A.pageY}}return{x:A.clientX+Imj.getWindowOffsetX()-this.doc.body.clientLeft,y:A.clientY+Imj.getWindowOffsetY()-this.doc.body.clientTop}};Imj.Imajico.prototype.mouseMove=function(B){B=B||window.event;var A=Imj.imj.mouseCoords(B);if(Imj.imj.drag.object){Imj.imj.drag.object.setX(A.x-Imj.imj.drag.mouseOffset.x);Imj.imj.drag.object.setY(A.y-Imj.imj.drag.mouseOffset.y);return false}if(Imj.imj._magnifiedPhotoDraw){Imj.imj.magnify(true,Imj.imj._magnifiedPhotoDraw,B)}if(Imj.imj._autoScrollTimer){Imj.imj.autoScrollMouseMove(B)}};Imj.Imajico.prototype.mouseUp=function(){Imj.imj.drag.object=null};Imj.Imajico.prototype.makeDraggable=function(A){if(!A){return }A.element.onmousedown=function(B){Imj.imj.drag.object=Imj.elToDrawable(this);Imj.imj.drag.mouseOffset=Imj.imj.getMouseOffset(this,B);return false};A.element.onmouseover=function(B){Imj.moveCursor();Imj.imj.magnify(true,Imj.elToDrawable(this),B);return false};A.element.onmouseout=function(B){Imj.clearCursor();return false}};Imj.Imajico.prototype.makeScrollable=function(A,B,C){if(!A){return }A.imjDimension=B;A.imjUseScrollbar=C;A.onmouseover=function(D){Imj.imj.autoScroll(this,D);if(!A.imjUseScrollbar){Imj.imj.magnify(true,Imj.elToDrawable(this),D)}return false};A.onmouseout=function(D){Imj.imj.autoScroll(null);return false}};Imj.Imajico.prototype.makeMagnifiable=function(A){if(!A){return }A.onmouseover=function(B){Imj.imj.magnify(true,Imj.elToDrawable(this),B);return false}};Imj.Imajico.prototype.makePannable=function(A){if(!A){return }A.onmouseover=function(B){this._panStep=1;Imj.imj.displayPan(true,B);return false};A.onmouseout=function(B){Imj.imj.displayPan(false);return false}};Imj.Imajico.prototype.displayPan=function(A){if(!A||!this.currentPhoto||this.slideshowOn||this.currentPhoto.style.display=="none"){Imj.hide(this.els.panUp,this.els.panDown,this.els.panRight,this.els.panLeft);window.clearTimeout(this._panTimer);return }var B=Imj.elToDrawable(this.currentPhoto);this.els.panUp.style.display=B.getY()<0?"":"none";this.els.panDown.style.display=B.getY()+B.getH()>B.parent.getH()?"":"none";this.els.panLeft.style.display=B.getX()<0?"":"none";this.els.panRight.style.display=B.getX()+B.getW()>B.parent.getW()?"":"none"};Imj.Imajico.prototype.setPanStep=function(B,D){var A=this.mouseCoords(D);if(B=="up"){var C=this.getPosition(this.els.panUp);this._panStep=22-(A.y-C.y)}else{if(B=="down"){var C=this.getPosition(this.els.panDown);this._panStep=(A.y-C.y)}else{if(B=="right"){var C=this.getPosition(this.els.panRight);this._panStep=(A.x-C.x)}else{if(B=="left"){var C=this.getPosition(this.els.panLeft);this._panStep=22-(A.x-C.x)}}}}if(this._panStep>22){this._panStep=22}else{if(this._panStep<=0){this._panStep=1}}};Imj.Imajico.prototype.startPan=function(A,D){if(!this.currentPhoto||this.currentPhoto.style.display=="none"){return }var C=this._panStep?this._panStep:1;var B=Imj.elToDrawable(this.currentPhoto);if(A=="up"){var E=B.getY()+C;if(E>0&&B.getY()<=0){E=0}B.setY(E)}else{if(A=="down"){var E=B.getY()-C;if(E+B.getH()=B.parent.getH()){E=B.parent.getH()-B.getH()}B.setY(E)}else{if(A=="right"){var F=B.getX()-C;if(F+B.getW()=B.parent.getW()){F=B.parent.getW()-B.getW()}B.setX(F)}else{if(A=="left"){var F=B.getX()+C;if(F>0&&B.getX()<=0){F=0}B.setX(F)}}}}this.displayPan(true);this._panTimer=setTimeout("Imj.imj.startPan('"+A+"')",10)};Imj.Imajico.prototype.stopPan=function(){window.clearTimeout(this._panTimer)};Imj.Imajico.prototype.autoScroll=function(B,A){if(!B){window.clearTimeout(this._autoScrollTimer);return }this._scrollObject=B;this._autoScrollMousePos=this.mouseCoords(A);this._autoScroll()};Imj.Imajico.prototype.autoScrollMouseMove=function(A){this._autoScrollMousePos=this.mouseCoords(A)};Imj.Imajico.prototype._autoScroll=function(){if(!this.autoScrollOn){return }var E=this.getPosition(this._scrollObject);var A=this._scrollObject.clientHeight;var C=this._scrollObject.clientWidth;if(!Imj.pointInArea(this._autoScrollMousePos.x,this._autoScrollMousePos.y,{x:E.x,y:E.y,w:C,h:A})){return }var F=this._autoScrollMousePos.y-E.y;var D=Math.floor(10*F/A);var B=[10,5,2,1,0,0,-1,-2,-5,-10];var G=0;if((D>=0)||(DB.x+A.getW())||(I.y>B.y+A.getH())||(I.xC.x+F.getW())||(I.y>C.y+F.getH())){Imj.hide(this.els.magnifyPane)}else{H.style.left=-this.magnifyBy*(I.x-B.x)+(this.magWindowWidth/2)+"px";H.style.top=-this.magnifyBy*(I.y-B.y)+(this.magWindowHeight/2)+"px";Imj.show(D)}};Imj.Imajico.prototype.zoomRel=function(A){var B=this.currentPhoto.width+(A>0?1:-1)*20;this.zoomSlider.setValue(B)};Imj.Imajico.prototype.scaleHeight=function(){var B=this.currentAlbum.photos[this.currentPhotoIndex];var A=this.els.photoPane;if(B.isVideo&&this.draw.video){this.draw.video.applyFit("height/center")}else{if(this.currentPhoto){Imj.elToDrawable(this.currentPhoto).applyFit("height/center")}}};Imj.Imajico.prototype.scaleWidth=function(){var B=this.currentAlbum.photos[this.currentPhotoIndex];var A=this.els.photoPane;if(B.isVideo){if(this.draw.video){this.draw.video.applyFit("width/center")}}else{if(this.currentPhoto){Imj.elToDrawable(this.currentPhoto).applyFit("width/center")}}};Imj.Imajico.prototype.scaleToOriginal=function(){var D=this.currentAlbum.photos[this.currentPhotoIndex];var B=this.els.photoPane;if(D.isVideo){var A=this.getElementById("imjVideo");if(A){A.style.width=D.width+"px";A.style.height=D.height+"px";Imj.centerWithin(B,this.els.videoPane)}}else{if(this.currentPhoto){var C=Imj.elToDrawable(this.currentPhoto);C.setW(C.getNaturalW());C.setH(C.getNaturalH());Imj.centerWithin(B,this.currentPhoto)}}};Imj.Imajico.prototype.zoomReset=function(){this.resizePhoto()};Imj.Imajico.prototype.setCenteredWidth=function(C){if(!this.currentPhoto){return }var B=Imj.elToDrawable(this.currentPhoto);if(C==B.getW()){return }var E=B.getNaturalW();var D=B.getNaturalH();var A=C/E*D;B.setArea({x:(B.getW()-C)/2+B.getX(),y:(B.getH()-A)/2+B.getY(),w:C,h:A})};Imj.Imajico.prototype.panHoriz=function(A){if(this.currentPhoto){var B=this.currentPhoto.offsetLeft+(A<0?-1:1)*this.panStep;this.currentPhoto.style.left=B+"px"}};Imj.Imajico.prototype.startPanHoriz=function(A){this.panHoriz(A);this.panTimeout=setTimeout("Imj.imj.startPanHoriz("+A+")",this.panInterval)};Imj.Imajico.prototype.panVert=function(A){if(this.currentPhoto){var B=this.currentPhoto.offsetTop+(A<0?-1:1)*this.panStep;this.currentPhoto.style.top=B+"px"}};Imj.Imajico.prototype.startPanVert=function(A){this.panVert(A);this.panTimeout=setTimeout("Imj.imj.startPanVert("+A+")",this.panInterval)};Imj.Imajico.prototype.cancelPan=function(){window.clearTimeout(this.panTimeout)};Imj.Imajico.prototype.toggleAlbums=function(){this.view=(this.view=="albums")?"photos":"albums";this.setSlideshowOn(false);this.refresh()};Imj.Imajico.prototype.toggleStory=function(){this.view=(this.view=="story")?"photos":"story";this.setSlideshowOn(false);this.refresh()};Imj.Imajico.prototype.toggleOptions=function(){this.view=(this.view=="options")?"photos":"options";this.setSlideshowOn(false);if(this.view=="options"){this.createOptions(this.els.optionsPane);this.disableKeyboardNav()}else{this.enableKeyboardNav()}this.refresh()};Imj.Imajico.prototype.setBrowserMode=function(A){this.els.browserMinButton.style.display=A=="none"?"":"none";this.els.browserMaxButton.style.display=A=="oneCol"?"":"none";this.els.browserNoneButton.style.display=A=="max"?"":"none";this.view="photos";this._browserMode=A;if(A=="max"){this.setSlideshowOn(false)}this.displayThumbnails()};Imj.getWindowSize=function(){var B=0,A=0;if(typeof (window.innerWidth)=="number"){B=window.innerWidth;A=window.innerHeight;if(document.body.offsetHeight>A){B=B-17}if(document.body.offsetWidthB))){C=B}return A&&(!C||(C>A))?A:C};Imj.Imajico.prototype.getPageHeight=function(){var A;if(window.innerHeight&&window.scrollMaxY){A=(this.isFrame?parent.innerHeight:self.innerHeight)+(this.isFrame?parent.scrollMaxY:self.scrollMaxY)}else{if(this.doc.body.scrollHeight>this.doc.body.offsetHeight){A=this.doc.body.scrollHeight}else{A=Imj.getElementsByTagName(this.doc,"html").item(0).offsetHeight;A=(A
'+A+'
'+A+"
";return this.els.title.clientHeight};Imj.Imajico.prototype.photoClicked=function(A){this.resetSlideshow();this.displayPhoto(A)};Imj.Imajico.prototype.displayPhoto=function(B){if(Imj.imj._browserMode=="max"||this.view!="photos"){Imj.imj.setBrowserMode("oneCol")}if((B<0)||!this.currentAlbum||!this.currentAlbum.photos||(B>=this.currentAlbum.photos.length)){return }var A=this.currentAlbum.photos[B];if(!A.title&&!A.descr&&typeof this.currentAlbum.plugin.getPhotoInfo=="function"){this.currentAlbum.plugin.getPhotoInfo(this.currentAlbum,B)}else{this.photoReadyForLoading(B)}};Imj.Imajico.prototype.setPhotoInfo=function(C,B){var A=this.currentAlbum.photos[C];A.title=B.title;A.descr=B.descr;A.image.url=B.image;this.photoReadyForLoading(C)};Imj.Imajico.prototype.photoReadyForLoading=function(D){var A=this.currentAlbum.photos[D];var F=A.image.url;if(A.isVideo){var H=this.displayTitle(Imj._("{num} of {total}: {title}",{num:D+1,total:this.currentAlbum.photos.length,title:this.getFullTitle(A.title,A.descr)}));var G=this.els.photoPane;var J=this.els.videoPane;Imj.hide(this.els.photo1,this.els.photo2,this.els.loadingImage);J.innerHTML=this.currentAlbum.plugin.getVideoHtml(this.currentAlbum.photos[D],this.slideshowOn);Imj.show(J);var C=this.getElementById("imjVideo");if(C){C.style.position="absolute";this.draw.video=new Imj.Drawable("imjVideo");Imj.fillContainer(G.clientWidth,G.clientHeight-this.scrollbarWidth-this.scrollbarBorder-H,C);C.style.top=H+"px"}else{this.draw.video=null}this.currentPhotoIndex=D;return }this.nextPhotoIndex=D;var L=this;var K=this.slideshowOn?this.getSoundDef(A):null;_displayPhoto=function(R){L._photoLoadedPhotoUrl=R;var M=Imj.imageLoader.isLoaded(R).image;Imj.hide(L.els.videoPane,L.els.loadingImage);var O=L.currentPhotoId;var V=null;if(!O){var V="imjPhoto1";var W=null}else{if(O=="imjPhoto1"){var V="imjPhoto2"}else{var V="imjPhoto1"}var N=L.doc.getElementById(O);var W=Imj.elToDrawable(N)}var Y=L.currentAlbum.photos[L.nextPhotoIndex];var Z=L.doc.getElementById(V);Imj.hide(Z);var S=Imj.elToDrawable(Z);var U=L.draw.photoPane;Z.src=M.src;S.setNaturalW(M.width);S.setNaturalH(M.height);L.displayTitle(Imj._("{num} of {total}: {title}",{num:L.nextPhotoIndex+1,total:L.currentAlbum.photos.length,title:L.getFullTitle(Y.title,Y.descr)}));S.setOpacity(100);L.createFxAndFit(L.nextPhotoIndex,Y,S);S.applyFx(L._activeFx,W);if(L.slideshowOn&&L.slideshowOrder=="sequential"){L.scrollOneColBrowserTo(L.nextPhotoIndex)}L.currentPhotoIndex=L.nextPhotoIndex;L.currentPhotoId=V;L.currentPhoto=Z;L.isLoading=false;var T=Imj.min(S.getW(),M.width,S.parent.getW());var X=Imj.max(4*M.width,Z.width);L.zoomSlider.setValues(1,S.getW(),X);if(L.slideshowOn){L.startSlideshowCountdown();var P=L.currentPhotoIndex+1;if(P>=L.currentAlbum.photos.length){P=0}var Q=L.currentAlbum.photos[P];var R=Q.image.url;if(!Imj.imageLoader.isLoaded(R)){Imj.imageLoader.addImage(R,1,null,E)}}};function E(N,M){if(M.src==F){I()}}function B(){if(this.sID==""+D){I()}}function I(){var N=true;var M=true;if(!Imj.imageLoader.isLoaded(F)){Imj.show(Imj.imj.els.loadingImage);Imj.centerWithin(L.els.photoPane,Imj.imj.els.loadingImage);Imj.imageLoader.addImage(F,1,null,E);M=false}if(N&&M){if(L._photoLoadedPhotoUrl!=F){_displayPhoto(F)}}}I();this.isLoading=true};Imj.Imajico.prototype.isSoundLoaded=function(B){var A=""+B;var C=soundManager.getSoundById(A,true);if(C){return C.loaded||C.readyState>1}return false};Imj.Imajico.prototype.loadSound=function(B,D,A){var C=""+D;var E=soundManager.getSoundById(C,true);if(E){return E.loaded}soundManager.createSound({id:C,url:B,autoLoad:true,onload:A});return false};Imj.Imajico.prototype.cancelFx=function(){for(var A in this._activeFx){if(this._activeFx.hasOwnProperty(A)){this._activeFx[A].cancel()}}this._activeFx=[]};Imj.Imajico.prototype.scrollOneColBrowserTo=function(F){var H=this.getElementById("imjTnDiv"+F);if(!H){return }var E=H.offsetTop;var D=H.clientHeight;var G=this.els.browserPane.scrollTop;var C=this.els.browserPane.scrollHeight;var B=this.els.browserPane.clientHeight;var A=E-(B-D)/2;if(A<0){A=0}if(A>C-B){A=C-B}this.doScrollOneColBrowserTo(A)};Imj.Imajico.prototype.doScrollOneColBrowserTo=function(A){if(this._browserMode=="oneCol"){this.scrollbar.setValue(this.scrollbar.getMaximum()-A)}};Imj.Imajico.prototype.getSoundDef=function(C){if(C.tags){for(var B=0;B1.5*J){B="big"}else{if(C=100){try{C.removeAttribute("filter")}catch(E){}}};Imj.Fx.zoom=function(C,B,A){this.zoomTo=undefined!==C?C:2;this.numSteps=undefined!==B?B:100;this.interval=undefined!==A?A:50;this._timers={}};Imj.Fx.zoom.prototype.apply=function(G,E){var C=this;this._isCancelled=false;var H=-1;if(G){Imj.hide(G.element)}var B=E.getW();var F=this.zoomTo*E.getW();var A=(F-B)/this.numSteps;D();function D(){H++;var I=H==C.numSteps?F:B+(A*H);if(!C._isCancelled){Imj.imj.zoomSlider.setValue(I);if(HB.parent.getH()){A=B.getNaturalW()*B.parent.getH()/B.getNaturalH();C=B.parent.getH()}}else{if(this.mode=="fill"){var C=B.getNaturalH()*B.parent.getW()/B.getNaturalW();var A=B.parent.getW();if(C=A.length){for(var C=B;C=0;A--){if(this.queues[A].getDepth()>0){this._serviceQueue(this.queues[A],A)}}};Imj.ImageLoader.prototype._serviceQueue=function(A,F){var H=true;while(H){H=false;if((A.getDepth()===0)||(this.freeLoadSlots.getDepth()===0)){return }var D=0;for(var E=F+1;Ethis._maximum){this._value=this._maximum-this._extent}else{if(Athis._maximum){this._extent=this._maximum-this._value}else{this._extent=A}}if(!this._isChanging&&typeof this.onchange=="function"){this.onchange()}}};Imj.Range.prototype.getExtent=function(){return this._extent};Imj.Range.prototype.setMinimum=function(A){if(this._minimum!=A){var B=this._isChanging;this._isChanging=true;this._minimum=A;if(A>this._value){this.setValue(A)}if(A>this._maximum){this._extent=0;this.setMaximum(A);this.setValue(A)}if(A+this._extent>this._maximum){this._extent=this._maximum-this._minimum}this._isChanging=B;if(!this._isChanging&&typeof this.onchange=="function"){this.onchange()}}};Imj.Range.prototype.getMinimum=function(){return this._minimum};Imj.Range.prototype.setMaximum=function(B){if(this._maximum!=B){var A=this._isChanging;this._isChanging=true;this._maximum=B;if(B100}else{B=C.element.offsetHeight-C.handle.offsetHeight;G=C.element.offsetHeight-C.handle.offsetHeight-(F.screenY-Imj.Scrollbar._scrollbarDragData.dy);E=Math.abs(F.screenX-Imj.Scrollbar._scrollbarDragData.screenX)>100}C.setValue(E?Imj.Scrollbar._scrollbarDragData.startValue:C.getMinimum()+A*G/B);return false}else{var C=Imj.Scrollbar._currentInstance;if(C!=null){var D=Imj.Scrollbar.eventHandlers.getLine(F);C._mouseX=F.offsetX+(D?C.line.offsetLeft:0);C._mouseY=F.offsetY+(D?C.line.offsetTop:0)}}},onmouseup:function(C){C=Imj.Scrollbar.eventHandlers.getEvent(C,this);var A=Imj.Scrollbar._currentInstance;var B=A.document;if(B.removeEventListener){B.removeEventListener("mousemove",Imj.Scrollbar.eventHandlers.onmousemove,true);B.removeEventListener("mouseup",Imj.Scrollbar.eventHandlers.onmouseup,true)}else{if(B.detachEvent){B.detachEvent("onmousemove",Imj.Scrollbar.eventHandlers.onmousemove);B.detachEvent("onmouseup",Imj.Scrollbar.eventHandlers.onmouseup);B.detachEvent("onlosecapture",Imj.Scrollbar.eventHandlers.onmouseup);A.element.releaseCapture()}}if(Imj.Scrollbar._scrollbarDragData){Imj.Scrollbar._scrollbarDragData=null}else{A._timer.stop();A._increasing=null}Imj.Scrollbar._currentInstance=null},onkeydown:function(C){C=Imj.Scrollbar.eventHandlers.getEvent(C,this);var B=this.scrollbar;var A=C.keyCode;switch(A){case 33:B.setValue(B.getValue()+B.getBlockIncrement());break;case 34:B.setValue(B.getValue()-B.getBlockIncrement());break;case 35:B.setValue(B.getOrientation()=="horizontal"?B.getMaximum():B.getMinimum());break;case 36:B.setValue(B.getOrientation()=="horizontal"?B.getMinimum():B.getMaximum());break;case 38:case 39:B.setValue(B.getValue()+B.getUnitIncrement());break;case 37:case 40:B.setValue(B.getValue()-B.getUnitIncrement());break}if(A>=33&&A<=40){return false}},onkeypress:function(B){B=Imj.Scrollbar.eventHandlers.getEvent(B,this);var A=B.keyCode;if(A>=33&&A<=40){return false}},onmousewheel:function(B){B=Imj.Scrollbar.eventHandlers.getEvent(B,this);var A=this.scrollbar;if(A._focused){A.setValue(A.getValue()+B.wheelDelta/120*A.getUnitIncrement());return false}}};Imj.Scrollbar.prototype.classNameTag="dynamic-scrollbar-control",Imj.Scrollbar.prototype.setValue=function(A){this._range.setValue(A);this.input.scrollbarValueChanged(this)};Imj.Scrollbar.prototype.getValue=function(){return this._range.getValue()};Imj.Scrollbar.prototype.setMinimum=function(A){this._range.setMinimum(A);this.input.scrollbarValueChanged(this)};Imj.Scrollbar.prototype.getMinimum=function(){return this._range.getMinimum()};Imj.Scrollbar.prototype.setMaximum=function(A){if(A!=this._range.getMaximum()){this._range.setMaximum(A);this.input.scrollbarValueChanged(this)}};Imj.Scrollbar.prototype.getMaximum=function(){return this._range.getMaximum()};Imj.Scrollbar.prototype.setValues=function(B,A,C){this.blockRecalculate=true;this._range.setMinimum(B);this._range.setMaximum(C);this.blockRecalculate=false;this.setValue(A);this.recalculate()};Imj.Scrollbar.prototype.setUnitIncrement=function(A){this._unitIncrement=A};Imj.Scrollbar.prototype.getUnitIncrement=function(){return this._unitIncrement};Imj.Scrollbar.prototype.setBlockIncrement=function(A){this._blockIncrement=A};Imj.Scrollbar.prototype.getBlockIncrement=function(){return this._blockIncrement};Imj.Scrollbar.prototype.getOrientation=function(){return this._orientation};Imj.Scrollbar.prototype.setOrientation=function(A){if(A!=this._orientation){if(Imj.scrollbarIsSupported&&this.element){this.element.imjScrollClass=this.element.imjScrollClass.replace(this._orientation,A)}this._orientation=A;this.recalculate()}};Imj.Scrollbar.prototype.recalculate=function(){if(!Imj.scrollbarIsSupported||!this.element||this.blockRecalculate){return }var B=this.element.offsetWidth;var D=this.element.offsetHeight;var A=this.handle.offsetWidth;var C=this.handle.offsetHeight;if(this._orientation=="horizontal"){this.handle.style.left=(B-A)*(this.getValue()-this.getMinimum())/(this.getMaximum()-this.getMinimum())+"px"}else{if(this.getMaximum()!=this.getMinimum()){this.handle.style.top=D-C-(D-C)*(this.getValue()-this.getMinimum())/(this.getMaximum()-this.getMinimum())+"px"}}};Imj.Scrollbar.prototype.ontimer=function(){var B=this.handle.offsetWidth;var D=this.handle.offsetHeight;var A=this.handle.offsetLeft;var C=this.handle.offsetTop;if(this._orientation=="horizontal"){if(this._mouseX>A+B&&(this._increasing===null||this._increasing)){this.setValue(this.getValue()+this.getBlockIncrement());this._increasing=true}else{if(this._mouseXC+D&&(this._increasing===null||!this._increasing)){this.setValue(this.getValue()-this.getBlockIncrement());this._increasing=false}else{if(this._mouseY800){break}if(I>G){H=B[D];E=G*B[D]/I}else{H=I*B[D]/G;E=B[D]}if(LG){H=J;E=G*J/I}else{H=I*J/G;E=J}return{url:A.url+"?imgmax="+J,width:H,height:E}};function FlashRequest(B,A){if(B=="stateChanged"&&A&&A.indexOf(', "paused"')!=-1&&Imj.imj.slideshowOn){Imj.imj.setSlideshowOn(false)}else{if(B=="donePlaying"&&Imj.imj.slideshowOn){Imj.imj.startSlideshowCountdown()}}}Imj.PicasaPlugin.prototype.getVideoHtml=function(A,B){videoUrl="http://video.google.com/googleplayer.swf?videoUrl="+encodeURIComponent(A.pluginData.media$group.media$content[1].url);return''};Imj.FlickrPlugin=function(){};Imj.flickrPlugin=new Imj.FlickrPlugin();Imj.registerPlugin(Imj.flickrPlugin);Imj.FlickrPlugin.prototype.initialize=function(){this.apiKey="07c9577b3712115cdff6d946e9465688";this.apiUrl="http://api.flickr.com/services/rest?api_key="+this.apiKey+"&format=json&method=flickr.";this.usernameMap={}};Imj.FlickrPlugin.prototype.getAlbums=function(A){if(A.indexOf("flickr:")===0){this.albumId=A;var B=A.substr(7).split("/");if(B.length==2){this.onlyAlbum=B[1];this._getUsernameInfo(B[0]);return true}else{this.onlyAlbum=null;this._getUsernameInfo(B);return true}username=albums.substr(7);return true}return false};Imj.FlickrPlugin.prototype.getAlbumPhotos=function(B){var E=B.pluginData.username;var D=B.pluginData.photoset;var C="flickr:"+E+"/"+D.title._content;if(!this.usernameMap[E].photos||!this.usernameMap[E].photos[C]){var A=function(F,G){if(!Imj.flickrPlugin.usernameMap[G].photos){Imj.flickrPlugin.usernameMap[G].photos=[]}Imj.flickrPlugin.usernameMap[G].photos[C]=F;Imj.flickrPlugin._photosLoaded(G,C)};this._callApiMethod("photosets.getPhotos",E,A,{photoset_id:D.id})}else{this._photosLoaded(E,C)}};Imj.FlickrPlugin.prototype.getAlbumDetails=function(H){var I=this;var C=H.pluginData.username;var G=H.pluginData.albumId;var B=this.usernameMap[C].photos[G].photoset;for(var D=0;DA.photoSizes.size[D].width){D=C}}if(F){F(B,E,{title:A.photoInfo.title._content,descr:A.photoInfo.description._content,image:A.photoSizes.size[D].source})}else{Imj.imj.setPhotoInfo(E,{title:A.photoInfo.title._content,descr:A.photoInfo.description._content,image:A.photoSizes.size[D].source})}};Imj.FlickrPlugin.prototype._getPhotoBaseUrl=function(A){var B=A.primary||A.id;return("http://farm"+A.farm+".static.flickr.com/"+A.server+"/"+B+"_"+A.secret)};Imj.FlickrPlugin.prototype._callApiMethodCallback=function(A){if(A.stat=="fail"){alert(Imj._("Imajico: error {code} calling flickr.{method}: {message}",{code:A.code,method:method,message:A.message}))}else{this.usernameMap[this.currentUsername].callback(A,this.currentUsername)}};Imj.FlickrPlugin.prototype._callApiMethod=function(H,G,F,E){var C=this;var D=this.apiUrl+H+"&jsoncallback={callback}";for(var B in E){if(E.hasOwnProperty(B)){D+="&"+encodeURIComponent(B)+"="+encodeURIComponent(E[B])}}function A(L,I){if(!L||I.stat=="fail"){var K=I?I.stat:"unknown";var J=I?I.message:"timeout";alert(Imj._("Imajico: error {code} calling flickr.{method}: {message}",{code:K,method:H,message:J}))}else{C.usernameMap[G]=C.usernameMap[G]||{};F(I,G)}}Imj.jsonLoader.addJson(D,A)};Imj.MikeMeaneyPlugin=function(){};Imj.mikeMeaneyPlugin=new Imj.MikeMeaneyPlugin();Imj.registerPlugin(Imj.mikeMeaneyPlugin);Imj.MikeMeaneyPlugin.prototype.getAlbums=function(A){if(A.indexOf("mikemeaney:")===0){if(!this.albums){this._parseAlbums()}if(!this.albums){alert(Imj._("Imajico: no photos defined for mikemeaney:, need to include JavaScript file http://mikemeaney.com/include/photo.html"))}this._setAlbumsInfo(A.substr(11));return true}return false};Imj.MikeMeaneyPlugin.prototype.getAlbumPhotos=function(A){myAlbum=this.albums[A.pluginData];A={photos:[]};for(var B=myAlbum.startingIndex;Barguments[B]){A=arguments[B]}}return A};Imj.max=function(){var B=arguments[0];for(var A=1;A=B.x)&&(C>=B.x)&&(A<\/scr"+"ipt>"); load_timer = setInterval(function() { script = document.getElementById("__ie_onload"); if (script === null) return; script.onreadystatechange = function() { if (this.readyState == "loaded") load_timer = setTimeout(init(), 500); // call the onload handler }; clearInterval(load_timer); }, 10); /*@end @*/ }if(/WebKit|KHTML/i.test(navigator.userAgent)){load_timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){init()}},10)}old_onload=window.onload;window.onload=function(){init();if(old_onload){old_onload()}}}}load_events.push(func)}})();Imj.addDOMLoadEvent(Imj.initImajico);