bebeboutik/adm/ajaxfilemanager/jscripts/ajaximageeditor_c.js

27 lines
79 KiB
JavaScript
Raw Normal View History

2016-01-04 12:48:08 +01:00
//jquery.js. start
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('7(1g 18.6=="I"){18.I=18.I;u 6=q(a,c){7(18==9||!9.3X)v 14 6(a,c);v 9.3X(a,c)};7(1g $!="I")6.1I$=$;u $=6;6.11=6.8r={3X:q(a,c){a=a||P;7(6.16(a))v 14 6(P)[6.11.1G?"1G":"1W"](a);7(1g a=="1s"){u m=/^[^<]*(<(.|\\s)+>)[^>]*$/.1V(a);7(m)a=6.31([m[1]]);B v 14 6(c).1L(a)}v 9.4E(a.15==2b&&a||(a.3C||a.C&&a!=18&&!a.1q&&a[0]!=I&&a[0].1q)&&6.2L(a)||[a])},3C:"1.1.3.1",7W:q(){v 9.C},C:0,1M:q(a){v a==I?6.2L(9):9[a]},1Z:q(a){u b=6(a);b.5q=9;v b},4E:q(a){9.C=0;[].R.O(9,a);v 9},F:q(a,b){v 6.F(9,a,b)},2p:q(a){u b=-1;9.F(q(i){7(9==a)b=i});v b},1b:q(f,d,e){u c=f;7(f.15==33)7(d==I)v 9.C&&6[e||"1b"](9[0],f)||I;B{c={};c[f]=d}v 9.F(q(a){E(u b V c)6.1b(e?9.T:9,b,6.4H(9,c[b],e,a,b))})},1f:q(b,a){v 9.1b(b,a,"2z")},2A:q(e){7(1g e=="1s")v 9.2Y().3e(P.66(e));u t="";6.F(e||9,q(){6.F(9.2S,q(){7(9.1q!=8)t+=9.1q!=1?9.5R:6.11.2A([9])})});v t},8b:q(){u a,1S=19;v 9.F(q(){7(!a)a=6.31(1S,9.2O);u b=a[0].3s(K);9.L.2K(b,9);1v(b.1d)b=b.1d;b.4g(9)})},3e:q(){v 9.2F(19,K,1,q(a){9.4g(a)})},5w:q(){v 9.2F(19,K,-1,q(a){9.2K(a,9.1d)})},5t:q(){v 9.2F(19,N,1,q(a){9.L.2K(a,9)})},5s:q(){v 9.2F(19,N,-1,q(a){9.L.2K(a,9.1X)})},2U:q(){v 9.5q||6([])},1L:q(t){u b=6.3k(9,q(a){v 6.1L(t,a)});v 9.1Z(/[^+>] [^+>]/.17(t)||t.J("..")>-1?6.5g(b):b)},7x:q(e){u d=9.1A(9.1L("*"));d.F(q(){9.1I$1a={};E(u a V 9.$1a)9.1I$1a[a]=6.1c({},9.$1a[a])}).3U();u r=9.1Z(6.3k(9,q(a){v a.3s(e!=I?e:K)}));d.F(q(){u b=9.1I$1a;E(u a V b)E(u c V b[a])6.S.1A(9,a,b[a][c],b[a][c].W);9.1I$1a=H});v r},1i:q(t){v 9.1Z(6.16(t)&&6.2s(9,q(b,a){v t.O(b,[a])})||6.2x(t,9))},4Y:q(t){v 9.1Z(t.15==33&&6.2x(t,9,K)||6.2s(9,q(a){v(t.15==2b||t.3C)?6.2w(a,t)<0:a!=t}))},1A:q(t){v 9.1Z(6.1T(9.1M(),t.15==33?6(t).1M():t.C!=I&&(!t.Q||t.Q=="6Z")?t:[t]))},37:q(a){v a?6.2x(a,9).C>0:N},6R:q(a){v a==I?(9.C?9[0].2v:H):9.1b("2v",a)},3F:q(a){v a==I?(9.C?9[0].27:H):9.2Y().3e(a)},2F:q(f,d,g,e){u c=9.C>1,a;v 9.F(q(){7(!a){a=6.31(f,9.2O);7(g<0)a.6E()}u b=9;7(d&&6.Q(9,"1r")&&6.Q(a[0],"2V"))b=9.3R("1z")[0]||9.4g(P.5h("1z"));6.F(a,q(){e.O(b,[c?9.3s(K):9])})})}};6.1c=6.11.1c=q(){u c=19[0],a=1;7(19.C==1){c=9;a=0}u b;1v((b=19[a++])!=H)E(u i V b)c[i]=b[i];v c};6.1c({6n:q(){7(6.1I$)$=6.1I$;v 6},16:q(a){v!!a&&1g a!="1s"&&!a.Q&&a.15!=2b&&/q/i.17(a+"")},40:q(a){v a.4z&&a.2O&&!a.2O.4y},Q:q(b,a){v b.Q&&b.Q.1D()==a.1D()},F:q(a,b,c){7(a.C==I)E(u i V a)b.O(a[i],c||[i,a[i]]);B E(u i=0,4x=a.C;i<4x;i++)7(b.O(a[i],c||[i,a[i]])===N)1F;v a},4H:q(c,b,d,e,a){7(6.16(b))b=b.3D(c,[e]);u f=/z-?2p|5Y-?8p|1e|5U|8i-?1u/i;v b&&b.15==3y&&d=="2z"&&!f.17(a)?b+"4o":b},12:{1A:q(b,c){6.F(c.2R(/\\s+/),q(i,a){7(!6.12.3w(b.12,a))b.12+=(b.12?" ":"")+a})},1E:q(b,c){b.12=c!=I?6.2s(b.12.2R(/\\s+/),q(a){v!6.12.3w(c,a)}).5M(" "):""},3w:q(t,c){v 6.2w(c,(t.12||t).3v().2R(/\\s+/))>-1}},4m:q(e,o,f){E(u i V o){e.T["2N"+i]=e.T[i];e.T[i]=o[i]}f.O(e,[]);E(u i V o)e.T[i]=e.T["2N"+i]},1f:q(e,p){7(p=="1u"||p=="29"){u b={},3r,3p,d=["83","81","80","7Y"];6.F(d,q(){b["7V"+9]=0;b["7T"+9+"7S"]=0});6.4m(e,b,q(){7(6(e).37(\':4f\')){3r=e.7Q;3p=e.7O}B{e=6(e.3s(K)).1L(":4b").5v("2B").2U().1f({48:"1y",3i:"7L",U:"2h",7K:"0",7I:"0"}).5o(e.L)[0];u a=6.1f(e.L,"3i")||"3n";7(a=="3n")e.L.T.3i="7G";3r=e.7E;3p=e.7D;7(a=="3n")e.L.T.3i="3n";e.L.3q(e)}});v p=="1u"?3r:3p}v 6.2z(e,p)},2z:q(e,a,d){u g;7(a=="1e"&&6.M.1h){g=6.1b(e.T,"1e");v g==""?"1":g}7(a.3t(/3x/i))a=6.1U;7(!d&&e.T[a])g=e.T[a];B 7(P.3f&&P.3f.3Y){7(a.3t(/3x/i))a="3x";a=a.1o(/([A-Z])/g,"-$1").2H();u b=P.3f.3Y(e,H);7(b)g=b.57(a);B 7(a=="U")g="1P";B 6.4m(e,{U:"2h"},q(){u c=P.3f.3Y(9,"");g=c&&c.57(a)||""})}B 7(e.3S){u f=a.1o(/\\-(\\w)/g,q(m,c){v c.1D()});g=e.3S[a]||e.3S[f]}v g},31:q(a,c){u r=[];c=c||P;6.F(a,q(i,b){7(!b)v;7(b.15==3y)b=b.3v();7(1g b=="1s"){u s=6.2C(b).2H(),1x=c.5h("1x"),1N=[];u a=!s.J("<1H")&&[1,"<2y>","</2y>"]||!s.J("<7g")&&[1,"<52>","</52>"]||(!s.J("<7c")||!s.J("<1z")||!s.J("<7a")||!s.J("<78"))&&[1,"<1r>","</1r>"]||!s.J("<2V")&&[2,"<1r><1z>
//form
(function($){$.fn.ajaxSubmit=function(o){if(typeof o=='function')o={success:o};o=$.extend({url:this.attr('action')||window.location,type:this.attr('method')||'GET'},o||{});var a=this.formToArray(o.semantic);if(o.beforeSubmit&&o.beforeSubmit(a,this,o)===false)return this;var p={};$.event.trigger('form.submit.validate',[a,this,o,p]);if(p.veto)return this;var q=$.param(a);if(o.type.toUpperCase()=='GET'){o.url+=(o.url.indexOf('?')>=0?'&':'?')+q;o.data=null}else o.data=q;var r=this,callbacks=[];if(o.resetForm)callbacks.push(function(){r.resetForm()});if(o.clearForm)callbacks.push(function(){r.clearForm()});if(!o.dataType&&o.target){var u=o.success;callbacks.push(function(a){$(o.target).attr("innerHTML",a).evalScripts().each(u,arguments)})}else if(o.success)callbacks.push(o.success);o.success=function(a,b){for(var i=0,max=callbacks.length;i<max;i++)callbacks[i](a,b,r)};var v=$('input:file',this).fieldValue();var w=false;for(var j=0;j<v.length;j++)if(v[j])w=true;if(o.iframe||w)fileUpload();else $.ajax(o);$.event.trigger('form.submit.notify',[this,o]);return this;function fileUpload(){var d=r[0];var f=$.extend({},$.ajaxSettings,o);var h='jqFormIO'+$.fn.ajaxSubmit.counter++;var i=$('<iframe id="'+h+'" name="'+h+'" />');var j=i[0];var k=$.browser.opera&&window.opera.version()<9;if($.browser.msie||k)j.src='javascript:false;document.write("");';i.css({position:'absolute',top:'-1000px',left:'-1000px'});var l={responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=f.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[l,f]);var m=0;var n=0;setTimeout(function(){i.appendTo('body');j.attachEvent?j.attachEvent('onload',cb):j.addEventListener('load',cb,false);var a=d.encoding?'encoding':'enctype';var t=r.attr('target');r.attr({target:h,method:'POST',encAttr:'multipart/form-data',action:f.url});if(f.timeout)setTimeout(function(){n=true;cb()},f.timeout);d.submit();r.attr('target',t)},10);function cb(){if(m++)return;j.detachEvent?j.detachEvent('onload',cb):j.removeEventListener('load',cb,false);var a=true;try{if(n)throw'timeout';var b,doc;doc=j.contentWindow?j.contentWindow.document:j.contentDocument?j.contentDocument:j.document;l.responseText=doc.body?doc.body.innerHTML:null;l.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(f.dataType=='json'||f.dataType=='script'){var c=doc.getElementsByTagName('textarea')[0];b=c?c.value:l.responseText;if(f.dataType=='json')eval("data = "+b);else $.globalEval(b)}else if(f.dataType=='xml'){b=l.responseXML;if(!b&&l.responseText!=null)b=toXml(l.responseText)}else{b=l.responseText}}catch(e){a=false;$.handleError(f,l,'error',e)}if(a){f.success(b,'success');if(g)$.event.trigger("ajaxSuccess",[l,f])}if(g)$.event.trigger("ajaxComplete",[l,f]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(f.complete)f.complete(l,a?'success':'error');setTimeout(function(){i.remove();l.responseXML=null},100)};function toXml(s,a){if(window.ActiveXObject){a=new ActiveXObject('Microsoft.XMLDOM');a.async='false';a.loadXML(s)}else a=(new DOMParser()).parseFromString(s,'text/xml');return(a&&a.documentElement&&a.documentElement.tagName!='parsererror')?a:null}}};$.fn.ajaxSubmit.counter=0;$.fn.ajaxForm=function(a){return this.ajaxFormUnbind().submit(submitHandler).each(function(){this.formPluginId=$.fn.ajaxForm.counter++;$.fn.ajaxForm.optionHash[this.formPluginId]=a;$(":submit,input:image",this).click(clickHandler)})};$.fn.ajaxForm.counter=1;$.fn.ajaxForm.optionHash={};function clickHandler(e){var a=this.form;a.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){a.clk_x=e.offsetX;a.clk_y=e.offsetY}else if(typeof $.fn.offset=='function'){var b=$(this).offset();a.clk_x=e.pageX-b.left;a.clk_y=e.pageY-b.top}else{a.clk_x=e.pageX-this.offsetLeft;a.clk_y=e.pageY-this.offsetTop}}setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},10)};function submitHandler(){var a=this.formPluginId;var b=$.fn.ajaxForm.optionHash[a];$(this).ajaxSubmit(b);return false};$.fn.ajaxFormUnbind=function(){this.unbind('submi
//form.js end
//select.js start
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('(6($){$.u.G=6(){4 e=6(a,v,t,b){4 c=P.Q("R");c.j=v,c.C=t;4 o=a.x;4 d=o.l;3(!a.n){a.n={};p(4 i=0;i<d;i++){a.n[o[i].j]=i}}3(8 a.n[v]=="M")a.n[v]=d;a.x[a.n[v]]=c;3(b){c.k=9}};4 a=N;3(a.l==0)7 5;4 f=9;4 m=q;4 g,v,t;3(8(a[0])=="z"){m=9;g=a[0]}3(a.l>=2){3(8(a[1])=="H")f=a[1];h 3(8(a[2])=="H")f=a[2];3(!m){v=a[0];t=a[1]}}5.y(6(){3(5.A.s()!="B")7;3(m){p(4 a S g){e(5,a,g[a],f)}}h{e(5,v,t,f)}});7 5};$.u.T=6(b,c,d,e,f){3(8(b)!="D")7 5;3(8(c)!="z")c={};3(8(d)!="H")d=9;5.y(6(){4 a=5;$.U(b,c,6(r){$(a).G(r,d);3(8 e=="6"){3(8 f=="z"){e.V(a,f)}h{e.I(a)}}})});7 5};$.u.W=6(){4 a=N;3(a.l==0)7 5;4 d=8(a[0]);4 v,i;3(d=="D"||d=="z"||d=="6")v=a[0];h 3(d=="X")i=a[0];h 7 5;5.y(6(){3(5.A.s()!="B")7;3(5.n)5.n=O;4 b=q;4 o=5.x;3(!!v){4 c=o.l;p(4 i=c-1;i>=0;i--){3(v.J==K){3(o[i].j.L(v)){b=9}}h 3(o[i].j==v){b=9}3(b&&a[1]===9)b=o[i].k;3(b){o[i]=O}b=q}}h{3(b&&a[1]===9)b=o[i].k;3(b){5.Y(i)}}});7 5};$.u.Z=6(f){4 a=8(f)=="M"?9:!!f;5.y(6(){3(5.A.s()!="B")7;4 o=5.x;4 d=o.l;4 e=[];p(4 i=0;i<d;i++){e[i]={v:o[i].j,t:o[i].C}}e.10(6(b,c){E=b.t.s(),F=c.t.s();3(E==F)7 0;3(a){7 E<F?-1:1}h{7 E>F?-1:1}});p(4 i=0;i<d;i++){o[i].C=e[i].t;o[i].j=e[i].v}});7 5};$.u.11=6(b,d){4 v=b;4 e=8(b);4 c=d||q;3(e!="D"&&e!="6"&&e!="z")7 5;5.y(6(){3(5.A.s()!="B")7 5;4 o=5.x;4 a=o.l;p(4 i=0;i<a;i++){3(v.J==K){3(o[i].j.L(v)){o[i].k=9}h 3(c){o[i].k=q}}h{3(o[i].j==v){o[i].k=9}h 3(c){o[i].k=q}}}});7 5};$.u.12=6(b,c){4 w=c||"k";3($(b).13()==0)7 5;5.y(6(){3(5.A.s()!="B")7 5;4 o=5.x;4 a=o.l;p(4 i=0;i<a;i++){3(w=="14"||(w=="k"&&o[i].k)){$(b).G(o[i].j,o[i].C)}}});7 5};$.u.15=6(b,c){4 d=q;4 v=b;4 e=8(v);4 f=8(c);3(e!="D"&&e!="6"&&e!="z")7 f=="6"?5:d;5.y(6(){3(5.A.s()!="B")7 5;3(d&&f!="6")7 q;4 o=5.x;4 a=o.l;p(4 i=0;i<a;i++){3(v.J==K){3(o[i].j.L(v)){d=9;3(f=="6")c.I(o[i])}}h{3(o[i].j==v){d=9;3(f=="6")c.I(o[i])}}}});7 f=="6"?5:d}})(16);',62,69,'|||if|var|this|function|return|typeof|true||||||||else||value|selected|length||cache||for|false||toLowerCase||fn|||options|each|object|nodeName|select|text|string|o1t|o2t|addOption|boolean|call|constructor|RegExp|match|undefined|arguments|null|document|createElement|option|in|ajaxAddOption|getJSON|apply|removeOption|number|remove|sortOptions|sort|selectOptions|copyOptions|size|all|containsOption|jQuery'.split('|'),0,{}));
//select.js end
//jqmodal.js start
/*(function($){$.fn.jqm=function(o){var a={zIndex:3000,overlay:50,overlayClass:'jqmOverlay',closeClass:'jqmClose',trigger:'.jqModal',ajax:false,target:false,modal:false,onShow:false,onHide:false,onLoad:false};return this.each(function(){if(this._jqm)return;s++;this._jqm=s;H[s]={c:$.extend(a,o),a:false,w:$(this).addClass('jqmID'+s),s:s};if(a.trigger)$(this).jqmAddTrigger(a.trigger)})};$.fn.jqmAddClose=function(e){hs(this,e,'jqmHide');return this};$.fn.jqmAddTrigger=function(e){hs(this,e,'jqmShow');return this};$.fn.jqmShow=function(t){return this.each(function(){if(!H[this._jqm].a)$.jqm.open(this._jqm,t)})};$.fn.jqmHide=function(t){return this.each(function(){if(H[this._jqm].a)$.jqm.close(this._jqm,t)})};$.jqm={hash:{},open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(/^\d+$/.test(h.w.css('z-index')))?h.w.css('z-index'):c.zIndex,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});h.t=t;h.a=true;h.w.css('z-index',z);if(c.modal){if(!A[0])F('bind');A.push(s);o.css('cursor','wait')}else if(c.overlay>0)h.w.jqmAddClose(o);else o=false;h.o=(o)?o.addClass(c.overlayClass).appendTo('body'):false;if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in{Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'")}}if(c.ajax){var r=c.target,u=c.ajax;r=(r)?(typeof r=='string')?$(r,h.w):$(r):h.w;u=(u.substr(0,1)=='@')?$(t).attr(u.substring(1)):u;r.load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h)})}else if(cc)h.w.jqmAddClose($(cc,h.w));(c.onShow)?c.onShow(h):h.w.show();e(h);return false},close:function(s){var h=H[s];h.a=false;if(A[0]){A.pop();if(!A[0])F('unbind')}if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove()}return false}};var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&typeof XMLHttpRequest=='function',i=$('<iframe class="jqm"></iframe>').css({opacity:0}),e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i);f(h)},f=function(h){h.f=$(':input:visible:first',h.w)[0];if(h.f)h.f.focus()},F=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m)},m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return!r},hs=function(w,e,y){var s=[];w.each(function(){s.push(this._jqm)});$(e).each(function(){if(this[y])$.extend(this[y],s);else{this[y]=s;$(this).click(function(){for(var i in{jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return false})}})}})(jQuery);*/
(function($){$.fn.jqm=function(o){var p={overlay:50,overlayClass:'jqmOverlay',closeClass:'jqmClose',trigger:'.jqModal',ajax:F,ajaxText:'',target:F,modal:F,toTop:F,onShow:F,onHide:F,onLoad:F};return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s;H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s};if(p.trigger)$(this).jqmAddTrigger(p.trigger)})};$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide')};$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow')};$.fn.jqmShow=function(t){return this.each(function(){$.jqm.open(this._jqm,t)})};$.fn.jqmHide=function(t){return this.each(function(){$.jqm.close(this._jqm,t)})};$.jqm={hash:{},open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z);if(c.modal){if(!A[0])L('bind');A.push(s)}else if(c.overlay>0)h.w.jqmAddClose(o);else o=F;h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F;if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in{Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'")}}if(c.ajax){var r=c.target||h.w,u=c.ajax,r=(typeof r=='string')?$(r,h.w):$(r),u=(u.substr(0,1)=='@')?$(t).attr(u.substring(1)):u;r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h)})}else if(cc)h.w.jqmAddClose($(cc,h.w));if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o);(c.onShow)?c.onShow(h):h.w.show();e(h);return F},close:function(s){var h=H[s];if(!h.a)return F;h.a=F;if(A[0]){A.pop();if(!A[0])L('unbind')}if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove()}return F},params:{}};var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version=="6.0"),F=false,i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i);f(h)},f=function(h){try{$(':input:visible',h.w)[0].focus()}catch(_){}},L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m)},m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return!r},hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function(){if(!this[c]){this[c]=[];$(this).click(function(){for(var i in{jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F})}this[c].push(s)})})}})(jQuery);
//jqModal.js end
//rotate.js start
jQuery.fn.rotate=function(a,b){var p=this.get(0);if(!b){p.angle=((p.angle==undefined?0:p.angle)+a)%360}else{p.angle=a}if(p.angle>=0){var c=Math.PI*p.angle/180}else{var c=Math.PI*(360+p.angle)/180}var d=Math.cos(c);var e=Math.sin(c);if(document.all&&!window.opera){var f=document.createElement('img');f.src=p.src;f.height=p.height;f.width=p.width;f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+d+",M12="+(-e)+",M21="+e+",M22="+d+",SizingMethod='auto expand')"}else{var f=document.createElement('canvas');if(!p.oImage){f.oImage=new Image();f.oImage.src=p.src;f.oImage.width=p.width;f.oImage.height=p.height}else{f.oImage=p.oImage}f.style.width=f.width=Math.abs(d*f.oImage.width)+Math.abs(e*f.oImage.height);f.style.height=f.height=Math.abs(d*f.oImage.height)+Math.abs(e*f.oImage.width);var g=f.getContext('2d');g.save();if(c<=Math.PI/2){g.translate(e*f.oImage.height,0)}else if(c<=Math.PI){g.translate(f.width,-d*f.oImage.height)}else if(c<=1.5*Math.PI){g.translate(-d*f.oImage.width,f.height)}else{g.translate(0,-e*f.oImage.width)}g.rotate(c);g.drawImage(f.oImage,0,0,f.oImage.width,f.oImage.height);g.restore()}f.id=p.id;f.angle=p.angle;p.parentNode.replaceChild(f,p)};jQuery.fn.rotateRight=function(a){this.rotate(a==undefined?90:a)};jQuery.fn.rotateLeft=function(a){this.rotate(a==undefined?-90:-a)};
//rotate.js end
//interface.js start
jQuery.iUtil={getPosition:function(e){var x=0;var y=0;var a=e.style;var b=false;if(jQuery(e).css('display')=='none'){var c=a.visibility;var d=a.position;b=true;a.visibility='hidden';a.display='block';a.position='absolute'}var f=e;while(f){x+=f.offsetLeft+(f.currentStyle&&!jQuery.browser.opera?parseInt(f.currentStyle.borderLeftWidth)||0:0);y+=f.offsetTop+(f.currentStyle&&!jQuery.browser.opera?parseInt(f.currentStyle.borderTopWidth)||0:0);f=f.offsetParent}f=e;while(f&&f.tagName&&f.tagName.toLowerCase()!='body'){x-=f.scrollLeft||0;y-=f.scrollTop||0;f=f.parentNode}if(b==true){a.display='none';a.position=d;a.visibility=c}return{x:x,y:y}},getPositionLite:function(a){var x=0,y=0;while(a){x+=a.offsetLeft||0;y+=a.offsetTop||0;a=a.offsetParent}return{x:x,y:y}},getSize:function(e){var w=jQuery.css(e,'width');var h=jQuery.css(e,'height');var a=0;var b=0;var c=e.style;if(jQuery(e).css('display')!='none'){a=e.offsetWidth;b=e.offsetHeight}else{var d=c.visibility;var f=c.position;c.visibility='hidden';c.display='block';c.position='absolute';a=e.offsetWidth;b=e.offsetHeight;c.display='none';c.position=f;c.visibility=d}return{w:w,h:h,wb:a,hb:b}},getSizeLite:function(a){return{wb:a.offsetWidth||0,hb:a.offsetHeight||0}},getClient:function(e){var h,w,de;if(e){w=e.clientWidth;h=e.clientHeight}else{de=document.documentElement;w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight}return{w:w,h:h}},getScroll:function(e){var t=0,l=0,w=0,h=0,iw=0,ih=0;if(e&&e.nodeName.toLowerCase()!='body'){t=e.scrollTop;l=e.scrollLeft;w=e.scrollWidth;h=e.scrollHeight;iw=0;ih=0}else{if(document.documentElement){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight}else if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight}iw=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;ih=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}return{t:t,l:l,w:w,h:h,iw:iw,ih:ih}},getMargins:function(e,a){var c=jQuery(e);var t=c.css('marginTop')||'';var r=c.css('marginRight')||'';var b=c.css('marginBottom')||'';var l=c.css('marginLeft')||'';if(a)return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else return{t:t,r:r,b:b,l:l}},getPadding:function(e,a){var c=jQuery(e);var t=c.css('paddingTop')||'';var r=c.css('paddingRight')||'';var b=c.css('paddingBottom')||'';var l=c.css('paddingLeft')||'';if(a)return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else return{t:t,r:r,b:b,l:l}},getBorder:function(e,a){var c=jQuery(e);var t=c.css('borderTopWidth')||'';var r=c.css('borderRightWidth')||'';var b=c.css('borderBottomWidth')||'';var l=c.css('borderLeftWidth')||'';if(a)return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)||0};else return{t:t,r:r,b:b,l:l}},getPointer:function(a){var x=a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))||0;var y=a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))||0;return{x:x,y:y}},traverseDOM:function(a,b){b(a);a=a.firstChild;while(a){jQuery.iUtil.traverseDOM(a,b);a=a.nextSibling}},purgeEvents:function(c){jQuery.iUtil.traverseDOM(c,function(a){for(var b in a){if(typeof a[b]==='function'){a[b]=null}}})},centerEl:function(a,b){var c=jQuery.iUtil.getScroll();var d=jQuery.iUtil.getSize(a);if(!b||b=='vertically')jQuery(a).css({top:c.t+((Math.max(c.h,c.ih)-c.t-d.hb)/2)+'px'});if(!b||b=='horizontally')jQuery(a).css({left:c.l+((Math.max(c.w,c.iw)-c.l-d.wb)/2)+'px'})},fixPNG:function(a,b){var c=jQuery('img[@src*="png"]',a||document),png;c.each(function(){png=this.src;this.src=b;this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+png+"')"})}};[].indexOf||(Array.prototype.indexOf=function(v,n){n=(n==null)?0:n;var m=this.length;for(var i=n;i<m;i++)if(this[i]==v)retu
//interface.js end
//image_editor_general.js start
/*function getModeValue(){var CheckedElem=null;for(var i=0;i<document.formAction.mode.length;i++){if(document.formAction.mode[i].checked||i==0){CheckedElem=document.formAction.mode[i]}}CheckedElem.checked=true;return CheckedElem.value};function changeMode(restore,force){var mode=getModeValue();var imageMode=$('#image_mode');if(mode!=$(imageMode).val()||(typeof(restore)=="boolean")){if(isImageHistoryExist()||typeof(force)=='boolean'){if(typeof(restore)=="boolean"||typeof(force)=='boolean'){if(!restoreToOriginal(restore)){return false}clearImageHistory()}else if(!window.confirm(warningLostChanges)){cancelChangeMode();return false}else{restoreToOriginal(false);clearImageHistory()}}else if((typeof(restore)=="boolean"&&restore)){return false}initPositionHandler();switch(mode){case"resize":switch($('#image_mode').val()){case"crop":disableCrop();break;case"rotate":disableRotate();break;case"flip":disableFlip();break;default:disableRotate()}enableResize(document.formAction.constraint.checked);break;case"crop":switch($('#image_mode').val()){case"resize":disableResize();break;case"rotate":disableRotate();break;case"flip":disableFlip();break;default:disableRotate()}enableCrop();break;case"rotate":switch($('#image_mode').val()){case"resize":disableResize();break;case"crop":disableCrop();break;case"flip":disableFlip();break;default:}enableRotate();break;case"flip":switch($('#image_mode').val()){case"resize":disableResize();break;case"crop":disableCrop();break;case"rotate":disableRotate();break;default:}enableFlip();break;default:alert('Unexpected Operation!');return false}$('#image_mode').val(mode)}};function resetEditor(){if(isImageHistoryExist()){changeMode(true)}else{alert(warningResetEmpty)}return false};function enableCrop(){var widthField=$('#width');var heightField=$('#height');var topField=$('#y');var leftField=$('#x');var imageToResize=getImageElement();var imageWidth=$(imageToResize).attr('width');var imageHeight=$(imageToResize).attr('height');var overlay=$('#resizeMe');var imageContainer=$('#imageContainer');var imageContainerTop=parseInt($(imageContainer).css('top').replace('px',''));var imageContainerLeft=parseInt($(imageContainer).css('left').replace('px',''));$(imageContainer).css('width',imageWidth+'px');$(imageContainer).css('height',imageHeight+'px');$(imageToResize).css('opacity','.5');overlay.css('background-image','url('+$(imageToResize).attr('src')+')');overlay.css('width',imageWidth+'px');overlay.css('height',imageHeight+'px');widthField.val(imageWidth);heightField.val(imageHeight);topField.val(0);leftField.val(0);$(overlay).Resizable({minWidth:10,minHeight:10,maxWidth:imageWidth,maxHeight:imageHeight,minTop:imageContainerTop,minLeft:imageContainerLeft,maxRight:(parseInt(imageWidth)+imageContainerLeft),maxBottom:(parseInt(imageHeight)+imageContainerTop),dragHandle:true,onDrag:function(x,y){this.style.backgroundPosition='-'+(x-imageContainerLeft)+'px -'+(y-imageContainerTop)+'px';$(topField).val(Math.round(y-imageContainerTop));$(leftField).val(Math.round(x-imageContainerLeft));addImageHistory()},handlers:{se:'#resizeSE',e:'#resizeE',ne:'#resizeNE',n:'#resizeN',nw:'#resizeNW',w:'#resizeW',sw:'#resizeSW',s:'#resizeS'},onResize:function(size,position){this.style.backgroundPosition='-'+(position.left-imageContainerLeft)+'px -'+(position.top-imageContainerTop)+'px';$(widthField).val(Math.round(size.width));$(heightField).val(Math.round(size.height));$(topField).val(Math.round(position.top-imageContainerTop));$(leftField).val(Math.round(position.left-imageContainerLeft));addImageHistory();$('#ratio').val($(overlay).ResizableRatio())}});enableConstraint();toggleConstraint();disableRotate()};function disableCrop(){$('#resizeMe').ResizableDestroy();hideHandlers()};function disableResize(){$('#resizeMe').ResizableDestroy();hideHandlers()};function hideHandlers(){$('#resizeSE').hide();$('#resizeE').hide();$('#resizeNE').hide();$('#resizeN').hide();$('#resizeNW').hide();$('#resizeW').hide();$('#resizeSW').hide();$('#resizeS').hide()};function enableResize(constraint){hideHandlers();var imageToResize=getImageElement();var
//image_editor_general.js end