(function(){var W=this,ab,F=W.jQuery,S=W.$,T=W.jQuery=W.$=function(b,a){return new T.fn.init(b,a)},M=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,ac=/^.[^:#\[\.,]*$/;T.fn=T.prototype={init:function(e,b){e=e||document;if(e.nodeType){this[0]=e;this.length=1;this.context=e;return this}if(typeof e==="string"){var c=M.exec(e);if(c&&(c[1]||!b)){if(c[1]){e=T.clean([c[1]],b)}else{var a=document.getElementById(c[3]);if(a&&a.id!=c[3]){return T().find(e)}var d=T(a||[]);d.context=document;d.selector=e;return d}}else{return T(b).find(e)}}else{if(T.isFunction(e)){return T(document).ready(e)}}if(e.selector&&e.context){this.selector=e.selector;this.context=e.context}return this.setArray(T.makeArray(e))},selector:"",jquery:"1.3.1",size:function(){return this.length},get:function(a){return a===ab?T.makeArray(this):this[a]},pushStack:function(c,a,d){var b=T(c);b.prevObject=this;b.context=this.context;if(a==="find"){b.selector=this.selector+(this.selector?" ":"")+d}else{if(a){b.selector=this.selector+"."+a+"("+d+")"}}return b},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this},each:function(a,b){return T.each(this,a,b)},index:function(a){return T.inArray(a&&a.jquery?a[0]:a,this)},attr:function(c,a,b){var d=c;if(typeof c==="string"){if(a===ab){return this[0]&&T[b||"attr"](this[0],c)}else{d={};d[c]=a}}return this.each(function(e){for(c in d){T.attr(b?this.style:this,c,T.prop(this,d[c],b,e,c))}})},css:function(b,a){if((b=="width"||b=="height")&&parseFloat(a)<0){a=ab}return this.attr(b,a,"curCSS")},text:function(a){if(typeof a!=="object"&&a!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(a))}var b="";T.each(a||this,function(){T.each(this.childNodes,function(){if(this.nodeType!=8){b+=this.nodeType!=1?this.nodeValue:T.fn.text([this])}})});return b},wrapAll:function(b){if(this[0]){var a=T(b,this[0].ownerDocument).clone();if(this[0].parentNode){a.insertBefore(this[0])}a.map(function(){var c=this;while(c.firstChild){c=c.firstChild}return c}).append(this)}return this},wrapInner:function(a){return this.each(function(){T(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){T(this).wrapAll(a)})},append:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.appendChild(a)}})},prepend:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.insertBefore(a,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||T([])},push:[].push,find:function(c){if(this.length===1&&!/,/.test(c)){var a=this.pushStack([],"find",c);a.length=0;T.find(c,this[0],a);return a}else{var b=T.map(this,function(d){return T.find(c,d)});return this.pushStack(/[^+>] [^+>]/.test(c)?T.unique(b):b,"find",c)}},clone:function(b){var c=this.map(function(){if(!T.support.noCloneEvent&&!T.isXMLDoc(this)){var d=this.cloneNode(true),e=document.createElement("div");e.appendChild(d);return T.clean([e.innerHTML])[0]}else{return this.cloneNode(true)}});var a=c.find("*").andSelf().each(function(){if(this[aa]!==ab){this[aa]=null}});if(b===true){this.find("*").andSelf().each(function(f){if(this.nodeType==3){return}var g=T.data(this,"events");for(var d in g){for(var e in g[d]){T.event.add(a[f],d,g[d][e],g[d][e].data)}}})}return c},filter:function(a){return this.pushStack(T.isFunction(a)&&T.grep(this,function(b,c){return a.call(b,c)})||T.multiFilter(a,T.grep(this,function(b){return b.nodeType===1})),"filter",a)},closest:function(b){var a=T.expr.match.POS.test(b)?T(b):null;return this.map(function(){var c=this;while(c&&c.ownerDocument){if(a?a.index(c)>-1:T(c).is(b)){return c}c=c.parentNode}})},not:function(b){if(typeof b==="string"){if(ac.test(b)){return this.pushStack(T.multiFilter(b,this,true),"not",b)}else{b=T.multiFilter(b,this)}}var a=b.length&&b[b.length-1]!==ab&&!b.nodeType;return this.filter(function(){return a?T.inArray(this,b)<0:this!=b})},add:function(a){return this.pushStack(T.unique(T.merge(this.get(),typeof a==="string"?T(a):T.makeArray(a))))},is:function(a){return !!a&&T.multiFilter(a,this).length>0},hasClass:function(a){return !!a&&this.is("."+a)},val:function(c){if(c===ab){var i=this[0];if(i){if(T.nodeName(i,"option")){return(i.attributes.value||{}).specified?i.value:i.text}if(T.nodeName(i,"select")){var e=i.selectedIndex,b=[],a=i.options,f=i.type=="select-one";if(e<0){return null}for(var h=f?e:0,d=f?e+1:a.length;h<d;h++){var g=a[h];if(g.selected){c=T(g).val();if(f){return c}b.push(c)}}return b}return(i.value||"").replace(/\r/g,"")}return ab}if(typeof c==="number"){c+=""}return this.each(function(){if(this.nodeType!=1){return}if(T.isArray(c)&&/radio|checkbox/.test(this.type)){this.checked=(T.inArray(this.value,c)>=0||T.inArray(this.name,c)>=0)}else{if(T.nodeName(this,"select")){var j=T.makeArray(c);T("option",this).each(function(){this.selected=(T.inArray(this.value,j)>=0||T.inArray(this.text,j)>=0)});if(!j.length){this.selectedIndex=-1}}else{this.value=c}}})},html:function(a){return a===ab?(this[0]?this[0].innerHTML:null):this.empty().append(a)},replaceWith:function(a){return this.after(a).remove()},eq:function(a){return this.slice(a,+a+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(a){return this.pushStack(T.map(this,function(b,c){return a.call(b,c,b)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(d,a,b){if(this[0]){var e=(this[0].ownerDocument||this[0]).createDocumentFragment(),h=T.clean(d,(this[0].ownerDocument||this[0]),e),f=e.firstChild,j=this.length>1?e.cloneNode(true):e;if(f){for(var g=0,i=this.length;g<i;g++){b.call(c(this[g],f),g>0?j.cloneNode(true):e)}}if(h){T.each(h,E)}}return this;function c(l,k){return a&&T.nodeName(l,"table")&&T.nodeName(k,"tr")?(l.getElementsByTagName("tbody")[0]||l.appendChild(l.ownerDocument.createElement("tbody"))):l}}};T.fn.init.prototype=T.fn;function E(b,a){if(a.src){T.ajax({url:a.src,async:false,dataType:"script"})}else{T.globalEval(a.text||a.textContent||a.innerHTML||"")}if(a.parentNode){a.parentNode.removeChild(a)}}function ad(){return +new Date}T.extend=T.fn.extend=function(){var c=arguments[0]||{},e=1,d=arguments.length,h=false,f;if(typeof c==="boolean"){h=c;c=arguments[1]||{};e=2}if(typeof c!=="object"&&!T.isFunction(c)){c={}}if(d==e){c=this;--e}for(;e<d;e++){if((f=arguments[e])!=null){for(var g in f){var b=c[g],a=f[g];if(c===a){continue}if(h&&a&&typeof a==="object"&&!a.nodeType){c[g]=T.extend(h,b||(a.length!=null?[]:{}),a)}else{if(a!==ab){c[g]=a}}}}}return c};var ag=/z-?index|font-?weight|opacity|zoom|line-?height/i,Q=document.defaultView||{},L=Object.prototype.toString;T.extend({noConflict:function(a){W.$=S;if(a){W.jQuery=F}return T},isFunction:function(a){return L.call(a)==="[object Function]"},isArray:function(a){return L.call(a)==="[object Array]"},isXMLDoc:function(a){return a.nodeType===9&&a.documentElement.nodeName!=="HTML"||!!a.ownerDocument&&T.isXMLDoc(a.ownerDocument)},globalEval:function(a){a=T.trim(a);if(a){var b=document.getElementsByTagName("head")[0]||document.documentElement,c=document.createElement("script");c.type="text/javascript";if(T.support.scriptEval){c.appendChild(document.createTextNode(a))}else{c.text=a}b.insertBefore(c,b.firstChild);b.removeChild(c)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()==b.toUpperCase()},each:function(e,a,f){var g,d=0,c=e.length;if(f){if(c===ab){for(g in e){if(a.apply(e[g],f)===false){break}}}else{for(;d<c;){if(a.apply(e[d++],f)===false){break}}}}else{if(c===ab){for(g in e){if(a.call(e[g],g,e[g])===false){break}}}else{for(var b=e[0];d<c&&a.call(b,d,b)!==false;b=e[++d]){}}}return e},prop:function(b,a,c,d,e){if(T.isFunction(a)){a=a.call(b,d)}return typeof a==="number"&&c=="curCSS"&&!ag.test(e)?a+"px":a},className:{add:function(b,a){T.each((a||"").split(/\s+/),function(d,c){if(b.nodeType==1&&!T.className.has(b.className,c)){b.className+=(b.className?" ":"")+c}})},remove:function(b,a){if(b.nodeType==1){b.className=a!==ab?T.grep(b.className.split(/\s+/),function(c){return !T.className.has(a,c)}).join(" "):""}},has:function(a,b){return a&&T.inArray(b,(a.className||a).toString().split(/\s+/))>-1}},swap:function(b,c,a){var e={};for(var d in c){e[d]=b.style[d];b.style[d]=c[d]}a.call(b);for(var d in c){b.style[d]=e[d]}},css:function(e,g,c){if(g=="width"||g=="height"){var a,f={position:"absolute",visibility:"hidden",display:"block"},b=g=="width"?["Left","Right"]:["Top","Bottom"];function d(){a=g=="width"?e.offsetWidth:e.offsetHeight;var i=0,h=0;T.each(b,function(){i+=parseFloat(T.curCSS(e,"padding"+this,true))||0;h+=parseFloat(T.curCSS(e,"border"+this+"Width",true))||0});a-=Math.round(i+h)}if(T(e).is(":visible")){d()}else{T.swap(e,f,d)}return Math.max(0,a)}return T.curCSS(e,g,c)},curCSS:function(e,h,g){var b,i=e.style;if(h=="opacity"&&!T.support.opacity){b=T.attr(i,"opacity");return b==""?"1":b}if(h.match(/float/i)){h=H}if(!g&&i&&i[h]){b=i[h]}else{if(Q.getComputedStyle){if(h.match(/float/i)){h="float"}h=h.replace(/([A-Z])/g,"-$1").toLowerCase();var a=Q.getComputedStyle(e,null);if(a){b=a.getPropertyValue(h)}if(h=="opacity"&&b==""){b="1"}}else{if(e.currentStyle){var d=h.replace(/\-(\w)/g,function(k,j){return j.toUpperCase()});b=e.currentStyle[h]||e.currentStyle[d];if(!/^\d+(px)?$/i.test(b)&&/^\d/.test(b)){var f=i.left,c=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left;i.left=b||0;b=i.pixelLeft+"px";i.left=f;e.runtimeStyle.left=c}}}}return b},clean:function(g,b,d){b=b||document;if(typeof b.createElement==="undefined"){b=b.ownerDocument||b[0]&&b[0].ownerDocument||document}if(!d&&g.length===1&&typeof g[0]==="string"){var e=/^<(\w+)\s*\/?>$/.exec(g[0]);if(e){return[b.createElement(e[1])]}}var f=[],h=[],a=b.createElement("div");T.each(g,function(k,i){if(typeof i==="number"){i+=""}if(!i){return}if(typeof i==="string"){i=i.replace(/(<(\w+)[^>]*?)\/>/g,function(p,o,q){return q.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?p:o+"></"+q+">"});var l=T.trim(i).toLowerCase();var j=!l.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!l.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||l.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!l.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!l.indexOf("<td")||!l.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!l.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!T.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];a.innerHTML=j[1]+i+j[2];while(j[0]--){a=a.lastChild}if(!T.support.tbody){var m=!l.indexOf("<table")&&l.indexOf("<tbody")<0?a.firstChild&&a.firstChild.childNodes:j[1]=="<table>"&&l.indexOf("<tbody")<0?a.childNodes:[];for(var n=m.length-1;n>=0;--n){if(T.nodeName(m[n],"tbody")&&!m[n].childNodes.length){m[n].parentNode.removeChild(m[n])}}}if(!T.support.leadingWhitespace&&/^\s/.test(i)){a.insertBefore(b.createTextNode(i.match(/^\s*/)[0]),a.firstChild)}i=T.makeArray(a.childNodes)}if(i.nodeType){f.push(i)}else{f=T.merge(f,i)}});if(d){for(var c=0;f[c];c++){if(T.nodeName(f[c],"script")&&(!f[c].type||f[c].type.toLowerCase()==="text/javascript")){h.push(f[c].parentNode?f[c].parentNode.removeChild(f[c]):f[c])}else{if(f[c].nodeType===1){f.splice.apply(f,[c+1,0].concat(T.makeArray(f[c].getElementsByTagName("script"))))}d.appendChild(f[c])}}return h}return f},attr:function(c,f,b){if(!c||c.nodeType==3||c.nodeType==8){return ab}var e=!T.isXMLDoc(c),a=b!==ab;f=e&&T.props[f]||f;if(c.tagName){var g=/href|src|style/.test(f);if(f=="selected"&&c.parentNode){c.parentNode.selectedIndex}if(f in c&&e&&!g){if(a){if(f=="type"&&T.nodeName(c,"input")&&c.parentNode){throw"type property can't be changed"}c[f]=b}if(T.nodeName(c,"form")&&c.getAttributeNode(f)){return c.getAttributeNode(f).nodeValue}if(f=="tabIndex"){var d=c.getAttributeNode("tabIndex");return d&&d.specified?d.value:c.nodeName.match(/(button|input|object|select|textarea)/i)?0:c.nodeName.match(/^(a|area)$/i)&&c.href?0:ab}return c[f]}if(!T.support.style&&e&&f=="style"){return T.attr(c.style,"cssText",b)}if(a){c.setAttribute(f,""+b)}var h=!T.support.hrefNormalized&&e&&g?c.getAttribute(f,2):c.getAttribute(f);return h===null?ab:h}if(!T.support.opacity&&f=="opacity"){if(a){c.zoom=1;c.filter=(c.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(b)+""=="NaN"?"":"alpha(opacity="+b*100+")")}return c.filter&&c.filter.indexOf("opacity=")>=0?(parseFloat(c.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}f=f.replace(/-([a-z])/ig,function(j,i){return i.toUpperCase()});if(a){c[f]=b}return c[f]},trim:function(a){return(a||"").replace(/^\s+|\s+$/g,"")},makeArray:function(a){var c=[];if(a!=null){var b=a.length;if(b==null||typeof a==="string"||T.isFunction(a)||a.setInterval){c[0]=a}else{while(b){c[--b]=a[b]}}}return c},inArray:function(b,a){for(var d=0,c=a.length;d<c;d++){if(a[d]===b){return d}}return -1},merge:function(b,e){var d=0,c,a=b.length;if(!T.support.getAll){while((c=e[d++])!=null){if(c.nodeType!=8){b[a++]=c}}}else{while((c=e[d++])!=null){b[a++]=c}}return b},unique:function(a){var f=[],g={};try{for(var e=0,d=a.length;e<d;e++){var b=T.data(a[e]);if(!g[b]){g[b]=true;f.push(a[e])}}}catch(c){f=a}return f},grep:function(e,a,f){var d=[];for(var c=0,b=e.length;c<b;c++){if(!f!=!a(e[c],c)){d.push(e[c])}}return d},map:function(f,a){var e=[];for(var d=0,c=f.length;d<c;d++){var b=a(f[d],d);if(b!=null){e[e.length]=b}}return e.concat.apply([],e)}});var O=navigator.userAgent.toLowerCase();T.browser={version:(O.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(O),opera:/opera/.test(O),msie:/msie/.test(O)&&!/opera/.test(O),mozilla:/mozilla/.test(O)&&!/(compatible|webkit)/.test(O)};T.each({parent:function(a){return a.parentNode},parents:function(a){return T.dir(a,"parentNode")},next:function(a){return T.nth(a,2,"nextSibling")},prev:function(a){return T.nth(a,2,"previousSibling")},nextAll:function(a){return T.dir(a,"nextSibling")},prevAll:function(a){return T.dir(a,"previousSibling")},siblings:function(a){return T.sibling(a.parentNode.firstChild,a)},children:function(a){return T.sibling(a.firstChild)},contents:function(a){return T.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:T.makeArray(a.childNodes)}},function(b,a){T.fn[b]=function(d){var c=T.map(this,a);if(d&&typeof d=="string"){c=T.multiFilter(d,c)}return this.pushStack(T.unique(c),b,d)}});T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(b,a){T.fn[b]=function(){var c=arguments;return this.each(function(){for(var e=0,d=c.length;e<d;e++){T(c[e])[a](this)}})}});T.each({removeAttr:function(a){T.attr(this,a,"");if(this.nodeType==1){this.removeAttribute(a)}},addClass:function(a){T.className.add(this,a)},removeClass:function(a){T.className.remove(this,a)},toggleClass:function(a,b){if(typeof b!=="boolean"){b=!T.className.has(this,a)}T.className[b?"add":"remove"](this,a)},remove:function(a){if(!a||T.filter(a,[this]).length){T("*",this).add([this]).each(function(){T.event.remove(this);T.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){T(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(b,a){T.fn[b]=function(){return this.each(a,arguments)}});function Y(b,a){return b[0]&&parseInt(T.curCSS(b[0],a,true),10)||0}var aa="jQuery"+ad(),I=0,R={};T.extend({cache:{},data:function(c,d,b){c=c==W?R:c;var a=c[aa];if(!a){a=c[aa]=++I}if(d&&!T.cache[a]){T.cache[a]={}}if(b!==ab){T.cache[a][d]=b}return d?T.cache[a][d]:a},removeData:function(c,d){c=c==W?R:c;var a=c[aa];if(d){if(T.cache[a]){delete T.cache[a][d];d="";for(d in T.cache[a]){break}if(!d){T.removeData(c)}}}else{try{delete c[aa]}catch(b){if(c.removeAttribute){c.removeAttribute(aa)}}delete T.cache[a]}},queue:function(c,d,a){if(c){d=(d||"fx")+"queue";var b=T.data(c,d);if(!b||T.isArray(a)){b=T.data(c,d,T.makeArray(a))}else{if(a){b.push(a)}}}return b},dequeue:function(a,b){var d=T.queue(a,b),c=d.shift();if(!b||b==="fx"){c=d[0]}if(c!==ab){c.call(a)}}});T.fn.extend({data:function(d,b){var a=d.split(".");a[1]=a[1]?"."+a[1]:"";if(b===ab){var c=this.triggerHandler("getData"+a[1]+"!",[a[0]]);if(c===ab&&this.length){c=T.data(this[0],d)}return c===ab&&a[1]?this.data(a[0]):c}else{return this.trigger("setData"+a[1]+"!",[a[0],b]).each(function(){T.data(this,d,b)})}},removeData:function(a){return this.each(function(){T.removeData(this,a)})},queue:function(b,a){if(typeof b!=="string"){a=b;b="fx"}if(a===ab){return T.queue(this[0],b)}return this.each(function(){var c=T.queue(this,b,a);if(b=="fx"&&c.length==1){c[0].call(this)}})},dequeue:function(a){return this.each(function(){T.dequeue(this,a)})}});(function(){var b=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]+['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,h=0,l=Object.prototype.toString;var m=function(r,v,o,D){o=o||[];v=v||document;if(v.nodeType!==1&&v.nodeType!==9){return[]}if(!r||typeof r!=="string"){return o}var q=[],t,A,x,w,C,u,s=true;b.lastIndex=0;while((t=b.exec(r))!==null){q.push(t[1]);if(t[2]){u=RegExp.rightContext;break}}if(q.length>1&&g.exec(r)){if(q.length===2&&k.relative[q[0]]){A=j(q[0]+q[1],v)}else{A=k.relative[q[0]]?[v]:m(q.shift(),v);while(q.length){r=q.shift();if(k.relative[r]){r+=q.shift()}A=j(r,A)}}}else{var B=D?{expr:q.pop(),set:n(D)}:m.find(q.pop(),q.length===1&&v.parentNode?v.parentNode:v,c(v));A=m.filter(B.expr,B.set);if(q.length>0){x=n(A)}else{s=false}while(q.length){var y=q.pop(),z=y;if(!k.relative[y]){y=""}else{z=q.pop()}if(z==null){z=v}k.relative[y](x,z,c(v))}}if(!x){x=A}if(!x){throw"Syntax error, unrecognized expression: "+(y||r)}if(l.call(x)==="[object Array]"){if(!s){o.push.apply(o,x)}else{if(v.nodeType===1){for(var p=0;x[p]!=null;p++){if(x[p]&&(x[p]===true||x[p].nodeType===1&&i(v,x[p]))){o.push(A[p])}}}else{for(var p=0;x[p]!=null;p++){if(x[p]&&x[p].nodeType===1){o.push(A[p])}}}}}else{n(x,o)}if(u){m(u,v,o,D)}return o};m.matches=function(p,o){return m(p,null,null,o)};m.find=function(p,w,o){var q,s;if(!p){return[]}for(var t=0,u=k.order.length;t<u;t++){var r=k.order[t],s;if((s=k.match[r].exec(p))){var v=RegExp.leftContext;if(v.substr(v.length-1)!=="\\"){s[1]=(s[1]||"").replace(/\\/g,"");q=k.find[r](s,w,o);if(q!=null){p=p.replace(k.match[r],"");break}}}}if(!q){q=w.getElementsByTagName("*")}return{set:q,expr:p}};m.filter=function(C,o,z,t){var u=C,x=[],q=o,r,w;while(C&&o.length){for(var p in k.filter){if((r=k.match[p].exec(C))!=null){var v=k.filter[p],y,A;w=false;if(q==x){x=[]}if(k.preFilter[p]){r=k.preFilter[p](r,q,z,x,t);if(!r){w=y=true}else{if(r===true){continue}}}if(r){for(var s=0;(A=q[s])!=null;s++){if(A){y=v(A,r,s,q);var B=t^!!y;if(z&&y!=null){if(B){w=true}else{q[s]=false}}else{if(B){x.push(A);w=true}}}}}if(y!==ab){if(!z){q=x}C=C.replace(k.match[p],"");if(!w){return[]}break}}}C=C.replace(/\s*,\s*/,"");if(C==u){if(w==null){throw"Syntax error, unrecognized expression: "+C}else{break}}u=C}return q};var k=m.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\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(o){return o.getAttribute("href")}},relative:{"+":function(o,r){for(var q=0,s=o.length;q<s;q++){var p=o[q];if(p){var t=p.previousSibling;while(t&&t.nodeType!==1){t=t.previousSibling}o[q]=typeof r==="string"?t||false:t===r}}if(typeof r==="string"){m.filter(r,o,true)}},">":function(u,r,t){if(typeof r==="string"&&!/\W/.test(r)){r=t?r:r.toUpperCase();for(var q=0,s=u.length;q<s;q++){var o=u[q];if(o){var p=o.parentNode;u[q]=p.nodeName===r?p:false}}}else{for(var q=0,s=u.length;q<s;q++){var o=u[q];if(o){u[q]=typeof r==="string"?o.parentNode:o.parentNode===r}}if(typeof r==="string"){m.filter(r,u,true)}}},"":function(p,r,t){var q="done"+(h++),s=a;if(!r.match(/\W/)){var o=r=t?r:r.toUpperCase();s=d}s("parentNode",r,q,p,o,t)},"~":function(p,r,t){var q="done"+(h++),s=a;if(typeof r==="string"&&!r.match(/\W/)){var o=r=t?r:r.toUpperCase();s=d}s("previousSibling",r,q,p,o,t)}},find:{ID:function(q,p,o){if(typeof p.getElementById!=="undefined"&&!o){var r=p.getElementById(q[1]);return r?[r]:[]}},NAME:function(q,p,o){if(typeof p.getElementsByName!=="undefined"&&!o){return p.getElementsByName(q[1])}},TAG:function(p,o){return o.getElementsByTagName(p[1])}},preFilter:{CLASS:function(p,r,q,s,t){p=" "+p[1].replace(/\\/g,"")+" ";var u;for(var o=0;(u=r[o])!=null;o++){if(u){if(t^(" "+u.className+" ").indexOf(p)>=0){if(!q){s.push(u)}}else{if(q){r[o]=false}}}}return false},ID:function(o){return o[1].replace(/\\/g,"")},TAG:function(p,q){for(var o=0;q[o]===false;o++){}return q[o]&&c(q[o])?p[1]:p[1].toUpperCase()},CHILD:function(p){if(p[1]=="nth"){var o=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(p[2]=="even"&&"2n"||p[2]=="odd"&&"2n+1"||!/\D/.test(p[2])&&"0n+"+p[2]||p[2]);p[2]=(o[1]+(o[2]||1))-0;p[3]=o[3]-0}p[0]="done"+(h++);return p},ATTR:function(o){var p=o[1].replace(/\\/g,"");if(k.attrMap[p]){o[1]=k.attrMap[p]}if(o[2]==="~="){o[4]=" "+o[4]+" "}return o},PSEUDO:function(o,r,q,s,t){if(o[1]==="not"){if(o[3].match(b).length>1){o[3]=m(o[3],null,null,r)}else{var p=m.filter(o[3],r,q,true^t);if(!q){s.push.apply(s,p)}return false}}else{if(k.match.POS.test(o[0])){return true}}return o},POS:function(o){o.unshift(true);return o}},filters:{enabled:function(o){return o.disabled===false&&o.type!=="hidden"},disabled:function(o){return o.disabled===true},checked:function(o){return o.checked===true},selected:function(o){o.parentNode.selectedIndex;return o.selected===true},parent:function(o){return !!o.firstChild},empty:function(o){return !o.firstChild},has:function(o,p,q){return !!m(q[3],o).length},header:function(o){return/h\d/i.test(o.nodeName)},text:function(o){return"text"===o.type},radio:function(o){return"radio"===o.type},checkbox:function(o){return"checkbox"===o.type},file:function(o){return"file"===o.type},password:function(o){return"password"===o.type},submit:function(o){return"submit"===o.type},image:function(o){return"image"===o.type},reset:function(o){return"reset"===o.type},button:function(o){return"button"===o.type||o.nodeName.toUpperCase()==="BUTTON"},input:function(o){return/input|select|textarea|button/i.test(o.nodeName)}},setFilters:{first:function(o,p){return p===0},last:function(p,q,r,o){return q===o.length-1},even:function(o,p){return p%2===0},odd:function(o,p){return p%2===1},lt:function(o,p,q){return p<q[3]-0},gt:function(o,p,q){return p>q[3]-0},nth:function(o,p,q){return q[3]-0==p},eq:function(o,p,q){return q[3]-0==p}},filter:{CHILD:function(w,t){var q=t[1],p=w.parentNode;var r=t[0];if(p&&(!p[r]||!w.nodeIndex)){var s=1;for(var v=p.firstChild;v;v=v.nextSibling){if(v.nodeType==1){v.nodeIndex=s++}}p[r]=s-1}if(q=="first"){return w.nodeIndex==1}else{if(q=="last"){return w.nodeIndex==p[r]}else{if(q=="only"){return p[r]==1}else{if(q=="nth"){var x=false,u=t[2],o=t[3];if(u==1&&o==0){return true}if(u==0){if(w.nodeIndex==o){x=true}}else{if((w.nodeIndex-o)%u==0&&(w.nodeIndex-o)/u>=0){x=true}}return x}}}}},PSEUDO:function(u,q,p,t){var r=q[1],o=k.filters[r];if(o){return o(u,p,q,t)}else{if(r==="contains"){return(u.textContent||u.innerText||"").indexOf(q[3])>=0}else{if(r==="not"){var v=q[3];for(var p=0,s=v.length;p<s;p++){if(v[p]===u){return false}}return true}}}},ID:function(o,p){return o.nodeType===1&&o.getAttribute("id")===p},TAG:function(o,p){return(p==="*"&&o.nodeType===1)||o.nodeName===p},CLASS:function(o,p){return p.test(o.className)},ATTR:function(o,q){var s=k.attrHandle[q[1]]?k.attrHandle[q[1]](o):o[q[1]]||o.getAttribute(q[1]),t=s+"",p=q[2],r=q[4];return s==null?p==="!=":p==="="?t===r:p==="*="?t.indexOf(r)>=0:p==="~="?(" "+t+" ").indexOf(r)>=0:!q[4]?s:p==="!="?t!=r:p==="^="?t.indexOf(r)===0:p==="$="?t.substr(t.length-r.length)===r:p==="|="?t===r||t.substr(0,r.length+1)===r+"-":false},POS:function(o,r,q,t){var s=r[2],p=k.setFilters[s];if(p){return p(o,q,r,t)}}}};var g=k.match.POS;for(var e in k.match){k.match[e]=RegExp(k.match[e].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var n=function(o,p){o=Array.prototype.slice.call(o);if(p){p.push.apply(p,o);return p}return o};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(f){n=function(o,p){var r=p||[];if(l.call(o)==="[object Array]"){Array.prototype.push.apply(r,o)}else{if(typeof o.length==="number"){for(var q=0,s=o.length;q<s;q++){r.push(o[q])}}else{for(var q=0;o[q];q++){r.push(o[q])}}}return r}}(function(){var p=document.createElement("form"),o="script"+(new Date).getTime();p.innerHTML="<input name='"+o+"'/>";var q=document.documentElement;q.insertBefore(p,q.firstChild);if(!!document.getElementById(o)){k.find.ID=function(r,u,t){if(typeof u.getElementById!=="undefined"&&!t){var s=u.getElementById(r[1]);return s?s.id===r[1]||typeof s.getAttributeNode!=="undefined"&&s.getAttributeNode("id").nodeValue===r[1]?[s]:ab:[]}};k.filter.ID=function(t,s){var r=typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id");return t.nodeType===1&&r&&r.nodeValue===s}}q.removeChild(p)})();(function(){var o=document.createElement("div");o.appendChild(document.createComment(""));if(o.getElementsByTagName("*").length>0){k.find.TAG=function(s,t){var p=t.getElementsByTagName(s[1]);if(s[1]==="*"){var q=[];for(var r=0;p[r];r++){if(p[r].nodeType===1){q.push(p[r])}}p=q}return p}}o.innerHTML="<a href='#'></a>";if(o.firstChild&&o.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(p){return p.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var p=m,o=document.createElement("div");o.innerHTML="<p class='TEST'></p>";if(o.querySelectorAll&&o.querySelectorAll(".TEST").length===0){return}m=function(u,q,s,r){q=q||document;if(!r&&q.nodeType===9&&!c(q)){try{return n(q.querySelectorAll(u),s)}catch(t){}}return p(u,q,s,r)};m.find=p.find;m.filter=p.filter;m.selectors=p.selectors;m.matches=p.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){k.order.splice(1,0,"CLASS");k.find.CLASS=function(p,o){return o.getElementsByClassName(p[1])}}function d(v,p,q,x,o,y){for(var s=0,u=x.length;s<u;s++){var w=x[s];if(w){w=w[v];var r=false;while(w&&w.nodeType){var t=w[q];if(t){r=x[t];break}if(w.nodeType===1&&!y){w[q]=s}if(w.nodeName===p){r=w;break}w=w[v]}x[s]=r}}}function a(v,q,r,x,p,o){for(var t=0,u=x.length;t<u;t++){var w=x[t];if(w){w=w[v];var s=false;while(w&&w.nodeType){if(w[r]){s=x[w[r]];break}if(w.nodeType===1){if(!o){w[r]=t}if(typeof q!=="string"){if(w===q){s=true;break}}else{if(m.filter(q,[w]).length>0){s=w;break}}}w=w[v]}x[t]=s}}}var i=document.compareDocumentPosition?function(o,p){return o.compareDocumentPosition(p)&16}:function(o,p){return o!==p&&(o.contains?o.contains(p):true)};var c=function(o){return o.nodeType===9&&o.documentElement.nodeName!=="HTML"||!!o.ownerDocument&&c(o.ownerDocument)};var j=function(s,t){var p=[],o="",v,q=t.nodeType?[t]:t;while((v=k.match.PSEUDO.exec(s))){o+=v[0];s=s.replace(k.match.PSEUDO,"")}s=k.relative[s]?s+"*":s;for(var u=0,r=q.length;u<r;u++){m(s,q[u],p)}return m.filter(o,p)};T.find=m;T.filter=m.filter;T.expr=m.selectors;T.expr[":"]=T.expr.filters;m.selectors.filters.hidden=function(o){return"hidden"===o.type||T.css(o,"display")==="none"||T.css(o,"visibility")==="hidden"};m.selectors.filters.visible=function(o){return"hidden"!==o.type&&T.css(o,"display")!=="none"&&T.css(o,"visibility")!=="hidden"};m.selectors.filters.animated=function(o){return T.grep(T.timers,function(p){return o===p.elem}).length};T.multiFilter=function(o,q,p){if(p){o=":not("+o+")"}return m.matches(o,q)};T.dir=function(p,q){var r=[],o=p[q];while(o&&o!=document){if(o.nodeType==1){r.push(o)}o=o[q]}return r};T.nth=function(o,s,q,p){s=s||1;var r=0;for(;o;o=o[q]){if(o.nodeType==1&&++r==s){break}}return o};T.sibling=function(o,p){var q=[];for(;o;o=o.nextSibling){if(o.nodeType==1&&o!=p){q.push(o)}}return q};return;W.Sizzle=m})();T.event={add:function(c,f,d,a){if(c.nodeType==3||c.nodeType==8){return}if(c.setInterval&&c!=W){c=W}if(!d.guid){d.guid=this.guid++}if(a!==ab){var e=d;d=this.proxy(e);d.data=a}var g=T.data(c,"events")||T.data(c,"events",{}),b=T.data(c,"handle")||T.data(c,"handle",function(){return typeof T!=="undefined"&&!T.event.triggered?T.event.handle.apply(arguments.callee.elem,arguments):ab});b.elem=c;T.each(f.split(/\s+/),function(k,j){var i=j.split(".");j=i.shift();d.type=i.slice().sort().join(".");var h=g[j];if(T.event.specialAll[j]){T.event.specialAll[j].setup.call(c,a,i)}if(!h){h=g[j]={};if(!T.event.special[j]||T.event.special[j].setup.call(c,a,i)===false){if(c.addEventListener){c.addEventListener(j,b,false)}else{if(c.attachEvent){c.attachEvent("on"+j,b)}}}}h[d.guid]=d;T.event.global[j]=true});c=null},guid:1,global:{},remove:function(b,e,c){if(b.nodeType==3||b.nodeType==8){return}var f=T.data(b,"events"),g,h;if(f){if(e===ab||(typeof e==="string"&&e.charAt(0)==".")){for(var d in f){this.remove(b,d+(e||""))}}else{if(e.type){c=e.handler;e=e.type}T.each(e.split(/\s+/),function(m,k){var i=k.split(".");k=i.shift();var l=RegExp("(^|\\.)"+i.slice().sort().join(".*\\.")+"(\\.|$)");if(f[k]){if(c){delete f[k][c.guid]}else{for(var j in f[k]){if(l.test(f[k][j].type)){delete f[k][j]}}}if(T.event.specialAll[k]){T.event.specialAll[k].teardown.call(b,i)}for(g in f[k]){break}if(!g){if(!T.event.special[k]||T.event.special[k].teardown.call(b,i)===false){if(b.removeEventListener){b.removeEventListener(k,T.data(b,"handle"),false)}else{if(b.detachEvent){b.detachEvent("on"+k,T.data(b,"handle"))}}}g=null;delete f[k]}}})}for(g in f){break}if(!g){var a=T.data(b,"handle");if(a){a.elem=null}T.removeData(b,"events");T.removeData(b,"handle")}}},trigger:function(d,b,e,h){var f=d.type||d;if(!h){d=typeof d==="object"?d[aa]?d:T.extend(T.Event(f),d):T.Event(f);if(f.indexOf("!")>=0){d.type=f=f.slice(0,-1);d.exclusive=true}if(!e){d.stopPropagation();if(this.global[f]){T.each(T.cache,function(){if(this.events&&this.events[f]){T.event.trigger(d,b,this.handle.elem)}})}}if(!e||e.nodeType==3||e.nodeType==8){return ab}d.result=ab;d.target=e;b=T.makeArray(b);b.unshift(d)}d.currentTarget=e;var c=T.data(e,"handle");if(c){c.apply(e,b)}if((!e[f]||(T.nodeName(e,"a")&&f=="click"))&&e["on"+f]&&e["on"+f].apply(e,b)===false){d.result=false}if(!h&&e[f]&&!d.isDefaultPrevented()&&!(T.nodeName(e,"a")&&f=="click")){this.triggered=true;try{e[f]()}catch(a){}}this.triggered=false;if(!d.isPropagationStopped()){var g=e.parentNode||e.ownerDocument;if(g){T.event.trigger(d,b,g,true)}}},handle:function(b){var c,h;b=arguments[0]=T.event.fix(b||W.event);var a=b.type.split(".");b.type=a.shift();c=!a.length&&!b.exclusive;var d=RegExp("(^|\\.)"+a.slice().sort().join(".*\\.")+"(\\.|$)");h=(T.data(this,"events")||{})[b.type];for(var f in h){var e=h[f];if(c||d.test(e.type)){b.handler=e;b.data=e.data;var g=e.apply(this,arguments);if(g!==ab){b.result=g;if(g===false){b.preventDefault();b.stopPropagation()}}if(b.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(c){if(c[aa]){return c}var e=c;c=T.Event(e);for(var d=this.props.length,a;d;){a=this.props[--d];c[a]=e[a]}if(!c.target){c.target=c.srcElement||document}if(c.target.nodeType==3){c.target=c.target.parentNode}if(!c.relatedTarget&&c.fromElement){c.relatedTarget=c.fromElement==c.target?c.toElement:c.fromElement}if(c.pageX==null&&c.clientX!=null){var b=document.documentElement,f=document.body;c.pageX=c.clientX+(b&&b.scrollLeft||f&&f.scrollLeft||0)-(b.clientLeft||0);c.pageY=c.clientY+(b&&b.scrollTop||f&&f.scrollTop||0)-(b.clientTop||0)}if(!c.which&&((c.charCode||c.charCode===0)?c.charCode:c.keyCode)){c.which=c.charCode||c.keyCode}if(!c.metaKey&&c.ctrlKey){c.metaKey=c.ctrlKey}if(!c.which&&c.button){c.which=(c.button&1?1:(c.button&2?3:(c.button&4?2:0)))}return c},proxy:function(a,b){b=b||function(){return a.apply(this,arguments)};b.guid=a.guid=a.guid||b.guid||this.guid++;return b},special:{ready:{setup:P,teardown:function(){}}},specialAll:{live:{setup:function(b,a){T.event.add(this,a[0],af)},teardown:function(a){if(a.length){var c=0,b=RegExp("(^|\\.)"+a[0]+"(\\.|$)");T.each((T.data(this,"events").live||{}),function(){if(b.test(this.type)){c++}});if(c<1){T.event.remove(this,a[0],af)}}}}}};T.Event=function(a){if(!this.preventDefault){return new T.Event(a)}if(a&&a.type){this.originalEvent=a;this.type=a.type}else{this.type=a}this.timeStamp=ad();this[aa]=true};function X(){return false}function J(){return true}T.Event.prototype={preventDefault:function(){this.isDefaultPrevented=J;var a=this.originalEvent;if(!a){return}if(a.preventDefault){a.preventDefault()}a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=J;var a=this.originalEvent;if(!a){return}if(a.stopPropagation){a.stopPropagation()}a.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=J;this.stopPropagation()},isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X};var ah=function(b){var c=b.relatedTarget;while(c&&c!=this){try{c=c.parentNode}catch(a){c=this}}if(c!=this){b.type=b.data;T.event.handle.apply(this,arguments)}};T.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(a,b){T.event.special[b]={setup:function(){T.event.add(this,a,ah,b)},teardown:function(){T.event.remove(this,a,ah)}}});T.fn.extend({bind:function(b,a,c){return b=="unload"?this.one(b,a,c):this.each(function(){T.event.add(this,b,c||a,c&&a)})},one:function(b,a,c){var d=T.event.proxy(c||a,function(e){T(this).unbind(e,d);return(c||a).apply(this,arguments)});return this.each(function(){T.event.add(this,b,d,c&&a)})},unbind:function(a,b){return this.each(function(){T.event.remove(this,a,b)})},trigger:function(b,a){return this.each(function(){T.event.trigger(b,a,this)})},triggerHandler:function(c,a){if(this[0]){var b=T.Event(c);b.preventDefault();b.stopPropagation();T.event.trigger(b,a,this[0]);return b.result}},toggle:function(a){var c=arguments,b=1;while(b<c.length){T.event.proxy(a,c[b++])}return this.click(T.event.proxy(a,function(d){this.lastToggle=(this.lastToggle||0)%b;d.preventDefault();return c[this.lastToggle++].apply(this,arguments)||false}))},hover:function(b,a){return this.mouseenter(b).mouseleave(a)},ready:function(a){P();if(T.isReady){a.call(document,T)}else{T.readyList.push(a)}return this},live:function(a,b){var c=T.event.proxy(b);c.guid+=this.selector+a;T(document).bind(Z(a,this.selector),this.selector,c);return this},die:function(a,b){T(document).unbind(Z(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});function af(a){var d=RegExp("(^|\\.)"+a.type+"(\\.|$)"),b=true,c=[];T.each(T.data(this,"events").live||[],function(g,f){if(d.test(f.type)){var e=T(a.target).closest(f.data)[0];if(e){c.push({elem:e,fn:f})}}});T.each(c,function(){if(this.fn.call(this.elem,a,this.fn.data)===false){b=false}});return b}function Z(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"|")].join(".")}T.extend({isReady:false,readyList:[],ready:function(){if(!T.isReady){T.isReady=true;if(T.readyList){T.each(T.readyList,function(){this.call(document,T)});T.readyList=null}T(document).triggerHandler("ready")}}});var G=false;function P(){if(G){return}G=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);T.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);T.ready()}});if(document.documentElement.doScroll&&typeof W.frameElement==="undefined"){(function(){if(T.isReady){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}T.ready()})()}}}T.event.add(W,"load",T.ready)}T.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(a,b){T.fn[b]=function(c){return c?this.bind(b,c):this.trigger(b)}});T(W).bind("unload",function(){for(var a in T.cache){if(a!=1&&T.cache[a].handle){T.event.remove(T.cache[a].handle.elem)}}});(function(){T.support={};var f=document.documentElement,e=document.createElement("script"),a=document.createElement("div"),b="script"+(new Date).getTime();a.style.display="none";a.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var d=a.getElementsByTagName("*"),g=a.getElementsByTagName("a")[0];if(!d||!d.length||!g){return}T.support={leadingWhitespace:a.firstChild.nodeType==3,tbody:!a.getElementsByTagName("tbody").length,objectAll:!!a.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/red/.test(g.getAttribute("style")),hrefNormalized:g.getAttribute("href")==="/a",opacity:g.style.opacity==="0.5",cssFloat:!!g.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};e.type="text/javascript";try{e.appendChild(document.createTextNode("window."+b+"=1;"))}catch(c){}f.insertBefore(e,f.firstChild);if(W[b]){T.support.scriptEval=true;delete W[b]}f.removeChild(e);if(a.attachEvent&&a.fireEvent){a.attachEvent("onclick",function(){T.support.noCloneEvent=false;a.detachEvent("onclick",arguments.callee)});a.cloneNode(true).fireEvent("onclick")}T(function(){var h=document.createElement("div");h.style.width="1px";h.style.paddingLeft="1px";document.body.appendChild(h);T.boxModel=T.support.boxModel=h.offsetWidth===2;document.body.removeChild(h)})})();var H=T.support.cssFloat?"cssFloat":"styleFloat";T.props={"for":"htmlFor","class":"className","float":H,cssFloat:H,styleFloat:H,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};T.fn.extend({_load:T.fn.load,load:function(e,b,a){if(typeof e!=="string"){return this._load(e)}var c=e.indexOf(" ");if(c>=0){var g=e.slice(c,e.length);e=e.slice(0,c)}var d="GET";if(b){if(T.isFunction(b)){a=b;b=null}else{if(typeof b==="object"){b=T.param(b);d="POST"}}}var f=this;T.ajax({url:e,type:d,dataType:"html",data:b,complete:function(i,h){if(h=="success"||h=="notmodified"){f.html(g?T("<div/>").append(i.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(g):i.responseText)}if(a){f.each(a,[i.responseText,h,i])}}});return this},serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?T.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(c,b){var a=T(this).val();return a==null?null:T.isArray(a)?T.map(a,function(d,e){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});T.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(b,a){T.fn[a]=function(c){return this.bind(a,c)}});var N=ad();T.extend({get:function(d,b,a,c){if(T.isFunction(b)){a=b;b=null}return T.ajax({type:"GET",url:d,data:b,success:a,dataType:c})},getScript:function(b,a){return T.get(b,null,a,"script")},getJSON:function(c,b,a){return T.get(c,b,a,"json")},post:function(d,b,a,c){if(T.isFunction(b)){a=b;b={}}return T.ajax({type:"POST",url:d,data:b,success:a,dataType:c})},ajaxSetup:function(a){T.extend(T.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return W.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(k){k=T.extend(true,k,T.extend(true,{},T.ajaxSettings,k));var a,r=/=\?(&|$)/g,f,b,q=k.type.toUpperCase();if(k.data&&k.processData&&typeof k.data!=="string"){k.data=T.param(k.data)}if(k.dataType=="jsonp"){if(q=="GET"){if(!k.url.match(r)){k.url+=(k.url.match(/\?/)?"&":"?")+(k.jsonp||"callback")+"=?"}}else{if(!k.data||!k.data.match(r)){k.data=(k.data?k.data+"&":"")+(k.jsonp||"callback")+"=?"}}k.dataType="json"}if(k.dataType=="json"&&(k.data&&k.data.match(r)||k.url.match(r))){a="jsonp"+N++;if(k.data){k.data=(k.data+"").replace(r,"="+a+"$1")}k.url=k.url.replace(r,"="+a+"$1");k.dataType="script";W[a]=function(u){b=u;o();l();W[a]=ab;try{delete W[a]}catch(t){}if(p){p.removeChild(d)}}}if(k.dataType=="script"&&k.cache==null){k.cache=false}if(k.cache===false&&q=="GET"){var s=ad();var c=k.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+s+"$2");k.url=c+((c==k.url)?(k.url.match(/\?/)?"&":"?")+"_="+s:"")}if(k.data&&q=="GET"){k.url+=(k.url.match(/\?/)?"&":"?")+k.data;k.data=null}if(k.global&&!T.active++){T.event.trigger("ajaxStart")}var g=/^(\w+:)?\/\/([^\/?#]+)/.exec(k.url);if(k.dataType=="script"&&q=="GET"&&g&&(g[1]&&g[1]!=location.protocol||g[2]!=location.host)){var p=document.getElementsByTagName("head")[0];var d=document.createElement("script");d.src=k.url;if(k.scriptCharset){d.charset=k.scriptCharset}if(!a){var i=false;d.onload=d.onreadystatechange=function(){if(!i&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){i=true;o();l();p.removeChild(d)}}}p.appendChild(d);return ab}var m=false;var n=k.xhr();if(k.username){n.open(q,k.url,k.async,k.username,k.password)}else{n.open(q,k.url,k.async)}try{if(k.data){n.setRequestHeader("Content-Type",k.contentType)}if(k.ifModified){n.setRequestHeader("If-Modified-Since",T.lastModified[k.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}n.setRequestHeader("X-Requested-With","XMLHttpRequest");n.setRequestHeader("Accept",k.dataType&&k.accepts[k.dataType]?k.accepts[k.dataType]+", */*":k.accepts._default)}catch(e){}if(k.beforeSend&&k.beforeSend(n,k)===false){if(k.global&&!--T.active){T.event.trigger("ajaxStop")}n.abort();return false}if(k.global){T.event.trigger("ajaxSend",[n,k])}var j=function(v){if(n.readyState==0){if(h){clearInterval(h);h=null;if(k.global&&!--T.active){T.event.trigger("ajaxStop")}}}else{if(!m&&n&&(n.readyState==4||v=="timeout")){m=true;if(h){clearInterval(h);h=null}f=v=="timeout"?"timeout":!T.httpSuccess(n)?"error":k.ifModified&&T.httpNotModified(n,k.url)?"notmodified":"success";if(f=="success"){try{b=T.httpData(n,k.dataType,k)}catch(t){f="parsererror"}}if(f=="success"){var u;try{u=n.getResponseHeader("Last-Modified")}catch(t){}if(k.ifModified&&u){T.lastModified[k.url]=u}if(!a){o()}}else{T.handleError(k,n,f)}l();if(v){n.abort()}if(k.async){n=null}}}};if(k.async){var h=setInterval(j,13);if(k.timeout>0){setTimeout(function(){if(n&&!m){j("timeout")}},k.timeout)}}try{n.send(k.data)}catch(e){T.handleError(k,n,null,e)}if(!k.async){j()}function o(){if(k.success){k.success(b,f)}if(k.global){T.event.trigger("ajaxSuccess",[n,k])}}function l(){if(k.complete){k.complete(n,f)}if(k.global){T.event.trigger("ajaxComplete",[n,k])}if(k.global&&!--T.active){T.event.trigger("ajaxStop")}}return n},handleError:function(c,a,d,b){if(c.error){c.error(a,d,b)}if(c.global){T.event.trigger("ajaxError",[a,c,b])}},active:0,httpSuccess:function(a){try{return !a.status&&location.protocol=="file:"||(a.status>=200&&a.status<300)||a.status==304||a.status==1223}catch(b){}return false},httpNotModified:function(b,d){try{var a=b.getResponseHeader("Last-Modified");return b.status==304||a==T.lastModified[d]}catch(c){}return false},httpData:function(a,c,d){var e=a.getResponseHeader("content-type"),f=c=="xml"||!c&&e&&e.indexOf("xml")>=0,b=f?a.responseXML:a.responseText;if(f&&b.documentElement.tagName=="parsererror"){throw"parsererror"}if(d&&d.dataFilter){b=d.dataFilter(b,c)}if(typeof b==="string"){if(c=="script"){T.globalEval(b)}if(c=="json"){b=W["eval"]("("+b+")")}}return b},param:function(d){var b=[];function a(f,e){b[b.length]=encodeURIComponent(f)+"="+encodeURIComponent(e)}if(T.isArray(d)||d.jquery){T.each(d,function(){a(this.name,this.value)})}else{for(var c in d){if(T.isArray(d[c])){T.each(d[c],function(){a(c,this)})}else{a(c,T.isFunction(d[c])?d[c]():d[c])}}}return b.join("&").replace(/%20/g,"+")}});var V={},U,ae=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function K(b,c){var a={};T.each(ae.concat.apply([],ae.slice(0,c)),function(){a[this]=b});return a}T.fn.extend({show:function(c,a){if(c){return this.animate(K("show",3),c,a)}else{for(var e=0,g=this.length;e<g;e++){var h=T.data(this[e],"olddisplay");this[e].style.display=h||"";if(T.css(this[e],"display")==="none"){var f=this[e].tagName,b;if(V[f]){b=V[f]}else{var d=T("<"+f+" />").appendTo("body");b=d.css("display");if(b==="none"){b="block"}d.remove();V[f]=b}this[e].style.display=T.data(this[e],"olddisplay",b)}}return this}},hide:function(b,a){if(b){return this.animate(K("hide",3),b,a)}else{for(var c=0,d=this.length;c<d;c++){var e=T.data(this[c],"olddisplay");if(!e&&e!=="none"){T.data(this[c],"olddisplay",T.css(this[c],"display"))}this[c].style.display="none"}return this}},_toggle:T.fn.toggle,toggle:function(a,b){var c=typeof a==="boolean";return T.isFunction(a)&&T.isFunction(b)?this._toggle.apply(this,arguments):a==null||c?this.each(function(){var d=c?a:T(this).is(":hidden");T(this)[d?"show":"hide"]()}):this.animate(K("toggle",3),a,b)},fadeTo:function(c,a,b){return this.animate({opacity:a},c,b)},animate:function(a,d,b,c){var e=T.speed(d,b,c);return this[e.queue===false?"each":"queue"](function(){var g=T.extend({},e),i,f=this.nodeType==1&&T(this).is(":hidden"),h=this;for(i in a){if(a[i]=="hide"&&f||a[i]=="show"&&!f){return g.complete.call(this)}if((i=="height"||i=="width")&&this.style){g.display=T.css(this,"display");g.overflow=this.style.overflow}}if(g.overflow!=null){this.style.overflow="hidden"}g.curAnim=T.extend({},a);T.each(a,function(o,k){var l=new T.fx(h,g,o);if(/toggle|show|hide/.test(k)){l[k=="toggle"?f?"show":"hide":k](a)}else{var m=k.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),j=l.cur(true)||0;if(m){var p=parseFloat(m[2]),n=m[3]||"px";if(n!="px"){h.style[o]=(p||1)+n;j=((p||1)/l.cur(true))*j;h.style[o]=j+n}if(m[1]){p=((m[1]=="-="?-1:1)*p)+j}l.custom(j,p,n)}else{l.custom(j,k,"")}}});return true})},stop:function(b,c){var a=T.timers;if(b){this.queue([])}this.each(function(){for(var d=a.length-1;d>=0;d--){if(a[d].elem==this){if(c){a[d](true)}a.splice(d,1)}}});if(!c){this.dequeue()}return this}});T.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(b,a){T.fn[b]=function(d,c){return this.animate(a,d,c)}});T.extend({speed:function(b,a,c){var d=typeof b==="object"?b:{complete:c||!c&&a||T.isFunction(b)&&b,duration:b,easing:c&&a||a&&!T.isFunction(a)&&a};d.duration=T.fx.off?0:typeof d.duration==="number"?d.duration:T.fx.speeds[d.duration]||T.fx.speeds._default;d.old=d.complete;d.complete=function(){if(d.queue!==false){T(this).dequeue()}if(T.isFunction(d.old)){d.old.call(this)}};return d},easing:{linear:function(b,a,d,c){return d+c*b},swing:function(b,a,d,c){return((-Math.cos(b*Math.PI)/2)+0.5)*c+d}},timers:[],fx:function(b,c,a){this.options=c;this.elem=b;this.prop=a;if(!c.orig){c.orig={}}}});T.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(T.fx.step[this.prop]||T.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]}var b=parseFloat(T.css(this.elem,this.prop,a));return b&&b>-10000?b:parseFloat(T.curCSS(this.elem,this.prop))||0},custom:function(a,b,c){this.startTime=ad();this.start=a;this.end=b;this.unit=c||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;function d(f){return e.step(f)}d.elem=this.elem;if(d()&&T.timers.push(d)==1){U=setInterval(function(){var f=T.timers;for(var g=0;g<f.length;g++){if(!f[g]()){f.splice(g--,1)}}if(!f.length){clearInterval(U)}},13)}},show:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());T(this.elem).show()},hide:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(c){var d=ad();if(c||d>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var f=true;for(var e in this.options.curAnim){if(this.options.curAnim[e]!==true){f=false}}if(f){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(T.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){T(this.elem).hide()}if(this.options.hide||this.options.show){for(var b in this.options.curAnim){T.attr(this.elem.style,b,this.options.orig[b])}}this.options.complete.call(this.elem)}return false}else{var a=d-this.startTime;this.state=a/this.options.duration;this.pos=T.easing[this.options.easing||(T.easing.swing?"swing":"linear")](this.state,a,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};T.extend(T.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){T.attr(a.elem.style,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit}else{a.elem[a.prop]=a.now}}}});if(document.documentElement.getBoundingClientRect){T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}var f=this[0].getBoundingClientRect(),c=this[0].ownerDocument,g=c.body,h=c.documentElement,a=h.clientTop||g.clientTop||0,b=h.clientLeft||g.clientLeft||0,d=f.top+(self.pageYOffset||T.boxModel&&h.scrollTop||g.scrollTop)-a,e=f.left+(self.pageXOffset||T.boxModel&&h.scrollLeft||g.scrollLeft)-b;return{top:d,left:e}}}else{T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}T.offset.initialized||T.offset.initialize();var f=this[0],i=f.offsetParent,j=f,a=f.ownerDocument,c,h=a.documentElement,e=a.body,d=a.defaultView,k=d.getComputedStyle(f,null),b=f.offsetTop,g=f.offsetLeft;while((f=f.parentNode)&&f!==e&&f!==h){c=d.getComputedStyle(f,null);b-=f.scrollTop,g-=f.scrollLeft;if(f===i){b+=f.offsetTop,g+=f.offsetLeft;if(T.offset.doesNotAddBorder&&!(T.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(f.tagName))){b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0}j=i,i=f.offsetParent}if(T.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"){b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0}k=c}if(k.position==="relative"||k.position==="static"){b+=e.offsetTop,g+=e.offsetLeft}if(k.position==="fixed"){b+=Math.max(h.scrollTop,e.scrollTop),g+=Math.max(h.scrollLeft,e.scrollLeft)}return{top:b,left:g}}}T.offset={initialize:function(){if(this.initialized){return}var c=document.body,i=document.createElement("div"),g,h,a,f,b,j,e=c.style.marginTop,d='<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>';b={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(j in b){i.style[j]=b[j]}i.innerHTML=d;c.insertBefore(i,c.firstChild);g=i.firstChild,h=g.firstChild,f=g.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(h.offsetTop!==5);this.doesAddBorderForTableAndCells=(f.offsetTop===5);g.style.overflow="hidden",g.style.position="relative";this.subtractsBorderForOverflowNotVisible=(h.offsetTop===-5);c.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(c.offsetTop===0);c.style.marginTop=e;c.removeChild(i);this.initialized=true},bodyOffset:function(c){T.offset.initialized||T.offset.initialize();var a=c.offsetTop,b=c.offsetLeft;if(T.offset.doesNotIncludeMarginInBodyOffset){a+=parseInt(T.curCSS(c,"marginTop",true),10)||0,b+=parseInt(T.curCSS(c,"marginLeft",true),10)||0}return{top:a,left:b}}};T.fn.extend({position:function(){var b=0,c=0,e;if(this[0]){var d=this.offsetParent(),a=this.offset(),f=/^body|html$/i.test(d[0].tagName)?{top:0,left:0}:d.offset();a.top-=Y(this,"marginTop");a.left-=Y(this,"marginLeft");f.top+=Y(d,"borderTopWidth");f.left+=Y(d,"borderLeftWidth");e={top:a.top-f.top,left:a.left-f.left}}return e},offsetParent:function(){var a=this[0].offsetParent||document.body;while(a&&(!/^body|html$/i.test(a.tagName)&&T.css(a,"position")=="static")){a=a.offsetParent}return T(a)}});T.each(["Left","Top"],function(b,c){var a="scroll"+c;T.fn[a]=function(d){if(!this[0]){return null}return d!==ab?this.each(function(){this==W||this==document?W.scrollTo(!b?d:T(W).scrollLeft(),b?d:T(W).scrollTop()):this[a]=d}):this[0]==W||this[0]==document?self[b?"pageYOffset":"pageXOffset"]||T.boxModel&&document.documentElement[a]||document.body[a]:this[0][a]}});T.each(["Height","Width"],function(b,d){var e=b?"Left":"Top",c=b?"Right":"Bottom";T.fn["inner"+d]=function(){return this[d.toLowerCase()]()+Y(this,"padding"+e)+Y(this,"padding"+c)};T.fn["outer"+d]=function(f){return this["inner"+d]()+Y(this,"border"+e+"Width")+Y(this,"border"+c+"Width")+(f?Y(this,"margin"+e)+Y(this,"margin"+c):0)};var a=d.toLowerCase();T.fn[a]=function(f){return this[0]==W?document.compatMode=="CSS1Compat"&&document.documentElement["client"+d]||document.body["client"+d]:this[0]==document?Math.max(document.documentElement["client"+d],document.body["scroll"+d],document.documentElement["scroll"+d],document.body["offset"+d],document.documentElement["offset"+d]):f===ab?(this.length?T.css(this[0],a):null):this.css(a,typeof f==="string"?f:f+"px")}})})();(function(p){var j=p.fn.remove,o=p.browser.mozilla&&(parseFloat(p.browser.version)<1.9);p.ui={version:"1.6rc6",plugin:{add:function(c,b,e){var a=p.ui[c].prototype;for(var d in e){a.plugins[d]=a.plugins[d]||[];a.plugins[d].push([b,e[d]])}},call:function(d,b,c){var e=d.plugins[b];if(!e){return}for(var a=0;a<e.length;a++){if(d.options[e[a][0]]){e[a][1].apply(d.element,c)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},cssCache:{},css:function(c){if(p.ui.cssCache[c]){return p.ui.cssCache[c]}var b=p('<div class="ui-gen"></div>').addClass(c).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");p.ui.cssCache[c]=!!((!(/auto|default/).test(b.css("cursor"))||(/^[1-9]/).test(b.css("height"))||(/^[1-9]/).test(b.css("width"))||!(/none/).test(b.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(b.css("backgroundColor"))));try{p("body").get(0).removeChild(b.get(0))}catch(a){}return p.ui.cssCache[c]},hasScroll:function(a,c){if(p(a).css("overflow")=="hidden"){return false}var d=(c&&c=="left")?"scrollLeft":"scrollTop",b=false;if(a[d]>0){return true}a[d]=1;b=(a[d]>0);a[d]=0;return b},isOverAxis:function(b,c,a){return(b>c)&&(b<(c+a))},isOver:function(e,c,f,a,d,b){return p.ui.isOverAxis(e,f,d)&&p.ui.isOverAxis(c,a,b)},keyCode:{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}};if(o){var m=p.attr,n=p.fn.removeAttr,k="http://www.w3.org/2005/07/aaa",r=/^aria-/,q=/^wairole:/;p.attr=function(c,d,b){var a=b!==undefined;return(d=="role"?(a?m.call(this,c,d,"wairole:"+b):(m.apply(this,arguments)||"").replace(q,"")):(r.test(d)?(a?c.setAttributeNS(k,d.replace(r,"aaa:"),b):m.call(this,c,d.replace(r,"aaa:"))):m.apply(this,arguments)))};p.fn.removeAttr=function(a){return(r.test(a)?this.each(function(){this.removeAttributeNS(k,a.replace(r,""))}):n.call(this,a))}}p.fn.extend({remove:function(){p("*",this).add(this).each(function(){p(this).triggerHandler("remove")});return j.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var a;if((p.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){a=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(p.curCSS(this,"position",1))&&(/(auto|scroll)/).test(p.curCSS(this,"overflow",1)+p.curCSS(this,"overflow-y",1)+p.curCSS(this,"overflow-x",1))}).eq(0)}else{a=this.parents().filter(function(){return(/(auto|scroll)/).test(p.curCSS(this,"overflow",1)+p.curCSS(this,"overflow-y",1)+p.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!a.length?p(document):a}});p.extend(p.expr[":"],{data:function(a,b,c){return !!p.data(a,c[3])},focusable:function(b){var a=b.nodeName.toLowerCase(),c=p.attr(b,"tabindex");return(/input|select|textarea|button|object/.test(a)?!b.disabled:"a"==a||"area"==a?b.href||!isNaN(c):!isNaN(c))&&!p(b)["area"==a?"parents":"closest"](":hidden").length},tabbable:function(a){var b=p.attr(a,"tabindex");return(isNaN(b)||b>=0)&&p(a).is(":focusable")}});function l(a,f,e,b){function c(g){var h=p[a][f][g]||[];return(typeof h=="string"?h.split(/,?\s+/):h)}var d=c("getter");if(b.length==1&&typeof b[0]=="string"){d=d.concat(c("getterSetter"))}return(p.inArray(e,d)!=-1)}p.widget=function(b,c){var a=b.split(".")[0];b=b.split(".")[1];p.fn[b]=function(e){var g=(typeof e=="string"),f=Array.prototype.slice.call(arguments,1);if(g&&e.substring(0,1)=="_"){return this}if(g&&l(a,b,e,f)){var d=p.data(this[0],b);return(d?d[e].apply(d,f):undefined)}return this.each(function(){var h=p.data(this,b);(!h&&!g&&p.data(this,b,new p[a][b](this,e))._init());(h&&g&&p.isFunction(h[e])&&h[e].apply(h,f))})};p[a]=p[a]||{};p[a][b]=function(e,f){var d=this;this.namespace=a;this.widgetName=b;this.widgetEventPrefix=p[a][b].eventPrefix||b;this.widgetBaseClass=a+"-"+b;this.options=p.extend({},p.widget.defaults,p[a][b].defaults,p.metadata&&p.metadata.get(e)[b],f);this.element=p(e).bind("setData."+b,function(h,i,g){if(h.target==e){return d._setData(i,g)}}).bind("getData."+b,function(g,h){if(g.target==e){return d._getData(h)}}).bind("remove",function(){return d.destroy()})};p[a][b].prototype=p.extend({},p.widget.prototype,c);p[a][b].getterSetter="option"};p.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(b,a){var c=b,d=this;if(typeof b=="string"){if(a===undefined){return this._getData(b)}c={};c[b]=a}p.each(c,function(f,e){d._setData(f,e)})},_getData:function(a){return this.options[a]},_setData:function(b,a){this.options[b]=a;if(b=="disabled"){this.element[a?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",a)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(b,a,g){var e=this.options[b],d=(b==this.widgetEventPrefix?b:this.widgetEventPrefix+b);a=p.Event(a);a.type=d;if(a.originalEvent){for(var c=p.event.props.length,f;c;){f=p.event.props[--c];a[f]=a.originalEvent[f]}}this.element.trigger(a,g);return !(p.isFunction(e)&&e.call(this.element[0],a,g)===false||a.isDefaultPrevented())}};p.widget.defaults={disabled:false};p.ui.mouse={_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;return false}});if(p.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(p.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(b){if(b.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(b));this._mouseDownEvent=b;var c=this,a=(b.which==1),d=(typeof this.options.cancel=="string"?p(b.target).parents().add(b.target).filter(this.options.cancel).length:false);if(!a||d||!this._mouseCapture(b)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=(this._mouseStart(b)!==false);if(!this._mouseStarted){b.preventDefault();return true}}this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};p(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(p.browser.safari||b.preventDefault());b.originalEvent.mouseHandled=true;return true},_mouseMove:function(a){if(p.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._mouseStarted?this._mouseDrag(a):this._mouseUp(a))}return !this._mouseStarted},_mouseUp:function(a){p(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=true;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(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return true}};p.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(b){b.widget("ui.draggable",b.extend({},b.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-draggable"));(this.options.disabled&&this.element.addClass(this.options.cssNamespace+"-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass(this.options.cssNamespace+"-draggable "+this.options.cssNamespace+"-draggable-dragging "+this.options.cssNamespace+"-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(a){var d=this.options;if(this.helper||d.disabled||b(a.target).is("."+this.options.cssNamespace+"-resizable-handle")){return false}this.handle=this._getHandle(a);if(!this.handle){return false}return true},_mouseStart:function(a){var d=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(b.ui.ddmanager){b.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};b.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;if(d.cursorAt){this._adjustOffsetFromHelper(d.cursorAt)}if(d.containment){this._setContainment()}this._trigger("start",a);this._cacheHelperProportions();if(b.ui.ddmanager&&!d.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,a)}this.helper.addClass(d.cssNamespace+"-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,e){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!e){var f=this._uiHash();this._trigger("drag",a,f);this.position=f.position}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"}if(b.ui.ddmanager){b.ui.ddmanager.drag(this,a)}return false},_mouseStop:function(f){var e=false;if(b.ui.ddmanager&&!this.options.dropBehaviour){e=b.ui.ddmanager.drop(this,f)}if(this.dropped){e=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!e)||(this.options.revert=="valid"&&e)||this.options.revert===true||(b.isFunction(this.options.revert)&&this.options.revert.call(this.element,e))){var a=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){a._trigger("stop",f);a._clear()})}else{this._trigger("stop",f);this._clear()}return false},_getHandle:function(a){var d=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target){d=true}});return d},_createHelper:function(f){var e=this.options;var a=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f])):(e.helper=="clone"?this.element.clone():this.element);if(!a.parents("body").length){a.appendTo((e.appendTo=="parent"?this.element[0].parentNode:e.appendTo))}if(a[0]!=this.element[0]&&!(/(fixed|absolute)/).test(a.css("position"))){a.css("position","absolute")}return a},_adjustOffsetFromHelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){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&&b.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body&&b.browser.mozilla)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.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.element.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.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment=="parent"){f.containment=this.helper[0].parentNode}if(f.containment=="document"||f.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b(f.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)&&f.containment.constructor!=Array){var h=b(f.containment)[0];if(!h){return}var g=b(f.containment).offset();var a=(b(h).css("overflow")!="hidden");this.containment=[g.left+(parseInt(b(h).css("borderLeftWidth"),10)||0)+(parseInt(b(h).css("paddingLeft"),10)||0)-this.margins.left,g.top+(parseInt(b(h).css("borderTopWidth"),10)||0)+(parseInt(b(h).css("paddingTop"),10)||0)-this.margins.top,g.left+(a?Math.max(h.scrollWidth,h.offsetWidth):h.offsetWidth)-(parseInt(b(h).css("borderLeftWidth"),10)||0)-(parseInt(b(h).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,g.top+(a?Math.max(h.scrollHeight,h.offsetHeight):h.offsetHeight)-(parseInt(b(h).css("borderTopWidth"),10)||0)-(parseInt(b(h).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(f.containment.constructor==Array){this.containment=f.containment}}},_convertPositionTo:function(j,d){if(!d){d=this.position}var l=j=="absolute"?1:-1;var k=this.options,a=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(a[0].tagName);return{top:(d.top+this.offset.relative.top*l+this.offset.parent.top*l-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:a.scrollTop()))*l),left:(d.left+this.offset.relative.left*l+this.offset.parent.left*l-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:a.scrollLeft())*l)}},_generatePosition:function(n){var k=this.options,a=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var o=n.pageX;var p=n.pageY;if(this.originalPosition){if(this.containment){if(n.pageX-this.offset.click.left<this.containment[0]){o=this.containment[0]+this.offset.click.left}if(n.pageY-this.offset.click.top<this.containment[1]){p=this.containment[1]+this.offset.click.top}if(n.pageX-this.offset.click.left>this.containment[2]){o=this.containment[2]+this.offset.click.left}if(n.pageY-this.offset.click.top>this.containment[3]){p=this.containment[3]+this.offset.click.top}}if(k.grid){var l=this.originalPageY+Math.round((p-this.originalPageY)/k.grid[1])*k.grid[1];p=this.containment?(!(l-this.offset.click.top<this.containment[1]||l-this.offset.click.top>this.containment[3])?l:(!(l-this.offset.click.top<this.containment[1])?l-k.grid[1]:l+k.grid[1])):l;var m=this.originalPageX+Math.round((o-this.originalPageX)/k.grid[0])*k.grid[0];o=this.containment?(!(m-this.offset.click.left<this.containment[0]||m-this.offset.click.left>this.containment[2])?m:(!(m-this.offset.click.left<this.containment[0])?m-k.grid[0]:m+k.grid[0])):m}}return{top:(p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(j?0:a.scrollTop()))),left:(o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:a.scrollLeft()))}},_clear:function(){this.helper.removeClass(this.options.cssNamespace+"-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,f,e){e=e||this._uiHash();b.ui.plugin.call(this,a,[f,e]);if(a=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return b.widget.prototype._trigger.call(this,a,f,e)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));b.extend(b.ui.draggable,{version:"1.6rc6",eventPrefix:"drag",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cssNamespace:"ui",cursor:"default",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});b.ui.plugin.add("draggable","connectToSortable",{start:function(a,g){var h=b(this).data("draggable"),f=h.options;h.sortables=[];b(f.connectToSortable).each(function(){b(typeof this=="string"?this+"":this).each(function(){if(b.data(this,"sortable")){var c=b.data(this,"sortable");h.sortables.push({instance:c,shouldRevert:c.options.revert});c._refreshItems();c._trigger("activate",a,h)}})})},stop:function(a,e){var f=b(this).data("draggable");b.each(f.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;f.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;if(f.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(j,g){var h=b(this).data("draggable"),a=this;var i=function(r){var d=this.offset.click.top,e=this.offset.click.left;var t=this.positionAbs.top,o=this.positionAbs.left;var q=r.height,f=r.width;var c=r.top,s=r.left;return b.ui.isOver(t+d,o+e,c,s,q,f)};b.each(h.sortables,function(c){if(i.call(h,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=b(a).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return g.helper[0]};j.target=this.instance.currentItem[0];this.instance._mouseCapture(j,true);this.instance._mouseStart(j,true,true);this.instance.offset.click.top=h.offset.click.top;this.instance.offset.click.left=h.offset.click.left;this.instance.offset.parent.left-=h.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=h.offset.parent.top-this.instance.offset.parent.top;h._trigger("toSortable",j);h.dropped=this.instance.element;this.instance.fromOutside=h}if(this.instance.currentItem){this.instance._mouseDrag(j)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._mouseStop(j,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}h._trigger("fromSortable",j);h.dropped=false}}})}});b.ui.plugin.add("draggable","cursor",{start:function(h,g){var a=b("body"),f=b(this).data("draggable").options;if(a.css("cursor")){f._cursor=a.css("cursor")}a.css("cursor",f.cursor)},stop:function(a,f){var e=b(this).data("draggable").options;if(e._cursor){b("body").css("cursor",e._cursor)}}});b.ui.plugin.add("draggable","iframeFix",{start:function(a,f){var e=b(this).data("draggable").options;b(e.iframeFix===true?"iframe":e.iframeFix).each(function(){b('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(b(this).offset()).appendTo("body")})},stop:function(a,d){b("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add("draggable","opacity",{start:function(h,g){var a=b(g.helper),f=b(this).data("draggable").options;if(a.css("opacity")){f._opacity=a.css("opacity")}a.css("opacity",f.opacity)},stop:function(a,f){var e=b(this).data("draggable").options;if(e._opacity){b(f.helper).css("opacity",e._opacity)}}});b.ui.plugin.add("draggable","scroll",{start:function(f,e){var a=b(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML"){a.overflowOffset=a.scrollParent.offset()}},drag:function(i,h){var j=b(this).data("draggable"),g=j.options,a=false;if(j.scrollParent[0]!=document&&j.scrollParent[0].tagName!="HTML"){if(!g.axis||g.axis!="x"){if((j.overflowOffset.top+j.scrollParent[0].offsetHeight)-i.pageY<g.scrollSensitivity){j.scrollParent[0].scrollTop=a=j.scrollParent[0].scrollTop+g.scrollSpeed}else{if(i.pageY-j.overflowOffset.top<g.scrollSensitivity){j.scrollParent[0].scrollTop=a=j.scrollParent[0].scrollTop-g.scrollSpeed}}}if(!g.axis||g.axis!="y"){if((j.overflowOffset.left+j.scrollParent[0].offsetWidth)-i.pageX<g.scrollSensitivity){j.scrollParent[0].scrollLeft=a=j.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(i.pageX-j.overflowOffset.left<g.scrollSensitivity){j.scrollParent[0].scrollLeft=a=j.scrollParent[0].scrollLeft-g.scrollSpeed}}}}else{if(!g.axis||g.axis!="x"){if(i.pageY-b(document).scrollTop()<g.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()-g.scrollSpeed)}else{if(b(window).height()-(i.pageY-b(document).scrollTop())<g.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()+g.scrollSpeed)}}}if(!g.axis||g.axis!="y"){if(i.pageX-b(document).scrollLeft()<g.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()-g.scrollSpeed)}else{if(b(window).width()-(i.pageX-b(document).scrollLeft())<g.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()+g.scrollSpeed)}}}}if(a!==false&&b.ui.ddmanager&&!g.dropBehaviour){b.ui.ddmanager.prepareOffsets(j,i)}}});b.ui.plugin.add("draggable","snap",{start:function(h,g){var a=b(this).data("draggable"),f=a.options;a.snapElements=[];b(f.snap.constructor!=String?(f.snap.items||":data(draggable)"):f.snap).each(function(){var c=b(this);var d=c.offset();if(this!=a.element[0]){a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:d.top,left:d.left})}})},drag:function(r,D){var J=b(this).data("draggable"),B=J.options;var d=B.snapTolerance;var i=D.absolutePosition.left,l=i+J.helperProportions.width,K=D.absolutePosition.top,L=K+J.helperProportions.height;for(var o=J.snapElements.length-1;o>=0;o--){var t=J.snapElements[o].left,E=t+J.snapElements[o].width,F=J.snapElements[o].top,C=F+J.snapElements[o].height;if(!((t-d<i&&i<E+d&&F-d<K&&K<C+d)||(t-d<i&&i<E+d&&F-d<L&&L<C+d)||(t-d<l&&l<E+d&&F-d<K&&K<C+d)||(t-d<l&&l<E+d&&F-d<L&&L<C+d))){if(J.snapElements[o].snapping){(J.options.snap.release&&J.options.snap.release.call(J.element,r,b.extend(J._uiHash(),{snapItem:J.snapElements[o].item})))}J.snapElements[o].snapping=false;continue}if(B.snapMode!="inner"){var M=Math.abs(F-L)<=d;var a=Math.abs(C-K)<=d;var H=Math.abs(t-l)<=d;var G=Math.abs(E-i)<=d;if(M){D.position.top=J._convertPositionTo("relative",{top:F-J.helperProportions.height,left:0}).top-J.margins.top}if(a){D.position.top=J._convertPositionTo("relative",{top:C,left:0}).top-J.margins.top}if(H){D.position.left=J._convertPositionTo("relative",{top:0,left:t-J.helperProportions.width}).left-J.margins.left}if(G){D.position.left=J._convertPositionTo("relative",{top:0,left:E}).left-J.margins.left}}var I=(M||a||H||G);if(B.snapMode!="outer"){var M=Math.abs(F-K)<=d;var a=Math.abs(C-L)<=d;var H=Math.abs(t-i)<=d;var G=Math.abs(E-l)<=d;if(M){D.position.top=J._convertPositionTo("relative",{top:F,left:0}).top-J.margins.top}if(a){D.position.top=J._convertPositionTo("relative",{top:C-J.helperProportions.height,left:0}).top-J.margins.top}if(H){D.position.left=J._convertPositionTo("relative",{top:0,left:t}).left-J.margins.left}if(G){D.position.left=J._convertPositionTo("relative",{top:0,left:E-J.helperProportions.width}).left-J.margins.left}}if(!J.snapElements[o].snapping&&(M||a||H||G||I)){(J.options.snap.snap&&J.options.snap.snap.call(J.element,r,b.extend(J._uiHash(),{snapItem:J.snapElements[o].item})))}J.snapElements[o].snapping=(M||a||H||G||I)}}});b.ui.plugin.add("draggable","stack",{start:function(a,h){var f=b(this).data("draggable").options;var g=b.makeArray(b(f.stack.group)).sort(function(c,d){return(parseInt(b(c).css("zIndex"),10)||f.stack.min)-(parseInt(b(d).css("zIndex"),10)||f.stack.min)});b(g).each(function(c){this.style.zIndex=f.stack.min+c});this[0].style.zIndex=f.stack.min+g.length}});b.ui.plugin.add("draggable","zIndex",{start:function(h,g){var a=b(g.helper),f=b(this).data("draggable").options;if(a.css("zIndex")){f._zIndex=a.css("zIndex")}a.css("zIndex",f.zIndex)},stop:function(a,f){var e=b(this).data("draggable").options;if(e._zIndex){b(f.helper).css("zIndex",e._zIndex)}}})})(jQuery);(function(b){b.widget("ui.sortable",b.extend({},b.ui.mouse,{_init:function(){var a=this.options;this.containerCache={};(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-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(this.options.cssNamespace+"-sortable "+this.options.cssNamespace+"-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")}},_mouseCapture:function(j,i){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(j);var k=null,l=this,a=b(j.target).parents().each(function(){if(b.data(this,"sortable-item")==l){k=b(this);return false}});if(b.data(j.target,"sortable-item")==l){k=b(j.target)}if(!k){return false}if(this.options.handle&&!i){var h=false;b(this.options.handle,k).find("*").andSelf().each(function(){if(this==j.target){h=true}});if(!h){return false}}this.currentItem=k;this._removeCurrentsFromItems();return true},_mouseStart:function(j,i,a){var h=this.options,l=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(j);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");b.extend(this.offset,{click:{left:j.pageX-this.offset.left,top:j.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(j);this.originalPageX=j.pageX;this.originalPageY=j.pageY;if(h.cursorAt){this._adjustOffsetFromHelper(h.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(h.containment){this._setContainment()}if(h.cursor){if(b("body").css("cursor")){this._storedCursor=b("body").css("cursor")}b("body").css("cursor",h.cursor)}if(h.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",h.opacity)}if(h.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",h.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",j,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!a){for(var k=this.containers.length-1;k>=0;k--){this.containers[k]._trigger("activate",j,l._uiHash(this))}}if(b.ui.ddmanager){b.ui.ddmanager.current=this}if(b.ui.ddmanager&&!h.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,j)}this.dragging=true;this.helper.addClass(h.cssNamespace+"-sortable-helper");this._mouseDrag(j);return true},_mouseDrag:function(k){this.position=this._generatePosition(k);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var j=this.options,a=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-k.pageY<j.scrollSensitivity){this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+j.scrollSpeed}else{if(k.pageY-this.overflowOffset.top<j.scrollSensitivity){this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-j.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-k.pageX<j.scrollSensitivity){this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+j.scrollSpeed}else{if(k.pageX-this.overflowOffset.left<j.scrollSensitivity){this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-j.scrollSpeed}}}else{if(k.pageY-b(document).scrollTop()<j.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()-j.scrollSpeed)}else{if(b(window).height()-(k.pageY-b(document).scrollTop())<j.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()+j.scrollSpeed)}}if(k.pageX-b(document).scrollLeft()<j.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()-j.scrollSpeed)}else{if(b(window).width()-(k.pageX-b(document).scrollLeft())<j.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()+j.scrollSpeed)}}}if(a!==false&&b.ui.ddmanager&&!j.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,k)}}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(var m=this.items.length-1;m>=0;m--){var l=this.items[m],n=l.item[0],i=this._intersectsWithPointer(l);if(!i){continue}if(n!=this.currentItem[0]&&this.placeholder[i==1?"next":"prev"]()[0]!=n&&!b.ui.contains(this.placeholder[0],n)&&(this.options.type=="semi-dynamic"?!b.ui.contains(this.element[0],n):true)){this.direction=i==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(l)){this.options.sortIndicator.call(this,k,l)}else{break}this._trigger("change",k,this._uiHash());break}}this._contactContainers(k);if(b.ui.ddmanager){b.ui.ddmanager.drag(this,k)}this._trigger("sort",k,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(h,g){if(!h){return}if(b.ui.ddmanager&&!this.options.dropBehaviour){b.ui.ddmanager.drop(this,h)}if(this.options.revert){var a=this;var f=a.placeholder.offset();a.reverting=true;b(this.helper).animate({left:f.left-this.offset.parent.left-a.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-a.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){a._clear(h)})}else{this._clear(h,g)}return false},cancel:function(){var a=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass(this.options.cssNamespace+"-sortable-helper")}else{this.currentItem.show()}for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("deactivate",null,a._uiHash(this));if(this.containers[d].containerCache.over){this.containers[d]._trigger("out",null,a._uiHash(this));this.containers[d].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}b.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){b(this.domPosition.prev).after(this.currentItem)}else{b(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(e){var a=this._getItemsAsjQuery(e&&e.connected);var f=[];e=e||{};b(a).each(function(){var c=(b(e.item||this).attr(e.attribute||"id")||"").match(e.expression||(/(.+)[-=_](.+)/));if(c){f.push((e.key||c[1]+"[]")+"="+(e.key&&e.expression?c[1]:c[2]))}});return f.join("&")},toArray:function(e){var a=this._getItemsAsjQuery(e&&e.connected);var f=[];e=e||{};a.each(function(){f.push(b(e.item||this).attr(e.attribute||"id")||"")});return f},_intersectsWith:function(p){var w=this.positionAbs.left,x=w+this.helperProportions.width,q=this.positionAbs.top,r=q+this.helperProportions.height;var v=p.left,y=v+p.width,l=p.top,s=l+p.height;var a=this.offset.click.top,t=this.offset.click.left;var u=(q+a)>l&&(q+a)<s&&(w+t)>v&&(w+t)<y;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>p[this.floating?"width":"height"])){return u}else{return(v<w+(this.helperProportions.width/2)&&x-(this.helperProportions.width/2)<y&&l<q+(this.helperProportions.height/2)&&r-(this.helperProportions.height/2)<s)}},_intersectsWithPointer:function(k){var j=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,k.top,k.height),l=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,k.left,k.width),h=j&&l,a=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();if(!h){return false}return this.floating?(((i&&i=="right")||a=="down")?2:1):(a&&(a=="down"?2:1))},_intersectsWithSides:function(h){var j=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,h.top+(h.height/2),h.height),i=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,h.left+(h.width/2),h.width),a=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(this.floating&&g){return((g=="right"&&i)||(g=="left"&&!i))}else{return a&&((a=="down"&&j)||(a=="up"&&!j))}},_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()},_getItemsAsjQuery:function(r){var a=this;var m=[];var o=[];if(this.options.connectWith&&r){var j=this.options.connectWith.constructor==String?[this.options.connectWith]:this.options.connectWith;for(var p=j.length-1;p>=0;p--){var i=b(j[p]);for(var q=i.length-1;q>=0;q--){var n=b.data(i[q],"sortable");if(n&&n!=this&&!n.options.disabled){o.push([b.isFunction(n.options.items)?n.options.items.call(n.element):b(n.options.items,n.element).not("."+n.options.cssNamespace+"-sortable-helper"),n])}}}}o.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not("."+this.options.cssNamespace+"-sortable-helper"),this]);for(var p=o.length-1;p>=0;p--){o[p][0].each(function(){m.push(this)})}return b(m)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data(sortable-item)");for(var f=0;f<this.items.length;f++){for(var a=0;a<e.length;a++){if(e[a]==this.items[f].item[0]){this.items.splice(f,1)}}}},_refreshItems:function(x){this.items=[];this.containers=[this];var r=this.items;var a=this;var t=[[b.isFunction(this.options.items)?this.options.items.call(this.element[0],x,{item:this.currentItem}):b(this.options.items,this.element),this]];if(this.options.connectWith){for(var u=this.options.connectWith.length-1;u>=0;u--){var p=b(this.options.connectWith[u]);for(var v=p.length-1;v>=0;v--){var s=b.data(p[v],"sortable");if(s&&s!=this&&!s.options.disabled){t.push([b.isFunction(s.options.items)?s.options.items.call(s.element[0],x,{item:this.currentItem}):b(s.options.items,s.element),s]);this.containers.push(s)}}}}for(var u=t.length-1;u>=0;u--){var q=t[u][1];var w=t[u][0];for(var v=0,j=w.length;v<j;v++){var i=b(w[v]);i.data("sortable-item",q);r.push({item:i,instance:q,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var i=this.items.length-1;i>=0;i--){var h=this.items[i];if(h.instance!=this.currentContainer&&this.currentContainer&&h.item[0]!=this.currentItem[0]){continue}var j=this.options.toleranceElement?b(this.options.toleranceElement,h.item):h.item;if(!a){if(this.options.accurateIntersection){h.width=j.outerWidth();h.height=j.outerHeight()}else{h.width=j[0].offsetWidth;h.height=j[0].offsetHeight}}var g=j.offset();h.left=g.left;h.top=g.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var i=this.containers.length-1;i>=0;i--){var g=this.containers[i].element.offset();this.containers[i].containerCache.left=g.left;this.containers[i].containerCache.top=g.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}}},_createPlaceholder:function(g){var a=g||this,f=a.options;if(!f.placeholder||f.placeholder.constructor==String){var h=f.placeholder;f.placeholder={element:function(){var c=b(document.createElement(a.currentItem[0].nodeName)).addClass(h||a.currentItem[0].className+" "+a.options.cssNamespace+"-sortable-placeholder").removeClass(a.options.cssNamespace+"-sortable-helper")[0];if(!h){c.style.visibility="hidden"}return c},update:function(d,c){if(h&&!f.forcePlaceholderSize){return}if(!c.height()){c.height(a.currentItem.innerHeight()-parseInt(a.currentItem.css("paddingTop")||0,10)-parseInt(a.currentItem.css("paddingBottom")||0,10))}if(!c.width()){c.width(a.currentItem.innerWidth()-parseInt(a.currentItem.css("paddingLeft")||0,10)-parseInt(a.currentItem.css("paddingRight")||0,10))}}}}a.placeholder=b(f.placeholder.element.call(a.element,a.currentItem));a.currentItem.after(a.placeholder);f.placeholder.update(a,a.placeholder)},_contactContainers:function(m){for(var n=this.containers.length-1;n>=0;n--){if(this._intersectsWith(this.containers[n].containerCache)){if(!this.containers[n].containerCache.over){if(this.currentContainer!=this.containers[n]){var i=10000;var j=null;var l=this.positionAbs[this.containers[n].floating?"left":"top"];for(var a=this.items.length-1;a>=0;a--){if(!b.ui.contains(this.containers[n].element[0],this.items[a].item[0])){continue}var k=this.items[a][this.containers[n].floating?"left":"top"];if(Math.abs(k-l)<i){i=Math.abs(k-l);j=this.items[a]}}if(!j&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[n];j?this.options.sortIndicator.call(this,m,j,null,true):this.options.sortIndicator.call(this,m,null,this.containers[n].element,true);this._trigger("change",m,this._uiHash());this.containers[n]._trigger("change",m,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[n]._trigger("over",m,this._uiHash(this));this.containers[n].containerCache.over=1}}else{if(this.containers[n].containerCache.over){this.containers[n]._trigger("out",m,this._uiHash(this));this.containers[n].containerCache.over=0}}}},_createHelper:function(f){var e=this.options;var a=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f,this.currentItem])):(e.helper=="clone"?this.currentItem.clone():this.currentItem);if(!a.parents("body").length){b(e.appendTo!="parent"?e.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==""||e.forceHelperSize){a.width(this.currentItem.width())}if(a[0].style.height==""||e.forceHelperSize){a.height(this.currentItem.height())}return a},_adjustOffsetFromHelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){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&&b.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body&&b.browser.mozilla)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.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 f=this.options;if(f.containment=="parent"){f.containment=this.helper[0].parentNode}if(f.containment=="document"||f.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b(f.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)){var h=b(f.containment)[0];var g=b(f.containment).offset();var a=(b(h).css("overflow")!="hidden");this.containment=[g.left+(parseInt(b(h).css("borderLeftWidth"),10)||0)+(parseInt(b(h).css("paddingLeft"),10)||0)-this.margins.left,g.top+(parseInt(b(h).css("borderTopWidth"),10)||0)+(parseInt(b(h).css("paddingTop"),10)||0)-this.margins.top,g.left+(a?Math.max(h.scrollWidth,h.offsetWidth):h.offsetWidth)-(parseInt(b(h).css("borderLeftWidth"),10)||0)-(parseInt(b(h).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,g.top+(a?Math.max(h.scrollHeight,h.offsetHeight):h.offsetHeight)-(parseInt(b(h).css("borderTopWidth"),10)||0)-(parseInt(b(h).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(j,d){if(!d){d=this.position}var l=j=="absolute"?1:-1;var k=this.options,a=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(a[0].tagName);return{top:(d.top+this.offset.relative.top*l+this.offset.parent.top*l-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:a.scrollTop()))*l),left:(d.left+this.offset.relative.left*l+this.offset.parent.left*l-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:a.scrollLeft())*l)}},_generatePosition:function(n){var k=this.options,a=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var o=n.pageX;var p=n.pageY;if(this.originalPosition){if(this.containment){if(n.pageX-this.offset.click.left<this.containment[0]){o=this.containment[0]+this.offset.click.left}if(n.pageY-this.offset.click.top<this.containment[1]){p=this.containment[1]+this.offset.click.top}if(n.pageX-this.offset.click.left>this.containment[2]){o=this.containment[2]+this.offset.click.left}if(n.pageY-this.offset.click.top>this.containment[3]){p=this.containment[3]+this.offset.click.top}}if(k.grid){var l=this.originalPageY+Math.round((p-this.originalPageY)/k.grid[1])*k.grid[1];p=this.containment?(!(l-this.offset.click.top<this.containment[1]||l-this.offset.click.top>this.containment[3])?l:(!(l-this.offset.click.top<this.containment[1])?l-k.grid[1]:l+k.grid[1])):l;var m=this.originalPageX+Math.round((o-this.originalPageX)/k.grid[0])*k.grid[0];o=this.containment?(!(m-this.offset.click.left<this.containment[0]||m-this.offset.click.left>this.containment[2])?m:(!(m-this.offset.click.left<this.containment[0])?m-k.grid[0]:m+k.grid[0])):m}}return{top:(p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(j?0:a.scrollTop()))),left:(o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:a.scrollLeft()))}},_rearrange:function(h,i,l,j){l?l[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var k=this,a=this.counter;window.setTimeout(function(){if(a==k.counter){k.refreshPositions(!j)}},0)},_clear:function(i,h){this.reverting=false;var g=[],a=this;if(!this._noFinalSort){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var j in this._storedCSS){if(this._storedCSS[j]=="auto"||this._storedCSS[j]=="static"){this._storedCSS[j]=""}}this.currentItem.css(this._storedCSS).removeClass(this.options.cssNamespace+"-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!h){g.push(function(c){this._trigger("receive",c,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not("."+this.options.cssNamespace+"-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!h){g.push(function(c){this._trigger("update",c,this._uiHash())})}if(!b.ui.contains(this.element[0],this.currentItem[0])){if(!h){g.push(function(c){this._trigger("remove",c,this._uiHash())})}for(var j=this.containers.length-1;j>=0;j--){if(b.ui.contains(this.containers[j].element[0],this.currentItem[0])&&!h){g.push((function(c){return function(d){c._trigger("receive",d,this._uiHash(this))}}).call(this,this.containers[j]));g.push((function(c){return function(d){c._trigger("update",d,this._uiHash(this))}}).call(this,this.containers[j]))}}}for(var j=this.containers.length-1;j>=0;j--){if(!h){g.push((function(c){return function(d){c._trigger("deactivate",d,this._uiHash(this))}}).call(this,this.containers[j]))}if(this.containers[j].containerCache.over){g.push((function(c){return function(d){c._trigger("out",d,this._uiHash(this))}}).call(this,this.containers[j]));this.containers[j].containerCache.over=0}}if(this._storedCursor){b("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedCursor)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!h){this._trigger("beforeStop",i,this._uiHash());for(var j=0;j<g.length;j++){g[j].call(this,i)}this._trigger("stop",i,this._uiHash())}return false}if(!h){this._trigger("beforeStop",i,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!h){for(var j=0;j<g.length;j++){g[j].call(this,i)}this._trigger("stop",i,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(b.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(d){var a=d||this;return{helper:a.helper,placeholder:a.placeholder||b([]),position:a.position,absolutePosition:a.positionAbs,offset:a.positionAbs,item:a.currentItem,sender:d?d.element:null}}}));b.extend(b.ui.sortable,{getter:"serialize toArray",version:"1.6rc6",defaults:{accurateIntersection:true,appendTo:"parent",cancel:":input,option",connectWith:false,cssNamespace:"ui",delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,handle:false,helper:"original",items:"> *",placeholder:false,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,sortIndicator:b.ui.sortable.prototype._rearrange,tolerance:"intersect",zIndex:1000}})})(jQuery);(function($){function toIntegersAtLease(n){return n<10?"0"+n:n}Date.prototype.toJSON=function(date){return this.getUTCFullYear()+"-"+toIntegersAtLease(this.getUTCMonth())+"-"+toIntegersAtLease(this.getUTCDate())};var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};$.quoteString=function(string){if(escapeable.test(string)){return'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+string+'"'};$.toJSON=function(o,compact){var type=typeof(o);if(type=="undefined"){return"undefined"}else{if(type=="number"||type=="boolean"){return o+""}else{if(o===null){return"null"}}}if(type=="string"){return $.quoteString(o)}if(type=="object"&&typeof o.toJSON=="function"){return o.toJSON(compact)}if(type!="function"&&typeof(o.length)=="number"){var ret=[];for(var i=0;i<o.length;i++){ret.push($.toJSON(o[i],compact))}if(compact){return"["+ret.join(",")+"]"}else{return"["+ret.join(", ")+"]"}}if(type=="function"){throw new TypeError("Unable to convert object of type 'function' to json.")}var ret=[];for(var k in o){var name;type=typeof(k);if(type=="number"){name='"'+k+'"'}else{if(type=="string"){name=$.quoteString(k)}else{continue}}var val=$.toJSON(o[k],compact);if(typeof(val)!="string"){continue}if(compact){ret.push(name+":"+val)}else{ret.push(name+": "+val)}}return"{"+ret.join(", ")+"}"};$.compactJSON=function(o){return $.toJSON(o,true)};$.evalJSON=function(src){return eval("("+src+")")};$.secureEvalJSON=function(src){var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,"@");filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered)){return eval("("+src+")")}else{throw new SyntaxError("Error parsing JSON, source is not valid.")}}})(jQuery);window.dhtmlHistory={isIE:false,isOpera:false,isSafari:false,isKonquerer:false,isGecko:false,isSupported:false,create:function(h){var g=this;var f=navigator.userAgent.toLowerCase();var e=navigator.platform.toLowerCase();var d=navigator.vendor||"";if(d==="KDE"){this.isKonqueror=true;this.isSupported=false}else{if(typeof window.opera!=="undefined"){this.isOpera=true;this.isSupported=true}else{if(typeof document.all!=="undefined"){this.isIE=true;this.isSupported=true}else{if(d.indexOf("Apple Computer, Inc.")>-1){this.isSafari=true;this.isSupported=(e.indexOf("mac")>-1)}else{if(f.indexOf("gecko")!=-1){this.isGecko=true;this.isSupported=true}}}}}window.historyStorage.setup(h);if(this.isSafari){this.createSafari()}else{if(this.isOpera){this.createOpera()}}var c=this.getCurrentLocation();this.currentLocation=c;if(this.isIE){this.createIE(c)}var b=function(){g.firstLoad=null};this.addEventListener(window,"unload",b);if(this.isIE){this.ignoreLocationChange=true}else{if(!historyStorage.hasKey(this.PAGELOADEDSTRING)){this.ignoreLocationChange=true;this.firstLoad=true;historyStorage.put(this.PAGELOADEDSTRING,true)}else{this.ignoreLocationChange=false;this.fireOnNewListener=true}}var a=function(){g.checkLocation()};setInterval(a,100)},initialize:function(){if(this.isIE){if(!historyStorage.hasKey(this.PAGELOADEDSTRING)){this.fireOnNewListener=false;this.firstLoad=true;historyStorage.put(this.PAGELOADEDSTRING,true)}else{this.fireOnNewListener=true;this.firstLoad=false}}},addListener:function(a){this.listener=a;if(this.fireOnNewListener){this.fireHistoryEvent(this.currentLocation);this.fireOnNewListener=false}},addEventListener:function(c,b,a){if(c.addEventListener){c.addEventListener(b,a,false)}else{if(c.attachEvent){c.attachEvent("on"+b,function(){a(window.event)})}}},add:function(b,a){if(this.isSafari){b=this.removeHash(b);historyStorage.put(b,a);this.currentLocation=b;window.location.hash=b;this.putSafariState(b)}else{var d=this;var c=function(){if(d.currentWaitTime>0){d.currentWaitTime=d.currentWaitTime-d.waitTime}b=d.removeHash(b);if(document.getElementById(b)&&d.debugMode){var f="Exception: History locations can not have the same value as _any_ IDs that might be in the document, due to a bug in IE; please ask the developer to choose a history location that does not match any HTML IDs in this document. The following ID is already taken and cannot be a location: "+b;throw new Error(f)}historyStorage.put(b,a);d.ignoreLocationChange=true;d.ieAtomicLocationChange=true;d.currentLocation=b;window.location.hash=b;if(d.isIE){d.iframe.src="blank.html?"+b}d.ieAtomicLocationChange=false};window.setTimeout(c,this.currentWaitTime);this.currentWaitTime=this.currentWaitTime+this.waitTime}},isFirstLoad:function(){return this.firstLoad},getVersion:function(){return"0.6"},getCurrentLocation:function(){var a=(this.isSafari?this.getSafariState():this.getCurrentHash());return a},getCurrentHash:function(){var b=window.location.href;var a=b.indexOf("#");return(a>=0?b.substr(a+1):"")},PAGELOADEDSTRING:"DhtmlHistory_pageLoaded",listener:null,waitTime:200,currentWaitTime:0,currentLocation:null,iframe:null,safariHistoryStartPoint:null,safariStack:null,safariLength:null,ignoreLocationChange:null,fireOnNewListener:null,firstLoad:null,ieAtomicLocationChange:null,createIE:function(d){this.waitTime=400;var c=(historyStorage.debugMode?"width: 800px;height:80px;border:1px solid black;":historyStorage.hideStyles);var b="rshHistoryFrame";var a='<iframe frameborder="0" id="'+b+'" style="'+c+'" src="blank.html?'+d+'"></iframe>';document.write(a);this.iframe=document.getElementById(b)},createOpera:function(){this.waitTime=400;var a='<img src="javascript:location.href=\'javascript:dhtmlHistory.checkLocation();\';" style="'+historyStorage.hideStyles+'" />';document.write(a)},createSafari:function(){var f="rshSafariForm";var e="rshSafariStack";var d="rshSafariLength";var c=historyStorage.debugMode?historyStorage.showStyles:historyStorage.hideStyles;var b=(historyStorage.debugMode?"width:800px;height:20px;border:1px solid black;margin:0;padding:0;":historyStorage.hideStyles);var a='<form id="'+f+'" style="'+c+'"><input type="text" style="'+b+'" id="'+e+'" value="[]"/><input type="text" style="'+b+'" id="'+d+'" value=""/></form>';document.write(a);this.safariStack=document.getElementById(e);this.safariLength=document.getElementById(d);if(!historyStorage.hasKey(this.PAGELOADEDSTRING)){this.safariHistoryStartPoint=history.length;this.safariLength.value=this.safariHistoryStartPoint}else{this.safariHistoryStartPoint=this.safariLength.value}},getSafariStack:function(){var a=this.safariStack.value;return historyStorage.fromJSON(a)},getSafariState:function(){var a=this.getSafariStack();var b=a[history.length-this.safariHistoryStartPoint-1];return b},putSafariState:function(b){var a=this.getSafariStack();a[history.length-this.safariHistoryStartPoint]=b;this.safariStack.value=historyStorage.toJSON(a)},fireHistoryEvent:function(b){var a=historyStorage.get(b);this.listener.call(null,b,a)},checkLocation:function(){if(!this.isIE&&this.ignoreLocationChange){this.ignoreLocationChange=false;return}if(!this.isIE&&this.ieAtomicLocationChange){return}var a=this.getCurrentLocation();if(a==this.currentLocation){return}this.ieAtomicLocationChange=true;if(this.isIE&&this.getIframeHash()!=a){this.iframe.src="blank.html?"+a}else{if(this.isIE){return}}this.currentLocation=a;this.ieAtomicLocationChange=false;this.fireHistoryEvent(a)},getIframeHash:function(){var b=this.iframe.contentWindow.document;var a=String(b.location.search);if(a.length==1&&a.charAt(0)=="?"){a=""}else{if(a.length>=2&&a.charAt(0)=="?"){a=a.substring(1)}}return a},removeHash:function(b){var a;if(b===null||b===undefined){a=null}else{if(b===""){a=""}else{if(b.length==1&&b.charAt(0)=="#"){a=""}else{if(b.length>1&&b.charAt(0)=="#"){a=b.substring(1)}else{a=b}}}}return a},iframeLoaded:function(b){if(this.ignoreLocationChange){this.ignoreLocationChange=false;return}var a=String(b.search);if(a.length==1&&a.charAt(0)=="?"){a=""}else{if(a.length>=2&&a.charAt(0)=="?"){a=a.substring(1)}}window.location.hash=a;this.fireHistoryEvent(a)}};window.historyStorage={setup:function(f){if(typeof f!=="undefined"){if(f.debugMode){this.debugMode=f.debugMode}if(f.toJSON){this.toJSON=f.toJSON}if(f.fromJSON){this.fromJSON=f.fromJSON}}var d="rshStorageForm";var e="rshStorageField";var c=this.debugMode?historyStorage.showStyles:historyStorage.hideStyles;var b=(historyStorage.debugMode?"width: 800px;height:80px;border:1px solid black;":historyStorage.hideStyles);var a='<form id="'+d+'" style="'+c+'"><textarea id="'+e+'" style="'+b+'"></textarea></form>';document.write(a);this.storageField=document.getElementById(e);if(typeof window.opera!=="undefined"){this.storageField.focus()}},put:function(a,b){this.assertValidKey(a);if(this.hasKey(a)){this.remove(a)}this.storageHash[a]=b;this.saveHashTable()},get:function(a){this.assertValidKey(a);this.loadHashTable();var b=this.storageHash[a];if(b===undefined){b=null}return b},remove:function(a){this.assertValidKey(a);this.loadHashTable();delete this.storageHash[a];this.saveHashTable()},reset:function(){this.storageField.value="";this.storageHash={}},hasKey:function(a){this.assertValidKey(a);this.loadHashTable();return(typeof this.storageHash[a]!=="undefined")},isValidKey:function(a){return(typeof a==="string")},showStyles:"border:0;margin:0;padding:0;",hideStyles:"left:-1000px;top:-1000px;width:1px;height:1px;border:0;position:absolute;",debugMode:false,storageHash:{},hashLoaded:false,storageField:null,assertValidKey:function(a){var b=this.isValidKey(a);if(!b&&this.debugMode){throw new Error("Please provide a valid key for window.historyStorage. Invalid key = "+a+".")}},loadHashTable:function(){if(!this.hashLoaded){var a=this.storageField.value;if(a!==""&&a!==null){this.storageHash=this.fromJSON(a);this.hashLoaded=true}}},saveHashTable:function(){this.loadHashTable();var a=this.toJSON(this.storageHash);this.storageField.value=a},toJSON:function(a){return a.toJSONString()},fromJSON:function(a){return a.parseJSON()}};Lang={LayoutSaved:"تم حفظ التغييرات",Okay:"موافق",Settings:"إعدادات",HideSettings:"إخفاء الإعدادات",CloseNews:"أغلق الخبر",ResetLayout:"إستعادة التوزيع الإفتراضي",_LOADING_:"جاري التحميل",LeftArrow:"&#9664;",DownArrow:"&#9660;"};DnD={saveSettingsTimeout:3456,toggle:function(e,b){var c=$("#channel-"+e+"-toggleable");var d=c[0];var a=d.style.display!="none";$(b).toggleClass("dnd-block-toolbox-uncollapse");c.slideToggle("slow");this.saveSettings()},close:function(a){$("#channel-"+a).remove();this.saveSettings()},saveSettingsTOH:0,saveSettings:function(){clearTimeout(this.saveSettingsTOH);this.saveSettingsTOH=setTimeout(this._saveSettings,this.saveSettingsTimeout)},_getChannelsLayout:function(){var b=[];var a="";$(".ui-sortable").each(function(c,d){$(".dnd-block-li",d).each(function(g,e){var f=parseInt(e.id.substr(8));a+=("columns["+c+"]["+g+"][id]="+f)+"&";a+=("columns["+c+"]["+g+"][collapsed]="+(($("#channel-"+f+"-toggleable",e)[0].style.display=="none")?"1":"0")+"&")})});return a},_lastSentParams:"",_saveSettings:function(){var a=DnD._getChannelsLayout();if(a==DnD._lastSentParams){return}DnD._lastSentParams=a;$.post("ajax.php?do=save-layout",a,function(){Notifier.add(Lang.LayoutSaved)})},disableEnable:function(){$(".ui-sortable").each(function(a,b){$("#"+b.id).sortable("option","cancel",($(b).children().length==1)?".dnd-block-handle":":input,button")})}};DnD.init=function(){if(!$("#breadcrumb-content .breadcrumb-xtra").length){var b=document.createElement("a");b.href="javascript:SNS.showSettings()";b.appendChild(document.createTextNode(Lang.Settings));b.className="breadcrumb-xtra";$("#breadcrumb-content").prepend(b)}if($("#container-center").length){function a(c){return{connectWith:c,containment:"#page-content",revert:true,delay:111,placeholder:"dnd-block-placeholder",forcePlaceholderSize:true,handle:".dnd-block-handle",cursor:"move",opacity:0.6,start:function(){clearTimeout(DnD.saveSettingsTOH)},beforeStop:function(){DnD.saveSettings();DnD.disableEnable()},stop:function(e,d){d.item.animate({opacity:1},456);DnD.saveSettings()}}}$("#list-left").sortable(a(["#list-center","#list-right"]));$("#list-center").sortable(a(["#list-left","#list-right"]));$("#list-right").sortable(a(["#list-left","#list-center"]));DnD._lastSentParams=DnD._getChannelsLayout();DnD.disableEnable()}};DnD.addResetButton=function(){if($("#container-center").length&&!$("#settings .hp-reset-link").length){var a=document.createElement("a");a.href="?sort-reset=yes";a.appendChild(document.createTextNode(Lang.ResetLayout));a.className="hp-reset-link breadcrumb-xtra";$("#settings .in").prepend(a)}};Notifier={newNotificationsDelay:33333,Settings_ImpNews:{PauseDelay:5555,Delay:12345,hideSpeed:2000,showSpeed:1500},counter:0,LastTimeGotNotifications:0,add:function(c,b){if(!$("#notifications-container")[0].childNodes.length){$("#notifications-container").show("fast")}if(!b){b=3000}var d=this.counter++;var a=document.createElement("div");a.className="notification-noti";a.id="notification-noti-"+d;a.style.display="none";$(a).append(c);AutoAjax.applyOn($(a));$("#notifications-container").append(a);$(a).show("slow");setTimeout("Notifier.remove("+d+");",b)},remove:function(a){$("#notification-noti-"+a).hide("slow",function(){$("#notification-noti-"+a).remove();if(!$("#notifications-container")[0].childNodes.length){$("#notifications-container").hide("slow")}})},overallOverlayBg:false,overallOverlayContainer:false,addOverallMessage:function(b){if(!Notifier.overallOverlayBg){Notifier.overallOverlayBg=document.createElement("div");Notifier.overallOverlayBg.id="overall-overlay-bg";$(Notifier.overallOverlayBg).css({height:$(document).height(),opacity:0});Notifier.overallOverlayContainer=document.createElement("div");Notifier.overallOverlayContainer.id="overall-overlay-container";document.body.appendChild(Notifier.overallOverlayBg);document.body.appendChild(Notifier.overallOverlayContainer)}$(Notifier.overallOverlayBg).css({display:""});$(Notifier.overallOverlayContainer).css({display:""});$(Notifier.overallOverlayBg).animate({opacity:0.01},1000);var c=document.createElement("div");c.innerHTML=b;c.className="overall-overlay-block";var a=document.createElement("a");a.className="block-with-rounded-corners overlay-close-button";a.innerHTML='<span style="clear: none;" class="corners-top"><span></span></span>'+Lang.CloseNews+'<span style="clear: none;" class="corners-bottom"><span></span></span>';a.href="javascript:void(0)";a.onclick=function(){$(c).slideUp(700);var d=$(".overall-overlay-block",Notifier.overallOverlayContainer).length==1;if(d){$(Notifier.overallOverlayBg).animate({opacity:0},703)}setTimeout(function(){$(c).remove();if(d){$(Notifier.overallOverlayContainer).css({display:"none"});$(Notifier.overallOverlayBg).css({display:"none"})}},703)};c.appendChild(a);AutoAjax.applyOn($(c));Notifier.overallOverlayContainer.appendChild(c)},checkNewNotificationsSeenFlash:[],checkNewNotifications:function(){$.get("ajax.php?do=get-notifications&since="+this.LastTimeGotNotifications+"&seen="+Notifier.checkNewNotificationsSeenFlash.join(","),"",function(a){Notifier.LastTimeGotNotifications=parseInt($("notifications",a).attr("servertime"));$("notification",a).each(function(b,c){switch(parseInt($(c).attr("importancy"))){case 3:Notifier.addOverallMessage($(c).text());break;default:Notifier.add($(c).text(),parseInt($(c).attr("stays")));break}Notifier.checkNewNotificationsSeenFlash.push(parseInt($(c).attr("id")))});setTimeout("Notifier.checkNewNotifications()",Notifier.newNotificationsDelay)},"xml")},impNewsTemplate:"",impNewsTotal:1,impNewsNextId:0,impNewsPause:false,impNewsMoveReset:function(b,a){if(a){$("#site-important-news-container .site-important-news").eq(b).css({opacity:0,display:"block",left:"500px",top:"0pt"})}else{$("#site-important-news-container .site-important-news").eq(b).css({opacity:0,display:"block",left:"0pt",top:"-150px"})}},isCurrentlyMoving:false,impNewsMoveNext:function(d){if(Notifier.isCurrentlyMoving){return}Notifier.isCurrentlyMoving=true;if(d){clearTimeout(Notifier.movingNextTimeoutHandle)}if(!d&&Notifier.impNewsPause){Notifier.movingNextTimeoutHandle=setTimeout("Notifier.impNewsMoveNext()",Notifier.Settings_ImpNews.PauseDelay);return}var b=Notifier.impNewsNextId+1;if(b>Notifier.impNewsTotal-1){b=0}var c=d?Notifier.Settings_ImpNews.hideSpeed/3:Notifier.Settings_ImpNews.hideSpeed;$("#site-important-news-container .site-important-news").eq(Notifier.impNewsNextId).animate({left:500,opacity:0},c);Notifier.impNewsNextId++;if(Notifier.impNewsNextId>Notifier.impNewsTotal-1){Notifier.impNewsNextId=0}$("#site-important-news-container .site-important-news").eq(b).css({display:"block",opacity:0});var a=d?Notifier.Settings_ImpNews.showSpeed/3:Notifier.Settings_ImpNews.showSpeed;Notifier.impNewsMoveReset(b,false);$("#site-important-news-container .site-important-news").eq(b).animate({top:0,opacity:1},a);setTimeout(function(){Notifier.isCurrentlyMoving=false},Math.max(c,a));Notifier.movingNextTimeoutHandle=setTimeout(function(){Notifier.impNewsMoveNext()},Notifier.Settings_ImpNews.Delay)},initial:function(){$.get("ajax.php?do=init","",function(a){Notifier.LastTimeGotNotifications=parseInt($("init",a).attr("servertime"));Notifier.impNewsTemplate=$("template",a).text();$("impnews news",a).each(function(c,e){Notifier.impNewsTotal++;var b=Notifier.impNewsTemplate;b=b.replace("{BLOCK.THUMB_SRC}",(new Image()).src=$(e).attr("thumb_src"));b=b.replace("{BLOCK.TITLE}",$(e).attr("title"));b=b.replace("{BLOCK.BRIEF}",$(e).attr("brief"));b=b.replace("{BLOCK.NEWS_ID}",$(e).attr("news_id"));var d=$(b);d.css({display:"none",top:-150});$("#site-important-news-container").append(d)});AutoAjax.applyOn($("#site-important-news-container"));if(Notifier.impNewsTotal>1){Notifier.movingNextTimeoutHandle=setTimeout("Notifier.impNewsMoveNext()",Notifier.Settings_ImpNews.Delay)}Notifier.checkNewNotifications()},"xml");$("#site-important-news-container").bind("mouseenter mouseleave",function(a){Notifier.impNewsPause=!Notifier.impNewsPause})},movingNextTimeoutHandle:false,forcedNext:function(){Notifier.impNewsMoveNext(true)},forcedPrev:function(){if(Notifier.isCurrentlyMoving){return}Notifier.isCurrentlyMoving=true;clearTimeout(Notifier.movingNextTimeoutHandle);var b=Notifier.impNewsNextId-1;if(b==-1){b=Notifier.impNewsTotal-1}var c=Notifier.Settings_ImpNews.hideSpeed/3;$("#site-important-news-container .site-important-news").eq(Notifier.impNewsNextId).animate({top:-150,opacity:0},c);Notifier.impNewsNextId--;if(Notifier.impNewsNextId==-1){Notifier.impNewsNextId=Notifier.impNewsTotal-1}$("#site-important-news-container .site-important-news").eq(b).css({display:"block",opacity:0});Notifier.impNewsMoveReset(b,true);var a=Notifier.Settings_ImpNews.showSpeed/3;$("#site-important-news-container .site-important-news").eq(b).animate({left:0,opacity:1},a);setTimeout(function(){Notifier.isCurrentlyMoving=false},Math.max(c,a));Notifier.movingNextTimeoutHandle=setTimeout(function(){Notifier.impNewsMoveNext()},Notifier.Settings_ImpNews.Delay)}};Marquee={};Marquee.delay=3333;Marquee.charDelay=31;Marquee.marquees=[];Marquee.replaceAll=function(){$("marquee").each(function(a,b){Marquee.marquees[a]={};Marquee.marquees[a].aElements=[];$("a",b).each(function(c,d){var e=$(d).text();Marquee.marquees[a].aElements.push({href:d.href,text:e,textLength:e.length})});Marquee.marquees[a].replacingDiv=document.createElement("div");Marquee.marquees[a].replacingDiv.id=b.id;Marquee.marquees[a].replacingLink=document.createElement("a");Marquee.marquees[a].replacingLink.className="char-marquee";Marquee.marquees[a].replacingLinkTextHolder=document.createElement("span");Marquee.marquees[a].replacingLinkBlinkinChar=document.createElement("blink");Marquee.marquees[a].replacingLinkBlinkinChar.innerHTML="_";Marquee.marquees[a].replacingLink.appendChild(Marquee.marquees[a].replacingLinkTextHolder);Marquee.marquees[a].replacingLink.appendChild(Marquee.marquees[a].replacingLinkBlinkinChar);Marquee.marquees[a].replacingDiv.appendChild(Marquee.marquees[a].replacingLink);$(b).replaceWith(Marquee.marquees[a].replacingDiv);$(Marquee.marquees[a].replacingDiv).next().remove();$(Marquee.marquees[a].replacingDiv).append('<br clear="all" />');Marquee.marquees[a].current=0;Marquee.marquees[a].mouseOver=false;Marquee.marquees[a].currentChar=0;$(Marquee.marquees[a].replacingDiv).bind("mouseenter mouseleave",function(c){Marquee.marquees[a].mouseOver=!Marquee.marquees[a].mouseOver});Marquee.showNext(a)})};Marquee.showNext=function(b){var a=Marquee.marquees[b];if(a.mouseOver){setTimeout("Marquee.showNext("+b+")",Marquee.delay);return}if(!a.aElements.length){return}a.replacingLink.href=a.aElements[a.current].href;a.replacingLink.title=a.aElements[a.current].text;$(a.replacingLinkTextHolder).text("");Marquee.showNextChar(b)};Marquee.showNextChar=function(c){var a=Marquee.marquees[c];var b=a.aElements[a.current];if(a.currentChar<b.textLength){$(a.replacingLinkTextHolder).text($(a.replacingLinkTextHolder).text()+b.text.substr(a.currentChar++,1));setTimeout("Marquee.showNextChar("+c+")",Marquee.charDelay)}else{a.current++;if(a.current>=a.aElements.length){a.current=0}a.currentChar=0;setTimeout("Marquee.showNext("+c+")",Marquee.delay)}};AutoAjax={};AutoAjax.Settings={savePlaceholder:"",containerId:"page-content",hrefRegX:""};AutoAjax.loadingPlaceholder=false;AutoAjax.basePath=false;AutoAjax.handleClick=function(){AutoAjax.loadPage(this.href);return false};AutoAjax.applyOn=function(a){if(!AutoAjax.initd){return}$("a",a).each(function(b,c){if(!c.target&&AutoAjax.Settings.hrefRegX.test(c.href)){c.onclick=AutoAjax.handleClick}})};if($.browser.msie||$.browser.opera){historyStorage.hideStyles=historyStorage.hideStyles.replace("left:-1000px;","left:0px;")}else{historyStorage.hideStyles=historyStorage.hideStyles.replace("left:-1000px;","right:-1000px;")}window.dhtmlHistory.create({toJSON:function(a){return $.toJSON(a)},fromJSON:function(a){return $.evalJSON(a)}});AutoAjax.initd=false;AutoAjax.init=function(){dhtmlHistory.initialize();dhtmlHistory.addListener(AutoAjax.loadInside);AutoAjax.loadingPlaceholder=document.createElement("div");AutoAjax.loadingPlaceholder.className="aujax-load-placeholder";var a=document.createElement("span");a.innerHTML=Lang._LOADING_;AutoAjax.loadingPlaceholder.appendChild(a);$("#"+AutoAjax.Settings.containerId).before(AutoAjax.loadingPlaceholder);AutoAjax.basePath=location.href;if(AutoAjax.basePath.indexOf("#")!=-1){AutoAjax.basePath=AutoAjax.basePath.substr(0,location.href.indexOf("#"))}if(AutoAjax.basePath.indexOf("?")!=-1){AutoAjax.basePath=AutoAjax.basePath.substr(0,location.href.indexOf("?"))}AutoAjax.Settings.hrefRegX=new RegExp(AutoAjax.basePath+"(\\?)?(path=[\\/\\w]+)?$");var c="";if(location.hash.length>1){var b=AutoAjax.basePath+decodeURIComponent(location.hash.substr(1+AutoAjax.Settings.savePlaceholder.length));var d=location.href;if(d.indexOf("#")!=-1){d=d.substr(0,location.href.indexOf("#"))}if(b!=d){AutoAjax.loadPage(b)}}AutoAjax.initd=true;AutoAjax.applyOn(document)};AutoAjax.loadPage=function(a,b){$("#"+AutoAjax.Settings.containerId).slideUp("fast");$(AutoAjax.loadingPlaceholder).slideDown();$.get(a,{bare:"y"},function(c){var d={};d.title=$("page",c).attr("title");var e=a;if(e.indexOf(AutoAjax.basePath)!=-1){e=e.substr(AutoAjax.basePath.length)}$(AutoAjax.loadingPlaceholder).slideUp();d.elementsToChange=[];$("page elem",c).each(function(g,i){var h=$(i).text();var j=$(i).attr("id");switch(j){case AutoAjax.Settings.containerId:h+='<br class="homepage-breaker" />';break}d.elementsToChange[j]=h});if(!e){e="?"}var f=AutoAjax.Settings.savePlaceholder+(e);if(!b){dhtmlHistory.add(f,d)}else{}AutoAjax.loadInside(f,d);$("#"+AutoAjax.Settings.containerId).slideDown()},"xml")};AutoAjax.loadInside=function(a,b){if(!b||!b.elementsToChange[AutoAjax.Settings.containerId]){AutoAjax.loadPage(AutoAjax.basePath+a,true)}else{document.title=b.title;for(var c in b.elementsToChange){$("#"+c).html(b.elementsToChange[c]);AutoAjax.applyOn($("#"+c))}DnD.init()}};SNS={};SNS.sy=": )";SNS.s2f_dv=false;SNS.s2f=function(a){if(!SNS.s2f_dv){SNS.s2f_dv=document.createElement("DIV");SNS.s2f_dv.innerHTML='<form enctype="application/x-www-form-urlencoded" action="'+a.href+'" method="post"> <div class="core-form-fieldset"> <table width="100%"> <tbody><tr class="form-row_even"> <td nowrap="nowrap" class="core-form-label-td"> <label for="addcomment[0][email]">البريد الالكتروني</label> </td> <td class="core-form-field-td"> <input type="text" id="addcomment[0][email]" class="form-input form-input-reqd" value="" name="addcomment[0][email]"/> </td> </tr> </tbody></table> </div> <div> <input type="submit" class="form-lowerbutton" value="إرسال"/> </div> <input type="hidden" value="yes" name="addcomment[__s]"/> </form>';SNS.s2f_dv.style.display="none";$(a).parent().append(SNS.s2f_dv)}$(SNS.s2f_dv).slideToggle("slow");return false};SNS.prn=function(a){window.open(a.href,"_print","height=700,resizable=yes,scrollbars=yes, width=700");return false};SNS.settings_dv=false;SNS.styleColor={magenta:"#d20048",darkblue:"#003f87",blue:"#0d60c6",cyan:"#009ad2",green:"#009844",brown:"#635e35",lime:"#81a71a",pink:"#ae2393",red:"#c1390b"};SNS.controlFontSizes=[1,1.3,1.6];SNS.settings={active:{},saved:{}};SNS.saveSettings=function(){var b="";for(var a in SNS.settings.active){if(SNS.settings.active[a]!=SNS.settings.saved[a]){b+=a+"="+SNS.settings.active[a]+"&"}}if(b){$.post("ajax.php?do=save-prefs",b,function(){Notifier.add(Lang.LayoutSaved)});for(var a in SNS.settings.active){SNS.settings.saved[a]=SNS.settings.active[a]}}SNS.showSettings()};SNS.showSettings=function(){if(!SNS.settings_dv){SNS.settings_dv=$('<div id="settings"><div class="in"></div></div>')[0];SNS.settings_dv.style.display="none";StyleSwitcher.init();var e=$('<div id="color-switch" class="floats-left"><div class="writing">اللون: </div></div>');for(var b in SNS.styleColor){var d=document.createElement("A");if(StyleSwitcher.currStylesheet==b){d.className="color-button color-button-selected";SNS.settings.active.color=SNS.settings.saved.color=b;StyleSwitcher.prevElem=d}else{d.className="color-button";$('<link disabled="disabled" title="'+b+'" rel="alternate stylesheet" href="Templates/News/clr/'+b+'.css"/>').appendTo($("head"))}d.href="javascript:void(0)";d.color=b;d.onclick=StyleSwitcher.switchColor;d.style.background=SNS.styleColor[b];e.prepend(d)}StyleSwitcher.avaiableStylesheets=[];StyleSwitcher.init();$(".in",SNS.settings_dv).append(e);var f=$('<div id="fontsize-switch" class="floats-left"><div class="writing">حجم الخط: </div></div>');SNS.settings.active["font-size"]=SNS.settings.saved["font-size"]=$("body")[0].style.fontSize?parseFloat($("body")[0].style.fontSize):1;$(".in",SNS.settings_dv).append(a);for(var b=0;b<SNS.controlFontSizes.length;b++){var a=$('<a href="javascript:void(0)"></a>');a[0].fntSize=SNS.controlFontSizes[b];a.addClass("fontsize-button");a.bind("click",StyleSwitcher.switchFontSize);f.prepend(a)}$(".in",SNS.settings_dv).append(f);$(".in",SNS.settings_dv).append($('<div id="save-settings" class="floats-left"><a href="javascript:SNS.saveSettings();">حفظ التغييرات</a></div>'));$(".in",SNS.settings_dv).append($('<br clear="all" />'));$("#breadcrumb-content").after(SNS.settings_dv)}DnD.addResetButton();var c=$(SNS.settings_dv).css("display")=="none";if(c){$(SNS.settings_dv).next().css("background-color","#515254");$("#breadcrumb-content .breadcrumb-xtra").text(Lang.HideSettings)}$(SNS.settings_dv).slideToggle("slow",function(){if(!c){$(SNS.settings_dv).next().css("background-color","#FFF");$("#breadcrumb-content .breadcrumb-xtra").text(Lang.Settings)}})};StyleSwitcher={};StyleSwitcher.avaiableStylesheets=[];StyleSwitcher.currStylesheet="";StyleSwitcher.init=function(){$("head link").each(function(c,a){var b;if(a.getAttribute("rel").indexOf("stylesheet")!=-1&&(b=a.getAttribute("title"))){StyleSwitcher.avaiableStylesheets[b]=a;if(a.getAttribute("rel")=="stylesheet"){StyleSwitcher.currStylesheet=b}}})};StyleSwitcher.prevElem=false;StyleSwitcher.switchColor=function(){StyleSwitcher.setActiveStylesheet(SNS.settings.active.color=this.color);$(this).toggleClass("color-button-selected");if(StyleSwitcher.prevElem){$(StyleSwitcher.prevElem).toggleClass("color-button-selected")}StyleSwitcher.prevElem=this};StyleSwitcher.defaultFontSize=1;StyleSwitcher.currentFontSize=1;StyleSwitcher.switchFontSize=function(){SNS.settings.active["font-size"]=this.fntSize;$("body").css("font-size",this.fntSize+"em")};StyleSwitcher.setActiveStylesheet=function(a){if(StyleSwitcher.currStylesheet==a){return}var d=false;for(var b in StyleSwitcher.avaiableStylesheets){var c=StyleSwitcher.avaiableStylesheets[b];c.disabled=true;if(b==a){d=true;c.rel="stylesheet";c.disabled=false}else{}}StyleSwitcher.currStylesheet=a;if(!d){alert("no such style")}};SNS.loadedBanners=[];SNS.bannerRotateInterval=20000;SNS.activeBannerIndex=false;SNS.loadBanners=function(){var a=parseInt($("#sns-top-ad").attr("rel"));$.get("ajax.php?do=banners&cachenot="+Math.random(),"",function(b){$("ad",b).each(function(c,e){var d={id:(parseInt($(e).attr("id"))),html:$(e).text()};if(d.id==a){SNS.activeBannerIndex=c}SNS.loadedBanners.push(d)});setInterval(SNS.nextBanner,SNS.bannerRotateInterval)},"xml")};SNS.nextBanner=function(){SNS.replaceWithBanner(SNS.activeBannerIndex+1)};SNS.replaceWithBanner=function(a){if(typeof(SNS.loadedBanners[a])=="undefined"){a=0}$("#sns-top-ad").replaceWith(SNS.loadedBanners[a].html);SNS.activeBannerIndex=a};$(document).ready(function(){DnD.init();Notifier.initial();Marquee.replaceAll();SNS.loadBanners();SNS.showSettings()});$(document).ready(function(){if($.browser.msie){$("#header-bar").prepend('<a title="إجعلنا صفحتك الرئيسية" href="javascript:Util.setAsHomePage();" class="hdr-bar-icon" style="background-position: 5px 0;"></a>');$("#header-bar").width(340);$("#search").width(189);$("#search-q").width(119)}else{$("#header-bar").width(330);$("#search").width(205);$("#search-q").width(135)}});Util={};Util.setAsHomePage=function(){document.body.style.behavior="url(#default#homepage)";document.body.setHomePage(window.location.href)};Util.addToFav=function(){var a=location.href;var b=document.title;if($.browser.msie){window.external.AddFavorite(a,b)}else{if($.browser.mozilla){window.sidebar.addPanel(b,a,"")}else{}}};var VKI_attach,VKI_close;function VKI_buildKeyboardInputs(){var self=this;this.VKI_version="1.36";this.VKI_showVersion=false;this.VKI_target=false;this.VKI_shift=this.VKI_shiftlock=false;this.VKI_altgr=this.VKI_altgrlock=false;this.VKI_dead=false;this.VKI_deadkeysOn=false;this.VKI_kts=this.VKI_kt="\u0639\u0631\u0628\u064a";this.VKI_langAdapt=true;this.VKI_size=3;this.VKI_sizeAdj=true;this.VKI_clearPasswords=false;this.VKI_imageURI="./Templates/News/keyboard.png";this.VKI_clickless=0;this.VKI_keyCenter=3;this.VKI_isIE=
/*@cc_on!@*/
false;this.VKI_isIE6=
/*@if(@_jscript_version == 5.6)!@end@*/
false;this.VKI_isIElt8=
/*@if(@_jscript_version < 5.8)!@end@*/
false;this.VKI_isWebKit=window.opera;this.VKI_isOpera=RegExp("Opera").test(navigator.userAgent);this.VKI_isMoz=(!this.VKI_isWebKit&&navigator.product=="Gecko");this.VKI_i18n={"00":"لوحة المفاتيح الافتراضية","01":"اظهار لوحة المفاتيح الافتراضية","02":"اختيار لوحة المفاتيح","03":"Dead keys","04":"مفعل","05":"ملغي","06":"اغلاق لوحة المفاتيح","07":"مسح","08":"مسح حقل الإدخال هذا","09":"النسخة","10":"جحم لوحة المفاتيح"};this.VKI_layout={};this.VKI_layout["\u0639\u0631\u0628\u064a"]=[[["\u0630","\u0651 "],["1","!","\u00a1","\u00b9"],["2","@","\u00b2"],["3","#","\u00b3"],["4","$","\u00a4","\u00a3"],["5","%","\u20ac"],["6","^","\u00bc"],["7","&","\u00bd"],["8","*","\u00be"],["9","(","\u2018"],["0",")","\u2019"],["-","_","\u00a5"],["=","+","\u00d7","\u00f7"],["Bksp","Bksp"]],[["Tab","Tab"],["\u0636","\u064e"],["\u0635","\u064b"],["\u062b","\u064f"],["\u0642","\u064c"],["\u0641","\u0644"],["\u063a","\u0625"],["\u0639","\u2018"],["\u0647","\u00f7"],["\u062e","\u00d7"],["\u062d","\u061b"],["\u062c","\u003c"],["\u062f","\u003e"],["\u005c","\u007c"]],[["Caps","Caps"],["\u0634","\u0650"],["\u0633","\u064d"],["\u064a","\u005d"],["\u0628","\u005b"],["\u0644","\u0644أ"],["\u0627","\u0623"],["\u062a","\u0640"],["\u0646","\u060c"],["\u0645","\u002f"],["\u0643","\u003a"],["\u0637","\u0022"],["Enter","Enter"]],[["Shift","Shift"],["\u0626","\u007e"],["\u0621","\u0652"],["\u0624","\u007d"],["\u0631","\u007b"],["\u0644\u0627","\u0644\u0622"],["\u0649","\u0622"],["\u0629","\u2019"],["\u0648","\u002c"],["\u0632","\u002e"],["\u0638","\u061f"],["Shift","Shift"]],[[" "," "," "," "],["Alt","Alt"]]];this.VKI_layout["\u0639\u0631\u0628\u064a"].lang=["ar"];this.VKI_layout["أرقام"]=[[["$"],["\u00a3"],["\u20ac"],["\u00a5"],["/"],["^"],["Bksp","Bksp"]],[["."],["7"],["8"],["9"],["*"],["<"],["("],["["]],[["="],["4"],["5"],["6"],["-"],[">"],[")"],["]"]],[["0"],["1"],["2"],["3"],["+"],["Enter","Enter"]],[[" "]]];this.VKI_layout["أرقام"].DDK=true;this.VKI_layout.English=[[["`","~"],["1","!","\u00a1","\u00b9"],["2","@","\u00b2"],["3","#","\u00b3"],["4","$","\u00a4","\u00a3"],["5","%","\u20ac"],["6","^","\u00bc"],["7","&","\u00bd"],["8","*","\u00be"],["9","(","\u2018"],["0",")","\u2019"],["-","_","\u00a5"],["=","+","\u00d7","\u00f7"],["Bksp","Bksp"]],[["Tab","Tab"],["q","Q","\u00e4","\u00c4"],["w","W","\u00e5","\u00c5"],["e","E","\u00e9","\u00c9"],["r","R","\u00ae"],["t","T","\u00fe","\u00de"],["y","Y","\u00fc","\u00dc"],["u","U","\u00fa","\u00da"],["i","I","\u00ed","\u00cd"],["o","O","\u00f3","\u00d3"],["p","P","\u00f6","\u00d6"],["[","{","\u00ab"],["]","}","\u00bb"],["\\","|","\u00ac","\u00a6"]],[["Caps","Caps"],["a","A","\u00e1","\u00c1"],["s","S","\u00df","\u00a7"],["d","D","\u00f0","\u00d0"],["f","F"],["g","G"],["h","H"],["j","J"],["k","K"],["l","L","\u00f8","\u00d8"],[";",":","\u00b6","\u00b0"],["'",'"',"\u00b4","\u00a8"],["Enter","Enter"]],[["Shift","Shift"],["z","Z","\u00e6","\u00c6"],["x","X"],["c","C","\u00a9","\u00a2"],["v","V"],["b","B"],["n","N","\u00f1","\u00d1"],["m","M","\u00b5"],[",","<","\u00e7","\u00c7"],[".",">"],["/","?","\u00bf"],["Shift","Shift"]],[[" "," "," "," "],["Alt","Alt"]]];this.VKI_layout.English.lang=["en"];this.VKI_deadkey={};this.VKI_symbol={"\u200c":"ZW\r\nNJ","\u200d":"ZW\r\nJ"};this.VKI_attachKeyboard=VKI_attach=function(elem){if(elem.VKI_attached){return false}var keybut=document.createElement("img");keybut.src=this.VKI_imageURI;keybut.alt=this.VKI_i18n["00"];keybut.className="keyboardInputInitiator";keybut.title=this.VKI_i18n["01"];keybut.elem=elem;keybut.onclick=function(){self.VKI_show(this.elem)};elem.VKI_attached=true;elem.parentNode.insertBefore(keybut,(elem.dir=="rtl")?elem:elem.nextSibling);if(this.VKI_isIE){elem.onclick=elem.onselect=elem.onkeyup=function(e){if((e||event).type!="keyup"||!this.readOnly){this.range=document.selection.createRange()}}}};var inputElems=[document.getElementsByTagName("input"),document.getElementsByTagName("textarea")];for(var x=0,elem;elem=inputElems[x++];){for(var y=0,ex;ex=elem[y++];){if((ex.nodeName=="TEXTAREA"||ex.type=="text"||ex.type=="password")&&ex.className.indexOf("keyboardInput")>-1){this.VKI_attachKeyboard(ex)}}}this.VKI_keyboard=document.createElement("table");this.VKI_keyboard.id="keyboardInputMaster";this.VKI_keyboard.dir="ltr";this.VKI_keyboard.cellSpacing=this.VKI_keyboard.border="0";var thead=document.createElement("thead");var tr=document.createElement("tr");var th=document.createElement("th");var abbr=document.createElement("abbr");abbr.title=this.VKI_i18n["00"];abbr.appendChild(document.createTextNode("VKI"));th.appendChild(abbr);var kblist=document.createElement("select");kblist.title=this.VKI_i18n["02"];for(ktype in this.VKI_layout){if(typeof this.VKI_layout[ktype]=="object"){if(!this.VKI_layout[ktype].lang){this.VKI_layout[ktype].lang=[]}var opt=document.createElement("option");opt.value=ktype;opt.appendChild(document.createTextNode(ktype));kblist.appendChild(opt)}}if(kblist.options.length){kblist.value=this.VKI_kt;kblist.onchange=function(){self.VKI_kts=self.VKI_kt=this.value;self.VKI_buildKeys();self.VKI_position(true)};th.appendChild(kblist)}if(this.VKI_sizeAdj){this.VKI_size=Math.min(5,Math.max(1,this.VKI_size));var kbsize=document.createElement("select");kbsize.title=this.VKI_i18n["10"];for(var x=1;x<=5;x++){var opt=document.createElement("option");opt.value=x;opt.appendChild(document.createTextNode(x));kbsize.appendChild(opt)}kbsize.value=this.VKI_size;kbsize.onchange=function(){self.VKI_keyboard.className=self.VKI_keyboard.className.replace(/ ?keyboardInputSize\d ?/,"");if(this.value!=2){self.VKI_keyboard.className+=" keyboardInputSize"+this.value}self.VKI_position(true)};th.appendChild(kbsize)}var label=document.createElement("label");var checkbox=document.createElement("input");checkbox.type="checkbox";checkbox.title=this.VKI_i18n["03"]+": "+((this.VKI_deadkeysOn)?this.VKI_i18n["04"]:this.VKI_i18n["05"]);checkbox.defaultChecked=this.VKI_deadkeysOn;checkbox.onclick=function(){self.VKI_deadkeysOn=this.checked;this.title=self.VKI_i18n["03"]+": "+((this.checked)?self.VKI_i18n["04"]:self.VKI_i18n["05"]);self.VKI_modify("");return true};label.appendChild(this.VKI_deadkeysElem=checkbox);checkbox.checked=this.VKI_deadkeysOn;th.appendChild(label);tr.appendChild(th);var td=document.createElement("td");var clearer=document.createElement("span");clearer.id="keyboardInputClear";clearer.appendChild(document.createTextNode(this.VKI_i18n["07"]));clearer.title=this.VKI_i18n["08"];clearer.onmousedown=function(){this.className="pressed"};clearer.onmouseup=function(){this.className=""};clearer.onclick=function(){self.VKI_target.value="";self.VKI_target.focus();return false};td.appendChild(clearer);var closer=document.createElement("strong");closer.id="keyboardInputClose";closer.appendChild(document.createTextNode("X"));closer.title=this.VKI_i18n["06"];closer.onmousedown=function(){this.className="pressed"};closer.onmouseup=function(){this.className=""};closer.onclick=function(){self.VKI_close()};td.appendChild(closer);tr.appendChild(td);thead.appendChild(tr);this.VKI_keyboard.appendChild(thead);var tbody=document.createElement("tbody");var tr=document.createElement("tr");var td=document.createElement("td");td.colSpan="2";var div=document.createElement("div");div.id="keyboardInputLayout";td.appendChild(div);if(this.VKI_showVersion){var div=document.createElement("div");var ver=document.createElement("var");ver.title=this.VKI_i18n["09"]+" "+this.VKI_version;ver.appendChild(document.createTextNode("v"+this.VKI_version));div.appendChild(ver);td.appendChild(div)}tr.appendChild(td);tbody.appendChild(tr);this.VKI_keyboard.appendChild(tbody);if(this.VKI_isIE6){this.VKI_iframe=document.createElement("iframe");this.VKI_iframe.style.position="absolute";this.VKI_iframe.style.border="0px none";this.VKI_iframe.style.filter="mask()";this.VKI_iframe.style.zIndex="999999";this.VKI_iframe.src=this.VKI_imageURI}this.VKI_buildKeys=function(){this.VKI_shift=this.VKI_shiftlock=this.VKI_altgr=this.VKI_altgrlock=this.VKI_dead=false;this.VKI_deadkeysOn=(this.VKI_layout[this.VKI_kt].DDK)?false:this.VKI_keyboard.getElementsByTagName("label")[0].getElementsByTagName("input")[0].checked;var container=this.VKI_keyboard.tBodies[0].getElementsByTagName("div")[0];while(container.firstChild){container.removeChild(container.firstChild)}for(var x=0,hasDeadKey=false,lyt;lyt=this.VKI_layout[this.VKI_kt][x++];){var table=document.createElement("table");table.cellSpacing=table.border="0";if(lyt.length<=this.VKI_keyCenter){table.className="keyboardInputCenter"}var tbody=document.createElement("tbody");var tr=document.createElement("tr");for(var y=0,lkey;lkey=lyt[y++];){var td=document.createElement("td");if(this.VKI_symbol[lkey[0]]){var span=document.createElement("span");span.className=lkey[0];span.appendChild(document.createTextNode(this.VKI_symbol[lkey[0]]));td.appendChild(span)}else{td.appendChild(document.createTextNode(lkey[0]||"\xa0"))}var className=[];if(this.VKI_deadkeysOn){for(key in this.VKI_deadkey){if(key===lkey[0]){className.push("alive");break}}}if(lyt.length>this.VKI_keyCenter&&y==lyt.length){className.push("last")}if(lkey[0]==" "){className.push("space")}td.className=className.join(" ");td.VKI_clickless=0;if(!td.click){td.click=function(){var evt=this.ownerDocument.createEvent("MouseEvents");evt.initMouseEvent("click",true,true,this.ownerDocument.defaultView,1,0,0,0,0,false,false,false,false,0,null);this.dispatchEvent(evt)}}td.onmouseover=function(){if(self.VKI_clickless){var _self=this;clearTimeout(this.VKI_clickless);this.VKI_clickless=setTimeout(function(){_self.click()},self.VKI_clickless)}if((this.firstChild.nodeValue||this.firstChild.className)!="\xa0"){this.className+=" hover"}};td.onmouseout=function(){if(self.VKI_clickless){clearTimeout(this.VKI_clickless)}this.className=this.className.replace(/ ?(hover|pressed)/g,"")};td.onmousedown=function(){if(self.VKI_clickless){clearTimeout(this.VKI_clickless)}if((this.firstChild.nodeValue||this.firstChild.className)!="\xa0"){this.className+=" pressed"}};td.onmouseup=function(){if(self.VKI_clickless){clearTimeout(this.VKI_clickless)}this.className=this.className.replace(/ ?pressed/g,"")};td.ondblclick=function(){return false};switch(lkey[1]){case"Caps":case"Shift":case"Alt":case"AltGr":case"AltLk":td.onclick=(function(type){return function(){self.VKI_modify(type);return false}})(lkey[1]);break;case"Tab":td.onclick=function(){self.VKI_insert("\t");return false};break;case"Bksp":td.onclick=function(){self.VKI_target.focus();if(self.VKI_target.setSelectionRange){if(self.VKI_target.readOnly&&self.VKI_isWebKit){var rng=[self.VKI_target.selStart||0,self.VKI_target.selEnd||0]}else{var rng=[self.VKI_target.selectionStart,self.VKI_target.selectionEnd]}if(rng[0]<rng[1]){rng[0]++}self.VKI_target.value=self.VKI_target.value.substr(0,rng[0]-1)+self.VKI_target.value.substr(rng[1]);self.VKI_target.setSelectionRange(rng[0]-1,rng[0]-1);if(self.VKI_target.readOnly&&self.VKI_isWebKit){var range=window.getSelection().getRangeAt(0);self.VKI_target.selStart=range.startOffset;self.VKI_target.selEnd=range.endOffset}}else{if(self.VKI_target.createTextRange){try{self.VKI_target.range.select()}catch(e){self.VKI_target.range=document.selection.createRange()}if(!self.VKI_target.range.text.length){self.VKI_target.range.moveStart("character",-1)}self.VKI_target.range.text=""}else{self.VKI_target.value=self.VKI_target.value.substr(0,self.VKI_target.value.length-1)}}if(self.VKI_shift){self.VKI_modify("Shift")}if(self.VKI_altgr){self.VKI_modify("AltGr")}self.VKI_target.focus();return true};break;case"Enter":td.onclick=function(){if(self.VKI_target.nodeName!="TEXTAREA"){self.VKI_close();this.className=this.className.replace(/ ?(hover|pressed)/g,"")}else{self.VKI_insert("\n")}return true};break;default:td.onclick=function(){var character=this.firstChild.nodeValue||this.firstChild.className;if(self.VKI_deadkeysOn&&self.VKI_dead){if(self.VKI_dead!=character){for(key in self.VKI_deadkey){if(key==self.VKI_dead){if(character!=" "){for(var z=0,rezzed=false,dk;dk=self.VKI_deadkey[key][z++];){if(dk[0]==character){self.VKI_insert(dk[1]);rezzed=true;break}}}else{self.VKI_insert(self.VKI_dead);rezzed=true}break}}}else{rezzed=true}}self.VKI_dead=false;if(!rezzed&&character!="\xa0"){if(self.VKI_deadkeysOn){for(key in self.VKI_deadkey){if(key==character){self.VKI_dead=key;this.className+=" dead";if(self.VKI_shift){self.VKI_modify("Shift")}if(self.VKI_altgr){self.VKI_modify("AltGr")}break}}if(!self.VKI_dead){self.VKI_insert(character)}}else{self.VKI_insert(character)}}self.VKI_modify("");if(self.VKI_isOpera){this.style.width="50px";var foo=this.offsetWidth;this.style.width=""}return false}}tr.appendChild(td);tbody.appendChild(tr);table.appendChild(tbody);for(var z=0;z<4;z++){if(this.VKI_deadkey[lkey[z]=lkey[z]||"\xa0"]){hasDeadKey=true}}}container.appendChild(table)}this.VKI_deadkeysElem.style.display=(!this.VKI_layout[this.VKI_kt].DDK&&hasDeadKey)?"inline":"none"};this.VKI_buildKeys();VKI_disableSelection(this.VKI_keyboard);this.VKI_modify=function(type){switch(type){case"Alt":case"AltGr":this.VKI_altgr=!this.VKI_altgr;break;case"AltLk":this.VKI_altgrlock=!this.VKI_altgrlock;break;case"Caps":this.VKI_shiftlock=!this.VKI_shiftlock;break;case"Shift":this.VKI_shift=!this.VKI_shift;break}var vchar=0;if(!this.VKI_shift!=!this.VKI_shiftlock){vchar+=1}if(!this.VKI_altgr!=!this.VKI_altgrlock){vchar+=2}var tables=this.VKI_keyboard.getElementsByTagName("table");for(var x=0;x<tables.length;x++){var tds=tables[x].getElementsByTagName("td");for(var y=0;y<tds.length;y++){var className=[],lkey=this.VKI_layout[this.VKI_kt][x][y];if(tds[y].className.indexOf("hover")>-1){className.push("hover")}switch(lkey[1]){case"Alt":case"AltGr":if(this.VKI_altgr){className.push("dead")}break;case"AltLk":if(this.VKI_altgrlock){className.push("dead")}break;case"Shift":if(this.VKI_shift){className.push("dead")}break;case"Caps":if(this.VKI_shiftlock){className.push("dead")}break;case"Tab":case"Enter":case"Bksp":break;default:if(type){tds[y].removeChild(tds[y].firstChild);if(this.VKI_symbol[lkey[vchar]]){var span=document.createElement("span");span.className=lkey[vchar];span.appendChild(document.createTextNode(this.VKI_symbol[lkey[vchar]]));tds[y].appendChild(span)}else{tds[y].appendChild(document.createTextNode(lkey[vchar]))}}if(this.VKI_deadkeysOn){var character=tds[y].firstChild.nodeValue||tds[y].firstChild.className;if(this.VKI_dead){if(character==this.VKI_dead){className.push("dead")}for(var z=0;z<this.VKI_deadkey[this.VKI_dead].length;z++){if(character==this.VKI_deadkey[this.VKI_dead][z][0]){className.push("target");break}}}for(key in this.VKI_deadkey){if(key===character){className.push("alive");break}}}}if(y==tds.length-1&&tds.length>this.VKI_keyCenter){className.push("last")}if(lkey[0]==" "){className.push("space")}tds[y].className=className.join(" ")}}};this.VKI_insert=function(text){this.VKI_target.focus();if(this.VKI_target.maxLength){this.VKI_target.maxlength=this.VKI_target.maxLength}if(typeof this.VKI_target.maxlength=="undefined"||this.VKI_target.maxlength<0||this.VKI_target.value.length<this.VKI_target.maxlength){if(this.VKI_target.setSelectionRange){if(this.VKI_target.readOnly&&this.VKI_isWebKit){var rng=[this.VKI_target.selStart||0,this.VKI_target.selEnd||0]}else{var rng=[this.VKI_target.selectionStart,this.VKI_target.selectionEnd]}this.VKI_target.value=this.VKI_target.value.substr(0,rng[0])+text+this.VKI_target.value.substr(rng[1]);if(text=="\n"&&window.opera){rng[0]++}this.VKI_target.setSelectionRange(rng[0]+text.length,rng[0]+text.length);if(this.VKI_target.readOnly&&this.VKI_isWebKit){var range=window.getSelection().getRangeAt(0);this.VKI_target.selStart=range.startOffset;this.VKI_target.selEnd=range.endOffset}}else{if(this.VKI_target.createTextRange){try{this.VKI_target.range.select()}catch(e){this.VKI_target.range=document.selection.createRange()}this.VKI_target.range.text=text;this.VKI_target.range.collapse(true);this.VKI_target.range.select()}else{this.VKI_target.value+=text}}if(this.VKI_shift){this.VKI_modify("Shift")}if(this.VKI_altgr){this.VKI_modify("AltGr")}this.VKI_target.focus()}else{if(this.VKI_target.createTextRange&&this.VKI_target.range){this.VKI_target.range.select()}}};this.VKI_show=function(elem){if(!this.VKI_target){this.VKI_target=elem;if(this.VKI_langAdapt&&this.VKI_target.lang){var chg=false,sub=[];for(ktype in this.VKI_layout){if(typeof this.VKI_layout[ktype]=="object"){for(var x=0;x<this.VKI_layout[ktype].lang.length;x++){if(this.VKI_layout[ktype].lang[x].toLowerCase()==this.VKI_target.lang.toLowerCase()){chg=kblist.value=this.VKI_kt=ktype;break}else{if(this.VKI_layout[ktype].lang[x].toLowerCase().indexOf(this.VKI_target.lang.toLowerCase())==0){sub.push([this.VKI_layout[ktype].lang[x],ktype])}}}}if(chg){break}}if(sub.length){sub.sort(function(a,b){return a[0].length-b[0].length});chg=kblist.value=this.VKI_kt=sub[0][1]}if(chg){this.VKI_buildKeys()}}if(this.VKI_isIE){if(!this.VKI_target.range){this.VKI_target.range=this.VKI_target.createTextRange();this.VKI_target.range.moveStart("character",this.VKI_target.value.length)}this.VKI_target.range.select()}try{this.VKI_keyboard.parentNode.removeChild(this.VKI_keyboard)}catch(e){}if(this.VKI_clearPasswords&&this.VKI_target.type=="password"){this.VKI_target.value=""}var elem=this.VKI_target;this.VKI_target.keyboardPosition="absolute";do{if(VKI_getStyle(elem,"position")=="fixed"){this.VKI_target.keyboardPosition="fixed";break}}while(elem=elem.offsetParent);if(this.VKI_isIE6){document.body.appendChild(this.VKI_iframe)}document.body.appendChild(this.VKI_keyboard);this.VKI_keyboard.style.position=this.VKI_target.keyboardPosition;this.VKI_position(true);if(self.VKI_isMoz||self.VKI_isWebKit){this.VKI_position(true)}this.VKI_target.focus()}else{this.VKI_close()}};this.VKI_position=function(force){if(self.VKI_target){var kPos=VKI_findPos(self.VKI_keyboard),wDim=VKI_innerDimensions(),sDis=VKI_scrollDist();var place=false,fudge=self.VKI_target.offsetHeight+3;if(force!==true){if(kPos[1]+self.VKI_keyboard.offsetHeight-sDis[1]-wDim[1]>0){place=true;fudge=-self.VKI_keyboard.offsetHeight-3}else{if(kPos[1]-sDis[1]<0){place=true}}}if(place||force===true){var iPos=VKI_findPos(self.VKI_target);self.VKI_keyboard.style.top=iPos[1]-((self.VKI_target.keyboardPosition=="fixed"&&!self.VKI_isIE&&!self.VKI_isMoz)?sDis[1]:0)+fudge+"px";self.VKI_keyboard.style.left=Math.max(10,Math.min(wDim[0]-self.VKI_keyboard.offsetWidth-25,iPos[0]))+"px";if(self.VKI_isIE6){self.VKI_iframe.style.width=self.VKI_keyboard.offsetWidth+"px";self.VKI_iframe.style.height=self.VKI_keyboard.offsetHeight+"px";self.VKI_iframe.style.top=self.VKI_keyboard.style.top;self.VKI_iframe.style.left=self.VKI_keyboard.style.left}}if(force===true){self.VKI_position()}}};if(window.addEventListener){window.addEventListener("resize",this.VKI_position,false);window.addEventListener("scroll",this.VKI_position,false)}else{if(window.attachEvent){window.attachEvent("onresize",this.VKI_position);window.attachEvent("onscroll",this.VKI_position)}}this.VKI_close=VKI_close=function(){if(this.VKI_target){try{this.VKI_keyboard.parentNode.removeChild(this.VKI_keyboard);if(this.VKI_isIE6){this.VKI_iframe.parentNode.removeChild(this.VKI_iframe)}}catch(e){}if(this.VKI_kt!=this.VKI_kts){kblist.value=this.VKI_kt=this.VKI_kts;this.VKI_buildKeys()}this.VKI_target.focus();this.VKI_target=false}}}function VKI_findPos(a){var b=curtop=0;do{b+=a.offsetLeft;curtop+=a.offsetTop}while(a=a.offsetParent);return[b,curtop]}function VKI_innerDimensions(){if(self.innerHeight){return[self.innerWidth,self.innerHeight]}else{if(document.documentElement&&document.documentElement.clientHeight){return[document.documentElement.clientWidth,document.documentElement.clientHeight]}else{if(document.body){return[document.body.clientWidth,document.body.clientHeight]}}}return[0,0]}function VKI_scrollDist(){var a=document.getElementsByTagName("html")[0];if(a.scrollTop&&document.documentElement.scrollTop){return[a.scrollLeft,a.scrollTop]}else{if(a.scrollTop||document.documentElement.scrollTop){return[a.scrollLeft+document.documentElement.scrollLeft,a.scrollTop+document.documentElement.scrollTop]}else{if(document.body.scrollTop){return[document.body.scrollLeft,document.body.scrollTop]}}}return[0,0]}function VKI_getStyle(b,a){if(b.currentStyle){var c=b.currentStyle[a]}else{if(window.getComputedStyle){var c=window.getComputedStyle(b,null)[a]}}return c}function VKI_disableSelection(a){a.onselectstart=function(){return false};a.unselectable="on";a.style.MozUserSelect="none";a.style.cursor="default";if(window.opera){a.onmousedown=function(){return false}}}if(window.addEventListener){window.addEventListener("load",VKI_buildKeyboardInputs,false)}else{if(window.attachEvent){window.attachEvent("onload",VKI_buildKeyboardInputs)}};
