(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(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 X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b==="find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" "," ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),u)>=0});if(!u.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,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");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:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.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 fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",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){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=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 h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,g);return false}else if(n.match.POS.test(g[0])||n.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,h,l){return!!k(l[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,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case"only":case"first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case"last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case"nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m==="="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j={},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},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){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},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,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===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 Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</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!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).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,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}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,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});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||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).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,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},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,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},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:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+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);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},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=J(),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 f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,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<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.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(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
if(!register_regex_rule)var register_regex_rule="[a-zA-Z0-9_-]";if(!register_regex_message)var register_regex_message="Your username may only contain letters and numbers (no spaces)";if(!register_username_unique_message)var register_username_unique_message="This username is already taken";if(!register_email_unique_message)var register_email_unique_message="This e-mail address is already in use";if(!ADMIN)var ADMIN=false;if(!links_external_window)var links_external_window=0;if(!links_admin_window)var links_admin_window=0;if(!texteditor_links_suggestions)var texteditor_links_suggestions=0;if(!include)var include={};$(document).ready(function(){refreshIt();nest();png();if(links_external_window==1){var d=url_base(window.location.host);$("a[href^=http]").each(function(){if(this.href.indexOf(d)==-1)$(this).attr('target','_blank');});}
if(links_admin_window==1){var url=window.location.pathname;if(url.indexOf('/admin/')!=-1){$("a[href^=http]").each(function(){if(this.href.indexOf('/admin/')==-1&&this.href.indexOf('logout')==-1)$(this).attr('target','_blank');});}}});function refreshIt(tb){if(tb!=1)thickbox();else{rows();counter();texteditor();keep();map();messages();validate();tables();calendar();swfupload();sortable();rating();scroller();suggestions();quicksearch();buttons();fancybox();tagIt();tips();tagIt();defaults();}}
function loader(div,c){var d={text:"Loading..",image:1,image_url:DOMAIN+"core/images/ajax-loader.gif",fade:0,fade_speed:500,fade_opacity:.3,position:'over'}
c=$.extend(d,c);if(div.substr(0,1)!="#"&&div.substr(0,1)!=".")div="#"+div;var html=$(div).html();if(c.position=="over"){var h=$(div).height();if(h<=5)c.position="left";else{var w=$(div).width();$(div).prepend("<div class='loader'><div class='loader-image'>"+(c.image==1?"<img src='"+c.image_url+"' alt='..' /> ":"")+c.text+"</div><div class='loader-div"+(c.fade==1?" loader-fade":"")+"' style='width:"+w+"px;height:"+h+"px;'></div></div>");if(c.fade==1)$(div+' div.loader-fade').fadeTo(c.fade_speed,(1-(1*c.fade_opacity)));}}
if(c.position!="over")$(div).html("<div style='text-align:"+c.position+";'>"+(c.image==1?"<img src='"+c.image_url+"' alt='..' class='loader' /> ":"")+c.text+"</div>");}
function pageIt(id,p){$('#pages_'+id+'_counter').val(p);$('#pages_'+id+' .p-current').removeClass('selected p-selected');$('#pages_'+id+'_'+p).addClass('selected p-selected');}
function confirmIt(text,url){if(confirm(text)){location.replace(url);}}
function debugIt(text){$('#debugger').append(text);}
function toggleIt(id,c){var d={animiation:"slide",speed:400,class_open:"",class_closed:"",heading:"",heading_class_open:"toggle_open",heading_class_closed:"toggle_closed"}
c=$.extend(d,c);e=$('#'+id);if(e.is(':visible')){if(c.animiation=="slide")e.slideUp(c.speed);else if(c.animiation=="fade")e.fadeOut(c.speed);else e.hide();if(x(c.class_open)||x(c.class_closed))e.addClass(c.class_closed).removeClass(c.class_open);if(x(c.heading))$("#"+c.heading).addClass(c.heading_class_closed).removeClass(c.heading_class_open);}
else{if(c.animiation=="slide")e.slideDown(c.speed);else if(c.animiation=="fade")e.fadeIn(c.speed);else e.show();if(x(c.class_open)||x(c.class_closed))e.addClass(c.class_open).removeClass(c.class_closed);if(x(c.heading))$("#"+c.heading).addClass(c.heading_class_open).removeClass(c.heading_class_closed);}}
function showIt(div,time){$("#"+div).show();}
function hideIt(div,time){$("#"+div).hide();}
function checkNested(id){var checked=0;$('#checkbox_'+id+':checked').each(function(){$('#checkboxes_'+id+' input').attr('checked','checked');checked=1;});if(checked==0)$('#checkboxes_'+id+' input').removeAttr('checked');}
function allIt(id){var e;var tag;$('#'+id).each(function(){e=$(this);tag=this.tagName;});if(e){var v=e.val();if(v=='-all-'){if(tag=="SELECT"){$("#"+id+" option").attr("selected","selected");$("#"+id+" option[value='-all-']").removeAttr('selected');$("#"+id+" option[value='']").removeAttr('selected');}
if(tag=="INPUT"){var name=e.attr('name');var ischecked=0;$("#"+id+":checked").each(function(){$("input."+id).attr("checked","checked");ischecked=1;});if(ischecked==0){$("input[name='"+name+"']").removeAttr("checked");$("input."+id).removeAttr("checked");}}}}}
var keepTimer;function keep(){$('.keep').hover(function(){if(keepTimer)clearTimeout(keepTimer);var content=$(this).metadata().keepContent;var content_class=$(this).metadata().keepContentClass;$('.'+content_class).hide();$('#'+content).show();},function(){var content=$(this).metadata().keepContent;keepTimer=setTimeout('hideIt("'+content+'");',400);});}
function tabIt(tabClass,tabId,contentClass,contentId){$("li."+tabClass).removeClass('selected');if(tabId)$("#"+tabId).addClass('selected');if(contentClass)$("."+contentClass).hide();if(contentId)$("#"+contentId).show();}
function submitIt(f){var s=$(f).find("input[type='submit']");$(s).after("<img src='"+DOMAIN+"core/images/ajax-loader.gif' class='loader' />");$('img.loader').fadeTo(100,1,function(){f.submit();$(s).attr("disabled","disabled").fadeTo("normal",0.4);});}
function editInline(div,module,id,column,c){var _c=JSON.stringify(c);$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=editInline&div='+div+'&module='+module+'&id='+id+'&column='+column+'&c='+_c,success:function(html){$('#'+div).html(html);calendar();$('#'+div+'_inline').focus().keypress(function(e){if(e.which==13)saveInline(1,div,module,id,column,c);});var calendar=html.split("calendar");if(!c.buttons&&!calendar[1]){$('#'+div+'_inline').blur(function(){$('#'+div+'_inline').animate({opacity:1.0},300,function(){saveInline(1,div,module,id,column,c);});});}}});}
function saveInline(save,div,module,id,column,c){var _c=JSON.stringify(c);var value;var v=$('#'+div+'_inline');if(v.type=="radio"||v.type=="checkbox"){if(v.checked==true)value=v.value;}
else value=encodeURIComponent($(v).val());$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=saveInline&save='+save+'&value='+value+'&div='+div+'&module='+module+'&id='+id+'&column='+column+'&c='+_c,success:function(html){$('#'+div).html(html);if(x(c.redirect))location.assign(c.redirect);thickbox();}});}
function suggestions(){if(in_array('core/js/jquery.autocomplete.js',include)){$('input[className^="suggest"]').each(function(){var type=$(this).attr('class');$(this).autocomplete(DOMAIN+"?ajaxRequest=suggestIt&type="+type,{minChars:2});});}}
var tags;function tagIt(div){if(in_array('core/js/jquery.autocomplete.js',include)){if(div==null)div='tags';$('input.tag').unautocomplete();var r=Math.floor(Math.random()*9999);if(tags){$('input.tag').autocomplete(tags,{minChars:0,matchContains:true,autoFill:false,formatItem:function(row){return row.name+' <span class="tiny">'+row.note+'</span>';},formatMatch:function(row,i,max){return row.name+' '+row.username;}}).result(function(event,data,formatted){$(this).val('');$('#'+div).append("<div class='tag_green' id='tag_"+r+"'>Adding..</div>");$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=tagIt&id='+data.id,success:function(html){$('#'+div+' #tag_'+r).replaceWith(html);messages();if(document.getElementById('tag_counter')){var c=$('#tag_counter').val();var test=html.split("class='_error");if(!test[1])$('#tag_counter').val((c*1)+1);if($('label.error').is(':visible'))$(".require").valid();}}});});}}}
function untagIt(div,id){if(in_array('core/js/jquery.autocomplete.js',include)){removeIt(div);$('#check_'+id+'_text').slideDown(400);$('#check_'+id+'_input').removeAttr('checked');$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=untagIt&id='+id});var c=$('#tag_counter').val();if(c)$('#tag_counter').val((c*1)-1);}}
function checkIt(id,div){if(div==null)div='tags';$('#check_'+id+'_text').slideUp(400);var r=Math.floor(Math.random()*9999);$('#'+div).append("<div class='tag_green' id='tag_"+r+"'>Adding..</div>");$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=tagIt&id='+id,success:function(html){$('#'+div+' #tag_'+r).replaceWith(html);messages();if(document.getElementById('tag_counter')){var c=$('#tag_counter').val();var test=html.split("class='_error");if(!test[1])$('#tag_counter').val((c*1)+1);if($('label.error').is(':visible'))$(".require").valid();}}});}
function removeIt(div,text){if(str_replace('#','',div)==div&&str_replace('.','',div)==div)div="#"+div;if(text){if(confirm(text)){$(div).fadeOut(500,function(){$(this).remove();rows();});}}
else $(div).fadeOut(500,function(){$(this).remove();rows();});}
function deleteIt(text,div,table,key,id,redirect){if(div.substr(0,1)!="#"&&div.substr(0,1)!=".")div="#"+div;if(confirm(text)){$(div).fadeOut(500,function(){$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=deleteIt&table='+table+'&div='+div+'&id='+id+'&key='+key,success:function(html){if(html.length>0)$(div).html(html);else $(div).remove();if(x(redirect))location.assign(redirect);else{var redirect=$(div+' #redirect').val();if(x(redirect))location.assign(redirect);}
rows();}});});}}
function deactivateIt(text,div,table,column,key,id,value,redirect){if(confirm(text)){if(!value||value=="undefined")value=2;$('#'+div).fadeOut(500,function(){$(this).remove();$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=deactivateIt&table='+table+'&column='+column+'&div='+div+'&key='+key+'&id='+id+'&value='+value,success:function(html){if(redirect!=""&&redirect!="undefined"&&redirect!=undefined&&redirect)location.assign(redirect);}});rows();});}}
var saveItStatus={};function saveIt(form,div,loc,method,auto,redirect,loading,div2,preview){if(saveItStatus[form]==1){setTimeout(function(){saveIt(form,div,loc,method,auto,redirect,loading,div2,preview)},500);}
else{saveItStatus[form]=1;var vals;for(instance in CKEDITOR.instances)CKEDITOR.instances[instance].updateElement();$('#'+form+' :input').each(function(){if(this.type=="radio"||this.type=="checkbox"){if(this.checked==true)vals+='&'+this.name+'='+encodeURIComponent(this.value);}
else if(this.type=="select-multiple"){var name=this.name;$("option:selected",this).each(function(i,selected){vals+='&'+name+'='+encodeURIComponent($(selected).val())});}
else vals+='&'+this.name+'='+encodeURIComponent(this.value);});if(loading==1)loader(div);var data='ajaxRequest=saveIt'+(auto==1?"Auto":(preview==1?"Preview":""))+'&form='+form+'&div='+div+vals;if(method==null)method='POST';if(method=='GET'){var url=DOMAIN+'?'+data;var data='';}
if(method=='POST'){var url=DOMAIN;var data=data;}
$.ajax({type:method,url:url,data:data,success:function(html){if(str_replace("comment","",form)!=form){$("#"+form+" :input").not('input[type=submit], input[type=button]').val('');$("#"+form).parents("div.comment-reply:first").slideUp(450);}
if(form=="form_field_add")tb_remove();if(form=="contacts_add"||form=="contact_add"){var s=html.split('|||');$("#"+div).html(s[0]);if(s[1])$("#tags").append(s[1]);if(document.getElementById('tag_counter')){var c=$('#tag_counter').val();$('#tag_counter').val((c*1)+1);if($('#'+form+' label.error').is(':visible'))$(".require").valid();}
if(form=="contacts_add"){document.getElementById('contacts_get')['email'].value='';document.getElementById('contacts_get')['password'].value='';}
if(form=="contact_add")document.getElementById('contact_add')['email'].value='';}
else if(form=="task_form"){var s=html.split('|||');$("#"+div).html(s[0]);if(s[1])$("#tasks").html(s[1]);}
else if(form=="canvas_shape_form"){var s=html.split('|||');$("#"+div).html(s[0]);if(s[1])$("#"+div2).replaceWith(s[1]);}
else if(auto==1||preview==1){if(html)$('#'+form+'_id').html(html);debugIt(html);if(preview==1){var preview_url=$('#'+form+'_id #preview_url').val();window.open(preview_url);}}
else{if(loc=="prepend")$('#'+div).prepend(html);else if(loc=="append")$('#'+div).append(html);else if(loc=="replace")$('#'+div).replaceWith(html);else $("#"+div).html(html);}
if($('#tb_close').length>0){tb_remove();$('#tb_close').remove();}
saveItStatus[form]=0;if(redirect!=""&&redirect!="undefined"&&redirect!=undefined&&redirect)location.assign(redirect);if(form!="auto"&&auto!=1){var s=$("#"+form+" input[type='submit']").fadeTo("normal",1.0).removeAttr("disabled");$('img.loader').each(function(){$(this).remove();});refreshIt();}},error:function(data,status,e){saveItStatus[form]=0;}});}}
function updateIt(table,column,key,id){$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=updateIt&table='+table+'&column='+column+'&key='+key+'&id='+id,success:function(html){var array=html.split('|||');for(var i in array){if(!(i%2)){var j=(i*1)+1;if(array[j]){$('#'+array[i]).html(array[j]);}}}}});}
function scroller(c){$('ul.scroller').each(function(){scrollerScroll($(this),c);});}
function scrollerScroll(scroller,c){if(typeof scroller!="object"){if(scroller.substr(0,1)!="#"&&scroller.substr(0,1)!=".")scroller="#"+scroller;scroller=$(scroller);}
if(!scroller.hasClass("scroller-div")){var d={speed:500,opacity:.3,visible:0,auto:0,auto_speed:5000,auto_pause:5000,auto_rebound_speed:1000,retry:0,retry_pause:200,retry_limit:5}
c=$.extend(d,c);if(c.retry_pause<50)c.retry_pause=50;if(c.retry_limit>999)c.retry_limit=999;var container_w=scroller.width();if(container_w==0&&c.retry<c.retry_limit){var id=scroller.attr('id');if(!id){id="scroller-"+Math.round(Math.random()*9999999);scroller.attr('id',id);}
setTimeout("scrollerScroll('#"+id+"',{retry:"+(c.retry+1)+"})",c.retry_pause);}
else if(container_w){var w=0;var h=0;var total_w=0;scroller.addClass('scroller-div');var items=scroller.children('li').size();for(i=1;i<=items;i++){var current_item=$('li:nth-child('+i+')',scroller);current_item.addClass('scroller-'+i+' {scrollerid:'+i+'}');var item_w=current_item.width()*1;var item_h=current_item.height()*1;if((w+item_w)<=container_w){w+=item_w;current_item.addClass('scroller-visible');c.visible++;}
else current_item.addClass('scroller-invisible');if(item_h>h)h=item_h;total_w+=item_w;}
container_w=w;scroller.wrap("<div class='scroller-wrapper'></div>").wrap("<div class='scroller-container'></div>");var wrapper=scroller.parents('.scroller-wrapper');var container=scroller.parents('.scroller-container');wrapper.css({width:container_w+"px",height:h+"px",overflow:'hidden',position:'relative'});container.css({width:container_w+"px",height:h+"px",overflow:'hidden',position:'relative'});scroller.css({width:total_w,position:'absolute',left:0,top:0});wrapper.prepend("<div class='scroller-left'></div>");wrapper.append("<div class='scroller-right'></div>");container.css({left:$('div.scroller-left',wrapper).width()+"px"});wrapper.css({width:(wrapper.width()+($('div.scroller-left',wrapper).width()+$('div.scroller-right',wrapper).width()))+"px"});var scroller_left=$('div.scroller-left',wrapper);var scroller_right=$('div.scroller-right',wrapper);scrollerRemaining(scroller,c);scroller_left.click(function(){scrollerClick('left',scroller,c);});scroller_right.click(function(){scrollerClick('right',scroller,c);});}}}
function scrollerClick(direction,scroller,c){var wrapper=scroller.parents('.scroller-wrapper');$('.scroller-'+direction,wrapper).unbind('click');if(direction=="left")var next=$('.scroller-visible',scroller).prev('.scroller-invisible');if(direction=="right")var next=$('.scroller-visible',scroller).next('.scroller-invisible');if(next.width()){var i=next.metadata().scrollerid;if(direction=="left")var new_left=(str_replace("px","",scroller.css('left'))*1)+(next.width()*1);if(direction=="right")var new_left=(str_replace("px","",scroller.css('left'))*1)-(next.width()*1);scroller.animate({left:new_left+"px"},c.speed,function(){$('.scroller-'+direction,wrapper).click(function(){scrollerClick(direction,scroller,c);});});next.addClass('scroller-visible').removeClass('scroller-invisible');if(direction=="left")$('.scroller-'+(i+c.visible),scroller).removeClass('scroller-visible').addClass('scroller-invisible');if(direction=="right")$('.scroller-'+(i-c.visible),scroller).removeClass('scroller-visible').addClass('scroller-invisible');scrollerRemaining(scroller,c);}
else{$('.scroller-'+direction,wrapper).click(function(){scrollerClick(direction,scroller,c);});}}
function scrollerRemaining(scroller,c){var wrapper=scroller.parents('.scroller-wrapper');if($('.scroller-visible',wrapper).nextAll('.scroller-invisible').length>0)$('div.scroller-right',wrapper).fadeTo(100,1);else $('div.scroller-right',wrapper).fadeTo(100,c.opacity);if($('.scroller-visible',wrapper).prevAll('.scroller-invisible').length>0)$('div.scroller-left',wrapper).fadeTo(100,1);else $('div.scroller-left',wrapper).fadeTo(100,c.opacity);}
var scrolling=new Array();var scrolls=new Array();var scrolls_start=new Array();function scrollIt(div,direction,html,number,c){if(div.substr(0,1)!="#"&&div.substr(0,1)!=".")div="#"+div;var id=div.substr(1);if(!scrolling[div])scrolling[div]=0;if(!scrolls_start[div])scrolls_start[div]=0;if(!scrolls[div])scrolls[div]=new Array();scrolls[div][scrolls_start[div]]=new Array();if(!x(c))c={}
if(!c['scroll_speed'])c['sroll_speed']=1300;if(!c['animation'])c['animation']='swing';if(!number||number==null){number=scrolls_start[div];scrolls[div][number]['direction']=direction;scrolls[div][number]['html']=html;scrolls_start[div]+=1;}
if(scrolling[div]==0){scrolling[div]=1;var zero=0;var parent=$(div);var parent_w=parent.width();var parent_h=parent.height();parent.css({position:'relative',overflow:'hidden',height:parent_h+'px',width:parent_w+'px'});var scroller=$('#scroll_inner_'+id);if(scroller.length==0){parent.wrapInner('<div id="scroll_inner_'+id+'" />');var scroller=$('#scroll_inner_'+id);scroller.wrapInner('<div />');}
var old_content=scroller.children('div:nth-child(1)');var child_w=old_content.width();var child_h=old_content.height();scroller.css({'position':'absolute','width':(child_w*2)+'px'});if(direction=="left")scroller.css({'left':zero+'px','right':'auto'});if(direction=="right")scroller.css({'right':zero+'px','left':'auto'});if(direction=="up")scroller.css({'top':zero+'px','bottom':'auto'});if(direction=="down")scroller.css({'bottom':zero+'px','top':'auto'});old_content.css({'position':'absolute','width':child_w+'px','height':child_h+'px'});if(direction=="left")old_content.css({'left':zero+'px','right':'auto'});if(direction=="right")old_content.css({'right':zero+'px','left':'auto'});if(direction=="up")old_content.css({'top':zero+'px','bottom':'auto'});if(direction=="down")old_content.css({'bottom':zero+'px','top':'auto'});if(html){scroller.append('<div id="scroll_content_new_'+id+'">'+html+'</div>');var new_content=scroller.children('#scroll_content_new_'+id);new_content.css({'position':'absolute','width':child_w+'px','height':child_h+'px'});if(direction=="left")new_content.css({'left':(zero+child_w)+'px','right':'auto'});if(direction=="right")new_content.css({'right':(zero+child_w)+'px','left':'auto'});if(direction=="up")new_content.css({'top':(zero+child_h)+'px','bottom':'auto'});if(direction=="down")new_content.css({'bottom':(zero+child_h)+'px','top':'auto'});}
if(direction=="left")scroller.animate({'left':(zero-child_w)},c['sroll_speed'],c['animation'],function(){scrollItFinish(div,number,old_content,new_content);});if(direction=="right")scroller.animate({'right':(zero-child_w)},c['sroll_speed'],c['animation'],function(){scrollItFinish(div,number,old_content,new_content);});if(direction=="up")scroller.animate({'top':(zero-child_h)},c['sroll_speed'],c['animation'],function(){scrollItFinish(div,number,old_content,new_content);});if(direction=="down")scroller.animate({'bottom':(zero-child_h)},c['sroll_speed'],c['animation'],function(){scrollItFinish(div,number,old_content,new_content);});refreshIt();}}
function scrollItFinish(div,number,old_content,new_content){if(old_content)old_content.remove();if(new_content)new_content.removeAttr('id');scrolling[div]=0;if(scrolls[div][number])scrolls[div][number]=null;if(scrolls[div][number+1])scrollIt(div,scrolls[div][number+1]['direction'],scrolls[div][number+1]['html'],(number+1));scrolling[div]=0;}
function loadIt(div,type,c){if(div.substr(0,1)!="#"&&div.substr(0,1)!=".")div="#"+div;if(c.loading==1)loader(div,{text:c.loading_text,fade:c.loading_fade,fade_speed:c.loading_fade_out_speed,position:c.loading_position});if(c.loading_fade==1&&!c.loading_fade_in_speed)c.loading_fade_in_speed=400;if(!c.fade_out_speed)c.fade_out_speed=300;if(!c.fade_in_speed)c.fade_in_speed=400;if(!c.vars)c.vars=null;$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=loadIt&div='+div+'&type='+type+'&id='+c.id+'&animation='+c.animation+'&'+c.vars,success:function(html){if(c.loading_fade==1)$(div+' div.loader-div-fade').fadeTo(c.loading_fade_in_speed,1,function(){$(div+' .loader').remove();});else if(c.loading==1)$(div+' .loader').remove();if(c.loc=="prepend")$(div).prepend(html);else if(c.loc=="append")$(div).append(html);else if(c.loc=="replace"){if(c.animation=="fade"){$(div).fadeTo(c.fade_out_speed,.01,function(){$(this).replaceWith(html).css('opacity',.01).fadeTo(c.fade_in_speed,1);});}
else $(div).replaceWith(html);}
else{if(c.animation=="scroll")scrollIt(div,c.direction,html);else if(c.animation=="fade"){$(div).fadeTo(c.fade_out_speed,.01,function(){$(this).html(html).fadeTo(c.fade_in_speed,1);});}
else $(div).html(html);}
if(c.animation!="scroll"){refreshIt();}}});}
function updateIt(table,column,key,id){$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=updateIt&table='+table+'&column='+column+'&key='+key+'&id='+id,success:function(html){var array=html.split('|||');for(var i in array){if(!(i%2)){var j=(i*1)+1;if(array[j]){$('#'+array[i]).html(array[j]);}}}}});}
function uploadIt(div,input,path,vars){loader(div,{text:'Uploading..',fade:1,fade_speed:300});if(!vars)vars=null;var form=$('#'+input).parents('form:first');var action=form.attr('action');if(str_replace('javascript:','',action)!=action)$("input[type='submit']",form).fadeTo("normal",0.4).attr('disabled','disabled');$.ajaxFileUpload({url:DOMAIN+"?ajaxRequest=uploadIt&path="+path+"&input="+input+"&"+vars,secureuri:false,fileElementId:input,dataType:'script',success:function(data,status){$("#"+div).html(data);$("#"+input).val("").removeClass('required');$("input[type='submit']",form).fadeTo("normal",1.0).removeAttr("disabled");refreshIt();},error:function(data,status,e){if(ADMIN==true)alert(e);}});return false;}
function ableIt(active,div,button,c){if(active==1)$('#'+div).fadeTo("normal",1);else $('#'+div).fadeTo("normal",0.3);var json=JSON.stringify(c);if(c.table){$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=ableIt&active='+active+'&div='+div+'&button='+button+'&c='+json,success:function(html){$('#'+button).html(html);}});}}
function hideAudio(div,file){$('#'+div).html("");}
function defaults(){$('input.default, textarea.default').focus(function(){if(this.defaultValue==this.value)$(this).val('').removeClass('default');}).blur(function(){if(!this.value)$(this).val(this.defaultValue).addClass('default');});}
function checkAll(c,classID){if(classID){if(c.checked)$('input[type=checkbox].'+classID).attr('checked','checked');else $('input[type=checkbox].'+classID).removeAttr('checked');}
else{if(c.checked)$('input[type=checkbox]').attr('checked','checked');else $('input[type=checkbox]').removeAttr('checked');}}
function tips(){$('a.tip:not(.tipped), img.tip:not(.tipped), div.tip:not(.tipped)').tooltip({track:true,delay:0,showURL:false}).addClass('tipped');}
function rows(){$('tbody tr.row:odd, div.row:odd, table.row:odd, td.row:odd, li.row:odd').addClass("odd").removeClass("even");$('tbody tr.row:even, div.row:even, table.row:even, td.row:even, li.row:even').addClass("even").removeClass("odd");if($.browser.msie){$('table.rows tbody tr:odd, div.rows div:odd, ul.rows li:odd').addClass("odd").removeClass("even");$('table.rows tbody tr:even, div.rows div:even, ul.rows li:even').addClass("even").removeClass("odd");}}
function map(){if(in_array('core/js/jquery.maps.js',include)){$('div.map:not(.mapped)').addClass('mapped').each(function(){var parent=$(this);var m=parent.children("._map");if(m.length==0){var m=$("<div class='_map'><div>").css({width:parent.css('width'),height:parent.css('height')});parent.append(m);}
var options={mapZoom:15,mapType:G_NORMAL_MAP,mapControl:'large',lat:0,lng:0,markers:{},markersRecenter:1,markersRezoom:1,markersCounter:0};var c=$.metadata.get(this);c=$.extend(options,c);c.mapCenter=[c.lat,c.lng];parent.children(':input').each(function(){if(this.name=="marker"){c.markers[c.markersCounter]=$.metadata.get(this);c.markersCounter+=1;}});m.jmap('init',c,function(map,element,options){if(c.address){m.jmap('SearchAddress',{'query':c.address,'returnType':'getLatLng'},function(result,options){m.jmap('MoveTo',{'mapCenter':[result.lat(),result.lng()]});});}
if(c.markers){var bounds=new GLatLngBounds();var markers=c.markers;for(i=0;i<c.markersCounter;i++){var marker=c.markers[i];if(marker){marker.i=i;if(marker.lat&&marker.lng)mapMarker(m,map,c,marker,bounds);else{m.jmap('SearchAddress',{'query':marker.address,'returnType':'getLocations','marker':marker},function(result,options){var valid=Mapifies.SearchCode(result.Status.code);var marker=options.marker;if(valid.success){var point=result.Placemark[0];marker.lat=point.Point.coordinates[1];marker.lng=point.Point.coordinates[0];if(!marker.html)marker.html=point.address;mapMarker(m,map,c,marker,bounds);}
else{debugIt('Error geocoding <em>'+marker.address+'</em> ('+str_replace('<br />',', ',marker.html)+')<br /> Message:'+valid.message+'<br /> Code: '+result.Status.code+'<br /> Request: '+result.Status.request+'<br />');}});}}}}});});}}
function mapDirections(id,div){if(!id)id=".map";if(!div)div="#directions";loader(div);var m=$(id).children('._map');if(m.length==0)var m=$(id);m.jmap('SearchDirections',{'query':'from: '+$('#driveFrom').val()+' to: '+$('#driveTo').val(),'panel':div},function(result,options){$(div+" .loader").remove();var valid=Mapifies.SearchCode(result.getStatus().code);if(valid.success){}
else $(div).html("<div class='none'>"+valid.message+"</div>");});return false;}
function mapMarker(m,map,c,marker,bounds){if(marker.lat&&marker.lng){var options={};options.pointLatLng=[marker.lat,marker.lng];if(marker.html)options.pointHTML=marker.html;if(marker.icon){var icon=new GIcon();if(!marker.icon.image)marker.icon.image="http://www.google.com/intl/en_us/mapfiles/ms/icons/red-dot.png";if(!marker.icon.width)marker.icon.width=12;if(!marker.icon.height)marker.icon.height=20;if(!marker.icon.anchor_x)marker.icon.anchor_x=(marker.icon.width*1)/2;if(!marker.icon.anchor_y)marker.icon.anchor_y=marker.icon.height;if(!marker.icon.shadow)marker.icon.shadow="http://chart.apis.google.com/chart?chst=d_map_pin_shadow";if(!marker.icon.shadow_width)marker.icon.shadow_width=34;if(!marker.icon.shadow_height)marker.icon.shadow_height=36;if(!marker.icon.info_anchor_x)marker.icon.info_anchor_x=(marker.icon.width*1)/2;if(!marker.icon.info_anchor_y)marker.icon.info_anchor_y=1;icon.image=marker.icon.image;icon.shadow=marker.icon.shadow;icon.size=new GSize(marker.icon.width,marker.icon.height);icon.iconAnchor=new GPoint(marker.icon.anchor_x,marker.icon.anchor_y);icon.shadowSize=new GSize(marker.icon.shadow_width,marker.icon.shadow_height);icon.infoWindowAnchor=new GPoint(marker.icon.info_anchor_x,marker.icon.info_anchor_y)
options.pointIcon=icon;}
m.jmap('AddMarker',options);bounds.extend(new GLatLng(marker.lat,marker.lng));if(bounds){if(c.markersRecenter)var new_center=bounds.getCenter();else var new_center=map.getCenter();if(c.markersRezoom){var new_zoom=map.getBoundsZoomLevel(bounds);if(new_zoom>17)new_zoom=17;}
else var new_zoom=map.getZoom();m.jmap('MoveTo',{'mapCenter':[new_center.lat(),new_center.lng()],'mapZoom':new_zoom});}}}
function calendar(){if(in_array('core/js/jquery.datepicker.js',include)){$('input.calendar:not(.calendared)').each(function(){$(this).simpleDatepicker({startdate:1900,enddate:2100}).addClass('calendared');});}}
function validate(){$('input.required:not(.norequired, input[type=hidden], input[type=checkbox], input[type=radio]), select.required:not(.norequired), textarea.required:not(.norequired)').after('<img src="'+DOMAIN+'core/images/required.gif" width="10" height="10" alt="Required" class="absmiddle" style="padding-left:1px;" />').addClass('norequired');$('form.require').each(function(){$(this).validate({submitHandler:function(form){submitIt(form);}});});$("form.register").each(function(){$(this).validate({rules:{user_name:{remote:DOMAIN+"?ajaxRequest=checkUsername",regex:register_regex_rule},user_email:{remote:DOMAIN+"?ajaxRequest=checkEmail"},user_confirm_password:{equalTo:"#user_password"}},messages:{user_name:{remote:register_username_unique_message,regex:register_regex_message},user_email:{remote:register_email_unique_message},user_confirm_password:{equalTo:"Your passwords don't match"}},submitHandler:function(form){submitIt(form);}});});}
function counter(){$('input.counter:not(.counted), textarea.counter:not(.counted)').each(function(){var maxlength=$(this).attr('maxlength');if(maxlength>0){var length=$(this).val().length;$(this).after("<span class='counter'><span title='You have typed "+length+" characters of the "+maxlength+" characters allowed'>"+length+"/"+maxlength+"</span></span>");$(this).keyup(function(){var new_length=$(this).val().length;var x=0;$(this).nextAll("span.counter").each(function(){if(x==0)$(this).html("<span title='You have typed "+new_length+" characters of the "+maxlength+" characters allowed'>"+new_length+"/"+maxlength+"</span>");x++;});});$(this).addClass('counted');}});}
function sortable(){$('div.sort, ul.sort').each(function(){if($(this).attr('id').length<=0)$(this).attr('id','sortable_'+Math.round(Math.random()*9999999));if($(".handle:not(.sortable)",this).length>0)var handle=".handle";else var handle="";$(this).sortable({items:'div.sortable, li.sortable',placeholder:'helper',handle:handle,opacity:0.5,stop:function(event,ui){var order='';var c=$(this).metadata();$('input.sorted',this).each(function(){order+='|'+this.value;});if(order)$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=orderIt&order='+order+(c['vars']?'&'+c['vars']:""),success:function(html){debugIt(html);}});rows();}});});$('div.sortThese, ul.sortThese').sortable({items:'div.sortThis, li.sortThis',placeholder:'helper',opacity:0.5,stop:function(){rows();}});$('table.sort:not(.sorted)').each(function(){$(this).children('tr:not(.sortable)').addClass('nodrag');if($(".handle:not(.sortable)",this).length>0)var handle="handle";else var handle="";$(this).addClass('sorted').tableDnD({dragHandle:handle,onDragClass:"sorting",onDrop:function(table,row){var order='';var c=$(table).metadata();$('input.sorted',table).each(function(){order+='|'+this.value;});if(order)$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=orderIt&order='+order+(c['vars']?'&'+c['vars']:""),success:function(html){debugIt(html);}});rows();}});});$('table.sortThese:not(.sorted)').each(function(){$(this).children('tr:not(.sortable)').addClass('nodrag');$(this).addClass('sorted').tableDnD({onDragClass:"sorting",onDrop:function(table,row){rows();}});});}
function tables(){if(in_array('core/js/jquery.datatables.js',include)){$('.datatable').each(function(){var module=$('input[name=module]',this).val();var section=$('input[name=section]',this).val();$(this).dataTable({"bProcessing":true,"bServerSide":true,"sAjaxSource":DOMAIN+"?ajaxRequest=data&module="+module+"&section="+section});});}}
function rating(){if(in_array('core/js/jquery.rating.js',include)){$('div.rating').each(function(){$("input",this).rating();});}}
function thickbox(){$("a.thickbox").filter(function(){return this.href.match(/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\.swf$|\.swf\?/);}).removeClass('thickbox').addClass("fancybox");$('a.thickbox, area.thickbox, input.thickbox').each(function(i){$(this).unbind('click');});tb_init('a.thickbox, area.thickbox, input.thickbox');}
function fancybox(){$(".fancybox:not(.fancyboxed)").each(function(){var d={'overlayOpacity':.7,'overlayColor':'#111','titlePosition':'over','centerOnScroll':true,'cyclic':true}
if(this.href.match(/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/)){d['autoDimensions']=true;}
else if(this.href.match(/\.swf$|\.swf\?/)){d['titleShow']=false;d['autoDimensions']=true;d['swf']={allowscriptaccess:'always',allowFullScreen:true,quality:'high',wmode:'transparent'}}
else{d['width']=700;d['height']=440;d['autoDimensions']=false;}
c=$.extend(d,$(this).metadata());$(this).addClass('fancyboxed').fancybox(c);});}
function quicksearch(){$('#quicksearch_q').liveUpdate('#quicksearch');$('select.quicksearch:not(.quicksearched)').each(function(){var id=$(this).attr('id');if(!id){id='quicksearch_'+Math.round(Math.random()*10000);$(this).attr('id',id);}
$(this).before("<input type='text' id='"+id+"_q' class='quicksearch default' value='Search..' style='margin-bottom:4px;' /><br />");$("#"+id+"_q").liveUpdate({parent:'#'+id,children:'option',placeholder:'Search..',nested:0});}).addClass('quicksearched');}
function texteditor(){if(MOBILE==false){$('textarea.texteditor:not(.textedited)').addClass('textedited').rte({css:[CSS_PUBLIC],style:'lwrte_body',controls_rte:default_toolbar,controls_html:html_toolbar});$('textarea.texteditor_basic:not(.textedited)').addClass('textedited').rte({css:[CSS_PUBLIC],style:'lwrte_body',controls_rte:basic_toolbar,controls_html:html_toolbar});$('textarea.texteditor_full:not(.textedited)').addClass('textedited').rte({css:[CSS_PUBLIC],style:'lwrte_body',controls_rte:full_toolbar,controls_html:html_toolbar});}
if(typeof CKEDITOR=="object"){$('textarea.ckeditor').removeClass('ckeditor').each(function(){var name=$(this).attr('name');delete CKEDITOR.instances[name];CKEDITOR.replace(name);});}}
function nest(){$('div.nest > ul').each(function(){var id=this.id;if(str_replace('navigator','',id)==id)var space=30;else var space=8;$(this).NestedSortable({accept:'nest-item',noNestingClass:"nonest-item",nestingPxSpace:space,opacity:.8,helperclass:'nest-helper',autoScroll:true,onChange:function(serialized){var module=$('#'+id+' input[name=module]').val();var parent=$('#'+id+' input[name=parent]').val();$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=nestIt&module='+module+'&parent='+parent+'&'+serialized[0].hash,success:function(html){debugIt(html);}});rows();}});});}
function swfupload(){$('.swfupload:not(.swfupload-created)').each(function(){var c=$(this).metadata();var id=$(this).attr('id');if(!id){id="swfupload-"+Math.round(Math.random()*99999);$(this).attr('id',id);}
var info=$(".swfupload-info",this);if(info.length>0)info.attr("id","swfupload-info-"+id);else $(this).append("<div class='swfupload-info' id='swfupload-info-"+id+"'></div>");$(".swfupload-placeholder",this).hide();$(this).addClass("swfupload-created").prepend("<div class='swfupload-button' id='swfupload-button-"+id+"'></div>").swfupload({upload_url:(c['url']?c['url']:DOMAIN+"?ajaxRequest=uploadIt&flash=1"),file_post_name:(c['field']?c['field']:'file'),file_types:(c['accept']?c['accept']:"*"),file_types_description:"Files",flash_url:DOMAIN+"core/flash/libraries/swfupload/swfupload.swf",button_image_url:DOMAIN+"core/images/button-browse.png",button_width:73,button_height:23,button_placeholder:$("#swfupload-button-"+id)[0],debug:false}).bind('fileQueued',function(event,file){var listitem='<div class="swfupload-file" id="swfupload-file-'+id+'-'+file.id+'" >'+'File: <em>'+(file.name.length>23?file.name.substr(0,23)+'..':file.name)+'</em> ('+Math.round(file.size/1024)+' KB) <span class="swfupload-file-progressvalue" ></span>'+'<div class="swfupload-file-progressbar" ><div class="swfupload-file-progress" ></div></div>'+'<span class="swfupload-file-status" >Pending</span>'+'<span class="swfupload-file-cancel i i-cancel"></span>'+'</div>';if(c['limit']==1)$("#swfupload-info-"+id).html(listitem);else $("#swfupload-info-"+id).append(listitem);$("#swfupload-file-"+id+"-"+file.id+" .swfupload-file-cancel").bind('click',function(){var swfu=$.swfupload.getInstance('#'+id);swfu.cancelUpload(file.id);$("#swfupload-file-"+id+"-"+file.id).slideUp('fast');var form=$('#'+id).parents('form:first');$("input[type='submit']",form).fadeTo(200,1).removeAttr('disabled');});var form=$('#'+id).parents('form:first');$("input[type='submit']",form).fadeTo(200,0.4).attr('disabled','disabled');$(this).swfupload('startUpload');}).bind('fileQueueError',function(event,file,errorCode,message){debugIt("event = "+event+", file = "+file+", error code = "+errorCode+", message = "+message+"<br />");alert((c['error']?c['error']:"You are not allowed to upload this type of file here."));}).bind('fileDialogComplete',function(event,numFilesSelected,numFilesQueued){var queue=$("#swfupload-queue-"+id);if(queue.length==0){$("swfupload-info-"+id).prepend("<div class='swfupload-queue' id='swfupload-queue-"+id+"'></div>");var queue=$("#swfupload-queue-"+id);}
queue.text('Files Selected: '+numFilesSelected+' / Queued Files: '+numFilesQueued);}).bind('uploadStart',function(event,file){$("#swfupload-file-"+id+"-"+file.id+" span.swfupload-file-status").text('Uploading...');$("#swfupload-file-"+id+"-"+file.id+" span.swfupload-file-progressvalue").text('0%');}).bind('uploadProgress',function(event,file,bytesLoaded){var percentage=Math.round((bytesLoaded/file.size)*100);$("#swfupload-file-"+id+"-"+file.id+" div.swfupload-file-progress").css('width',percentage+'%');$("#swfupload-file-"+id+"-"+file.id+" span.swfupload-file-progressvalue").text(percentage+'%');if(percentage>=100){$("#swfupload-file-"+id+"-"+file.id+" span.swfupload-file-status").text('Processing...');$("#swfupload-file-"+id+"-"+file.id).addClass('swfupload-file-processing');}}).bind('uploadSuccess',function(event,file,serverData){$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=loadIt&type=data&id='+serverData,success:function(serverData){var item=$("#swfupload-file-"+id+"-"+file.id);item.find('div.swfupload-file-progress').css('width','100%');item.find('span.swfupload-file-progressvalue').text('100%');item.addClass('swfupload-file-success').fadeOut(300,function(){$(this).removeClass('swfupload-file').removeClass('swfupload-file-processing').removeClass('swfupload-file-success').html(serverData).fadeIn(300);refreshIt();});$("#"+id+" .swfupload-placeholder").removeClass('required');$("#"+id+" label.error").hide();var form=$('#'+id).parents('form:first');$("input[type='submit']",form).fadeTo(200,1).removeAttr('disabled');}});}).bind('uploadComplete',function(event,file){$(this).swfupload('startUpload');});});}
function buttons(){$('div.button, li.button').mouseover(function(){$('div.buttons',this).show();}).mouseout(function(){$('div.buttons',this).hide();});}
function png(){$('body').pngFix();}
function lazyload(){}
function messages(){$('div.slideDown').slideDown(650,0).removeClass('slideDown');$('div.slideUp').slideUp(650,0).removeClass('slideUp');$('div.fadeOut').fadeOut(650,0).removeClass('fadeOut');$('div.fadeIn').fadeIn(650,0).removeClass('fadeIn');$('div._error').animate({opacity:1.0},5000).slideUp(650,function(){$(this).remove();});$('div._message').animate({opacity:1.0},5000).slideUp(650,function(){$(this).remove();});}
var ap_instances=new Array();function ap_stopAll(playerID){for(var i=0;i<ap_instances.length;i++){try{if(ap_instances[i]!=playerID)document.getElementById("audioplayer"+ap_instances[i].toString()).SetVariable("closePlayer",1);else document.getElementById("audioplayer"+ap_instances[i].toString()).SetVariable("closePlayer",0);}catch(errorObject){}}}
function ap_registerPlayers(){var objectID;var objectTags=document.getElementsByTagName("object");for(var i=0;i<objectTags.length;i++){objectID=objectTags[i].id;if(objectID.indexOf("audioplayer")==0){ap_instances[i]=objectID.substring(11,objectID.length);}}}
var ap_clearID=setInterval(ap_registerPlayers,100);var AudioPlayer=function(){var H=[];var D;var F="";var A={};var E=-1;var G="9";function B(I){if(document.all&&!window[I]){for(var J=0;J<document.forms.length;J++){if(document.forms[J][I]){return document.forms[J][I];break}}}return document.all?window[I]:document[I]}function C(I,J,K){B(I).addListener(J,K)}return{setup:function(J,I){F=J;A=I;if(swfobject.hasFlashPlayerVersion(G)){swfobject.switchOffAutoHideShow();swfobject.createCSS("p.audioplayer_container span","visibility:hidden;height:24px;overflow:hidden;padding:0;border:none;")}},getPlayer:function(I){return B(I)},addListener:function(I,J,K){C(I,J,K)},embed:function(I,K){var N={};var L;var J={};var O={};var M={};for(L in A){N[L]=A[L]}for(L in K){N[L]=K[L]}if(N.transparentpagebg=="yes"){J.bgcolor="#FFFFFF";J.wmode="transparent"}else{if(N.pagebg){J.bgcolor="#"+N.pagebg}J.wmode="opaque"}J.menu="false";for(L in N){if(L=="pagebg"||L=="width"||L=="transparentpagebg"){continue}O[L]=N[L]}M.name=I;M.style="outline: none";O.playerID=I;swfobject.embedSWF(F,I,N.width.toString(),"24",G,false,O,J,M);H.push(I)},syncVolumes:function(I,K){E=K;for(var J=0;J<H.length;J++){if(H[J]!=I){B(H[J]).setVolume(E)}}},activate:function(I,J){if(D&&D!=I){B(D).close()}D=I},load:function(K,I,L,J){B(K).load(I,L,J)},close:function(I){B(I).close();if(I==D){D=null}},open:function(I,J){if(J==undefined){J=1}B(I).open(J==undefined?0:J-1)},getVolume:function(I){return E}}}();function x(value){if(value!=""&&value!="undefined"&&value!=undefined&&value)return true;else return false;}
function url_base(url){var d;var parts=url.split('.');if(parts[3])d=parts[1];else if(parts[2]){if(parts[2].length<=3&&parts[1].length<=3)d=parts[0];}else if(parts[1]){if(parts[1].length<=3)d=parts[0];}if(!d)d=parts[1];return d;}
function str_replace(search,replace,subject){var f=search,r=replace,s=subject;var ra=is_array(r),sa=is_array(s),f=[].concat(f),r=[].concat(r),i=(s=[].concat(s)).length;while(j=0,i--){while(s[i]=s[i].split(f[j]).join(ra?r[j]||"":r[0]),++j in f){};};return sa?s:s[0];}
function is_array(mixed_var){return(mixed_var instanceof Array);}
function in_array(string,array){for(i=0;i<array.length;i++){if(array[i]==string)return true;}
return false;}
function number_format(number,decimals,dec_point,thousands_sep){var n=number,c=isNaN(decimals=Math.abs(decimals))?2:decimals;var d=dec_point==undefined?".":dec_point;var t=thousands_sep==undefined?",":thousands_sep,s=n<0?"-":"";var i=parseInt(n=Math.abs(+n||0).toFixed(c))+"",j=(j=i.length)>3?j%3:0;return s+(j?i.substr(0,j)+t:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+(c?d+Math.abs(n-i).toFixed(c).slice(2):"");}
$.fn.outerHTML=function(){return $('<div>').append(this.eq(0).clone()).html();};$.fn.rte=function(options,editors){if(!editors||editors.constructor!=Array)
editors=new Array();$(this).each(function(i){var id=(this.id)?this.id:editors.length;editors[id]=new lwRTE(this,options||{});});return editors;}
var lwRTE_resizer=function(textarea){this.drag=false;this.rte_zone=$(textarea).parents('.rte-zone');}
lwRTE_resizer.mousedown=function(resizer,e){resizer.drag=true;resizer.event=(typeof(e)=="undefined")?window.event:e;resizer.rte_obj=$(".rte-resizer",resizer.rte_zone).prev().eq(0);$('body',document).css('cursor','se-resize');return false;}
lwRTE_resizer.mouseup=function(resizer,e){resizer.drag=false;$('body',document).css('cursor','auto');return false;}
lwRTE_resizer.mousemove=function(resizer,e){if(resizer.drag){e=(typeof(e)=="undefined")?window.event:e;var w=Math.max(1,resizer.rte_zone.width()+e.screenX-resizer.event.screenX);var h=Math.max(1,resizer.rte_obj.height()+e.screenY-resizer.event.screenY);resizer.rte_zone.width(w);resizer.rte_obj.height(h);resizer.event=e;}
return false;}
var lwRTE=function(textarea,options){this.css=[];this.css_class=options.frame_class||'rte-iframe';this.base_url=options.base_url||'';this.width=options.width||$(textarea).width()||'100%';this.height=options.height||$(textarea).height()||350;this.iframe=null;this.iframe_doc=null;this.textarea=null;this.event=null;this.range=null;this.toolbars={rte:'',html:''};this.controls={rte:{disable:{hint:'Source editor'}},html:{enable:{hint:'Visual editor'}}};$.extend(this.controls.rte,options.controls_rte||{});$.extend(this.controls.html,options.controls_html||{});$.extend(this.css,options.css||{});if(document.designMode||document.contentEditable){$(textarea).wrap($('<div></div>').addClass('rte-zone').width(this.width));$('<div class="rte-resizer"><a href="#"></a></div>').insertAfter(textarea);var resizer=new lwRTE_resizer(textarea);$(".rte-resizer a",$(textarea).parents('.rte-zone')).mousedown(function(e){$(document).mousemove(function(e){return lwRTE_resizer.mousemove(resizer,e);});$(document).mouseup(function(e){return lwRTE_resizer.mouseup(resizer,e)});return lwRTE_resizer.mousedown(resizer,e);});this.textarea=textarea;this.enable_design_mode();}}
lwRTE.prototype.editor_cmd=function(command,args){this.iframe.contentWindow.focus();try{this.iframe_doc.execCommand(command,false,args);}
catch(e){}
this.iframe.contentWindow.focus();}
lwRTE.prototype.get_toolbar=function(){var editor=(this.iframe)?$(this.iframe):$(this.textarea);return(editor.prev().hasClass('rte-toolbar'))?editor.prev():null;}
lwRTE.prototype.activate_toolbar=function(editor,tb){var old_tb=this.get_toolbar();if(old_tb)
old_tb.remove();$(editor).before($(tb).clone(true));}
lwRTE.prototype.enable_design_mode=function(){var self=this;self.iframe=document.createElement("iframe");self.iframe.frameBorder=0;self.iframe.frameMargin=0;self.iframe.framePadding=0;self.iframe.width='100%';self.iframe.height=self.height||'100%';self.iframe.src="javascript:void(0);";var id=$(self.textarea).attr('id');if(!id){var id="lwrte_"+Math.floor(Math.random()*999999);$(self.textarea).attr('id',id);}
if($(self.textarea).attr('class'))
self.iframe.className=$(self.textarea).attr('class');if($(self.textarea).attr('id'))
self.iframe.id=$(self.textarea).attr('id');if($(self.textarea).attr('name'))
self.iframe.title=$(self.textarea).attr('name');var content=$(self.textarea).val();$(self.textarea).hide().after(self.iframe);var css='';for(var i in self.css)css+="<link type='text/css' rel='stylesheet' href='"+self.css[i]+"' />";var base=(self.base_url)?"<base href='"+self.base_url+"' />":'';var style=(self.css_class)?"class='"+self.css_class+"'":'';var doc="<html><head>"+base+css+"</head><body "+style+" style='padding:5px'>"+content+"</body></html>";self.iframe_doc=self.iframe.contentWindow.document;try{self.iframe_doc.designMode='on';}catch(e){$(self.iframe_doc).focus(function(){self.iframe_doc.designMode();});}
self.iframe_doc.open();self.iframe_doc.write(doc);self.iframe_doc.close();if(!self.toolbars.rte)
self.toolbars.rte=self.create_toolbar(self.controls.rte);self.activate_toolbar(self.iframe,self.toolbars.rte);$(self.iframe).parents('form').submit(function(){lwrte_save(self);});lwrte_save(self);if(ADMIN==true){$(self.iframe_doc).bind("contextmenu",function(e){var html=self.get_selected_html();if(html.indexOf('<img')>-1){self.lwrte_menu(e,'img');return false;}});}
$(self.iframe_doc).bind('keydown','Ctrl+l',function(evt){});$(self.iframe_doc).bind('keydown','Ctrl+b',function(evt){self.editor_cmd("bold");return false;});$(self.iframe_doc).bind('keydown','Ctrl+i',function(evt){self.editor_cmd("italic");return false;});$(self.iframe_doc).bind('keydown','Ctrl+u',function(evt){self.editor_cmd("underline");return false;});$(self.iframe_doc).bind('paste',function(e){if(texteditor_cleanup_paste==1)setTimeout('lwrte_cleanup("'+self.iframe.id+'")',30);});$(self.iframe_doc).mouseup(function(event){if(self.iframe_doc.selection)self.range=self.iframe_doc.selection.createRange();self.set_selected_controls((event.target)?event.target:event.srcElement,self.controls.rte);});$(self.iframe).blur(function(event){lwrte_save(self);});$(self.iframe_doc).blur(function(event){lwrte_save(self);if(self.iframe_doc.selection)self.range=self.iframe_doc.selection.createRange();});$(self.iframe_doc).keyup(function(event){lwrte_save(self);self.set_selected_controls(self.get_selected_element(),self.controls.rte);});if(!$.browser.msie)
self.editor_cmd('styleWithCSS',false);}
function lwrte_save(self){var html=$("body",self.iframe_doc).html();$(self.textarea).val(html);if(self.iframe.title=="post_text")$('#preview_text').html(html);}
var lwrte_timer;lwRTE.prototype.lwrte_menu=function(e,type){var self=this;var menu="";var id="";var iframe_position=$(self.iframe).offset();var top=iframe_position.top+e.pageY-10;var left=iframe_position.left+e.pageX-10;if(type=="img"){menu+="<span onclick=\"alert('clicked left');lwrte_menu_command('align-left','"+id+"');\">Align Left</span>";menu+="<span onclick=\"alert('clicked right');lwrte_menu_command('align-right','"+id+"');\">Align Right</span>";}
menu="<div class='rte-menu' style='top:"+top+"px;left:"+left+"px;'>"+menu+"</div>";$("body").append(menu);$("div.rte-menu").mouseout(function(){if(lwrte_timer)clearTimeout(lwrte_timer);lwrte_timer=setTimeout('lwrte_menu_remove();',250);});$("div.rte-menu").mouseover(function(){if(lwrte_timer)clearTimeout(lwrte_timer);});}
function lwrte_menu_remove(){$('div.rte-menu').remove();}
function lwrte_menu_command(command,id){alert(command+','+id);}
function lwrte_parse(html,attribute){var value='';var regex=new RegExp(attribute+"=[\"|'](.*?)[\"|']","g");if(html.indexOf(attribute)>-1){var matches=regex.exec(html);if(matches[1])value=matches[1];}
return value;}
function lwrte_cleanup(id){var w=$('iframe').each(function(){var iframe_doc=this.contentDocument;var html=$("body",iframe_doc).html();$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=cleanIt&text='+encodeURIComponent(html),success:function(html){$("body",iframe_doc).html(html);}});});}
lwRTE.prototype.disable_design_mode=function(submit){var self=this;self.textarea=(submit)?$('<input type="hidden" />').get(0):$('<textarea></textarea>').width('100%').height(self.height).get(0);if(self.iframe.className)
self.textarea.className=self.iframe.className;if(self.iframe.id)
self.textarea.id=self.iframe.id;if(self.iframe.title)
self.textarea.name=self.iframe.title;$(self.textarea).val($('body',self.iframe_doc).html());if(!self.toolbars.html)
self.toolbars.html=self.create_toolbar(self.controls.html);if(submit!=true){$(self.iframe_doc).remove();$(self.iframe).remove();self.iframe=self.iframe_doc=null;self.activate_toolbar(self.textarea,self.toolbars.html);}
lwrte_save(self);}
lwRTE.prototype.toolbar_click=function(obj,control){var fn=control.exec;var args=control.args||[];var is_select=(obj.tagName.toUpperCase()=='SELECT');$('.rte-panel',this.get_toolbar()).remove();if(fn){if(is_select)
args.push(obj);try{fn.apply(this,args);}catch(e){}}else if(this.iframe&&control.command){if(is_select){args=obj.options[obj.selectedIndex].value;if(args.length<=0)
return;}
this.editor_cmd(control.command,args);}
lwrte_save(this);}
lwRTE.prototype.create_toolbar=function(controls){var self=this;var tb=$("<div></div>").addClass('rte-toolbar').width('100%').append($("<ul></ul>")).append($("<div></div>").addClass('clear'));var obj,li;for(var key in controls){if(controls[key].separator){li=$("<li></li>").addClass('separator');}else{if(controls[key].init){try{controls[key].init.apply(controls[key],[this]);}catch(e){}}
if(controls[key].select){obj=$(controls[key].select).change(function(e){debugIt('class 1: '+this.className+'<br />');self.event=e;self.toolbar_click(this,controls[this.className]);$(this).removeClass('valid');return false;});}else{obj=$("<a href='#'></a>").attr('title',(controls[key].hint)?controls[key].hint:key).attr('rel',key).click(function(e){self.event=e;self.toolbar_click(this,controls[this.rel]);return false;})}
li=$("<li></li>").append(obj.addClass(key));}
if(key=="suggestions"&&texteditor_links_suggestions!=1){}
else $("ul",tb).append(li);}
$('.enable',tb).click(function(){self.enable_design_mode();return false;});$('.disable',tb).click(function(){self.disable_design_mode();return false;});return tb.get(0);}
lwRTE.prototype.create_panel=function(title,width){var self=this;var tb=self.get_toolbar();if(!tb)
return false;$('.rte-panel',tb).remove();var drag,event;var left=self.event.pageX;var top=self.event.pageY;var panel=$('<div></div>').hide().addClass('rte-panel');if($.browser.msie&&$.browser.version=="6.0")panel.css({left:left,top:top});$('<div></div>').addClass('rte-panel-title').html(title).append($("<a class='close' href='#'>X</a>").click(function(){self.panel_remove(panel);return false;})).mousedown(function(){drag=true;return false;}).mouseup(function(){drag=false;return false;}).mousemove(function(e){if(drag&&event){left-=event.pageX-e.pageX;top-=event.pageY-e.pageY;}
event=e;return false;}).appendTo(panel);if(width)panel.width(width);tb.append(panel);return panel;}
lwRTE.prototype.panel_show=function(panel){$(panel).fadeIn(400);}
lwRTE.prototype.panel_remove=function(panel){panel.fadeOut(400,function(){panel.remove();});}
lwRTE.prototype.get_content=function(){return(this.iframe)?$('body',this.iframe_doc).html():$(this.textarea).val();}
lwRTE.prototype.set_content=function(content){(this.iframe)?$('body',this.iframe_doc).html(content):$(this.textarea).val(content);}
lwRTE.prototype.set_selected_controls=function(node,controls){var toolbar=this.get_toolbar();if(!toolbar)
return false;var key,i_node,obj,control,tag,i,value;try{for(key in controls){control=controls[key];obj=$('.'+key,toolbar);obj.removeClass('active');if(!control.tags)
continue;i_node=node;do{if(i_node.nodeType!=1)
continue;tag=i_node.nodeName.toLowerCase();if($.inArray(tag,control.tags)<0)
continue;if(control.select){obj=obj.get(0);if(obj.tagName.toUpperCase()=='SELECT'){obj.selectedIndex=0;for(i=0;i<obj.options.length;i++){value=obj.options[i].value;if(value&&((control.tag_cmp&&control.tag_cmp(i_node,value))||tag==value)){obj.selectedIndex=i;break;}}}}else
obj.addClass('active');}while(i_node=i_node.parentNode)}}catch(e){}
return true;}
lwRTE.prototype.get_selected_element=function(){var node,selection,range;var iframe_win=this.iframe.contentWindow;if(iframe_win.getSelection){try{selection=iframe_win.getSelection();range=selection.getRangeAt(0);node=range.commonAncestorContainer;}catch(e){return false;}}else{try{selection=iframe_win.document.selection;range=selection.createRange();node=range.parentElement();}catch(e){return false;}}
return node;}
lwRTE.prototype.get_selection_range=function(){var rng=null;var iframe_window=this.iframe.contentWindow;this.iframe.focus();if(iframe_window.getSelection){rng=iframe_window.getSelection().getRangeAt(0);if($.browser.opera){var s=rng.startContainer;if(s.nodeType===Node.TEXT_NODE)
rng.setStartBefore(s.parentNode);}}else{if(this.range){this.range.select();rng=this.iframe_doc.selection.createRange();}}
return rng;}
lwRTE.prototype.get_selected_text=function(){var iframe_win=this.iframe.contentWindow;if(iframe_win.getSelection)
return iframe_win.getSelection().toString();this.range.select();return iframe_win.document.selection.createRange().text;};lwRTE.prototype.get_selected_html=function(){var html=null;var iframe_window=this.iframe.contentWindow;var rng=this.get_selection_range();if(rng&&iframe_window){if(iframe_window.getSelection){var e=document.createElement('div');e.appendChild(rng.cloneContents());html=e.innerHTML;}else{if(rng.htmlText)html=rng.htmlText;else{elm=rng.item?rng.item(0):rng.parentElement();var html=elm.outerHTML;}}}
return html;};lwRTE.prototype.selection_replace_with=function(html){var rng=this.get_selection_range();var iframe_window=this.iframe.contentWindow;if(!rng)return;this.editor_cmd('removeFormat');if(iframe_window.getSelection){rng.deleteContents();rng.insertNode(rng.createContextualFragment(html));this.editor_cmd('delete');}else{if(rng.htmlText){this.editor_cmd('delete');rng.pasteHTML(html);}
else{elm=rng.item?rng.item(0):rng.parentElement();var e=$(elm);$(e).replaceWith(html);}}}
var rte_tag='-rte-tmp-tag-';var full_toolbar={bold:{command:"bold",tags:["b","strong"]},italic:{command:"italic",tags:["i","em"]},strikeThrough:{command:"strikethrough",tags:["s","strike"]},underline:{command:"underline",tags:["u"]},s2:{separator:true},justifyLeft:{command:"justifyleft"},justifyCenter:{command:"justifycenter"},justifyRight:{command:"justifyright"},justifyFull:{command:"justifyfull"},s3:{separator:true},indent:{command:"indent"},outdent:{command:"outdent"},s4:{separator:true},subscript:{command:"subscript",tags:["sub"]},superscript:{command:"superscript",tags:["sup"]},s5:{separator:true},orderedList:{command:"insertorderedlist",tags:["ol"]},unorderedList:{command:"insertunorderedlist",tags:["ul"]},s6:{separator:true},color:{exec:lwrte_color},image:{exec:lwrte_image,tags:["img"]},link:{exec:lwrte_link,tags:["a"]},unlink:{command:"unlink"},suggestions:{exec:lwrte_link_suggestions},s8:{separator:true},block:{command:"formatblock",select:'<select> <option value="">- Format -</option> <option value="<p>">Paragraph</option> <option value="<h1>">Header 1</option> <option value="<h2>">Header 2</options> <option value="<h3>">Header 3</option> <option value="<h4>">Header 4</options> <option value="<h5>">Header 5</option> <option value="<h6>">Header 6</options></select> ',tag_cmp:lwrte_block_compare,tags:["p","h1","h2","h3","h4","h5","h6"]},font:{command:"fontname",select:'<select> <option value="">- Font -</option> <option value="arial">Arial</option> <option value="comic sans ms">Comic Sans</option> <option value="courier new">Courier New</options> <option value="georgia">Georgia</option> <option value="helvetica">Helvetica</options> <option value="impact">Impact</option> <option value="times new roman">Times</options> <option value="trebuchet ms">Trebuchet</options> <option value="verdana">Verdana</options></select> ',tags:["span"]},size:{command:"fontsize",select:'<select> <option value="">- Size -</option> <option value="1">1 (8pt)</option> <option value="2">2 (10pt)</option> <option value="3">3 (12pt)</options> <option value="4">4 (14pt)</option> <option value="5">5 (16pt)</options> <option value="6">6 (18pt)</option> <option value="7">7 (20pt)</options></select> ',tags:["span"]}};var html_toolbar={s1:{separator:true}};var default_toolbar={bold:{command:"bold",tags:["b","strong"]},italic:{command:"italic",tags:["i","em"]},underline:{command:"underline",tags:["u"]},s2:{separator:true},indent:{command:"indent"},outdent:{command:"outdent"},unorderedList:{command:"insertunorderedlist",tags:["ul"]},s6:{separator:true},image:{exec:lwrte_image,tags:["img"]},link:{exec:lwrte_link_basic,tags:["a"]},unlink:{command:"unlink"},suggestions:{exec:lwrte_link_suggestions},s8:{separator:true}};var basic_toolbar={bold:{command:"bold",tags:["b","strong"]},italic:{command:"italic",tags:["i","em"]},underline:{command:"underline",tags:["u"]},s2:{separator:true},indent:{command:"indent"},outdent:{command:"outdent"},unorderedList:{command:"insertunorderedlist",tags:["ul"]}};function lwrte_block_compare(node,tag){tag=tag.replace(/<([^>]*)>/,'$1');return(tag.toLowerCase()==node.nodeName.toLowerCase());}
function lwrte_color(){var self=this;var panel=self.create_panel('Set color for text',385);var mouse_down=false;var mouse_over=false;panel.append('\<div class="rte-panel-content"><div class="colorpicker1"><div class="rgb" id="rgb"></div></div>\<div class="colorpicker1"><div class="gray" id="gray"></div></div>\<div class="colorpicker2">\<div class="palette" id="palette"></div>\<div class="preview" id="preview"></div>\<div class="color" id="color"></div>\</div>\<div class="clear"></div></div>\<p class="submit"><button id="ok">Ok</button><button id="cancel">Cancel</button></p>');self.panel_show(panel);var preview=$('#preview',panel);var color=$("#color",panel);var palette=$("#palette",panel);var colors=['#660000','#990000','#cc0000','#ff0000','#333333','#006600','#009900','#00cc00','#00ff00','#666666','#000066','#000099','#0000cc','#0000ff','#999999','#909000','#900090','#009090','#ffffff','#cccccc','#ffff00','#ff00ff','#00ffff','#000000','#eeeeee'];for(var i=0;i<colors.length;i++)
$("<div></div>").addClass("item").css('background',colors[i]).appendTo(palette);var height=$('#rgb').height();var part_width=$('#rgb').width()/6;$('#rgb,#gray,#palette',panel).mousedown(function(e){mouse_down=true;return false;}).mouseup(function(e){mouse_down=false;return false;}).mouseout(function(e){mouse_over=false;return false;}).mouseover(function(e){mouse_over=true;return false;});$('#rgb').mousemove(function(e){if(mouse_down&&mouse_over)compute_color(this,true,false,false,e);return false;});$('#gray').mousemove(function(e){if(mouse_down&&mouse_over)compute_color(this,false,true,false,e);return false;});$('#palette').mousemove(function(e){if(mouse_down&&mouse_over)compute_color(this,false,false,true,e);return false;});$('#rgb').click(function(e){compute_color(this,true,false,false,e);return false;});$('#gray').click(function(e){compute_color(this,false,true,false,e);return false;});$('#palette').click(function(e){compute_color(this,false,false,true,e);return false;});$('#cancel',panel).click(function(){self.panel_remove(panel);return false;});$('#ok',panel).click(function(){var value=color.html();if(value.length>0&&value.charAt(0)=='#'){if(self.iframe_doc.selection)
self.range.select();self.editor_cmd('foreColor',value);}
self.panel_remove(panel);return false;});function to_hex(n){var s="0123456789abcdef";return s.charAt(Math.floor(n/16))+s.charAt(n%16);}
function get_abs_pos(element){var r={x:element.offsetLeft,y:element.offsetTop};if(element.offsetParent){var tmp=get_abs_pos(element.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}
return r;};function get_xy(obj,event){var x,y,top;event=event||window.event;var el=event.target||event.srcElement;var pos=get_abs_pos(obj);if($('div.rte-panel').css('position')=="fixed")top=$(window).scrollTop();x=event.pageX-pos.x;y=event.pageY-pos.y-top;return{x:x,y:y};}
function compute_color(obj,is_rgb,is_gray,is_palette,e){var r,g,b,c;var mouse=get_xy(obj,e);var x=mouse.x;var y=mouse.y;if(is_rgb){r=(x>=0)*(x<part_width)*255+(x>=part_width)*(x<2*part_width)*(2*255-x*255/part_width)+(x>=4*part_width)*(x<5*part_width)*(-4*255+x*255/part_width)+(x>=5*part_width)*(x<6*part_width)*255;g=(x>=0)*(x<part_width)*(x*255/part_width)+(x>=part_width)*(x<3*part_width)*255+(x>=3*part_width)*(x<4*part_width)*(4*255-x*255/part_width);b=(x>=2*part_width)*(x<3*part_width)*(-2*255+x*255/part_width)+(x>=3*part_width)*(x<5*part_width)*255+(x>=5*part_width)*(x<6*part_width)*(6*255-x*255/part_width);var k=(height-y)/height;r=128+(r-128)*k;g=128+(g-128)*k;b=128+(b-128)*k;}else if(is_gray){r=g=b=(height-y)*1.7;}else if(is_palette){x=Math.floor(x/10);y=Math.floor(y/10);c=colors[x+y*5];}
if(!is_palette)
c='#'+to_hex(r)+to_hex(g)+to_hex(b);preview.css('background',c);color.html(c);}}
function lwrte_image(){var self=this;var img_url='';var img_align='';var img_style='';var html=self.get_selected_html();if(html){if($(html).attr('src'))img_url=$(html).attr('src');if($(html).attr('align'))img_align=$(html).attr('align');if($(html).attr('style'))img_style=$(html).attr('style');}
var panel_text='\<div class="rte-panel-content"><p><label>Image</label><input type="text" id="url" size="30" value="'+img_url+'" /><button id="view">View</button></p>';panel_text=panel_text+'\<p><label>Upload</label><input type="file" name="lwrte_file" id="lwrte_file" size="22" /></p>';panel_text=panel_text+'\<div class="clear"></div>\<p><label>Align</label><select id="align"><option value=""></option><option value="left"';if(img_align=="left")panel_text+=' selected="selected"';panel_text+='>Left</option><option value="right"';if(img_align=="right")panel_text+=' selected="selected"';panel_text+='>Right</option></select></p>\<div class="clear"></div>\<div id="preview" style="margin-left:25px;"></div></div>\<p class="submit"><button id="ok">Ok</button><button id="cancel">Cancel</button></p>';var panel=self.create_panel('Insert image',385);panel.append(panel_text);self.panel_show(panel);var url=$('#url',panel);$('#lwrte_file',panel).change(function(){loader("preview",{text:'Uploading..'});$.ajaxFileUpload({url:DOMAIN+'?ajaxRequest=upload_rte',secureuri:false,fileElementId:'lwrte_file',dataType:'json',success:function(data,status){$("#url",panel).val(data.file);$('#lwrte_file',panel).val("");$("#preview",panel).html('');$("#red",panel).animate({opacity:1.0},1500).slideUp(500,function(){$(this).remove();});}});});$('#view',panel).click(function(){(url.val().length>0)?window.open(url.val()):alert("Enter URL of image to view");return false;});$('#cancel',panel).click(function(){self.panel_remove(panel);return false;});$('#ok',panel).click(function(){var file=url.val();var align=$('#align',panel).val();var h="<img src='"+file+"' alt=''";if(align)h+=" align='"+align+"'";h+=" />";self.selection_replace_with(h);self.panel_remove(panel);lwrte_save(self);return false;})}
function lwrte_unformat(){this.editor_cmd('removeFormat');this.editor_cmd('unlink');}
function lwrte_clear(){if(confirm('Clear Document?'))
this.set_content('');}
function lwrte_link(){var self=this;var panel=self.create_panel("Create link / Attach file",385);panel.append('\<div class="rte-panel-content"><p><label>URL</label><input type="text" id="url" size="30" value=""><button id="file">Attach File</button><button id="view">View</button></p>\<div class="clear"></div>\<p><label>Title</label><input type="text" id="title" size="30" value=""><label>Target</label><select id="target"><option value="">default</option><option value="_blank">new</option></select></p>\<div class="clear"></div></div>\<p class="submit"><button id="ok">Ok</button><button id="cancel">Cancel</button></p>');self.panel_show(panel);$('#cancel',panel).click(function(){self.panel_remove(panel);return false;});var url=$('#url',panel);var upload=$('#file',panel).upload({autoSubmit:true,action:'uploader.php',onComplete:function(response){if(response.length<=0)
return;response=eval("("+response+")");if(response.error&&response.error.length>0)
alert(response.error);else
url.val((response.file&&response.file.length>0)?response.file:'');}});$('#view',panel).click(function(){(url.val().length>0)?window.open(url.val()):alert("Enter URL to view");return false;});$('#ok',panel).click(function(){var url=$('#url',panel).val();var target=$('#target',panel).val();var title=$('#title',panel).val();if(self.get_selected_text().length<=0){alert('Select the text you wish to link!');return false;}
self.panel_remove(panel);if(url.length<=0)
return false;self.editor_cmd('unlink');self.editor_cmd('createLink',rte_tag);var tmp=$('<span></span>').append(self.get_selected_html());if(target.length>0)$('a[href*="'+rte_tag+'"]',tmp).attr('target',target);if(title.length>0)$('a[href*="'+rte_tag+'"]',tmp).attr('title',title);$('a[href*="'+rte_tag+'"]',tmp).attr('href',url);self.selection_replace_with(tmp.html());lwrte_save(self);return false;})}
function lwrte_link_basic(){var self=this;var text=self.get_selected_text();if(text.length<=0){alert("Please select the text which you'd like to link.");return false}
var panel=self.create_panel("Add a Link",385);panel.append('<div class="rte-panel-content"><p><label>URL</label><input type="text" id="url" size="30" value=""><button id="view">View</button></p><div class="clear"></div><p><label>Title</label><input type="text" id="title" size="30" value=""></p><div class="clear"></div></div><p class="submit"><button id="ok">Ok</button><button id="cancel">Cancel</button></p>');self.panel_show(panel);$("#cancel",panel).click(function(){self.panel_remove(panel);return false});var url=$("#url",panel);$("#view",panel).click(function(){(url.val().length>0)?window.open(url.val()):alert("Enter URL to view");return false});$("#ok",panel).click(function(){var url=$("#url",panel).val();var title=$("#title",panel).val();var target=$("#target",panel).val();if(self.get_selected_text().length<=0){alert("Select the text you wish to link!");return false}
self.panel_remove(panel);if(url.length<=0){return false}
self.editor_cmd("unlink");if($.browser.msie)self.editor_cmd('createLink',url);else{var h='<a href="'+url+'"';if(target)h+=' target="'+target+'"';if(title)h+=' title="'+title+'"';h+='>'+self.get_selected_html()+'</a>';self.editor_cmd("insertHTML",h);}
lwrte_save(self);return false;})};function lwrte_link_suggestions(text){var self=this;var text=self.get_selected_text();var html=self.get_selected_text();if(text.length<=0){alert("Please select the text which you'd like to link.");return false}
var panel=self.create_panel("Add a Link",450);panel.append('<div class="rte-panel-content"><div id="rte_link_suggestions"><div class="none"><img src="'+DOMAIN+'core/images/ajax-loader.gif" alt="Loading.." /></div><br /><br /></div></div><p class="submit"><button id="ok">Ok</button><button id="cancel">Cancel</button></p>');self.panel_show(panel);$("#cancel",panel).click(function(){self.panel_remove(panel);return false});$.ajax({type:'POST',url:DOMAIN,data:'ajaxRequest=suggestIt&type=link&text='+encodeURIComponent(text),success:function(html){$('#rte_link_suggestions').html(html);thickbox();$("tr.suggestion",panel).click(function(){$("tr.selected",panel).removeClass('selected');$(this).addClass('selected');});}});$("#ok",panel).click(function(){var url=$("tr.selected input[name=url]",panel).val();var title=$("tr.selected input[name=title]",panel).val();var target=$("tr.selected input[name=target]",panel).val();if(url.length<=0){alert("Please select a suggested link");return false}
if(self.get_selected_text().length<=0){alert("Please select the text in the texteditor which you'd like to link.");return false}
self.panel_remove(panel);self.editor_cmd("unlink");if($.browser.msie)self.editor_cmd('createLink',url);else{var h='<a href="'+url+'"';if(target)h+=' target="'+target+'"';if(title)h+=' title="'+title+'"';h+='>'+self.get_selected_html()+'</a>';self.editor_cmd("insertHTML",h);}
lwrte_save(self);return false;})};eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('9.J={1C:6(e){4 x=0;4 y=0;4 7=e.Y;4 12=1H;c(9(e).8(\'A\')==\'T\'){4 N=7.B;4 Q=7.z;12=1f;7.B=\'1r\';7.A=\'1q\';7.z=\'1d\'}4 3=e;R(3){x+=3.1h+(3.O&&!9.1m.1i?d(3.O.17)||0:0);y+=3.1n+(3.O&&!9.1m.1i?d(3.O.18)||0:0);3=3.1t}3=e;R(3&&3.1e&&3.1e.16()!=\'f\'){x-=3.u||0;y-=3.F||0;3=3.1D}c(12==1f){7.A=\'T\';7.z=Q;7.B=N}a{x:x,y:y}},1B:6(3){4 x=0,y=0;R(3){x+=3.1h||0;y+=3.1n||0;3=3.1t}a{x:x,y:y}},1s:6(e){4 w=9.8(e,\'1E\');4 h=9.8(e,\'1G\');4 o=0;4 q=0;4 7=e.Y;c(9(e).8(\'A\')!=\'T\'){o=e.V;q=e.U}p{4 N=7.B;4 Q=7.z;7.B=\'1r\';7.A=\'1q\';7.z=\'1d\';o=e.V;q=e.U;7.A=\'T\';7.z=Q;7.B=N}a{w:w,h:h,o:o,q:q}},1F:6(3){a{o:3.V||0,q:3.U||0}},1I:6(e){4 h,w,C;c(e){w=e.I;h=e.G}p{C=5.j;w=1c.14||P.14||(C&&C.I)||5.f.I;h=1c.10||P.10||(C&&C.G)||5.f.G}a{w:w,h:h}},1p:6(e){4 t=0,l=0,w=0,h=0,s=0,E=0;c(e&&e.1u.16()!=\'f\'){t=e.F;l=e.u;w=e.15;h=e.W;s=0;E=0}p{c(5.j){t=5.j.F;l=5.j.u;w=5.j.15;h=5.j.W}p c(5.f){t=5.f.F;l=5.f.u;w=5.f.15;h=5.f.W}s=P.14||5.j.I||5.f.I||0;E=P.10||5.j.G||5.f.G||0}a{t:t,l:l,w:w,h:h,s:s,E:E}},1v:6(e,D){4 3=9(e);4 t=3.8(\'1w\')||\'\';4 r=3.8(\'1x\')||\'\';4 b=3.8(\'1A\')||\'\';4 l=3.8(\'1z\')||\'\';c(D)a{t:d(t)||0,r:d(r)||0,b:d(b)||0,l:d(l)};p a{t:t,r:r,b:b,l:l}},1y:6(e,D){4 3=9(e);4 t=3.8(\'1J\')||\'\';4 r=3.8(\'1M\')||\'\';4 b=3.8(\'27\')||\'\';4 l=3.8(\'28\')||\'\';c(D)a{t:d(t)||0,r:d(r)||0,b:d(b)||0,l:d(l)};p a{t:t,r:r,b:b,l:l}},26:6(e,D){4 3=9(e);4 t=3.8(\'18\')||\'\';4 r=3.8(\'22\')||\'\';4 b=3.8(\'23\')||\'\';4 l=3.8(\'17\')||\'\';c(D)a{t:d(t)||0,r:d(r)||0,b:d(b)||0,l:d(l)||0};p a{t:t,r:r,b:b,l:l}},2e:6(L){4 x=L.2d||(L.2b+(5.j.u||5.f.u))||0;4 y=L.2c||(L.29+(5.j.F||5.f.F))||0;a{x:x,y:y}},X:6(g,13){13(g);g=g.1O;R(g){9.J.X(g,13);g=g.1L}},1N:6(g){9.J.X(g,6(3){19(4 Z 1T 3){c(1Z 3[Z]===\'6\'){3[Z]=1a}}})},1X:6(3,H){4 k=9.J.1p();4 11=9.J.1s(3);c(!H||H==\'1W\')9(3).8({1U:k.t+((1g.1o(k.h,k.E)-k.t-11.q)/2)+\'1j\'});c(!H||H==\'20\')9(3).8({1Y:k.l+((1g.1o(k.w,k.s)-k.l-11.o)/2)+\'1j\'})},2f:6(3,1l){4 1k=9(\'25[@M*="S"]\',3||5),S;1k.24(6(){S=K.M;K.M=1l;K.Y.2a="21:1R.1P.1V(M=\'"+S+"\')"})}};[].1b||(1S.1Q.1b=6(v,n){n=(n==1a)?0:n;4 m=K.1K;19(4 i=n;i<m;i++)c(K[i]==v)a i;a-1});',62,140,'|||el|var|document|function|es|css|jQuery|return||if|parseInt||body|nodeEl|||documentElement|clientScroll||||wb|else|hb||iw||scrollLeft|||||position|display|visibility|de|toInteger|ih|scrollTop|clientHeight|axis|clientWidth|iUtil|this|event|src|oldVisibility|currentStyle|self|oldPosition|while|png|none|offsetHeight|offsetWidth|scrollHeight|traverseDOM|style|attr|innerHeight|windowSize|restoreStyles|func|innerWidth|scrollWidth|toLowerCase|borderLeftWidth|borderTopWidth|for|null|indexOf|window|absolute|tagName|true|Math|offsetLeft|opera|px|images|emptyGIF|browser|offsetTop|max|getScroll|block|hidden|getSize|offsetParent|nodeName|getMargins|marginTop|marginRight|getPadding|marginLeft|marginBottom|getPositionLite|getPosition|parentNode|width|getSizeLite|height|false|getClient|paddingTop|length|nextSibling|paddingRight|purgeEvents|firstChild|Microsoft|prototype|DXImageTransform|Array|in|top|AlphaImageLoader|vertically|centerEl|left|typeof|horizontally|progid|borderRightWidth|borderBottomWidth|each|img|getBorder|paddingBottom|paddingLeft|clientY|filter|clientX|pageY|pageX|getPointer|fixPNG'.split('|'),0,{}))
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('8.c={m:W,7:W,2g:z(){B a.1x(z(){9(a.1v){a.5.P.27(\'2L\',8.c.1X);a.5=W;a.1v=d;9(8.13.1o){a.1U="3o"}H{a.v.3n=\'\';a.v.2V=\'\';a.v.2G=\'\'}}})},1X:z(e){9(8.c.7!=W){8.c.1H(e);B d}k 6=a.1z;8(1c).24(\'2u\',8.c.20).24(\'2r\',8.c.1H);6.5.C=8.E.2U(e);6.5.10=6.5.C;6.5.1E=d;6.5.3g=a!=a.1z;8.c.7=6;9(6.5.12&&a!=a.1z){21=8.E.26(6.1p);22=8.E.1K(6);25={x:u(8.q(6,\'K\'))||0,y:u(8.q(6,\'J\'))||0};j=6.5.10.x-21.x-22.1h/2-25.x;g=6.5.10.y-21.y-22.Y/2-25.y;8.1Y.3y(6,[j,g])}B 8.3f||d},2I:z(e){k 6=8.c.7;6.5.1E=G;k 1G=6.v;6.5.1B=8.q(6,\'T\');6.5.1q=8.q(6,\'1N\');9(!6.5.2p)6.5.2p=6.5.1q;6.5.n={x:u(8.q(6,\'K\'))||0,y:u(8.q(6,\'J\'))||0};6.5.1L=0;6.5.1J=0;9(8.13.1o){k 1V=8.E.2f(6,G);6.5.1L=1V.l||0;6.5.1J=1V.t||0}6.5.f=8.1A(8.E.26(6),8.E.1K(6));9(6.5.1q!=\'2A\'&&6.5.1q!=\'2W\'){1G.1N=\'2A\'}8.c.m.2h();k V=6.34(G);8(V).q({T:\'2x\',K:\'16\',J:\'16\'});V.v.2w=\'0\';V.v.2v=\'0\';V.v.2t=\'0\';V.v.2s=\'0\';8.c.m.1y(V);k F=8.c.m.Z(0).v;9(6.5.1Z){F.2d=\'2B\';F.2c=\'2B\'}H{F.2c=6.5.f.Y+\'O\';F.2d=6.5.f.1h+\'O\'}F.T=\'2x\';F.2w=\'16\';F.2v=\'16\';F.2t=\'16\';F.2s=\'16\';8.1A(6.5.f,8.E.1K(V));9(6.5.A){9(6.5.A.K){6.5.n.x+=6.5.C.x-6.5.f.x-6.5.A.K;6.5.f.x=6.5.C.x-6.5.A.K}9(6.5.A.J){6.5.n.y+=6.5.C.y-6.5.f.y-6.5.A.J;6.5.f.y=6.5.C.y-6.5.A.J}9(6.5.A.2b){6.5.n.x+=6.5.C.x-6.5.f.x-6.5.f.Y+6.5.A.2b;6.5.f.x=6.5.C.x-6.5.f.1h+6.5.A.2b}9(6.5.A.28){6.5.n.y+=6.5.C.y-6.5.f.y-6.5.f.Y+6.5.A.28;6.5.f.y=6.5.C.y-6.5.f.Y+6.5.A.28}}6.5.1I=6.5.n.x;6.5.1M=6.5.n.y;9(6.5.1u||6.5.p==\'1w\'){1r=8.E.2f(6.1p,G);6.5.f.x=6.37+(8.13.1o?0:8.13.2n?-1r.l:1r.l);6.5.f.y=6.38+(8.13.1o?0:8.13.2n?-1r.t:1r.t);8(6.1p).1y(8.c.m.Z(0))}9(6.5.p){8.c.2q(6);6.5.S.p=8.c.2j}9(6.5.12){8.1Y.31(6)}F.K=6.5.f.x-6.5.1L+\'O\';F.J=6.5.f.y-6.5.1J+\'O\';F.2d=6.5.f.1h+\'O\';F.2c=6.5.f.Y+\'O\';8.c.7.5.1F=d;9(6.5.1i){6.5.S.X=8.c.2o}9(6.5.17!=d){8.c.m.q(\'17\',6.5.17)}9(6.5.N){8.c.m.q(\'N\',6.5.N);9(1P.1O){8.c.m.q(\'2y\',\'2C(N=\'+6.5.N*2z+\')\')}}9(6.5.1f){8.c.m.3a(6.5.1f);8.c.m.Z(0).3e.v.T=\'M\'}9(6.5.1j)6.5.1j.1m(6,[V,6.5.n.x,6.5.n.y]);9(8.L&&8.L.2a>0){8.L.2Z(6)}9(6.5.19==d){1G.T=\'M\'}B d},2q:z(6){9(6.5.p.I==2P){9(6.5.p==\'1w\'){6.5.s=8.1A({x:0,y:0},8.E.1K(6.1p));k 1t=8.E.2f(6.1p,G);6.5.s.w=6.5.s.1h-1t.l-1t.r;6.5.s.h=6.5.s.Y-1t.t-1t.b}H 9(6.5.p==\'1c\'){k 29=8.E.3x();6.5.s={x:0,y:0,w:29.w,h:29.h}}}H 9(6.5.p.I==2F){6.5.s={x:u(6.5.p[0])||0,y:u(6.5.p[1])||0,w:u(6.5.p[2])||0,h:u(6.5.p[3])||0}}6.5.s.j=6.5.s.x-6.5.f.x;6.5.s.g=6.5.s.y-6.5.f.y},1C:z(7){9(7.5.1u||7.5.p==\'1w\'){8(\'2H\',1c).1y(8.c.m.Z(0))}8.c.m.2h().3v().q(\'N\',1);9(1P.1O){8.c.m.q(\'2y\',\'2C(N=2z)\')}},1H:z(e){8(1c).27(\'2u\',8.c.20).27(\'2r\',8.c.1H);9(8.c.7==W){B}k 7=8.c.7;8.c.7=W;9(7.5.1E==d){B d}9(7.5.15==G){8(7).q(\'1N\',7.5.1q)}k 1G=7.v;9(7.12){8.c.m.q(\'2J\',\'2N\')}9(7.5.1f){8.c.m.3t(7.5.1f)}9(7.5.1T==d){9(7.5.R>0){9(!7.5.D||7.5.D==\'1S\'){k x=2D 8.R(7,{2m:7.5.R},\'K\');x.2i(7.5.n.x,7.5.1l)}9(!7.5.D||7.5.D==\'1Q\'){k y=2D 8.R(7,{2m:7.5.R},\'J\');y.2i(7.5.n.y,7.5.1k)}}H{9(!7.5.D||7.5.D==\'1S\')7.v.K=7.5.1l+\'O\';9(!7.5.D||7.5.D==\'1Q\')7.v.J=7.5.1k+\'O\'}8.c.1C(7);9(7.5.19==d){8(7).q(\'T\',7.5.1B)}}H 9(7.5.R>0){7.5.1F=G;k 1e=d;9(8.L&&8.1D&&7.5.15){1e=8.E.26(8.1D.m.Z(0))}8.c.m.3i({K:1e?1e.x:7.5.f.x,J:1e?1e.y:7.5.f.y},7.5.R,z(){7.5.1F=d;9(7.5.19==d){7.v.T=7.5.1B}8.c.1C(7)})}H{8.c.1C(7);9(7.5.19==d){8(7).q(\'T\',7.5.1B)}}9(8.L&&8.L.2a>0){8.L.3h(7)}9(8.1D&&7.5.15){8.1D.3m(7)}9(7.5.11&&(7.5.1l!=7.5.n.x||7.5.1k!=7.5.n.y)){7.5.11.1m(7,7.5.3r||[0,0,7.5.1l,7.5.1k])}9(7.5.1g)7.5.1g.1m(7);B d},2o:z(x,y,j,g){9(j!=0)j=u((j+(a.5.1i*j/U.2k(j))/2)/a.5.1i)*a.5.1i;9(g!=0)g=u((g+(a.5.1s*g/U.2k(g))/2)/a.5.1s)*a.5.1s;B{j:j,g:g,x:0,y:0}},2j:z(x,y,j,g){j=U.2l(U.2T(j,a.5.s.j),a.5.s.w+a.5.s.j-a.5.f.1h);g=U.2l(U.2T(g,a.5.s.g),a.5.s.h+a.5.s.g-a.5.f.Y);B{j:j,g:g,x:0,y:0}},20:z(e){9(8.c.7==W||8.c.7.5.1F==G){B}k 7=8.c.7;7.5.10=8.E.2U(e);9(7.5.1E==d){2E=U.3l(U.2O(7.5.C.x-7.5.10.x,2)+U.2O(7.5.C.y-7.5.10.y,2));9(2E<7.5.1R){B}H{8.c.2I(e)}}k j=7.5.10.x-7.5.C.x;k g=7.5.10.y-7.5.C.y;3k(k i 3s 7.5.S){k 14=7.5.S[i].1m(7,[7.5.n.x+j,7.5.n.y+g,j,g]);9(14&&14.I==3A){j=i!=\'1d\'?14.j:(14.x-7.5.n.x);g=i!=\'1d\'?14.g:(14.y-7.5.n.y)}}7.5.1I=7.5.f.x+j-7.5.1L;7.5.1M=7.5.f.y+g-7.5.1J;9(7.5.12&&(7.5.1a||7.5.11)){8.1Y.1a(7,7.5.1I,7.5.1M)}9(7.5.18)7.5.18.1m(7,[7.5.n.x+j,7.5.n.y+g]);9(!7.5.D||7.5.D==\'1S\'){7.5.1l=7.5.n.x+j;8.c.m.Z(0).v.K=7.5.1I+\'O\'}9(!7.5.D||7.5.D==\'1Q\'){7.5.1k=7.5.n.y+g;8.c.m.Z(0).v.J=7.5.1M+\'O\'}9(8.L&&8.L.2a>0){8.L.3u(7)}B d},2M:z(o){9(!8.c.m){8(\'2H\',1c).1y(\'<2X 3w="2S"></2X>\');8.c.m=8(\'#2S\');k 1n=8.c.m.Z(0);k Q=1n.v;Q.1N=\'2W\';Q.T=\'M\';Q.2J=\'2N\';Q.30=\'M\';Q.39=\'3c\';9(1P.1O){1n.1U="2R"}H{Q.3d=\'M\';Q.2G=\'M\';Q.2V=\'M\'}}9(!o){o={}}B a.1x(z(){9(a.1v||!8.E)B;9(1P.1O){a.33=z(){B d};a.32=z(){B d}}k 1n=a;k P=o.2Q?8(a).35(o.2Q):8(a);9(8.13.1o){P.1x(z(){a.1U="2R"})}H{P.q(\'-36-1d-1W\',\'M\');P.q(\'1d-1W\',\'M\');P.q(\'-2Y-1d-1W\',\'M\')}a.5={P:P,1T:o.1T?G:d,19:o.19?G:d,15:o.15?o.15:d,12:o.12?o.12:d,1u:o.1u?o.1u:d,17:o.17?u(o.17)||0:d,N:o.N?3B(o.N):d,R:u(o.R)||W,23:o.23?o.23:d,S:{},C:{},1j:o.1j&&o.1j.I==1b?o.1j:d,1g:o.1g&&o.1g.I==1b?o.1g:d,11:o.11&&o.11.I==1b?o.11:d,D:/1Q|1S/.3j(o.D)?o.D:d,1R:o.1R?u(o.1R)||0:0,A:o.A?o.A:d,1Z:o.1Z?G:d,1f:o.1f||d};9(o.S&&o.S.I==1b)a.5.S.1d=o.S;9(o.18&&o.18.I==1b)a.5.18=o.18;9(o.p&&((o.p.I==2P&&(o.p==\'1w\'||o.p==\'1c\'))||(o.p.I==2F&&o.p.2K==4))){a.5.p=o.p}9(o.2e){a.5.2e=o.2e}9(o.X){9(3C o.X==\'3q\'){a.5.1i=u(o.X)||1;a.5.1s=u(o.X)||1}H 9(o.X.2K==2){a.5.1i=u(o.X[0])||1;a.5.1s=u(o.X[1])||1}}9(o.1a&&o.1a.I==1b){a.5.1a=o.1a}a.1v=G;P.1x(z(){a.1z=1n});P.24(\'2L\',8.c.1X)})}};8.3z.1A({3p:8.c.2g,3b:8.c.2M});',62,225,'|||||dragCfg|elm|dragged|jQuery|if|this||iDrag|false||oC|dy|||dx|var||helper|oR||containment|css||cont||parseInt|style||||function|cursorAt|return|pointer|axis|iUtil|dhs|true|else|constructor|top|left|iDrop|none|opacity|px|dhe|els|fx|onDragModifier|display|Math|clonedEl|null|grid|hb|get|currentPointer|onChange|si|browser|newCoords|so|0px|zIndex|onDrag|ghosting|onSlide|Function|document|user|dh|frameClass|onStop|wb|gx|onStart|nRy|nRx|apply|el|msie|parentNode|oP|parentBorders|gy|contBorders|insideParent|isDraggable|parent|each|append|dragElem|extend|oD|hidehelper|iSort|init|prot|dEs|dragstop|nx|diffY|getSize|diffX|ny|position|ActiveXObject|window|vertically|snapDistance|horizontally|revert|unselectable|oldBorder|select|draginit|iSlider|autoSize|dragmove|parentPos|sliderSize|hpc|bind|sliderPos|getPosition|unbind|bottom|clnt|count|right|height|width|fractions|getBorder|destroy|empty|custom|fitToContainer|abs|min|duration|opera|snapToGrid|initialPosition|getContainment|mouseup|marginLeft|marginBottom|mousemove|marginRight|marginTop|block|filter|100|relative|auto|alpha|new|distance|Array|userSelect|body|dragstart|cursor|length|mousedown|build|move|pow|String|handle|on|dragHelper|max|getPointer|KhtmlUserSelect|absolute|div|khtml|highlight|listStyle|modifyContainer|ondragstart|onselectstart|cloneNode|find|moz|offsetLeft|offsetTop|overflow|addClass|Draggable|hidden|mozUserSelect|firstChild|selectKeyHelper|fromHandler|checkdrop|animate|test|for|sqrt|check|MozUserSelect|off|DraggableDestroy|number|lastSi|in|removeClass|checkhover|hide|id|getClient|dragmoveBy|fn|Object|parseFloat|typeof'.split('|'),0,{}))
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1.4={1o:l(u,r,G,F){v u<=1.6.8.9.X&&(u+G)>=(1.6.8.9.X+1.6.8.9.S.w)&&r<=1.6.8.9.Q&&(r+F)>=(1.6.8.9.Q+1.6.8.9.S.h)?k:7},1r:l(u,r,G,F){v!(u>(1.6.8.9.X+1.6.8.9.S.w)||(u+G)<1.6.8.9.X||r>(1.6.8.9.Q+1.6.8.9.S.h)||(r+F)<1.6.8.9.Q)?k:7},1q:l(u,r,G,F){v u<1.6.8.9.O.x&&(u+G)>1.6.8.9.O.x&&r<1.6.8.9.O.y&&(r+F)>1.6.8.9.O.y?k:7},C:7,g:{},1u:0,j:{},1E:l(D){5(1.6.8==E){v}n i;1.4.g={};n 15=7;T(i R 1.4.j){5(1.4.j[i]!=E){n 2=1.4.j[i].q(0);5(1(1.6.8).1d(\'.\'+2.3.a)){5(2.3.m==7){2.3.p=1.18(1.K.1c(2),1.K.1b(2));2.3.m=k}5(2.3.A){1.4.j[i].13(2.3.A)}1.4.g[i]=1.4.j[i];5(1.c&&2.3.s&&1.6.8.9.W){2.3.1e=1(\'.\'+2.3.a,2);D.I.H=\'16\';1.c.1f(2);2.3.1k=1.c.1l(1.12(2,\'z\')).1t;D.I.H=D.9.1h;15=k}5(2.3.V){2.3.V.Z(1.4.j[i].q(0),[1.6.8])}}}}5(15){1.c.1F()}},1w:l(){1.4.g={};T(i R 1.4.j){5(1.4.j[i]!=E){n 2=1.4.j[i].q(0);5(1(1.6.8).1d(\'.\'+2.3.a)){2.3.p=1.18(1.K.1c(2),1.K.1b(2));5(2.3.A){1.4.j[i].13(2.3.A)}1.4.g[i]=1.4.j[i];5(1.c&&2.3.s&&1.6.8.9.W){2.3.1e=1(\'.\'+2.3.a,2);D.I.H=\'16\';1.c.1f(2);D.I.H=D.9.1h}}}}},1a:l(e){5(1.6.8==E){v}1.4.C=7;n i;n 14=7;n 1g=0;T(i R 1.4.g){n 2=1.4.g[i].q(0);5(1.4.C==7&&1.4[2.3.t](2.3.p.x,2.3.p.y,2.3.p.1A,2.3.p.1y)){5(2.3.B&&2.3.h==7){1.4.g[i].13(2.3.B)}5(2.3.h==7&&2.3.M){14=k}2.3.h=k;1.4.C=2;5(1.c&&2.3.s&&1.6.8.9.W){1.c.P.q(0).1J=2.3.1m;1.c.1a(2)}1g++}1U 5(2.3.h==k){5(2.3.N){2.3.N.Z(2,[e,1.6.P.q(0).1i,2.3.J])}5(2.3.B){1.4.g[i].11(2.3.B)}2.3.h=7}}5(1.c&&!1.4.C&&1.6.8.W){1.c.P.q(0).I.H=\'16\'}5(14){1.4.C.3.M.Z(1.4.C,[e,1.6.P.q(0).1i])}},1N:l(e){n i;T(i R 1.4.g){n 2=1.4.g[i].q(0);5(2.3.A){1.4.g[i].11(2.3.A)}5(2.3.B){1.4.g[i].11(2.3.B)}5(2.3.s){1.c.19[1.c.19.1Q]=i}5(2.3.L&&2.3.h==k){2.3.h=7;2.3.L.Z(2,[e,2.3.J])}2.3.m=7;2.3.h=7}1.4.g={}},1v:l(){v b.1j(l(){5(b.U){5(b.3.s){z=1.12(b,\'z\');1.c.1p[z]=E;1(\'.\'+b.3.a,b).1P()}1.4.j[\'d\'+b.17]=E;b.U=7;b.f=E}})},1n:l(o){v b.1j(l(){5(b.U==k||!o.1s||!1.K||!1.6){v}b.3={a:o.1s,A:o.1R||7,B:o.1O||7,1m:o.1K||7,L:o.1L||o.L||7,M:o.M||o.1T||7,N:o.N||o.1S||7,V:o.V||7,t:o.Y&&(o.Y==\'1o\'||o.Y==\'1r\')?o.Y:\'1q\',J:o.J?o.J:7,m:7,h:7};5(o.1D==k&&1.c){z=1.12(b,\'z\');1.c.1p[z]=b.3.a;b.3.s=k;5(o.10){b.3.10=o.10;b.3.1k=1.c.1l(z).1t}}b.U=k;b.17=1H(1G.1I()*1B);1.4.j[\'d\'+b.17]=1(b);1.4.1u++})}};1.1z.18({1x:1.4.1v,1C:1.4.1n});1.1M=1.4.1w;',62,119,'|jQuery|iEL|dropCfg|iDrop|if|iDrag|false|dragged|dragCfg||this|iSort||||highlighted|||zones|true|function||var|||get|zoney|||zonex|return||||id|ac|hc|overzone|elm|null|zoneh|zonew|display|style|fx|iUtil|onDrop|onHover|onOut|currentPointer|helper|ny|in|oC|for|isDroppable|onActivate|so|nx|tolerance|apply|onChange|removeClass|attr|addClass|applyOnHover|oneIsSortable|none|idsa|extend|changed|checkhover|getSizeLite|getPositionLite|is|el|measure|hlt|oD|firstChild|each|os|serialize|shc|build|fit|collected|pointer|intersect|accept|hash|count|destroy|remeasure|DroppableDestroy|hb|fn|wb|10000|Droppable|sortable|highlight|start|Math|parseInt|random|className|helperclass|ondrop|recallDroppables|checkdrop|hoverclass|DraggableDestroy|length|activeclass|onout|onhover|else'.split('|'),0,{}))
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3.4={17:[],H:{},d:6,T:n,1T:k(){5(3.f.j==n){D}m w,U,c,I;3.4.d.8(0).1U=3.f.j.9.14;w=3.4.d.8(0).L;w.M=\'1k\';3.4.d.1l=3.1i(3.S.1X(3.4.d.8(0)),3.S.1Y(3.4.d.8(0)));w.1V=3.f.j.9.1l.1r+\'1E\';w.27=3.f.j.9.1l.1h+\'1E\';U=3.S.20(3.f.j);w.1z=U.t;w.1C=U.r;w.1y=U.b;w.1Q=U.l;5(3.f.j.9.J==u){c=3.f.j.28(u);I=c.L;I.1z=\'13\';I.1C=\'13\';I.1y=\'13\';I.1Q=\'13\';I.M=\'1k\';3.4.d.24().18(c)}3(3.f.j).1x(3.4.d.8(0));3.f.j.L.M=\'1a\'},23:k(e){5(!e.9.1e&&3.15.1t.1K){5(e.9.P)e.9.P.22(j);3(e).21(\'25\',e.9.26||e.9.2a);3(e).1u();3(3.15.1t).1S(e)}3.4.d.29(e.9.14).2b(\'&1N;\');3.4.T=n;m w=3.4.d.8(0).L;w.M=\'1a\';3.4.d.1x(e);5(e.9.v>0){3(e).1Z(e.9.v)}3(\'1D\').18(3.4.d.8(0));m Y=[];m V=6;Z(m i=0;i<3.4.17.A;i++){m N=3.15.1W[3.4.17[i]].8(0);m p=3.E(N,\'p\');m X=3.4.1p(p);5(N.g.1q!=X.1b){N.g.1q=X.1b;5(V==6&&N.g.10){V=N.g.10}X.p=p;Y[Y.A]=X}}3.4.17=[];5(V!=6&&Y.A>0){V(Y)}},2e:k(e,o){5(!3.f.j)D;m B=6;m i=0;5(e.g.q.1s()>0){Z(i=e.g.q.1s();i>0;i--){5(e.g.q.8(i-1)!=3.f.j){5(!e.C.1g){5((e.g.q.8(i-1).K.y+e.g.q.8(i-1).K.1h/2)>3.f.j.9.1v){B=e.g.q.8(i-1)}W{2v}}W{5((e.g.q.8(i-1).K.x+e.g.q.8(i-1).K.1r/2)>3.f.j.9.2t&&(e.g.q.8(i-1).K.y+e.g.q.8(i-1).K.1h/2)>3.f.j.9.1v){B=e.g.q.8(i-1)}}}}}5(B&&3.4.T!=B){3.4.T=B;3(B).2x(3.4.d.8(0))}W 5(!B&&(3.4.T!=n||3.4.d.8(0).2B!=e)){3.4.T=n;3(e).18(3.4.d.8(0))}3.4.d.8(0).L.M=\'1k\'},2z:k(e){5(3.f.j==n){D}e.g.q.F(k(){7.K=3.1i(3.S.2A(7),3.S.2y(7))})},1p:k(s){m i;m h=\'\';m o={};5(s){5(3.4.H[s]){o[s]=[];3(\'#\'+s+\' .\'+3.4.H[s]).F(k(){5(h.A>0){h+=\'&\'}h+=s+\'[]=\'+3.E(7,\'p\');o[s][o[s].A]=3.E(7,\'p\')})}W{Z(a 1w s){5(3.4.H[s[a]]){o[s[a]]=[];3(\'#\'+s[a]+\' .\'+3.4.H[s[a]]).F(k(){5(h.A>0){h+=\'&\'}h+=s[a]+\'[]=\'+3.E(7,\'p\');o[s[a]][o[s[a]].A]=3.E(7,\'p\')})}}}}W{Z(i 1w 3.4.H){o[i]=[];3(\'#\'+i+\' .\'+3.4.H[i]).F(k(){5(h.A>0){h+=\'&\'}h+=i+\'[]=\'+3.E(7,\'p\');o[i][o[i].A]=3.E(7,\'p\')})}}D{1b:h,o:o}},1L:k(e){5(!e.2h){D}D 7.F(k(){5(!7.C||!3(e).2g(\'.\'+7.C.z))3(e).2d(7.C.z);3(e).1I(7.C.9)})},1M:k(){D 7.F(k(){3(\'.\'+7.C.z).1u();3(7).2c();7.C=n;7.1H=n})},1A:k(o){5(o.z&&3.S&&3.f&&3.15){5(!3.4.d){3(\'1D\',2i).18(\'<1P p="1R">&1N;</1P>\');3.4.d=3(\'#1R\');3.4.d.8(0).L.M=\'1a\'}7.2j({z:o.z,19:o.19?o.19:6,1c:o.1c?o.1c:6,G:o.G?o.G:6,1O:o.1O||o.2o,1J:o.1J||o.2n,1K:u,10:o.10||o.2m,v:o.v?o.v:6,J:o.J?u:6,1m:o.1m?o.1m:\'2k\'});D 7.F(k(){m 9={11:o.11?u:6,1G:1F,O:o.O?1B(o.O):6,14:o.G?o.G:6,v:o.v?o.v:6,1e:u,J:o.J?u:6,R:o.R?o.R:n,Q:o.Q?o.Q:n,12:o.12&&o.12.1o==1n?o.12:6,16:o.16&&o.16.1o==1n?o.16:6,P:o.P&&o.P.1o==1n?o.P:6,1d:/2l|2f/.2p(o.1d)?o.1d:6,1j:o.1j?2q(o.1j)||0:6,1f:o.1f?o.1f:6};3(\'.\'+o.z,7).1I(9);7.1H=u;7.C={z:o.z,11:o.11?u:6,1G:1F,O:o.O?1B(o.O):6,14:o.G?o.G:6,v:o.v?o.v:6,1e:u,J:o.J?u:6,R:o.R?o.R:n,Q:o.Q?o.Q:n,1g:o.1g?u:6,9:9}})}}};3.2w.1i({2s:3.4.1A,1S:3.4.1L,2r:3.4.1M});3.2u=3.4.1p;',62,162,'|||jQuery|iSort|if|false|this|get|dragCfg||||helper||iDrag|dropCfg|||dragged|function||var|null||id|el||||true|fx|shs|||accept|length|cur|sortCfg|return|attr|each|helperclass|collected|cs|ghosting|pos|style|display|iEL|opacity|onStop|containment|handle|iUtil|inFrontOf|margins|fnc|else|ser|ts|for|onChange|revert|onStart|0px|hpc|iDrop|onDrag|changed|append|activeclass|none|hash|hoverclass|axis|so|cursorAt|floats|hb|extend|snapDistance|block|oC|tolerance|Function|constructor|serialize|os|wb|size|overzone|DraggableDestroy|ny|in|after|marginBottom|marginTop|build|parseFloat|marginRight|body|px|3000|zindex|isSortable|Draggable|onOut|sortable|addItem|destroy|nbsp|onHover|div|marginLeft|sortHelper|SortableAddItem|start|className|width|zones|getPosition|getSize|fadeIn|getMargins|css|apply|check|empty|position|initialPosition|height|cloneNode|removeClass|oP|html|DroppableDestroy|addClass|checkhover|horizontally|is|childNodes|document|Droppable|intersect|vertically|onchange|onout|onhover|test|parseInt|SortableDestroy|Sortable|nx|SortSerialize|break|fn|before|getPositionLite|measure|getSizeLite|parentNode'.split('|'),0,{}))
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2.6={28:9(e,o){5(e.L){2.6.1R(e);8 2.6.1K(e)}r{8 2.6.1D(e,o)}},1D:2.p.2b,1K:9(e){5(!2.v.A){8}5(!(e.1q.1r.1k()>0)){8}5(!e.3.Z){2.p.2n(e);e.3.Z=C}7 a=2.6.1A(e);7 b=2.6.1v(e,a);7 c=(!a)?2.6.24(e):n;7 d=n;5(a){5(e.3.1m===a&&e.3.1W===b){d=C}}r 5(e.3.1m===a&&e.3.1V===c){d=C}e.3.1m=a;e.3.1W=b;e.3.1V=c;5(d){8}5(a!==N){5(b){2.6.1U(e,a)}r{2.6.1Q(e,a)}}r 5(c){2.6.1P(e)}},1R:9(e){5(!e.3.16){8 n}7 a=e.3.15;7 b=e.3.14;7 c=2.v.A.B.2o;7 d=2.1i.1L();5((c.y-d.M)-d.t>-a){1H.1F(0,b)}5(c.y-d.t<a){1H.1F(0,-b)}},18:9(a){2.6.1C(a);8 2.6.1B(a)},1B:2.p.18,1C:9(a){5(2.6.S&&2.6.D){2.6.D.1y(2.6.S);2.6.D=N;2.6.S=""}5(2.1d.1w.L){2.1d.1w.3.Z=n}},X:9(s){5(2(\'#\'+s).q(0).L){8 2.6.27(s)}r{8 2.6.29(s)}},29:2.p.X,27:9(s){7 i;7 h=\'\';7 j=\'\';7 o={};7 e;7 k=9(f){7 g=[];1X=2(f).J(\'.\'+2.p.1b[s]);1X.1p(9(i){7 a=2.2s(m,\'1l\');5(a&&a.1S){a=a.1S(e.3.11)[0]}5(h.I>0){h+=\'&\'}h+=s+j+\'[\'+i+\'][1l]=\'+a;g[i]={1l:a};7 b=2(m).J(e.3.G+"."+e.3.W.V(" ").T(".")).q(0);7 c=j;j+=\'[\'+i+\'][J]\';7 d=k(b);5(d.I>0){g[i].J=d}j=c});8 g};5(s){5(2.p.1b[s]){e=2(\'#\'+s).q(0);o[s]=k(e)}r{1O(a 1N s){5(2.p.1b[s[a]]){e=2(\'#\'+s[a]).q(0);o[s[a]]=k(e)}}}}r{1O(i 1N 2.p.1b){e=2(\'#\'+i).q(0);o[i]=k(e)}}8{2p:h,o:o}},1A:9(e){7 d=0;7 f=2.1M(e.1q.1r,9(i){7 a=(i.z.y<2.v.A.B.1j)&&(i.z.y>d);5(!a){8 n}7 b;5(e.3.Q){b=(i.z.x+i.z.13+e.3.P>2.v.A.B.12+2.v.A.B.1h.13)}r{b=(i.z.x-e.3.P<2.v.A.B.12)}5(!b){8 n}7 c=2.6.1g(e,i);5(c){8 n}d=i.z.y;8 C});5(f.I>0){8 f[(f.I-1)]}r{8 N}},24:9(e){7 c;7 d=2.1M(e.1q.1r,9(i){7 a=(c===1J||i.z.y<c);5(!a){8 n}7 b=2.6.1g(e,i);5(b){8 n}c=i.z.y;8 C});5(d.I>0){d=d[(d.I-1)];8 d.z.y<2.v.A.B.1j+2.v.A.B.1h.2m&&d.z.y>2.v.A.B.1j}r{8 n}},1g:9(e,a){7 b=2.v.A;5(!b){8 n}5(a==b){8 C}5(2(a).2l("."+e.1I.1f.V(" ").T(".")).1G(9(){8 m==b}).I!==0){8 C}r{8 n}},1v:9(e,a){5(!a){8 n}5(e.3.O&&2(a).1G("."+e.3.O).q(0)===a){8 n}5(e.3.Q){8 a.z.x+a.z.13-(e.3.H-e.3.P)>2.v.A.B.12+2.v.A.B.1h.13}r{8 a.z.x+(e.3.H-e.3.P)<2.v.A.B.12}},1U:9(e,a){7 b=2(a).J(e.3.G+"."+e.3.W.V(" ").T("."));7 c=2.p.U;1E=c.q(0).2k;1E.2j=\'2i\';5(!b.1k()){7 d="<"+e.3.G+" 2h=\'"+e.3.W+"\'></"+e.3.G+">";b=2(a).2g(d).J(e.3.G).1z(e.3.1e)}2.6.17(e,b);2.6.Y(e);b.1x(c.q(0));2.6.1a(e)},1Q:9(e,a){2.6.17(e,2(a).1t());2.6.Y(e);2(a).2f(2.p.U.q(0));2.6.1a(e)},1P:9(e){2.6.17(e,e);2.6.Y(e);2(e).1x(2.p.U.q(0));2.6.1a(e)},Y:9(e){7 a=2.p.U.1t(e.3.G+"."+e.3.W.V(" ").T("."));7 b=a.J("."+e.1I.1f.V(" ").T(".")+":2e").1k();5(b===0&&a.q(0)!==e){a.2d()}},1a:9(e){7 a=2.p.U.1t();5(a.q(0)!==e){a.2c()}e.3.Z=n},17:9(e,a){7 b=2(a);5((e.3.K)&&(!2.6.D||b.q(0)!=2.6.D.q(0))){5(2.6.D){2.6.D.1y(e.3.K)}5(b.q(0)!=e){2.6.D=b;b.2E(e.3.K);2.6.S=e.3.K}r{2.6.D=N;2.6.S=""}}},2a:9(){8 m.1p(9(){5(m.L){m.3=N;m.L=N;2(m).2D()}})},26:9(a){5(a.1f&&2.1i&&2.v&&2.1d&&2.p){m.1p(9(){m.L=C;m.3={O:a.O?a.O:n,Q:a.Q?C:n,H:25(a.H,10)||2C,K:a.K?a.K:"",1u:a.1u?a.1u:n,16:a.16!==1J?a.16==C:C,15:a.15?a.15:20,14:a.14?a.14:20,11:a.11?a.11:/[^\\-]*$/};m.3.P=25(m.3.H*0.4,10);m.3.G=m.2B;m.3.W=m.2A;m.3.1e=(m.3.Q)?{"1c-21":0,"1c-1Z":m.3.H+\'1Y\'}:{"1c-21":m.3.H+\'1Y\',"1c-1Z":0};2(m.3.G,m).1z(m.3.1e)});2.p.2b=2.6.28;2.p.18=2.6.18;2.p.X=2.6.X}8 m.2z(a)}};2.2y.2x({2w:2.6.26,2v:2.6.2a});2.1i.1L=9(e){7 t,l,w,h,R,M;5(e&&e.2u.2t()!=\'F\'){t=e.19;l=e.1o;w=e.1n;h=e.1s;R=0;M=0}r{5(u.E&&u.E.19){t=u.E.19;l=u.E.1o;w=u.E.1n;h=u.E.1s}r 5(u.F){t=u.F.19;l=u.F.1o;w=u.F.1n;h=u.F.1s}R=1T.2r||u.E.23||u.F.23||0;M=1T.2q||u.E.22||u.F.22||0}8{t:t,l:l,w:w,h:h,R:R,M:M}};',62,165,'||jQuery|nestedSortCfg||if|iNestedSortable|var|return|function|||||||||||||this|false||iSort|get|else|||document|iDrag||||pos|dragged|dragCfg|true|currentNesting|documentElement|body|nestingTag|nestingPxSpace|length|children|currentNestingClass|isNestedSortable|ih|null|noNestingClass|snapTolerance|rightToLeft|iw|latestNestingClass|join|helper|split|nestingTagClass|serialize|beforeHelperRemove|remeasured||serializeRegExp|nx|wb|scrollSpeed|scrollSensitivity|autoScroll|updateCurrentNestingClass|check|scrollTop|afterHelperInsert|collected|padding|iDrop|styleToAttach|accept|isBeingDragged|oC|iUtil|ny|size|id|lastPrecedingItem|scrollWidth|scrollLeft|each|dropCfg|el|scrollHeight|parent|nestingLimit|shouldNestItem|overzone|prepend|removeClass|css|findPrecedingItem|oldCheck|newCheck|oldCheckHover|styleHelper|scrollBy|filter|window|sortCfg|undefined|newCheckHover|getScroll|grep|in|for|insertOnTop|appendItem|scroll|match|self|nestItem|lastTouchingFirst|lastShouldNest|thisChildren|px|right||left|clientHeight|clientWidth|isTouchingFirstItem|parseInt|build|newSerialize|checkHover|oldSerialize|destroy|checkhover|show|hide|visible|after|append|class|auto|width|style|parents|hb|measure|currentPointer|hash|innerHeight|innerWidth|attr|toLowerCase|nodeName|NestedSortableDestroy|NestedSortable|extend|fn|Sortable|className|tagName|30|SortableDestroy|addClass'.split('|'),0,{}))
var arrowimages={down:['menu_arrow_down',DOMAIN+'core/images/arrow-down.gif',10],right:['menu_arrow_right',DOMAIN+'core/images/arrow-right.gif']}
var jquerycssmenu={fadesettings:{overduration:150,outduration:100},buildmenu:function(menuid,arrowsvar){jQuery(document).ready(function($){var $mainmenu=$(menuid+">ul")
var $headers=$mainmenu.find("ul").parent()
$headers.each(function(i){var $curobj=$(this)
var $subul=$(this).find('ul:eq(0)')
this._dimensions={w:this.offsetWidth,h:this.offsetHeight,subulw:$subul.outerWidth(),subulh:$subul.outerHeight()}
this.istopheader=$curobj.parents("ul").length==1?true:false
$subul.css({top:this.istopheader?this._dimensions.h+"px":0})
$curobj.children("a:eq(0)").css(this.istopheader?{paddingRight:arrowsvar.down[2]}:{}).append('<!-- <img src="'+(this.istopheader?arrowsvar.down[1]:arrowsvar.right[1])
+'" class="'+(this.istopheader?arrowsvar.down[0]:arrowsvar.right[0])
+'" style="border:0;" align="top" /> -->')
$curobj.hover(function(e){var $targetul=$(this).children("ul:eq(0)")
this._offsets={left:$(this).offset().left,top:$(this).offset().top}
var menuleft=this.istopheader?0:this._dimensions.w
menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())?(this.istopheader?-this._dimensions.subulw+this._dimensions.w:-this._dimensions.w):menuleft
$targetul.css({left:menuleft+"px"}).fadeIn(jquerycssmenu.fadesettings.overduration)},function(e){$(this).children("ul:eq(0)").hide();})})
$mainmenu.find("ul").css({display:'none',visibility:'visible'})})}}
jquerycssmenu.buildmenu(".menu_javascript",arrowimages);;(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=$('<div id="'+settings.id+'"><div class="tooltip-title"></div><div class="tooltip-body"></div><div class="tooltip-url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('div.tooltip-title',helper.parent);helper.body=$('div.tooltip-body',helper.parent);helper.url=$('div.tooltip-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("<br/>");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<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery);$.extend({createUploadIframe:function(id,uri){var frameId='jUploadFrame'+id;if(window.ActiveXObject){var io=document.createElement('<iframe id="'+frameId+'" name="'+frameId+'" />');if(typeof uri=='boolean'){io.src='javascript:false';}else if(typeof uri=='string'){io.src=uri;}}else{var io=document.createElement('iframe');io.id=frameId;io.name=frameId;}io.style.position='absolute';io.style.top='-1000px';io.style.left='-1000px';document.body.appendChild(io);return io;},createUploadForm:function(id,fileElementId){var formId='jUploadForm'+id;var fileId='jUploadFile'+id;var form=$('<form  action="" method="POST" name="'+formId+'" id="'+formId+'" enctype="multipart/form-data"></form>');var oldElement=$('#'+fileElementId);var newElement=$(oldElement).clone();$(oldElement).attr('id',fileId);$(oldElement).before(newElement);$(oldElement).appendTo(form);$(form).css('position','absolute');$(form).css('top','-1200px');$(form).css('left','-1200px');$(form).appendTo('body');return form;},ajaxFileUpload:function(s){s=$.extend({},$.ajaxSettings,s);var id=new Date().getTime();var form=$.createUploadForm(id,s.fileElementId);var io=$.createUploadIframe(id,s.secureuri);var frameId='jUploadFrame'+id;var formId='jUploadForm'+id;if(s.global&&!$.active++){$.event.trigger("ajaxStart");}var requestDone=false;var xml={};if(s.global)$.event.trigger("ajaxSend",[xml,s]);var uploadCallback=function(isTimeout){var io=document.getElementById(frameId);try{if(io.contentWindow){xml.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;xml.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;}else if(io.contentDocument){xml.responseText=io.contentDocument.document.body?io.contentDocument.document.body.innerHTML:null;xml.responseXML=io.contentDocument.document.XMLDocument?io.contentDocument.document.XMLDocument:io.contentDocument.document;}}catch(e){$.handleError(s,xml,null,e);}if(xml||isTimeout=="timeout"){requestDone=true;var status;try{status=isTimeout!="timeout"?"success":"error";if(status!="error"){var data=$.uploadHttpData(xml,s.dataType);if(s.success)s.success(data,status);if(s.global)$.event.trigger("ajaxSuccess",[xml,s]);}else $.handleError(s,xml,status);}catch(e){status="error";$.handleError(s,xml,status,e);}if(s.global)$.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--$.active)$.event.trigger("ajaxStop");if(s.complete)s.complete(xml,status);jQuery(io).unbind();setTimeout(function(){try{$(io).remove();$(form).remove();}catch(e){$.handleError(s,xml,null,e);}},100);xml=null;}};if(s.timeout>0){setTimeout(function(){if(!requestDone)uploadCallback("timeout");},s.timeout);}try{var form=$('#'+formId);$(form).attr('action',s.url);$(form).attr('method','POST');$(form).attr('target',frameId);if(form.encoding)form.encoding='multipart/form-data';else form.enctype='multipart/form-data';$(form).submit();}catch(e){$.handleError(s,xml,null,e);}if(window.attachEvent){document.getElementById(frameId).attachEvent('onload',uploadCallback);}else{document.getElementById(frameId).addEventListener('load',uploadCallback,false);}return{abort:function(){}};},uploadHttpData:function(r,type){var data=!type;data=type=="xml"||data?r.responseXML:r.responseText;if(type=="script")$.globalEval(data);if(type=="json")eval("data = "+data);if(type=="html")jQuery("<div>").html(data).evalScripts();return data;}});(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}var validator=$.data(this[0],'validator');if(validator){return validator;}validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true;});if(validator.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){validator.submitButton=this;});}this.submit(function(event){if(validator.settings.debug)event.preventDefault();function handle(){if(validator.settings.submitHandler){if(validator.submitButton){var hidden=$("<input type='hidden'/>").attr("name",validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);}validator.settings.submitHandler.call(validator,validator.currentForm);if(validator.submitButton){hidden.remove();}return false;}return true;}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}return handle();}else{validator.focusInvalid();return false;}});}return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid&=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages)settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(""+a.value);},filled:function(a){return!!$.trim(""+a.value);},unchecked:function(a){return!a.checked;}});$.validator=function(options,form){this.settings=$.extend({},$.validator.defaults,options);this.currentForm=form;this.init();};$.validator.format=function(source,params){if(arguments.length==1)return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};if(arguments.length>2&&params.constructor!=Array){params=$.makeArray(arguments).slice(1);}if(params.constructor!=Array){params=[params];}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)this.element(element);else if(element.parentNode.name in this.submitted)this.element(element.parentNode)},highlight:function(element,errorClass,validClass){$(element).addClass(errorClass).removeClass(validClass);},unhighlight:function(element,errorClass,validClass){$(element).removeClass(errorClass).addClass(validClass);}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator");validator.settings["on"+event.type]&&validator.settings["on"+event.type].call(validator,this[0]);}$(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",delegate).delegate("click",":radio, :checkbox, select, option",delegate);if(this.settings.invalidHandler)$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid())$(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if($.fn.resetForm)$(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass);},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj)count++;return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus();}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0];}var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue;}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id
+", check the '"+rule.method+"' method",e);throw e;}}if(dependencyMismatch)return;if(this.objectLength(rules))this.successList.push(element);return true;},customMetaMessage:function(element,method){if(!$.metadata)return;var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined)return arguments[i];}return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message=="function"){message=message.call(this,rule.parameters,element);}else if(theregex.test(message)){message=jQuery.format(message.replace(theregex,'{$1}'),rule.parameters);}this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);this.showLabel(error.element,error.message);}if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass);}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}if(!this.labelContainer.append(label).length)this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element);}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}this.toShow=this.toShow.add(label);},errorsFor:function(element){var name=this.idOrName(element);return this.errors().filter(function(){return $(this).attr('for')==name});},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return/radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element))return this.findByName(element.name).filter(':checked').length;}return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false;}else if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false;}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=$(element).attr('class');classes&&$.each(classes.split(' '),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}return rules;},metadataRules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}if(rules.messages){delete rules.messages}return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!=undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))return"dependency-mismatch";switch(element.nodeName.toLowerCase()){case'select':var val=$(element).val();return val&&val.length>0;case'input':if(this.checkable(element))return this.getLength(value,element)>0;default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element))return"dependency-mismatch";var previous=this.previousValue(element);if(!this.settings.messages[element.name])this.settings.messages[element.name]={};previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){validator.settings.messages[element.name].remote=previous.originalMessage;var valid=response===true;if(valid){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}else{var errors={};var message=(previous.message=response||validator.defaultMessage(element,"remote"));errors[element.name]=$.isFunction(message)?message(value):message;validator.showErrors(errors);}previous.valid=valid;validator.stopRequest(element,valid);}},param));return"pending";}else if(this.pending[element.name]){return"pending";}return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param;},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$|^-?\.\d+$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))return"dependency-mismatch";if(/[^0-9-]+/.test(value))return false;var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(var n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)nDigit-=9;}nCheck+=nDigit;bEven=!bEven;}return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param.replace(/,/g,'|'):"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){var target=$(param).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid();});return value==target.val();}}});$.format=$.validator.format;})(jQuery);;(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}return(pendingRequests[port]=ajax.apply(this,arguments));}return ajax.apply(this,arguments);};})(jQuery);;(function($){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie)return false;this.addEventListener(original,$.event.special[fix].handler,true);},teardown:function(){if($.browser.msie)return false;this.removeEventListener(original,$.event.special[fix].handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});},triggerEvent:function(type,target){return this.triggerHandler(type,[$.event.fix({type:type,target:target})]);}})})(jQuery);$.validator.addMethod("regex",function(value,element,regex){var expression=new RegExp(regex,'g');return(value.replace(expression,"").length==0);});$.validator.addMethod("phoneUS",function(phone_number,element){phone_number=phone_number.replace(/\s+/g,"");return this.optional(element)||phone_number.length>9&&phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);},"Please specify a valid phone number");$.validator.addMethod("emails",function(value,element){if(this.optional(element))return true;var valid=true;var emails=value.split(new RegExp("\\s*,\\s*","gi"));for(var i=0;i<emails.length;i++){var email=emails[i];valid=valid&&/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(email);}
return valid;},$.validator.messages.email);$.validator.addMethod("url_basic",function(value,element){return this.optional(element)||/^(http:\/\/|https:\/\/|ftp:\/\/|www\.)(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},"Please enter a valid url");var tb_pathToImage=DOMAIN+"core/images/loadingAnimation.gif";$(document).ready(function(){imgLoader=new Image();imgLoader.src=tb_pathToImage;});function tb_init(domChunk){$(domChunk).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;tb_show(t,a,g);this.blur();return false;});refreshIt(1);}
function tb_show(caption,url,imageGroup){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}
if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack");}else{$("#TB_overlay").addClass("TB_overlayBG");}
if(caption===null){caption="";}
$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$('#TB_load').show();var baseURL;if(url.indexOf("?")!==-1){baseURL=url.substr(0,url.indexOf("?"));}else{baseURL=url;}
var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var urlType=baseURL.toLowerCase().match(urlString);if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(imageGroup){TB_TempArray=$("a[rel="+imageGroup+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);if(!(TB_TempArray[TB_Counter].href==url)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length);}}}
imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var pagesize=tb_getPageSize();var x=pagesize[0]-150;var y=pagesize[1]-150;var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;}}
TB_WIDTH=imageWidth+30;TB_HEIGHT=imageHeight+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>"+"<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='"+DOMAIN+"core/images/close_text.gif' alt='[x]' /></a></div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function goPrev(){if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,imageGroup);return false;}
$("#TB_prev").click(goPrev);}
if(!(TB_NextHTML==="")){function goNext(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,imageGroup);return false;}
$("#TB_next").click(goNext);}
document.onkeydown=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){tb_remove();}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";goNext();}}else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev();}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"});};imgPreloader.src=url;}else{var queryString=url.replace(/^[^\?]+\??/,'');var params=tb_parseQuery(queryString);TB_WIDTH=(params['width']*1)+30||740;if(TB_WIDTH>1000)TB_WIDTH=1000;TB_HEIGHT=(params['height']*1)+40||500;if(TB_HEIGHT>700)TB_HEIGHT=700;TB_PAD=(params['nopad']==1?0:1);ajaxContentW=TB_WIDTH-(TB_PAD==1?30:0);ajaxContentH=TB_HEIGHT-(TB_PAD==1?45:0);if(url.indexOf('TB_iframe')!=-1){urlNoQuery=url.split('TB_');$("#TB_iframeContent").remove();if(params['modal']!="true"||params['modal_title']=="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='"+DOMAIN+"core/images/close.gif' alt='[x]' /></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>");}
else $("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>");if(params['modal']=="true")$("#TB_overlay").unbind();}else{if($("#TB_window").css("display")!="block"){if(params['modal']!="true"||params['modal_title']=="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><img src='"+DOMAIN+"core/images/close.gif' alt='[x]' /></a></div></div><div id='TB_ajaxContent'"+(TB_PAD==1?"":" class='TB_noPad'")+" style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");}
else $("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal"+(TB_PAD==1?"":" TB_noPad")+"' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");if(params['modal']=="true")$("#TB_overlay").unbind();}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(caption);}}
$("#TB_closeWindowButton").click(tb_remove);if(url.indexOf('TB_inline')!=-1){$("#TB_ajaxContent").append($('#'+params['inlineId']).children());$("#TB_window").unload(function(){$('#'+params['inlineId']).append($("#TB_ajaxContent").children());});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"});}else if(url.indexOf('TB_iframe')!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"});}}else{$("#TB_ajaxContent").load(url+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"});});}}
if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){tb_remove();}};}}catch(e){}}
function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"});}
function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","");}
document.onkeydown="";document.onkeyup="";return false;}
function tb_position(){$("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'});}}
function tb_parseQuery(query){var Params={};if(!query){return Params;}
var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2){continue;}
var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}
return Params;}
function tb_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize;}
function tb_detectMacXFF(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){return true;}};(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";var getData=function(data){if(typeof data!="string")return data;if(data.indexOf('{')<0){data=eval("("+data+")");}}
var getObject=function(data){if(typeof data!="string")return data;data=eval("("+data+")");return data;}
if(settings.type=="html5"){var object={};$(elem.attributes).each(function(){var name=this.nodeName;if(name.match(/^data-/))name=name.replace(/^data-/,'');else return true;object[name]=getObject(this.nodeValue);});}else{if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)
data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)return;var e=elem.getElementsByTagName(settings.name);if(e.length)
data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)
data=attr;}
object=getObject(data.indexOf("{")<0?"{"+data+"}":data);}
$.data(elem,settings.single,object);return object;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);(function($){$.fn.pngFix=function(settings){settings=$.extend({blankgif:DOMAIN+'core/images/blank.gif'},settings);var ie55=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 5.5")!=-1);var ie6=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1);if($.browser.msie&&(ie55||ie6)){jQuery(this).find("img[src$=.png]").each(function(){jQuery(this).attr('width',jQuery(this).width());jQuery(this).attr('height',jQuery(this).height());var prevStyle='';var strNewHTML='';var imgId=(jQuery(this).attr('id'))?'id="'+jQuery(this).attr('id')+'" ':'';var imgClass=(jQuery(this).attr('class'))?'class="'+jQuery(this).attr('class')+'" ':'';var imgTitle=(jQuery(this).attr('title'))?'title="'+jQuery(this).attr('title')+'" ':'';var imgAlt=(jQuery(this).attr('alt'))?'alt="'+jQuery(this).attr('alt')+'" ':'';var imgAlign=(jQuery(this).attr('align'))?'float:'+jQuery(this).attr('align')+';':'';var imgHand=(jQuery(this).parent().attr('href'))?'cursor:hand;':'';if(this.style.border){prevStyle+='border:'+this.style.border+';';this.style.border='';}if(this.style.padding){prevStyle+='padding:'+this.style.padding+';';this.style.padding='';}if(this.style.margin){prevStyle+='margin:'+this.style.margin+';';this.style.margin='';}var imgStyle=(this.style.cssText);strNewHTML+='<span '+imgId+imgClass+imgTitle+imgAlt;strNewHTML+='style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand;strNewHTML+='width:'+jQuery(this).width()+'px;'+'height:'+jQuery(this).height()+'px;';strNewHTML+='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader'+'(src=\''+jQuery(this).attr('src')+'\', sizingMethod=\'scale\');';strNewHTML+=imgStyle+'"></span>';if(prevStyle!=''){strNewHTML='<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:'+jQuery(this).width()+'px;'+'height:'+jQuery(this).height()+'px;'+'">'+strNewHTML+'</span>';}jQuery(this).hide();jQuery(this).after(strNewHTML);});jQuery(this).find("*").each(function(){var bgIMG=jQuery(this).css('background-image');if(bgIMG.indexOf(".png")!=-1){var iebg=bgIMG.split('url("')[1].split('")')[0];jQuery(this).css('background-image','none');jQuery(this).get(0).runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+iebg+"',sizingMethod='scale')";}});jQuery(this).find("input[src$=.png]").each(function(){var bgIMG=jQuery(this).attr('src');jQuery(this).get(0).runtimeStyle.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader'+'(src=\''+bgIMG+'\', sizingMethod=\'scale\');';jQuery(this).attr('src',settings.blankgif);});}return jQuery;};})(jQuery);(function(jQuery){jQuery.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":"\"",",":"<",".":">","/":"?","\\":"|"}};function keyHandler(handleObj){if(typeof handleObj.data!=="string"){return;}
var origHandler=handleObj.handler,keys=handleObj.data.toLowerCase().split(" ");handleObj.handler=function(event){if(this!==event.target&&(/textarea|select/i.test(event.target.nodeName)||event.target.type==="text")){return;}
var special=event.type!=="keypress"&&jQuery.hotkeys.specialKeys[event.which],character=String.fromCharCode(event.which).toLowerCase(),key,modif="",possible={};if(event.altKey&&special!=="alt"){modif+="alt+";}
if(event.ctrlKey&&special!=="ctrl"){modif+="ctrl+";}
if(event.metaKey&&!event.ctrlKey&&special!=="meta"){modif+="meta+";}
if(event.shiftKey&&special!=="shift"){modif+="shift+";}
if(special){possible[modif+special]=true;}else{possible[modif+character]=true;possible[modif+jQuery.hotkeys.shiftNums[character]]=true;if(modif==="shift+"){possible[jQuery.hotkeys.shiftNums[character]]=true;}}
for(var i=0,l=keys.length;i<l;i++){if(possible[keys[i]]){return origHandler.apply(this,arguments);}}};}
jQuery.each(["keydown","keyup","keypress"],function(){jQuery.event.special[this]={add:keyHandler};});})(jQuery);jQuery.ui||function(c){c.ui={version:"1.8.1",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")=="hidden")return false;b=b&&b=="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,f,g){return c.ui.isOverAxis(a,d,f)&&c.ui.isOverAxis(b,e,g)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==undefined)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b=="absolute"||b=="relative"||b=="fixed"){b=parseInt(a.css("zIndex"));if(!isNaN(b)&&b!=0)return b}a=a.parent()}}return 0}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b||"area"==b?a.href||!isNaN(d):!isNaN(d))&&!c(a)["area"==b?"parents":"closest"](":hidden").length},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}})}(jQuery);;(function(b){var j=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add(this).each(function(){b(this).triggerHandler("remove")});return j.call(b(this),a,c)})};b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend({},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substring(0,1)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==undefined){h=i;return false}}):this.each(function(){var g=b.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){this.element=b(c).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(c)[this.widgetName],a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof a==="string"){if(c===undefined)return this.options[a];d={};d[a]=c}b.each(d,function(f,h){e._setOption(f,h)});return e},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);;(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.browser.safari||a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=a.target==this._mouseDownEvent.target;this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-
a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);;(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-b.scrollSpeed;if(this.overflowOffset.left+
this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-b.scrollSpeed}else{if(a.pageY-d(document).scrollTop()<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()-b.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()+
b.scrollSpeed);if(a.pageX-d(document).scrollLeft()<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)}c!==false&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});return c.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+j<k&&b+l>g&&b+l<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?j:g<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);b=b&&a;a=this._getDragVerticalDirection();var c=this._getDragHorizontalDirection();if(!b)return false;return this.floating?c&&c=="right"||a=="down"?2:1:a&&(a=="down"?2:1)},_intersectsWithSides:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&a||e=="left"&&!a:c&&(c=="down"&&b||c=="up"&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var f=e.length-1;f>=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h<g;h++){i=d(e[h]);i.data("sortable-item",a);b.push({item:i,instance:a,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var b=this.items.length-1;b>=0;b--){var c=this.items[b],e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-
parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)<b){b=Math.abs(h-f);e=this.items[g]}}if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[c];e?this._rearrange(a,e,null,true):this._rearrange(a,null,this.containers[c].element,true);this._trigger("change",a,this._uiHash());this.containers[c]._trigger("change",a,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}}},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||d(b.appendTo!="parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(a[0].style.width==""||b.forceHelperSize)a.width(this.currentItem.width());if(a[0].style.height==""||b.forceHelperSize)a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0];a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-
this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);return{top:b.top+
this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var f=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])f=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-
this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+
(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&c.push(function(f){this._trigger("receive",f,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||c.push(function(f){this._trigger("remove",f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}return false}b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,{version:"1.8.1"})})(jQuery);(function($){var tmp,loading,overlay,wrap,outer,inner,close,nav_left,nav_right,selectedIndex=0,selectedOpts={},selectedArray=[],currentIndex=0,currentOpts={},currentArray=[],ajaxLoader=null,imgPreloader=new Image(),imgRegExp=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,swfRegExp=/[^\.]\.(swf)\s*$|\.swf\?/i,loadingTimer,loadingFrame=1,start_pos,final_pos,busy=false,shadow=20,fx=$.extend($('<div/>')[0],{prop:0}),titleh=0,isIE6=!$.support.opacity&&!window.XMLHttpRequest,fancybox_abort=function(){loading.hide();imgPreloader.onerror=imgPreloader.onload=null;if(ajaxLoader){ajaxLoader.abort();}
tmp.empty();},fancybox_error=function(){$.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{'scrolling':'no','padding':20,'transitionIn':'none','transitionOut':'none'});},fancybox_get_viewport=function(){return[$(window).width(),$(window).height(),$(document).scrollLeft(),$(document).scrollTop()];},fancybox_get_zoom_to=function(){var view=fancybox_get_viewport(),to={},margin=currentOpts.margin,resize=currentOpts.autoScale,horizontal_space=(shadow+margin)*2,vertical_space=(shadow+margin)*2,double_padding=(currentOpts.padding*2),ratio;if(currentOpts.width.toString().indexOf('%')>-1){to.width=((view[0]*parseFloat(currentOpts.width))/100)-(shadow*2);resize=false;}else{to.width=currentOpts.width+double_padding;}
if(currentOpts.height.toString().indexOf('%')>-1){to.height=((view[1]*parseFloat(currentOpts.height))/100)-(shadow*2);resize=false;}else{to.height=currentOpts.height+double_padding;}
if(resize&&(to.width>(view[0]-horizontal_space)||to.height>(view[1]-vertical_space))){if(selectedOpts.type=='image'||selectedOpts.type=='swf'){horizontal_space+=double_padding;vertical_space+=double_padding;ratio=Math.min(Math.min(view[0]-horizontal_space,currentOpts.width)/currentOpts.width,Math.min(view[1]-vertical_space,currentOpts.height)/currentOpts.height);to.width=Math.round(ratio*(to.width-double_padding))+double_padding;to.height=Math.round(ratio*(to.height-double_padding))+double_padding;}else{to.width=Math.min(to.width,(view[0]-horizontal_space));to.height=Math.min(to.height,(view[1]-vertical_space));}}
to.top=view[3]+((view[1]-(to.height+(shadow*2)))*0.5);to.left=view[2]+((view[0]-(to.width+(shadow*2)))*0.5);if(currentOpts.autoScale===false){to.top=Math.max(view[3]+margin,to.top);to.left=Math.max(view[2]+margin,to.left);}
return to;},fancybox_format_title=function(title){if(title&&title.length){switch(currentOpts.titlePosition){case'inside':return title;case'over':return'<span id="fancybox-title-over">'+title+'</span>';default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+title+'</span><span id="fancybox-title-right"></span></span>';}}
return false;},fancybox_process_title=function(){var title=currentOpts.title,width=final_pos.width-(currentOpts.padding*2),titlec='fancybox-title-'+currentOpts.titlePosition;$('#fancybox-title').remove();titleh=0;if(currentOpts.titleShow===false){return;}
title=$.isFunction(currentOpts.titleFormat)?currentOpts.titleFormat(title,currentArray,currentIndex,currentOpts):fancybox_format_title(title);if(!title||title===''){return;}
$('<div id="fancybox-title" class="'+titlec+'" />').css({'width':width,'paddingLeft':currentOpts.padding,'paddingRight':currentOpts.padding}).html(title).appendTo('body');switch(currentOpts.titlePosition){case'inside':titleh=$("#fancybox-title").outerHeight(true)-currentOpts.padding;final_pos.height+=titleh;break;case'over':$('#fancybox-title').css('bottom',currentOpts.padding);break;default:$('#fancybox-title').css('bottom',$("#fancybox-title").outerHeight(true)*-1);break;}
$('#fancybox-title').appendTo(outer).hide();},fancybox_set_navigation=function(){$(document).unbind('keydown.fb').bind('keydown.fb',function(e){if(e.keyCode==27&&currentOpts.enableEscapeButton){e.preventDefault();$.fancybox.close();}else if(e.keyCode==37){e.preventDefault();$.fancybox.prev();}else if(e.keyCode==39){e.preventDefault();$.fancybox.next();}});if($.fn.mousewheel){wrap.unbind('mousewheel.fb');if(currentArray.length>1){wrap.bind('mousewheel.fb',function(e,delta){e.preventDefault();if(busy||delta===0){return;}
if(delta>0){$.fancybox.prev();}else{$.fancybox.next();}});}}
if(!currentOpts.showNavArrows){return;}
if((currentOpts.cyclic&&currentArray.length>1)||currentIndex!==0){nav_left.show();}
if((currentOpts.cyclic&&currentArray.length>1)||currentIndex!=(currentArray.length-1)){nav_right.show();}},fancybox_preload_images=function(){var href,objNext;if((currentArray.length-1)>currentIndex){href=currentArray[currentIndex+1].href;if(typeof href!=='undefined'&&href.match(imgRegExp)){objNext=new Image();objNext.src=href;}}
if(currentIndex>0){href=currentArray[currentIndex-1].href;if(typeof href!=='undefined'&&href.match(imgRegExp)){objNext=new Image();objNext.src=href;}}},_finish=function(){inner.css('overflow',(currentOpts.scrolling=='auto'?(currentOpts.type=='image'||currentOpts.type=='iframe'||currentOpts.type=='swf'?'hidden':'auto'):(currentOpts.scrolling=='yes'?'auto':'visible')));if(!$.support.opacity){inner.get(0).style.removeAttribute('filter');wrap.get(0).style.removeAttribute('filter');}
$('#fancybox-title').show();if(currentOpts.hideOnContentClick){inner.one('click',$.fancybox.close);}
if(currentOpts.hideOnOverlayClick){overlay.one('click',$.fancybox.close);}
if(currentOpts.showCloseButton){close.show();}
fancybox_set_navigation();$(window).bind("resize.fb",$.fancybox.center);if(currentOpts.centerOnScroll){$(window).bind("scroll.fb",$.fancybox.center);}else{$(window).unbind("scroll.fb");}
if($.isFunction(currentOpts.onComplete)){currentOpts.onComplete(currentArray,currentIndex,currentOpts);}
busy=false;fancybox_preload_images();},fancybox_draw=function(pos){var width=Math.round(start_pos.width+(final_pos.width-start_pos.width)*pos),height=Math.round(start_pos.height+(final_pos.height-start_pos.height)*pos),top=Math.round(start_pos.top+(final_pos.top-start_pos.top)*pos),left=Math.round(start_pos.left+(final_pos.left-start_pos.left)*pos);wrap.css({'width':width+'px','height':height+'px','top':top+'px','left':left+'px'});width=Math.max(width-currentOpts.padding*2,0);height=Math.max(height-(currentOpts.padding*2+(titleh*pos)),0);inner.css({'width':width+'px','height':height+'px'});if(typeof final_pos.opacity!=='undefined'){wrap.css('opacity',(pos<0.5?0.5:pos));}},fancybox_get_obj_pos=function(obj){var pos=obj.offset();pos.top+=parseFloat(obj.css('paddingTop'))||0;pos.left+=parseFloat(obj.css('paddingLeft'))||0;pos.top+=parseFloat(obj.css('border-top-width'))||0;pos.left+=parseFloat(obj.css('border-left-width'))||0;pos.width=obj.width();pos.height=obj.height();return pos;},fancybox_get_zoom_from=function(){var orig=selectedOpts.orig?$(selectedOpts.orig):false,from={},pos,view;if(orig&&orig.length){pos=fancybox_get_obj_pos(orig);from={width:(pos.width+(currentOpts.padding*2)),height:(pos.height+(currentOpts.padding*2)),top:(pos.top-currentOpts.padding-shadow),left:(pos.left-currentOpts.padding-shadow)};}else{view=fancybox_get_viewport();from={width:1,height:1,top:view[3]+view[1]*0.5,left:view[2]+view[0]*0.5};}
return from;},fancybox_show=function(){loading.hide();if(wrap.is(":visible")&&$.isFunction(currentOpts.onCleanup)){if(currentOpts.onCleanup(currentArray,currentIndex,currentOpts)===false){$.event.trigger('fancybox-cancel');busy=false;return;}}
currentArray=selectedArray;currentIndex=selectedIndex;currentOpts=selectedOpts;inner.get(0).scrollTop=0;inner.get(0).scrollLeft=0;if(currentOpts.overlayShow){if(isIE6){$('select:not(#fancybox-tmp select)').filter(function(){return this.style.visibility!=='hidden';}).css({'visibility':'hidden'}).one('fancybox-cleanup',function(){this.style.visibility='inherit';});}
overlay.css({'background-color':currentOpts.overlayColor,'opacity':currentOpts.overlayOpacity}).unbind().show();}
final_pos=fancybox_get_zoom_to();fancybox_process_title();if(wrap.is(":visible")){$(close.add(nav_left).add(nav_right)).hide();var pos=wrap.position(),equal;start_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};equal=(start_pos.width==final_pos.width&&start_pos.height==final_pos.height);inner.fadeOut(currentOpts.changeFade,function(){var finish_resizing=function(){inner.html(tmp.contents()).fadeIn(currentOpts.changeFade,_finish);};$.event.trigger('fancybox-change');inner.empty().css('overflow','hidden');if(equal){inner.css({top:currentOpts.padding,left:currentOpts.padding,width:Math.max(final_pos.width-(currentOpts.padding*2),1),height:Math.max(final_pos.height-(currentOpts.padding*2)-titleh,1)});finish_resizing();}else{inner.css({top:currentOpts.padding,left:currentOpts.padding,width:Math.max(start_pos.width-(currentOpts.padding*2),1),height:Math.max(start_pos.height-(currentOpts.padding*2),1)});fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.changeSpeed,easing:currentOpts.easingChange,step:fancybox_draw,complete:finish_resizing});}});return;}
wrap.css('opacity',1);if(currentOpts.transitionIn=='elastic'){start_pos=fancybox_get_zoom_from();inner.css({top:currentOpts.padding,left:currentOpts.padding,width:Math.max(start_pos.width-(currentOpts.padding*2),1),height:Math.max(start_pos.height-(currentOpts.padding*2),1)}).html(tmp.contents());wrap.css(start_pos).show();if(currentOpts.opacity){final_pos.opacity=0;}
fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.speedIn,easing:currentOpts.easingIn,step:fancybox_draw,complete:_finish});}else{inner.css({top:currentOpts.padding,left:currentOpts.padding,width:Math.max(final_pos.width-(currentOpts.padding*2),1),height:Math.max(final_pos.height-(currentOpts.padding*2)-titleh,1)}).html(tmp.contents());wrap.css(final_pos).fadeIn(currentOpts.transitionIn=='none'?0:currentOpts.speedIn,_finish);}},fancybox_process_inline=function(){tmp.width(selectedOpts.width);tmp.height(selectedOpts.height);if(selectedOpts.width=='auto'){selectedOpts.width=tmp.width();}
if(selectedOpts.height=='auto'){selectedOpts.height=tmp.height();}
fancybox_show();},fancybox_process_image=function(){busy=true;selectedOpts.width=imgPreloader.width;selectedOpts.height=imgPreloader.height;$("<img />").attr({'id':'fancybox-img','src':imgPreloader.src,'alt':selectedOpts.title}).appendTo(tmp);fancybox_show();},fancybox_start=function(){fancybox_abort();var obj=selectedArray[selectedIndex],href,type,title,str,emb,selector,data;selectedOpts=$.extend({},$.fn.fancybox.defaults,(typeof $(obj).data('fancybox')=='undefined'?selectedOpts:$(obj).data('fancybox')));title=obj.title||$(obj).title||selectedOpts.title||'';if(obj.nodeName&&!selectedOpts.orig){selectedOpts.orig=$(obj).children("img:first").length?$(obj).children("img:first"):$(obj);}
if(title===''&&selectedOpts.orig){title=selectedOpts.orig.attr('alt');}
if(obj.nodeName&&(/^(?:javascript|#)/i).test(obj.href)){href=selectedOpts.href||null;}else{href=selectedOpts.href||obj.href||null;}
if(selectedOpts.type){type=selectedOpts.type;if(!href){href=selectedOpts.content;}}else if(selectedOpts.content){type='html';}else if(href){if(href.match(imgRegExp)){type='image';}else if(href.match(swfRegExp)){type='swf';}else if($(obj).hasClass("iframe")){type='iframe';}else if(href.match(/#/)){obj=href.substr(href.indexOf("#"));type=$(obj).length>0?'inline':'ajax';}else{type='ajax';}}else{type='inline';}
selectedOpts.type=type;selectedOpts.href=href;selectedOpts.title=title;if(selectedOpts.autoDimensions&&selectedOpts.type!=='iframe'&&selectedOpts.type!=='swf'){selectedOpts.width='auto';selectedOpts.height='auto';}
if(selectedOpts.modal){selectedOpts.overlayShow=true;selectedOpts.hideOnOverlayClick=false;selectedOpts.hideOnContentClick=false;selectedOpts.enableEscapeButton=false;selectedOpts.showCloseButton=false;}
if($.isFunction(selectedOpts.onStart)){if(selectedOpts.onStart(selectedArray,selectedIndex,selectedOpts)===false){busy=false;return;}}
tmp.css('padding',(shadow+selectedOpts.padding+selectedOpts.margin));$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change',function(){$(this).replaceWith(inner.children());});switch(type){case'html':tmp.html(selectedOpts.content);fancybox_process_inline();break;case'inline':$('<div class="fancybox-inline-tmp" />').hide().insertBefore($(obj)).bind('fancybox-cleanup',function(){$(this).replaceWith(inner.children());}).bind('fancybox-cancel',function(){$(this).replaceWith(tmp.children());});$(obj).appendTo(tmp);fancybox_process_inline();break;case'image':busy=false;$.fancybox.showActivity();imgPreloader=new Image();imgPreloader.onerror=function(){fancybox_error();};imgPreloader.onload=function(){imgPreloader.onerror=null;imgPreloader.onload=null;fancybox_process_image();};imgPreloader.src=href;break;case'swf':str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+selectedOpts.width+'" height="'+selectedOpts.height+'"><param name="movie" value="'+href+'"></param>';emb='';$.each(selectedOpts.swf,function(name,val){str+='<param name="'+name+'" value="'+val+'"></param>';emb+=' '+name+'="'+val+'"';});str+='<embed src="'+href+'" type="application/x-shockwave-flash" width="'+selectedOpts.width+'" height="'+selectedOpts.height+'"'+emb+'></embed></object>';tmp.html(str);fancybox_process_inline();break;case'ajax':selector=href.split('#',2);data=selectedOpts.ajax.data||{};if(selector.length>1){href=selector[0];if(typeof data=="string"){data+='&selector='+selector[1];}else{data.selector=selector[1];}}
busy=false;$.fancybox.showActivity();ajaxLoader=$.ajax($.extend(selectedOpts.ajax,{url:href,data:data,error:fancybox_error,success:function(data,textStatus,XMLHttpRequest){if(ajaxLoader.status==200){tmp.html(data);fancybox_process_inline();}}}));break;case'iframe':$('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'" frameborder="0" hspace="0" scrolling="'+selectedOpts.scrolling+'" src="'+selectedOpts.href+'"></iframe>').appendTo(tmp);fancybox_show();break;}},fancybox_animate_loading=function(){if(!loading.is(':visible')){clearInterval(loadingTimer);return;}
$('div',loading).css('top',(loadingFrame*-40)+'px');loadingFrame=(loadingFrame+1)%12;},fancybox_init=function(){if($("#fancybox-wrap").length){return;}
$('body').append(tmp=$('<div id="fancybox-tmp"></div>'),loading=$('<div id="fancybox-loading"><div></div></div>'),overlay=$('<div id="fancybox-overlay"></div>'),wrap=$('<div id="fancybox-wrap"></div>'));if(!$.support.opacity){wrap.addClass('fancybox-ie');loading.addClass('fancybox-ie');}
outer=$('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>').appendTo(wrap);outer.append(inner=$('<div id="fancybox-inner"></div>'),close=$('<a id="fancybox-close"></a>'),nav_left=$('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),nav_right=$('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));close.click($.fancybox.close);loading.click($.fancybox.cancel);nav_left.click(function(e){e.preventDefault();$.fancybox.prev();});nav_right.click(function(e){e.preventDefault();$.fancybox.next();});if(isIE6){overlay.get(0).style.setExpression('height',"document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");loading.get(0).style.setExpression('top',"(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");outer.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>');}};$.fn.fancybox=function(options){$(this).data('fancybox',$.extend({},options,($.metadata?$(this).metadata():{}))).unbind('click.fb').bind('click.fb',function(e){e.preventDefault();if(busy){return;}
busy=true;$(this).blur();selectedArray=[];selectedIndex=0;var rel=$(this).attr('rel')||'';if(!rel||rel==''||rel==='nofollow'){selectedArray.push(this);}else{selectedArray=$("a[rel="+rel+"], area[rel="+rel+"]");selectedIndex=selectedArray.index(this);}
fancybox_start();return false;});return this;};$.fancybox=function(obj){if(busy){return;}
busy=true;var opts=typeof arguments[1]!=='undefined'?arguments[1]:{};selectedArray=[];selectedIndex=opts.index||0;if($.isArray(obj)){for(var i=0,j=obj.length;i<j;i++){if(typeof obj[i]=='object'){$(obj[i]).data('fancybox',$.extend({},opts,obj[i]));}else{obj[i]=$({}).data('fancybox',$.extend({content:obj[i]},opts));}}
selectedArray=jQuery.merge(selectedArray,obj);}else{if(typeof obj=='object'){$(obj).data('fancybox',$.extend({},opts,obj));}else{obj=$({}).data('fancybox',$.extend({content:obj},opts));}
selectedArray.push(obj);}
if(selectedIndex>selectedArray.length||selectedIndex<0){selectedIndex=0;}
fancybox_start();};$.fancybox.showActivity=function(){clearInterval(loadingTimer);loading.show();loadingTimer=setInterval(fancybox_animate_loading,66);};$.fancybox.hideActivity=function(){loading.hide();};$.fancybox.next=function(){return $.fancybox.pos(currentIndex+1);};$.fancybox.prev=function(){return $.fancybox.pos(currentIndex-1);};$.fancybox.pos=function(pos){if(busy){return;}
pos=parseInt(pos,10);if(pos>-1&&currentArray.length>pos){selectedIndex=pos;fancybox_start();}
if(currentOpts.cyclic&&currentArray.length>1&&pos<0){selectedIndex=currentArray.length-1;fancybox_start();}
if(currentOpts.cyclic&&currentArray.length>1&&pos>=currentArray.length){selectedIndex=0;fancybox_start();}
return;};$.fancybox.cancel=function(){if(busy){return;}
busy=true;$.event.trigger('fancybox-cancel');fancybox_abort();if(selectedOpts&&$.isFunction(selectedOpts.onCancel)){selectedOpts.onCancel(selectedArray,selectedIndex,selectedOpts);}
busy=false;};$.fancybox.close=function(){if(busy||wrap.is(':hidden')){return;}
busy=true;if(currentOpts&&$.isFunction(currentOpts.onCleanup)){if(currentOpts.onCleanup(currentArray,currentIndex,currentOpts)===false){busy=false;return;}}
fancybox_abort();$(close.add(nav_left).add(nav_right)).hide();$('#fancybox-title').remove();wrap.add(inner).add(overlay).unbind();$(window).unbind("resize.fb scroll.fb");$(document).unbind('keydown.fb');function _cleanup(){overlay.fadeOut('fast');wrap.hide();$.event.trigger('fancybox-cleanup');inner.empty();if($.isFunction(currentOpts.onClosed)){currentOpts.onClosed(currentArray,currentIndex,currentOpts);}
currentArray=selectedOpts=[];currentIndex=selectedIndex=0;currentOpts=selectedOpts={};busy=false;}
inner.css('overflow','hidden');if(currentOpts.transitionOut=='elastic'){start_pos=fancybox_get_zoom_from();var pos=wrap.position();final_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};if(currentOpts.opacity){final_pos.opacity=1;}
fx.prop=1;$(fx).animate({prop:0},{duration:currentOpts.speedOut,easing:currentOpts.easingOut,step:fancybox_draw,complete:_cleanup});}else{wrap.fadeOut(currentOpts.transitionOut=='none'?0:currentOpts.speedOut,_cleanup);}};$.fancybox.resize=function(){var c,h;if(busy||wrap.is(':hidden')){return;}
busy=true;c=inner.wrapInner("<div style='overflow:auto'></div>").children();h=c.height();wrap.css({height:h+(currentOpts.padding*2)+titleh});inner.css({height:h});c.replaceWith(c.children());$.fancybox.center();};$.fancybox.center=function(){busy=true;var view=fancybox_get_viewport(),margin=currentOpts.margin,to={};to.top=view[3]+((view[1]-((wrap.height()-titleh)+(shadow*2)))*0.5);to.left=view[2]+((view[0]-(wrap.width()+(shadow*2)))*0.5);to.top=Math.max(view[3]+margin,to.top);to.left=Math.max(view[2]+margin,to.left);wrap.css(to);busy=false;};$.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:'auto',width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:'transparent'},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.3,overlayColor:'#666',titleShow:true,titlePosition:'outside',titleFormat:null,transitionIn:'fade',transitionOut:'fade',speedIn:300,speedOut:300,changeSpeed:300,changeFade:'fast',easingIn:'swing',easingOut:'swing',showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};$(document).ready(function(){fancybox_init();});})(jQuery);if(!this.JSON){this.JSON={};}
(function(){function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());(function($){var defaultHandlers=['swfupload_loaded_handler','file_queued_handler','file_queue_error_handler','file_dialog_start_handler','file_dialog_complete_handler','upload_start_handler','upload_progress_handler','upload_error_handler','upload_success_handler','upload_complete_handler','queue_complete_handler'];var additionalHandlers=[];$.fn.swfupload=function(){var args=$.makeArray(arguments);return this.each(function(){var swfu;if(args.length==1&&typeof(args[0])=='object'){swfu=$(this).data('__swfu');if(!swfu){var settings=args[0];var $magicUploadControl=$(this);var handlers=[];$.merge(handlers,defaultHandlers);$.merge(handlers,additionalHandlers);$.each(handlers,function(i,v){var eventName=v.replace(/_handler$/,'').replace(/_([a-z])/g,function(){return arguments[1].toUpperCase();});settings[v]=function(){var event=$.Event(eventName);$magicUploadControl.trigger(event,$.makeArray(arguments));return!event.isDefaultPrevented();};});$(this).data('__swfu',new SWFUpload(settings));}}else if(args.length>0&&typeof(args[0])=='string'){var methodName=args.shift();swfu=$(this).data('__swfu');if(swfu&&swfu[methodName]){swfu[methodName].apply(swfu,args);}}});};$.swfupload={additionalHandlers:function(){if(arguments.length===0){return additionalHandlers.slice();}else{$(arguments).each(function(i,v){$.merge(additionalHandlers,$.makeArray(v));});}},defaultHandlers:function(){return defaultHandlers.slice();},getInstance:function(el){return $(el).data('__swfu');}};})(jQuery);jQuery.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldY:0,build:function(options){this.each(function(){this.tableDnDConfig=jQuery.extend({onDragStyle:null,onDropStyle:null,onDragClass:"tDnD_whileDrag",onDrop:null,onDragStart:null,scrollAmount:5,serializeRegexp:/[^\-]*$/,serializeParamName:null,dragHandle:null},options||{});jQuery.tableDnD.makeDraggable(this);});jQuery(document).bind('mousemove',jQuery.tableDnD.mousemove).bind('mouseup',jQuery.tableDnD.mouseup);return this;},makeDraggable:function(table){var config=table.tableDnDConfig;if(table.tableDnDConfig.dragHandle){var cells=jQuery("."+table.tableDnDConfig.dragHandle,table);cells.each(function(){jQuery(this).mousedown(function(ev){jQuery.tableDnD.dragObject=jQuery.tableDnD.parentTr(this);jQuery.tableDnD.currentTable=table;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(this,ev);if(config.onDragStart){config.onDragStart(table,this);}
return false;});})}else{var rows=jQuery("tr",table);rows.each(function(){var row=jQuery(this);if(!row.hasClass("nodrag")){row.mousedown(function(ev){if(ev.target.tagName=="TD"){jQuery.tableDnD.dragObject=this;jQuery.tableDnD.currentTable=table;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(this,ev);if(config.onDragStart){config.onDragStart(table,this);}
return false;}}).css("cursor","move");}});}},parentTr:function(e){var parent=e.parentNode;if(parent.nodeName=="TR")return parent;else return jQuery.tableDnD.parentTr(parent);},updateTables:function(){this.each(function(){if(this.tableDnDConfig){jQuery.tableDnD.makeDraggable(this);}})},mouseCoords:function(ev){if(ev.pageX||ev.pageY){return{x:ev.pageX,y:ev.pageY};}
return{x:ev.clientX+document.body.scrollLeft-document.body.clientLeft,y:ev.clientY+document.body.scrollTop-document.body.clientTop};},getMouseOffset:function(target,ev){ev=ev||window.event;var docPos=this.getPosition(target);var mousePos=this.mouseCoords(ev);return{x:mousePos.x-docPos.x,y:mousePos.y-docPos.y};},getPosition:function(e){var left=0;var top=0;if(e.offsetHeight==0){e=e.firstChild;}
while(e.offsetParent){left+=e.offsetLeft;top+=e.offsetTop;e=e.offsetParent;}
left+=e.offsetLeft;top+=e.offsetTop;return{x:left,y:top};},mousemove:function(ev){if(jQuery.tableDnD.dragObject==null){return;}
var dragObj=jQuery(jQuery.tableDnD.dragObject);var config=jQuery.tableDnD.currentTable.tableDnDConfig;var mousePos=jQuery.tableDnD.mouseCoords(ev);var y=mousePos.y-jQuery.tableDnD.mouseOffset.y;var yOffset=window.pageYOffset;if(document.all){if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){yOffset=document.documentElement.scrollTop;}
else if(typeof document.body!='undefined'){yOffset=document.body.scrollTop;}}
if(mousePos.y-yOffset<config.scrollAmount){window.scrollBy(0,-config.scrollAmount);}else{var windowHeight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;if(windowHeight-(mousePos.y-yOffset)<config.scrollAmount){window.scrollBy(0,config.scrollAmount);}}
if(y!=jQuery.tableDnD.oldY){var movingDown=y>jQuery.tableDnD.oldY;jQuery.tableDnD.oldY=y;if(config.onDragClass){dragObj.addClass(config.onDragClass);}else{dragObj.css(config.onDragStyle);}
var currentRow=jQuery.tableDnD.findDropTargetRow(dragObj,y);if(currentRow){if(movingDown&&jQuery.tableDnD.dragObject!=currentRow){jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,currentRow.nextSibling);}else if(!movingDown&&jQuery.tableDnD.dragObject!=currentRow){jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,currentRow);}}}
return false;},findDropTargetRow:function(draggedRow,y){var rows=jQuery.tableDnD.currentTable.rows;for(var i=0;i<rows.length;i++){var row=rows[i];var rowY=this.getPosition(row).y;var rowHeight=parseInt(row.offsetHeight)/2;if(row.offsetHeight==0){rowY=this.getPosition(row.firstChild).y;rowHeight=parseInt(row.firstChild.offsetHeight)/2;}
if((y>rowY-rowHeight)&&(y<(rowY+rowHeight))){if(row==draggedRow){return null;}
var config=jQuery.tableDnD.currentTable.tableDnDConfig;if(config.onAllowDrop){if(config.onAllowDrop(draggedRow,row)){return row;}else{return null;}}else{var nodrop=jQuery(row).hasClass("nodrop");if(!nodrop){return row;}else{return null;}}
return row;}}
return null;},mouseup:function(e){if(jQuery.tableDnD.currentTable&&jQuery.tableDnD.dragObject){var droppedRow=jQuery.tableDnD.dragObject;var config=jQuery.tableDnD.currentTable.tableDnDConfig;if(config.onDragClass){jQuery(droppedRow).removeClass(config.onDragClass);}else{jQuery(droppedRow).css(config.onDropStyle);}
jQuery.tableDnD.dragObject=null;if(config.onDrop){config.onDrop(jQuery.tableDnD.currentTable,droppedRow);}
jQuery.tableDnD.currentTable=null;}},serialize:function(){if(jQuery.tableDnD.currentTable){return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable);}else{return"Error: No Table id set, you need to set an id on your table and every row";}},serializeTable:function(table){var result="";var tableId=table.id;var rows=table.rows;for(var i=0;i<rows.length;i++){if(result.length>0)result+="&";var rowId=rows[i].id;if(rowId&&rowId&&table.tableDnDConfig&&table.tableDnDConfig.serializeRegexp){rowId=rowId.match(table.tableDnDConfig.serializeRegexp)[0];}
result+=tableId+'[]='+rowId;}
return result;},serializeTables:function(){var result="";this.each(function(){result+=jQuery.tableDnD.serializeTable(this);});return result;}}
jQuery.fn.extend({tableDnD:jQuery.tableDnD.build,tableDnDUpdate:jQuery.tableDnD.updateTables,tableDnDSerialize:jQuery.tableDnD.serializeTables});(function(jQuery){jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);}
fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")";}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];return colors[jQuery.trim(color).toLowerCase()];}
function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body"))
break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};})(jQuery);$.fn.liveUpdate=function(parent,options){var defaults={children:'li',placeholder:'',nested:1}
if(typeof(parent)=='object'){options=parent;parent=options.parent;}
parent=$(parent);options=$.extend(defaults,options);if(parent.length){var rows=parent.children(options.children),cache=rows.map(function(){return this.innerHTML.toLowerCase();});this.keyup(filter).keyup().parents('form').submit(function(){return false;});}
return this;function filter(){var q=$(this).val();var term=$.trim(q.toLowerCase()),scores=[];if(!term||q==options.placeholder){rows.show();if(options.children=="option"&&options.nested!=1)$('optgroup',parent).show();}
else{if(options.children=="option"&&options.nested!=1)$('optgroup',parent).hide();rows.hide();cache.each(function(i){var score=this.score(term);if(score>0){scores.push([score,i]);}});$.each(scores.sort(function(a,b){return b[0]-a[0];}),function(){$(rows[this[1]]).show();});}}};String.prototype.score=function(abbreviation,offset){offset=offset||0;if(abbreviation.length==0)return 0.9;if(abbreviation.length>this.length)return 0.0;for(var i=abbreviation.length;i>0;i--){var sub_abbreviation=abbreviation.substring(0,i);var index=this.indexOf(sub_abbreviation);if(index<0)continue;if(index+abbreviation.length>this.length+offset)continue;var next_string=this.substring(index+sub_abbreviation.length);var next_abbreviation=null;if(i>=abbreviation.length)next_abbreviation='';else next_abbreviation=abbreviation.substring(i);var remaining_score=next_string.score(next_abbreviation,offset+index);if(remaining_score>0){var score=this.length-next_string.length;if(index!=0){var j=0;var c=this.charCodeAt(index-1);if(c==32||c==9){for(var j=(index-2);j>=0;j--){c=this.charCodeAt(j);score-=((c==32||c==9)?1:0.15);}}else score-=index;}score+=remaining_score*next_string.length;score/=this.length;return score;}}return 0.0;}
$.fn.watch=function(props,func,interval,id){if(!interval)
interval=200;if(!id)
id="_watcher";return this.each(function(){var _t=this;var el=$(this);var fnc=function(){__watcher.call(_t,id)};var itId=null;if(typeof(this.onpropertychange)=="object")
el.bind("propertychange."+id,fnc);else if($.browser.mozilla)
el.bind("DOMAttrModified."+id,fnc);else
itId=setInterval(fnc,interval);var data={id:itId,props:props.split(","),func:func,vals:[]};$.each(data.props,function(i){data.vals[i]=el.css(data.props[i]);});el.data(id,data);});function __watcher(id){var el=$(this);var w=el.data(id);var changed=false;var i=0;for(i;i<w.props.length;i++){var newVal=el.css(w.props[i]);if(w.vals[i]!=newVal){w.vals[i]=newVal;changed=true;break;}}
if(changed&&w.func){var _t=this;w.func.call(_t,w,i)}}}
$.fn.unwatch=function(id){this.each(function(){var w=$(this).data(id);var el=$(this);el.removeData();if(typeof(this.onpropertychange)=="object")
el.unbind("propertychange."+id,fnc);else if($.browser.mozilla)
el.unbind("DOMAttrModified."+id,fnc);else
clearInterval(w.id);});return this;}
var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(settings){this.initSWFUpload(settings);};}
SWFUpload.prototype.initSWFUpload=function(settings){try{this.customSettings={};this.settings=settings;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo();}catch(ex){delete SWFUpload.instances[this.movieName];throw ex;}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(url){if(typeof(url)!=="string"||url.match(/^https?:\/\//i)||url.match(/^\//)){return url;}
var currentURL=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var indexSlash=window.location.pathname.lastIndexOf("/");if(indexSlash<=0){path="/";}else{path=window.location.pathname.substr(0,indexSlash)+"/";}
return path+url;};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(settingName,defaultValue){this.settings[settingName]=(this.settings[settingName]==undefined)?defaultValue:this.settings[settingName];};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime();}
if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url);}
delete this.ensureDefault;};SWFUpload.prototype.loadFlash=function(){var targetElement,tempParent;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added";}
targetElement=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(targetElement==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id;}
tempParent=document.createElement("div");tempParent.innerHTML=this.getFlashHTML();targetElement.parentNode.replaceChild(tempParent.firstChild,targetElement);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement();}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />','</object>'].join("");};SWFUpload.prototype.getFlashVars=function(){var paramString=this.buildParamString();var httpSuccessString=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(httpSuccessString),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(paramString),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("");};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName);}
if(this.movieElement===null){throw"Could not find Flash element";}
return this.movieElement;};SWFUpload.prototype.buildParamString=function(){var postParams=this.settings.post_params;var paramStringPairs=[];if(typeof(postParams)==="object"){for(var name in postParams){if(postParams.hasOwnProperty(name)){paramStringPairs.push(encodeURIComponent(name.toString())+"="+encodeURIComponent(postParams[name].toString()));}}}
return paramStringPairs.join("&amp;");};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var movieElement=null;movieElement=this.getMovieElement();if(movieElement&&typeof(movieElement.CallFunction)==="unknown"){for(var i in movieElement){try{if(typeof(movieElement[i])==="function"){movieElement[i]=null;}}catch(ex1){}}
try{movieElement.parentNode.removeChild(movieElement);}catch(ex){}}
window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true;}catch(ex2){return false;}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_url,"\n","\t","use_query_string:         ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n","\t","http_success:             ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout:   ",this.settings.assume_success_timeout,"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.file_types,"\n","\t","file_types_description:   ",this.settings.file_types_description,"\n","\t","file_size_limit:          ",this.settings.file_size_limit,"\n","\t","file_upload_limit:        ",this.settings.file_upload_limit,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug:                    ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder:       ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_text:              ",this.settings.button_text.toString(),"\n","\t","button_text_style:        ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action:            ",this.settings.button_action.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""));};SWFUpload.prototype.addSetting=function(name,value,default_value){if(value==undefined){return(this.settings[name]=default_value);}else{return(this.settings[name]=value);}};SWFUpload.prototype.getSetting=function(name){if(this.settings[name]!=undefined){return this.settings[name];}
return"";};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+'</invoke>');returnValue=eval(returnString);}catch(ex){throw"Call to "+functionName+" failed";}
if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue);}
return returnValue;};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile");};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles");};SWFUpload.prototype.startUpload=function(fileID){this.callFlash("StartUpload",[fileID]);};SWFUpload.prototype.cancelUpload=function(fileID,triggerErrorEvent){if(triggerErrorEvent!==false){triggerErrorEvent=true;}
this.callFlash("CancelUpload",[fileID,triggerErrorEvent]);};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload");};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats");};SWFUpload.prototype.setStats=function(statsObject){this.callFlash("SetStats",[statsObject]);};SWFUpload.prototype.getFile=function(fileID){if(typeof(fileID)==="number"){return this.callFlash("GetFileByIndex",[fileID]);}else{return this.callFlash("GetFile",[fileID]);}};SWFUpload.prototype.addFileParam=function(fileID,name,value){return this.callFlash("AddFileParam",[fileID,name,value]);};SWFUpload.prototype.removeFileParam=function(fileID,name){this.callFlash("RemoveFileParam",[fileID,name]);};SWFUpload.prototype.setUploadURL=function(url){this.settings.upload_url=url.toString();this.callFlash("SetUploadURL",[url]);};SWFUpload.prototype.setPostParams=function(paramsObject){this.settings.post_params=paramsObject;this.callFlash("SetPostParams",[paramsObject]);};SWFUpload.prototype.addPostParam=function(name,value){this.settings.post_params[name]=value;this.callFlash("SetPostParams",[this.settings.post_params]);};SWFUpload.prototype.removePostParam=function(name){delete this.settings.post_params[name];this.callFlash("SetPostParams",[this.settings.post_params]);};SWFUpload.prototype.setFileTypes=function(types,description){this.settings.file_types=types;this.settings.file_types_description=description;this.callFlash("SetFileTypes",[types,description]);};SWFUpload.prototype.setFileSizeLimit=function(fileSizeLimit){this.settings.file_size_limit=fileSizeLimit;this.callFlash("SetFileSizeLimit",[fileSizeLimit]);};SWFUpload.prototype.setFileUploadLimit=function(fileUploadLimit){this.settings.file_upload_limit=fileUploadLimit;this.callFlash("SetFileUploadLimit",[fileUploadLimit]);};SWFUpload.prototype.setFileQueueLimit=function(fileQueueLimit){this.settings.file_queue_limit=fileQueueLimit;this.callFlash("SetFileQueueLimit",[fileQueueLimit]);};SWFUpload.prototype.setFilePostName=function(filePostName){this.settings.file_post_name=filePostName;this.callFlash("SetFilePostName",[filePostName]);};SWFUpload.prototype.setUseQueryString=function(useQueryString){this.settings.use_query_string=useQueryString;this.callFlash("SetUseQueryString",[useQueryString]);};SWFUpload.prototype.setRequeueOnError=function(requeueOnError){this.settings.requeue_on_error=requeueOnError;this.callFlash("SetRequeueOnError",[requeueOnError]);};SWFUpload.prototype.setHTTPSuccess=function(http_status_codes){if(typeof http_status_codes==="string"){http_status_codes=http_status_codes.replace(" ","").split(",");}
this.settings.http_success=http_status_codes;this.callFlash("SetHTTPSuccess",[http_status_codes]);};SWFUpload.prototype.setAssumeSuccessTimeout=function(timeout_seconds){this.settings.assume_success_timeout=timeout_seconds;this.callFlash("SetAssumeSuccessTimeout",[timeout_seconds]);};SWFUpload.prototype.setDebugEnabled=function(debugEnabled){this.settings.debug_enabled=debugEnabled;this.callFlash("SetDebugEnabled",[debugEnabled]);};SWFUpload.prototype.setButtonImageURL=function(buttonImageURL){if(buttonImageURL==undefined){buttonImageURL="";}
this.settings.button_image_url=buttonImageURL;this.callFlash("SetButtonImageURL",[buttonImageURL]);};SWFUpload.prototype.setButtonDimensions=function(width,height){this.settings.button_width=width;this.settings.button_height=height;var movie=this.getMovieElement();if(movie!=undefined){movie.style.width=width+"px";movie.style.height=height+"px";}
this.callFlash("SetButtonDimensions",[width,height]);};SWFUpload.prototype.setButtonText=function(html){this.settings.button_text=html;this.callFlash("SetButtonText",[html]);};SWFUpload.prototype.setButtonTextPadding=function(left,top){this.settings.button_text_top_padding=top;this.settings.button_text_left_padding=left;this.callFlash("SetButtonTextPadding",[left,top]);};SWFUpload.prototype.setButtonTextStyle=function(css){this.settings.button_text_style=css;this.callFlash("SetButtonTextStyle",[css]);};SWFUpload.prototype.setButtonDisabled=function(isDisabled){this.settings.button_disabled=isDisabled;this.callFlash("SetButtonDisabled",[isDisabled]);};SWFUpload.prototype.setButtonAction=function(buttonAction){this.settings.button_action=buttonAction;this.callFlash("SetButtonAction",[buttonAction]);};SWFUpload.prototype.setButtonCursor=function(cursor){this.settings.button_cursor=cursor;this.callFlash("SetButtonCursor",[cursor]);};SWFUpload.prototype.queueEvent=function(handlerName,argumentArray){if(argumentArray==undefined){argumentArray=[];}else if(!(argumentArray instanceof Array)){argumentArray=[argumentArray];}
var self=this;if(typeof this.settings[handlerName]==="function"){this.eventQueue.push(function(){this.settings[handlerName].apply(this,argumentArray);});setTimeout(function(){self.executeNextEvent();},0);}else if(this.settings[handlerName]!==null){throw"Event handler "+handlerName+" is unknown or is not a function";}};SWFUpload.prototype.executeNextEvent=function(){var f=this.eventQueue?this.eventQueue.shift():null;if(typeof(f)==="function"){f.apply(this);}};SWFUpload.prototype.unescapeFilePostParams=function(file){var reg=/[$]([0-9a-f]{4})/i;var unescapedPost={};var uk;if(file!=undefined){for(var k in file.post){if(file.post.hasOwnProperty(k)){uk=k;var match;while((match=reg.exec(uk))!==null){uk=uk.replace(match[0],String.fromCharCode(parseInt("0x"+match[1],16)));}
unescapedPost[uk]=file.post[k];}}
file.post=unescapedPost;}
return file;};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface");}catch(ex){return false;}};SWFUpload.prototype.flashReady=function(){var movieElement=this.getMovieElement();if(!movieElement){this.debug("Flash called back ready but the flash movie can't be found.");return;}
this.cleanUp(movieElement);this.queueEvent("swfupload_loaded_handler");};SWFUpload.prototype.cleanUp=function(movieElement){try{if(this.movieElement&&typeof(movieElement.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var key in movieElement){try{if(typeof(movieElement[key])==="function"){movieElement[key]=null;}}catch(ex){}}}}catch(ex1){}
window["__flash__removeCallback"]=function(instance,name){try{if(instance){instance[name]=null;}}catch(flashEx){}};};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler");};SWFUpload.prototype.fileQueued=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("file_queued_handler",file);};SWFUpload.prototype.fileQueueError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("file_queue_error_handler",[file,errorCode,message]);};SWFUpload.prototype.fileDialogComplete=function(numFilesSelected,numFilesQueued,numFilesInQueue){this.queueEvent("file_dialog_complete_handler",[numFilesSelected,numFilesQueued,numFilesInQueue]);};SWFUpload.prototype.uploadStart=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("return_upload_start_handler",file);};SWFUpload.prototype.returnUploadStart=function(file){var returnValue;if(typeof this.settings.upload_start_handler==="function"){file=this.unescapeFilePostParams(file);returnValue=this.settings.upload_start_handler.call(this,file);}else if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function";}
if(returnValue===undefined){returnValue=true;}
returnValue=!!returnValue;this.callFlash("ReturnUploadStart",[returnValue]);};SWFUpload.prototype.uploadProgress=function(file,bytesComplete,bytesTotal){file=this.unescapeFilePostParams(file);this.queueEvent("upload_progress_handler",[file,bytesComplete,bytesTotal]);};SWFUpload.prototype.uploadError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("upload_error_handler",[file,errorCode,message]);};SWFUpload.prototype.uploadSuccess=function(file,serverData,responseReceived){file=this.unescapeFilePostParams(file);this.queueEvent("upload_success_handler",[file,serverData,responseReceived]);};SWFUpload.prototype.uploadComplete=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("upload_complete_handler",file);};SWFUpload.prototype.debug=function(message){this.queueEvent("debug_handler",message);};SWFUpload.prototype.debugMessage=function(message){if(this.settings.debug){var exceptionMessage,exceptionValues=[];if(typeof message==="object"&&typeof message.name==="string"&&typeof message.message==="string"){for(var key in message){if(message.hasOwnProperty(key)){exceptionValues.push(key+": "+message[key]);}}
exceptionMessage=exceptionValues.join("\n")||"";exceptionValues=exceptionMessage.split("\n");exceptionMessage="EXCEPTION: "+exceptionValues.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(exceptionMessage);}else{SWFUpload.Console.writeLine(message);}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(message){var console,documentForm;try{console=document.getElementById("SWFUpload_Console");if(!console){documentForm=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(documentForm);console=document.createElement("textarea");console.id="SWFUpload_Console";console.style.fontFamily="monospace";console.setAttribute("wrap","off");console.wrap="off";console.style.overflow="auto";console.style.width="700px";console.style.height="350px";console.style.margin="5px";documentForm.appendChild(console);}
console.value+=message+"\n";console.scrollTop=console.scrollHeight-console.clientHeight;}catch(ex){alert("Exception: "+ex.name+" Message: "+ex.message);}};;(function($){if(!$.fn.jqDock){var jqDock=function(){return{version:1.2,defaults:{size:36,distance:54,coefficient:1.5,duration:500,align:'bottom',labels:false,source:false,loader:null},useJqLoader:$.browser.opera||$.browser.safari,shrinkInterval:100,docks:[],X:0,Y:0,verthorz:{v:{wh:'height',xy:'Y',tl:'top',lead:'Top',trail:'Bottom',act:'ActualInv'},h:{wh:'width',xy:'X',tl:'left',lead:'Left',trail:'Right',act:'Actual'}},elementCss:{position:'relative',borderWidth:0,borderStyle:'none',verticalAlign:'top'},vanillaDiv:'<div style="position:relative;margin:0px;padding:0px;border:0px none;background-color:transparent;">',initDock:function(id){var ME=this,Dock=this.docks[id],op=Dock.Opts,off=0,AI=$('a, img',Dock.Menu),i=0,j,el,wh,acc,upad,opPre95=($.browser.opera&&(1*($.browser.version.match(/^(\d+\.\d+)/)||[0,0])[1])<9.5);this.removeText(Dock.Menu);if(op.orient.vh=='h'){AI.css(this.elementCss);if(opPre95||!$.boxModel){AI.filter('a').css({lineHeight:0,fontSize:'0px'})}else{var hcss={display:'block'};hcss['float']='left';AI.filter('img').css(hcss)}}else{AI.not($('a img',Dock.Menu)).wrap(this.vanillaDiv+'</div>').end().css(this.elementCss).css({display:'block'})}while(i<Dock.Elem.length){el=Dock.Elem[i++];wh=this.keepProportion(el,op.size,{vh:op.orient.inv,inv:op.orient.vh});el.Actual=el.Final=el.Initial=wh[op.vh.wh];el.SizeDiff=el[op.vh.wh]-el.Initial;el.Img.css(wh);el.Img.removeAttr('title').attr({alt:''}).parent('a').removeAttr('title');el.ShrinkStep=Math.floor(el.SizeDiff*this.shrinkInterval/op.duration);Dock[op.vh.inv.wh]=Math.max(Dock[op.vh.inv.wh],op.size+el.Pad[op.vh.inv.lead]+el.Pad[op.vh.inv.trail]);el.Offset=off;el.Centre=el.Offset+el.Pad[op.vh.lead]+(el.Initial/2);off+=el.Initial+el.Pad[op.vh.lead]+el.Pad[op.vh.trail]}i=0;while(i<Dock.Elem.length){el=Dock.Elem[i++];acc=0;upad=el.Pad[op.vh.lead]+el.Pad[op.vh.trail];Dock.Spread+=el.Initial+upad;this.setSizes(id,el.Centre);j=Dock.Elem.length;while(j){acc+=Dock.Elem[--j].Final+upad}Dock[op.vh.wh]=Math.max(Dock[op.vh.wh],acc)}while(i){el=Dock.Elem[--i];el.Final=el.Initial}var wrap=[this.vanillaDiv,'<div class="jqDock" style="position:absolute;top:0px;left:0px;padding:0px;','margin:0px;overflow:visible;height:',Dock.height,'px;width:',Dock.width,'px;"></div></div>'].join('');Dock.Yard=$(Dock.Menu).wrapInner(wrap).find('div.jqDock');$.each([op.vh.lead,op.vh.trail],function(n,v){Dock.Borders[v]=ME.asNumber(Dock.Yard.css('border'+v+'Width'))});if(Dock.Borders[op.vh.lead]){Dock.Yard.css(op.vh.tl,Math.ceil(Dock.Borders[op.vh.lead]/2))}while(i<Dock.Elem.length){el=Dock.Elem[i];this.changeSize(id,i,el.Final,true);el.Img.addClass('jqDockMouse'+id+'_'+(i++))}$(Dock.Menu).show();if(Dock.Opts.labels){$.each(Dock.Elem,function(i){ME.setLabel(id,this.Label)});Dock.Label.hide()}Dock.Yard.bind('mouseover mouseout mousemove',function(e){ME.mouseHandler(e)})},altImage:function(){var alt=$(this).attr('alt');return(alt&&alt.match(/\.(gif|jpg|jpeg|png)$/i))?alt:false},removeText:function(el){var i=el.childNodes.length,j;while(i){j=el.childNodes[--i];if(j.childNodes&&j.childNodes.length){this.removeText(j)}else if(j.nodeType==3){el.removeChild(j)}}},asNumber:function(x){var r=parseInt(x,10);return isNaN(r)?0:r},keepProportion:function(el,dim,orient){var r={},vh=this.verthorz[orient.vh],inv=this.verthorz[orient.inv];r[vh.wh]=dim;r[inv.wh]=Math.round(dim*el[inv.wh]/el[vh.wh]);return r},deltaXY:function(id){var Dock=this.docks[id];if(Dock.Current!==false){var op=Dock.Opts,el=Dock.Elem[Dock.Current],p=el.Pad[op.vh.lead]+el.Pad[op.vh.trail],off=el.Img.offset();Dock.Delta=Math.floor((this[op.vh.xy]-off[op.vh.tl])*(p+el.Initial)/(p+el.Actual))+el.Offset;this.doLabel(id,off)}},setLabel:function(id,label){var Dock=this.docks[id],ME=this,pad={};if(!Dock.Label){Dock.Label=$('<div class="jqDockLabel jqDockMouse'+id+'_00 jqDockLabelImage" style="position:absolute;margin:0px;"></div>').hide().bind('click',function(){Dock.Elem[Dock.Current].Img.trigger('click')}).appendTo(Dock.Yard)}if(label.txt){Dock.Label.text(label.txt);$.each(['Top','Right','Bottom','Left'],function(n,v){pad[v]=ME.asNumber(Dock.Label.css('padding'+v))});$.each(this.verthorz,function(vh,o){label[o.wh]=Dock.Label[o.wh]();label[o.wh+'Pad']=pad[o.lead]+pad[o.trail]})}},doLabel:function(id,off){var Dock=this.docks[id];if(Dock.Opts.labels&&Dock.Current!==false){var el=Dock.Elem[Dock.Current],L=el.Label,op=Dock.Opts,what=typeof off=='string'?off:'move';switch(what){case'show':case'hide':Dock.Label[L.txt?what:'hide']();break;case'change':Dock.Label[0].className=Dock.Label[0].className.replace(/(jqDockLabel)(Link|Image)/,'$1'+(el.Linked?'Link':'Image'));Dock.Label.text(L.txt).css({width:L.width,height:L.height}).hide();break;default:var doff=Dock.Yard.offset(),css={top:off.top-doff.top,left:off.left-doff.left},splt=op.labels.split('');if(splt[0]=='m'){css.top+=Math.floor((el[op.vh.inv.act]-L.height-L.heightPad)/2)}else if(splt[0]=='b'){css.top+=el[op.vh.inv.act]+el.Pad.Top+el.Pad.Bottom-L.height-L.heightPad}if(splt[1]=='c'){css.left+=Math.floor((el[op.vh.act]-L.width-L.widthPad)/2)}else if(splt[1]=='r'){css.left+=el[op.vh.act]+el.Pad.Left+el.Pad.Right-L.width-L.widthPad}Dock.Label.css(css)}}},mouseHandler:function(e){var r=null,t=e.target.className.match(/jqDockMouse(\d+)_(\d+)/),rt=!!(e.relatedTarget)&&e.relatedTarget.tagName!==undefined;if(t){r=false;var id=1*t[1],Dock=this.docks[id],idx=t[2]=='00'?Dock.Current:1*t[2];this.X=e.pageX;this.Y=e.pageY;if(e.type=='mousemove'){if(idx==Dock.Current){this.deltaXY(id);if(Dock.OnDock&&Dock.Expanded){this.setSizes(id);this.factorSizes(id)}}}else{var rel=rt&&e.relatedTarget.className.match(/jqDockMouse(\d+)_(\d+)/);if(e.type=='mouseover'&&(!Dock.OnDock||idx!==Dock.Current)){Dock.Current=idx;this.doLabel(id,'change');this.deltaXY(id);if(Dock.Expanded){this.doLabel(id,'show')}if(rt&&(!rel||rel[1]!=id)){Dock.Timestamp=(new Date()).getTime();this.setSizes(id);Dock.OnDock=true;this.overDock(id)}}else if(rt&&e.type=='mouseout'){if(!rel||rel[1]!=id){Dock.OnDock=false;this.doLabel(id,'hide');var i=Dock.Elem.length;while((i--)){Dock.Elem[i].Final=Dock.Elem[i].Intial}this.offDock(id)}}}}return r},overDock:function(id){var Dock=this.docks[id];if(Dock.OnDock){var ME=this,el=Dock.Elem,i=el.length;while((i--)&&!(el[i].Actual<el[i].Final)){}if(i<0){Dock.Expanded=true;this.deltaXY(id);this.doLabel(id,'show')}else{this.setSizes(id);this.factorSizes(id);setTimeout(function(){ME.overDock(id)},60)}}},offDock:function(id){var Dock=this.docks[id];if(!Dock.OnDock){var ME=this,done=true,i=Dock.Elem.length,el,sz;while(i){el=Dock.Elem[--i];if(el.Actual>el.Initial){sz=el.Actual-el.ShrinkStep;if(sz>el.Initial){done=false}else{sz=el.Initial}this.changeSize(id,i,sz)}}this.deltaXY(id);if(done){while(i<Dock.Elem.length){el=Dock.Elem[i++];el.Actual=el.Final=el.Initial}Dock.Current=Dock.Expanded=false}else{setTimeout(function(){ME.offDock(id)},this.shrinkInterval)}}},setSizes:function(id,mxy){var Dock=this.docks[id],op=Dock.Opts,i=Dock.Elem.length,el,sz;mxy=mxy||Dock.Delta;while(i){el=Dock.Elem[--i];sz=Math.floor(el.SizeDiff*Math.pow(Math.abs(mxy-el.Centre),op.coefficient)/op.attenuation);el.Final=(sz<el.SizeDiff?el[op.vh.wh]-sz:el.Initial)}},factorSizes:function(id){var Dock=this.docks[id],op=Dock.Opts,lapse=op.duration+60;if(Dock.Timestamp){lapse=(new Date()).getTime()-Dock.Timestamp;if(lapse>=op.duration){Dock.Timestamp=0}}if(lapse>60){var f=lapse<op.duration?lapse/op.duration:0,i=0,el;while(i<Dock.Elem.length){el=Dock.Elem[i];this.changeSize(id,i++,(f?Math.floor(el.Initial+((el.Final-el.Initial)*f)):el.Final))}}},changeSize:function(id,idx,dim,force){var Dock=this.docks[id],el=Dock.Elem[idx];if(force||el.Actual!=dim){var op=Dock.Opts,bdr=($.boxModel||op.orient.vh=='v')?0:Dock.Borders[op.vh.lead]+Dock.Borders[op.vh.trail];if(el.Source[2]&&!force&&el.Actual==el.Initial){el.Img[0].src=el.Source[1]}if(Dock.OnDock){this.deltaXY(id)}Dock.Spread+=dim-el.Actual;var css=this.keepProportion(el,dim,op.orient),diff=op.size-css[op.vh.inv.wh],m='margin',z=op.vh.inv;switch(op.align){case'bottom':case'right':css[m+z.lead]=diff;break;case'middle':case'center':css[m+z.lead]=(diff+diff%2)/2;css[m+z.trail]=(diff-diff%2)/2;break;case'top':case'left':css[m+z.trail]=diff;break;default:}Dock.Yard[op.vh.wh](Dock.Spread+bdr);el.Img.css(css);Dock.Yard.css('margin'+op.vh.lead,Math.floor(Math.max(0,(Dock[op.vh.wh]-Dock.Spread)/2)));el.Actual=dim;el.ActualInv=css[op.vh.inv.wh];if(el.Source[2]&&!force&&el.Actual==el.Initial){el.Img[0].src=el.Source[0]}}}}}();$.fn.jqDock=function(opts){return this.filter(function(){var i=jqDock.docks.length;while((i--)&&this!=jqDock.docks[i].Menu){}return(i<0)&&($('img',this).length)}).hide().each(function(){var id=jqDock.docks.length;jqDock.docks[id]={Elem:[],Menu:this,OnDock:false,Expanded:false,Timestamp:0,width:0,height:0,Spread:0,Borders:{},Yard:false,Opts:$.extend({},jqDock.defaults,opts||{}),Current:false,Delta:0,Loaded:0,Label:false};var Dock=jqDock.docks[id],op=Dock.Opts;op.attenuation=Math.pow(op.distance,op.coefficient);op.orient=({left:1,center:1,right:1}[op.align])?{vh:'v',inv:'h'}:{vh:'h',inv:'v'};op.vh=$.extend({},jqDock.verthorz[op.orient.vh],{inv:jqDock.verthorz[op.orient.inv]});op.loader=(op.loader)&&typeof op.loader=='string'&&/^image|jquery$/i.test(op.loader)?op.loader.toLowerCase():'';op.labels=op.labels===true?{top:'bc',left:'tr',right:'tl'}[op.align]||'tc':(typeof op.labels=='string'&&{tl:1,tc:1,tr:1,ml:1,mc:1,mr:1,bl:1,bc:1,br:1}[op.labels]?op.labels:false);$('img',this).each(function(n){var me=$(this),s0=me.attr('src'),s1=(op.source?op.source.call(me[0],n):false)||jqDock.altImage.call(this)||s0,tx=op.labels?me.attr('title')||me.parent('a').attr('title')||'':'';Dock.Elem[n]={Img:me,Source:[s0,s1,!(s0==s1)],Label:{txt:tx,width:0,height:0,widthPad:0,heightPad:0},Initial:0,Actual:0,ActualInv:0,Final:0,Offset:0,Centre:0,Pad:{},Linked:!!me.parent('a').length,width:0,height:0};$.each(['Top','Right','Bottom','Left'],function(i,v){Dock.Elem[n].Pad[v]=jqDock.asNumber(me.css('padding'+v))})});var jqld=(!op.loader&&jqDock.useJqLoader)||op.loader=='jquery';$.each(Dock.Elem,function(i){var me=this,iLoaded=function(){me.height=this.height;me.width=this.width;if(++Dock.Loaded>=Dock.Elem.length){setTimeout(function(){jqDock.initDock(id)},0)}};if(jqld){$('<img />').bind('load',iLoaded).attr({src:this.Source[1]})}else{var pre=new Image();pre.onload=function(){iLoaded.call(this);pre.onload=function(){}};pre.src=this.Source[1]}})}).end()};$.jqDock=function(x){return jqDock[x]?jqDock[x]:null}}})(jQuery);$(document).ready(function(){$('.age-menu').each(function(i){var opts={align:'middle',size:20,distance:30,coefficient:1,labels:true,duration:500,source:false};$(this).jqDock(opts);});$('.age-menu img').show();});;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false;}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev();}else{onChange(0,true);}break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!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;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}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&&currentValue==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[""];}var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))result[i]=$.trim(value);});return result;}function lastWord(value){if(!options.multiple)return value;var words=trimWords(value);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));$.Autocompleter.Selection(input,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("");}});}if(wasVisible)$.Autocompleter.Selection(input,input.value.length,input.value.length);};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<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},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(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;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}setTimeout(populate,25);function flush(){data={};length=0;}return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){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=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").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<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)continue;var li=$("<li/>").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();}};};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}field.focus();};})(jQuery);;(function($){var today=new Date();var months='January,February,March,April,May,June,July,August,September,October,November,December'.split(',');var monthlengths='31,28,31,30,31,30,31,31,30,31,30,31'.split(',');var dateRegEx=/^\d{1,2}\/\d{1,2}\/\d{2}|\d{4}$/;var yearRegEx=/^\d{4,4}$/;$.fn.simpleDatepicker=function(options){var opts=$.extend({},$.fn.simpleDatepicker.defaults,options);setupYearRange();function setupYearRange(){var startyear,endyear;if(opts.startdate.constructor==Date){startyear=opts.startdate.getFullYear();}else if(opts.startdate){if(yearRegEx.test(opts.startdate)){startyear=opts.startdate;}else if(dateRegEx.test(opts.startdate)){opts.startdate=new Date(opts.startdate);startyear=opts.startdate.getFullYear();}else{startyear=today.getFullYear();}}else{startyear=today.getFullYear();}
opts.startyear=startyear;if(opts.enddate.constructor==Date){endyear=opts.enddate.getFullYear();}else if(opts.enddate){if(yearRegEx.test(opts.enddate)){endyear=opts.enddate;}else if(dateRegEx.test(opts.enddate)){opts.enddate=new Date(opts.enddate);endyear=opts.enddate.getFullYear();}else{endyear=today.getFullYear();}}else{endyear=today.getFullYear();}
opts.endyear=endyear;}
function newDatepickerHTML(){var years=[];for(var i=0;i<=opts.endyear-opts.startyear;i++)years[i]=opts.startyear+i;var table=$('<table class="datepicker" cellpadding="0" cellspacing="0"></table>');table.append('<thead></thead>');table.append('<tfoot></tfoot>');table.append('<tbody></tbody>');var monthselect='<select name="month">';for(var i=0;i<months.length;i++)monthselect+='<option value="'+i+'">'+months[i]+'</option>';monthselect+='</select>';var yearselect='<select name="year">';for(var i=0;i<years.length;i++)yearselect+='<option value="'+years[i]+'">'+years[i]+'</option>';yearselect+='</select>';$("thead",table).append('<tr class="controls"><th colspan="7"><span class="prevMonth">&laquo;</span>&nbsp;'+monthselect+yearselect+'&nbsp;<span class="nextMonth">&raquo;</span></th></tr>');$("thead",table).append('<tr class="days"><th>S</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th></tr>');$("tfoot",table).append('<tr><td colspan="2"><span class="today">today</span></td><td colspan="3">&nbsp;</td><td colspan="2"><span class="close">close</span></td></tr>');for(var i=0;i<6;i++)$("tbody",table).append('<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>');return table;}
function findPosition(obj){var curleft=curtop=0;var tb=false;$(obj).parents('#TB_window').each(function(){tb=true;});if(obj.offsetParent){do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}while(obj=obj.offsetParent);if(tb==true){curleft+=$(window).scrollLeft();curtop+=$(window).scrollTop();}
return[curleft,curtop];}else{return false;}}
function loadMonth(e,el,datepicker,chosendate){var mo=$("select[name=month]",datepicker).get(0).selectedIndex;var yr=$("select[name=year]",datepicker).get(0).selectedIndex;var yrs=$("select[name=year] option",datepicker).get().length;if(e&&$(e.target).hasClass('prevMonth')){if(0==mo&&yr){yr-=1;mo=11;$("select[name=month]",datepicker).get(0).selectedIndex=11;$("select[name=year]",datepicker).get(0).selectedIndex=yr;}else{mo-=1;$("select[name=month]",datepicker).get(0).selectedIndex=mo;}}else if(e&&$(e.target).hasClass('nextMonth')){if(11==mo&&yr+1<yrs){yr+=1;mo=0;$("select[name=month]",datepicker).get(0).selectedIndex=0;$("select[name=year]",datepicker).get(0).selectedIndex=yr;}else{mo+=1;$("select[name=month]",datepicker).get(0).selectedIndex=mo;}}
if(0==mo&&!yr)$("span.prevMonth",datepicker).hide();else $("span.prevMonth",datepicker).show();if(yr+1==yrs&&11==mo)$("span.nextMonth",datepicker).hide();else $("span.nextMonth",datepicker).show();var cells=$("tbody td",datepicker).unbind().empty().removeClass('date');var m=$("select[name=month]",datepicker).val();var y=$("select[name=year]",datepicker).val();var d=new Date(y,m,1);var startindex=d.getDay();var numdays=monthlengths[m];if(1==m&&((y%4==0&&y%100!=0)||y%400==0))numdays=29;if(opts.startdate.constructor==Date){var startMonth=opts.startdate.getMonth();var startDate=opts.startdate.getDate();}
if(opts.enddate.constructor==Date){var endMonth=opts.enddate.getMonth();var endDate=opts.enddate.getDate();}
for(var i=0;i<numdays;i++){var cell=$(cells.get(i+startindex)).removeClass('chosen');if((yr||((!startDate&&!startMonth)||((i+1>=startDate&&mo==startMonth)||mo>startMonth)))&&(yr+1<yrs||((!endDate&&!endMonth)||((i+1<=endDate&&mo==endMonth)||mo<endMonth)))){cell.text(i+1).addClass('date').hover(function(){$(this).addClass('over');},function(){$(this).removeClass('over');}).click(function(){var chosenDateObj=new Date($("select[name=year]",datepicker).val(),$("select[name=month]",datepicker).val(),$(this).text());closeIt(el,datepicker,chosenDateObj);});if(i+1==chosendate.getDate()&&m==chosendate.getMonth()&&y==chosendate.getFullYear())cell.addClass('chosen');}}}
function closeIt(el,datepicker,dateObj){if(dateObj&&dateObj.constructor==Date)
el.val($.fn.simpleDatepicker.formatOutput(dateObj));datepicker.remove();datepicker=null;$.data(el.get(0),"simpleDatepicker",{hasDatepicker:false});}
function createIt(t,b){$('table.datepicker').remove();$('input.calendar').each(function(e){$.data(this,"simpleDatepicker",{hasDatepicker:false});});var $this=$(t);if(false==$.data($this.get(0),"simpleDatepicker").hasDatepicker){$.data($this.get(0),"simpleDatepicker",{hasDatepicker:true});var initialDate=$this.val();if(initialDate&&dateRegEx.test(initialDate)){var chosendate=new Date(initialDate);}else if(opts.chosendate.constructor==Date){var chosendate=opts.chosendate;}else if(opts.chosendate){var chosendate=new Date(opts.chosendate);}else{var chosendate=today;}
datepicker=newDatepickerHTML();$("body").prepend(datepicker);if(b==1)var elPos=findPosition($this.nextAll('img.datepicker_button').get(0));else var elPos=findPosition($this.get(0));var x=(parseInt(opts.x)?parseInt(opts.x):0)+elPos[0];var y=(parseInt(opts.y)?parseInt(opts.y):0)+elPos[1];$(datepicker).css({position:'absolute',left:x,top:y});$("span",datepicker).css("cursor","pointer");$("select",datepicker).bind('change',function(){loadMonth(null,$this,datepicker,chosendate);});$("span.prevMonth",datepicker).click(function(e){loadMonth(e,$this,datepicker,chosendate);});$("span.nextMonth",datepicker).click(function(e){loadMonth(e,$this,datepicker,chosendate);});$("span.today",datepicker).click(function(){closeIt($this,datepicker,new Date());});$("span.close",datepicker).click(function(){closeIt($this,datepicker);});$("select[name=month]",datepicker).get(0).selectedIndex=chosendate.getMonth();$("select[name=year]",datepicker).get(0).selectedIndex=Math.max(0,chosendate.getFullYear()-opts.startyear);loadMonth(null,$this,datepicker,chosendate);}}
return this.each(function(){var id=$(this).attr('id');if(!id){id="datepicker_"+Math.floor(Math.random()*99999);$(this).attr('id',id);}
if($(this).is('input')&&('text'==$(this).attr('type')||'date'==$(this).attr('type'))){var datepicker;$.data($(this).get(0),"simpleDatepicker",{hasDatepicker:false});$(this).click(function(ev){createIt(this);});if(opts.button==true&&opts.button_url){var x=0;$(this).after("<img src='"+opts.button_url+"' alt='...' width='16' height='16' class='datepicker_button' />");$(this).nextAll("img.datepicker_button").each(function(){if(x==0)$(this).click(function(){createIt($('#'+id),1);});x++;});}}});};$.fn.simpleDatepicker.formatOutput=function(dateObj){return(dateObj.getMonth()+1)+"/"+dateObj.getDate()+"/"+dateObj.getFullYear();};$.fn.simpleDatepicker.defaults={chosendate:today,startdate:today.getFullYear(),enddate:today.getFullYear()+1,x:18,y:18,button:true,button_url:DOMAIN+"core/images/calendar.png"};})(jQuery);;(function(){var $$;$$=$.fn.flash=function(htmlOptions,pluginOptions,replace,update){var block=replace||$$.replace;pluginOptions=$$.copy($$.pluginOptions,pluginOptions);if(!$$.hasFlash(pluginOptions.version)){if(pluginOptions.expressInstall&&$$.hasFlash(6,0,65)){var expressInstallOptions={flashvars:{MMredirectURL:location,MMplayerType:'PlugIn',MMdoctitle:jQuery('title').text()}};}else if(pluginOptions.update){block=update||$$.update;}else{return this;}}
htmlOptions=$$.copy($$.htmlOptions,expressInstallOptions,htmlOptions);return this.each(function(){block.call(this,$$.copy(htmlOptions));});};$$.copy=function(){var options={},flashvars={};for(var i=0;i<arguments.length;i++){var arg=arguments[i];if(arg==undefined)continue;$.extend(options,arg);if(arg.flashvars==undefined)continue;$.extend(flashvars,arg.flashvars);}
options.flashvars=flashvars;return options;};$$.hasFlash=function(){if(/hasFlash\=true/.test(location))return true;if(/hasFlash\=false/.test(location))return false;var pv=$$.hasFlash.playerVersion().match(/\d+/g);var rv=String([arguments[0],arguments[1],arguments[2]]).match(/\d+/g)||String($$.pluginOptions.version).match(/\d+/g);for(var i=0;i<3;i++){pv[i]=parseInt(pv[i]||0);rv[i]=parseInt(rv[i]||0);if(pv[i]<rv[i])return false;if(pv[i]>rv[i])return true;}
return true;};$$.hasFlash.playerVersion=function(){try{try{var axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');try{axo.AllowScriptAccess='always';}
catch(e){return'6,0,0';}}catch(e){}
return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g,',').match(/^,?(.+),?$/)[1];}catch(e){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1];}}catch(e){}}
return'0,0,0';};$$.htmlOptions={height:240,flashvars:{},pluginspage:'http://www.adobe.com/go/getflashplayer',src:'#',type:'application/x-shockwave-flash',width:320};$$.pluginOptions={expressInstall:false,update:true,version:'6.0.65'};$$.replace=function(htmlOptions){this.innerHTML='<div class="alt">'+this.innerHTML+'</div>';jQuery(this).addClass('flash-replaced').prepend($$.transform(htmlOptions));};$$.update=function(htmlOptions){var url=String(location).split('?');url.splice(1,0,'?hasFlash=true&');url=url.join('');var msg='<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+url+'">Click here.</a></p>';this.innerHTML='<span class="alt">'+this.innerHTML+'</span>';jQuery(this).addClass('flash-update').prepend(msg);};function toAttributeString(){var s='';for(var key in this)
if(typeof this[key]!='function')
s+=key+'="'+this[key]+'" ';return s;};function toFlashvarsString(){var s='';for(var key in this)
if(typeof this[key]!='function')
s+=key+'='+encodeURIComponent(this[key])+'&';return s.replace(/&$/,'');};$$.transform=function(htmlOptions){htmlOptions.toString=toAttributeString;if(htmlOptions.flashvars)htmlOptions.flashvars.toString=toFlashvarsString;return'<embed '+String(htmlOptions)+'/>';};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};});}})();;if(window.jQuery)(function($){if($.browser.msie)try{document.execCommand("BackgroundImageCache",false,true)}catch(e){};$.fn.rating=function(options){if(this.length==0)return this;if(typeof arguments[0]=='string'){if(this.length>1){var args=arguments;return this.each(function(){$.fn.rating.apply($(this),args);});};$.fn.rating[arguments[0]].apply(this,$.makeArray(arguments).slice(1)||[]);return this;};var options=$.extend({},$.fn.rating.options,options||{});$.fn.rating.calls++;this.not('.star-rating-applied').addClass('star-rating-applied').each(function(){var control,input=$(this);var eid=(this.name||'unnamed-rating').replace(/\[|\]/g,'_').replace(/^\_+|\_+$/g,'');var context=$(this.form||document.body);var raters=context.data('rating');if(!raters||raters.call!=$.fn.rating.calls)raters={count:0,call:$.fn.rating.calls};var rater=raters[eid];if(rater)control=rater.data('rating');if(rater&&control)control.count++;else{control=$.extend({},options||{},($.metadata?input.metadata():($.meta?input.data():null))||{},{count:0,stars:[],inputs:[]});control.serial=raters.count++;rater=$('<span class="star-rating-control"/>');input.before(rater);rater.addClass('rating-to-be-drawn');if(input.attr('disabled'))control.readOnly=true;rater.append(control.cancel=$('<div class="rating-cancel"><a title="'+control.cancelText+'">'+control.cancelValue+'</a></div>').mouseover(function(){$(this).rating('drain');$(this).addClass('star-rating-hover');}).mouseout(function(){$(this).rating('draw');$(this).removeClass('star-rating-hover');}).click(function(){$(this).rating('select');}).data('rating',control));};var star=$('<div class="star-rating rater-'+control.serial+'"><a title="'+(this.title||this.value)+'">'+this.value+'</a></div>');rater.append(star);if(this.id)star.attr('id',this.id);if(this.className)star.addClass(this.className);if(control.half)control.split=2;if(typeof control.split=='number'&&control.split>0){var stw=($.fn.width?star.width():0)||control.starWidth;var spi=(control.count%control.split),spw=Math.floor(stw/control.split);star.width(spw).find('a').css({'margin-left':'-'+(spi*spw)+'px'})};if(control.readOnly)star.addClass('star-rating-readonly');else star.addClass('star-rating-live').mouseover(function(){$(this).rating('fill');$(this).rating('focus');}).mouseout(function(){$(this).rating('draw');$(this).rating('blur');}).click(function(){$(this).rating('select');});if(this.checked)control.current=star;input.hide();input.change(function(){$(this).rating('select');});star.data('rating.input',input.data('rating.star',star));control.stars[control.stars.length]=star[0];control.inputs[control.inputs.length]=input[0];control.rater=raters[eid]=rater;control.context=context;input.data('rating',control);rater.data('rating',control);star.data('rating',control);context.data('rating',raters);});$('.rating-to-be-drawn').rating('draw').removeClass('rating-to-be-drawn');return this;};$.extend($.fn.rating,{calls:0,focus:function(){var control=this.data('rating');if(!control)return this;if(!control.focus)return this;var input=$(this).data('rating.input')||$(this.tagName=='INPUT'?this:null);if(control.focus)control.focus.apply(input[0],[input.val(),$('a',input.data('rating.star'))[0]]);},blur:function(){var control=this.data('rating');if(!control)return this;if(!control.blur)return this;var input=$(this).data('rating.input')||$(this.tagName=='INPUT'?this:null);if(control.blur)control.blur.apply(input[0],[input.val(),$('a',input.data('rating.star'))[0]]);},fill:function(){var control=this.data('rating');if(!control)return this;if(control.readOnly)return;this.rating('drain');this.prevAll().andSelf().filter('.rater-'+control.serial).addClass('star-rating-hover');},drain:function(){var control=this.data('rating');if(!control)return this;if(control.readOnly)return;control.rater.children().filter('.rater-'+control.serial).removeClass('star-rating-on').removeClass('star-rating-hover');},draw:function(){var control=this.data('rating');if(!control)return this;this.rating('drain');if(control.current){control.current.data('rating.input').attr('checked','checked');control.current.prevAll().andSelf().filter('.rater-'+control.serial).addClass('star-rating-on');}else $(control.inputs).removeAttr('checked');control.cancel[control.readOnly||control.required||control.cancelButton==false?'hide':'show']();this.siblings()[control.readOnly?'addClass':'removeClass']('star-rating-readonly');},select:function(value){var control=this.data('rating');if(!control)return this;if(control.readOnly)return;control.current=null;if(typeof value!='undefined'){if(typeof value=='number')return $(control.stars[value]).rating('select');if(typeof value=='string')$.each(control.stars,function(){if($(this).data('rating.input').val()==value)$(this).rating('select');});}else control.current=this[0].tagName=='INPUT'?this.data('rating.star'):(this.is('.rater-'+control.serial)?this:null);this.data('rating',control);this.rating('draw');var input=$(control.current?control.current.data('rating.input'):null);if(control.callback)control.callback.apply(input[0],[input.val(),$('a',control.current)[0]]);},readOnly:function(toggle,disable){var control=this.data('rating');if(!control)return this;control.readOnly=toggle||toggle==undefined?true:false;if(disable)$(control.inputs).attr("disabled","disabled");else $(control.inputs).removeAttr("disabled");this.data('rating',control);this.rating('draw');},disable:function(){this.rating('readOnly',true,true);},enable:function(){this.rating('readOnly',false,false);}});$.fn.rating.options={cancelButton:false,cancelText:'Cancel Rating',cancelValue:'',split:0,starWidth:16};$(function(){$('input[type=radio].star').rating();});})(jQuery);
