if(typeof window.jQuery=="undefined"){window.undefined=window.undefined;var jQuery=function(a,c){if(window==this)return new jQuery(a,c);a=a||document;if(jQuery.isFunction(a))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](a);if(typeof a=="string"){var m=/^[^<]*(<(.|\s)+>)[^>]*$/.exec(a);if(m)a=jQuery.clean([m[1]]);else return new jQuery(c).find(a)}return this.setArray(a.constructor==Array&&a||(a.jquery||a.length&&a!=window&&!a.nodeType&&a[0]!=undefined&&a[0].nodeType)&&jQuery.makeArray(a)||[a])};if(typeof $!="undefined")jQuery._$=$;var $=jQuery;jQuery.fn=jQuery.prototype={jquery:"1.1.2",size:function(){return this.length},length:0,get:function(a){return a==undefined?jQuery.makeArray(this):this[a]},pushStack:function(a){var b=jQuery(a);b.prevObject=this;return b},setArray:function(a){this.length=0;[].push.apply(this,a);return this},each:function(a,b){return jQuery.each(this,a,b)},index:function(a){var b=-1;this.each(function(i){if(this==a)b=i});return b},attr:function(c,d,e){var f=c;if(c.constructor==String)if(d==undefined)return this.length&&jQuery[e||"attr"](this[0],c)||undefined;else{f={};f[c]=d}return this.each(function(a){for(var b in f)jQuery.attr(e?this.style:this,b,jQuery.prop(this,f[b],e,a,b))})},css:function(a,b){return this.attr(a,b,"curCSS")},text:function(e){if(typeof e=="string")return this.empty().append(document.createTextNode(e));var t="";jQuery.each(e||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])})});return t},wrap:function(){var a=jQuery.clean(arguments);return this.each(function(){var b=a[0].cloneNode(true);this.parentNode.insertBefore(b,this);while(b.firstChild)b=b.firstChild;b.appendChild(this)})},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},find:function(t){return this.pushStack(jQuery.map(this,function(a){return jQuery.find(t,a)}),t)},clone:function(b){return this.pushStack(jQuery.map(this,function(a){var a=a.cloneNode(b!=undefined?b:true);a.$events=null;return a}))},filter:function(t){return this.pushStack(jQuery.isFunction(t)&&jQuery.grep(this,function(a,b){return t.apply(a,[b])})||jQuery.multiFilter(t,this))},not:function(t){return this.pushStack(t.constructor==String&&jQuery.multiFilter(t,this,true)||jQuery.grep(this,function(a){return(t.constructor==Array||t.jquery)?jQuery.inArray(a,t)<0:a!=t}))},add:function(t){return this.pushStack(jQuery.merge(this.get(),t.constructor==String?jQuery(t).get():t.length!=undefined&&(!t.nodeName||t.nodeName=="FORM")?t:[t]))},is:function(a){return a?jQuery.filter(a,this).r.length>0:false},val:function(a){return a==undefined?(this.length?this[0].value:null):this.attr("value",a)},html:function(a){return a==undefined?(this.length?this[0].innerHTML:null):this.empty().append(a)},domManip:function(c,d,e,f){var g=this.length>1;var a=jQuery.clean(c);if(e<0)a.reverse();return this.each(function(){var b=this;if(d&&jQuery.nodeName(this,"table")&&jQuery.nodeName(a[0],"tr"))b=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));jQuery.each(a,function(){f.apply(b,[g?this.cloneNode(true):this])})})}};jQuery.extend=jQuery.fn.extend=function(){var b=arguments[0],a=1;if(arguments.length==1){b=this;a=0}var c;while(c=arguments[a++])for(var i in c)b[i]=c[i];return b};jQuery.extend({noConflict:function(){if(jQuery._$)$=jQuery._$;return jQuery},isFunction:function(a){return!!a&&typeof a!="string"&&!a.nodeName&&typeof a[0]=="undefined"&&/function/i.test(a+"")},isXMLDoc:function(a){return a.tagName&&a.ownerDocument&&!a.ownerDocument.body},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()==b.toUpperCase()},each:function(a,b,c){if(a.length==undefined)for(var i in a)b.apply(a[i],c||[i,a[i]]);else for(var i=0,ol=a.length;i<ol;i++)if(b.apply(a[i],c||[i,a[i]])===false)break;return a},prop:function(a,b,c,d,e){if(jQuery.isFunction(b))b=b.call(a,[d]);var f=/z-?index|font-?weight|opacity|zoom|line-?height/i;return b&&b.constructor==Number&&c=="curCSS"&&!f.test(e)?b+"px":b},className:{add:function(b,c){jQuery.each(c.split(/\s+/),function(i,a){if(!jQuery.className.has(b.className,a))b.className+=(b.className?" ":"")+a})},remove:function(b,c){b.className=c?jQuery.grep(b.className.split(/\s+/),function(a){return!jQuery.className.has(c,a)}).join(" "):""},has:function(t,c){t=t.className||t;c=c.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1");return t&&new RegExp("(^|\\s)"+c+"(\\s|$)").test(t)}},swap:function(e,o,f){for(var i in o){e.style["old"+i]=e.style[i];e.style[i]=o[i]}f.apply(e,[]);for(var i in o)e.style[i]=e.style["old"+i]},css:function(e,p){if(p=="height"||p=="width"){var b={},oHeight,oWidth,d=["Top","Bottom","Right","Left"];jQuery.each(d,function(){b["padding"+this]=0;b["border"+this+"Width"]=0});jQuery.swap(e,b,function(){if(jQuery.css(e,"display")!="none"){oHeight=e.offsetHeight;oWidth=e.offsetWidth}else{e=jQuery(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(e.parentNode)[0];var a=jQuery.css(e.parentNode,"position");if(a==""||a=="static")e.parentNode.style.position="relative";oHeight=e.clientHeight;oWidth=e.clientWidth;if(a==""||a=="static")e.parentNode.style.position="static";e.parentNode.removeChild(e)}});return p=="height"?oHeight:oWidth}return jQuery.curCSS(e,p)},curCSS:function(a,b,d){var e;if(b=="opacity"&&jQuery.browser.msie)return jQuery.attr(a.style,"opacity");if(b=="float"||b=="cssFloat")b=jQuery.browser.msie?"styleFloat":"cssFloat";if(!d&&a.style[b])e=a.style[b];else if(document.defaultView&&document.defaultView.getComputedStyle){if(b=="cssFloat"||b=="styleFloat")b="float";b=b.replace(/([A-Z])/g,"-$1").toLowerCase();var f=document.defaultView.getComputedStyle(a,null);if(f)e=f.getPropertyValue(b);else if(b=="display")e="none";else jQuery.swap(a,{display:"block"},function(){var c=document.defaultView.getComputedStyle(this,"");e=c&&c.getPropertyValue(b)||""})}else if(a.currentStyle){var g=b.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});e=a.currentStyle[b]||a.currentStyle[g]}return e},clean:function(a){var r=[];jQuery.each(a,function(i,a){if(!a)return;if(a.constructor==Number)a=a.toString();if(typeof a=="string"){var s=jQuery.trim(a),div=document.createElement("div"),tb=[];var b=!s.indexOf("<opt")&&[1,"<select>","</select>"]||(!s.indexOf("<thead")||!s.indexOf("<tbody")||!s.indexOf("<tfoot"))&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];div.innerHTML=b[1]+s+b[2];while(b[0]--)div=div.firstChild;if(jQuery.browser.msie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0)tb=div.firstChild&&div.firstChild.childNodes;else if(b[1]=="<table>"&&s.indexOf("<tbody")<0)tb=div.childNodes;for(var n=tb.length-1;n>=0;--n)if(jQuery.nodeName(tb[n],"tbody")&&!tb[n].childNodes.length)tb[n].parentNode.removeChild(tb[n])}a=[];for(var i=0,l=div.childNodes.length;i<l;i++)a.push(div.childNodes[i])}if(a.length===0&&!jQuery.nodeName(a,"form"))return;if(a[0]==undefined||jQuery.nodeName(a,"form"))r.push(a);else r=jQuery.merge(r,a)});return r},attr:function(a,c,d){var e=jQuery.isXMLDoc(a)?{}:{"for":"htmlFor","class":"className","float":jQuery.browser.msie?"styleFloat":"cssFloat",cssFloat:jQuery.browser.msie?"styleFloat":"cssFloat",innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected"};if(c=="opacity"&&jQuery.browser.msie&&d!=undefined){a.zoom=1;return a.filter=a.filter.replace(/alpha\([^\)]*\)/gi,"")+(d==1?"":"alpha(opacity="+d*100+")")}else if(c=="opacity"&&jQuery.browser.msie)return a.filter?parseFloat(a.filter.match(/alpha\(opacity=(.*)\)/)[1])/100:1;if(c=="opacity"&&jQuery.browser.mozilla&&d==1)d=0.9999;if(e[c]){if(d!=undefined)a[e[c]]=d;return a[e[c]]}else if(d==undefined&&jQuery.browser.msie&&jQuery.nodeName(a,"form")&&(c=="action"||c=="method"))return a.getAttributeNode(c).nodeValue;else if(a.tagName){if(d!=undefined)a.setAttribute(c,d);if(jQuery.browser.msie&&/href|src/.test(c)&&!jQuery.isXMLDoc(a))return a.getAttribute(c,2);return a.getAttribute(c)}else{c=c.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase()});if(d!=undefined)a[c]=d;return a[c]}},trim:function(t){return t.replace(/^\s+|\s+$/g,"")},makeArray:function(a){var r=[];if(a.constructor!=Array)for(var i=0,al=a.length;i<al;i++)r.push(a[i]);else r=a.slice(0);return r},inArray:function(b,a){for(var i=0,al=a.length;i<al;i++)if(a[i]==b)return i;return-1},merge:function(a,b){var r=[].slice.call(a,0);for(var i=0,sl=b.length;i<sl;i++)if(jQuery.inArray(b[i],r)==-1)a.push(b[i]);return a},grep:function(a,b,c){if(typeof b=="string")b=new Function("a","i","return "+b);var d=[];for(var i=0,el=a.length;i<el;i++)if(!c&&b(a[i],i)||c&&!b(a[i],i))d.push(a[i]);return d},map:function(a,b){if(typeof b=="string")b=new Function("a","return "+b);var c=[],r=[];for(var i=0,el=a.length;i<el;i++){var d=b(a[i],i);if(d!==null&&d!=undefined){if(d.constructor!=Array)d=[d];c=c.concat(d)}}var r=c.length?[c[0]]:[];check:for(var i=1,rl=c.length;i<rl;i++){for(var j=0;j<i;j++)if(c[i]==r[j])continue check;r.push(c[i])}return r}});new function(){var b=navigator.userAgent.toLowerCase();jQuery.browser={safari:/webkit/.test(b),opera:/opera/.test(b),msie:/msie/.test(b)&&!/opera/.test(b),mozilla:/mozilla/.test(b)&&!/(compatible|webkit)/.test(b)};jQuery.boxModel=!jQuery.browser.msie||document.compatMode=="CSS1Compat"};jQuery.each({parent:"a.parentNode",parents:"jQuery.parents(a)",next:"jQuery.nth(a,2,'nextSibling')",prev:"jQuery.nth(a,2,'previousSibling')",siblings:"jQuery.sibling(a.parentNode.firstChild,a)",children:"jQuery.sibling(a.firstChild)"},function(i,n){jQuery.fn[i]=function(a){var b=jQuery.map(this,n);if(a&&typeof a=="string")b=jQuery.multiFilter(a,b);return this.pushStack(b)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after"},function(i,n){jQuery.fn[i]=function(){var a=arguments;return this.each(function(){for(var j=0,al=a.length;j<al;j++)jQuery(a[j])[n](this)})}});jQuery.each({removeAttr:function(a){jQuery.attr(this,a,"");this.removeAttribute(a)},addClass:function(c){jQuery.className.add(this,c)},removeClass:function(c){jQuery.className.remove(this,c)},toggleClass:function(c){jQuery.className[jQuery.className.has(this,c)?"remove":"add"](this,c)},remove:function(a){if(!a||jQuery.filter(a,[this]).r.length)this.parentNode.removeChild(this)},empty:function(){while(this.firstChild)this.removeChild(this.firstChild)}},function(i,n){jQuery.fn[i]=function(){return this.each(n,arguments)}});jQuery.each(["eq","lt","gt","contains"],function(i,n){jQuery.fn[n]=function(a,b){return this.filter(":"+n+"("+a+")",b)}});jQuery.each(["height","width"],function(i,n){jQuery.fn[n]=function(h){return h==undefined?(this.length?jQuery.css(this[0],n):null):this.css(n,h.constructor==String?h:h+"px")}});jQuery.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","nth-child":"jQuery.nth(a.parentNode.firstChild,m[3],'nextSibling',a)==a","first-child":"jQuery.nth(a.parentNode.firstChild,1,'nextSibling')==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"jQuery.sibling(a.parentNode.firstChild).length==1",parent:"a.firstChild",empty:"!a.firstChild",contains:"jQuery.fn.text.apply([a]).indexOf(m[3])>=0",visible:'a.type!="hidden"&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'a.type=="hidden"||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"a.type=='text'",radio:"a.type=='radio'",checkbox:"a.type=='checkbox'",file:"a.type=='file'",password:"a.type=='password'",submit:"a.type=='submit'",image:"a.type=='image'",reset:"a.type=='reset'",button:'a.type=="button"||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)"},".":"jQuery.className.has(a,m[2])","@":{"=":"z==m[4]","!=":"z!=m[4]","^=":"z&&!z.indexOf(m[4])","$=":"z&&z.substr(z.length - m[4].length,m[4].length)==m[4]","*=":"z&&z.indexOf(m[4])>=0","":"z",_resort:function(m){return["",m[1],m[3],m[2],m[5]]},_prefix:"z=a[m[3]];if(!z||/href|src/.test(m[3]))z=jQuery.attr(a,m[3]);"},"[":"jQuery.find(m[2],a).length"},parse:[/^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('?"?)(.*?)\4 *\]/i,/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,/^(:)([a-z0-9_-]*)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/i,/^([:.#]*)([a-z0-9_*-]*)/i],token:[/^(\/?\.\.)/,"a.parentNode",/^(>|\/)/,"jQuery.sibling(a.firstChild)",/^(\+)/,"jQuery.nth(a,2,'nextSibling')",/^(~)/,function(a){var s=jQuery.sibling(a.parentNode.firstChild);return s.slice(jQuery.inArray(a,s)+1)}],multiFilter:function(a,b,c){var d,cur=[];while(a&&a!=d){d=a;var f=jQuery.filter(a,b,c);a=f.t.replace(/^\s*,\s*/,"");cur=c?b=f.r:jQuery.merge(cur,f.r)}return cur},find:function(t,b){if(typeof t!="string")return[t];if(b&&!b.nodeType)b=null;b=b||document;if(!t.indexOf("//")){b=b.documentElement;t=t.substr(2,t.length)}else if(!t.indexOf("/")){b=b.documentElement;t=t.substr(1,t.length);if(t.indexOf("/")>=1)t=t.substr(t.indexOf("/"),t.length)}var d=[b],done=[],last=null;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t).replace(/^\/\//i,"");var f=false;var g=/^[\/>]\s*([a-z0-9*-]+)/i;var m=g.exec(t);if(m){jQuery.each(d,function(){for(var c=this.firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(jQuery.nodeName(c,m[1])||m[1]=="*"))r.push(c)});d=r;t=t.replace(g,"");if(t.indexOf(" ")==0)continue;f=true}else{for(var i=0;i<jQuery.token.length;i+=2){var g=jQuery.token[i];var m=g.exec(t);if(m){r=d=jQuery.map(d,jQuery.isFunction(jQuery.token[i+1])?jQuery.token[i+1]:function(a){return eval(jQuery.token[i+1])});t=jQuery.trim(t.replace(g,""));f=true;break}}}if(t&&!f){if(!t.indexOf(",")){if(d[0]==b)d.shift();jQuery.merge(done,d);r=d=[b];t=" "+t.substr(1,t.length)}else{var h=/^([a-z0-9_-]+)(#)([a-z0-9\\*_-]*)/i;var m=h.exec(t);if(m){m=[0,m[2],m[3],m[1]]}else{h=/^([#.]?)([a-z0-9\\*_-]*)/i;m=h.exec(t)}if(m[1]=="#"&&d[d.length-1].getElementById){var j=d[d.length-1].getElementById(m[2]);if(jQuery.browser.msie&&j&&j.id!=m[2])j=jQuery('[@id="'+m[2]+'"]',d[d.length-1])[0];d=r=j&&(!m[3]||jQuery.nodeName(j,m[3]))?[j]:[]}else{if(m[1]==".")var k=new RegExp("(^|\\s)"+m[2]+"(\\s|$)");jQuery.each(d,function(){var a=m[1]!=""||m[0]==""?"*":m[2];if(jQuery.nodeName(this,"object")&&a=="*")a="param";jQuery.merge(r,m[1]!=""&&d.length!=1?jQuery.getAll(this,[],m[1],m[2],k):this.getElementsByTagName(a))});if(m[1]=="."&&d.length==1)r=jQuery.grep(r,function(e){return k.test(e.className)});if(m[1]=="#"&&d.length==1){var l=r;r=[];jQuery.each(l,function(){if(this.getAttribute("id")==m[2]){r=[this];return false}})}d=r}t=t.replace(h,"")}}if(t){var n=jQuery.filter(t,r);d=r=n.r;t=jQuery.trim(n.t)}}if(d&&d[0]==b)d.shift();jQuery.merge(done,d);return done},filter:function(t,r,b){while(t&&/^[a-z[({<*:.#]/i.test(t)){var p=jQuery.parse,m;jQuery.each(p,function(i,a){m=a.exec(t);if(m){t=t.substring(m[0].length);if(jQuery.expr[m[1]]._resort)m=jQuery.expr[m[1]]._resort(m);return false}});if(m[1]==":"&&m[2]=="not")r=jQuery.filter(m[3],r,true).r;else if(m[1]=="."){var c=new RegExp("(^|\\s)"+m[2]+"(\\s|$)");r=jQuery.grep(r,function(e){return c.test(e.className||"")},b)}else{var f=jQuery.expr[m[1]];if(typeof f!="string")f=jQuery.expr[m[1]][m[2]];eval("f = function(a,i){"+(jQuery.expr[m[1]]._prefix||"")+"return "+f+"}");r=jQuery.grep(r,f,b)}}return{r:r,t:t}},getAll:function(o,r,a,b,c){for(var s=o.firstChild;s;s=s.nextSibling)if(s.nodeType==1){var d=true;if(a==".")d=s.className&&c.test(s.className);else if(a=="#")d=s.getAttribute("id")==b;if(d)r.push(s);if(a=="#"&&r.length)break;if(s.firstChild)jQuery.getAll(s,r,a,b,c)}return r},parents:function(a){var b=[];var c=a.parentNode;while(c&&c!=document){b.push(c);c=c.parentNode}return b},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c]){if(a.nodeType==1)e++;if(e==b||b=="even"&&e%2==0&&e>1&&a==d||b=="odd"&&e%2==1&&a==d)return a}},sibling:function(n,a){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!a||n!=a))r.push(n)}return r}});jQuery.event={add:function(a,b,c,d){if(jQuery.browser.msie&&a.setInterval!=undefined)a=window;if(d)c.data=d;if(!c.guid)c.guid=this.guid++;if(!a.$events)a.$events={};var e=a.$events[b];if(!e){e=a.$events[b]={};if(a["on"+b])e[0]=a["on"+b]}e[c.guid]=c;a["on"+b]=this.handle;if(!this.global[b])this.global[b]=[];this.global[b].push(a)},guid:1,global:{},remove:function(a,b,c){if(a.$events){var i,j,k;if(b&&b.type){c=b.handler;b=b.type}if(b&&a.$events[b])if(c)delete a.$events[b][c.guid];else for(i in a.$events[b])delete a.$events[b][i];else for(j in a.$events)this.remove(a,j);for(k in a.$events[b])if(k){k=true;break}if(!k)a["on"+b]=null}},trigger:function(a,b,c){b=jQuery.makeArray(b||[]);if(!c)jQuery.each(this.global[a]||[],function(){jQuery.event.trigger(a,b,this)});else{var d=c["on"+a],val,fn=jQuery.isFunction(c[a]);if(d){b.unshift(this.fix({type:a,target:c}));if((val=d.apply(c,b))!==false)this.triggered=true}if(fn&&val!==false)c[a]();this.triggered=false}},handle:function(a){if(typeof jQuery=="undefined"||jQuery.event.triggered)return;a=jQuery.event.fix(a||window.event||{});var b;var c=this.$events[a.type];var d=[].slice.call(arguments,1);d.unshift(a);for(var j in c){d[0].handler=c[j];d[0].data=c[j].data;if(c[j].apply(this,d)===false){a.preventDefault();a.stopPropagation();b=false}}if(jQuery.browser.msie)a.target=a.preventDefault=a.stopPropagation=a.handler=a.data=null;return b},fix:function(a){if(!a.target&&a.srcElement)a.target=a.srcElement;if(a.pageX==undefined&&a.clientX!=undefined){var e=document.documentElement,b=document.body;a.pageX=a.clientX+(e.scrollLeft||b.scrollLeft);a.pageY=a.clientY+(e.scrollTop||b.scrollTop)}if(jQuery.browser.safari&&a.target.nodeType==3){var c=a;a=jQuery.extend({},c);a.target=c.target.parentNode;a.preventDefault=function(){return c.preventDefault()};a.stopPropagation=function(){return c.stopPropagation()}}if(!a.preventDefault)a.preventDefault=function(){this.returnValue=false};if(!a.stopPropagation)a.stopPropagation=function(){this.cancelBubble=true};return a}};jQuery.fn.extend({bind:function(a,b,c){return this.each(function(){jQuery.event.add(this,a,c||b,b)})},one:function(b,c,d){return this.each(function(){jQuery.event.add(this,b,function(a){jQuery(this).unbind(a);return(d||c).apply(this,arguments)},c)})},unbind:function(a,b){return this.each(function(){jQuery.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){jQuery.event.trigger(a,b,this)})},toggle:function(){var a=arguments;return this.click(function(e){this.lastToggle=this.lastToggle==0?1:0;e.preventDefault();return a[this.lastToggle].apply(this,[e])||false})},hover:function(f,g){function handleHover(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this)try{p=p.parentNode}catch(e){p=this};if(p==this)return false;return(e.type=="mouseover"?f:g).apply(this,[e])}return this.mouseover(handleHover).mouseout(handleHover)},ready:function(f){if(jQuery.isReady)f.apply(document,[jQuery]);else{jQuery.readyList.push(function(){return f.apply(this,[jQuery])})}return this}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document)});jQuery.readyList=null}if(jQuery.browser.mozilla||jQuery.browser.opera)document.removeEventListener("DOMContentLoaded",jQuery.ready,false)}}});new function(){jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,o){jQuery.fn[o]=function(f){return f?this.bind(o,f):this.trigger(o)}});if(jQuery.browser.mozilla||jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);else if(jQuery.browser.msie){document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>");var a=document.getElementById("__ie_init");if(a)a.onreadystatechange=function(){if(this.readyState!="complete")return;this.parentNode.removeChild(this);jQuery.ready()};a=null}else if(jQuery.browser.safari)jQuery.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(jQuery.safariTimer);jQuery.safariTimer=null;jQuery.ready()}},10);jQuery.event.add(window,"load",jQuery.ready)};if(jQuery.browser.msie)jQuery(window).one("unload",function(){var a=jQuery.event.global;for(var b in a){var c=a[b],i=c.length;if(i&&b!='unload')do jQuery.event.remove(c[i-1],b);while(--i)}});jQuery.fn.extend({loadIfModified:function(a,b,c){this.load(a,b,c,1)},load:function(c,d,e,f){if(jQuery.isFunction(c))return this.bind("load",c);e=e||function(){};var g="GET";if(d)if(jQuery.isFunction(d)){e=d;d=null}else{d=jQuery.param(d);g="POST"}var h=this;jQuery.ajax({url:c,type:g,data:d,ifModified:f,complete:function(a,b){if(b=="success"||!f&&b=="notmodified")h.attr("innerHTML",a.responseText).evalScripts().each(e,[a.responseText,b,a]);else e.apply(h,[a.responseText,b,a])}});return this},serialize:function(){return jQuery.param(this)},evalScripts:function(){return this.find("script").each(function(){if(this.src)jQuery.getScript(this.src);else jQuery.globalEval(this.text||this.textContent||this.innerHTML||"")}).end()}});if(!window.XMLHttpRequest)XMLHttpRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")};jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});jQuery.extend({get:function(a,b,c,d,e){if(jQuery.isFunction(b)){c=b;b=null}return jQuery.ajax({url:a,data:b,success:c,dataType:d,ifModified:e})},getIfModified:function(a,b,c,d){return jQuery.get(a,b,c,d,1)},getScript:function(a,b){return jQuery.get(a,null,b,"script")},getJSON:function(a,b,c){return jQuery.get(a,b,c,"json")},post:function(a,b,c,d){if(jQuery.isFunction(b)){c=b;b={}}return jQuery.ajax({type:"POST",url:a,data:b,success:c,dataType:d})},ajaxTimeout:function(a){jQuery.ajaxSettings.timeout=a},ajaxSetup:function(a){jQuery.extend(jQuery.ajaxSettings,a)},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(s){s=jQuery.extend({},jQuery.ajaxSettings,s);if(s.data){if(s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.type.toLowerCase()=="get"){s.url+=((s.url.indexOf("?")>-1)?"&":"?")+s.data;s.data=null}}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var f=false;var g=new XMLHttpRequest();g.open(s.type,s.url,s.async);if(s.data)g.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)g.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");g.setRequestHeader("X-Requested-With","XMLHttpRequest");if(g.overrideMimeType)g.setRequestHeader("Connection","close");if(s.beforeSend)s.beforeSend(g);if(s.global)jQuery.event.trigger("ajaxSend",[g,s]);var h=function(a){if(g&&(g.readyState==4||a=="timeout")){f=true;if(i){clearInterval(i);i=null}var b;try{b=jQuery.httpSuccess(g)&&a!="timeout"?s.ifModified&&jQuery.httpNotModified(g,s.url)?"notmodified":"success":"error";if(b!="error"){var c;try{c=g.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&c)jQuery.lastModified[s.url]=c;var d=jQuery.httpData(g,s.dataType);if(s.success)s.success(d,b);if(s.global)jQuery.event.trigger("ajaxSuccess",[g,s])}else jQuery.handleError(s,g,b)}catch(e){b="error";jQuery.handleError(s,g,b,e)}if(s.global)jQuery.event.trigger("ajaxComplete",[g,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");if(s.complete)s.complete(g,b);if(s.async)g=null}};var i=setInterval(h,13);if(s.timeout>0)setTimeout(function(){if(g){g.abort();if(!f)h("timeout")}},s.timeout);try{g.send(s.data)}catch(e){jQuery.handleError(s,g,null,e)}if(!s.async)h();return g},handleError:function(s,a,b,e){if(s.error)s.error(a,b,e);if(s.global)jQuery.event.trigger("ajaxError",[a,s,e])},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||jQuery.browser.safari&&r.status==undefined}catch(e){}return false},httpNotModified:function(a,b){try{var c=a.getResponseHeader("Last-Modified");return a.status==304||c==jQuery.lastModified[b]||jQuery.browser.safari&&a.status==undefined}catch(e){}return false},httpData:function(r,a){var b=r.getResponseHeader("content-type");var c=!a&&b&&b.indexOf("xml")>=0;c=a=="xml"||c?r.responseXML:r.responseText;if(a=="script")jQuery.globalEval(c);if(a=="json")eval("data = "+c);if(a=="html")jQuery("<div>").html(c).evalScripts();return c},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value))});else for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this))});else s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&")},globalEval:function(a){if(window.execScript)window.execScript(a);else if(jQuery.browser.safari)window.setTimeout(a,0);else eval.call(window,a)}});jQuery.fn.extend({show:function(a,b){var c=this.filter(":hidden");a?c.animate({height:"show",width:"show",opacity:"show"},a,b):c.each(function(){this.style.display=this.oldblock?this.oldblock:"";if(jQuery.css(this,"display")=="none")this.style.display="block"});return this},hide:function(a,b){var c=this.filter(":visible");a?c.animate({height:"hide",width:"hide",opacity:"hide"},a,b):c.each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");if(this.oldblock=="none")this.oldblock="block";this.style.display="none"});return this},_toggle:jQuery.fn.toggle,toggle:function(a,b){var c=arguments;return jQuery.isFunction(a)&&jQuery.isFunction(b)?this._toggle(a,b):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"].apply(jQuery(this),c)})},slideDown:function(a,b){return this.animate({height:"show"},a,b)},slideUp:function(a,b){return this.animate({height:"hide"},a,b)},slideToggle:function(b,c){return this.each(function(){var a=jQuery(this).is(":hidden")?"show":"hide";jQuery(this).animate({height:a},b,c)})},fadeIn:function(a,b){return this.animate({opacity:"show"},a,b)},fadeOut:function(a,b){return this.animate({opacity:"hide"},a,b)},fadeTo:function(a,b,c){return this.animate({opacity:b},a,c)},animate:function(b,c,d,f){return this.queue(function(){this.curAnim=jQuery.extend({},b);var a=jQuery.speed(c,d,f);for(var p in b){var e=new jQuery.fx(this,a,p);if(b[p].constructor==Number)e.custom(e.cur(),b[p]);else e[b[p]](b)}})},queue:function(a,b){if(!b){b=a;a="fx"}return this.each(function(){if(!this.queue)this.queue={};if(!this.queue[a])this.queue[a]=[];this.queue[a].push(b);if(this.queue[a].length==1)b.apply(this)})}});jQuery.extend({speed:function(a,b,c){var d=a&&a.constructor==Object?a:{complete:c||!c&&b||jQuery.isFunction(a)&&a,duration:a,easing:c&&b||b&&b.constructor!=Function&&b};d.duration=(d.duration&&d.duration.constructor==Number?d.duration:{slow:600,fast:200}[d.duration])||400;d.old=d.complete;d.complete=function(){jQuery.dequeue(this,"fx");if(jQuery.isFunction(d.old))d.old.apply(this)};return d},easing:{},queue:{},dequeue:function(a,b){b=b||"fx";if(a.queue&&a.queue[b]){a.queue[b].shift();var f=a.queue[b][0];if(f)f.apply(a)}},fx:function(d,e,f){var z=this;var y=d.style;var g=jQuery.css(d,"display");y.overflow="hidden";z.a=function(){if(e.step)e.step.apply(d,[z.now]);if(f=="opacity")jQuery.attr(y,"opacity",z.now);else if(parseInt(z.now))y[f]=parseInt(z.now)+"px";y.display="block"};z.max=function(){return parseFloat(jQuery.css(d,f))};z.cur=function(){var r=parseFloat(jQuery.curCSS(d,f));return r&&r>-10000?r:z.max()};z.custom=function(a,b){z.startTime=(new Date()).getTime();z.now=a;z.a();z.timer=setInterval(function(){z.step(a,b)},13)};z.show=function(){if(!d.orig)d.orig={};d.orig[f]=this.cur();e.show=true;z.custom(0,d.orig[f]);if(f!="opacity")y[f]="1px"};z.hide=function(){if(!d.orig)d.orig={};d.orig[f]=this.cur();e.hide=true;z.custom(d.orig[f],0)};z.toggle=function(){if(!d.orig)d.orig={};d.orig[f]=this.cur();if(g=="none"){e.show=true;if(f!="opacity")y[f]="1px";z.custom(0,d.orig[f])}else{e.hide=true;z.custom(d.orig[f],0)}};z.step=function(a,b){var t=(new Date()).getTime();if(t>e.duration+z.startTime){clearInterval(z.timer);z.timer=null;z.now=b;z.a();if(d.curAnim)d.curAnim[f]=true;var c=true;for(var i in d.curAnim)if(d.curAnim[i]!==true)c=false;if(c){y.overflow="";y.display=g;if(jQuery.css(d,"display")=="none")y.display="block";if(e.hide)y.display="none";if(e.hide||e.show)for(var p in d.curAnim)if(p=="opacity")jQuery.attr(y,p,d.orig[p]);else y[p]=""}if(c&&jQuery.isFunction(e.complete))e.complete.apply(d)}else{var n=t-this.startTime;var p=n/e.duration;z.now=e.easing&&jQuery.easing[e.easing]?jQuery.easing[e.easing](p,n,a,(b-a),e.duration):((-Math.cos(p*Math.PI)/2)+0.5)*(b-a)+a;z.a()}}}})}jQuery.iAutoscroller={timer:null,elToScroll:null,elsToScroll:null,step:10,start:function(a,b,c,d){jQuery.iAutoscroller.elToScroll=a;jQuery.iAutoscroller.elsToScroll=b;jQuery.iAutoscroller.step=parseInt(c)||10;jQuery.iAutoscroller.timer=window.setInterval(jQuery.iAutoscroller.doScroll,parseInt(d)||40)},doScroll:function(){for(i=0;i<jQuery.iAutoscroller.elsToScroll.length;i++){if(!jQuery.iAutoscroller.elsToScroll[i].parentData){jQuery.iAutoscroller.elsToScroll[i].parentData=jQuery.extend(jQuery.iUtil.getPositionLite(jQuery.iAutoscroller.elsToScroll[i]),jQuery.iUtil.getSizeLite(jQuery.iAutoscroller.elsToScroll[i]),jQuery.iUtil.getScroll(jQuery.iAutoscroller.elsToScroll[i]))}else{jQuery.iAutoscroller.elsToScroll[i].parentData.t=jQuery.iAutoscroller.elsToScroll[i].scrollTop;jQuery.iAutoscroller.elsToScroll[i].parentData.l=jQuery.iAutoscroller.elsToScroll[i].scrollLeft}if(jQuery.iAutoscroller.elToScroll.dragCfg&&jQuery.iAutoscroller.elToScroll.dragCfg.init==true){elementData={x:jQuery.iAutoscroller.elToScroll.dragCfg.nx,y:jQuery.iAutoscroller.elToScroll.dragCfg.ny,wb:jQuery.iAutoscroller.elToScroll.dragCfg.oC.wb,hb:jQuery.iAutoscroller.elToScroll.dragCfg.oC.hb}}else{elementData=jQuery.extend(jQuery.iUtil.getPositionLite(jQuery.iAutoscroller.elToScroll),jQuery.iUtil.getSizeLite(jQuery.iAutoscroller.elToScroll))}if(jQuery.iAutoscroller.elsToScroll[i].parentData.t>0&&jQuery.iAutoscroller.elsToScroll[i].parentData.y+jQuery.iAutoscroller.elsToScroll[i].parentData.t>elementData.y){jQuery.iAutoscroller.elsToScroll[i].scrollTop-=jQuery.iAutoscroller.step}else if(jQuery.iAutoscroller.elsToScroll[i].parentData.t<=jQuery.iAutoscroller.elsToScroll[i].parentData.h&&jQuery.iAutoscroller.elsToScroll[i].parentData.t+jQuery.iAutoscroller.elsToScroll[i].parentData.hb<elementData.y+elementData.hb){jQuery.iAutoscroller.elsToScroll[i].scrollTop+=jQuery.iAutoscroller.step}if(jQuery.iAutoscroller.elsToScroll[i].parentData.l>0&&jQuery.iAutoscroller.elsToScroll[i].parentData.x+jQuery.iAutoscroller.elsToScroll[i].parentData.l>elementData.x){jQuery.iAutoscroller.elsToScroll[i].scrollLeft-=jQuery.iAutoscroller.step}else if(jQuery.iAutoscroller.elsToScroll[i].parentData.l<=jQuery.iAutoscroller.elsToScroll[i].parentData.wh&&jQuery.iAutoscroller.elsToScroll[i].parentData.l+jQuery.iAutoscroller.elsToScroll[i].parentData.wb<elementData.x+elementData.wb){jQuery.iAutoscroller.elsToScroll[i].scrollLeft+=jQuery.iAutoscroller.step}}},stop:function(){window.clearInterval(jQuery.iAutoscroller.timer);jQuery.iAutoscroller.elToScroll=null;jQuery.iAutoscroller.elsToScroll=null;for(i in jQuery.iAutoscroller.elsToScroll){jQuery.iAutoscroller.elsToScroll[i].parentData=null}}};jQuery.iDrag={helper:null,dragged:null,destroy:function(){return this.each(function(){if(this.isDraggable){this.dragCfg.dhe.unbind('mousedown',jQuery.iDrag.draginit);this.dragCfg=null;this.isDraggable=false;if(jQuery.browser.msie){this.unselectable="off"}else{this.style.MozUserSelect='';this.style.KhtmlUserSelect='';this.style.userSelect=''}}})},draginit:function(e){if(jQuery.iDrag.dragged!=null){jQuery.iDrag.dragstop(e);return false}var a=this.dragElem;jQuery(document).bind('mousemove',jQuery.iDrag.dragmove).bind('mouseup',jQuery.iDrag.dragstop);a.dragCfg.pointer=jQuery.iUtil.getPointer(e);a.dragCfg.currentPointer=a.dragCfg.pointer;a.dragCfg.init=false;a.dragCfg.fromHandler=this!=this.dragElem;jQuery.iDrag.dragged=a;if(a.dragCfg.si&&this!=this.dragElem){parentPos=jQuery.iUtil.getPosition(a.parentNode);sliderSize=jQuery.iUtil.getSize(a);sliderPos={x:parseInt(jQuery.css(a,'left'))||0,y:parseInt(jQuery.css(a,'top'))||0};dx=a.dragCfg.currentPointer.x-parentPos.x-sliderSize.wb/2-sliderPos.x;dy=a.dragCfg.currentPointer.y-parentPos.y-sliderSize.hb/2-sliderPos.y;jQuery.iSlider.dragmoveBy(a,[dx,dy])}return jQuery.selectKeyHelper||false},dragstart:function(e){var a=jQuery.iDrag.dragged;a.dragCfg.init=true;var b=a.style;a.dragCfg.oD=jQuery.css(a,'display');a.dragCfg.oP=jQuery.css(a,'position');if(!a.dragCfg.initialPosition)a.dragCfg.initialPosition=a.dragCfg.oP;a.dragCfg.oR={x:parseInt(jQuery.css(a,'left'))||0,y:parseInt(jQuery.css(a,'top'))||0};a.dragCfg.diffX=0;a.dragCfg.diffY=0;if(jQuery.browser.msie){var c=jQuery.iUtil.getBorder(a,true);a.dragCfg.diffX=c.l||0;a.dragCfg.diffY=c.t||0}a.dragCfg.oC=jQuery.extend(jQuery.iUtil.getPosition(a),jQuery.iUtil.getSize(a));if(a.dragCfg.oP!='relative'&&a.dragCfg.oP!='absolute'){b.position='relative'}jQuery.iDrag.helper.empty();var d=a.cloneNode(true);jQuery(d).css({display:'block',left:'0px',top:'0px'});d.style.marginTop='0';d.style.marginRight='0';d.style.marginBottom='0';d.style.marginLeft='0';jQuery.iDrag.helper.append(d);var f=jQuery.iDrag.helper.get(0).style;if(a.dragCfg.autoSize){f.width='auto';f.height='auto'}else{f.height=a.dragCfg.oC.hb+'px';f.width=a.dragCfg.oC.wb+'px'}f.display='block';f.marginTop='0px';f.marginRight='0px';f.marginBottom='0px';f.marginLeft='0px';jQuery.extend(a.dragCfg.oC,jQuery.iUtil.getSize(d));if(a.dragCfg.cursorAt){if(a.dragCfg.cursorAt.left){a.dragCfg.oR.x+=a.dragCfg.pointer.x-a.dragCfg.oC.x-a.dragCfg.cursorAt.left;a.dragCfg.oC.x=a.dragCfg.pointer.x-a.dragCfg.cursorAt.left}if(a.dragCfg.cursorAt.top){a.dragCfg.oR.y+=a.dragCfg.pointer.y-a.dragCfg.oC.y-a.dragCfg.cursorAt.top;a.dragCfg.oC.y=a.dragCfg.pointer.y-a.dragCfg.cursorAt.top}if(a.dragCfg.cursorAt.right){a.dragCfg.oR.x+=a.dragCfg.pointer.x-a.dragCfg.oC.x-a.dragCfg.oC.hb+a.dragCfg.cursorAt.right;a.dragCfg.oC.x=a.dragCfg.pointer.x-a.dragCfg.oC.wb+a.dragCfg.cursorAt.right}if(a.dragCfg.cursorAt.bottom){a.dragCfg.oR.y+=a.dragCfg.pointer.y-a.dragCfg.oC.y-a.dragCfg.oC.hb+a.dragCfg.cursorAt.bottom;a.dragCfg.oC.y=a.dragCfg.pointer.y-a.dragCfg.oC.hb+a.dragCfg.cursorAt.bottom}}a.dragCfg.nx=a.dragCfg.oR.x;a.dragCfg.ny=a.dragCfg.oR.y;if(a.dragCfg.insideParent||a.dragCfg.containment=='parent'){parentBorders=jQuery.iUtil.getBorder(a.parentNode,true);a.dragCfg.oC.x=a.offsetLeft+(jQuery.browser.msie?0:jQuery.browser.opera?-parentBorders.l:parentBorders.l);a.dragCfg.oC.y=a.offsetTop+(jQuery.browser.msie?0:jQuery.browser.opera?-parentBorders.t:parentBorders.t);jQuery(a.parentNode).append(jQuery.iDrag.helper.get(0))}if(a.dragCfg.containment){jQuery.iDrag.getContainment(a);a.dragCfg.onDragModifier.containment=jQuery.iDrag.fitToContainer}if(a.dragCfg.si){jQuery.iSlider.modifyContainer(a)}f.left=a.dragCfg.oC.x-a.dragCfg.diffX+'px';f.top=a.dragCfg.oC.y-a.dragCfg.diffY+'px';f.width=a.dragCfg.oC.wb+'px';f.height=a.dragCfg.oC.hb+'px';jQuery.iDrag.dragged.dragCfg.prot=false;if(a.dragCfg.gx){a.dragCfg.onDragModifier.grid=jQuery.iDrag.snapToGrid}if(a.dragCfg.zIndex!=false){jQuery.iDrag.helper.css('zIndex',a.dragCfg.zIndex)}if(a.dragCfg.opacity){jQuery.iDrag.helper.css('opacity',a.dragCfg.opacity);if(window.ActiveXObject){jQuery.iDrag.helper.css('filter','alpha(opacity='+a.dragCfg.opacity*100+')')}}if(a.dragCfg.frameClass){jQuery.iDrag.helper.addClass(a.dragCfg.frameClass);jQuery.iDrag.helper.get(0).firstChild.style.display='none'}if(a.dragCfg.onStart)a.dragCfg.onStart.apply(a,[d,a.dragCfg.oR.x,a.dragCfg.oR.y]);if(jQuery.iDrop&&jQuery.iDrop.count>0){jQuery.iDrop.highlight(a)}if(a.dragCfg.ghosting==false){b.display='none'}return false},getContainment:function(a){if(a.dragCfg.containment.constructor==String){if(a.dragCfg.containment=='parent'){a.dragCfg.cont=jQuery.extend({x:0,y:0},jQuery.iUtil.getSize(a.parentNode));var b=jQuery.iUtil.getBorder(a.parentNode,true);a.dragCfg.cont.w=a.dragCfg.cont.wb-b.l-b.r;a.dragCfg.cont.h=a.dragCfg.cont.hb-b.t-b.b}else if(a.dragCfg.containment=='document'){var c=jQuery.iUtil.getClient();a.dragCfg.cont={x:0,y:0,w:c.w,h:c.h}}}else if(a.dragCfg.containment.constructor==Array){a.dragCfg.cont={x:parseInt(a.dragCfg.containment[0])||0,y:parseInt(a.dragCfg.containment[1])||0,w:parseInt(a.dragCfg.containment[2])||0,h:parseInt(a.dragCfg.containment[3])||0}}a.dragCfg.cont.dx=a.dragCfg.cont.x-a.dragCfg.oC.x;a.dragCfg.cont.dy=a.dragCfg.cont.y-a.dragCfg.oC.y},hidehelper:function(a){if(a.dragCfg.insideParent||a.dragCfg.containment=='parent'){jQuery('body',document).append(jQuery.iDrag.helper.get(0))}jQuery.iDrag.helper.empty().hide().css('opacity',1);if(window.ActiveXObject){jQuery.iDrag.helper.css('filter','alpha(opacity=100)')}},dragstop:function(e){jQuery(document).unbind('mousemove',jQuery.iDrag.dragmove).unbind('mouseup',jQuery.iDrag.dragstop);if(jQuery.iDrag.dragged==null){return}var a=jQuery.iDrag.dragged;jQuery.iDrag.dragged=null;if(a.dragCfg.init==false){return false}if(a.dragCfg.so==true){jQuery(a).css('position',a.dragCfg.oP)}var b=a.style;if(a.si){jQuery.iDrag.helper.css('cursor','move')}if(a.dragCfg.frameClass){jQuery.iDrag.helper.removeClass(a.dragCfg.frameClass)}if(a.dragCfg.revert==false){if(a.dragCfg.fx>0){if(!a.dragCfg.axis||a.dragCfg.axis=='horizontally'){var x=new jQuery.fx(a,{duration:a.dragCfg.fx},'left');x.custom(a.dragCfg.oR.x,a.dragCfg.nRx)}if(!a.dragCfg.axis||a.dragCfg.axis=='vertically'){var y=new jQuery.fx(a,{duration:a.dragCfg.fx},'top');y.custom(a.dragCfg.oR.y,a.dragCfg.nRy)}}else{if(!a.dragCfg.axis||a.dragCfg.axis=='horizontally')a.style.left=a.dragCfg.nRx+'px';if(!a.dragCfg.axis||a.dragCfg.axis=='vertically')a.style.top=a.dragCfg.nRy+'px'}jQuery.iDrag.hidehelper(a);if(a.dragCfg.ghosting==false){jQuery(a).css('display',a.dragCfg.oD)}}else if(a.dragCfg.fx>0){a.dragCfg.prot=true;var c=false;if(jQuery.iDrop&&jQuery.iSort&&a.dragCfg.so){c=jQuery.iUtil.getPosition(jQuery.iSort.helper.get(0))}jQuery.iDrag.helper.animate({left:c?c.x:a.dragCfg.oC.x,top:c?c.y:a.dragCfg.oC.y},a.dragCfg.fx,function(){a.dragCfg.prot=false;if(a.dragCfg.ghosting==false){a.style.display=a.dragCfg.oD}jQuery.iDrag.hidehelper(a)})}else{jQuery.iDrag.hidehelper(a);if(a.dragCfg.ghosting==false){jQuery(a).css('display',a.dragCfg.oD)}}if(jQuery.iDrop&&jQuery.iDrop.count>0){jQuery.iDrop.checkdrop(a)}if(jQuery.iSort&&a.dragCfg.so){jQuery.iSort.check(a)}if(a.dragCfg.onChange&&(a.dragCfg.nRx!=a.dragCfg.oR.x||a.dragCfg.nRy!=a.dragCfg.oR.y)){a.dragCfg.onChange.apply(a,a.dragCfg.lastSi||[0,0,a.dragCfg.nRx,a.dragCfg.nRy])}if(a.dragCfg.onStop)a.dragCfg.onStop.apply(a);return false},snapToGrid:function(x,y,a,b){if(a!=0)a=parseInt((a+(this.dragCfg.gx*a/Math.abs(a))/2)/this.dragCfg.gx)*this.dragCfg.gx;if(b!=0)b=parseInt((b+(this.dragCfg.gy*b/Math.abs(b))/2)/this.dragCfg.gy)*this.dragCfg.gy;return{dx:a,dy:b,x:0,y:0}},fitToContainer:function(x,y,a,b){a=Math.min(Math.max(a,this.dragCfg.cont.dx),this.dragCfg.cont.w+this.dragCfg.cont.dx-this.dragCfg.oC.wb);b=Math.min(Math.max(b,this.dragCfg.cont.dy),this.dragCfg.cont.h+this.dragCfg.cont.dy-this.dragCfg.oC.hb);return{dx:a,dy:b,x:0,y:0}},dragmove:function(e){if(jQuery.iDrag.dragged==null||jQuery.iDrag.dragged.dragCfg.prot==true){return}var a=jQuery.iDrag.dragged;a.dragCfg.currentPointer=jQuery.iUtil.getPointer(e);if(a.dragCfg.init==false){distance=Math.sqrt(Math.pow(a.dragCfg.pointer.x-a.dragCfg.currentPointer.x,2)+Math.pow(a.dragCfg.pointer.y-a.dragCfg.currentPointer.y,2));if(distance<a.dragCfg.snapDistance){return}else{jQuery.iDrag.dragstart(e)}}var b=a.dragCfg.currentPointer.x-a.dragCfg.pointer.x;var c=a.dragCfg.currentPointer.y-a.dragCfg.pointer.y;for(var i in a.dragCfg.onDragModifier){var d=a.dragCfg.onDragModifier[i].apply(a,[a.dragCfg.oR.x+b,a.dragCfg.oR.y+c,b,c]);if(d&&d.constructor==Object){b=i!='user'?d.dx:(d.x-a.dragCfg.oR.x);c=i!='user'?d.dy:(d.y-a.dragCfg.oR.y)}}a.dragCfg.nx=a.dragCfg.oC.x+b-a.dragCfg.diffX;a.dragCfg.ny=a.dragCfg.oC.y+c-a.dragCfg.diffY;if(a.dragCfg.si&&(a.dragCfg.onSlide||a.dragCfg.onChange)){jQuery.iSlider.onSlide(a,a.dragCfg.nx,a.dragCfg.ny)}if(a.dragCfg.onDrag)a.dragCfg.onDrag.apply(a,[a.dragCfg.oR.x+b,a.dragCfg.oR.y+c]);if(!a.dragCfg.axis||a.dragCfg.axis=='horizontally'){a.dragCfg.nRx=a.dragCfg.oR.x+b;jQuery.iDrag.helper.get(0).style.left=a.dragCfg.nx+'px'}if(!a.dragCfg.axis||a.dragCfg.axis=='vertically'){a.dragCfg.nRy=a.dragCfg.oR.y+c;jQuery.iDrag.helper.get(0).style.top=a.dragCfg.ny+'px'}if(jQuery.iDrop&&jQuery.iDrop.count>0){jQuery.iDrop.checkhover(a)}return false},build:function(o){if(!jQuery.iDrag.helper){jQuery('body',document).append('<div id="dragHelper"></div>');jQuery.iDrag.helper=jQuery('#dragHelper');var c=jQuery.iDrag.helper.get(0);var d=c.style;d.position='absolute';d.display='none';d.cursor='move';d.listStyle='none';d.overflow='hidden';if(window.ActiveXObject){c.unselectable="on"}else{d.mozUserSelect='none';d.userSelect='none';d.KhtmlUserSelect='none'}}if(!o){o={}}return this.each(function(){if(this.isDraggable||!jQuery.iUtil)return;if(window.ActiveXObject){this.onselectstart=function(){return false};this.ondragstart=function(){return false}}var a=this;var b=o.handle?jQuery(this).find(o.handle):jQuery(this);if(jQuery.browser.msie){b.each(function(){this.unselectable="on"})}else{b.css('-moz-user-select','none');b.css('user-select','none');b.css('-khtml-user-select','none')}this.dragCfg={dhe:b,revert:o.revert?true:false,ghosting:o.ghosting?true:false,so:o.so?o.so:false,si:o.si?o.si:false,insideParent:o.insideParent?o.insideParent:false,zIndex:o.zIndex?parseInt(o.zIndex)||0:false,opacity:o.opacity?parseFloat(o.opacity):false,fx:parseInt(o.fx)||null,hpc:o.hpc?o.hpc:false,onDragModifier:{},pointer:{},onStart:o.onStart&&o.onStart.constructor==Function?o.onStart:false,onStop:o.onStop&&o.onStop.constructor==Function?o.onStop:false,onChange:o.onChange&&o.onChange.constructor==Function?o.onChange:false,axis:/vertically|horizontally/.test(o.axis)?o.axis:false,snapDistance:o.snapDistance?parseInt(o.snapDistance)||0:0,cursorAt:o.cursorAt?o.cursorAt:false,autoSize:o.autoSize?true:false,frameClass:o.frameClass||false};if(o.onDragModifier&&o.onDragModifier.constructor==Function)this.dragCfg.onDragModifier.user=o.onDragModifier;if(o.onDrag&&o.onDrag.constructor==Function)this.dragCfg.onDrag=o.onDrag;if(o.containment&&((o.containment.constructor==String&&(o.containment=='parent'||o.containment=='document'))||(o.containment.constructor==Array&&o.containment.length==4))){this.dragCfg.containment=o.containment}if(o.fractions){this.dragCfg.fractions=o.fractions}if(o.grid){if(typeof o.grid=='number'){this.dragCfg.gx=parseInt(o.grid)||1;this.dragCfg.gy=parseInt(o.grid)||1}else if(o.grid.length==2){this.dragCfg.gx=parseInt(o.grid[0])||1;this.dragCfg.gy=parseInt(o.grid[1])||1}}if(o.onSlide&&o.onSlide.constructor==Function){this.dragCfg.onSlide=o.onSlide}this.isDraggable=true;b.each(function(){this.dragElem=a});b.bind('mousedown',jQuery.iDrag.draginit)})}};jQuery.fn.extend({DraggableDestroy:jQuery.iDrag.destroy,Draggable:jQuery.iDrag.build});jQuery.iDrop={fit:function(a,b,c,d){return a<=jQuery.iDrag.dragged.dragCfg.nx&&(a+c)>=(jQuery.iDrag.dragged.dragCfg.nx+jQuery.iDrag.dragged.dragCfg.oC.w)&&b<=jQuery.iDrag.dragged.dragCfg.ny&&(b+d)>=(jQuery.iDrag.dragged.dragCfg.ny+jQuery.iDrag.dragged.dragCfg.oC.h)?true:false},intersect:function(a,b,c,d){return!(a>(jQuery.iDrag.dragged.dragCfg.nx+jQuery.iDrag.dragged.dragCfg.oC.w)||(a+c)<jQuery.iDrag.dragged.dragCfg.nx||b>(jQuery.iDrag.dragged.dragCfg.ny+jQuery.iDrag.dragged.dragCfg.oC.h)||(b+d)<jQuery.iDrag.dragged.dragCfg.ny)?true:false},pointer:function(a,b,c,d){return a<jQuery.iDrag.dragged.dragCfg.currentPointer.x&&(a+c)>jQuery.iDrag.dragged.dragCfg.currentPointer.x&&b<jQuery.iDrag.dragged.dragCfg.currentPointer.y&&(b+d)>jQuery.iDrag.dragged.dragCfg.currentPointer.y?true:false},overzone:false,highlighted:{},count:0,zones:{},highlight:function(a){if(jQuery.iDrag.dragged==null){return}var i;jQuery.iDrop.highlighted={};var b=false;for(i in jQuery.iDrop.zones){if(jQuery.iDrop.zones[i]!=null){var c=jQuery.iDrop.zones[i].get(0);if(jQuery(jQuery.iDrag.dragged).is('.'+c.dropCfg.a)){if(c.dropCfg.m==false){c.dropCfg.p=jQuery.extend(jQuery.iUtil.getPositionLite(c),jQuery.iUtil.getSizeLite(c));c.dropCfg.m=true}if(c.dropCfg.ac){jQuery.iDrop.zones[i].addClass(c.dropCfg.ac)}jQuery.iDrop.highlighted[i]=jQuery.iDrop.zones[i];if(jQuery.iSort&&c.dropCfg.s&&jQuery.iDrag.dragged.dragCfg.so){c.dropCfg.el=jQuery('.'+c.dropCfg.a,c);a.style.display='none';jQuery.iSort.measure(c);c.dropCfg.os=jQuery.iSort.serialize(jQuery.attr(c,'id')).hash;a.style.display=a.dragCfg.oD;b=true}if(c.dropCfg.onActivate){c.dropCfg.onActivate.apply(jQuery.iDrop.zones[i].get(0),[jQuery.iDrag.dragged])}}}}if(b){jQuery.iSort.start()}},remeasure:function(){jQuery.iDrop.highlighted={};for(i in jQuery.iDrop.zones){if(jQuery.iDrop.zones[i]!=null){var a=jQuery.iDrop.zones[i].get(0);if(jQuery(jQuery.iDrag.dragged).is('.'+a.dropCfg.a)){a.dropCfg.p=jQuery.extend(jQuery.iUtil.getPositionLite(a),jQuery.iUtil.getSizeLite(a));if(a.dropCfg.ac){jQuery.iDrop.zones[i].addClass(a.dropCfg.ac)}jQuery.iDrop.highlighted[i]=jQuery.iDrop.zones[i];if(jQuery.iSort&&a.dropCfg.s&&jQuery.iDrag.dragged.dragCfg.so){a.dropCfg.el=jQuery('.'+a.dropCfg.a,a);elm.style.display='none';jQuery.iSort.measure(a);elm.style.display=elm.dragCfg.oD}}}}},checkhover:function(e){if(jQuery.iDrag.dragged==null){return}jQuery.iDrop.overzone=false;var i;var a=false;var b=0;for(i in jQuery.iDrop.highlighted){var c=jQuery.iDrop.highlighted[i].get(0);if(jQuery.iDrop.overzone==false&&jQuery.iDrop[c.dropCfg.t](c.dropCfg.p.x,c.dropCfg.p.y,c.dropCfg.p.wb,c.dropCfg.p.hb)){if(c.dropCfg.hc&&c.dropCfg.h==false){jQuery.iDrop.highlighted[i].addClass(c.dropCfg.hc)}if(c.dropCfg.h==false&&c.dropCfg.onHover){a=true}c.dropCfg.h=true;jQuery.iDrop.overzone=c;if(jQuery.iSort&&c.dropCfg.s&&jQuery.iDrag.dragged.dragCfg.so){jQuery.iSort.helper.get(0).className=c.dropCfg.shc;jQuery.iSort.checkhover(c)}b++}else if(c.dropCfg.h==true){if(c.dropCfg.onOut){c.dropCfg.onOut.apply(c,[e,jQuery.iDrag.helper.get(0).firstChild,c.dropCfg.fx])}if(c.dropCfg.hc){jQuery.iDrop.highlighted[i].removeClass(c.dropCfg.hc)}c.dropCfg.h=false}}if(jQuery.iSort&&!jQuery.iDrop.overzone&&jQuery.iDrag.dragged.so){jQuery.iSort.helper.get(0).style.display='none'}if(a){jQuery.iDrop.overzone.dropCfg.onHover.apply(jQuery.iDrop.overzone,[e,jQuery.iDrag.helper.get(0).firstChild])}},checkdrop:function(e){var i;for(i in jQuery.iDrop.highlighted){var a=jQuery.iDrop.highlighted[i].get(0);if(a.dropCfg.ac){jQuery.iDrop.highlighted[i].removeClass(a.dropCfg.ac)}if(a.dropCfg.hc){jQuery.iDrop.highlighted[i].removeClass(a.dropCfg.hc)}if(a.dropCfg.s){jQuery.iSort.changed[jQuery.iSort.changed.length]=i}if(a.dropCfg.onDrop&&a.dropCfg.h==true){a.dropCfg.h=false;a.dropCfg.onDrop.apply(a,[e,a.dropCfg.fx])}a.dropCfg.m=false;a.dropCfg.h=false}jQuery.iDrop.highlighted={}},destroy:function(){return this.each(function(){if(this.isDroppable){if(this.dropCfg.s){id=jQuery.attr(this,'id');jQuery.iSort.collected[id]=null;jQuery('.'+this.dropCfg.a,this).DraggableDestroy()}jQuery.iDrop.zones['d'+this.idsa]=null;this.isDroppable=false;this.f=null}})},build:function(o){return this.each(function(){if(this.isDroppable==true||!o.accept||!jQuery.iUtil||!jQuery.iDrag){return}this.dropCfg={a:o.accept,ac:o.activeclass||false,hc:o.hoverclass||false,shc:o.helperclass||false,onDrop:o.ondrop||o.onDrop||false,onHover:o.onHover||o.onhover||false,onOut:o.onOut||o.onout||false,onActivate:o.onActivate||false,t:o.tolerance&&(o.tolerance=='fit'||o.tolerance=='intersect')?o.tolerance:'pointer',fx:o.fx?o.fx:false,m:false,h:false};if(o.sortable==true&&jQuery.iSort){id=jQuery.attr(this,'id');jQuery.iSort.collected[id]=this.dropCfg.a;this.dropCfg.s=true;if(o.onChange){this.dropCfg.onChange=o.onChange;this.dropCfg.os=jQuery.iSort.serialize(id).hash}}this.isDroppable=true;this.idsa=parseInt(Math.random()*10000);jQuery.iDrop.zones['d'+this.idsa]=jQuery(this);jQuery.iDrop.count++})}};jQuery.fn.extend({DroppableDestroy:jQuery.iDrop.destroy,Droppable:jQuery.iDrop.build});jQuery.recallDroppables=jQuery.iDrop.remeasure;jQuery.iSort={changed:[],collected:{},helper:false,inFrontOf:null,start:function(){if(jQuery.iDrag.dragged==null){return}var a,margins,c,cs;jQuery.iSort.helper.get(0).className=jQuery.iDrag.dragged.dragCfg.hpc;a=jQuery.iSort.helper.get(0).style;a.display='block';jQuery.iSort.helper.oC=jQuery.extend(jQuery.iUtil.getPosition(jQuery.iSort.helper.get(0)),jQuery.iUtil.getSize(jQuery.iSort.helper.get(0)));a.width=jQuery.iDrag.dragged.dragCfg.oC.wb+'px';a.height=jQuery.iDrag.dragged.dragCfg.oC.hb+'px';margins=jQuery.iUtil.getMargins(jQuery.iDrag.dragged);a.marginTop=margins.t;a.marginRight=margins.r;a.marginBottom=margins.b;a.marginLeft=margins.l;if(jQuery.iDrag.dragged.dragCfg.ghosting==true){c=jQuery.iDrag.dragged.cloneNode(true);cs=c.style;cs.marginTop='0px';cs.marginRight='0px';cs.marginBottom='0px';cs.marginLeft='0px';cs.display='block';jQuery.iSort.helper.empty().append(c)}jQuery(jQuery.iDrag.dragged).after(jQuery.iSort.helper.get(0));jQuery.iDrag.dragged.style.display='none'},check:function(e){if(!e.dragCfg.so&&jQuery.iDrop.overzone.sortable){if(e.dragCfg.onStop)e.dragCfg.onStop.apply(dragged);jQuery(e).css('position',e.dragCfg.initialPosition||e.dragCfg.oP);jQuery(e).DraggableDestroy();jQuery(jQuery.iDrop.overzone).SortableAddItem(e)}jQuery.iSort.helper.removeClass(e.dragCfg.hpc).html('&nbsp;');jQuery.iSort.inFrontOf=null;var a=jQuery.iSort.helper.get(0).style;a.display='none';jQuery.iSort.helper.after(e);if(e.dragCfg.fx>0){jQuery(e).fadeIn(e.dragCfg.fx)}jQuery('body').append(jQuery.iSort.helper.get(0));var b=[];var c=false;for(var i=0;i<jQuery.iSort.changed.length;i++){var d=jQuery.iDrop.zones[jQuery.iSort.changed[i]].get(0);var f=jQuery.attr(d,'id');var g=jQuery.iSort.serialize(f);if(d.dropCfg.os!=g.hash){d.dropCfg.os=g.hash;if(c==false&&d.dropCfg.onChange){c=d.dropCfg.onChange}g.id=f;b[b.length]=g}}jQuery.iSort.changed=[];if(c!=false&&b.length>0){c(b)}},checkhover:function(e,o){if(!jQuery.iDrag.dragged)return;var a=false;var i=0;if(e.dropCfg.el.size()>0){for(i=e.dropCfg.el.size();i>0;i--){if(e.dropCfg.el.get(i-1)!=jQuery.iDrag.dragged){if(!e.sortCfg.floats){if((e.dropCfg.el.get(i-1).pos.y+e.dropCfg.el.get(i-1).pos.hb/2)>jQuery.iDrag.dragged.dragCfg.ny){a=e.dropCfg.el.get(i-1)}else{break}}else{if((e.dropCfg.el.get(i-1).pos.x+e.dropCfg.el.get(i-1).pos.wb/2)>jQuery.iDrag.dragged.dragCfg.nx&&(e.dropCfg.el.get(i-1).pos.y+e.dropCfg.el.get(i-1).pos.hb/2)>jQuery.iDrag.dragged.dragCfg.ny){a=e.dropCfg.el.get(i-1)}}}}}if(a&&jQuery.iSort.inFrontOf!=a){jQuery.iSort.inFrontOf=a;jQuery(a).before(jQuery.iSort.helper.get(0))}else if(!a&&(jQuery.iSort.inFrontOf!=null||jQuery.iSort.helper.get(0).parentNode!=e)){jQuery.iSort.inFrontOf=null;jQuery(e).append(jQuery.iSort.helper.get(0))}jQuery.iSort.helper.get(0).style.display='block'},measure:function(e){if(jQuery.iDrag.dragged==null){return}e.dropCfg.el.each(function(){this.pos=jQuery.extend(jQuery.iUtil.getSizeLite(this),jQuery.iUtil.getPositionLite(this))})},serialize:function(s){var i;var h='';var o={};if(s){if(jQuery.iSort.collected[s]){o[s]=[];jQuery('#'+s+' .'+jQuery.iSort.collected[s]).each(function(){if(h.length>0){h+='&'}h+=s+'[]='+jQuery.attr(this,'id');o[s][o[s].length]=jQuery.attr(this,'id')})}else{for(a in s){if(jQuery.iSort.collected[s[a]]){o[s[a]]=[];jQuery('#'+s[a]+' .'+jQuery.iSort.collected[s[a]]).each(function(){if(h.length>0){h+='&'}h+=s[a]+'[]='+jQuery.attr(this,'id');o[s[a]][o[s[a]].length]=jQuery.attr(this,'id')})}}}}else{for(i in jQuery.iSort.collected){o[i]=[];jQuery('#'+i+' .'+jQuery.iSort.collected[i]).each(function(){if(h.length>0){h+='&'}h+=i+'[]='+jQuery.attr(this,'id');o[i][o[i].length]=jQuery.attr(this,'id')})}}return{hash:h,o:o}},addItem:function(e){if(!e.childNodes){return}return this.each(function(){if(!this.sortCfg||!jQuery(e).is('.'+this.sortCfg.accept))jQuery(e).addClass(this.sortCfg.accept);jQuery(e).Draggable(this.sortCfg.dragCfg)})},destroy:function(){return this.each(function(){jQuery('.'+this.sortCfg.accept).DraggableDestroy();jQuery(this).DroppableDestroy();this.sortCfg=null;this.isSortable=null})},build:function(o){if(o.accept&&jQuery.iUtil&&jQuery.iDrag&&jQuery.iDrop){if(!jQuery.iSort.helper){jQuery('body',document).append('<div id="sortHelper">&nbsp;</div>');jQuery.iSort.helper=jQuery('#sortHelper');jQuery.iSort.helper.get(0).style.display='none'}this.Droppable({accept:o.accept,activeclass:o.activeclass?o.activeclass:false,hoverclass:o.hoverclass?o.hoverclass:false,helperclass:o.helperclass?o.helperclass:false,onHover:o.onHover||o.onhover,onOut:o.onOut||o.onout,sortable:true,onChange:o.onChange||o.onchange,fx:o.fx?o.fx:false,ghosting:o.ghosting?true:false,tolerance:o.tolerance?o.tolerance:'intersect'});return this.each(function(){var a={revert:o.revert?true:false,zindex:3000,opacity:o.opacity?parseFloat(o.opacity):false,hpc:o.helperclass?o.helperclass:false,fx:o.fx?o.fx:false,so:true,ghosting:o.ghosting?true:false,handle:o.handle?o.handle:null,containment:o.containment?o.containment:null,onStart:o.onStart&&o.onStart.constructor==Function?o.onStart:false,onDrag:o.onDrag&&o.onDrag.constructor==Function?o.onDrag:false,onStop:o.onStop&&o.onStop.constructor==Function?o.onStop:false,axis:/vertically|horizontally/.test(o.axis)?o.axis:false,snapDistance:o.snapDistance?parseInt(o.snapDistance)||0:false,cursorAt:o.cursorAt?o.cursorAt:false};jQuery('.'+o.accept,this).Draggable(a);this.isSortable=true;this.sortCfg={accept:o.accept,revert:o.revert?true:false,zindex:3000,opacity:o.opacity?parseFloat(o.opacity):false,hpc:o.helperclass?o.helperclass:false,fx:o.fx?o.fx:false,so:true,ghosting:o.ghosting?true:false,handle:o.handle?o.handle:null,containment:o.containment?o.containment:null,floats:o.floats?true:false,dragCfg:a}})}}};jQuery.fn.extend({Sortable:jQuery.iSort.build,SortableAddItem:jQuery.iSort.addItem,SortableDestroy:jQuery.iSort.destroy});jQuery.SortSerialize=jQuery.iSort.serialize;jQuery.iUtil={getPosition:function(e){var x=0;var y=0;var a=e.style;var b=false;if(jQuery(e).css('display')=='none'){var c=a.visibility;var d=a.position;b=true;a.visibility='hidden';a.display='block';a.position='absolute'}var f=e;while(f){x+=f.offsetLeft+(f.currentStyle&&!jQuery.browser.opera?parseInt(f.currentStyle.borderLeftWidth)||0:0);y+=f.offsetTop+(f.currentStyle&&!jQuery.browser.opera?parseInt(f.currentStyle.borderTopWidth)||0:0);f=f.offsetParent}f=e;while(f&&f.tagName&&f.tagName.toLowerCase()!='body'){x-=f.scrollLeft||0;y-=f.scrollTop||0;f=f.parentNode}if(b==true){a.display='none';a.position=d;a.visibility=c}return{x:x,y:y}},getPositionLite:function(a){var x=0,y=0;while(a){x+=a.offsetLeft||0;y+=a.offsetTop||0;a=a.offsetParent}return{x:x,y:y}},getSize:function(e){var w=jQuery.css(e,'width');var h=jQuery.css(e,'height');var a=0;var b=0;var c=e.style;if(jQuery(e).css('display')!='none'){a=e.offsetWidth;b=e.offsetHeight}else{var d=c.visibility;var f=c.position;c.visibility='hidden';c.display='block';c.position='absolute';a=e.offsetWidth;b=e.offsetHeight;c.display='none';c.position=f;c.visibility=d}return{w:w,h:h,wb:a,hb:b}},getSizeLite:function(a){return{wb:a.offsetWidth||0,hb:a.offsetHeight||0}},getClient:function(e){var h,w,de;if(e){w=e.clientWidth;h=e.clientHeight}else{de=document.documentElement;w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight}return{w:w,h:h}},getScroll:function(e){var t=0,l=0,w=0,h=0,iw=0,ih=0;if(e&&e.nodeName.toLowerCase()!='body'){t=e.scrollTop;l=e.scrollLeft;w=e.scrollWidth;h=e.scrollHeight;iw=0;ih=0}else{if(document.documentElement){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight}else if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight}iw=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;ih=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}return{t:t,l:l,w:w,h:h,iw:iw,ih:ih}},getMargins:function(e,a){var c=jQuery(e);var t=c.css('marginTop')||'';var r=c.css('marginRight')||'';var b=c.css('marginBottom')||'';var l=c.css('marginLeft')||'';if(a)return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else return{t:t,r:r,b:b,l:l}},getPadding:function(e,a){var c=jQuery(e);var t=c.css('paddingTop')||'';var r=c.css('paddingRight')||'';var b=c.css('paddingBottom')||'';var l=c.css('paddingLeft')||'';if(a)return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else return{t:t,r:r,b:b,l:l}},getBorder:function(e,a){var c=jQuery(e);var t=c.css('borderTopWidth')||'';var r=c.css('borderRightWidth')||'';var b=c.css('borderBottomWidth')||'';var l=c.css('borderLeftWidth')||'';if(a)return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)||0};else return{t:t,r:r,b:b,l:l}},getPointer:function(a){var x=a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))||0;var y=a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))||0;return{x:x,y:y}},traverseDOM:function(a,b){b(a);a=a.firstChild;while(a){jQuery.iUtil.traverseDOM(a,b);a=a.nextSibling}},purgeEvents:function(c){jQuery.iUtil.traverseDOM(c,function(a){for(var b in a){if(typeof a[b]==='function'){a[b]=null}}})},centerEl:function(a,b){var c=jQuery.iUtil.getScroll();var d=jQuery.iUtil.getSize(a);if(!b||b=='vertically')jQuery(a).css({top:c.t+((Math.max(c.h,c.ih)-c.t-d.hb)/2)+'px'});if(!b||b=='horizontally')jQuery(a).css({left:c.l+((Math.max(c.w,c.iw)-c.l-d.wb)/2)+'px'})},fixPNG:function(a,b){var c=jQuery('img[@src*="png"]',a||document),png;c.each(function(){png=this.src;this.src=b;this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+png+"')"})}};[].indexOf||(Array.prototype.indexOf=function(v,n){n=(n==null)?0:n;var m=this.length;for(var i=n;i<m;i++)if(this[i]==v)return i;return-1});function flyTab(o,a){$('.'+a).removeClass('selected');$(o).addClass('selected');$('.'+a+'c').hide();$('#'+$(o).attr('id')+'c').show();return false}var flyBox={obj:null,root:null,lastMouseX:0,lastMouseY:0,w:0,what:null,href:"",me:null,buffer:'',show:function(a,b){flyBox.what=(b?b:"#flywin");var t=$(a).attr("title");var w=$(a).attr("width")||500;flyBox.w=w;var h=$(a).attr("height");var r=$(a).attr("href");flyBox.close();if(t){$(flyBox.what+"t").html(t).show();$("#flyclose").show()}else{$(flyBox.what+"t").hide();$("#flyclose").hide()}$(flyBox.what+'c').css('height',h?h+"px":'auto');$("#dark").show();$(flyBox.what).css('width',w?w+"px":'auto');flyBox.href=r;flyBox.buffer='';if(jQuery.browser.msie){flyBox.me=a;if(!r)r="#";$(a).attr("href","javascript:void(0);")}if(!r||r.substr(0,1)=="#"){if(r){flyBox.buffer=$(r).html();$(r).empty();$(flyBox.what+"c").html(flyBox.buffer)}flyBox.position();$(flyBox.what).show();try{$(".focus").focus()}catch(e){}}else{$("#spinner").show();$(flyBox.what+"c").load(r,function(){flyBox.position();$(flyBox.what).show();$("#spinner").hide();try{$(".focus").focus()}catch(e){}})}if(flyBox.w)this.dragInit(flyBox.what.substring(1)+"t",flyBox.what.substring(1));return false},close:function(){$(flyBox.what).hide();$("#dark").hide();if(jQuery.browser.msie)$(flyBox.me).attr("href",flyBox.href);if(flyBox.buffer)$(flyBox.href).html(flyBox.buffer);return false},position:function(){var a=document.documentElement;var y=self.pageYOffset||(a&&a.scrollTop)||document.body.scrollTop;var h=window.innerHeight||self.innerHeight||(a&&a.clientHeight)||document.body.clientHeight;$("#dark").css("height",h+y+"px");if(flyBox.w){var w=window.innerWidth||self.innerWidth||(a&&a.clientWidth)||document.body.clientWidth;w=(w/2)-(flyBox.w/2);$(flyBox.what).css({top:100+y,left:w})}else $(flyBox.what).css({top:100+y,left:"50%",marginLeft:"-"+(w)+"px"})},dragInit:function(a,b){flyBox.obj=document.getElementById(a);flyBox.root=document.getElementById(b);$(flyBox.obj).css('cursor','move').bind('mousedown',function(e){flyBox.dragStart(e)})},dragStart:function(e){$(flyBox.root).css('opacity',0.7);flyBox.lastMouseX=e.clientX;flyBox.lastMouseY=e.clientY;$(document).bind('mousemove',function(e){flyBox.drag(e)});$(document).bind('mouseup',function(e){flyBox.dragEnd()});return false},drag:function(e){var x=parseInt(flyBox.root.style.left)+e.clientX-flyBox.lastMouseX;var y=parseInt(flyBox.root.style.top)+e.clientY-flyBox.lastMouseY;flyBox.lastMouseX=e.clientX;flyBox.lastMouseY=e.clientY;flyBox.root.style.left=(x<0?0:x)+"px";flyBox.root.style.top=(y<0?0:y)+"px";return false},dragEnd:function(){$(flyBox.root).css('opacity',1);$(document).unbind('mousemove');$(document).unbind('mouseup');flyBox.obj=null}};var flyMsg={t:null,show:function(s,a){if(flyMsg.t!=null)clearTimeout(flyMsg.t);if(a==undefined)a=5000;if(a)flyMsg.t=setTimeout('flyMsg.hide()',a);$("#flymsg").html(s).show();return false},hide:function(){$("#flymsg").fadeOut();clearTimeout(flyMsg.t);flyMsg.t=null}};var flyMenu={what:null,show:function(a,y,x,b,c){a=jQuery.event.fix(a||window.event||{});if(!c)c=a.target;if(flyMenu.what!=null){if(flyMenu.what==b)return flyMenu.close();flyMenu.close()}flyMenu.what=(b?b:'#flymenu');var d=findPos(c);$(flyMenu.what).css({top:d[1]+y,left:d[0]+x}).show();a.preventDefault();a.stopPropagation();$(document).bind("click",function(){flyMenu.close()});return false},close:function(){$(flyMenu.what).hide();$(document).unbind("click");flyMenu.what=null;return false}};var flyTip={what:null,show:function(a,s,b){flyTip.over(a,s,b)},hide:function(){flyTip.out()},over:function(a,s,b){a=jQuery.event.fix(a||window.event||{});flyTip.what=(b?b:'#flytip');if(s.substr(0,1)=="#")s=$(s).html();$('#flytip').html(s).css({top:a.pageY+20,left:a.pageX}).show();return false},move:function(a){a=jQuery.event.fix(a||window.event||{});$('#flytip').css({top:a.pageY+20,left:a.pageX}).show()},out:function(){$(flyTip.what).hide()}};var flyResize={what:null,offset:0,init:function(a,b){$(window).resize(function(e){flyResize.resize(a,b)});$(document).ready(function(e){flyResize.resize(a,b)})},resize:function(a,b){var c=document.documentElement;var h=window.innerHeight||self.innerHeight||(c&&c.clientHeight)||document.body.clientHeight;$(a).css("height",h+b)}};var flySplit={obj:null,xoffset:0,callback:false,init:function(a,b,c){flySplit.xoffset=b;flySplit.callback=c;obj=document.getElementById(a);$(document).bind("mousemove",flySplit.split);$(document).bind("mouseup",flySplit.stop)},split:function(e){var x=e.pageX;var y=e.pageY;obj.style.width=x+flySplit.xoffset},stop:function(e){if(flySplit.callback)flySplit.callback(obj.style.width);$(document).unbind("mousemove",flySplit.split);$(document).unbind("mouseup",flySplit.stop)}};var wpop;function popup(p,w,h,s,r){if(wpop)try{wpop.window.close()}catch(e){}s=s||'yes';r=r||'yes';var t=(screen.height-h)/2;var l=(screen.width-w)/2;wpop=window.open(p,"Popup","toolbar=no, location=no, directories=no, status=no, scrollbars="+s+", resizable="+r+", copyhistory=no, width="+w+", height="+h+", left="+l+", top="+t+"");wpop.focus();return false}var cookie={set:function(a,b){var d=new Date();d.setTime(d.getTime()+(86400000*parseFloat(365)));var c='; expires='+d.toGMTString();return(document.cookie=escape(a)+'='+escape(b||'')+c)},del:function(a){cookie.set(a,'')},get:function(a){var b=a+"=";var d=document.cookie.split(';');for(var i=0;i<d.length;i++){var c=d[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(b)==0)return c.substring(b.length,c.length)}return null}};function findPos(a){var b=curtop=0;if(a.offsetParent){b=a.offsetLeft;curtop=a.offsetTop;while(a=a.offsetParent){b+=a.offsetLeft;curtop+=a.offsetTop}}return[b,curtop]}function switchStyleSheet(a){$('link[@rel*=style][@title]').each(function(i){this.disabled=true;if(this.getAttribute('title')==a)this.disabled=false})}var __nb=0;var __url_th='http://open.thumbshots.org/image.pxf?url=';var __url_srv='/proxy?';var __msg_nolog='Your are not logged in, your changes will not be saved';var __msg_logko='Invalid email or password';var __msg_err='Data may not be saved please reload your page';var __msg_invalid_url='Invalid URL';var __msg_deleted='Deleted';$(document).ready(function(){startapp('table',true);if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i)))flyMsg.show('Hello Iphone !')});function startapp(d,e){$('#q').focus();if(d=='icon')$('.module').unbind("mouseover").unbind("mouseover");else{$('.module').mouseover(function(a){$(this).children('.options').show()});$('.module').mouseout(function(a){$(this).children('.options').hide()})}if(d!='liste')var f={accept:'module',helperclass:'modulehelper',opacity:0.7,fx:200,revert:true,floats:true,tolerance:'pointer',onChange:function(a){serial=$.SortSerialize('sorted');svg("a=ordlnk&"+serial.hash,null)},onStart:function(){$.iAutoscroller.start(this,document.getElementsByTagName('body'))},onStop:function(){$.iAutoscroller.stop()}};else var f={accept:'module',opacity:0.7,fx:200,revert:true,tolerance:'pointer',onChange:function(a){serial=$.SortSerialize('sorted');svg("a=ordlnk&"+serial.hash,null)},onStart:function(){$.iAutoscroller.start(this,document.getElementsByTagName('body'))},onStop:function(){$.iAutoscroller.stop()}};if(e){$('a.sengine').click(function(a){var i=$(a.target).children('.ico');var b=$(i).attr('src');var c=$(i).attr('title');$('#icosearch').attr('src',b).attr('title',c);$("#q").focus();if($("#q").val())$("#fs").submit();svg("a=usearch&val="+escape(c)+'&ico='+b)});$('a.mtable,a.mthumb,a.mliste,a.micon').click(function(a){var b=$(this).attr('class').substr(1);$('.module').attr('class','module '+b);startapp(b,false)});$('.sortcont').Sortable(f)}else{$('.sortcont').SortableDestroy().Sortable(f)}if(!e&&d)svg('a=uview&val='+d,null)}function editlnk(a){var u=$(a).parent().parent().find('span').next().find('a').attr('href');flyBox.show(a);$('#id').val($(a).parent().parent().attr('id'));$('#idurl').val(u);$('#idtitle').val($(a).parent().parent().find('span').next().find('a>span').html());$('#iddescription').val($(a).parent().parent().find('div').html());$('#idico').attr('src',$(a).parent().parent().find('span').next().find('img').attr('src'));$('#idprev').attr('src',__url_th+u);$('#idSiteInfos').show();return false}function dellnk(a){a=$(a).parent().parent();$(a).fadeOut('slow',function(){$(a).remove()});if($("#islog").html())flyMsg.show(__msg_deleted);svg("a=dellnk&id="+a.attr('id'),null);return false}function svg(p,f){if($("#islog").html())$.get(__url_srv+p,null,f);else flyMsg.show(__msg_nolog)}function log(){var e=$('#idemail').val();var p=$('#idpwd').val();if(!e||!p)alert(__msg_logko);else $.get(__url_srv+'a=log&e='+e+'&p='+p,null,function(a){if(a=='ok')location.reload();else alert(__msg_logko);$('#idemail').focus()});$('#idemail').focus()}function savlnk(){var u=$('#idurl').val();if(!u){alert(__msg_invalid_url);return}var a=$('#id').val();var t=$('#idtitle').val();var i=$('#idico').attr('src');var s=$('#iddescription').val();if(u.indexOf('http://')==-1&&u.indexOf('https://')==-1)u='http://'+u;$('#'+a+'>.preview').attr('href',u);$('#'+a+'>span .desc').html(t);$('#'+a+'>.preview img').attr('src',__url_th+u);$('#'+a+'>.title a').attr('href',u);$('#'+a+'>.title a img').attr('src',i);$('#'+a+'>.detail').html(s);if(a=="m0"){__nb++;a='n'+__nb;$('#sorted').prepend('<div id="'+a+'">'+$('#m0').html()+'</div>');$('#n'+__nb).addClass($('#m0').attr('class'));startapp(false,false)}else ord='';flyBox.close();svg('a=savlnk&id='+a+'&url='+encodeURIComponent(u)+'&tit='+encodeURIComponent(t)+'&txt='+encodeURIComponent(s)+'&ico='+i,function(d){if(d)$('#'+a).attr('id',d)})}function getlnk(a){if(!a){alert(__msg_invalid_url);return}$('#idSpinCheck').show();$('#btnRefresh').hide();$('#idSiteInfos').hide();geturlinfo(a,fillBox)}function fillBox(a){if(a){$('#idurl').val(a[0]);$('#idtitle').val(a[2]);$('#iddescription').val(a[3]);$('#idico').attr('src',a[1]);$('#idprev').attr('src',__url_th+a[0]);$('#idSiteInfos').show()}else alert(__msg_invalid_url);$('#idSpinCheck').hide();$('#btnRefresh').show()}function geturlinfo(f,g){if(!f)return g(false);if(f.indexOf('http://')==-1&&f.indexOf('https://')==-1)f='http://'+f;var d=f.substring(0,f.indexOf('/',8))||f;$.get(__url_srv+"a=url&url="+f,null,function(b){if(!b&&g)return g(false);var c=new Array(f,'','','');var e=b,i=0,lig;while((i=e.toLowerCase().indexOf('<link',i))!=-1){e=e.substring(i+1);if((i=e.indexOf('>'))!=-1){lig=e.substring(0,i);if((lig.toLowerCase().indexOf('rel="shortcut icon')!=-1||lig.toLowerCase().indexOf('rel="icon"')!=-1)&&(i=lig.toLowerCase().indexOf('href="'))!=-1){lig=lig.substring(i+6);if((i=lig.indexOf('"'))!=-1){lig=lig.toLowerCase().substring(0,i);if(lig.indexOf('http://')==-1&&lig.indexOf('https://')==-1)c[1]=d+'/'+lig;else c[1]=lig}break}}}e=b;if((i=e.toLowerCase().indexOf('<title>',i))!=-1){e=e.substring(i+1);if((i=e.toLowerCase().indexOf('</title>'))!=-1)c[2]=e.substring(6,i)}e=b;while((i=e.toLowerCase().indexOf('<meta',i))!=-1){e=e.substring(i+1);if((i=e.indexOf('>'))!=-1){lig=e.substring(0,i);if(lig.toLowerCase().indexOf('name="description"')!=-1&&(i=lig.toLowerCase().indexOf('content="'))!=-1){lig=lig.substring(i+9);if((i=lig.indexOf('"'))!=-1)c[3]=lig.substring(0,i);break}}}if(!c[1])c[1]=d+'/favicon.ico';$.get(__url_srv+"a=url&url="+c[1],null,function(a){if(!a||a.substr(0,1)=='<')c[1]='image/link.gif';g(c)})})}
