var selecty_zaloha = new Array(); /*! * jQuery JavaScript Library v1.4.4 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Thu Nov 11 19:04:53 2010 -0500 */ (function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h= h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;kd)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La, "`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this, e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a, "margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+ a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/, C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j, s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this, j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length}, toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j=== -1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false; if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload", b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&& !F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&& l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H
a";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"), k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false, scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent= false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom= 1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="
";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="
t
";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display= "none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h= c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando); else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&& b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0}; c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem, arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid= d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+ c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType=== 8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k=== "click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+ d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired= B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type=== "file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]=== 0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); (function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3]; break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr, q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= l;g.sort(w);if(h)for(var i=1;i0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n, m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled=== true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"=== g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return in[3]-0},nth:function(g,i,n){return n[3]- 0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]]; if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m, g);else if(typeof g.length==="number")for(var p=g.length;n";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g); n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&& function(){var g=k,i=t.createElement("div");i.innerHTML="

";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F|| p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g= t.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition? function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n0)for(var h=d;h0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h= h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context): c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a, 2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a, b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&& e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/\s]+\/)>/g,P={option:[1, ""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null; else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append", prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument|| b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]===""&&!x?r.childNodes:[];for(o=k.length- 1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script")))); d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i, jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true, zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b), h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b); if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f= d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left; e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/)<[^<]*)*<\/script>/gi, ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b=== "object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("
").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&& !this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| !T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache= false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset; A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type", b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]= encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess", [b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"), e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}}); if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show", 3),a,b,d);else{d=0;for(var e=this.length;d=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)} var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true; this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a= c.timers,b=0;b-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a, e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&& c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase(); c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+ b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window); /* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * $LastChangedDate: 2007-07-21 18:45:56 -0500 (Sat, 21 Jul 2007) $ * $Rev: 2447 $ * * Version 2.1.1 */ (function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
', o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&& l)?" ":""));a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";if(d.browser.mozilla)k+='";else{k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
";return k},_adjustInstDate:function(a,b,c){var e= a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a, "onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a); c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a, "dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker= function(a){if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b)); return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.7";window["DP_jQuery_"+y]=d})(jQuery); ;/* * jQuery UI Progressbar 1.8.7 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Progressbar * * Depends: * jquery.ui.core.js * jquery.ui.widget.js */ (function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.7"})})(jQuery); ;/* * jQuery UI Effects 1.8.7 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Effects/ */ jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], 16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", "borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, 0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, 211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, d){if(f.isFunction(b)){d=b;b=null}return this.each(function(){f.queue(this,"fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l= h.splice(h.length-1,1)[0];h.splice(1,0,l);f.dequeue(this)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c}, b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.7",save:function(c,a){for(var b=0;b
").addClass("ui-effects-wrapper").css({fontSize:"100%", background:"transparent",border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c); return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments); else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c), b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c, a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c, a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a== e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); ;/* * jQuery UI Effects Fade 1.8.7 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Effects/Fade * * Depends: * jquery.effects.core.js */ (function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); ;/* * jQuery UI Effects Fold 1.8.7 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Effects/Fold * * Depends: * jquery.effects.core.js */ (function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","left"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],10)/100* f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); ;/* * jQuery UI Effects Highlight 1.8.7 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Effects/Highlight * * Depends: * jquery.effects.core.js */ (function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); ;/* * jQuery UI Effects Pulsate 1.8.7 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Effects/Pulsate * * Depends: * jquery.effects.core.js */ (function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); b.dequeue()})})}})(jQuery); ; /* SWFObject v2.2 is released under the MIT License */ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab');swfobject.embedSWF(f.uploader,f.id+"Uploader",f.width,f.height,"9.0.24",f.expressInstall,g,{quality:"high",wmode:f.wmode,allowScriptAccess:f.scriptAccess},{},function(i){if(typeof(f.onSWFReady)=="function"&&i.success){f.onSWFReady()}});if(f.queueID==false){a("#"+a(this).attr("id")+"Uploader").after('
')}else{a("#"+f.queueID).addClass("uploadifyQueue")}}if(typeof(f.onOpen)=="function"){a(this).bind("uploadifyOpen",f.onOpen)}a(this).bind("uploadifySelect",{action:f.onSelect,queueID:f.queueID},function(k,i,j){if(k.data.action(k,i,j)!==false){var l=Math.round(j.size/1024*100)*0.01;var m="KB";if(l>1000){l=Math.round(l*0.001*100)*0.01;m="MB"}var n=l.toString().split(".");if(n.length>1){l=n[0]+"."+n[1].substr(0,2)}else{l=n[0]}if(j.name.length>20){fileName=j.name.substr(0,20)+"..."}else{fileName=j.name}queue="#"+a(this).attr("id")+"Queue";if(k.data.queueID){queue="#"+k.data.queueID}a(queue).append('
'+fileName+" ("+l+m+')
')}});a(this).bind("uploadifySelectOnce",{action:f.onSelectOnce},function(i,j){i.data.action(i,j);if(f.auto){if(f.checkScript){a(this).uploadifyUpload(null,false)}else{a(this).uploadifyUpload(null,true)}}});a(this).bind("uploadifyQueueFull",{action:f.onQueueFull},function(i,j){if(i.data.action(i,j)!==false){alert("The queue is full. The max size is "+j+".")}});a(this).bind("uploadifyCheckExist",{action:f.onCheck},function(n,m,l,k,p){var j=new Object();j=l;j.folder=(k.substr(0,1)=="/")?k:e+k;if(p){for(var i in l){var o=i}}a.post(m,j,function(s){for(var q in s){if(n.data.action(n,s,q)!==false){var r=confirm("Do you want to replace the file "+s[q]+"?");if(!r){document.getElementById(a(n.target).attr("id")+"Uploader").cancelFileUpload(q,true,true)}}}if(p){document.getElementById(a(n.target).attr("id")+"Uploader").startFileUpload(o,true)}else{document.getElementById(a(n.target).attr("id")+"Uploader").startFileUpload(null,true)}},"json")});a(this).bind("uploadifyCancel",{action:f.onCancel},function(n,j,m,o,i,l){if(n.data.action(n,j,m,o,l)!==false){if(i){var k=(l==true)?0:250;a("#"+a(this).attr("id")+j).fadeOut(k,function(){a(this).remove()})}}});a(this).bind("uploadifyClearQueue",{action:f.onClearQueue},function(k,j){var i=(f.queueID)?f.queueID:a(this).attr("id")+"Queue";if(j){a("#"+i).find(".uploadifyQueueItem").remove()}if(k.data.action(k,j)!==false){a("#"+i).find(".uploadifyQueueItem").each(function(){var l=a(".uploadifyQueueItem").index(this);a(this).delay(l*100).fadeOut(250,function(){a(this).remove()})})}});var c=[];a(this).bind("uploadifyError",{action:f.onError},function(m,i,l,k){if(m.data.action(m,i,l,k)!==false){var j=new Array(i,l,k);c.push(j);a("#"+a(this).attr("id")+i).find(".percentage").text(" - "+k.type+" Error");a("#"+a(this).attr("id")+i).find(".uploadifyProgress").hide();a("#"+a(this).attr("id")+i).addClass("uploadifyError")}});if(typeof(f.onUpload)=="function"){a(this).bind("uploadifyUpload",f.onUpload)}a(this).bind("uploadifyProgress",{action:f.onProgress,toDisplay:f.displayData},function(k,i,j,l){if(k.data.action(k,i,j,l)!==false){a("#"+a(this).attr("id")+i+"ProgressBar").animate({width:l.percentage+"%"},250,function(){if(l.percentage==100){a(this).closest(".uploadifyProgress").fadeOut(250,function(){a(this).remove()})}});if(k.data.toDisplay=="percentage"){displayData=" - "+l.percentage+"%"}if(k.data.toDisplay=="speed"){displayData=" - "+l.speed+"KB/s"}if(k.data.toDisplay==null){displayData=" "}a("#"+a(this).attr("id")+i).find(".percentage").text(displayData)}});a(this).bind("uploadifyComplete",{action:f.onComplete},function(l,i,k,j,m){if(l.data.action(l,i,k,unescape(j),m)!==false){a("#"+a(this).attr("id")+i).find(".percentage").text(" - Completed");if(f.removeCompleted){a("#"+a(l.target).attr("id")+i).fadeOut(250,function(){a(this).remove()})}a("#"+a(l.target).attr("id")+i).addClass("completed")}});if(typeof(f.onAllComplete)=="function"){a(this).bind("uploadifyAllComplete",{action:f.onAllComplete},function(i,j){if(i.data.action(i,j)!==false){c=[]}})}})},uploadifySettings:function(f,j,c){var g=false;a(this).each(function(){if(f=="scriptData"&&j!=null){if(c){var i=j}else{var i=a.extend(a(this).data("settings").scriptData,j)}var l="";for(var k in i){l+="&"+k+"="+i[k]}j=escape(l.substr(1))}g=document.getElementById(a(this).attr("id")+"Uploader").updateSettings(f,j)});if(j==null){if(f=="scriptData"){var b=unescape(g).split("&");var e=new Object();for(var d=0;d= ' ') { if (c == '\\' || c == '"') { s += '\\'; } s += c; } else { switch (c) { case '\b': s += '\\b'; break; case '\f': s += '\\f'; break; case '\n': s += '\\n'; break; case '\r': s += '\\r'; break; case '\t': s += '\\t'; break; default: c = c.charCodeAt(); s += '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16); } } } return s + '"'; case 'boolean': return String(arg); default: return 'null'; } }, parse: function (text) { var at = 0; var ch = ' '; function error(m) { throw { name: 'JSONError', message: m, at: at - 1, text: text }; } function next() { ch = text.charAt(at); at += 1; return ch; } function white() { while (ch) { if (ch <= ' ') { next(); } else if (ch == '/') { switch (next()) { case '/': while (next() && ch != '\n' && ch != '\r') {} break; case '*': next(); for (;;) { if (ch) { if (ch == '*') { if (next() == '/') { next(); break; } } else { next(); } } else { error("Unterminated comment"); } } break; default: error("Syntax error"); } } else { break; } } } function string() { var i, s = '', t, u; if (ch == '"') { outer: while (next()) { if (ch == '"') { next(); return s; } else if (ch == '\\') { switch (next()) { case 'b': s += '\b'; break; case 'f': s += '\f'; break; case 'n': s += '\n'; break; case 'r': s += '\r'; break; case 't': s += '\t'; break; case 'u': u = 0; for (i = 0; i < 4; i += 1) { t = parseInt(next(), 16); if (!isFinite(t)) { break outer; } u = u * 16 + t; } s += String.fromCharCode(u); break; default: s += ch; } } else { s += ch; } } } error("Bad string"); } function array() { var a = []; if (ch == '[') { next(); white(); if (ch == ']') { next(); return a; } while (ch) { a.push(value()); white(); if (ch == ']') { next(); return a; } else if (ch != ',') { break; } next(); white(); } } error("Bad array"); } function object() { var k, o = {}; if (ch == '{') { next(); white(); if (ch == '}') { next(); return o; } while (ch) { k = string(); white(); if (ch != ':') { break; } next(); o[k] = value(); white(); if (ch == '}') { next(); return o; } else if (ch != ',') { break; } next(); white(); } } error("Bad object"); } function number() { var n = '', v; if (ch == '-') { n = '-'; next(); } while (ch >= '0' && ch <= '9') { n += ch; next(); } if (ch == '.') { n += '.'; while (next() && ch >= '0' && ch <= '9') { n += ch; } } v = +n; if (!isFinite(v)) { error("Bad number"); } else { return v; } } function word() { switch (ch) { case 't': if (next() == 'r' && next() == 'u' && next() == 'e') { next(); return true; } break; case 'f': if (next() == 'a' && next() == 'l' && next() == 's' && next() == 'e') { next(); return false; } break; case 'n': if (next() == 'u' && next() == 'l' && next() == 'l') { next(); return null; } break; } error("Syntax error"); } function value() { white(); switch (ch) { case '{': return object(); case '[': return array(); case '"': return string(); case '-': return number(); default: return ch >= '0' && ch <= '9' ? number() : word(); } } return value(); } }; (function(b){var e,d,a=[],c=window;b.fn.tinymce=function(j){var p=this,g,k,h,m,i,l="",n="";if(!p.length){return p}if(!j){return tinyMCE.get(p[0].id)}function o(){var r=[],q=0;if(f){f();f=null}p.each(function(t,u){var s,w=u.id,v=j.oninit;if(!w){u.id=w=tinymce.DOM.uniqueId()}s=new tinymce.Editor(w,j);r.push(s);if(v){s.onInit.add(function(){var x,y=v;if(++q==r.length){if(tinymce.is(y,"string")){x=(y.indexOf(".")===-1)?null:tinymce.resolve(y.replace(/\.\w+$/,""));y=tinymce.resolve(y)}y.apply(x||tinymce,r)}})}});b.each(r,function(t,s){s.render()})}if(!c.tinymce&&!d&&(g=j.script_url)){d=1;h=g.substring(0,g.lastIndexOf("/"));if(/_(src|dev)\.js/g.test(g)){n="_src"}m=g.lastIndexOf("?");if(m!=-1){l=g.substring(m+1)}c.tinyMCEPreInit=c.tinyMCEPreInit||{base:h,suffix:n,query:l};if(g.indexOf("gzip")!=-1){i=j.language||"en";g=g+(/\?/.test(g)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(j.theme)+"&plugins="+escape(j.plugins)+"&languages="+i;if(!c.tinyMCE_GZ){tinyMCE_GZ={start:function(){tinymce.suffix=n;function q(r){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(r))}q("langs/"+i+".js");q("themes/"+j.theme+"/editor_template"+n+".js");q("themes/"+j.theme+"/langs/"+i+".js");b.each(j.plugins.split(","),function(s,r){if(r){q("plugins/"+r+"/editor_plugin"+n+".js");q("plugins/"+r+"/langs/"+i+".js")}})},end:function(){}}}}b.ajax({type:"GET",url:g,dataType:"script",cache:true,success:function(){tinymce.dom.Event.domLoaded=1;d=2;if(j.script_loaded){j.script_loaded()}o();b.each(a,function(q,r){r()})}})}else{if(d===1){a.push(o)}else{o()}}return p};b.extend(b.expr[":"],{tinymce:function(g){return g.id&&!!tinyMCE.get(g.id)}});function f(){function i(l){if(l==="remove"){this.each(function(n,o){var m=h(o);if(m){m.remove()}})}this.find("span.mceEditor,div.mceEditor").each(function(n,o){var m=tinyMCE.get(o.id.replace(/_parent$/,""));if(m){m.remove()}})}function k(n){var m=this,l;if(n!==e){i.call(m);m.each(function(p,q){var o;if(o=tinyMCE.get(q.id)){o.setContent(n)}})}else{if(m.length>0){if(l=tinyMCE.get(m[0].id)){return l.getContent()}}}}function h(m){var l=null;(m)&&(m.id)&&(c.tinymce)&&(l=tinyMCE.get(m.id));return l}function g(l){return !!((l)&&(l.length)&&(c.tinymce)&&(l.is(":tinymce")))}var j={};b.each(["text","html","val"],function(n,l){var o=j[l]=b.fn[l],m=(l==="text");b.fn[l]=function(s){var p=this;if(!g(p)){return o.apply(p,arguments)}if(s!==e){k.call(p.filter(":tinymce"),s);o.apply(p.not(":tinymce"),arguments);return p}else{var r="";var q=arguments;(m?p:p.eq(0)).each(function(u,v){var t=h(v);r+=t?(m?t.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):t.getContent()):o.apply(b(v),q)});return r}}});b.each(["append","prepend"],function(n,m){var o=j[m]=b.fn[m],l=(m==="prepend");b.fn[m]=function(q){var p=this;if(!g(p)){return o.apply(p,arguments)}if(q!==e){p.filter(":tinymce").each(function(s,t){var r=h(t);r&&r.setContent(l?q+r.getContent():r.getContent()+q)});o.apply(p.not(":tinymce"),arguments);return p}}});b.each(["remove","replaceWith","replaceAll","empty"],function(m,l){var n=j[l]=b.fn[l];b.fn[l]=function(){i.call(this,l);return n.apply(this,arguments)}});j.attr=b.fn.attr;b.fn.attr=function(n,q,o){var m=this;if((!n)||(n!=="value")||(!g(m))){return j.attr.call(m,n,q,o)}if(q!==e){k.call(m.filter(":tinymce"),q);j.attr.call(m.not(":tinymce"),n,q,o);return m}else{var p=m[0],l=h(p);return l?l.getContent():j.attr.call(b(p),n,q,o)}}}})(jQuery); /** * jQuery lightBox plugin * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/) * and adapted to me for use like a plugin from jQuery. * @name jquery-lightbox-0.5.js * @author Leandro Vieira Pinho - http://leandrovieira.com * @version 0.5 * @date April 11, 2008 * @category jQuery plugin * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com) * @license CC Attribution-No Derivative Works 2.5 Brazil - http://creativecommons.org/licenses/by-nd/2.5/br/deed.en_US * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?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($){$.2N.3g=6(4){4=23.2H({2B:\'#34\',2g:0.8,1d:F,1M:\'18/5-33-Y.16\',1v:\'18/5-1u-2Q.16\',1E:\'18/5-1u-2L.16\',1W:\'18/5-1u-2I.16\',19:\'18/5-2F.16\',1f:10,2A:3d,2s:\'1j\',2o:\'32\',2j:\'c\',2f:\'p\',2d:\'n\',h:[],9:0},4);f I=N;6 20(){1X(N,I);u F}6 1X(1e,I){$(\'1U, 1S, 1R\').l({\'1Q\':\'2E\'});1O();4.h.B=0;4.9=0;7(I.B==1){4.h.1J(v 1m(1e.17(\'J\'),1e.17(\'2v\')))}j{36(f i=0;i<1w g="5-b"><1w W="\'+4.1M+\'"><1i g="5-b-A-1t"><1i g="5-b-A-1g"><1w W="\'+4.1W+\'">\');f z=1D();$(\'#q-13\').l({2K:4.2B,2J:4.2g,S:z[0],P:z[1]}).1V();f R=1p();$(\'#q-5\').l({1T:R[1]+(z[3]/10),1c:R[0]}).E();$(\'#q-13,#q-5\').C(6(){1a()});$(\'#5-Y-29,#5-1s-22\').C(6(){1a();u F});$(G).2G(6(){f z=1D();$(\'#q-13\').l({S:z[0],P:z[1]});f R=1p();$(\'#q-5\').l({1T:R[1]+(z[3]/10),1c:R[0]})})}6 D(){$(\'#5-Y\').E();7(4.1d){$(\'#5-b,#5-s-b-T-w,#5-b-A-1g\').1b()}j{$(\'#5-b,#5-k,#5-k-V,#5-k-X,#5-s-b-T-w,#5-b-A-1g\').1b()}f Q=v 1j();Q.1P=6(){$(\'#5-b\').2D(\'W\',4.h[4.9][0]);1N(Q.S,Q.P);Q.1P=6(){}};Q.W=4.h[4.9][0]};6 1N(1o,1r){f 1L=$(\'#5-s-b-w\').S();f 1K=$(\'#5-s-b-w\').P();f 1n=(1o+(4.1f*2));f 1y=(1r+(4.1f*2));f 1I=1L-1n;f 2z=1K-1y;$(\'#5-s-b-w\').3f({S:1n,P:1y},4.2A,6(){2y()});7((1I==0)&&(2z==0)){7($.3e.3c){1H(3b)}j{1H(3a)}}$(\'#5-s-b-T-w\').l({S:1o});$(\'#5-k-V,#5-k-X\').l({P:1r+(4.1f*2)})};6 2y(){$(\'#5-Y\').1b();$(\'#5-b\').1V(6(){2u();2t()});2r()};6 2u(){$(\'#5-s-b-T-w\').38(\'35\');$(\'#5-b-A-1t\').1b();7(4.h[4.9][1]){$(\'#5-b-A-1t\').2p(4.h[4.9][1]).E()}7(4.h.B>1){$(\'#5-b-A-1g\').2p(4.2s+\' \'+(4.9+1)+\' \'+4.2o+\' \'+4.h.B).E()}}6 2t(){$(\'#5-k\').E();$(\'#5-k-V,#5-k-X\').l({\'K\':\'1C M(\'+4.19+\') L-O\'});7(4.9!=0){7(4.1d){$(\'#5-k-V\').l({\'K\':\'M(\'+4.1v+\') 1c 15% L-O\'}).11().1k(\'C\',6(){4.9=4.9-1;D();u F})}j{$(\'#5-k-V\').11().2m(6(){$(N).l({\'K\':\'M(\'+4.1v+\') 1c 15% L-O\'})},6(){$(N).l({\'K\':\'1C M(\'+4.19+\') L-O\'})}).E().1k(\'C\',6(){4.9=4.9-1;D();u F})}}7(4.9!=(4.h.B-1)){7(4.1d){$(\'#5-k-X\').l({\'K\':\'M(\'+4.1E+\') 2l 15% L-O\'}).11().1k(\'C\',6(){4.9=4.9+1;D();u F})}j{$(\'#5-k-X\').11().2m(6(){$(N).l({\'K\':\'M(\'+4.1E+\') 2l 15% L-O\'})},6(){$(N).l({\'K\':\'1C M(\'+4.19+\') L-O\'})}).E().1k(\'C\',6(){4.9=4.9+1;D();u F})}}2k()}6 2k(){$(d).30(6(12){2i(12)})}6 1G(){$(d).11()}6 2i(12){7(12==2h){U=2Z.2e;1x=27}j{U=12.2e;1x=12.2Y}14=2X.2W(U).2U();7((14==4.2j)||(14==\'x\')||(U==1x)){1a()}7((14==4.2f)||(U==37)){7(4.9!=0){4.9=4.9-1;D();1G()}}7((14==4.2d)||(U==39)){7(4.9!=(4.h.B-1)){4.9=4.9+1;D();1G()}}}6 2r(){7((4.h.B-1)>4.9){2c=v 1j();2c.W=4.h[4.9+1][0]}7(4.9>0){2b=v 1j();2b.W=4.h[4.9-1][0]}}6 1a(){$(\'#q-5\').2a();$(\'#q-13\').2T(6(){$(\'#q-13\').2a()});$(\'1U, 1S, 1R\').l({\'1Q\':\'2S\'})}6 1D(){f o,r;7(G.1h&&G.28){o=G.26+G.2R;r=G.1h+G.28}j 7(d.m.25>d.m.24){o=d.m.2P;r=d.m.25}j{o=d.m.2O;r=d.m.24}f y,H;7(Z.1h){7(d.t.1l){y=d.t.1l}j{y=Z.26}H=Z.1h}j 7(d.t&&d.t.1A){y=d.t.1l;H=d.t.1A}j 7(d.m){y=d.m.1l;H=d.m.1A}7(r1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i1){var seperator=options.multipleSeparator.length;var cursorAt=$(input).selection().start;var wordAt,progress=0;$.each(words,function(i,word){progress+=word.length;if(cursorAt<=progress){wordAt=i;return false;}progress+=seperator;});words[wordAt]=v;v=words.join(options.multipleSeparator);}v+=options.multipleSeparator;}$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}var currentValue=$input.val();if(!skipPrevCheck&¤tValue==previousValue)return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value)return[""];if(!options.multiple)return[$.trim(value)];return $.map(value.split(options.multipleSeparator),function(word){return $.trim(value).length?$.trim(word):null;});}function lastWord(value){if(!options.multiple)return value;var words=trimWords(value);if(words.length==1)return words[0];var cursorAt=$(input).selection().start;if(cursorAt==value.length){words=trimWords(value)}else{words=trimWords(value.replace(value.substring(cursorAt),""));}return words[words.length-1];}function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$(input).selection(previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}else{$input.val("");$input.trigger("result",null);}}});}};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"$1");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(options.matchContains=="word"){i=s.toLowerCase().search("\\b"+sub.toLowerCase());}if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}if(!data[q]){length++;}data[q]=value;}function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}return csub;}else if(data[q]){return data[q];}else if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)return;element=$("
").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("
    ").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)element.css("width",options.width);needsInit=false;}function target(event){var element=event.target;while(element&&element.tagName!="LI")element=element.parentNode;if(!element)return[];return element;}function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset=listItems.size()){active=0;}}function limitNumberOfItems(available){return options.max&&options.max").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}if($.fn.bgiframe)list.bgiframe();}return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.fn.selection=function(start,end){if(start!==undefined){return this.each(function(){if(this.createTextRange){var selRange=this.createTextRange();if(end===undefined||start==end){selRange.move("character",start);selRange.select();}else{selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}}else if(this.setSelectionRange){this.setSelectionRange(start,end);}else if(this.selectionStart){this.selectionStart=start;this.selectionEnd=end;}});}var field=this[0];if(field.createTextRange){var range=document.selection.createRange(),orig=field.value,teststring="<->",textLength=range.text.length;range.text=teststring;var caretAt=field.value.indexOf(teststring);field.value=orig;this.selection(caretAt,caretAt+textLength);return{start:caretAt,end:caretAt+textLength}}else if(field.selectionStart!==undefined){return{start:field.selectionStart,end:field.selectionEnd}}};})(jQuery); /* * jQuery Tooltip plugin 1.3 * * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ * http://docs.jquery.com/Plugins/Tooltip * * Copyright (c) 2006 - 2008 Jörn Zaefferer * * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('

    ').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("
    ");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx=0;i--){var item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item);if(!intersection)continue;if(itemElement!=this.currentItem[0]&&this.placeholder[intersection==1?"next":"prev"]()[0]!=itemElement&&!$.ui.contains(this.placeholder[0],itemElement)&&(this.options.type=='semi-dynamic'?!$.ui.contains(this.element[0],itemElement):true)){this.direction=intersection==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item)}else{break}this._clearEmpty(itemElement);this._trigger("change",event,this._uiHash());break}}itemBefore=this.placeholder[0].previousSibling;while(itemBefore!=null){if(itemBefore.nodeType==1&&itemBefore!=this.currentItem[0]){break}else{itemBefore=itemBefore.previousSibling}}parentItem=this.placeholder[0].parentNode.parentNode;newList=document.createElement(o.listType);if(parentItem!=null&&parentItem.nodeName=='LI'&&this.positionAbs.left<$(parentItem).offset().left){$(parentItem).after(this.placeholder[0]);this._clearEmpty(parentItem)}else if(itemBefore!=null&&itemBefore.nodeName=='LI'&&this.positionAbs.left>$(itemBefore).offset().left+this.options.tabSize){if(!($(itemBefore).hasClass(this.options.disableNesting))){if($(this.placeholder[0]).hasClass(this.options.errorClass)){$(this.placeholder[0]).css('marginLeft',0).removeClass(this.options.errorClass)}if(itemBefore.children[1]==null){itemBefore.appendChild(newList)}itemBefore.children[1].appendChild(this.placeholder[0])}else{$(this.placeholder[0]).addClass(this.options.errorClass).css('marginLeft',this.options.tabSize)}}else if(itemBefore!=null){if($(this.placeholder[0]).hasClass(this.options.errorClass)){$(this.placeholder[0]).css('marginLeft',0).removeClass(this.options.errorClass)}$(itemBefore).after(this.placeholder[0])}else{if($(this.placeholder[0]).hasClass(this.options.errorClass)){$(this.placeholder[0]).css('marginLeft',0).removeClass(this.options.errorClass)}}this._contactContainers(event);if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);this._trigger('sort',event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||'id')||'').match(o.expression||(/(.+)[-=_](.+)/));var pid=($(o.item||this).parent(o.listType).parent('li').attr(o.attribute||'id')||'').match(o.expression||(/(.+)[-=_](.+)/));if(res)str.push((o.key||res[1]+'['+(o.key&&o.expression?res[1]:res[2])+']')+'='+(pid?(o.key&&o.expression?pid[1]:pid[2]):'root'))});if(!str.length&&o.key){str.push(o.key+'=')}return str.join('&')},toArray:function(o){o=o||{};var sDepth=o.startDepthCount||0;var ret=[];var left=2;ret.push({"item_id":'root',"parent_id":'none',"depth":sDepth,"left":'1',"right":($('li',this.element).length+1)*2});$(this.element).children('li').each(function(){left=_recursiveArray($(this),sDepth+1,left)});return ret;function _recursiveArray(item,depth,left){right=left+1;if($(item).children(o.listType).children('li').length>0){depth++;$(item).children(o.listType).children('li').each(function(){right=_recursiveArray($(this),depth,right)});depth--}id=$(item).attr('id').match(o.expression||(/(.+)[-=_](.+)/));if(depth===sDepth+1)pid='root';else{parentItem=$(item).parent(o.listType).parent('li').attr('id').match(o.expression||(/(.+)[-=_](.+)/));pid=parentItem[2]}ret.push({"item_id":id[2],"parent_id":pid,"depth":depth,"left":left,"right":right});return left=right+1}},_createPlaceholder:function(that){var self=that||this,o=self.options;if(!o.placeholder||o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){var el=$(document.createElement(self.currentItem[0].nodeName)).addClass(className||self.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!className)el.style.visibility="hidden";return el},update:function(container,p){if(className&&!o.forcePlaceholderSize)return;if(!p.height()||p.css('height')=='auto'){p.height(self.currentItem.height())};if(!p.width()){p.width(self.currentItem.width())}}}}self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem));self.currentItem.after(self.placeholder);o.placeholder.update(self,self.placeholder)},_clear:function(event,noPropagation){$.ui.sortable.prototype._clear.apply(this,arguments);for(var i=this.items.length-1;i>=0;i--){var item=this.items[i].item[0];this._clearEmpty(item)}return true},_clearEmpty:function(item){if(item.children[1]&&item.children[1].children.length==0){item.removeChild(item.children[1])}}}));$.ui.nestedSortable.prototype.options=$.extend({},$.ui.sortable.prototype.options,$.ui.nestedSortable.prototype.options)})(jQuery); // dekodovani JSON predaneho z PHP a obsahujiciho zaregistrovane promenne ze systemu. try{ var php = JSON.parse(phpexport_never_ever_touch_it); }catch(e){ // pokud je aktivni firebug, vyhodime chybu do jeho konzole, jinak nic (tady jeste nejde detekovat DEBUG) try{ console.error("Došlo k chybě při dekódování JSON (předáno z PHP)."); }catch(e){} } function System(){ var self = this; /***********************************/ /********* VLASTNOSTI **************/ /***********************************/ self.base = php.address.base; self.mode_base = php.address.mode_base; self.root = php.address.root; self.debug = php.DEBUG; self.popupFadeTime = 200; // pomocne konstanty self.ENTER = 13; self.ESCAPE = 27; self.MSG = php.messages.MSG; self.WARNING = php.messages.WARNING; self.ERROR = php.messages.ERROR; self.OK = php.messages.OK; ///////////////////////////// // private! fuj fuj, nesahat! ///////////////////////////// self.post_hash = php.post_hash; self.binded_functions = []; self.default_container = "#jq_msg_cont"; self.msg_queue_id = ".jq_msg_queue"; self.msg_count = 0; /***********************************/ /******** FUNKCE ****************/ /***********************************/ /** * Zakladni funkce systemu, vola se pri nacteni jakekoli stranky systemu. * @private */ self.__construct = function(){ // zpracujeme zpravy if(php.address.mode==php.address.BACKEND){ self.registerMessageActionsBe(); } // zprovoznime popup menu self.popupMenu(); // inicializace lightboxu // pokud jazyk je cestina, pouzijeme ceske popisky lightboxu, jinak anglicke var path_close = php["address"]["base"]+php["address"]["root"]+'included/lightbox/images/lightbox-btn-close.gif'; var path_prev = php["address"]["base"]+php["address"]["root"]+'included/lightbox/images/lightbox-btn-prev.gif'; var path_next = php["address"]["base"]+php["address"]["root"]+'included/lightbox/images/lightbox-btn-next.gif'; var image_txt = "Image"; var of_txt = "of"; if(php["lang"]["langdata"]["abbr"]=='cs'){ path_close = php["address"]["base"]+php["address"]["root"]+'included/lightbox/images/lightbox-btn-close-cz.gif'; path_prev = php["address"]["base"]+php["address"]["root"]+'included/lightbox/images/lightbox-btn-prev-cz.gif'; path_next = php["address"]["base"]+php["address"]["root"]+'included/lightbox/images/lightbox-btn-next-cz.gif'; image_txt = "Obrázek"; of_txt = "z"; } $("a.jq_lightbox").lightBox({ imageLoading: php["address"]["base"]+php["address"]["root"]+'included/lightbox/images/lightbox-ico-loading.gif', imageBlank: php["address"]["base"]+php["address"]["root"]+'included/lightbox/images/lightbox-blank.gif', imageBtnClose: path_close, imageBtnPrev: path_prev, imageBtnNext: path_next, txtImage: image_txt, txtOf: of_txt }); // policko pro vyhledavani na FE - automaticky text $(".jq_search_text").click(function(){ if($(this).val() == php.lang.trans["sysSearch"]){ this.value=''; } }); // pokud je definovany callback pro zpravy, provedeme ho. if(self.isEmpty(php.messages.callback)==false){ self.execute(php.messages.callback, [self.default_container,"pageload"]); } }; /** * Prida novou zpravu. * @param {string} text Text zpravy, ktera se ma pridat. * @param {int} type Typ zpravy. Urcuje barvu dialogu. Jedna z konstant v php.messages. * @param {string} details Detaily zpravy. Nepovinny parametr. * @param {boolean} no_callback Potlaci zavolani callbacku. Nepovinny parametr. * @param {string} own_callback Nastavi vlastni metodu pro callback. Nepovinny parametr. Urceno predevsim pro vnitrni potrebu systemu. * @param {string} own_target Nastavi vlastni cil pro vlozeni zprav. Nepovinny parametr. Urceno predevsim pro vnitrni potrebu systemu. * @return void */ self.addMessage = function(text, type, details, no_callback, own_callback, own_target){ // deprecated - tohle pujde vyhledove pryc .. zatim BC if(system.isEmpty(php.msg_own_handler)==false){ php.msg_own_handler.apply(null,[text,type,details]); return; } // no_callback je nepovinny parametr if(system.isEmpty(no_callback)){ no_callback = false; } // typ nas zajima v podstate jen jako trida type = self.getMessageClass(type); // nastavime kontejner var container_selector = self.default_container; if(!system.isEmpty(own_target)){ container_selector = own_target; }else if(!system.isEmpty(php.messages.target)){ container_selector = php.messages.target; } var msg_container = $(container_selector); if(msg_container.length<1){ if(self.debug==true){ alert("Neexistuje kontejner pro zpravy. Zpravu nebylo mozne pridat.\n\nText zpravy:\n"+text); } return; } if(msg_container.find(self.msg_queue_id).length<1){ if(self.debug==true){ alert("Kontejner pro zpravy neobsahuje frontu pro zpravy. Zpravu nebylo mozne pridat.\n\nText zpravy:\n"+text); } return; } // kontrola, zda nezmenit typ kontejneru, pokud ano, zmenime var cont_type = msg_container.attr("class").split(" ").pop(); if(msg_container.css("display")=="none" || type=="error" || (type=="warning" && cont_type!="error") || (type=="ok" && system.isEmpty(cont_type))){ msg_container.removeClass(cont_type); msg_container.addClass(type); } if(msg_container.css("display")=="none"){ msg_container.css("display","block"); } if(php.address.mode<=php.address.BACKEND){ $("#jq_msg_cnt_sh").css("display","none"); } var newindex = self.msg_count + 1; // formatovani detailu pro zobrazeni if(system.isEmpty(details)) details = "Žádné detaily nejsou k dispozici."; if(!self.isString(details)){ var new_details = ""; for(var i=0;i"; } details = new_details; } // z textu odstarnime html tagy krome zalomeni radku text = text.replace("
    ","**nr**"); text = text.replace(/(<([^>]+)>)/ig,""); text = text.replace("**nr**","
    "); var short_text = text.split(" ",20).join(" ") + " ..."; // vlozeni dat do sablony var new_message = php.messages["msg_template"]; new_message = new_message.replace("*+*INDEX*+*", newindex, "g"); new_message = new_message.replace("*+*TEXT*+*", text, "g"); new_message = new_message.replace("*+*SHORT_TEXT*+*", short_text, "g"); new_message = new_message.replace("*+*DETAILS*+*", details, "g"); new_message = new_message.replace("*+*TYPE*+*", type, "g"); msg_container.find(self.msg_queue_id).append(new_message); self.msg_count++; // zavolame callback, pokud neni potlacen if(no_callback==false){ if(!system.isEmpty(own_callback)){ self.execute(own_callback, [container_selector, "dynamic"]); }else if(!system.isEmpty(php.messages.callback)){ self.execute(php.messages.callback, [container_selector, "dynamic"]); } } }; /** * Vraci aktualni pocet zprav v kontejneru. * @returns {int} */ self.getMessageCount = function(){ return self.msg_count; }; /** * Umoznuje nastavit aktualni pocet zprav v kontejneru. * @returns {void} */ self.setMessageCount = function(new_count){ if(self.isNumeric(new_count) && new_count>=0){ self.msg_count = new_count; } }; /** * Vymaze vsechny zpravy, ktere jsou aktualne v kontejneru a zavre kontejner. */ self.eraseMessages = function(target_container){ self.msg_count = 0; if(system.isEmpty(target_container)){ target_container = self.default_container; } $(target_container).css("display","none"); $(target_container).find(self.msg_queue_id).empty(); }; /** * Pomucka k bindovani eventu na prvky pomoci jquery. Umoznuje predavat funkci parametry pomoci code_objectu. * Pozor, je nutne pro opetovne odstraneni eventu z prvku pouze odpovidajici funkci system.jqUnbind, na prvek je navazana jina funkce, * tudiz pouhym zavolanim unbind by k odstraneni eventu nedoslo! * @param {element} element Prvek, kteremu se ma udalost priradit. * @param {string} type Typ udalosti (napr. click). * @param {code_object} code_object Typicky objekt s parametry a funkci ve tvaru {fce:nazev_funkce,param:parametry_funkce}. * @param {boolean} autostop_propagation Automaticky se zastavi propagace dalsich udalosti na danem prvku. Vychozi hodnota je false. * @todo odladit pro prvky nevracene z jquery (nejsou v poli - pomoci doc.getelementby) * @deprecated */ self.jqBind = function(element,type,code_object,autostop_propagation){ if(system.isEmpty(element)) return false; if(system.isEmpty(code_object)) return false; if(system.isEmpty(code_object.fce)) return false; if(system.isEmpty(autostop_propagation)) autostop_propagation = false; // jquery predava elementy jako pole o jednom prvku. Pokud je predan rovnou element, zabalime ho jako pole. if(system.isNumeric(element.length)==false){ element = $(element); } // ulozime si prirazenou funkci pro pozdejsi unbind. self.binded_functions.push([element,code_object,type,autostop_propagation]); // priradime zpracovavaci funkci .. parametry jsou ulozene, ty ted neresime. element.bind(type,type,self.jqCallListener); return true; }; /** * Pomucka k odstraneni eventu pridanych pomoci funkce system.jqBind.' * code_object uz nemusi obsahovat parametry, staci jmeno funkce. * @param {element} element Prvek, ze ktereho se ma udalost odstranit. * @param {string} type Typ udalosti, ktera se ma odstranit. Pokud neni uvedeno, odstrani se vsechny udalosti na danem prvku. * @param {code_object} code_object Objekt obsahujici nazev funkce, ktera ma byt odebrana. Uz nemusi obsahovat parametry. Pokud neni uvedeno, odstrani se vsechny udalosti zadaneho typu na zadanem prvku. * @todo odladit pro prvky nevracene z jquery (nejsou v poli - pomoci doc.getelementby) * @deprecated */ self.jqUnbind = function(element,type,code_object){ if(system.isEmpty(element)) return false; // jquery predava elementy jako pole o jednom prvku. Pokud je predan rovnou element, zabalime ho jako pole. if(system.isNumeric(element.length)==false){ element = $(element); } // udava, kolik udalosti na danem elementu zustane. Pokud na konci je rovno 0, muzeme odejmout i listener. var num_binded = 0; var to_remove = []; var i = 0; for(i=0;i1){ if(flags[0]=="modul" && typeof(flags[1]=="number")) querystring += "fce="+php_fce+"&mod="+flags[1]; else if(flags[0]=="komponenta" && typeof(flags[1]=="number")) querystring += "fce="+php_fce+"&komponenta="+flags[1]; else if(flags[0]=="ext" && typeof(flags[1]=="number")) querystring += "fce="+php_fce+"&ext="+flags[1]; else querystring += "fce="+php_fce; }else{ querystring += "fce="+php_fce; } // pripojime jeste specifikator typu nacteni stranky querystring += "&pageload_mode="+php.address.mode; if(self.isArray(php_params)){ for(var i in php_params){ if(self.isArray(php_params[i]) && php_params[i].length==2){ if(self.isArray(php_params[i][1])){ querystring += "&"+php_params[i][0]+"="+self.post_hash; querystring += self.requestParamRecursion(php_params[i][0],php_params[i][1],0,0); }else{ if(typeof(php_params[i][1])=="string") php_params[i][1] = encodeURIComponent(php_params[i][1]); else if(typeof(php_params[i][1])=="boolean") php_params[i][1] = "/b "+php_params[i][1]+" b/"; querystring += "&"+php_params[i][0]+"="+php_params[i][1]; } }else{ if(self.debug==true) self.addMessage("Fukce dotaz: Špatný formát parametrů, deklarace přeskočena. ("+php_params[i]+").",self.ERROR); } } //params = JSON.stringify(php_params); /*for(var i=0;i 0) return prvky; // a ted zvlast pro IE .., prvky = document.getElementsByTagName(tag); if (prvky.length < 1) return prvky; var navrat = new Array(); for (var i = 0; i < prvky.length; i++) if (prvky[i].name == jmeno) navrat.push(prvky[i]); return navrat; }; /** * @deprecated Pouzijte jquery selectory */ self.byClass = function(jmeno, tag){ if (document.getElementsByClassName) return document.getElementsByClassName(jmeno); else { var tmp = document.getElementsByTagName(tag); var vysledek = []; for (var i in tmp) if (tmp[i].className && tmp[i].className == jmeno) vysledek.push(tmp[i]); return vysledek; } }; self.strRepeat = function(co,kolikrat){ var navrat = ""; for(var i=0;i 0) { cur_depth++; } var base_pad = repeat_char(pad_val*cur_depth, pad_char); var thick_pad = repeat_char(pad_val*(cur_depth+1), pad_char); var str = ""; if (typeof obj === 'object' && obj !== null && obj.constructor && getFuncName(obj.constructor) !== 'PHPJS_Resource') { str += "Array\n" + base_pad + "(\n"; for (var key in obj) { if (obj[key] instanceof Array) { str += thick_pad + "["+key+"] => "+formatArray(obj[key], cur_depth+1, pad_val, pad_char); } else { str += thick_pad + "["+key+"] => " + obj[key] + "\n"; } } str += base_pad + ")\n"; } else if (obj === null || obj === undefined) { str = ''; } else { // for our "resource" class str = obj.toString(); } return str; }; output = formatArray(array, 0, pad_val, pad_char); if (return_val !== true) { if (d.body) { alert(output); }else { alert(output); } return true; } else { return output; } }; ///////////////////////////// // private! fuj fuj, nesahat! ///////////////////////////// /** * Zpracuje zpravy predane z php. * @private */ self.registerMessageActionsBe = function(){ // zjistime si pocet zprav self.msg_count = $(".jq_msg").length; // skryti / zobrazeni detailu zpravy $(".jq_msg_show_det").live("click",function(){ var id = $(this).attr("id").split("_").pop(); var target = $("#jq_msg_det_"+id); if(target.css("display")=="none") target.css("display","block"); else target.css("display","none"); return false; }); // zavreni jednotlivych zprav $(".jq_msg_del").live("click",function(){ var id = $(this).attr("id").split("_").pop(); $("#jq_msg_"+id).remove(); self.msg_count--; if(self.msg_count<1){ $("#jq_msg_cont").css("display","none"); $("#jq_msg_queue").empty(); } return false; }); // schovani jednotlivych zprav $(".jq_msg_hide").live("click",function(){ var id = $(this).attr("id").split("_").pop(); $("#jq_msg_sh_"+id).css("display","none"); $("#jq_msg_hd_"+id).css("display","inline"); $("#jq_text_all_"+id).css("display","none"); $("#jq_text_sample_"+id).css("display","block"); $("#jq_msg_content_"+id).css("min-height",15); return false; }); // opetovne zobrazeni jednotlivych zprav $(".jq_msg_show").live("click",function(){ var id = $(this).attr("id").split("_").pop(); $("#jq_msg_sh_"+id).css("display","inline"); $("#jq_msg_hd_"+id).css("display","none"); $("#jq_text_all_"+id).css("display","block"); $("#jq_text_sample_"+id).css("display","none"); $("#jq_msg_content_"+id).css("min-height",20); return false; }); // zavreni vsech zprav $(".jq_close_all").click(function(){ self.msg_count = 0; $("#jq_msg_cont").css("display","none"); $("#jq_msg_queue").empty(); return false; }); // schovani vsech zprav $(".jq_hide_all").click(function(){ if($("#jq_msg_cont").css("display")=="none") return false; // zjistime si typ dle kontejneru a nastavime ho prvku pro zobrazeni var cont_type = $("#jq_msg_cont").attr("class").split(" ").pop(); // nastavime typ pro prvek pro zobrazeni $("#jq_msg_cnt_sh").removeClass("error warning ok"); $("#jq_msg_cnt_sh").addClass(cont_type); $("#jq_msg_cont").css("display","none"); $("#jq_msg_cnt_sh").css("display","block"); return false; }); // zobrazeni vsech skrytych zprav $("#jq_msg_cnt_sh_a").click(function(){ $("#jq_msg_cont").css("display","block"); $("#jq_msg_cnt_sh").css("display","none"); return false; }); // schovani zprav za 2 vteriny v debugu, za 10 vterin mimo debug mod var hide_time = 0; if(system.debug==true) hide_time = 2*1000; else hide_time = 10*1000; window.setTimeout("$('.jq_hide_all').click();", 2*1000); }; /** * Slouzi pro zpracovani udalosti pridane pres system.jqBind a zavolani prirazene funkce. * @param {event} e Objekt s udalosti predany z handleru udalosti. * @private * @todo odladit pro prvky nevracene z jquery (nejsou v poli - pomoci doc.getelementby) * @deprecated */ self.jqCallListener = function(e){ for(var i=0;i newWidth) newWidth = $(this).width()-2; $(this).children("ul").fadeIn(self.popupFadeTime); $(this).children("ul").width(newWidth); }, function() { $(this).removeClass("selected"); $(this).children("ul").hide(); } );//hover }; self.requestParamRecursion = function(nazev_p,params,uroven,subhash){ var querystring = ""; for(var j in params){ if(self.isArray(params[j])){ querystring += "&"+self.post_hash+"||"+subhash+"||"+nazev_p+"||"+uroven+"||"+j+"="+self.post_hash; querystring += self.requestParamRecursion(nazev_p,params[j],uroven+1,subhash+j); }else{ if(typeof(params[j])=="string") params[j] = encodeURIComponent(params[j]); else if(typeof(params[j])=="boolean") params[j] = "/b "+params[j]+" b/"; querystring += "&"+self.post_hash+"||"+subhash+"||"+nazev_p+"||"+uroven+"||"+j+"="+params[j]; } } return querystring; }; self.processRequest = function(xmlhttp,code_object){ // pokud status neni 4, nema cenu nic dalsiho delat. if(xmlhttp.readyState == 4){ try{ if(xmlhttp.status != 200) throw 1500; // ziskame odpoved obsahujici JSON data var response = xmlhttp.responseText; // vyparsujeme JSON do js objektu try{ var jsondata = JSON.parse(response); // pokud je na zacatku retezce cislo,muze se stat, ze validace projde (ale spatne). tuto situaci musime detekovat. if(system.isNumeric(jsondata)) throw 1501; }catch(e){ // parse error throw 1501; } var target_container = self.default_container; var callback = ""; // byly v ajaxu prepsany hodnoty pro cilovy kontejner nebo callback? if(!system.isEmpty(jsondata["aitom_messages_target_cont"])){ target_container = jsondata["aitom_messages_target_cont"]; }else{ // pokud z ajaxu nic neprislo, jeste koukneme, jestli mame definovane neco globalne if(!system.isEmpty(php.messages.target)){ target_container = php.messages.target; } } if(!system.isEmpty(jsondata["aitom_messages_callback"])){ callback = jsondata["aitom_messages_callback"]; }else{ // pokud z ajaxu nic neprislo, jeste koukneme, jestli mame definovane neco globalne if(!system.isEmpty(php.messages.callback)){ callback = php.messages.callback; } } // maji byt odstraneny stavajici zpravy ? if(!system.isEmpty(jsondata["aitom_messages_erase"])){ if(jsondata["aitom_messages_erase"]==true){ self.eraseMessages(target_container); } } // ted musime zpracovat chyby if(system.isEmpty(jsondata["aitom_messages_do_not_rewrite"])==false){ for(var i=0;i
