diff --git a/fp-plugins/jsutils/plugin.jsutils.php b/fp-plugins/jsutils/plugin.jsutils.php deleted file mode 100755 index 8356ff2..0000000 --- a/fp-plugins/jsutils/plugin.jsutils.php +++ /dev/null @@ -1,25 +0,0 @@ -mootools -Author: NoWhereMan -Author URI: http://flatpress.sf.net -*/ - - -add_action('wp_head', 'plugin_jsutils_head', 0); - - -function plugin_jsutils_head() { - - $pdir=plugin_geturl('jsutils'); - echo << - - -JSUTILS; -} - -?> diff --git a/fp-plugins/jsutils/res/fpcookie.js b/fp-plugins/jsutils/res/fpcookie.js deleted file mode 100644 index 14b858b..0000000 --- a/fp-plugins/jsutils/res/fpcookie.js +++ /dev/null @@ -1,18 +0,0 @@ - -window.onDomReady ( function() { - - var commform = $('commentform'); - - if (commform) { - $('name').value = (tmp = Cookie.get('fp-uname')) ? tmp : ''; - $('email').value = (tmp = Cookie.get('fp-umail')) ? tmp : ''; - $('url').value = (tmp = Cookie.get('fp-uweb')) ? tmp : ''; - - commform.onsubmit = function () { - Cookie.set('fp-uname', $('name').value); - Cookie.set('fp-umail', $('email').value); - Cookie.set('fp-uweb', $('url').value); - } - } - -}); diff --git a/fp-plugins/jsutils/res/mootools.js b/fp-plugins/jsutils/res/mootools.js deleted file mode 100644 index ebd3418..0000000 --- a/fp-plugins/jsutils/res/mootools.js +++ /dev/null @@ -1,356 +0,0 @@ -//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006-2007 Valerio Proietti, , MIT Style License. - -var MooTools={version:"1.11"};function $defined(A){return(A!=undefined);}function $type(B){if(!$defined(B)){return false;}if(B.htmlElement){return"element"; -}var A=typeof B;if(A=="object"&&B.nodeName){switch(B.nodeType){case 1:return"element";case 3:return(/\S/).test(B.nodeValue)?"textnode":"whitespace";}}if(A=="object"||A=="function"){switch(B.constructor){case Array:return"array"; -case RegExp:return"regexp";case Class:return"class";}if(typeof B.length=="number"){if(B.item){return"collection";}if(B.callee){return"arguments";}}}return A; -}function $merge(){var C={};for(var B=0;B-1:this.indexOf(A)>-1;},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1"); -}});Array.extend({rgbToHex:function(D){if(this.length<3){return false;}if(this.length==4&&this[3]==0&&!D){return"transparent";}var B=[];for(var A=0;A<3; -A++){var C=(this[A]-0).toString(16);B.push((C.length==1)?"0"+C:C);}return D?B:"#"+B.join("");},hexToRgb:function(C){if(this.length!=3){return false;}var A=[]; -for(var B=0;B<3;B++){A.push(parseInt((this[B].length==1)?this[B]+this[B]:this[B],16));}return C?A:"rgb("+A.join(",")+")";}});Function.extend({create:function(A){var B=this; -A=$merge({bind:B,event:false,"arguments":null,delay:false,periodical:false,attempt:false},A);if($chk(A.arguments)&&$type(A.arguments)!="array"){A.arguments=[A.arguments]; -}return function(E){var C;if(A.event){E=E||window.event;C=[(A.event===true)?E:new A.event(E)];if(A.arguments){C.extend(A.arguments);}}else{C=A.arguments||arguments; -}var F=function(){return B.apply($pick(A.bind,B),C);};if(A.delay){return setTimeout(F,A.delay);}if(A.periodical){return setInterval(F,A.periodical);}if(A.attempt){try{return F(); -}catch(D){return false;}}return F();};},pass:function(A,B){return this.create({"arguments":A,bind:B});},attempt:function(A,B){return this.create({"arguments":A,bind:B,attempt:true})(); -},bind:function(B,A){return this.create({bind:B,"arguments":A});},bindAsEventListener:function(B,A){return this.create({bind:B,event:true,"arguments":A}); -},delay:function(B,C,A){return this.create({delay:B,bind:C,"arguments":A})();},periodical:function(A,C,B){return this.create({periodical:A,bind:C,"arguments":B})(); -}});Number.extend({toInt:function(){return parseInt(this);},toFloat:function(){return parseFloat(this);},limit:function(B,A){return Math.min(A,Math.max(B,this)); -},round:function(A){A=Math.pow(10,A||0);return Math.round(this*A)/A;},times:function(B){for(var A=0;A";}D=document.createElement(D);}D=$(D);return(!C||!D)?D:D.set(C);}});var Elements=new Class({initialize:function(A){return(A)?$extend(A,this):this; -}});Elements.extend=function(A){for(var B in A){this.prototype[B]=A[B];this[B]=$native.generic(B);}};function $(B){if(!B){return null;}if(B.htmlElement){return Garbage.collect(B); -}if([window,document].contains(B)){return B;}var A=$type(B);if(A=="string"){B=document.getElementById(B);A=(B)?"element":false;}if(A!="element"){return null; -}if(B.htmlElement){return Garbage.collect(B);}if(["object","embed"].contains(B.tagName.toLowerCase())){return B;}$extend(B,Element.prototype);B.htmlElement=function(){}; -return Garbage.collect(B);}document.getElementsBySelector=document.getElementsByTagName;function $$(){var D=[];for(var C=0,B=arguments.length;C0&&A<13){this.key="f"+A;}}this.key=this.key||String.fromCharCode(this.code).toLowerCase();}else{if(this.type.test(/(click|mouse|menu)/)){this.page={x:C.pageX||C.clientX+document.documentElement.scrollLeft,y:C.pageY||C.clientY+document.documentElement.scrollTop}; -this.client={x:C.pageX?C.pageX-window.pageXOffset:C.clientX,y:C.pageY?C.pageY-window.pageYOffset:C.clientY};this.rightClick=(C.which==3)||(C.button==2); -switch(this.type){case"mouseover":this.relatedTarget=C.relatedTarget||C.fromElement;break;case"mouseout":this.relatedTarget=C.relatedTarget||C.toElement; -}this.fixRelatedTarget();}}}return this;},stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation(); -}else{this.event.cancelBubble=true;}return this;},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault();}else{this.event.returnValue=false; -}return this;}});Event.fix={relatedTarget:function(){if(this.relatedTarget&&this.relatedTarget.nodeType==3){this.relatedTarget=this.relatedTarget.parentNode; -}},relatedTargetGecko:function(){try{Event.fix.relatedTarget.call(this);}catch(A){this.relatedTarget=this.target;}}};Event.prototype.fixRelatedTarget=(window.gecko)?Event.fix.relatedTargetGecko:Event.fix.relatedTarget; -Event.keys=new Abstract({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Element.Methods.Events={addEvent:function(C,B){this.$events=this.$events||{}; -this.$events[C]=this.$events[C]||{keys:[],values:[]};if(this.$events[C].keys.contains(B)){return this;}this.$events[C].keys.push(B);var A=C;var D=Element.Events[C]; -if(D){if(D.add){D.add.call(this,B);}if(D.map){B=D.map;}if(D.type){A=D.type;}}if(!this.addEventListener){B=B.create({bind:this,event:true});}this.$events[C].values.push(B); -return(Element.NativeEvents.contains(A))?this.addListener(A,B):this;},removeEvent:function(C,B){if(!this.$events||!this.$events[C]){return this;}var F=this.$events[C].keys.indexOf(B); -if(F==-1){return this;}var A=this.$events[C].keys.splice(F,1)[0];var E=this.$events[C].values.splice(F,1)[0];var D=Element.Events[C];if(D){if(D.remove){D.remove.call(this,B); -}if(D.type){C=D.type;}}return(Element.NativeEvents.contains(C))?this.removeListener(C,E):this;},addEvents:function(A){return Element.setMany(this,"addEvent",A); -},removeEvents:function(A){if(!this.$events){return this;}if(!A){for(var B in this.$events){this.removeEvents(B);}this.$events=null;}else{if(this.$events[A]){this.$events[A].keys.each(function(C){this.removeEvent(A,C); -},this);this.$events[A]=null;}}return this;},fireEvent:function(C,B,A){if(this.$events&&this.$events[C]){this.$events[C].keys.each(function(D){D.create({bind:this,delay:A,"arguments":B})(); -},this);}return this;},cloneEvents:function(C,A){if(!C.$events){return this;}if(!A){for(var B in C.$events){this.cloneEvents(C,B);}}else{if(C.$events[A]){C.$events[A].keys.each(function(D){this.addEvent(A,D); -},this);}}return this;}};window.extend(Element.Methods.Events);document.extend(Element.Methods.Events);Element.extend(Element.Methods.Events);Element.Events=new Abstract({mouseenter:{type:"mouseover",map:function(A){A=new Event(A); -if(A.relatedTarget!=this&&!this.hasChild(A.relatedTarget)){this.fireEvent("mouseenter",A);}}},mouseleave:{type:"mouseout",map:function(A){A=new Event(A); -if(A.relatedTarget!=this&&!this.hasChild(A.relatedTarget)){this.fireEvent("mouseleave",A);}}},mousewheel:{type:(window.gecko)?"DOMMouseScroll":"mousewheel"}}); -Element.NativeEvents=["click","dblclick","mouseup","mousedown","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","keydown","keypress","keyup","load","unload","beforeunload","resize","move","focus","blur","change","submit","reset","select","error","abort","contextmenu","scroll"]; -Function.extend({bindWithEvent:function(B,A){return this.create({bind:B,"arguments":A,event:Event});}});Elements.extend({filterByTag:function(A){return new Elements(this.filter(function(B){return(Element.getTag(B)==A); -}));},filterByClass:function(A,C){var B=this.filter(function(D){return(D.className&&D.className.contains(A," "));});return(C)?B:new Elements(B);},filterById:function(C,B){var A=this.filter(function(D){return(D.id==C); -});return(B)?A:new Elements(A);},filterByAttribute:function(B,A,D,E){var C=this.filter(function(F){var G=Element.getProperty(F,B);if(!G){return false;}if(!A){return true; -}switch(A){case"=":return(G==D);case"*=":return(G.contains(D));case"^=":return(G.substr(0,D.length)==D);case"$=":return(G.substr(G.length-D.length)==D); -case"!=":return(G!=D);case"~=":return G.contains(D," ");}return false;});return(E)?C:new Elements(C);}});function $E(A,B){return($(B)||document).getElement(A); -}function $ES(A,B){return($(B)||document).getElementsBySelector(A);}$$.shared={regexp:/^(\w*|\*)(?:#([\w-]+)|\.([\w-]+))?(?:\[(\w+)(?:([!*^$]?=)["']?([^"'\]]*)["']?)?])?$/,xpath:{getParam:function(B,D,E,C){var A=[D.namespaceURI?"xhtml:":"",E[1]]; -if(E[2]){A.push('[@id="',E[2],'"]');}if(E[3]){A.push('[contains(concat(" ", @class, " "), " ',E[3],' ")]');}if(E[4]){if(E[5]&&E[6]){switch(E[5]){case"*=":A.push("[contains(@",E[4],', "',E[6],'")]'); -break;case"^=":A.push("[starts-with(@",E[4],', "',E[6],'")]');break;case"$=":A.push("[substring(@",E[4],", string-length(@",E[4],") - ",E[6].length,' + 1) = "',E[6],'"]'); -break;case"=":A.push("[@",E[4],'="',E[6],'"]');break;case"!=":A.push("[@",E[4],'!="',E[6],'"]');}}else{A.push("[@",E[4],"]");}}B.push(A.join(""));return B; -},getItems:function(B,E,G){var F=[];var A=document.evaluate(".//"+B.join("//"),E,$$.shared.resolver,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for(var D=0,C=A.snapshotLength; -D<\/script>'); -$("ie_ready").onreadystatechange=function(){if(this.readyState=="complete"){A();}};}}else{window.addListener("load",A);document.addListener("DOMContentLoaded",A); -}}}};window.onDomReady=function(A){return this.addEvent("domready",A);};window.extend({getWidth:function(){if(this.webkit419){return this.innerWidth;}if(this.opera){return document.body.clientWidth; -}return document.documentElement.clientWidth;},getHeight:function(){if(this.webkit419){return this.innerHeight;}if(this.opera){return document.body.clientHeight; -}return document.documentElement.clientHeight;},getScrollWidth:function(){if(this.ie){return Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth); -}if(this.webkit){return document.body.scrollWidth;}return document.documentElement.scrollWidth;},getScrollHeight:function(){if(this.ie){return Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight); -}if(this.webkit){return document.body.scrollHeight;}return document.documentElement.scrollHeight;},getScrollLeft:function(){return this.pageXOffset||document.documentElement.scrollLeft; -},getScrollTop:function(){return this.pageYOffset||document.documentElement.scrollTop;},getSize:function(){return{size:{x:this.getWidth(),y:this.getHeight()},scrollSize:{x:this.getScrollWidth(),y:this.getScrollHeight()},scroll:{x:this.getScrollLeft(),y:this.getScrollTop()}}; -},getPosition:function(){return{x:0,y:0};}});var Fx={};Fx.Base=new Class({options:{onStart:Class.empty,onComplete:Class.empty,onCancel:Class.empty,transition:function(A){return -(Math.cos(Math.PI*A)-1)/2; -},duration:500,unit:"px",wait:true,fps:50},initialize:function(A){this.element=this.element||null;this.setOptions(A);if(this.options.initialize){this.options.initialize.call(this); -}},step:function(){var A=$time();if(A=(7-4*B)/11){C=-Math.pow((11-6*B-11*D)/4,2)+A*A;break;}}return C;},Elastic:function(B,A){return Math.pow(2,10*--B)*Math.cos(20*B*Math.PI*(A[0]||1)/3); -}});["Quad","Cubic","Quart","Quint"].each(function(B,A){Fx.Transitions[B]=new Fx.Transition(function(C){return Math.pow(C,[A+2]);});Fx.Transitions.compat(B); -});var Drag={};Drag.Base=new Class({options:{handle:false,unit:"px",onStart:Class.empty,onBeforeStart:Class.empty,onComplete:Class.empty,onSnap:Class.empty,onDrag:Class.empty,limit:false,modifiers:{x:"left",y:"top"},grid:false,snap:6},initialize:function(B,A){this.setOptions(A); -this.element=$(B);this.handle=$(this.options.handle)||this.element;this.mouse={now:{},pos:{}};this.value={start:{},now:{}};this.bound={start:this.start.bindWithEvent(this),check:this.check.bindWithEvent(this),drag:this.drag.bindWithEvent(this),stop:this.stop.bind(this)}; -this.attach();if(this.options.initialize){this.options.initialize.call(this);}},attach:function(){this.handle.addEvent("mousedown",this.bound.start);return this; -},detach:function(){this.handle.removeEvent("mousedown",this.bound.start);return this;},start:function(C){this.fireEvent("onBeforeStart",this.element); -this.mouse.start=C.page;var A=this.options.limit;this.limit={x:[],y:[]};for(var D in this.options.modifiers){if(!this.options.modifiers[D]){continue;}this.value.now[D]=this.element.getStyle(this.options.modifiers[D]).toInt(); -this.mouse.pos[D]=C.page[D]-this.value.now[D];if(A&&A[D]){for(var B=0;B<2;B++){if($chk(A[D][B])){this.limit[D][B]=($type(A[D][B])=="function")?A[D][B]():A[D][B]; -}}}}if($type(this.options.grid)=="number"){this.options.grid={x:this.options.grid,y:this.options.grid};}document.addListener("mousemove",this.bound.check); -document.addListener("mouseup",this.bound.stop);this.fireEvent("onStart",this.element);C.stop();},check:function(A){var B=Math.round(Math.sqrt(Math.pow(A.page.x-this.mouse.start.x,2)+Math.pow(A.page.y-this.mouse.start.y,2))); -if(B>this.options.snap){document.removeListener("mousemove",this.bound.check);document.addListener("mousemove",this.bound.drag);this.drag(A);this.fireEvent("onSnap",this.element); -}A.stop();},drag:function(A){this.out=false;this.mouse.now=A.page;for(var B in this.options.modifiers){if(!this.options.modifiers[B]){continue;}this.value.now[B]=this.mouse.now[B]-this.mouse.pos[B]; -if(this.limit[B]){if($chk(this.limit[B][1])&&(this.value.now[B]>this.limit[B][1])){this.value.now[B]=this.limit[B][1];this.out=true;}else{if($chk(this.limit[B][0])&&(this.value.now[B]B.left&&A.xB.top);},stop:function(){if(this.overed&&!this.out){this.overed.fireEvent("drop",[this.element,this]); -}else{this.element.fireEvent("emptydrop",this);}this.parent();return this;}});Element.extend({makeDraggable:function(A){return new Drag.Move(this,A);}}); -var XHR=new Class({options:{method:"post",async:true,onRequest:Class.empty,onSuccess:Class.empty,onFailure:Class.empty,urlEncoded:true,encoding:"utf-8",autoCancel:false,headers:{}},setTransport:function(){this.transport=(window.XMLHttpRequest)?new XMLHttpRequest():(window.ie?new ActiveXObject("Microsoft.XMLHTTP"):false); -return this;},initialize:function(A){this.setTransport().setOptions(A);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers={};if(this.options.urlEncoded&&this.options.method=="post"){var B=(this.options.encoding)?"; charset="+this.options.encoding:""; -this.setHeader("Content-type","application/x-www-form-urlencoded"+B);}if(this.options.initialize){this.options.initialize.call(this);}},onStateChange:function(){if(this.transport.readyState!=4||!this.running){return ; -}this.running=false;var A=0;try{A=this.transport.status;}catch(B){}if(this.options.isSuccess.call(this,A)){this.onSuccess();}else{this.onFailure();}this.transport.onreadystatechange=Class.empty; -},isSuccess:function(A){return((A>=200)&&(A<300));},onSuccess:function(){this.response={text:this.transport.responseText,xml:this.transport.responseXML}; -this.fireEvent("onSuccess",[this.response.text,this.response.xml]);this.callChain();},onFailure:function(){this.fireEvent("onFailure",this.transport);},setHeader:function(A,B){this.headers[A]=B; -return this;},send:function(A,C){if(this.options.autoCancel){this.cancel();}else{if(this.running){return this;}}this.running=true;if(C&&this.options.method=="get"){A=A+(A.contains("?")?"&":"?")+C; -C=null;}this.transport.open(this.options.method.toUpperCase(),A,this.options.async);this.transport.onreadystatechange=this.onStateChange.bind(this);if((this.options.method=="post")&&this.transport.overrideMimeType){this.setHeader("Connection","close"); -}$extend(this.headers,this.options.headers);for(var B in this.headers){try{this.transport.setRequestHeader(B,this.headers[B]);}catch(D){}}this.fireEvent("onRequest"); -this.transport.send($pick(C,null));return this;},cancel:function(){if(!this.running){return this;}this.running=false;this.transport.abort();this.transport.onreadystatechange=Class.empty; -this.setTransport();this.fireEvent("onCancel");return this;}});XHR.implement(new Chain,new Events,new Options);var Ajax=XHR.extend({options:{data:null,update:null,onComplete:Class.empty,evalScripts:false,evalResponse:false},initialize:function(B,A){this.addEvent("onSuccess",this.onComplete); -this.setOptions(A);this.options.data=this.options.data||this.options.postBody;if(!["post","get"].contains(this.options.method)){this._method="_method="+this.options.method; -this.options.method="post";}this.parent();this.setHeader("X-Requested-With","XMLHttpRequest");this.setHeader("Accept","text/javascript, text/html, application/xml, text/xml, */*"); -this.url=B;},onComplete:function(){if(this.options.update){$(this.options.update).empty().setHTML(this.response.text);}if(this.options.evalScripts||this.options.evalResponse){this.evalScripts(); -}this.fireEvent("onComplete",[this.response.text,this.response.xml],20);},request:function(A){A=A||this.options.data;switch($type(A)){case"element":A=$(A).toQueryString(); -break;case"object":A=Object.toQueryString(A);}if(this._method){A=(A)?[this._method,A].join("&"):this._method;}return this.send(this.url,A);},evalScripts:function(){var B,A; -if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){A=this.response.text;}else{A=[];var C=/]*>([\s\S]*?)<\/script>/gi; -while((B=C.exec(this.response.text))){A.push(B[1]);}A=A.join("\n");}if(A){(window.execScript)?window.execScript(A):window.setTimeout(A,0);}},getHeader:function(A){try{return this.transport.getResponseHeader(A); -}catch(B){}return null;}});Object.toQueryString=function(B){var C=[];for(var A in B){C.push(encodeURIComponent(A)+"="+encodeURIComponent(B[A]));}return C.join("&"); -};Element.extend({send:function(A){return new Ajax(this.getProperty("action"),$merge({data:this.toQueryString()},A,{method:"post"})).request();}});var Cookie=new Abstract({options:{domain:false,path:false,duration:false,secure:false},set:function(C,D,B){B=$merge(this.options,B); -D=encodeURIComponent(D);if(B.domain){D+="; domain="+B.domain;}if(B.path){D+="; path="+B.path;}if(B.duration){var A=new Date();A.setTime(A.getTime()+B.duration*24*60*60*1000); -D+="; expires="+A.toGMTString();}if(B.secure){D+="; secure";}document.cookie=C+"="+D;return $extend(B,{key:C,value:D});},get:function(A){var B=document.cookie.match("(?:^|;)\\s*"+A.escapeRegExp()+"=([^;]*)"); -return B?decodeURIComponent(B[1]):false;},remove:function(B,A){if($type(B)=="object"){this.set(B.key,"",$merge(B,{duration:-1}));}else{this.set(B,"",$merge(A,{duration:-1})); -}}});var Json={toString:function(C){switch($type(C)){case"string":return'"'+C.replace(/(["\\])/g,"\\$1")+'"';case"array":return"["+C.map(Json.toString).join(",")+"]"; -case"object":var A=[];for(var B in C){A.push(Json.toString(B)+":"+Json.toString(C[B]));}return"{"+A.join(",")+"}";case"number":if(isFinite(C)){break;}case false:return"null"; -}return String(C);},evaluate:function(str,secure){return(($type(str)!="string")||(secure&&!str.test(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/)))?null:eval("("+str+")"); -}};Json.Remote=XHR.extend({initialize:function(B,A){this.url=B;this.addEvent("onSuccess",this.onComplete);this.parent(A);this.setHeader("X-Request","JSON"); -},send:function(A){return this.parent(this.url,"json="+Json.toString(A));},onComplete:function(){this.fireEvent("onComplete",[Json.evaluate(this.response.text,this.options.secure)]); -}});var Asset=new Abstract({javascript:function(C,B){B=$merge({onload:Class.empty},B);var A=new Element("script",{src:C}).addEvents({load:B.onload,readystatechange:function(){if(this.readyState=="complete"){this.fireEvent("load"); -}}});delete B.onload;return A.setProperties(B).inject(document.head);},css:function(B,A){return new Element("link",$merge({rel:"stylesheet",media:"screen",type:"text/css",href:B},A)).inject(document.head); -},image:function(C,B){B=$merge({onload:Class.empty,onabort:Class.empty,onerror:Class.empty},B);var D=new Image();D.src=C;var A=new Element("img",{src:C}); -["load","abort","error"].each(function(E){var F=B["on"+E];delete B["on"+E];A.addEvent(E,function(){this.removeEvent(E,arguments.callee);F.call(this);}); -});if(D.width&&D.height){A.fireEvent("load",A,1);}return A.setProperties(B);},images:function(D,C){C=$merge({onComplete:Class.empty,onProgress:Class.empty},C); -if(!D.push){D=[D];}var A=[];var B=0;D.each(function(F){var E=new Asset.image(F,{onload:function(){C.onProgress.call(this,B);B++;if(B==D.length){C.onComplete(); -}}});A.push(E);});return new Elements(A);}});var Hash=new Class({length:0,initialize:function(A){this.obj=A||{};this.setLength();},get:function(A){return(this.hasKey(A))?this.obj[A]:null; -},hasKey:function(A){return(A in this.obj);},set:function(A,B){if(!this.hasKey(A)){this.length++;}this.obj[A]=B;return this;},setLength:function(){this.length=0; -for(var A in this.obj){this.length++;}return this;},remove:function(A){if(this.hasKey(A)){delete this.obj[A];this.length--;}return this;},each:function(A,B){$each(this.obj,A,B); -},extend:function(A){$extend(this.obj,A);return this.setLength();},merge:function(){this.obj=$merge.apply(null,[this.obj].extend(arguments));return this.setLength(); -},empty:function(){this.obj={};this.length=0;return this;},keys:function(){var A=[];for(var B in this.obj){A.push(B);}return A;},values:function(){var A=[]; -for(var B in this.obj){A.push(this.obj[B]);}return A;}});function $H(A){return new Hash(A);}Hash.Cookie=Hash.extend({initialize:function(B,A){this.name=B; -this.options=$extend({autoSave:true},A||{});this.load();},save:function(){if(this.length==0){Cookie.remove(this.name,this.options);return true;}var A=Json.toString(this.obj); -if(A.length>4096){return false;}Cookie.set(this.name,A,this.options);return true;},load:function(){this.obj=Json.evaluate(Cookie.get(this.name),true)||{}; -this.setLength();}});Hash.Cookie.Methods={};["extend","set","merge","empty","remove"].each(function(A){Hash.Cookie.Methods[A]=function(){Hash.prototype[A].apply(this,arguments); -if(this.options.autoSave){this.save();}return this;};});Hash.Cookie.implement(Hash.Cookie.Methods);var Color=new Class({initialize:function(B,D){D=D||(B.push?"rgb":"hex"); -var C,A;switch(D){case"rgb":C=B;A=C.rgbToHsb();break;case"hsb":C=B.hsbToRgb();A=B;break;default:C=B.hexToRgb(true);A=C.rgbToHsb();}C.hsb=A;C.hex=C.rgbToHex(); -return $extend(C,Color.prototype);},mix:function(){var A=$A(arguments);var C=($type(A[A.length-1])=="number")?A.pop():50;var B=this.copy();A.each(function(D){D=new Color(D); -for(var E=0;E<3;E++){B[E]=Math.round((B[E]/100*(100-C))+(D[E]/100*C));}});return new Color(B,"rgb");},invert:function(){return new Color(this.map(function(A){return 255-A; -}));},setHue:function(A){return new Color([A,this.hsb[1],this.hsb[2]],"hsb");},setSaturation:function(A){return new Color([this.hsb[0],A,this.hsb[2]],"hsb"); -},setBrightness:function(A){return new Color([this.hsb[0],this.hsb[1],A],"hsb");}});function $RGB(C,B,A){return new Color([C,B,A],"rgb");}function $HSB(C,B,A){return new Color([C,B,A],"hsb"); -}Array.extend({rgbToHsb:function(){var B=this[0],C=this[1],J=this[2];var G,F,H;var I=Math.max(B,C,J),E=Math.min(B,C,J);var K=I-E;H=I/255;F=(I!=0)?K/I:0; -if(F==0){G=0;}else{var D=(I-B)/K;var A=(I-C)/K;var L=(I-J)/K;if(B==I){G=L-A;}else{if(C==I){G=2+D-L;}else{G=4+A-D;}}G/=6;if(G<0){G++;}}return[Math.round(G*360),Math.round(F*100),Math.round(H*100)]; -},hsbToRgb:function(){var C=Math.round(this[2]/100*255);if(this[1]==0){return[C,C,C];}else{var A=this[0]%360;var E=A%60;var F=Math.round((this[2]*(100-this[1]))/10000*255); -var D=Math.round((this[2]*(6000-this[1]*E))/600000*255);var B=Math.round((this[2]*(6000-this[1]*(60-E)))/600000*255);switch(Math.floor(A/60)){case 0:return[C,B,F]; -case 1:return[D,C,F];case 2:return[F,C,B];case 3:return[F,D,C];case 4:return[B,F,C];case 5:return[C,F,D];}}return false;}});var Scroller=new Class({options:{area:20,velocity:1,onChange:function(A,B){this.element.scrollTo(A,B); -}},initialize:function(B,A){this.setOptions(A);this.element=$(B);this.mousemover=([window,document].contains(B))?$(document.body):this.element;},start:function(){this.coord=this.getCoords.bindWithEvent(this); -this.mousemover.addListener("mousemove",this.coord);},stop:function(){this.mousemover.removeListener("mousemove",this.coord);this.timer=$clear(this.timer); -},getCoords:function(A){this.page=(this.element==window)?A.client:A.page;if(!this.timer){this.timer=this.scroll.periodical(50,this);}},scroll:function(){var A=this.element.getSize(); -var D=this.element.getPosition();var C={x:0,y:0};for(var B in this.page){if(this.page[B]<(this.options.area+D[B])&&A.scroll[B]!=0){C[B]=(this.page[B]-this.options.area-D[B])*this.options.velocity; -}else{if(this.page[B]+this.options.area>(A.size[B]+D[B])&&A.scroll[B]+A.size[B]!=A.scrollSize[B]){C[B]=(this.page[B]-A.size[B]+this.options.area-D[B])*this.options.velocity; -}}}if(C.y||C.x){this.fireEvent("onChange",[A.scroll.x+C.x,A.scroll.y+C.y]);}}});Scroller.implement(new Events,new Options);var Slider=new Class({options:{onChange:Class.empty,onComplete:Class.empty,onTick:function(A){this.knob.setStyle(this.p,A); -},mode:"horizontal",steps:100,offset:0},initialize:function(D,A,B){this.element=$(D);this.knob=$(A);this.setOptions(B);this.previousChange=-1;this.previousEnd=-1; -this.step=-1;this.element.addEvent("mousedown",this.clickedElement.bindWithEvent(this));var C,F;switch(this.options.mode){case"horizontal":this.z="x";this.p="left"; -C={x:"left",y:false};F="offsetWidth";break;case"vertical":this.z="y";this.p="top";C={x:false,y:"top"};F="offsetHeight";}this.max=this.element[F]-this.knob[F]+(this.options.offset*2); -this.half=this.knob[F]/2;this.getPos=this.element["get"+this.p.capitalize()].bind(this.element);this.knob.setStyle("position","relative").setStyle(this.p,-this.options.offset); -var E={};E[this.z]=[-this.options.offset,this.max-this.options.offset];this.drag=new Drag.Base(this.knob,{limit:E,modifiers:C,snap:0,onStart:function(){this.draggedKnob(); -}.bind(this),onDrag:function(){this.draggedKnob();}.bind(this),onComplete:function(){this.draggedKnob();this.end();}.bind(this)});if(this.options.initialize){this.options.initialize.call(this); -}},set:function(A){this.step=A.limit(0,this.options.steps);this.checkStep();this.end();this.fireEvent("onTick",this.toPosition(this.step));return this; -},clickedElement:function(B){var A=B.page[this.z]-this.getPos()-this.half;A=A.limit(-this.options.offset,this.max-this.options.offset);this.step=this.toStep(A); -this.checkStep();this.end();this.fireEvent("onTick",A);},draggedKnob:function(){this.step=this.toStep(this.drag.value.now[this.z]);this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step; -this.fireEvent("onChange",this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent("onComplete",this.step+""); -}},toStep:function(A){return Math.round((A+this.options.offset)/this.max*this.options.steps);},toPosition:function(A){return this.max*A/this.options.steps; -}});Slider.implement(new Events);Slider.implement(new Options);var SmoothScroll=Fx.Scroll.extend({initialize:function(B){this.parent(window,B);this.links=(this.options.links)?$$(this.options.links):$$(document.links); -var A=window.location.href.match(/^[^#]*/)[0]+"#";this.links.each(function(D){if(D.href.indexOf(A)!=0){return ;}var C=D.href.substr(A.length);if(C&&$(C)){this.useLink(D,C); -}},this);if(!window.webkit419){this.addEvent("onComplete",function(){window.location.hash=this.anchor;});}},useLink:function(B,A){B.addEvent("click",function(C){this.anchor=A; -this.toElement(A);C.stop();}.bindWithEvent(this));}});var Sortables=new Class({options:{handles:false,onStart:Class.empty,onComplete:Class.empty,ghost:true,snap:3,onDragStart:function(A,B){B.setStyle("opacity",0.7); -A.setStyle("opacity",0.7);},onDragComplete:function(A,B){A.setStyle("opacity",1);B.remove();this.trash.remove();}},initialize:function(D,B){this.setOptions(B); -this.list=$(D);this.elements=this.list.getChildren();this.handles=(this.options.handles)?$$(this.options.handles):this.elements;this.bound={start:[],moveGhost:this.moveGhost.bindWithEvent(this)}; -for(var C=0,A=this.handles.length;C0);var D=this.active.getPrevious();var C=this.active.getNext(); -if(D&&A&&BC.getCoordinates().top){this.active.injectAfter(C);}this.previous=B;},serialize:function(A){return this.list.getChildren().map(A||function(B){return this.elements.indexOf(B); -},this);},end:function(){this.previous=null;document.removeListener("mousemove",this.bound.move);document.removeListener("mouseup",this.bound.end);if(this.options.ghost){document.removeListener("mousemove",this.bound.moveGhost); -this.fireEvent("onDragComplete",[this.active,this.ghost]);}this.fireEvent("onComplete",this.active);}});Sortables.implement(new Events,new Options);var Tips=new Class({options:{onShow:function(A){A.setStyle("visibility","visible"); -},onHide:function(A){A.setStyle("visibility","hidden");},maxTitleChars:30,showDelay:100,hideDelay:100,className:"tool",offsets:{x:16,y:16},fixed:false},initialize:function(B,A){this.setOptions(A); -this.toolTip=new Element("div",{"class":this.options.className+"-tip",styles:{position:"absolute",top:"0",left:"0",visibility:"hidden"}}).inject(document.body); -this.wrapper=new Element("div").inject(this.toolTip);$$(B).each(this.build,this);if(this.options.initialize){this.options.initialize.call(this);}},build:function(B){B.$tmp.myTitle=(B.href&&B.getTag()=="a")?B.href.replace("http://",""):(B.rel||false); -if(B.title){var C=B.title.split("::");if(C.length>1){B.$tmp.myTitle=C[0].trim();B.$tmp.myText=C[1].trim();}else{B.$tmp.myText=B.title;}B.removeAttribute("title"); -}else{B.$tmp.myText=false;}if(B.$tmp.myTitle&&B.$tmp.myTitle.length>this.options.maxTitleChars){B.$tmp.myTitle=B.$tmp.myTitle.substr(0,this.options.maxTitleChars-1)+"…"; -}B.addEvent("mouseenter",function(D){this.start(B);if(!this.options.fixed){this.locate(D);}else{this.position(B);}}.bind(this));if(!this.options.fixed){B.addEvent("mousemove",this.locate.bindWithEvent(this)); -}var A=this.end.bind(this);B.addEvent("mouseleave",A);B.addEvent("trash",A);},start:function(A){this.wrapper.empty();if(A.$tmp.myTitle){this.title=new Element("span").inject(new Element("div",{"class":this.options.className+"-title"}).inject(this.wrapper)).setHTML(A.$tmp.myTitle); -}if(A.$tmp.myText){this.text=new Element("span").inject(new Element("div",{"class":this.options.className+"-text"}).inject(this.wrapper)).setHTML(A.$tmp.myText); -}$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);},end:function(A){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this); -},position:function(A){var B=A.getPosition();this.toolTip.setStyles({left:B.x+this.options.offsets.x,top:B.y+this.options.offsets.y});},locate:function(B){var D={x:window.getWidth(),y:window.getHeight()}; -var A={x:window.getScrollLeft(),y:window.getScrollTop()};var C={x:this.toolTip.offsetWidth,y:this.toolTip.offsetHeight};var G={x:"left",y:"top"};for(var E in G){var F=B.page[E]+this.options.offsets[E]; -if((F+C[E]-A[E])>D[E]){F=B.page[E]-this.options.offsets[E]-C[E];}this.toolTip.setStyle(G[E],F);}},show:function(){if(this.options.timeout){this.timer=this.hide.delay(this.options.timeout,this); -}this.fireEvent("onShow",[this.toolTip]);},hide:function(){this.fireEvent("onHide",[this.toolTip]);}});Tips.implement(new Events,new Options);var Group=new Class({initialize:function(){this.instances=$A(arguments); -this.events={};this.checker={};},addEvent:function(B,A){this.checker[B]=this.checker[B]||{};this.events[B]=this.events[B]||[];if(this.events[B].contains(A)){return false; -}else{this.events[B].push(A);}this.instances.each(function(C,D){C.addEvent(B,this.check.bind(this,[B,C,D]));},this);return this;},check:function(C,A,B){this.checker[C][B]=true; -var D=this.instances.every(function(F,E){return this.checker[C][E]||false;},this);if(!D){return ;}this.checker[C]={};this.events[C].each(function(E){E.call(this,this.instances,A); -},this);}});var Accordion=Fx.Elements.extend({options:{onActive:Class.empty,onBackground:Class.empty,display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var C,E,F,B; -$each(arguments,function(I,H){switch($type(I)){case"object":C=I;break;case"element":B=$(I);break;default:var G=$$(I);if(!E){E=G;}else{F=G;}}});this.togglers=E||[]; -this.elements=F||[];this.container=$(B);this.setOptions(C);this.previous=-1;if(this.options.alwaysHide){this.options.wait=true;}if($chk(this.options.show)){this.options.display=false; -this.previous=this.options.show;}if(this.options.start){this.options.display=false;this.options.show=false;}this.effects={};if(this.options.opacity){this.effects.opacity="fullOpacity"; -}if(this.options.width){this.effects.width=this.options.fixedWidth?"fullWidth":"offsetWidth";}if(this.options.height){this.effects.height=this.options.fixedHeight?"fullHeight":"scrollHeight"; -}for(var D=0,A=this.togglers.length;D0));this.fireEvent(C?"onBackground":"onActive",[this.togglers[D],E]); -for(var F in this.effects){B[D][F]=C?0:E[this.effects[F]];}},this);return this.start(B);},showThisHideOpen:function(A){return this.display(A);}});Fx.Accordion=Accordion; diff --git a/fp-plugins/jsutils/res/mootools.js.old b/fp-plugins/jsutils/res/mootools.js.old deleted file mode 100644 index 1c45023..0000000 --- a/fp-plugins/jsutils/res/mootools.js.old +++ /dev/null @@ -1,3 +0,0 @@ -//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, , MIT Style License. - -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('o 8F={8G:\'1.11\'};h $4G(U){k(U!=88)};h $q(U){m(!$4G(U))k T;m(U.3c)k\'P\';o q=4p U;m(q==\'2d\'&&U.8H){1S(U.5K){14 1:k\'P\';14 3:k(/\\S/).28(U.78)?\'8I\':\'8E\'}}m(q==\'2d\'||q==\'h\'){1S(U.7F){14 1I:k\'18\';14 5i:k\'63\';14 12:k\'7g\'}m(4p U.R==\'4P\'){m(U.26)k\'8D\';m(U.6d)k\'Q\'}}k q};h $1L(){o 3A={};H(o i=0;i-1:c.2P(2p)>-1},6J:h(){k c.2w(/([.*+?^${}()|[\\]\\/\\\\])/g,\'\\\\$1\')}});1I.L({4t:h(18){m(c.R<3)k T;m(c.R==4&&c[3]==0&&!18)k\'8Z\';o 2M=[];H(o i=0;i<3;i++){o 3l=(c[i]-0).90(16);2M.1f((3l.R==1)?\'0\'+3l:3l)}k 18?2M:\'#\'+2M.1J(\'\')},4x:h(18){m(c.R!=3)k T;o 1T=[];H(o i=0;i<3;i++){1T.1f(3M((c[i].R==1)?c[i]+c[i]:c[i],16))}k 18?1T:\'1T(\'+1T.1J(\',\')+\')\'}});5N.L({23:h(r){o F=c;r=$1L({\'J\':F,\'B\':T,\'Q\':1a,\'1H\':T,\'2R\':T,\'4f\':T},r);m($3a(r.Q)&&$q(r.Q)!=\'18\')r.Q=[r.Q];k h(B){o Y;m(r.B){B=B||E.B;Y=[(r.B===1e)?B:M r.B(B)];m(r.Q)Y.L(r.Q)}V Y=r.Q||Q;o 2g=h(){k F.3r($3S(r.J,F),Y)};m(r.1H)k 7w(2g,r.1H);m(r.2R)k 9l(2g,r.2R);m(r.4f)3t{k 2g()}3m(9k){k T};k 2g()}},9m:h(Y,J){k c.23({\'Q\':Y,\'J\':J})},4f:h(Y,J){k c.23({\'Q\':Y,\'J\':J,\'4f\':1e})()},J:h(J,Y){k c.23({\'J\':J,\'Q\':Y})},9o:h(J,Y){k c.23({\'J\':J,\'B\':1e,\'Q\':Y})},1H:h(1H,J,Y){k c.23({\'1H\':1H,\'J\':J,\'Q\':Y})()},2R:h(84,J,Y){k c.23({\'2R\':84,\'J\':J,\'Q\':Y})()}});8b.L({4i:h(){k 3M(c)},82:h(){k 3K(c)},81:h(2J,1Y){k 15.2J(1Y,15.1Y(2J,c))},3h:h(43){43=15.2U(10,43||0);k 15.3h(c*43)/43},9f:h(F){H(o i=0;i\'}t=I.7z(t)}t=$(t);k(!1k||!t)?t:t.2e(1k)}});o 2D=M 12({1x:h(17){k(17)?$L(17,c):c}});2D.L=h(1k){H(o 1t 1b 1k){c.1h[1t]=1k[1t];c[1t]=$3o.49(1t)}};h $(t){m(!t)k 1a;m(t.3c)k 1N.3d(t);m([E,I].19(t))k t;o q=$q(t);m(q==\'2p\'){t=I.9r(t);q=(t)?\'P\':T}m(q!=\'P\')k 1a;m(t.3c)k 1N.3d(t);m([\'2d\',\'9g\'].19(t.6M.3B()))k t;$L(t,G.1h);t.3c=h(){};k 1N.3d(t)};I.6L=I.30;h $$(){o 17=[];H(o i=0,j=Q.R;i0&&4A<13)c.1r=\'f\'+4A}c.1r=c.1r||5d.c3(c.4s).3B()}V m(c.q.28(/(5W|bR|c2)/)){c.bQ={\'x\':B.5t||B.6Q+I.1X.3X,\'y\':B.5u||B.6x+I.1X.3C};c.bP={\'x\':B.5t?B.5t-E.7R:B.6Q,\'y\':B.5u?B.5u-E.7S:B.6x};c.bN=(B.6F==3)||(B.bO==2);1S(c.q){14\'5Q\':c.1y=B.1y||B.bT;1C;14\'5P\':c.1y=B.1y||B.6i}c.6y()}k c},2f:h(){k c.4w().4z()},4w:h(){m(c.B.4w)c.B.4w();V c.B.c0=1e;k c},4z:h(){m(c.B.4z)c.B.4z();V c.B.bY=T;k c}});1W.4L={1y:h(){m(c.1y&&c.1y.5K==3)c.1y=c.1y.2x},6s:h(){3t{1W.4L.1y.1z(c)}3m(e){c.1y=c.2j}}};1W.1h.6y=(E.5H)?1W.4L.6s:1W.4L.1y;1W.1u=M 2h({\'bV\':13,\'bU\':38,\'c1\':40,\'2C\':37,\'5A\':39,\'b7\':27,\'aj\':32,\'ak\':8,\'al\':9,\'42\':46});G.2r.22={1K:h(q,F){c.$O=c.$O||{};c.$O[q]=c.$O[q]||{\'1u\':[],\'1q\':[]};m(c.$O[q].1u.19(F))k c;c.$O[q].1u.1f(F);o 4X=q;o 1E=G.22[q];m(1E){m(1E.5D)1E.5D.1z(c,F);m(1E.29)F=1E.29;m(1E.q)4X=1E.q}m(!c.5J)F=F.23({\'J\':c,\'B\':1e});c.$O[q].1q.1f(F);k(G.5L.19(4X))?c.2W(4X,F):c},3G:h(q,F){m(!c.$O||!c.$O[q])k c;o 1U=c.$O[q].1u.2P(F);m(1U==-1)k c;o 1r=c.$O[q].1u.4W(1U,1)[0];o C=c.$O[q].1q.4W(1U,1)[0];o 1E=G.22[q];m(1E){m(1E.2X)1E.2X.1z(c,F);m(1E.q)q=1E.q}k(G.5L.19(q))?c.6T(q,C):c},4k:h(1p){k G.4Z(c,\'1K\',1p)},51:h(q){m(!c.$O)k c;m(!q){H(o 53 1b c.$O)c.51(53);c.$O=1a}V m(c.$O[q]){c.$O[q].1u.1o(h(F){c.3G(q,F)},c);c.$O[q]=1a}k c},1B:h(q,Y,1H){m(c.$O&&c.$O[q]){c.$O[q].1u.1o(h(F){F.23({\'J\':c,\'1H\':1H,\'Q\':Y})()},c)}k c},6W:h(K,q){m(!K.$O)k c;m(!q){H(o 53 1b K.$O)c.6W(K,53)}V m(K.$O[q]){K.$O[q].1u.1o(h(F){c.1K(q,F)},c)}k c}};E.L(G.2r.22);I.L(G.2r.22);G.L(G.2r.22);G.22=M 2h({\'6P\':{q:\'5Q\',29:h(B){B=M 1W(B);m(B.1y!=c&&!c.5I(B.1y))c.1B(\'6P\',B)}},\'6I\':{q:\'5P\',29:h(B){B=M 1W(B);m(B.1y!=c&&!c.5I(B.1y))c.1B(\'6I\',B)}},\'3b\':{q:(E.5H)?\'5M\':\'3b\'}});G.5L=[\'5W\',\'av\',\'at\',\'as\',\'3b\',\'5M\',\'5Q\',\'5P\',\'ao\',\'6N\',\'aq\',\'ar\',\'3n\',\'5O\',\'87\',\'ad\',\'ac\',\'a0\',\'a1\',\'8e\',\'a2\',\'9Z\',\'2Q\',\'7X\',\'6e\',\'9Y\',\'3g\'];5N.L({8j:h(J,Y){k c.23({\'J\':J,\'Q\':Y,\'B\':1W})}});G.L({2V:h(){1S(c.4c()){14\'2Q\':o 1q=[];$1o(c.r,h(2q){m(2q.5G)1q.1f($3S(2q.C,2q.1m))});k(c.5F)?1q:1q[0];14\'7E\':m(!(c.5y&&[\'aa\',\'ab\'].19(c.q))&&![\'5x\',\'1m\',\'a9\'].19(c.q))1C;14\'7G\':k c.C}k T},7W:h(){k $$(c.30(\'7E\'),c.30(\'2Q\'),c.30(\'7G\'))},3J:h(){o 3k=[];c.7W().1o(h(t){o 1j=t.1j;o C=t.2V();m(C===T||!1j||t.5w)k;o 5v=h(2L){3k.1f(1j+\'=\'+4Q(2L))};m($q(C)==\'18\')C.1o(5v);V 5v(C)});k 3k.1J(\'&\')}});G.L({2F:h(x,y){c.3X=x;c.3C=y},6l:h(){k{\'3g\':{\'x\':c.3X,\'y\':c.3C},\'2S\':{\'x\':c.5B,\'y\':c.5R},\'6q\':{\'x\':c.4j,\'y\':c.4e}}},2Z:h(1Q){1Q=1Q||[];o t=c,2C=0,2i=0;a8{2C+=t.a5||0;2i+=t.a6||0;t=t.a7}4B(t);1Q.1o(h(P){2C-=P.3X||0;2i-=P.3C||0});k{\'x\':2C,\'y\':2i}},aw:h(1Q){k c.2Z(1Q).y},ax:h(1Q){k c.2Z(1Q).x},aW:h(1Q){o 5z=c.2Z(1Q);o U={\'3s\':c.5B,\'48\':c.5R,\'2C\':5z.x,\'2i\':5z.y};U.5A=U.2C+U.3s;U.5E=U.2i+U.48;k U}});G.22.5C={5D:h(F){m(E.4h){F.1z(c);k}o 3D=h(){m(E.4h)k;E.4h=1e;E.1M=$55(E.1M);c.1B(\'5C\')}.J(c);m(I.3q&&E.2O){E.1M=h(){m([\'4h\',\'68\'].19(I.3q))3D()}.2R(50)}V m(I.3q&&E.1R){m(!$(\'5S\')){o 2I=(E.36.aY==\'aZ:\')?\'://0\':\'67:b5(0)\';I.b6(\'<1D b4="5S" b3 2I="\'+2I+\'"><\\/1D>\');$(\'5S\').4J=h(){m(c.3q==\'68\')3D()}}}V{E.2W("3n",3D);I.2W("b2",3D)}}};E.aQ=h(F){k c.1K(\'5C\',F)};E.L({7N:h(){m(c.4U)k c.aE;m(c.7K)k I.4l.8a;k I.1X.8a},7C:h(){m(c.4U)k c.aF;m(c.7K)k I.4l.80;k I.1X.80},7D:h(){m(c.1R)k 15.1Y(I.1X.5B,I.1X.4j);m(c.2O)k I.4l.4j;k I.1X.4j},7H:h(){m(c.1R)k 15.1Y(I.1X.5R,I.1X.4e);m(c.2O)k I.4l.4e;k I.1X.4e},7I:h(){k c.7R||I.1X.3X},7M:h(){k c.7S||I.1X.3C},6l:h(){k{\'2S\':{\'x\':c.7N(),\'y\':c.7C()},\'6q\':{\'x\':c.7D(),\'y\':c.7H()},\'3g\':{\'x\':c.7I(),\'y\':c.7M()}}},2Z:h(){k{\'x\':0,\'y\':0}}});o W={};W.3U=M 12({r:{6o:12.1l,2a:12.1l,5T:12.1l,1v:h(p){k-(15.8i(15.6f*p)-1)/2},2G:aH,2c:\'3F\',3x:1e,8k:50},1x:h(r){c.P=c.P||1a;c.4K(r);m(c.r.1x)c.r.1x.1z(c)},8d:h(){o 2n=$2n();m(2n=(7-4*a)/11){C=-15.2U((11-6*a-11*p)/4,2)+b*b;1C}}k C},a4:h(p,x){k 15.2U(2,10*--p)*15.8i(20*p*15.6f*(x[0]||1)/3)}});[\'a3\',\'9X\',\'9W\',\'9V\'].1o(h(1v,i){W.2b[1v]=M W.69(h(p){k 15.2U(p,[i+2])});W.2b.66(1v)});o 5Z=M 12({r:{1P:\'3j\',7A:1e,7h:12.1l,3N:12.1l,4y:12.1l,7B:1e,3E:\'au-8\',6A:T,2N:{}},5U:h(){c.1F=(E.4n)?M 4n():(E.1R?M 6O(\'an.am\'):T);k c},1x:h(r){c.5U().4K(r);c.r.3y=c.r.3y||c.3y;c.2N={};m(c.r.7B&&c.r.1P==\'3j\'){o 3E=(c.r.3E)?\'; b8=\'+c.r.3E:\'\';c.3R(\'7e-q\',\'6H/x-af-ae-ah\'+3E)}m(c.r.1x)c.r.1x.1z(c)},7q:h(){m(c.1F.3q!=4||!c.3f)k;c.3f=T;o 2Y=0;3t{2Y=c.1F.2Y}3m(e){};m(c.r.3y.1z(c,2Y))c.3N();V c.4y();c.1F.4J=12.1l},3y:h(2Y){k((2Y>=ai)&&(2Y]*>([\\s\\S]*?)<\\/1D>/8P;4B((1D=63.8l(c.2z.1m)))2m.1f(1D[1]);2m=2m.1J(\'\\n\')}m(2m)(E.7v)?E.7v(2m):E.7w(2m,0)},7x:h(1j){3t{k c.1F.9D(1j)}3m(e){};k 1a}});5V.3J=h(1p){o 3k=[];H(o u 1b 1p)3k.1f(4Q(u)+\'=\'+4Q(1p[u]));k 3k.1J(\'&\')};G.L({4O:h(r){k M 7k(c.4N(\'9u\'),$1L({1i:c.3J()},r,{1P:\'3j\'})).6z()}});o 9I=M 2h({r:{4T:T,4S:T,2G:T,6b:T},2e:h(1r,C,r){r=$1L(c.r,r);C=4Q(C);m(r.4T)C+=\'; 4T=\'+r.4T;m(r.4S)C+=\'; 4S=\'+r.4S;m(r.2G){o 4b=M 6t();4b.9L(4b.6S()+r.2G*24*60*60*6G);C+=\'; 91=\'+4b.9b()}m(r.6b)C+=\'; 6b\';I.2T=1r+\'=\'+C;k $L(r,{\'1r\':1r,\'C\':C})},6a:h(1r){o C=I.2T.21(\'(?:^|;)\\\\s*\'+1r.6J()+\'=([^;]*)\');k C?9j(C[1]):T},2X:h(2T,r){m($q(2T)==\'2d\')c.2e(2T.1r,\'\',$1L(2T,{2G:-1}));V c.2e(2T,\'\',$1L(r,{2G:-1}))}});o 7T=M 2h({67:h(1p,1c){1c=$1L({\'3O\':12.1l},1c);o 1D=M G(\'1D\',{\'2I\':1p}).4k({\'3n\':1c.3O,\'9d\':h(){m(c.3q==\'68\')c.1B(\'3n\')}});42 1c.3O;k 1D.4M(1c).2y(I.4q)},1n:h(1p,1c){k M G(\'2K\',$1L({\'9e\':\'9c\',\'9i\':\'9n\',\'q\':\'1m/1n\',\'3P\':1p},1c)).2y(I.4q)},3u:h(1p,1c){1c=$1L({\'3O\':12.1l,\'9a\':12.1l,\'8Y\':12.1l},1c);o 3u=M 94();3u.2I=1p;o P=M G(\'65\',{\'2I\':1p});[\'3n\',\'6e\',\'7X\'].1o(h(q){o B=1c[\'3Q\'+q];42 1c[\'3Q\'+q];P.1K(q,h(){c.3G(q,Q.6d);B.1z(c)})});m(3u.3s&&3u.48)P.1B(\'3n\',P,1);k P.4M(1c)},52:h(3v,r){r=$1L({2a:12.1l,7P:12.1l},r);m(!3v.1f)3v=[3v];o 52=[];o 4D=0;3v.1o(h(1p){o 65=M 7T.3u(1p,{\'3O\':h(){r.7P.1z(c,4D);4D++;m(4D==3v.R)r.2a()}});52.1f(65)});k M 2D(52)}});o 9N=W.7L.L({1x:h(r){c.1G(E,r);c.41=(c.r.41)?$$(c.r.41):$$(I.41);o 36=E.36.3P.21(/^[^#]*/)[0]+\'#\';c.41.1o(h(2K){m(2K.3P.2P(36)!=0)k;o 2o=2K.3P.9v(36.R);m(2o&&$(2o))c.7V(2K,2o)},c);m(!E.4U)c.1K(\'2a\',h(){E.36.9w=c.2o})},7V:h(2K,2o){2K.1K(\'5W\',h(B){c.2o=2o;c.6i(2o);B.2f()}.8j(c))}});',62,750,'||||||||||||this|||||function|||return||if||var||type|options||el|property|||||||event|value||window|fn|Element|for|document|bind|from|extend|new|to|events|element|arguments|length||false|obj|else|Fx||args||||Class||case|Math||elements|array|contains|null|in|properties|style|true|push|result|prototype|data|name|props|empty|text|css|each|source|values|key|now|prop|keys|transition|className|initialize|relatedTarget|call|start|fireEvent|break|script|custom|transport|parent|delay|Array|join|addEvent|merge|timer|Garbage|opacity|method|overflown|ie|switch|rgb|pos|params|Event|documentElement|max|parsed||match|Events|create||parse|item||test|map|onComplete|Transitions|unit|object|set|stop|returns|Abstract|top|target|url|index|scripts|time|anchor|string|option|Methods|Styles|CSS|previous|iterable|replace|parentNode|inject|response|getStyle|border|left|Elements|tmp|scrollTo|duration|tag|src|min|link|val|hex|headers|webkit|indexOf|select|periodical|size|cookie|pow|getValue|addListener|remove|status|getPosition|getElementsByTagName|chains||current|fromTo|compute|location||||chk|mousewheel|htmlElement|collect|results|running|scroll|round|len|post|queryString|bit|catch|load|native|selector|readyState|apply|width|try|image|sources|fx|wait|isSuccess|klass|mix|toLowerCase|scrollTop|domReady|encoding|px|removeEvent|xml|setNow|toQueryString|parseFloat|HTMLElement|parseInt|onSuccess|onload|href|on|setHeader|pick|increase|Base|_method|getNow|scrollLeft|next|walk||links|delete|precision|mp|color||end|height|generic|regex|date|getTag|proto|scrollHeight|attempt|forEach|loaded|toInt|scrollWidth|addEvents|body|items|XMLHttpRequest|included|typeof|head|visibility|code|rgbToHex|brother|currentStyle|stopPropagation|hexToRgb|onFailure|preventDefault|fKey|while|Listeners|counter|Properties|evalScripts|defined|trash|setProperty|onreadystatechange|setOptions|fix|setProperties|getProperty|send|number|encodeURIComponent|setStyle|path|domain|webkit419|Multi|splice|realType|every|setMany||removeEvents|images|evType|Color|clear|cssText|node|flag|camelCase|hasClass|firstChild|innerText|String|pairs|getMany|padding|clean|RegExp|random|include|newArray|merged|charAt|unique|appendChild|default|first|insertBefore|pageX|pageY|qs|disabled|hidden|checked|position|right|offsetWidth|domready|add|bottom|multiple|selected|gecko|hasChild|addEventListener|nodeType|NativeEvents|DOMMouseScroll|Function|unload|mouseout|mouseover|offsetHeight|ie_ready|onCancel|setTransport|Object|click|transitions|implement|XHR||Options|Chain|regexp|toUpperCase|img|compat|javascript|complete|Transition|get|secure|callChain|callee|abort|PI|evalResponse|easeType|toElement|update|bound|getSize|setHTML|offset|onStart|Style|scrollSize|0px|relatedTargetGecko|Date|contents|argument|capitalize|clientY|fixRelatedTarget|request|autoCancel|after|addClass|removeClass|Width|which|1000|application|mouseleave|escapeRegExp|fixStyle|getElementsBySelector|tagName|keydown|ActiveXObject|mouseenter|clientX|where|getTime|removeListener|elementsProperty|textContent|cloneEvents|before|setStyles|removeEventListener|Right|PropertiesIFlag|getLast|continue|cancel|margin|Top|childNodes|nodeValue|removeChild|appendText|direction|styleSheet|Left|Content|Bottom|class|onRequest|getNext|filter|Ajax|innerHTML|zoom|visible|borderShort|setOpacity|onStateChange|wheelDelta|defaultView|shift|extended|execScript|setTimeout|getHeader|hyphenate|createElement|async|urlEncoded|getHeight|getScrollWidth|input|constructor|textarea|getScrollHeight|getScrollLeft|trim|opera|Scroll|getScrollTop|getWidth|pp|onProgress|sin|pageXOffset|pageYOffset|Asset|Merge|useLink|getFormElements|error|copy|slice|clientHeight|limit|toFloat|ie6|interval|Single|split|beforeunload|undefined|wheelStops|clientWidth|Number|full|step|change|delta|xpath|picked|cos|bindWithEvent|fps|exec|getBoxObjectFor|Document|getPrevious|evaluate|Sibling|navigator|getFirst|all|ie7|webkit420|taintEnabled|getProperties|floor|getText|clearTimeout|ecma|java|collection|whitespace|MooTools|version|nodeName|textnode|setText|setAttribute|getAttribute|Window|getChildren|getParent|gi|attributes|getStyles|removeAttribute|removeProperty|clearInterval|lastChild|alpha|injectBefore|onerror|transparent|toString|expires|styles|injectAfter|Image|concat|clone|adopt|injectTop|injectInside|onabort|toGMTString|stylesheet|readystatechange|rel|times|embed|boolean|media|decodeURIComponent|err|setInterval|pass|screen|bindAsEventListener|cloneNode|replaceWith|getElementById|100|hasLayout|action|substr|hash|BackgroundImageCache|execCommand|getPropertyValue|iframe|getComputedStyle|DOMElement|getResponseHeader|zIndex|chain|toggleClass|getRandom|Cookie|createTextNode|replaceChild|setTime|associate|SmoothScroll|cssFloat|clearChain|some|styleFloat|float|khtml|accessKey|Quint|Quart|Cubic|contextmenu|reset|focus|blur|submit|Quad|Elastic|offsetLeft|offsetTop|offsetParent|do|password|checkbox|radio|move|resize|form|www|html|urlencoded|200|space|backspace|tab|XMLHTTP|Microsoft|mousemove||keypress|keyup|mousedown|mouseup|utf|dblclick|getTop|getLeft|linear|easeInOut|easeOut|In|Out|InOut|innerWidth|innerHeight|easeIn|500|toTop|effects|effect|clearTimer|toBottom|toRight|toLeft|ease|onDomReady|Sine|acos|Circ|Back|618|getCoordinates|Bounce|protocol|https|Expo|Pow|DOMContentLoaded|defer|id|void|write|esc|charset|close|CollectGarbage|srcElement|setRequestHeader|detachEvent|frameborder|frameBorder|attachEvent|shiftKey|control|120|detail|keyCode|wheel|meta|ctrlKey|alt|altKey|readOnly|readonly|borderColor|postBody|htmlFor|borderStyle|borderWidth|Accept|With|Requested|colspan|colSpan|tabIndex|maxlength|maxLength|tabindex|hide|rowspan|rowSpan|accesskey|111|metaKey|rightClick|button|client|page|mouse|300|fromElement|up|enter|responseText|responseXML|returnValue|open|cancelBubble|down|menu|fromCharCode|overrideMimeType|Connection'.split('|'),0,{})) diff --git a/fp-plugins/lightbox/imgs/close.gif b/fp-plugins/lightbox/imgs/close.gif deleted file mode 100755 index ca517b6..0000000 Binary files a/fp-plugins/lightbox/imgs/close.gif and /dev/null differ diff --git a/fp-plugins/lightbox/imgs/closelabel.gif b/fp-plugins/lightbox/imgs/closelabel.gif deleted file mode 100644 index 87b4f8b..0000000 Binary files a/fp-plugins/lightbox/imgs/closelabel.gif and /dev/null differ diff --git a/fp-plugins/lightbox/imgs/loading.gif b/fp-plugins/lightbox/imgs/loading.gif deleted file mode 100644 index f864d5f..0000000 Binary files a/fp-plugins/lightbox/imgs/loading.gif and /dev/null differ diff --git a/fp-plugins/lightbox/imgs/next.gif b/fp-plugins/lightbox/imgs/next.gif deleted file mode 100755 index 1fe6ca1..0000000 Binary files a/fp-plugins/lightbox/imgs/next.gif and /dev/null differ diff --git a/fp-plugins/lightbox/imgs/nextlabel.gif b/fp-plugins/lightbox/imgs/nextlabel.gif deleted file mode 100644 index 7c66121..0000000 Binary files a/fp-plugins/lightbox/imgs/nextlabel.gif and /dev/null differ diff --git a/fp-plugins/lightbox/imgs/overlay.png b/fp-plugins/lightbox/imgs/overlay.png deleted file mode 100755 index 7cee298..0000000 Binary files a/fp-plugins/lightbox/imgs/overlay.png and /dev/null differ diff --git a/fp-plugins/lightbox/imgs/prev.gif b/fp-plugins/lightbox/imgs/prev.gif deleted file mode 100755 index aefa804..0000000 Binary files a/fp-plugins/lightbox/imgs/prev.gif and /dev/null differ diff --git a/fp-plugins/lightbox/imgs/prevlabel.gif b/fp-plugins/lightbox/imgs/prevlabel.gif deleted file mode 100644 index 0641876..0000000 Binary files a/fp-plugins/lightbox/imgs/prevlabel.gif and /dev/null differ diff --git a/fp-plugins/lightbox/lang/lang.en-us.php b/fp-plugins/lightbox/lang/lang.en-us.php deleted file mode 100644 index 6db1fd5..0000000 --- a/fp-plugins/lightbox/lang/lang.en-us.php +++ /dev/null @@ -1,5 +0,0 @@ - 'This plugin require jsUtils to be loaded. Maybe plugins have been loaded in wrong order' - ); -?> \ No newline at end of file diff --git a/fp-plugins/lightbox/plugin.lightbox.php b/fp-plugins/lightbox/plugin.lightbox.php deleted file mode 100755 index 3d5286e..0000000 --- a/fp-plugins/lightbox/plugin.lightbox.php +++ /dev/null @@ -1,47 +0,0 @@ -SlimBox requires Mootools (jsutils plugin) -Author: NoWhereMan -Author URI: http://www.flatpress.org/ -*/ - - -// if PLUGINS_DIR is not fp-plugins please edit res/lightbox.js - -function plugin_lightbox_setup() { - return function_exists('plugin_jsutils_head')? 1:-1; -} - -function plugin_lightbox_head() { - - $pdir=plugin_geturl('lightbox'); - echo << - - -LBOXHEAD; -} -add_action('wp_head', 'plugin_lightbox_head'); - -function plugin_lightbox_footer() { - - $pdir=plugin_geturl('lightbox'); - echo << - - -LBOXHEAD; -} -add_action('wp_footer', 'plugin_lightbox_footer'); - -function plugin_lightbox_hook($popup, $abspath) { - global $lightbox_rel; - // the other $popup is just dropped - return $lightbox_rel? "rel=\"lightbox[$lightbox_rel]\"" : ' rel="lightbox"'; -} -add_action('bbcode_img_popup', 'plugin_lightbox_hook', 5, 2); - -?> diff --git a/fp-plugins/lightbox/res/slimbox.css b/fp-plugins/lightbox/res/slimbox.css deleted file mode 100644 index ea2a156..0000000 --- a/fp-plugins/lightbox/res/slimbox.css +++ /dev/null @@ -1,76 +0,0 @@ -/* SLIMBOX */ - -#lbOverlay { - position: absolute; - left: 0; - width: 100%; - background-color: #000; - cursor: pointer; -} - -#lbCenter, #lbBottomContainer { - position: absolute; - left: 50%; - overflow: hidden; - background-color: #fff; -} - -.lbLoading { - background: #fff url(../imgs/loading.gif) no-repeat center; -} - -#lbImage { - border: 10px solid #fff; -} - -#lbPrevLink, #lbNextLink { - display: block; - position: absolute; - top: 0; - width: 50%; - outline: none; -} - -#lbPrevLink { - left: 0; -} - -#lbPrevLink:hover { - background: transparent url(../imgs/prevlabel.gif) no-repeat 0% 15%; -} - -#lbNextLink { - right: 0; -} - -#lbNextLink:hover { - background: transparent url(../imgs/nextlabel.gif) no-repeat 100% 15%; -} - -#lbBottom { - font-family: Verdana, Helvetica, sans-serif; - font-size: 10px; - color: #666; - line-height: 1.4em; - text-align: left; - border: 10px solid #fff; - border-top-style: none; -} - -#lbCloseLink { - display: block; - float: right; - width: 66px; - height: 22px; - background: transparent url(../imgs/closelabel.gif) no-repeat center; - margin: 5px 0; -} - -#lbCaption, #lbNumber { - margin-right: 71px; -} - -#lbCaption { - font-weight: bold; -} - diff --git a/fp-plugins/lightbox/res/slimbox.js b/fp-plugins/lightbox/res/slimbox.js deleted file mode 100644 index 685272e..0000000 --- a/fp-plugins/lightbox/res/slimbox.js +++ /dev/null @@ -1,194 +0,0 @@ -/* - Slimbox v1.4 - The ultimate lightweight Lightbox clone - by Christophe Beyls (http://www.digitalia.be) - MIT-style license. - Inspired by the original Lightbox v2 by Lokesh Dhakar. -*/ - -var Lightbox = { - - init: function(options){ - this.options = $extend({ - resizeDuration: 400, - resizeTransition: false, // default transition - initialWidth: 250, - initialHeight: 250, - animateCaption: true, - showCounter: true - }, options || {}); - - this.anchors = []; - $each(document.links, function(el){ - if (el.rel && el.rel.test(/^lightbox/i)){ - el.onclick = this.click.pass(el, this); - this.anchors.push(el); - } - }, this); - this.eventKeyDown = this.keyboardListener.bindAsEventListener(this); - this.eventPosition = this.position.bind(this); - - this.overlay = new Element('div', {'id': 'lbOverlay'}).injectInside(document.body); - - this.center = new Element('div', {'id': 'lbCenter', 'styles': {'width': this.options.initialWidth, 'height': this.options.initialHeight, 'marginLeft': -(this.options.initialWidth/2), 'display': 'none'}}).injectInside(document.body); - this.image = new Element('div', {'id': 'lbImage'}).injectInside(this.center); - this.prevLink = new Element('a', {'id': 'lbPrevLink', 'href': '#', 'styles': {'display': 'none'}}).injectInside(this.image); - this.nextLink = this.prevLink.clone().setProperty('id', 'lbNextLink').injectInside(this.image); - this.prevLink.onclick = this.previous.bind(this); - this.nextLink.onclick = this.next.bind(this); - - this.bottomContainer = new Element('div', {'id': 'lbBottomContainer', 'styles': {'display': 'none'}}).injectInside(document.body); - this.bottom = new Element('div', {'id': 'lbBottom'}).injectInside(this.bottomContainer); - new Element('a', {'id': 'lbCloseLink', 'href': '#'}).injectInside(this.bottom).onclick = this.overlay.onclick = this.close.bind(this); - this.caption = new Element('div', {'id': 'lbCaption'}).injectInside(this.bottom); - this.number = new Element('div', {'id': 'lbNumber'}).injectInside(this.bottom); - new Element('div', {'styles': {'clear': 'both'}}).injectInside(this.bottom); - - var nextEffect = this.nextEffect.bind(this); - this.fx = { - overlay: this.overlay.effect('opacity', {duration: 500}).hide(), - resize: this.center.effects($extend({duration: this.options.resizeDuration, onComplete: nextEffect}, this.options.resizeTransition ? {transition: this.options.resizeTransition} : {})), - image: this.image.effect('opacity', {duration: 500, onComplete: nextEffect}), - bottom: this.bottom.effect('margin-top', {duration: 400, onComplete: nextEffect}) - }; - - this.preloadPrev = new Image(); - this.preloadNext = new Image(); - }, - - click: function(link){ - if (link.rel.length == 8) return this.show(link.href, link.title); - - var j, imageNum, images = []; - this.anchors.each(function(el){ - if (el.rel == link.rel){ - for (j = 0; j < images.length; j++) if(images[j][0] == el.href) break; - if (j == images.length){ - images.push([el.href, el.title]); - if (el.href == link.href) imageNum = j; - } - } - }, this); - return this.open(images, imageNum); - }, - - show: function(url, title){ - return this.open([[url, title]], 0); - }, - - open: function(images, imageNum){ - this.images = images; - this.position(); - this.setup(true); - this.top = window.getScrollTop() + (window.getHeight() / 15); - this.center.setStyles({top: this.top, display: ''}); - this.fx.overlay.start(0.8); - return this.changeImage(imageNum); - }, - - position: function(){ - this.overlay.setStyles({'top': window.getScrollTop(), 'height': window.getHeight()}); - }, - - setup: function(open){ - var elements = $A(document.getElementsByTagName('object')); - elements.extend(document.getElementsByTagName(window.ie ? 'select' : 'embed')); - elements.each(function(el){ - if (open) el.lbBackupStyle = el.style.visibility; - el.style.visibility = open ? 'hidden' : el.lbBackupStyle; - }); - var fn = open ? 'addEvent' : 'removeEvent'; - window[fn]('scroll', this.eventPosition)[fn]('resize', this.eventPosition); - document[fn]('keydown', this.eventKeyDown); - this.step = 0; - }, - - keyboardListener: function(event){ - switch (event.keyCode){ - case 27: case 88: case 67: this.close(); break; - case 37: case 80: this.previous(); break; - case 39: case 78: this.next(); - } - }, - - previous: function(){ - return this.changeImage(this.activeImage-1); - }, - - next: function(){ - return this.changeImage(this.activeImage+1); - }, - - changeImage: function(imageNum){ - if (this.step || (imageNum < 0) || (imageNum >= this.images.length)) return false; - this.step = 1; - this.activeImage = imageNum; - - this.center.style.backgroundColor = ''; - this.bottomContainer.style.display = this.prevLink.style.display = this.nextLink.style.display = 'none'; - this.fx.image.hide(); - this.center.className = 'lbLoading'; - - this.preload = new Image(); - this.preload.onload = this.nextEffect.bind(this); - this.preload.src = this.images[imageNum][0]; - return false; - }, - - nextEffect: function(){ - switch (this.step++){ - case 1: - this.center.className = ''; - this.image.style.backgroundImage = 'url('+this.images[this.activeImage][0]+')'; - this.image.style.width = this.bottom.style.width = this.preload.width+'px'; - this.image.style.height = this.prevLink.style.height = this.nextLink.style.height = this.preload.height+'px'; - - this.caption.setHTML(this.images[this.activeImage][1] || ''); - this.number.setHTML((!this.options.showCounter || (this.images.length == 1)) ? '' : 'Image '+(this.activeImage+1)+' of '+this.images.length); - - if (this.activeImage) this.preloadPrev.src = this.images[this.activeImage-1][0]; - if (this.activeImage != (this.images.length - 1)) this.preloadNext.src = this.images[this.activeImage+1][0]; - if (this.center.clientHeight != this.image.offsetHeight){ - this.fx.resize.start({height: this.image.offsetHeight}); - break; - } - this.step++; - case 2: - if (this.center.clientWidth != this.image.offsetWidth){ - this.fx.resize.start({width: this.image.offsetWidth, marginLeft: -this.image.offsetWidth/2}); - break; - } - this.step++; - case 3: - this.bottomContainer.setStyles({top: this.top + this.center.clientHeight, height: 0, marginLeft: this.center.style.marginLeft, display: ''}); - this.fx.image.start(1); - break; - case 4: - this.center.style.backgroundColor = '#000'; - if (this.options.animateCaption){ - this.fx.bottom.set(-this.bottom.offsetHeight); - this.bottomContainer.style.height = ''; - this.fx.bottom.start(0); - break; - } - this.bottomContainer.style.height = ''; - case 5: - if (this.activeImage) this.prevLink.style.display = ''; - if (this.activeImage != (this.images.length - 1)) this.nextLink.style.display = ''; - this.step = 0; - } - }, - - close: function(){ - if (this.step < 0) return false; - this.step = -1; - if (this.preload){ - this.preload.onload = Class.empty; - this.preload = null; - } - for (var f in this.fx) this.fx[f].stop(); - this.center.style.display = this.bottomContainer.style.display = 'none'; - this.fx.overlay.chain(this.setup.pass(false, this)).start(0); - return false; - } -}; - -window.addEvent('domready', Lightbox.init.bind(Lightbox));