"); if(self.content[0]=="ajax"){ // loader var img = document.createElement("img"); img.className = "dialogLoader"; img.id = "dlg_loader"; img.src = system.base+"tpl/admin/img/loading.gif"; img.style.marginTop = "20px"; $("#jq_dialog_"+self.id).append(img); // call ajax system.ajaxRequest(self.content[1],self.content[2],self.content[3],{fce:self.ajaxContentDisplay,param:self.content[4]}); }else if(self.content[0]=="text"){ $("#jq_dialog_"+self.id).append(self.content[1]); if(self.content.length>2 && self.content[2]!=null){ if(system.isArray(self.content[2].param)==false) self.content[2].param = [self.content[2].param]; if(typeof self.content[2].fce != "undefined") self.content[2].fce.apply(null,self.content[2].param); } } var buttons_to_insert = new Object; for(var i=0;i=0;i--){ if(self.buttons[i][0]==$(button).text()){ // nalezli jsme cilove tlacitko - provedeme jeho funkci se zadanymi parametry - pokud tedy nejakou fci definuje if(system.isEmpty(self.buttons[i][3])==false){ if(system.isEmpty(self.buttons[i][3].fce)==false){ // pokud ma funkce definovane parametry, spustime ji s parametry, jinak bez . if(system.isEmpty(self.buttons[i][3].param)==false){ if(system.isArray(self.buttons[i][3].param)==false) self.buttons[i][3].param = [self.buttons[i][3].param]; self.buttons[i][3].fce.apply(null,self.buttons[i][3].param); }else{ self.buttons[i][3].fce.apply(); } } } // pokud je pozadovano zavreni okna po provedeni, zavreme. if(system.isEmpty(self.buttons[i][1])==false){ if(self.buttons[i][1]==true) self.close(); } } } }; /** * Protoze pri kliknuti na krizek se zavola close a ne destroy, musime to malinko upravit. Tahle funkce je privatni, protoze nase metody close uz dialog normalne znici. * Stejne tak je potreba odstranit div, nad kterym je dialog vytvoreny. * @private */ self.destroy = function(){ // projdeme si prvky DOMu, ktere maji uvedenou tridu a zkontrolujeme, zda na nich neni wysiwyg ... pokud ano, zavreme ho. if(typeof(tinyMCE) != "undefined"){ var content = $("#jq_dialog_"+self.id+" *"); var curid = ""; var ok = false; for(var i=0;i'+errorObj.type+' Limit: '+Math.round(errorObj.sizeLimit/1024)+'KB'; else msg = errorObj.type+": "+errorObj.text; var details = ""; if(system.DEBUG==true) details = "Problém v souboru uploader.js. Chyba komunikace s flash uploaderem."; system.addMessage(msg,system.ERROR,details); $("#uploader" + queueID).fadeOut(250, function() { $("#uploader" + queueID).remove() }); return false; }, 'onSelect':function(e,qId,fileObj){ self.createUploaderRow(qId,fileObj); }, 'onSelectOnce': function(){ var files = system.byName("jq_file_row","tr"); // pokud uz fronta obsahuje nejake uploadovane soubory, posleme je do pryc if(files.length>0){ var to_remove = []; for(var i=0;i"+php.lang.trans["fs_complete"]+". "+php.lang.trans["fs_complete2"]); row.appendChild(td); $(row).insertAfter("#jq_files_queue tr:first"); // je potreba zavolat nejaka funkce? pokud ano, zavolame ji. if(system.isEmpty(self.flags.onFinished.fce)==false){ if(system.isEmpty(self.flags.onFinished.param)) self.flags.onFinished.param = []; else if(system.isArray(self.flags.onFinished.param)==false) self.flags.onFinished.param = [self.flags.onFinished.param]; self.flags.onFinished.fce.apply(null,self.flags.onFinished.param); } } }); $("#jq_add_files").css("display", "inline"); $("#jq_add_files").button(); $("#jq_remove_files").button(); $("#jq_remove_all_files").button(); // jenom takova blbustka, aby se tlacitko s uploaderem chovalo jak ma :) $(".jq_uploader_holder").mouseover(function(){ $("#jq_add_files").mouseover(); }); $(".jq_uploader_holder").mouseout(function(){ $("#jq_add_files").mouseout(); }); system.jqBind($('#jq_remove_files'),"click",{ fce:self.removeSelectedItemsFromQueue }); system.jqBind($('#jq_remove_all_files'),"click",{ fce:self.removeAllItemsFromQueue }); $("#jq_add_file_to_list").click(function(){ var act_count = $("#jq_file_count").val(); act_count++; var file_inp = ""; $("#jq_input_files").append(file_inp); $("#jq_file_count").val(act_count); }); $("#jq_remove_file_from_list").click(function(){ var act_count = $("#jq_file_count").val(); if(act_count==1) return; $("#jq_file_"+act_count).remove(); act_count--; $("#jq_file_count").val(act_count); }); $("#jq_switch_flash_without").click(function(){ $(".jq_flash_uploader").addClass("hidden"); $(".jq_common_uploader").removeClass("hidden"); $("#jq_switch_flash_without").addClass("hidden"); $("#jq_switch_flash_with").removeClass("hidden"); return false; }); $("#jq_switch_flash_with").click(function(){ $(".jq_flash_uploader").removeClass("hidden"); $(".jq_common_uploader").addClass("hidden"); $("#jq_switch_flash_without").removeClass("hidden"); $("#jq_switch_flash_with").addClass("hidden"); return false; }); }); }; /** * Spusti upload souboru. * @private */ self.startUploadFiles = function(){ if($('#jq_files_queue_cont').attr('class').indexOf("hidden")==-1){ $('#jq_add_files').uploadifyUpload(); }else{ $('#jq_upload_target').val(self.target_path); $('#jq_files_upload_form').submit(); } }; /** * Vytvori novy radek v tabulce souboru pro upload. * @param {string} queueId Id souboru v uploadify. * @param {Object} fileObj Objekt s detaily o souboru (http://www.uploadify.com/documentation/). * @private */ self.createUploaderRow = function(queueId,fileObj){ // nejdrive si prepocitame dane hodnoty: var byteSize = Math.round(fileObj.size / 1024 * 100) * .01; var suffix = 'kB'; if (byteSize > 1000) { byteSize = Math.round(byteSize *.001 * 100) * .01; suffix = 'MB'; } var sizeParts = byteSize.toString().split('.'); if (sizeParts.length > 1) { byteSize = sizeParts[0] + '.' + sizeParts[1].substr(0,2); } else { byteSize = sizeParts[0]; } var fileName = ""; if (fileObj.name.length > 20) { fileName = fileObj.name.substr(0,20) + '...'; } else { fileName = fileObj.name; } var row = document.createElement("tr"); row.setAttribute("name","jq_file_row"); row.setAttribute("id","jq_file_"+queueId); // prvni bunka je pro vyber checkboxem var td = document.createElement("td"); var checkbox = document.createElement("input"); checkbox.setAttribute("type","checkbox"); checkbox.setAttribute("name","jq_remove_id_uploader"); checkbox.setAttribute("value",queueId); td.appendChild(checkbox); row.appendChild(td); // druha bunka je nazev souboru td = document.createElement("td"); td.setAttribute("class","uploader_td_name"); var span = document.createElement("span"); span.setAttribute("title",fileObj.name); span.appendChild(document.createTextNode(fileName)); td.appendChild(span); row.appendChild(td); // dalsi bunka obsahuje progressbar td = document.createElement("td"); td.setAttribute("class","uploader_progress_holder") span = document.createElement("span"); span.setAttribute("id",queueId+"_progress"); span.setAttribute("class","uploader_progressbar"); td.appendChild(span); span = document.createElement("span"); span.setAttribute("id",queueId+"_progress_num"); span.setAttribute("class","uploader_progressnum_holder"); span.appendChild(document.createTextNode("0%")); td.appendChild(span); row.appendChild(td); // dalsi bunka je velikost td = document.createElement("td"); td.appendChild(document.createTextNode(byteSize + " " + suffix)); row.appendChild(td); // dalsi bunka obsahuje ikonu k odstraneni z fronty td = document.createElement("td"); span = document.createElement("a"); span.setAttribute("href","#"); span.className = "tree-krizek"; span.setAttribute("title",php.lang.trans["fs_rem"]); system.jqBind(span,"click",{ fce:self.removeItemFromQueue, param:queueId }); td.appendChild(span); row.appendChild(td); // vysledny radek vlozime a aktivujeme progressbar $("#jq_files_queue").append(row); $("#"+queueId+"_progress").progressbar({ value:0 }); }; /** * Odstrani soubor se zadanym id z fronty souboru urcenych k uploadu. * @param {string} queueId Id souboru ktery ma byt odstranen z fronty. * @private */ self.removeItemFromQueue = function(queueId){ if(system.isEmpty(queueId)) return false; $('#jq_add_files').uploadifyCancel(queueId); // odstranime i z naseho seznamu $('#jq_file_'+queueId).remove(); self.checkAndCreateNoFileSelectedRow(); return false; }; /** * Odstrani z fronty vsechny soubory se zaskrtnutym checkboxem. * @private */ self.removeSelectedItemsFromQueue = function(){ var checkboxes = system.byName("jq_remove_id_uploader","input"); var to_remove = []; // kvuli zachovani cyklu musime radky mazat zvlast. for(var i=0;i0 || no_file.length>0) return; var row = document.createElement("tr"); row.setAttribute("id","jq_no_file"); // prvni bunka je prazdna var td = document.createElement("td"); td.appendChild(document.createTextNode(" ")); row.appendChild(td); // druha ma colspan a obsahuje informaci td = document.createElement("td"); td.setAttribute("colSpan","4"); td.appendChild(document.createTextNode(php.lang.trans["fs_no_file_sel"])); row.appendChild(td); // vysledny radek vlozime $("#jq_files_queue").append(row); }; // pri sestaveni objektu zavolej konstruktor. $(document).ready(function(){ self.__construct(element,flags,custom_server_action,code_object) }); } /** * Trida implementujici vestaveny nastroj pro vyber souboru z filesystemu. * Mozne hodnoty parametru: * - element: - prvek, jenz pri kliknuti vyvola dialog pro vybber souboru. * - muze byt zadan jak pomoci getElementById tak pomoci jQuery. * - flags: - upresunjici parametry pro vyber souboru * - multi:{boolean} Prepina, zda je mozne vybrat vice souboru nebo jen jeden. Vychozi hodnota je false. * - types:{string} Seznam typu souboru, ktere je mozne vybrat a v pripade povoleni nahravani i nahravat. Seznam je oddeleny carkou. Vychozi hodnota je "" a znamena zadne omezeni. * - noDirsNoNavi:{boolean} Nezobrazi podadresare, bocni vypis stromu a moznost prejit vyse, takze bude mozne pracovat pouze v zadanem adresari. Vychozi hodnota je false. * - homeDir:{string} Adresar, ktery bude otevren jako vychozi, prochazeni filesystemu je omezene pouze na tento adresar a jeho podadresare (dalsi omezeni mozne kombinaci s parametrem noDirsNoNavi). Vychozi hodnota je "" a pri te prochazeni zacina v korenovem adresari a neni nijak omezene. * - startDir:{string} Adresar, ktery bude otevren jako vychozi, nejsou ale uplatnovana zadna omezeni. Vychozi hodnota "" znamena korenovy adresar. * - readonly:{boolean} Neni mozne vkladat nove soubory a adresare. Vychozi hodnota je false. * - noNewDirs:{boolean} Neni mozne vkladat nove adresare, ale je mozne nahravat soubory. Vychozi hodnota je false. * - autoregister:{boolean} Rovnou pripravi (neotevre) file_select pri zkonstruovani objektu bez nutnosti volani metody register(). Vychozi hodnota je false. * - title:{string} Titulek, ktery se zobrazi v okne s vyberem souboru. Vychozi je "Výběr souborů z Filesystemu". * - style:{int} Styl zobrazeni: 1 = nc styl (vychozi), 2= win styl. * - code_object: - klasicky code_objekt definujici funkci, ktera se zavola po vyberu souboru. * - tvar: {fce:reference na fci,param:jediny parametr nebo pole vice parametru pro predani volane funkci}. * - funkci bude predano pole obsahujici veskera data o vybranych souborech stejne, jako jsou k dispozici v pohledu aitom_files_with_owner. Pokud neni file_select multiple, bude mit toto pole 1 prvek. * * @param {object} element * @param {object} flags * @param {object} code_object */ function file_select(element,flags,code_object){ var self = this; /***********************************/ /********* VLASTNOSTI **************/ /***********************************/ self.element = {}; self.flags = {}; self.code_object = {}; ///////////////////////////// // private! fuj fuj, nesahat! ///////////////////////////// self.dialog = {}; self.dir_data = []; self.dir_content = []; self.dir_tree = []; self.uploader = null; /***********************************/ /******** FUNKCE ****************/ /***********************************/ self.register = function(){ if(system.isEmpty(self.element)){ if(system.debug==true) system.addMessage("Zvolený prvek pro přiřazení file_selectu neexistuje.",system.ERROR); return; } // kontrola zda element je zadan jako getelementbyid nebo pomoci jquery if(system.isNumeric(self.element.length)==false) self.element = $(self.element); // zaregistrujeme onclick zobrazeni dialogu system.jqBind(self.element,"click",{fce:self.show}); } /** * Otevre dialog. */ self.show = function(){ if(system.isEmpty(self.element)){ if(system.debug==true) system.addMessage("Zvolený prvek pro file_select neexistuje.",system.ERROR); return; } self.dialog = new dialog(); if(system.isEmpty(self.flags.title)==false) self.dialog.title = self.flags.title; else self.dialog.title = php.lang.trans["fsel_def_heading"]; self.dialog.width = 850; self.dialog.resizable = false; self.dialog.content = ["ajax",[],"loadFileSelectData",[["flags",JSON.stringify(self.flags)]],{fce:self.displayAllContent}]; if(self.flags.multi==true){ self.dialog.buttons = [[php.lang.trans["fsel_sel_mark"],false,true,{fce:self.selectMultiple}]]; } // smazani visicich tooltipu self.dialog.onClose = {fce:function(){ $("#tooltip").css('display','none'); }}; self.dialog.show(); }; /** * Zavre dialog. */ self.close = function(){ $("#tooltip").remove(); $("#jq_dialog_"+self.id).dialog("close"); //if (system.ie6()) self.showSelects(); }; /** * Odstrani udalosti z prvku ktery je file selectu prirazen. */ self.unregister = function(){ system.jqUnbind(self.element,"click",{fce:self.show}); }; ///////////////////////////// // private! fuj fuj, nesahat! ///////////////////////////// /** * Zakladni nastaveni dialogu pri konstruovani objektu. * @param {object} element Prvek nad kterym je file_select postaven. * @param {object} flags Flagy ke konstrukci. * @param {object} code_object Objekt definujici funkci, ktera se po provedeni vyberu zavola. * @private */ self.__construct = function(element,flags,code_object){ if(system.isEmpty(element)==false){ self.element = element; } if(system.isEmpty(flags)==false){ self.flags = flags; } if(system.isEmpty(code_object)==false){ self.code_object = code_object; } if(system.isEmpty(self.flags)==false && self.flags.autoregister==true){ self.register(); } }; /** * Zobrazi obsah vraceny z prvniho nacteni dialogu, vcetne kompletni sablony okna. * @param {array} data Data z php, vcetne sablony. * @private */ self.displayAllContent = function(data){ // zobrazime sablonu dialogu $("#"+self.dialog.element_id).html(data["template"]); // nastavime promenne self.dir_content = data["dir_content"]; self.dir_data = data["dir_data"]; self.dir_tree = data["dir_tree"]; // nastavime udalosti prvkum system.jqBind($("#jq_fsel_goup"),"click",{fce:self.goUp}); system.jqBind($("#jq_navi_dir_root"),"click",{fce:self.changeLocation,param:0}); // akce v navigaci if(system.isEmpty(data["fs_navi"])==false){ for(var i=0;i").attr("src",php.address.root+"upload/"+thumbpath); } }); } }; /** * Probehne po nahrani kazdeho souboru na server a provede update zobrazeni, aby se zobrazil nove nahrany soubor. * @private */ self.runOnFileUploadFinished = function(){ // urceni cesty kam nahravat var act_id = 0; if(system.isEmpty(self.dir_data)==false){ act_id = self.dir_data["id_file"]; } self.changeLocation(act_id); }; /** * Nacte nadrazeny adresar. Jeho id si zjisti z self.dir_data. Vzdy vraci false. * @private */ self.goUp = function(){ if(system.isEmpty(self.dir_data) || system.isEmpty(self.dir_data.parent)){ // pokud doslo k chybe, nacteme hlavni adresar - tot je ale i korektni chovani pri zmene adresare na korenovy self.changeLocation(0); }else{ self.changeLocation(self.dir_data.parent); } return false; }; /** * Zmeni aktualni adresar file selectu na jiny. * @param {int} id Id adresare, na ktery se ma obsah zmenit. * @param {string} sort_name Jmeno sloupce podle ktereho se ma vypis radit. * @param {string} sort_dir Zpusob razeni (ASC|DESC). * @param {string} style Zpusob zobrazeni (2=win,1=nc). * @private */ self.changeLocation = function(id,sort_name,sort_dir,style){ if(system.isEmpty(sort_name)) sort_name = ""; if(system.isEmpty(sort_dir)) sort_dir = ""; if(system.isEmpty(style)) style = 0; system.ajaxRequest([],"fileSelectChangeLoc",[["new_loc_id",id],["flags",JSON.stringify(self.flags)],["sort_name_fsel",sort_name],["sort_dir_fsel",sort_dir],["style",style]],{fce:self.showNewLocData}); return false; }; /** * Zobrazi dialog pro vytvoreni noveho adresare. * @private */ self.createDir = function(){ var dirname = ""; do{ dirname = prompt(php.lang.trans["fs_n_n_dir"]+"\n"+php.lang.trans["fs_no_dot"],dirname); // poud bylo zadano neco jineho nez retezec, konec funkce if(system.isString(dirname)==false) return false; // a proste se budeme ptat dokud tam ta tecka bude ... }while(dirname.indexOf(".")!=-1 || system.isEmpty(dirname)); var act_dir = ""; var parent = 0; if(system.isEmpty(php.current_dir)==false){ act_dir = php.current_dir.path; parent = php.current_dir.id_file; } if(system.isEmpty(self.dir_data)==false){ act_dir = self.dir_data["path"]; parent = self.dir_data["id_file"]; } // pokud uz bylo zadano validni jmeno, zazadame o vytvoreni noveho adresare system.ajaxRequest([],"addDirFileSelect",[["act_dir",act_dir],["dirname",dirname],["flags",JSON.stringify(self.flags)]],{fce:self.showNewDirData,param:parent}); return false; }; self.showNewDirData = function(data,parent,isfile){ // nejprve zobrazime novy obsah adresare if(system.isEmpty(data["template"])){ system.addMessage(php.lang.trans["fsel_sh_error"],system.ERROR); }else{ $("#jq_fsel_dir_content").html(data["template"]); if(system.isEmpty(data["dir_content"])==false){ self.dir_content = data["dir_content"]; for(var i=0;i").attr("src",php.address.root+"upload/"+thumbpath); } }); // select-all checbox if(self.flags.multi==true){ system.jqBind($("#jq_fsel_check_more"),"click",{fce:self.checkAllCheckboxes}); } } if(system.isEmpty(isfile)){ // ted se postarame o levy adresarovy podstrom - nejprve si zjistime kterou jeho cast je potreba zmenit var parent_element = null; if(system.isEmpty(parent)) parent_element = $("#jq_tree_menu"); else parent_element = $("#treefile_"+parent); // ted smazeme vsechny otevrene podszenamy tohoto prvku parent_element.find("ul").remove(); // a misto nich pripojime aktualizovany podseznam var ul = document.createElement("ul"); parent_element.append(ul); for(var j=0;j0){ // pridame ul s podrizenymi polozkami, pokud uz neexistuje var uls = parent.find("ul"); var ul = null; if(uls.length>0){ ul = uls[0]; }else{ ul = document.createElement("ul"); parent.append(ul); } for(var j=0;j0) continue; var last = false; if(j==data["subdirs"].length-1) last = true; var li = self.createLeftMenuItem(data["subdirs"][j],last); $(ul).append(li); } // nastavime styl polozky na otevrenou } } // radici prvky self.registerSortActions(); // prvky leveho strom adresaru self.registerLeftMenuActions(); // zobrazeni nahledu ve vyskakovacim okne if(system.isEmpty(data["fs_style"]) || data["fs_style"]==1){ $(".thumb").tooltip({ showURL: false, bodyHandler: function() { var thumbpath = $(this).attr("thumbpath"); return $("").attr("src",php.address.root+"upload/"+thumbpath); } }); } } // ted zmenime data aktualniho adresare if(system.isEmpty(data["dir_data"])){ // nejspise se jedna o korenovy adresar self.dir_data = []; // zmizi ikona pro posun o uroven vyse. $("#jq_fsel_goup").hide(); // nastavime novou cestu i uploaderu self.uploader.changeDestination(""); // jsme v koreni a tam neni mozne nahravat soubory $("#jq_filesadd").hide(); }else{ self.dir_data = data["dir_data"]; if((system.isEmpty(data["this_is_home_dir"])==false && data["this_is_home_dir"]==true) || self.flags.noDirsNoNavi==true){ $("#jq_fsel_goup").hide(); }else{ $("#jq_fsel_goup").show(); } // nejedna se o koren - uploader souboru muzeme povolit $("#jq_filesadd").show(); // nastavime novou cestu i uploaderu self.uploader.changeDestination(self.dir_data["path"]); } // oznaceni spravneho stylu zobrazeni if(system.isEmpty(data["fs_style"]) || data["fs_style"]==1){ $("#jq_set_style_win").attr({'class':'button ikony'}); $("#jq_set_style_nc").attr({'class':'button detaily1'}); }else{ $("#jq_set_style_nc").attr({'class':'button detaily'}); $("#jq_set_style_win").attr({'class':'button ikony1'}); } // nacteme novou navigaci if(self.flags.noDirsNoNavi==false && system.isEmpty(data["navi"])==false){ $("#jq_navi_part").html(data["navi"]); // pokud existuji nejake adresare v ceste navigace, priradime jim take zmeny system.jqBind($("#jq_navi_dir_root"),"click",{fce:self.changeLocation,param:0}); if(system.isEmpty(data["navi_data"])==false){ for(i=0;i0){ // pridame ul s podrizenymi polozkami, pokud uz neexistuje var uls = parent.find("ul"); var ul = null; if(uls.length>0){ ul = uls[0]; }else{ ul = document.createElement("ul"); parent.append(ul); } for(var j=0;j0) continue; var last = false; if(j==data.length-1) last = true; var li = self.createLeftMenuItem(data[j],last); $(ul).append(li); } // nastavime styl polozky na otevrenou var classname = parent.attr("class").replace("closed","opened"); parent.attr("class",classname); self.registerLeftMenuActions(); } }; /** * Vytvori novy radek do leveho menu reprezentujici jeden adresar. Vraci DOM prvek s li prvkem adresare. * @return {$object} * @private */ self.createLeftMenuItem = function(data,last){ // hlavni kontejner polozky - li var li = document.createElement("li"); li.setAttribute("id","treefile_"+data["id_file"]); var new_class = "jq_fs_tree_opener "; if(last==true){ new_class += "last"; if(data["subdir_count"]>0) new_class += "-"; } if(data["subdir_count"]>0) new_class += "closed"; li.className = new_class; li.style.cursor = 'pointer'; // obrazek slozky var img = document.createElement("img"); img.setAttribute("src","tpl/admin/img/ikony/soubory_male/slozka14.png"); img.setAttribute("height","14"); img.setAttribute("width","16"); img.setAttribute("alt","adr"); li.appendChild(img); li.appendChild(document.createTextNode("\n")); // odkaz pro otevreni daneho adresare var link = document.createElement("a"); link.setAttribute("href","#"); link.className = "jq_fs_opener"; link.setAttribute("id","file_"+data["id_file"]); link.appendChild(document.createTextNode(data["name"])); li.appendChild(link); return li; }; /** * Zaregistruje udalosti patrici levemu menu. * @private */ self.registerLeftMenuActions = function(){ $(".jq_fs_opener").unbind("click"); $(".jq_fs_tree_opener").unbind("click"); $(".jq_fs_opener").click(function(e){ var id = $(this).attr('id').split("_"); // nastavime nadrazenemu prvku tridu jako otevreny var li = $("#treefile_"+id[1]); if(li.length>0){ var classname = li.attr("class").replace("closed","opened"); li.attr("class",classname); } self.changeLocation(id[1]); e.stopPropagation(); return false; }); $(".jq_fs_tree_opener").click(function(e){ var id_parts = $(this).attr("id").split("_"); self.loadLeftMenuDataFor(id_parts[1]); e.stopPropagation(); }); }; /***********************************/ /****** INICIALIZACE ******/ /***********************************/ $(document).ready(function(){self.__construct(element,flags,code_object);}); }; /** * Trida implementujici vestaveny nastroj pro vyber stranek ze struktury. Umoznuje i vyber polozek vkladanych z modulu a koomponent. * Mozne hodnoty parametru: * - element: - prvek, jenz pri kliknuti vyvola dialog pro vybber souboru. * - muze byt zadan jak pomoci getElementById tak pomoci jQuery. * - flags: - upresunjici parametry pro vyber stranky * - title:{string} Titulek, ktery se zobrazi v okne s vyberem souboru. Vychozi je "Výběr cíle ve struktuře stránek". * - modules: {boolean} Zda se bude vyhledavat i v modulech a komponentach. Vychozi je false. * - code_object: - klasicky code_objekt definujici funkci, ktera se zavola po vyberu souboru. * - tvar: {fce:reference na fci,param:jediny parametr nebo pole vice parametru pro predani volane funkci}. * - funkci bude predano pole obsahujici veskera data o vybranych souborech stejne, jako jsou k dispozici v pohledu aitom_files_with_owner. Pokud neni file_select multiple, bude mit toto pole 1 prvek. * * @param {object} element * @param {object} flags * @param {object} code_object */ function PageSelect(element,flags,code_object){ var self = this; /***********************************/ /********* VLASTNOSTI **************/ /***********************************/ self.element = {}; self.flags = {}; self.code_object = {}; ///////////////////////////// // private! fuj fuj, nesahat! ///////////////////////////// self.dialog = {}; /***********************************/ /******** FUNKCE ****************/ /***********************************/ /** * Otevre dialog. */ self.show = function(){ if(system.isEmpty(self.element)){ if(system.debug==true) system.addMessage("Zvolený prvek pro file_select neexistuje.",system.ERROR); return false; } self.dialog = new dialog(); if(system.isEmpty(self.flags.title)==false) self.dialog.title = self.flags.title; else self.dialog.title = php.lang.trans["psel_def_heading"]; self.dialog.width = 550; self.dialog.resizable = false; self.dialog.content = ["ajax",[],"actionPageSelectDialog",[["flags",JSON.stringify(self.flags)]],{fce:self.displayDialogContent}]; self.dialog.buttons = [[php.lang.trans["psel_select"],false, false,{fce:self.returnResult}]]; self.dialog.onClose = {fce:function(){ // zavreni autocompletu pri zavreni dialogu $(".ac_results").remove(); }}; self.dialog.show(); return false; }; /** * Zavre dialog. */ self.close = function(){ self.dialog.close(); }; /** * Odstrani udalosti z prvku ktery je file selectu prirazen. */ self.unregister = function(){ self.element.die("click"); }; ///////////////////////////// // private! fuj fuj, nesahat! ///////////////////////////// /** * Zakladni nastaveni dialogu pri konstruovani objektu. * @param {object} element Prvek nad kterym je file_select postaven. * @param {object} flags Flagy ke konstrukci. * @param {object} code_object Objekt definujici funkci, ktera se po provedeni vyberu zavola. * @private */ self.__construct = function(element,flags,code_object){ if(system.isEmpty(element)==false){ self.element = element; } if(system.isEmpty(flags)==false){ self.flags = flags; } if(system.isEmpty(code_object)==false){ self.code_object = code_object; } if(system.isEmpty(self.element)){ if(system.debug==true) system.addMessage("Zvolený prvek pro přiřazení page_selectu neexistuje.",system.ERROR); return; } // kontrola zda element je zadan jako getelementbyid nebo pomoci jquery if(system.isNumeric(self.element.length)==false) self.element = $(self.element); // zaregistrujeme onclick zobrazeni dialogu self.element.live("click", self.show); }; /** * Zobrazi obsah vraceny z prvniho nacteni dialogu, vcetne kompletni sablony okna. * @param {array} data Data z php, vcetne sablony. * @private */ self.displayDialogContent = function(data){ // inicializujeme udalosti na prvcich dialogu $("#jq_find_item_input").autocomplete( "core/autocomplete_page_struct.php", { extraParams:{ id_language:php.lang['edited_id'], modules: self.flags.modules }, max: 40 } ); $("#jq_find_item_input").result(function(e,data){ if(data && data.length>1){ $("#jq_curr_item_data").val(data[1]); $("#jq_sel_name").html(data[0]); $("#jq_sel_cont").removeClass("hidden"); } }); $("#jq_del_selection").live("click",function(){ $("#jq_curr_item_data").val(""); $("#jq_sel_name").html(""); $("#jq_sel_cont").addClass("hidden"); return false; }); }; /** * Naformatuje a vrati vybrany vysledek * @private */ self.returnResult = function(){ // nejprve nacteme ze skryteho prvku vybranou polozku var item_data = $("#jq_curr_item_data").val(); if(system.isEmpty(item_data)){ alert(php.lang.trans["psel_no_item"]); return; } // naformatujeme data pro predani jako vysledek var parts = item_data.split("**"); var result = { id: parts[0], name: parts[1], user_type: parts[2], system_type: parts[3], type_id: parts[4], target_desc: $("#jq_sel_name").text() }; // a zavolame metodu zadanou v parametrech if(system.isEmpty(self.code_object)==false){ if(system.isEmpty(self.code_object.fce)==false){ if(system.isEmpty(self.code_object.param)) self.code_object.param = []; else if(system.isArray(self.code_object.param)==false) self.code_object.param = [self.code_object.param]; //pridame vystupni data jako prvni parametr self.code_object.param.unshift(result); // zavolame cilovou fci self.code_object.fce.apply(null,self.code_object.param); }else{ if(system.debug==true) system.addMessage("Není definována funkce po vybrání stránky. Výběr stránky nemá žádný další efekt.",system.WARNING); } } // konec - zavreme page_select self.dialog.close(); }; /***********************************/ /****** INICIALIZACE ******/ /***********************************/ $(document).ready(function(){self.__construct(element,flags,code_object);}); }; /** * Trida implementujici vestaveny nastroj pro vyber souboru z filesystemu. * Mozne hodnoty parametru: * - element: - prvek, jenz bude po inicializaci preveden na wysiwyg. * - muze byt zadan jak pomoci getElementById tak pomoci jQuery. * - flags: - upresunjici parametry pro editor * - readonly: {int} Urci zda editor nebude pouze pro cteni. Hodnoty jsou 0(vychozi) a 1(pouze pro cteni). * - toolbar: {string} Urci jaky se ma pouzit toolbar. Jedna z konstant teto tridy. Mozne hodnoty jsou:NO_TOOLBAR,MINI_TOOLBAR,MIDI_TOOLBAR,MAXI_TOOLBAR,CUSTOM_TOOLBAR. Vychozi hodnota je MINI_TOOLBAR. * - width: {int|string} Urci sirku editoru. Je mozno zadavat i jako retezec v procentech. Vychozi hodnota je 100%. Nelze nastavit mene, nez 400. * - height: {int} Vyska editoru. Vychozi hodnota pro MINI_TOOLBAR, MAXI_TOOLBAR a ostatni je 150, resp. 600, resp. 450. Nelze nastavit mene nez 150. * - custom_buttons: {array} Pole s definici vlastnich tlacitek. Pole obsahuje tri prvky z nichz kazdy je retezec obsahujici definice tlacitek, oddelene carkou. Retezec muze byt i prazdny - pak bude radek vynechan. Dostupne definice tlacitek viz nize. Tato volba ma efekt pouze pri toolbaru nastavenem na CUSTOM_TOOLBAR. * - resize: {boolean} Urci, zda editor pujde roztahovat na vysku. Editor nikdy nejde roztahovat na sirku. Vychozi hodnota je true. * - no_css_from_config: {boolean} Pokud je nastaveno na true, pro tento editor se nebudou nacitat globalne definovane css soubory. * - add_classes: {string} Tridy, ktere se maji pridat ke globalne definovanym pro pouziti v editoru. Retezec ve formatu: 'Nadpis 1=nadpis1'. Tridy jsou oddeleny strednikem. * - autoshow:{boolean} Rovnou pripravi (neotevre) file_select pri zkonstruovani objektu bez nutnosti volani metody register(). Vychozi hodnota je false. * - code_object: - klasicky code_objekt definujici funkci, ktera se zavola po inicializaci editoru. * - tvar: {fce:reference na fci,param:jediny parametr nebo pole vice parametru pro predani volane funkci}. * * Pro soupis tlacitek: * @see http://wiki.moxiecode.com/index.php/TinyMCE:Control_reference * * @param {object} element * @param {object} flags * @param {object} code_object */ function wysiwyg(element,flags,code_object){ var self = this; /***********************************/ /********* VLASTNOSTI **************/ /***********************************/ self.element = {}; self.flags = {}; self.code_object = {}; self.allowed_langs = ["en","cs","fr"]; // uchovava informaci, zda byl editor jiz vytvoren self.loaded = false; ///////////////////////////// // private! fuj fuj, nesahat! ///////////////////////////// self.no_toolbar_def = ["","",""]; self.mini_toolbar_def = [ "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,|,outdent,indent,|,bullist,numlist,|,undo,redo,|,pastetext,|,link,unlink,|,code", "", "" ]; self.default_toolbar_def = [ "code,|,fullscreen,|,undo,redo,|,removeformat,|,cleanup,|,search,|,replace,|,selectall,|,pastetext,pasteword,|,hr,|,charmap,|,ins,del", "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,outdent,indent,|,bullist,numlist,|,image,|,link,unlink,|,anchor,|,sub,sup", "styleselect,formatselect,|,forecolor,backcolor,|,tablecontrols" ]; self.maxi_toolbar_def = [ "code,|,fullscreen,|,undo,redo,|,removeformat,|,cleanup,|,search,|,replace,|,selectall,|,pastetext,pasteword,|,hr,|,charmap,|,ins,del,|,styleprops", "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,outdent,indent,|,bullist,numlist,|,image,|,link,unlink,|,anchor,|,sub,sup", "styleselect,formatselect,|,forecolor,backcolor,|,tablecontrols" ]; /***********************************/ /******** FUNKCE ****************/ /***********************************/ /** * Otevre dialog. */ self.show = function(){ if(system.isEmpty(self.element)){ if(system.debug==true) system.addMessage("Zvolený prvek pro přiřazení WYSIWYG editoru neexistuje.",system.ERROR); return; } // pokud uz je editor jednou nacteny, pouze jej obnovime /*if(self.loaded == true){ self.element.tinymce().show(); return; }*/ // kontrola zda element je zadan jako getelementbyid nebo pomoci jquery if(system.isNumeric(self.element.length)==false) self.element = $(self.element); // nastavime defaultni toolbar if(system.isEmpty(self.flags.toolbar)) self.flags.toolbar = 'MINI_TOOLBAR'; // nastavime cilovy toolbar var toolbar = self.mini_toolbar_def; if(self.flags.toolbar=="NO_TOOLBAR") toolbar = self.no_toolbar_def; else if(self.flags.toolbar=="MIDI_TOOLBAR") toolbar = self.default_toolbar_def; else if(self.flags.toolbar=="MAXI_TOOLBAR") toolbar = self.maxi_toolbar_def; else if( self.flags.toolbar=="CUSTOM_TOOLBAR" && system.isEmpty(self.flags.custom_buttons)==false && system.isArray(self.flags.custom_buttons)==true && self.flags.custom_buttons.length == 3 ) toolbar = self.flags.custom_buttons; // kontrola a pripadne nastaveni defaultnich hodnot parametru if(system.isEmpty(self.flags.width)) self.flags.width = '100%'; if(self.flags.width!='100%' && parseInt(self.flags.width)<600) self.flags.width = 600; if(system.isEmpty(self.flags.readonly) || parseInt(self.flags.readonly)!=1) self.flags.readonly = 0; if(system.isEmpty(self.flags.height) || parseInt(self.flags.height)<150){ if(self.flags.toolbar=="MINI_TOOLBAR") self.flags.height = 150; else if(self.flags.toolbar=="MIDI_TOOLBAR") self.flags.height = 450; else if(self.flags.toolbar=="MAXI_TOOLBAR") self.flags.height = 600; } // pujde prerozmerovavat vertikalne ? var resize = true; if(self.flags.resize===false) resize = false; // nastavime jazyk editoru var lang = php.lang.langdata; var newlang = self.allowed_langs[0]; if(lang["orig_abbr"] in system.o(self.allowed_langs)) newlang = lang["orig_abbr"]; // pripravime si tridy k pouziti v editoru - nejprve prevezmeme z nastaveni var classes = php.config.wysiwyg_classes; // ted pokud existuji nejake pridane tridy, priplacneme je k nim. if(system.isEmpty(self.flags.add_classes)==false) classes += ";"+self.flags.add_classes; // pripravime css soubory, pokud jejich pouziti neni zakazano. var csss = php.config.wysiwyg_css; if(system.isEmpty(self.flags.no_css_from_config)==false && self.flags.no_css_from_config==true) csss = ""; // rozsirene validni elementy var extended = "@[id|class|style|title|dir0){ if(chyby[0].childNodes.length>0){ text = ""; povaha = 0; for(var i=0;i"; else povaha = chyby.childNodes[i].firstChild.nodeValue; } if(povaha<1) throw text; else var navrat=new Array(povaha,text); system.chyba(navrat[1],navrat[0]); } } var data = root.getElementsByTagName("data"); if(data.length>0){ if(window[casti[0]]) window[casti[0]](data[0]); else system.chyba("Chyba 1503:\nSelhalo volání následné JS funkce po nahrání souborů pomocí uploaderu.",WARNING); } }catch(error){ var text = "Neznámá chyba."; switch(error){ case 1501: system.chyba("Chyba 1501:\nŠpatná syntaxe XML souboru.",ERROR); break; default: if(typeof(error)!="string") throw error; else system.chyba(error,ERROR); break; } if(system.debug==true) alert("KOMPLETNÍ ODPOVĚĎ SERVERU:\n\n"+casti[1]); } } function souborFinished(data){ // prevezmeme udaje o fcich if(document.getElementById("jsfce")) jsfce = document.getElementById("jsfce").value; if(document.getElementById("phpfce")) phpfce = document.getElementById("phpfce").value; if(document.getElementById("mod")) mod = document.getElementById("mod").value; if(data.childNodes.length>0){ document.getElementById("soubory_list").innerHTML = ""; system.vlozObsah(data,document.getElementById("soubory_list")); } if(jsfce.length>0) document.getElementById("jsfce").value = jsfce; if(phpfce.length>0) document.getElementById("phpfce").value = phpfce; if(mod.length>0) document.getElementById("mod").value = mod; }