(function(){function b(g,i){i.src?c.ajax({url:i.src,async:false,dataType:"script"}):c.globalEval(i.text||i.textContent||i.innerHTML||"");i.parentNode&&i.parentNode.removeChild(i)}function f(g,i){return g[0]&&parseInt(c.curCSS(g[0],i,true),10)||0}function e(){if(!E){E=true;document.addEventListener&&!c.browser.opera&&document.addEventListener("DOMContentLoaded",c.ready,false);c.browser.msie&&window==top&&function(){if(!c.isReady){try{document.documentElement.doScroll("left")}catch(i){setTimeout(arguments.callee,
0);return}c.ready()}}();c.browser.opera&&document.addEventListener("DOMContentLoaded",function(){if(!c.isReady){for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return}c.ready()}},false);if(c.browser.safari){var g;(function(){if(!c.isReady)if(document.readyState!="loaded"&&document.readyState!="complete")setTimeout(arguments.callee,0);else{if(g===l)g=c("style, link[rel=stylesheet]").length;document.styleSheets.length!=g?setTimeout(arguments.callee,
0):c.ready()}})()}c.event.add(window,"load",c.ready)}}var a=window.jQuery,d=window.$,c=window.jQuery=window.$=function(g,i){return new c.fn.init(g,i)},h=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,j=/^.[^:#\[\.]*$/,l;c.fn=c.prototype={init:function(g,i){g=g||document;if(g.nodeType){this[0]=g;this.length=1;return this}if(typeof g=="string"){var k=h.exec(g);if(k&&(k[1]||!i))if(k[1])g=c.clean([k[1]],i);else{var o=document.getElementById(k[3]);if(o){if(o.id!=k[3])return c().find(g);return c(o)}g=[]}else return c(i).find(g)}else if(c.isFunction(g))return c(document)[c.fn.ready?
"ready":"load"](g);return this.setArray(c.makeArray(g))},jquery:"1.2.6",size:function(){return this.length},length:0,get:function(g){return g==l?c.makeArray(this):this[g]},pushStack:function(g){g=c(g);g.prevObject=this;return g},setArray:function(g){this.length=0;Array.prototype.push.apply(this,g);return this},each:function(g,i){return c.each(this,g,i)},index:function(g){return c.inArray(g&&g.jquery?g[0]:g,this)},attr:function(g,i,k){var o=g;if(g.constructor==String)if(i===l)return this[0]&&c[k||
"attr"](this[0],g);else{o={};o[g]=i}return this.each(function(t){for(g in o)c.attr(k?this.style:this,g,c.prop(this,o[g],k,t,g))})},css:function(g,i){if((g=="width"||g=="height")&&parseFloat(i)<0)i=l;return this.attr(g,i,"curCSS")},text:function(g){if(typeof g!="object"&&g!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(g));var i="";c.each(g||this,function(){c.each(this.childNodes,function(){if(this.nodeType!=8)i+=this.nodeType!=1?this.nodeValue:c.fn.text([this])})});
return i},wrapAll:function(g){this[0]&&c(g,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){for(var i=this;i.firstChild;)i=i.firstChild;return i}).append(this);return this},wrapInner:function(g){return this.each(function(){c(this).contents().wrapAll(g)})},wrap:function(g){return this.each(function(){c(this).wrapAll(g)})},append:function(){return this.domManip(arguments,true,false,function(g){this.nodeType==1&&this.appendChild(g)})},prepend:function(){return this.domManip(arguments,
true,true,function(g){this.nodeType==1&&this.insertBefore(g,this.firstChild)})},before:function(){return this.domManip(arguments,false,false,function(g){this.parentNode.insertBefore(g,this)})},after:function(){return this.domManip(arguments,false,true,function(g){this.parentNode.insertBefore(g,this.nextSibling)})},end:function(){return this.prevObject||c([])},find:function(g){var i=c.map(this,function(k){return c.find(g,k)});return this.pushStack(/[^+>] [^+>]/.test(g)||g.indexOf("..")>-1?c.unique(i):
i)},clone:function(g){var i=this.map(function(){if(c.browser.msie&&!c.isXMLDoc(this)){var o=this.cloneNode(true),t=document.createElement("div");t.appendChild(o);return c.clean([t.innerHTML])[0]}else return this.cloneNode(true)}),k=i.find("*").andSelf().each(function(){if(this[n]!=l)this[n]=null});g===true&&this.find("*").andSelf().each(function(o){if(this.nodeType!=3){var t=c.data(this,"events");for(var r in t)for(var z in t[r])c.event.add(k[o],r,t[r][z],t[r][z].data)}});return i},filter:function(g){return this.pushStack(c.isFunction(g)&&
c.grep(this,function(i,k){return g.call(i,k)})||c.multiFilter(g,this))},not:function(g){if(g.constructor==String)if(j.test(g))return this.pushStack(c.multiFilter(g,this,true));else g=c.multiFilter(g,this);var i=g.length&&g[g.length-1]!==l&&!g.nodeType;return this.filter(function(){return i?c.inArray(this,g)<0:this!=g})},add:function(g){return this.pushStack(c.unique(c.merge(this.get(),typeof g=="string"?c(g):c.makeArray(g))))},is:function(g){return!!g&&c.multiFilter(g,this).length>0},hasClass:function(g){return this.is("."+
g)},val:function(g){if(g==l){if(this.length){var i=this[0];if(c.nodeName(i,"select")){var k=i.selectedIndex,o=[],t=i.options;i=i.type=="select-one";if(k<0)return null;var r=i?k:0;for(k=i?k+1:t.length;r<k;r++){var z=t[r];if(z.selected){g=c.browser.msie&&!z.attributes.value.specified?z.text:z.value;if(i)return g;o.push(g)}}return o}else return(this[0].value||"").replace(/\r/g,"")}return l}if(g.constructor==Number)g+="";return this.each(function(){if(this.nodeType==1)if(g.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=
c.inArray(this.value,g)>=0||c.inArray(this.name,g)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(g);c("option",this).each(function(){this.selected=c.inArray(this.value,A)>=0||c.inArray(this.text,A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=g})},html:function(g){return g==l?this[0]?this[0].innerHTML:null:this.empty().append(g)},replaceWith:function(g){return this.after(g).remove()},eq:function(g){return this.slice(g,g+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,
arguments))},map:function(g){return this.pushStack(c.map(this,function(i,k){return g.call(i,k,i)}))},andSelf:function(){return this.add(this.prevObject)},data:function(g,i){var k=g.split(".");k[1]=k[1]?"."+k[1]:"";if(i===l){var o=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(o===l&&this.length)o=c.data(this[0],g);return o===l&&k[1]?this.data(k[0]):o}else return this.trigger("setData"+k[1]+"!",[k[0],i]).each(function(){c.data(this,g,i)})},removeData:function(g){return this.each(function(){c.removeData(this,
g)})},domManip:function(g,i,k,o){var t=this.length>1,r;return this.each(function(){if(!r){r=c.clean(g,this.ownerDocument);k&&r.reverse()}var z=this;if(i&&c.nodeName(this,"table")&&c.nodeName(r[0],"tr"))z=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var A=c([]);c.each(r,function(){var m=t?c(this).clone(true)[0]:this;if(c.nodeName(m,"script"))A=A.add(m);else{if(m.nodeType==1)A=A.add(c("script",m).remove());o.call(z,m)}});A.each(b)})}};c.fn.init.prototype=
c.fn;c.extend=c.fn.extend=function(){var g=arguments[0]||{},i=1,k=arguments.length,o=false,t;if(g.constructor==Boolean){o=g;g=arguments[1]||{};i=2}if(typeof g!="object"&&typeof g!="function")g={};if(k==i){g=this;--i}for(;i<k;i++)if((t=arguments[i])!=null)for(var r in t){var z=g[r],A=t[r];if(g!==A)if(o&&A&&typeof A=="object"&&!A.nodeType)g[r]=c.extend(o,z||(A.length!=null?[]:{}),A);else if(A!==l)g[r]=A}return g};var n="jQuery"+ +new Date,q=0,x={},u=/z-?index|font-?weight|opacity|zoom|line-?height/i,
w=document.defaultView||{};c.extend({noConflict:function(g){window.$=d;if(g)window.jQuery=a;return c},isFunction:function(g){return!!g&&typeof g!="string"&&!g.nodeName&&g.constructor!=Array&&/^[\s[]?function/.test(g+"")},isXMLDoc:function(g){return g.documentElement&&!g.body||g.tagName&&g.ownerDocument&&!g.ownerDocument.body},globalEval:function(g){if(g=c.trim(g)){var i=document.getElementsByTagName("head")[0]||document.documentElement,k=document.createElement("script");k.type="text/javascript";if(c.browser.msie)k.text=
g;else k.appendChild(document.createTextNode(g));i.insertBefore(k,i.firstChild);i.removeChild(k)}},nodeName:function(g,i){return g.nodeName&&g.nodeName.toUpperCase()==i.toUpperCase()},cache:{},data:function(g,i,k){g=g==window?x:g;var o=g[n];o||(o=g[n]=++q);if(i&&!c.cache[o])c.cache[o]={};if(k!==l)c.cache[o][i]=k;return i?c.cache[o][i]:o},removeData:function(g,i){g=g==window?x:g;var k=g[n];if(i){if(c.cache[k]){delete c.cache[k][i];i="";for(i in c.cache[k])break;i||c.removeData(g)}}else{try{delete g[n]}catch(o){g.removeAttribute&&
g.removeAttribute(n)}delete c.cache[k]}},each:function(g,i,k){var o,t=0,r=g.length;if(k)if(r==l)for(o in g){if(i.apply(g[o],k)===false)break}else for(;t<r;){if(i.apply(g[t++],k)===false)break}else if(r==l)for(o in g){if(i.call(g[o],o,g[o])===false)break}else for(k=g[0];t<r&&i.call(k,t,k)!==false;k=g[++t]);return g},prop:function(g,i,k,o,t){if(c.isFunction(i))i=i.call(g,o);return i&&i.constructor==Number&&k=="curCSS"&&!u.test(t)?i+"px":i},className:{add:function(g,i){c.each((i||"").split(/\s+/),function(k,
o){if(g.nodeType==1&&!c.className.has(g.className,o))g.className+=(g.className?" ":"")+o})},remove:function(g,i){if(g.nodeType==1)g.className=i!=l?c.grep(g.className.split(/\s+/),function(k){return!c.className.has(i,k)}).join(" "):""},has:function(g,i){return c.inArray(i,(g.className||g).toString().split(/\s+/))>-1}},swap:function(g,i,k){var o={};for(var t in i){o[t]=g.style[t];g.style[t]=i[t]}k.call(g);for(t in i)g.style[t]=o[t]},css:function(g,i,k){if(i=="width"||i=="height"){var o;k={position:"absolute",
visibility:"hidden",display:"block"};var t=i=="width"?["Left","Right"]:["Top","Bottom"],r=function(){o=i=="width"?g.offsetWidth:g.offsetHeight;var z=0,A=0;c.each(t,function(){z+=parseFloat(c.curCSS(g,"padding"+this,true))||0;A+=parseFloat(c.curCSS(g,"border"+this+"Width",true))||0});o-=Math.round(z+A)};c(g).is(":visible")?r():c.swap(g,k,r);return Math.max(0,o)}return c.curCSS(g,i,k)},curCSS:function(g,i,k){function o(A){if(!c.browser.safari)return false;A=w.getComputedStyle(A,null);return!A||A.getPropertyValue("color")==
""}var t,r=g.style;if(i=="opacity"&&c.browser.msie){t=c.attr(r,"opacity");return t==""?"1":t}if(c.browser.opera&&i=="display"){var z=r.outline;r.outline="0 solid black";r.outline=z}if(i.match(/float/i))i=B;if(!k&&r&&r[i])t=r[i];else if(w.getComputedStyle){if(i.match(/float/i))i="float";i=i.replace(/([A-Z])/g,"-$1").toLowerCase();if((t=w.getComputedStyle(g,null))&&!o(g))t=t.getPropertyValue(i);else{r=[];k=[];z=g;for(g=0;z&&o(z);z=z.parentNode)k.unshift(z);for(;g<k.length;g++)if(o(k[g])){r[g]=k[g].style.display;
k[g].style.display="block"}t=i=="display"&&r[k.length-1]!=null?"none":t&&t.getPropertyValue(i)||"";for(g=0;g<r.length;g++)if(r[g]!=null)k[g].style.display=r[g]}if(i=="opacity"&&t=="")t="1"}else if(g.currentStyle){t=i.replace(/\-(\w)/g,function(A,m){return m.toUpperCase()});t=g.currentStyle[i]||g.currentStyle[t];if(!/^\d+(px)?$/i.test(t)&&/^\d/.test(t)){i=r.left;k=g.runtimeStyle.left;g.runtimeStyle.left=g.currentStyle.left;r.left=t||0;t=r.pixelLeft+"px";r.left=i;g.runtimeStyle.left=k}}return t},clean:function(g,
i){var k=[];i=i||document;if(typeof i.createElement=="undefined")i=i.ownerDocument||i[0]&&i[0].ownerDocument||document;c.each(g,function(o,t){if(t){if(t.constructor==Number)t+="";if(typeof t=="string"){t=t.replace(/(<(\w+)[^>]*?)\/>/g,function(m,F,G){return G.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?m:F+"></"+G+">"});var r=c.trim(t).toLowerCase(),z=i.createElement("div"),A=!r.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!r.indexOf("<leg")&&[1,"<fieldset>",
"</fieldset>"]||r.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!r.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!r.indexOf("<td")||!r.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!r.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||c.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];for(z.innerHTML=A[1]+t+A[2];A[0]--;)z=z.lastChild;if(c.browser.msie){r=!r.indexOf("<table")&&r.indexOf("<tbody")<0?z.firstChild&&z.firstChild.childNodes:
A[1]=="<table>"&&r.indexOf("<tbody")<0?z.childNodes:[];for(A=r.length-1;A>=0;--A)c.nodeName(r[A],"tbody")&&!r[A].childNodes.length&&r[A].parentNode.removeChild(r[A]);/^\s/.test(t)&&z.insertBefore(i.createTextNode(t.match(/^\s*/)[0]),z.firstChild)}t=c.makeArray(z.childNodes)}if(!(t.length===0&&!c.nodeName(t,"form")&&!c.nodeName(t,"select")))if(t[0]==l||c.nodeName(t,"form")||t.options)k.push(t);else k=c.merge(k,t)}});return k},attr:function(g,i,k){if(!g||g.nodeType==3||g.nodeType==8)return l;var o=
!c.isXMLDoc(g),t=k!==l,r=c.browser.msie;i=o&&c.props[i]||i;if(g.tagName){var z=/href|src|style/.test(i);if(i in g&&o&&!z){if(t){if(i=="type"&&c.nodeName(g,"input")&&g.parentNode)throw"type property can't be changed";g[i]=k}if(c.nodeName(g,"form")&&g.getAttributeNode(i))return g.getAttributeNode(i).nodeValue;return g[i]}if(r&&o&&i=="style")return c.attr(g.style,"cssText",k);t&&g.setAttribute(i,""+k);g=r&&o&&z?g.getAttribute(i,2):g.getAttribute(i);return g===null?l:g}if(r&&i=="opacity"){if(t){g.zoom=
1;g.filter=(g.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(k)+""=="NaN"?"":"alpha(opacity="+k*100+")")}return g.filter&&g.filter.indexOf("opacity=")>=0?parseFloat(g.filter.match(/opacity=([^)]*)/)[1])/100+"":""}i=i.replace(/-([a-z])/ig,function(A,m){return m.toUpperCase()});if(t)g[i]=k;return g[i]},trim:function(g){return(g||"").replace(/^\s+|\s+$/g,"")},makeArray:function(g){var i=[];if(g!=null){var k=g.length;if(k==null||g.split||g.setInterval||g.call)i[0]=g;else for(;k;)i[--k]=g[k]}return i},
inArray:function(g,i){for(var k=0,o=i.length;k<o;k++)if(i[k]===g)return k;return-1},merge:function(g,i){var k=0,o,t=g.length;if(c.browser.msie)for(;o=i[k++];){if(o.nodeType!=8)g[t++]=o}else for(;o=i[k++];)g[t++]=o;return g},unique:function(g){var i=[],k={};try{for(var o=0,t=g.length;o<t;o++){var r=c.data(g[o]);if(!k[r]){k[r]=true;i.push(g[o])}}}catch(z){i=g}return i},grep:function(g,i,k){for(var o=[],t=0,r=g.length;t<r;t++)!k!=!i(g[t],t)&&o.push(g[t]);return o},map:function(g,i){for(var k=[],o=0,
t=g.length;o<t;o++){var r=i(g[o],o);if(r!=null)k[k.length]=r}return k.concat.apply([],k)}});var v=navigator.userAgent.toLowerCase();c.browser={version:(v.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(v),opera:/opera/.test(v),msie:/msie/.test(v)&&!/opera/.test(v),mozilla:/mozilla/.test(v)&&!/(compatible|webkit)/.test(v)};var B=c.browser.msie?"styleFloat":"cssFloat";c.extend({boxModel:!c.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className",
"float":B,cssFloat:B,styleFloat:B,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});c.each({parent:function(g){return g.parentNode},parents:function(g){return c.dir(g,"parentNode")},next:function(g){return c.nth(g,2,"nextSibling")},prev:function(g){return c.nth(g,2,"previousSibling")},nextAll:function(g){return c.dir(g,"nextSibling")},prevAll:function(g){return c.dir(g,"previousSibling")},siblings:function(g){return c.sibling(g.parentNode.firstChild,g)},children:function(g){return c.sibling(g.firstChild)},
contents:function(g){return c.nodeName(g,"iframe")?g.contentDocument||g.contentWindow.document:c.makeArray(g.childNodes)}},function(g,i){c.fn[g]=function(k){var o=c.map(this,i);if(k&&typeof k=="string")o=c.multiFilter(k,o);return this.pushStack(c.unique(o))}});c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(g,i){c.fn[g]=function(){var k=arguments;return this.each(function(){for(var o=0,t=k.length;o<t;o++)c(k[o])[i](this)})}});
c.each({removeAttr:function(g){c.attr(this,g,"");this.nodeType==1&&this.removeAttribute(g)},addClass:function(g){c.className.add(this,g)},removeClass:function(g){c.className.remove(this,g)},toggleClass:function(g){c.className[c.className.has(this,g)?"remove":"add"](this,g)},remove:function(g){if(!g||c.filter(g,[this]).r.length){c("*",this).add(this).each(function(){c.event.remove(this);c.removeData(this)});this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(c(">*",this).remove();this.firstChild;)this.removeChild(this.firstChild)}},
function(g,i){c.fn[g]=function(){return this.each(i,arguments)}});c.each(["Height","Width"],function(g,i){var k=i.toLowerCase();c.fn[k]=function(o){return this[0]==window?c.browser.opera&&document.body["client"+i]||c.browser.safari&&window["inner"+i]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+i]||document.body["client"+i]:this[0]==document?Math.max(Math.max(document.body["scroll"+i],document.documentElement["scroll"+i]),Math.max(document.body["offset"+i],document.documentElement["offset"+
i])):o==l?this.length?c.css(this[0],k):null:this.css(k,o.constructor==String?o:o+"px")}});var D=c.browser.safari&&parseInt(c.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uffff*_-]|\\\\.)",H=RegExp("^>\\s*("+D+"+)"),C=RegExp("^("+D+"+)(#)("+D+"+)"),M=RegExp("^([#.]?)("+D+"*)");c.extend({expr:{"":function(g,i,k){return k[2]=="*"||c.nodeName(g,k[2])},"#":function(g,i,k){return g.getAttribute("id")==k[2]},":":{lt:function(g,i,k){return i<k[3]-0},gt:function(g,i,k){return i>k[3]-0},nth:function(g,
i,k){return k[3]-0==i},eq:function(g,i,k){return k[3]-0==i},first:function(g,i){return i==0},last:function(g,i,k,o){return i==o.length-1},even:function(g,i){return i%2==0},odd:function(g,i){return i%2},"first-child":function(g){return g.parentNode.getElementsByTagName("*")[0]==g},"last-child":function(g){return c.nth(g.parentNode.lastChild,1,"previousSibling")==g},"only-child":function(g){return!c.nth(g.parentNode.lastChild,2,"previousSibling")},parent:function(g){return g.firstChild},empty:function(g){return!g.firstChild},
contains:function(g,i,k){return(g.textContent||g.innerText||c(g).text()||"").indexOf(k[3])>=0},visible:function(g){return"hidden"!=g.type&&c.css(g,"display")!="none"&&c.css(g,"visibility")!="hidden"},hidden:function(g){return"hidden"==g.type||c.css(g,"display")=="none"||c.css(g,"visibility")=="hidden"},enabled:function(g){return!g.disabled},disabled:function(g){return g.disabled},checked:function(g){return g.checked},selected:function(g){return g.selected||c.attr(g,"selected")},text:function(g){return"text"==
g.type},radio:function(g){return"radio"==g.type},checkbox:function(g){return"checkbox"==g.type},file:function(g){return"file"==g.type},password:function(g){return"password"==g.type},submit:function(g){return"submit"==g.type},image:function(g){return"image"==g.type},reset:function(g){return"reset"==g.type},button:function(g){return"button"==g.type||c.nodeName(g,"button")},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)},has:function(g,i,k){return c.find(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
animated:function(g){return c.grep(c.timers,function(i){return g==i.elem}).length}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,RegExp("^([:.#]*)("+D+"+)")],multiFilter:function(g,i,k){for(var o,t=[];g&&g!=o;){o=g;var r=c.filter(g,i,k);g=r.t.replace(/^\s*,\s*/,"");t=k?i=r.r:c.merge(t,r.r)}return t},find:function(g,i){if(typeof g!="string")return[g];if(i&&i.nodeType!=1&&i.nodeType!=9)return[];i=i||document;for(var k=[i],o=[],t,r;g&&t!=
g;){var z=[];t=g;g=c.trim(g);r=false;var A=H,m=A.exec(g);if(m){r=m[1].toUpperCase();for(var F=0;k[F];F++)for(m=k[F].firstChild;m;m=m.nextSibling)if(m.nodeType==1&&(r=="*"||m.nodeName.toUpperCase()==r))z.push(m);k=z;g=g.replace(A,"");if(g.indexOf(" ")==0)continue;r=true}else{A=/^([>+~])\s*(\w*)/i;if((m=A.exec(g))!=null){z=[];F={};r=m[2].toUpperCase();m=m[1];for(var G=0,L=k.length;G<L;G++)for(var s=m=="~"||m=="+"?k[G].nextSibling:k[G].firstChild;s;s=s.nextSibling)if(s.nodeType==1){var K=c.data(s);if(m==
"~"&&F[K])break;if(!r||s.nodeName.toUpperCase()==r){if(m=="~")F[K]=true;z.push(s)}if(m=="+")break}k=z;g=c.trim(g.replace(A,""));r=true}}if(g&&!r)if(g.indexOf(",")){A=C;if(m=A.exec(g))m=[0,m[2],m[3],m[1]];else{A=M;m=A.exec(g)}m[2]=m[2].replace(/\\/g,"");r=k[k.length-1];if(m[1]=="#"&&r&&r.getElementById&&!c.isXMLDoc(r)){k=r.getElementById(m[2]);if((c.browser.msie||c.browser.opera)&&k&&typeof k.id=="string"&&k.id!=m[2])k=c('[@id="'+m[2]+'"]',r)[0];k=z=k&&(!m[3]||c.nodeName(k,m[3]))?[k]:[]}else{for(F=
0;k[F];F++){r=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(r=="*"&&k[F].nodeName.toLowerCase()=="object")r="param";z=c.merge(z,k[F].getElementsByTagName(r))}if(m[1]==".")z=c.classFilter(z,m[2]);if(m[1]=="#"){k=[];for(F=0;z[F];F++)if(z[F].getAttribute("id")==m[2]){k=[z[F]];break}z=k}k=z}g=g.replace(A,"")}else{i==k[0]&&k.shift();o=c.merge(o,k);z=k=[i];g=" "+g.substr(1,g.length)}if(g){z=c.filter(g,z);k=z.r;g=c.trim(z.t)}}if(g)k=[];k&&i==k[0]&&k.shift();return o=c.merge(o,k)},classFilter:function(g,
i,k){i=" "+i+" ";for(var o=[],t=0;g[t];t++){var r=(" "+g[t].className+" ").indexOf(i)>=0;if(!k&&r||k&&!r)o.push(g[t])}return o},filter:function(g,i,k){for(var o;g&&g!=o;){o=g;for(var t=c.parse,r,z=0;t[z];z++)if(r=t[z].exec(g)){g=g.substring(r[0].length);r[2]=r[2].replace(/\\/g,"");break}if(!r)break;if(r[1]==":"&&r[2]=="not")i=j.test(r[3])?c.filter(r[3],i,true).r:c(i).not(r[3]);else if(r[1]==".")i=c.classFilter(i,r[2],k);else if(r[1]=="["){t=[];var A=r[3];z=0;for(var m=i.length;z<m;z++){var F=i[z],
G=F[c.props[r[2]]||r[2]];if(G==null||/href|src|selected/.test(r[2]))G=c.attr(F,r[2])||"";if((A==""&&!!G||A=="="&&G==r[5]||A=="!="&&G!=r[5]||A=="^="&&G&&!G.indexOf(r[5])||A=="$="&&G.substr(G.length-r[5].length)==r[5]||(A=="*="||A=="~=")&&G.indexOf(r[5])>=0)^k)t.push(F)}i=t}else if(r[1]==":"&&r[2]=="nth-child"){A={};t=[];o=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(r[3]=="even"&&"2n"||r[3]=="odd"&&"2n+1"||!/\D/.test(r[3])&&"0n+"+r[3]||r[3]);F=o[1]+(o[2]||1)-0;o=o[3]-0;z=0;for(m=i.length;z<m;z++){G=i[z];var L=
G.parentNode,s=c.data(L);if(!A[s]){var K=1;for(L=L.firstChild;L;L=L.nextSibling)if(L.nodeType==1)L.nodeIndex=K++;A[s]=true}s=false;if(F==0){if(G.nodeIndex==o)s=true}else if((G.nodeIndex-o)%F==0&&(G.nodeIndex-o)/F>=0)s=true;s^k&&t.push(G)}i=t}else{var p=c.expr[r[1]];if(typeof p=="object")p=p[r[2]];if(typeof p=="string")p=eval("false||function(a,i){return "+p+";}");i=c.grep(i,function(y,J){return p(y,J,r,i)},k)}}return{r:i,t:g}},dir:function(g,i){for(var k=[],o=g[i];o&&o!=document;){o.nodeType==1&&
k.push(o);o=o[i]}return k},nth:function(g,i,k){i=i||1;for(var o=0;g;g=g[k])if(g.nodeType==1&&++o==i)break;return g},sibling:function(g,i){for(var k=[];g;g=g.nextSibling)g.nodeType==1&&g!=i&&k.push(g);return k}});c.event={add:function(g,i,k,o){if(!(g.nodeType==3||g.nodeType==8)){if(c.browser.msie&&g.setInterval)g=window;if(!k.guid)k.guid=this.guid++;if(o!=l){var t=k;k=this.proxy(t,function(){return t.apply(this,arguments)});k.data=o}var r=c.data(g,"events")||c.data(g,"events",{}),z=c.data(g,"handle")||
c.data(g,"handle",function(){if(typeof c!="undefined"&&!c.event.triggered)return c.event.handle.apply(arguments.callee.elem,arguments)});z.elem=g;c.each(i.split(/\s+/),function(A,m){var F=m.split(".");m=F[0];k.type=F[1];F=r[m];if(!F){F=r[m]={};if(!c.event.special[m]||c.event.special[m].setup.call(g)===false)if(g.addEventListener)g.addEventListener(m,z,false);else g.attachEvent&&g.attachEvent("on"+m,z)}F[k.guid]=k;c.event.global[m]=true});g=null}},guid:1,global:{},remove:function(g,i,k){if(!(g.nodeType==
3||g.nodeType==8)){var o=c.data(g,"events"),t;if(o){if(i==l||typeof i=="string"&&i.charAt(0)==".")for(var r in o)this.remove(g,r+(i||""));else{if(i.type){k=i.handler;i=i.type}c.each(i.split(/\s+/),function(z,A){var m=A.split(".");A=m[0];if(o[A]){if(k)delete o[A][k.guid];else for(k in o[A])if(!m[1]||o[A][k].type==m[1])delete o[A][k];for(t in o[A])break;if(!t){if(!c.event.special[A]||c.event.special[A].teardown.call(g)===false)if(g.removeEventListener)g.removeEventListener(A,c.data(g,"handle"),false);
else g.detachEvent&&g.detachEvent("on"+A,c.data(g,"handle"));t=null;delete o[A]}}})}for(t in o)break;if(!t){if(i=c.data(g,"handle"))i.elem=null;c.removeData(g,"events");c.removeData(g,"handle")}}}},trigger:function(g,i,k,o,t){i=c.makeArray(i);if(g.indexOf("!")>=0){g=g.slice(0,-1);var r=true}if(k){if(k.nodeType==3||k.nodeType==8)return l;var z,A=c.isFunction(k[g]||null),m=!i[0]||!i[0].preventDefault;if(m){i.unshift({type:g,target:k,preventDefault:function(){},stopPropagation:function(){},timeStamp:+new Date});
i[0][n]=true}i[0].type=g;if(r)i[0].exclusive=true;if(r=c.data(k,"handle"))z=r.apply(k,i);if((!A||c.nodeName(k,"a")&&g=="click")&&k["on"+g]&&k["on"+g].apply(k,i)===false)z=false;m&&i.shift();if(t&&c.isFunction(t)){i=t.apply(k,z==null?i:i.concat(z));if(i!==l)z=i}if(A&&o!==false&&z!==false&&!(c.nodeName(k,"a")&&g=="click")){this.triggered=true;try{k[g]()}catch(F){}}this.triggered=false}else this.global[g]&&c("*").add([window,document]).trigger(g,i);return z},handle:function(g){var i,k,o,t,r;g=arguments[0]=
c.event.fix(g||window.event);o=g.type.split(".");g.type=o[0];o=o[1];t=!o&&!g.exclusive;r=(c.data(this,"events")||{})[g.type];for(var z in r){k=r[z];if(t||k.type==o){g.handler=k;g.data=k.data;k=k.apply(this,arguments);if(i!==false)i=k;if(k===false){g.preventDefault();g.stopPropagation()}}}return i},fix:function(g){if(g[n]==true)return g;var i=g;g={originalEvent:i};for(var k="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 timeStamp toElement type view wheelDelta which".split(" "),
o=k.length;o;o--)g[k[o]]=i[k[o]];g[n]=true;g.preventDefault=function(){i.preventDefault&&i.preventDefault();i.returnValue=false};g.stopPropagation=function(){i.stopPropagation&&i.stopPropagation();i.cancelBubble=true};g.timeStamp=g.timeStamp||+new Date;if(!g.target)g.target=g.srcElement||document;if(g.target.nodeType==3)g.target=g.target.parentNode;if(!g.relatedTarget&&g.fromElement)g.relatedTarget=g.fromElement==g.target?g.toElement:g.fromElement;if(g.pageX==null&&g.clientX!=null){k=document.documentElement;
o=document.body;g.pageX=g.clientX+(k&&k.scrollLeft||o&&o.scrollLeft||0)-(k.clientLeft||0);g.pageY=g.clientY+(k&&k.scrollTop||o&&o.scrollTop||0)-(k.clientTop||0)}if(!g.which&&(g.charCode||g.charCode===0?g.charCode:g.keyCode))g.which=g.charCode||g.keyCode;if(!g.metaKey&&g.ctrlKey)g.metaKey=g.ctrlKey;if(!g.which&&g.button)g.which=g.button&1?1:g.button&2?3:g.button&4?2:0;return g},proxy:function(g,i){i.guid=g.guid=g.guid||i.guid||this.guid++;return i},special:{ready:{setup:function(){e()},teardown:function(){}},
mouseenter:{setup:function(){if(c.browser.msie)return false;c(this).bind("mouseover",c.event.special.mouseenter.handler);return true},teardown:function(){if(c.browser.msie)return false;c(this).unbind("mouseover",c.event.special.mouseenter.handler);return true},handler:function(g){if(I(g,this))return true;g.type="mouseenter";return c.event.handle.apply(this,arguments)}},mouseleave:{setup:function(){if(c.browser.msie)return false;c(this).bind("mouseout",c.event.special.mouseleave.handler);return true},
teardown:function(){if(c.browser.msie)return false;c(this).unbind("mouseout",c.event.special.mouseleave.handler);return true},handler:function(g){if(I(g,this))return true;g.type="mouseleave";return c.event.handle.apply(this,arguments)}}}};c.fn.extend({bind:function(g,i,k){return g=="unload"?this.one(g,i,k):this.each(function(){c.event.add(this,g,k||i,k&&i)})},one:function(g,i,k){var o=c.event.proxy(k||i,function(t){c(this).unbind(t,o);return(k||i).apply(this,arguments)});return this.each(function(){c.event.add(this,
g,o,k&&i)})},unbind:function(g,i){return this.each(function(){c.event.remove(this,g,i)})},trigger:function(g,i,k){return this.each(function(){c.event.trigger(g,i,this,true,k)})},triggerHandler:function(g,i,k){return this[0]&&c.event.trigger(g,i,this[0],false,k)},toggle:function(g){for(var i=arguments,k=1;k<i.length;)c.event.proxy(g,i[k++]);return this.click(c.event.proxy(g,function(o){this.lastToggle=(this.lastToggle||0)%k;o.preventDefault();return i[this.lastToggle++].apply(this,arguments)||false}))},
hover:function(g,i){return this.bind("mouseenter",g).bind("mouseleave",i)},ready:function(g){e();c.isReady?g.call(document,c):c.readyList.push(function(){return g.call(this,c)});return this}});c.extend({isReady:false,readyList:[],ready:function(){if(!c.isReady){c.isReady=true;if(c.readyList){c.each(c.readyList,function(){this.call(document)});c.readyList=null}c(document).triggerHandler("ready")}}});var E=false;c.each("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,change,select,submit,keydown,keypress,keyup,error".split(","),
function(g,i){c.fn[i]=function(k){return k?this.bind(i,k):this.trigger(i)}});var I=function(g,i){for(var k=g.relatedTarget;k&&k!=i;)try{k=k.parentNode}catch(o){k=i}return k==i};c(window).bind("unload",function(){c("*").add(document).unbind()});c.fn.extend({_load:c.fn.load,load:function(g,i,k){if(typeof g!="string")return this._load(g);var o=g.indexOf(" ");if(o>=0){var t=g.slice(o,g.length);g=g.slice(0,o)}k=k||function(){};o="GET";if(i)if(c.isFunction(i)){k=i;i=null}else{i=c.param(i);o="POST"}var r=
this;c.ajax({url:g,type:o,dataType:"html",data:i,complete:function(z,A){if(A=="success"||A=="notmodified")r.html(t?c("<div/>").append(z.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(t):z.responseText);r.each(k,[z.responseText,A,z])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return c.nodeName(this,"form")?c.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(g,i){var k=c(this).val();return k==null?null:k.constructor==Array?c.map(k,function(o){return{name:i.name,value:o}}):{name:i.name,value:k}}).get()}});c.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(g,i){c.fn[i]=function(k){return this.bind(i,k)}});var N=+new Date;c.extend({get:function(g,i,k,o){if(c.isFunction(i)){k=i;i=null}return c.ajax({type:"GET",url:g,data:i,
success:k,dataType:o})},getScript:function(g,i){return c.get(g,null,i,"script")},getJSON:function(g,i,k){return c.get(g,i,k,"json")},post:function(g,i,k,o){if(c.isFunction(i)){k=i;i={}}return c.ajax({type:"POST",url:g,data:i,success:k,dataType:o})},ajaxSetup:function(g){c.extend(c.ajaxSettings,g)},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,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(g){function i(){g.success&&g.success(z,r);g.global&&c.event.trigger("ajaxSuccess",[K,g])}function k(){g.complete&&g.complete(K,r);g.global&&c.event.trigger("ajaxComplete",[K,g]);g.global&&!--c.active&&c.event.trigger("ajaxStop")}g=c.extend(true,g,c.extend(true,{},c.ajaxSettings,g));var o,t=/=\?(&|$)/g,r,z,A=g.type.toUpperCase();
if(g.data&&g.processData&&typeof g.data!="string")g.data=c.param(g.data);if(g.dataType=="jsonp"){if(A=="GET")g.url.match(t)||(g.url+=(g.url.match(/\?/)?"&":"?")+(g.jsonp||"callback")+"=?");else if(!g.data||!g.data.match(t))g.data=(g.data?g.data+"&":"")+(g.jsonp||"callback")+"=?";g.dataType="json"}if(g.dataType=="json"&&(g.data&&g.data.match(t)||g.url.match(t))){o="jsonp"+N++;if(g.data)g.data=(g.data+"").replace(t,"="+o+"$1");g.url=g.url.replace(t,"="+o+"$1");g.dataType="script";window[o]=function(Q){z=
Q;i();k();window[o]=l;try{delete window[o]}catch(R){}F&&F.removeChild(G)}}if(g.dataType=="script"&&g.cache==null)g.cache=false;if(g.cache===false&&A=="GET"){t=+new Date;var m=g.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+t+"$2");g.url=m+(m==g.url?(g.url.match(/\?/)?"&":"?")+"_="+t:"")}if(g.data&&A=="GET"){g.url+=(g.url.match(/\?/)?"&":"?")+g.data;g.data=null}g.global&&!c.active++&&c.event.trigger("ajaxStart");t=/^(?:\w+:)?\/\/([^\/?#]+)/;if(g.dataType=="script"&&A=="GET"&&t.test(g.url)&&t.exec(g.url)[1]!=
location.host){var F=document.getElementsByTagName("head")[0],G=document.createElement("script");G.src=g.url;if(g.scriptCharset)G.charset=g.scriptCharset;if(!o){var L=false;G.onload=G.onreadystatechange=function(){if(!L&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){L=true;i();k();F.removeChild(G)}}}F.appendChild(G);return l}var s=false,K=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;g.username?K.open(A,g.url,g.async,g.username,g.password):
K.open(A,g.url,g.async);try{g.data&&K.setRequestHeader("Content-Type",g.contentType);if(g.ifModified)K.setRequestHeader("If-Modified-Since",c.lastModified[g.url]||"Thu, 01 Jan 1970 00:00:00 GMT");K.setRequestHeader("X-Requested-With","XMLHttpRequest");K.setRequestHeader("Accept",g.dataType&&g.accepts[g.dataType]?g.accepts[g.dataType]+", */*":g.accepts._default)}catch(p){}if(g.beforeSend&&g.beforeSend(K,g)===false){g.global&&c.active--;K.abort();return false}g.global&&c.event.trigger("ajaxSend",[K,
g]);var y=function(Q){if(!s&&K&&(K.readyState==4||Q=="timeout")){s=true;if(J){clearInterval(J);J=null}r=Q=="timeout"&&"timeout"||!c.httpSuccess(K)&&"error"||g.ifModified&&c.httpNotModified(K,g.url)&&"notmodified"||"success";if(r=="success")try{z=c.httpData(K,g.dataType,g.dataFilter)}catch(R){r="parsererror"}if(r=="success"){var S;try{S=K.getResponseHeader("Last-Modified")}catch(T){}if(g.ifModified&&S)c.lastModified[g.url]=S;o||i()}else c.handleError(g,K,r);k();if(g.async)K=null}};if(g.async){var J=
setInterval(y,13);g.timeout>0&&setTimeout(function(){if(K){K.abort();s||y("timeout")}},g.timeout)}try{K.send(g.data)}catch(P){c.handleError(g,K,null,P)}g.async||y();return K},handleError:function(g,i,k,o){g.error&&g.error(i,k,o);g.global&&c.event.trigger("ajaxError",[i,g,o])},active:0,httpSuccess:function(g){try{return!g.status&&location.protocol=="file:"||g.status>=200&&g.status<300||g.status==304||g.status==1223||c.browser.safari&&g.status==l}catch(i){}return false},httpNotModified:function(g,i){try{var k=
g.getResponseHeader("Last-Modified");return g.status==304||k==c.lastModified[i]||c.browser.safari&&g.status==l}catch(o){}return false},httpData:function(g,i,k){var o=g.getResponseHeader("content-type");g=(o=i=="xml"||!i&&o&&o.indexOf("xml")>=0)?g.responseXML:g.responseText;if(o&&g.documentElement.tagName=="parsererror")throw"parsererror";if(k)g=k(g,i);i=="script"&&c.globalEval(g);if(i=="json")g=eval("("+g+")");return g},param:function(g){var i=[];if(g.constructor==Array||g.jquery)c.each(g,function(){i.push(encodeURIComponent(this.name)+
"="+encodeURIComponent(this.value))});else for(var k in g)g[k]&&g[k].constructor==Array?c.each(g[k],function(){i.push(encodeURIComponent(k)+"="+encodeURIComponent(this))}):i.push(encodeURIComponent(k)+"="+encodeURIComponent(c.isFunction(g[k])?g[k]():g[k]));return i.join("&").replace(/%20/g,"+")}});c.fn.extend({show:function(g,i){return g?this.animate({height:"show",width:"show",opacity:"show"},g,i):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(c.css(this,"display")==
"none"){var k=c("<"+this.tagName+" />").appendTo("body");this.style.display=k.css("display");if(this.style.display=="none")this.style.display="block";k.remove()}}).end()},hide:function(g,i){return g?this.animate({height:"hide",width:"hide",opacity:"hide"},g,i):this.filter(":visible").each(function(){this.oldblock=this.oldblock||c.css(this,"display");this.style.display="none"}).end()},_toggle:c.fn.toggle,toggle:function(g,i){return c.isFunction(g)&&c.isFunction(i)?this._toggle.apply(this,arguments):
g?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},g,i):this.each(function(){c(this)[c(this).is(":hidden")?"show":"hide"]()})},slideDown:function(g,i){return this.animate({height:"show"},g,i)},slideUp:function(g,i){return this.animate({height:"hide"},g,i)},slideToggle:function(g,i){return this.animate({height:"toggle"},g,i)},fadeIn:function(g,i){return this.animate({opacity:"show"},g,i)},fadeOut:function(g,i){return this.animate({opacity:"hide"},g,i)},fadeTo:function(g,i,k){return this.animate({opacity:i},
g,k)},animate:function(g,i,k,o){var t=c.speed(i,k,o);return this[t.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var r=c.extend({},t),z,A=c(this).is(":hidden"),m=this;for(z in g){if(g[z]=="hide"&&A||g[z]=="show"&&!A)return r.complete.call(this);if(z=="height"||z=="width"){r.display=c.css(this,"display");r.overflow=this.style.overflow}}if(r.overflow!=null)this.style.overflow="hidden";r.curAnim=c.extend({},g);c.each(g,function(F,G){var L=new c.fx(m,r,F);if(/toggle|show|hide/.test(G))L[G==
"toggle"?A?"show":"hide":G](g);else{var s=G.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),K=L.cur(true)||0;if(s){var p=parseFloat(s[2]),y=s[3]||"px";if(y!="px"){m.style[F]=(p||1)+y;K=(p||1)/L.cur(true)*K;m.style[F]=K+y}if(s[1])p=(s[1]=="-="?-1:1)*p+K;L.custom(K,p,y)}else L.custom(K,G,"")}});return true})},queue:function(g,i){if(c.isFunction(g)||g&&g.constructor==Array){i=g;g="fx"}if(!g||typeof g=="string"&&!i)return O(this[0],g);return this.each(function(){if(i.constructor==Array)O(this,g,i);else{O(this,
g).push(i);O(this,g).length==1&&i.call(this)}})},stop:function(g,i){var k=c.timers;g&&this.queue([]);this.each(function(){for(var o=k.length-1;o>=0;o--)if(k[o].elem==this){i&&k[o](true);k.splice(o,1)}});i||this.dequeue();return this}});var O=function(g,i,k){if(g){i=i||"fx";var o=c.data(g,i+"queue");if(!o||k)o=c.data(g,i+"queue",c.makeArray(k))}return o};c.fn.dequeue=function(g){g=g||"fx";return this.each(function(){var i=O(this,g);i.shift();i.length&&i[0].call(this)})};c.extend({speed:function(g,
i,k){var o=g&&g.constructor==Object?g:{complete:k||!k&&i||c.isFunction(g)&&g,duration:g,easing:k&&i||i&&i.constructor!=Function&&i};o.duration=(o.duration&&o.duration.constructor==Number?o.duration:c.fx.speeds[o.duration])||c.fx.speeds.def;o.old=o.complete;o.complete=function(){o.queue!==false&&c(this).dequeue();c.isFunction(o.old)&&o.old.call(this)};return o},easing:{linear:function(g,i,k,o){return k+o*g},swing:function(g,i,k,o){return(-Math.cos(g*Math.PI)/2+0.5)*o+k}},timers:[],timerId:null,fx:function(g,
i,k){this.options=i;this.elem=g;this.prop=k;if(!i.orig)i.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block"},cur:function(g){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];return(g=parseFloat(c.css(this.elem,this.prop,g)))&&g>-10000?g:parseFloat(c.curCSS(this.elem,this.prop))||
0},custom:function(g,i,k){function o(r){return t.step(r)}this.startTime=+new Date;this.start=g;this.end=i;this.unit=k||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var t=this;o.elem=this.elem;c.timers.push(o);if(c.timerId==null)c.timerId=setInterval(function(){for(var r=c.timers,z=0;z<r.length;z++)r[z]()||r.splice(z--,1);if(!r.length){clearInterval(c.timerId);c.timerId=null}},13)},show:function(){this.options.orig[this.prop]=c.attr(this.elem.style,this.prop);this.options.show=
true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(g){var i=+new Date;if(g||i>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();g=this.options.curAnim[this.prop]=true;for(var k in this.options.curAnim)if(this.options.curAnim[k]!==true)g=false;
if(g){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(c.css(this.elem,"display")=="none")this.elem.style.display="block"}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var o in this.options.curAnim)c.attr(this.elem.style,o,this.options.orig[o])}g&&this.options.complete.call(this.elem);return false}else{k=i-this.startTime;this.state=k/this.options.duration;this.pos=c.easing[this.options.easing||
(c.easing.swing?"swing":"linear")](this.state,k,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(g){g.elem.scrollLeft=g.now},scrollTop:function(g){g.elem.scrollTop=g.now},opacity:function(g){c.attr(g.elem.style,"opacity",g.now)},_default:function(g){g.elem.style[g.prop]=g.now+g.unit}}});c.fn.offset=function(){function g(s){i(c.curCSS(s,"borderLeftWidth",true),c.curCSS(s,
"borderTopWidth",true))}function i(s,K){k+=parseInt(s,10)||0;o+=parseInt(K,10)||0}var k=0,o=0,t=this[0],r;if(t)with(c.browser){var z=t.parentNode,A=t,m=t.offsetParent;r=t.ownerDocument;var F=safari&&parseInt(version)<522&&!/adobeair/i.test(v),G=c.curCSS,L=G(t,"position")=="fixed";if(t.getBoundingClientRect){t=t.getBoundingClientRect();i(t.left+Math.max(r.documentElement.scrollLeft,r.body.scrollLeft),t.top+Math.max(r.documentElement.scrollTop,r.body.scrollTop));i(-r.documentElement.clientLeft,-r.documentElement.clientTop)}else{for(i(t.offsetLeft,
t.offsetTop);m;){i(m.offsetLeft,m.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(m.tagName)||safari&&!F)g(m);if(!L&&G(m,"position")=="fixed")L=true;A=/^body$/i.test(m.tagName)?A:m;m=m.offsetParent}for(;z&&z.tagName&&!/^body|html$/i.test(z.tagName);){/^inline|table.*$/i.test(G(z,"display"))||i(-z.scrollLeft,-z.scrollTop);mozilla&&G(z,"overflow")!="visible"&&g(z);z=z.parentNode}if(F&&(L||G(A,"position")=="absolute")||mozilla&&G(A,"position")!="absolute")i(-r.body.offsetLeft,-r.body.offsetTop);L&&i(Math.max(r.documentElement.scrollLeft,
r.body.scrollLeft),Math.max(r.documentElement.scrollTop,r.body.scrollTop))}r={top:o,left:k}}return r};c.fn.extend({position:function(){var g;if(this[0]){g=this.offsetParent();var i=this.offset(),k=/^body|html$/i.test(g[0].tagName)?{top:0,left:0}:g.offset();i.top-=f(this,"marginTop");i.left-=f(this,"marginLeft");k.top+=f(g,"borderTopWidth");k.left+=f(g,"borderLeftWidth");g={top:i.top-k.top,left:i.left-k.left}}return g},offsetParent:function(){for(var g=this[0].offsetParent;g&&!/^body|html$/i.test(g.tagName)&&
c.css(g,"position")=="static";)g=g.offsetParent;return c(g)}});c.each(["Left","Top"],function(g,i){var k="scroll"+i;c.fn[k]=function(o){if(this[0])return o!=l?this.each(function(){this==window||this==document?window.scrollTo(!g?o:c(window).scrollLeft(),g?o:c(window).scrollTop()):this[k]=o}):this[0]==window||this[0]==document?self[g?"pageYOffset":"pageXOffset"]||c.boxModel&&document.documentElement[k]||document.body[k]:this[0][k]}});c.each(["Height","Width"],function(g,i){var k=g?"Left":"Top",o=g?
"Right":"Bottom";c.fn["inner"+i]=function(){return this[i.toLowerCase()]()+f(this,"padding"+k)+f(this,"padding"+o)};c.fn["outer"+i]=function(t){return this["inner"+i]()+f(this,"border"+k+"Width")+f(this,"border"+o+"Width")+(t?f(this,"margin"+k)+f(this,"margin"+o):0)}})})();
(function(b){function f(a,d,c){a=b[a][d].getter||[];a=typeof a=="string"?a.split(/,?\s+/):a;return b.inArray(c,a)!=-1}b.ui={plugin:{add:function(a,d,c){a=b.ui[a].prototype;for(var h in c){a.plugins[h]=a.plugins[h]||[];a.plugins[h].push([d,c[h]])}},call:function(a,d,c){if(d=a.plugins[d])for(var h=0;h<d.length;h++)a.options[d[h][0]]&&d[h][1].apply(a.element,c)}},cssCache:{},css:function(a){if(b.ui.cssCache[a])return b.ui.cssCache[a];var d=b('<div class="ui-gen">').addClass(a).css({position:"absolute",
top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");b.ui.cssCache[a]=!!(!/auto|default/.test(d.css("cursor"))||/^[1-9]/.test(d.css("height"))||/^[1-9]/.test(d.css("width"))||!/none/.test(d.css("backgroundImage"))||!/transparent|rgba\(0, 0, 0, 0\)/.test(d.css("backgroundColor")));try{b("body").get(0).removeChild(d.get(0))}catch(c){}return b.ui.cssCache[a]},disableSelection:function(a){b(a).attr("unselectable","on").css("MozUserSelect","none")},enableSelection:function(a){b(a).attr("unselectable",
"off").css("MozUserSelect","")},hasScroll:function(a,d){var c=/top/.test(d||"top")?"scrollTop":"scrollLeft",h=false;if(a[c]>0)return true;a[c]=1;h=a[c]>0?true:false;a[c]=0;return h}};var e=b.fn.remove;b.fn.remove=function(){b("*",this).add(this).triggerHandler("remove");return e.apply(this,arguments)};b.widget=function(a,d){var c=a.split(".")[0];a=a.split(".")[1];b.fn[a]=function(h){var j=typeof h=="string",l=Array.prototype.slice.call(arguments,1);if(j&&f(c,a,h)){var n=b.data(this[0],a);return n?
n[h].apply(n,l):undefined}return this.each(function(){var q=b.data(this,a);if(j&&q&&b.isFunction(q[h]))q[h].apply(q,l);else j||b.data(this,a,new b[c][a](this,h))})};b[c][a]=function(h,j){var l=this;this.widgetName=a;this.widgetBaseClass=c+"-"+a;this.options=b.extend({},b.widget.defaults,b[c][a].defaults,j);this.element=b(h).bind("setData."+a,function(n,q,x){return l.setData(q,x)}).bind("getData."+a,function(n,q){return l.getData(q)}).bind("remove",function(){return l.destroy()});this.init()};b[c][a].prototype=
b.extend({},b.widget.prototype,d)};b.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(a){return this.options[a]},setData:function(a,d){this.options[a]=d;if(a=="disabled")this.element[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};b.widget.defaults={disabled:false};b.ui.mouse={mouseInit:function(){var a=this;this.element.bind("mousedown."+
this.widgetName,function(d){return a.mouseDown(d)});if(b.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},mouseDestroy:function(){this.element.unbind("."+this.widgetName);b.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable)},mouseDown:function(a){this._mouseStarted&&this.mouseUp(a);this._mouseDownEvent=a;var d=this,c=a.which==1,h=typeof this.options.cancel=="string"?b(a.target).parents().add(a.target).filter(this.options.cancel).length:
false;if(!c||h||!this.mouseCapture(a))return true;this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){d._mouseDelayMet=true},this.options.delay);if(this.mouseDistanceMet(a)&&this.mouseDelayMet(a)){this._mouseStarted=this.mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}this._mouseMoveDelegate=function(j){return d.mouseMove(j)};this._mouseUpDelegate=function(j){return d.mouseUp(j)};b(document).bind("mousemove."+this.widgetName,
this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(a){if(b.browser.msie&&!a.button)return this.mouseUp(a);if(this._mouseStarted){this.mouseDrag(a);return false}if(this.mouseDistanceMet(a)&&this.mouseDelayMet(a))(this._mouseStarted=this.mouseStart(this._mouseDownEvent,a)!==false)?this.mouseDrag(a):this.mouseUp(a);return!this._mouseStarted},mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+
this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(a)}return false},mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},mouseDelayMet:function(){return this._mouseDelayMet},mouseStart:function(){},mouseDrag:function(){},mouseStop:function(){},mouseCapture:function(){return true}};b.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);
(function(b){b.widget("ui.draggable",b.extend({},b.ui.mouse,{init:function(){var f=this.options;f.helper=="original"&&!/(relative|absolute|fixed)/.test(this.element.css("position"))&&this.element.css("position","relative");this.element.addClass("ui-draggable");f.disabled&&this.element.addClass("ui-draggable-disabled");this.mouseInit()},mouseStart:function(f){var e=this.options;if(this.helper||e.disabled||b(f.target).is(".ui-resizable-handle"))return false;var a=!this.options.handle||!b(this.options.handle,
this.element).length?true:false;b(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==f.target)a=true});if(!a)return false;if(b.ui.ddmanager)b.ui.ddmanager.current=this;this.helper=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f])):e.helper=="clone"?this.element.clone():this.element;this.helper.parents("body").length||this.helper.appendTo(e.appendTo=="parent"?this.element[0].parentNode:e.appendTo);this.helper[0]!=this.element[0]&&!/(fixed|absolute)/.test(this.helper.css("position"))&&
this.helper.css("position","absolute");this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:f.pageX-this.offset.left,top:f.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var d=this.offsetParent.offset();if(this.offsetParent[0]==
document.body&&b.browser.mozilla)d={top:0,left:0};this.offset.parent={top:d.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:d.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};d=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:d.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:d.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(f);
this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(e.cursorAt){if(e.cursorAt.left!=undefined)this.offset.click.left=e.cursorAt.left+this.margins.left;if(e.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-e.cursorAt.right+this.margins.left;if(e.cursorAt.top!=undefined)this.offset.click.top=e.cursorAt.top+this.margins.top;if(e.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-e.cursorAt.bottom+this.margins.top}if(e.containment){if(e.containment==
"parent")e.containment=this.helper[0].parentNode;if(e.containment=="document"||e.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(e.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(b(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-
this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!/^(document|window|parent)$/.test(e.containment)){d=b(e.containment)[0];var c=b(e.containment).offset();this.containment=[c.left+(parseInt(b(d).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,c.top+(parseInt(b(d).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,c.left+Math.max(d.scrollWidth,
d.offsetWidth)-(parseInt(b(d).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),c.top+Math.max(d.scrollHeight,d.offsetHeight)-(parseInt(b(d).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}}this.propagate("start",f);this.helperProportions={width:this.helper.outerWidth(),
height:this.helper.outerHeight()};b.ui.ddmanager&&!e.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,f);this.helper.addClass("ui-draggable-dragging");this.mouseDrag(f);return true},convertPositionTo:function(f,e){if(!e)e=this.position;var a=f=="absolute"?1:-1;return{top:e.top+this.offset.relative.top*a+this.offset.parent.top*a-(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*a+(this.cssPosition=="fixed"?b(document).scrollTop():
0)*a+this.margins.top*a,left:e.left+this.offset.relative.left*a+this.offset.parent.left*a-(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*a+(this.cssPosition=="fixed"?b(document).scrollLeft():0)*a+this.margins.left*a}},generatePosition:function(f){var e=this.options;f={top:f.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==
document.body?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?b(document).scrollTop():0),left:f.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?b(document).scrollLeft():0)};if(!this.originalPosition)return f;if(this.containment){if(f.left<this.containment[0])f.left=this.containment[0];if(f.top<this.containment[1])f.top=
this.containment[1];if(f.left>this.containment[2])f.left=this.containment[2];if(f.top>this.containment[3])f.top=this.containment[3]}if(e.grid){var a=this.originalPosition.top+Math.round((f.top-this.originalPosition.top)/e.grid[1])*e.grid[1];f.top=this.containment?!(a<this.containment[1]||a>this.containment[3])?a:!(a<this.containment[1])?a-e.grid[1]:a+e.grid[1]:a;a=this.originalPosition.left+Math.round((f.left-this.originalPosition.left)/e.grid[0])*e.grid[0];f.left=this.containment?!(a<this.containment[0]||
a>this.containment[2])?a:!(a<this.containment[0])?a-e.grid[0]:a+e.grid[0]:a}return f},mouseDrag:function(f){this.position=this.generatePosition(f);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",f)||this.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";b.ui.ddmanager&&b.ui.ddmanager.drag(this,f);return false},
mouseStop:function(f){var e=false;if(b.ui.ddmanager&&!this.options.dropBehaviour)e=b.ui.ddmanager.drop(this,f);if(this.options.revert=="invalid"&&!e||this.options.revert=="valid"&&e||this.options.revert===true){var a=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){a.propagate("stop",f);a.clear()})}else{this.propagate("stop",f);this.clear()}return false},clear:function(){this.helper.removeClass("ui-draggable-dragging");this.options.helper!="original"&&
!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},propagate:function(f,e){b.ui.plugin.call(this,f,[e,this.uiHash()]);if(f=="drag")this.positionAbs=this.convertPositionTo("absolute");return this.element.triggerHandler(f=="drag"?f:"drag"+f,[e,this.uiHash()],this.options[f])},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable");
this.mouseDestroy()}}}));b.extend(b.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});b.ui.plugin.add("draggable","cursor",{start:function(f,e){var a=b("body");if(a.css("cursor"))e.options._cursor=a.css("cursor");a.css("cursor",e.options.cursor)},stop:function(f,e){e.options._cursor&&b("body").css("cursor",e.options._cursor)}});b.ui.plugin.add("draggable","zIndex",{start:function(f,e){var a=b(e.helper);if(a.css("zIndex"))e.options._zIndex=
a.css("zIndex");a.css("zIndex",e.options.zIndex)},stop:function(f,e){e.options._zIndex&&b(e.helper).css("zIndex",e.options._zIndex)}});b.ui.plugin.add("draggable","opacity",{start:function(f,e){var a=b(e.helper);if(a.css("opacity"))e.options._opacity=a.css("opacity");a.css("opacity",e.options.opacity)},stop:function(f,e){e.options._opacity&&b(e.helper).css("opacity",e.options._opacity)}});b.ui.plugin.add("draggable","iframeFix",{start:function(f,e){b(e.options.iframeFix===true?"iframe":e.options.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:1E3}).css(b(this).offset()).appendTo("body")})},stop:function(){b("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add("draggable","scroll",{start:function(f,e){var a=e.options,d=b(this).data("draggable");a.scrollSensitivity=a.scrollSensitivity||20;a.scrollSpeed=a.scrollSpeed||20;d.overflowY=function(c){do{if(/auto|scroll/.test(c.css("overflow"))||/auto|scroll/.test(c.css("overflow-y")))return c;
c=c.parent()}while(c[0].parentNode);return b(document)}(this);d.overflowX=function(c){do{if(/auto|scroll/.test(c.css("overflow"))||/auto|scroll/.test(c.css("overflow-x")))return c;c=c.parent()}while(c[0].parentNode);return b(document)}(this);if(d.overflowY[0]!=document&&d.overflowY[0].tagName!="HTML")d.overflowYOffset=d.overflowY.offset();if(d.overflowX[0]!=document&&d.overflowX[0].tagName!="HTML")d.overflowXOffset=d.overflowX.offset()},drag:function(f,e){var a=e.options,d=b(this).data("draggable");
if(d.overflowY[0]!=document&&d.overflowY[0].tagName!="HTML"){if(d.overflowYOffset.top+d.overflowY[0].offsetHeight-f.pageY<a.scrollSensitivity)d.overflowY[0].scrollTop+=a.scrollSpeed;if(f.pageY-d.overflowYOffset.top<a.scrollSensitivity)d.overflowY[0].scrollTop-=a.scrollSpeed}else{f.pageY-b(document).scrollTop()<a.scrollSensitivity&&b(document).scrollTop(b(document).scrollTop()-a.scrollSpeed);b(window).height()-(f.pageY-b(document).scrollTop())<a.scrollSensitivity&&b(document).scrollTop(b(document).scrollTop()+
a.scrollSpeed)}if(d.overflowX[0]!=document&&d.overflowX[0].tagName!="HTML"){if(d.overflowXOffset.left+d.overflowX[0].offsetWidth-f.pageX<a.scrollSensitivity)d.overflowX[0].scrollLeft+=a.scrollSpeed;if(f.pageX-d.overflowXOffset.left<a.scrollSensitivity)d.overflowX[0].scrollLeft-=a.scrollSpeed}else{f.pageX-b(document).scrollLeft()<a.scrollSensitivity&&b(document).scrollLeft(b(document).scrollLeft()-a.scrollSpeed);b(window).width()-(f.pageX-b(document).scrollLeft())<a.scrollSensitivity&&b(document).scrollLeft(b(document).scrollLeft()+
a.scrollSpeed)}}});b.ui.plugin.add("draggable","snap",{start:function(f,e){var a=b(this).data("draggable");a.snapElements=[];b(e.options.snap===true?".ui-draggable":e.options.snap).each(function(){var d=b(this),c=d.offset();this!=a.element[0]&&a.snapElements.push({item:this,width:d.outerWidth(),height:d.outerHeight(),top:c.top,left:c.left})})},drag:function(f,e){for(var a=b(this).data("draggable"),d=e.options.snapTolerance||20,c=e.absolutePosition.left,h=c+a.helperProportions.width,j=e.absolutePosition.top,
l=j+a.helperProportions.height,n=a.snapElements.length-1;n>=0;n--){var q=a.snapElements[n].left,x=q+a.snapElements[n].width,u=a.snapElements[n].top,w=u+a.snapElements[n].height;if(q-d<c&&c<x+d&&u-d<j&&j<w+d||q-d<c&&c<x+d&&u-d<l&&l<w+d||q-d<h&&h<x+d&&u-d<j&&j<w+d||q-d<h&&h<x+d&&u-d<l&&l<w+d){if(e.options.snapMode!="inner"){var v=Math.abs(u-l)<=20,B=Math.abs(w-j)<=20,D=Math.abs(q-h)<=20,H=Math.abs(x-c)<=20;if(v)e.position.top=a.convertPositionTo("relative",{top:u-a.helperProportions.height,left:0}).top;
if(B)e.position.top=a.convertPositionTo("relative",{top:w,left:0}).top;if(D)e.position.left=a.convertPositionTo("relative",{top:0,left:q-a.helperProportions.width}).left;if(H)e.position.left=a.convertPositionTo("relative",{top:0,left:x}).left}if(e.options.snapMode!="outer"){v=Math.abs(u-j)<=20;B=Math.abs(w-l)<=20;D=Math.abs(q-c)<=20;H=Math.abs(x-h)<=20;if(v)e.position.top=a.convertPositionTo("relative",{top:u,left:0}).top;if(B)e.position.top=a.convertPositionTo("relative",{top:w-a.helperProportions.height,
left:0}).top;if(D)e.position.left=a.convertPositionTo("relative",{top:0,left:q}).left;if(H)e.position.left=a.convertPositionTo("relative",{top:0,left:x-a.helperProportions.width}).left}}}}});b.ui.plugin.add("draggable","connectToSortable",{start:function(f,e){var a=b(this).data("draggable");a.sortables=[];b(e.options.connectToSortable).each(function(){if(b.data(this,"sortable")){var d=b.data(this,"sortable");a.sortables.push({instance:d,shouldRevert:d.options.revert});d.refreshItems();d.propagate("activate",
f,a)}})},stop:function(f){var e=b(this).data("draggable");b.each(e.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;e.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance.mouseStop(f);this.instance.element.triggerHandler("sortreceive",[f,b.extend(this.instance.ui(),{sender:e.element})],this.instance.options.receive);this.instance.options.helper=this.instance.options._helper}else this.instance.propagate("deactivate",
f,e)})},drag:function(f,e){var a=b(this).data("draggable"),d=this,c=function(h){var j=h.left,l=j+h.width,n=h.top;h=n+h.height;return j<this.positionAbs.left+this.offset.click.left&&this.positionAbs.left+this.offset.click.left<l&&n<this.positionAbs.top+this.offset.click.top&&this.positionAbs.top+this.offset.click.top<h};b.each(a.sortables,function(){if(c.call(a,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=b(d).clone().appendTo(this.instance.element).data("sortable-item",
true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return e.helper[0]};f.target=this.instance.currentItem[0];this.instance.mouseCapture(f,true);this.instance.mouseStart(f,true,true);this.instance.offset.click.top=a.offset.click.top;this.instance.offset.click.left=a.offset.click.left;this.instance.offset.parent.left-=a.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=a.offset.parent.top-this.instance.offset.parent.top;
a.propagate("toSortable",f)}this.instance.currentItem&&this.instance.mouseDrag(f)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(f,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();a.propagate("fromSortable",f)}})}});b.ui.plugin.add("draggable","stack",{start:function(f,e){var a=b.makeArray(b(e.options.stack.group)).sort(function(d,
c){return(parseInt(b(d).css("zIndex"),10)||e.options.stack.min)-(parseInt(b(c).css("zIndex"),10)||e.options.stack.min)});b(a).each(function(d){this.style.zIndex=e.options.stack.min+d});this[0].style.zIndex=e.options.stack.min+a.length}})})(jQuery);
(function(b){b.widget("ui.droppable",{init:function(){this.element.addClass("ui-droppable");this.isover=0;this.isout=1;var f=this.options,e=f.accept;f=b.extend(f,{accept:f.accept&&f.accept.constructor==Function?f.accept:function(a){return b(a).is(e)}});this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};b.ui.ddmanager.droppables.push(this)},plugins:{},ui:function(f){return{draggable:f.currentItem||f.element,helper:f.helper,position:f.position,absolutePosition:f.positionAbs,
options:this.options,element:this.element}},destroy:function(){for(var f=b.ui.ddmanager.droppables,e=0;e<f.length;e++)f[e]==this&&f.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},over:function(f){var e=b.ui.ddmanager.current;if(!(!e||(e.currentItem||e.element)[0]==this.element[0]))if(this.options.accept.call(this.element,e.currentItem||e.element)){b.ui.plugin.call(this,"over",[f,this.ui(e)]);this.element.triggerHandler("dropover",
[f,this.ui(e)],this.options.over)}},out:function(f){var e=b.ui.ddmanager.current;if(!(!e||(e.currentItem||e.element)[0]==this.element[0]))if(this.options.accept.call(this.element,e.currentItem||e.element)){b.ui.plugin.call(this,"out",[f,this.ui(e)]);this.element.triggerHandler("dropout",[f,this.ui(e)],this.options.out)}},drop:function(f,e){var a=e||b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0])return false;var d=false;this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function(){var c=
b.data(this,"droppable");if(c.options.greedy&&b.ui.intersect(a,b.extend(c,{offset:c.element.offset()}),c.options.tolerance)){d=true;return false}});if(d)return false;if(this.options.accept.call(this.element,a.currentItem||a.element)){b.ui.plugin.call(this,"drop",[f,this.ui(a)]);this.element.triggerHandler("drop",[f,this.ui(a)],this.options.drop);return true}return false},activate:function(f){var e=b.ui.ddmanager.current;b.ui.plugin.call(this,"activate",[f,this.ui(e)]);e&&this.element.triggerHandler("dropactivate",
[f,this.ui(e)],this.options.activate)},deactivate:function(f){var e=b.ui.ddmanager.current;b.ui.plugin.call(this,"deactivate",[f,this.ui(e)]);e&&this.element.triggerHandler("dropdeactivate",[f,this.ui(e)],this.options.deactivate)}});b.extend(b.ui.droppable,{defaults:{disabled:false,tolerance:"intersect"}});b.ui.intersect=function(f,e,a){if(!e.offset)return false;var d=(f.positionAbs||f.position.absolute).left,c=d+f.helperProportions.width,h=(f.positionAbs||f.position.absolute).top,j=h+f.helperProportions.height,
l=e.offset.left,n=l+e.proportions.width,q=e.offset.top;e=q+e.proportions.height;switch(a){case "fit":return l<d&&c<n&&q<h&&j<e;case "intersect":return l<d+f.helperProportions.width/2&&c-f.helperProportions.width/2<n&&q<h+f.helperProportions.height/2&&j-f.helperProportions.height/2<e;case "pointer":return l<(f.positionAbs||f.position.absolute).left+(f.clickOffset||f.offset.click).left&&(f.positionAbs||f.position.absolute).left+(f.clickOffset||f.offset.click).left<n&&q<(f.positionAbs||f.position.absolute).top+
(f.clickOffset||f.offset.click).top&&(f.positionAbs||f.position.absolute).top+(f.clickOffset||f.offset.click).top<e;case "touch":return(h>=q&&h<=e||j>=q&&j<=e||h<q&&j>e)&&(d>=l&&d<=n||c>=l&&c<=n||d<l&&c>n);default:return false}};b.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(f,e){for(var a=b.ui.ddmanager.droppables,d=e?e.type:null,c=0;c<a.length;c++)if(!(a[c].options.disabled||f&&!a[c].options.accept.call(a[c].element,f.currentItem||f.element))){a[c].visible=a[c].element.css("display")!=
"none";if(a[c].visible){a[c].offset=a[c].element.offset();a[c].proportions={width:a[c].element[0].offsetWidth,height:a[c].element[0].offsetHeight};if(d=="dragstart"||d=="sortactivate")a[c].activate.call(a[c],e)}}},drop:function(f,e){var a=false;b.each(b.ui.ddmanager.droppables,function(){if(this.options){if(!this.options.disabled&&this.visible&&b.ui.intersect(f,this,this.options.tolerance))a=this.drop.call(this,e);if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element,f.currentItem||
f.element)){this.isout=1;this.isover=0;this.deactivate.call(this,e)}}});return a},drag:function(f,e){f.options.refreshPositions&&b.ui.ddmanager.prepareOffsets(f,e);b.each(b.ui.ddmanager.droppables,function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var a=b.ui.intersect(f,this,this.options.tolerance);if(a=!a&&this.isover==1?"isout":a&&this.isover==0?"isover":null){var d;if(this.options.greedy){var c=this.element.parents(".ui-droppable:eq(0)");if(c.length){d=b.data(c[0],"droppable");
d.greedyChild=a=="isover"?1:0}}if(d&&a=="isover"){d.isover=0;d.isout=1;d.out.call(d,e)}this[a]=1;this[a=="isout"?"isover":"isout"]=0;this[a=="isover"?"over":"out"].call(this,e);if(d&&a=="isout"){d.isout=0;d.isover=1;d.over.call(d,e)}}}})}};b.ui.plugin.add("droppable","activeClass",{activate:function(f,e){b(this).addClass(e.options.activeClass)},deactivate:function(f,e){b(this).removeClass(e.options.activeClass)},drop:function(f,e){b(this).removeClass(e.options.activeClass)}});b.ui.plugin.add("droppable",
"hoverClass",{over:function(f,e){b(this).addClass(e.options.hoverClass)},out:function(f,e){b(this).removeClass(e.options.hoverClass)},drop:function(f,e){b(this).removeClass(e.options.hoverClass)}})})(jQuery);
(function(b){b.widget("ui.resizable",b.extend({},b.ui.mouse,{init:function(){var f=this,e=this.options,a=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(a)?"relative":a});b.extend(e,{_aspectRatio:!!e.aspectRatio,helper:e.helper||e.ghost||e.animate?e.helper||"proxy":null,knobHandles:e.knobHandles===true?"ui-resizable-knob-handle":e.knobHandles});e.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",
background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:"1px solid #DEDEDE"},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:"1px solid #DEDEDE"},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:"1px solid #DEDEDE"},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:"1px solid #DEDEDE"},"ui-resizable-se":{cursor:"se-resize",width:"4px",
height:"4px",borderRight:"1px solid #DEDEDE",borderBottom:"1px solid #DEDEDE"},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:"1px solid #DEDEDE",borderLeft:"1px solid #DEDEDE"},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:"1px solid #DEDEDE",borderTop:"1px solid #DEDEDE"},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:"1px solid #DEDEDE",borderTop:"1px solid #DEDEDE"}};e.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",
border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",
right:"0px",top:"0px"}};e._nodeName=this.element[0].nodeName;if(e._nodeName.match(/canvas|textarea|input|select|button|img/i)){a=this.element;/relative/.test(a.css("position"))&&b.browser.opera&&a.css({position:"relative",top:"auto",left:"auto"});a.wrap(b('<div class="ui-wrapper"\tstyle="overflow: hidden;"></div>').css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")}));a=this.element;this.element=this.element.parent();this.element.data("resizable",
this);this.element.css({marginLeft:a.css("marginLeft"),marginTop:a.css("marginTop"),marginRight:a.css("marginRight"),marginBottom:a.css("marginBottom")});a.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});b.browser.safari&&e.preventDefault&&a.css("resize","none");e.proportionallyResize=a.css({position:"static",zoom:1,display:"block"});this.element.css({margin:a.css("margin")});this._proportionallyResize()}if(!e.handles)e.handles=!b(".ui-resizable-handle",this.element).length?"e,s,se":
{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"};if(e.handles.constructor==String){e.zIndex=e.zIndex||1E3;if(e.handles=="all")e.handles="n,e,s,w,se,sw,ne,nw";a=e.handles.split(",");e.handles={};for(var d={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",
sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"},c=0;c<a.length;c++){var h=b.trim(a[c]),j=e.defaultTheme,l="ui-resizable-"+h,n=!b.ui.css(l)&&!e.knobHandles,q=b.ui.css("ui-resizable-knob-handle");j=b.extend(j[l],j["ui-resizable-handle"]);q=b.extend(e.knobTheme[l],!q?e.knobTheme["ui-resizable-handle"]:{});var x=/sw|se|ne|nw/.test(h)?{zIndex:++e.zIndex}:{};l=b(['<div class="ui-resizable-handle ',l,'" style="',n?d[h]:"",d.handle,'"></div>'].join("")).css(x);e.handles[h]=
".ui-resizable-"+h;this.element.append(l.css(n?j:{}).css(e.knobHandles?q:{}).addClass(e.knobHandles?"ui-resizable-knob-handle":"").addClass(e.knobHandles))}if(e.knobHandles)this.element.addClass("ui-resizable-knob").css(!b.ui.css("ui-resizable-knob")?{}:{})}this._renderAxis=function(u){u=u||this.element;for(var w in e.handles){if(e.handles[w].constructor==String)e.handles[w]=b(e.handles[w],this.element).show();e.transparent&&e.handles[w].css({opacity:0});if(this.element.is(".ui-wrapper")&&e._nodeName.match(/textarea|input|select|button/i)){var v=
b(e.handles[w],this.element),B=0;B=/sw|ne|nw|se|n|s/.test(w)?v.outerHeight():v.outerWidth();v=["padding",/ne|nw|n/.test(w)?"Top":/se|sw|s/.test(w)?"Bottom":/^e$/.test(w)?"Right":"Left"].join("");e.transparent||u.css(v,B);this._proportionallyResize()}b(e.handles[w])}};this._renderAxis(this.element);e._handles=b(".ui-resizable-handle",f.element);e.disableSelection&&e._handles.each(function(u,w){b.ui.disableSelection(w)});e._handles.mouseover(function(){if(!e.resizing){if(this.className)var u=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
f.axis=e.axis=u&&u[1]?u[1]:"se"}});if(e.autoHide){e._handles.hide();b(f.element).addClass("ui-resizable-autohide").hover(function(){b(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){b(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this.mouseInit()},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,
originalPosition:this.originalPosition}},propagate:function(f,e){b.ui.plugin.call(this,f,[e,this.ui()]);f!="resize"&&this.element.triggerHandler(["resize",f].join(""),[e,this.ui()],this.options[f])},destroy:function(){var f=this.element,e=f.children(".ui-resizable").get(0);this.mouseDestroy();var a=function(d){b(d).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};a(f);if(f.is(".ui-wrapper")&&e){f.parent().append(b(e).css({position:f.css("position"),
width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).end().remove();a(e)}},mouseStart:function(f){if(this.options.disabled)return false;var e=false;for(var a in this.options.handles)if(b(this.options.handles[a])[0]==f.target)e=true;if(!e)return false;e=this.options;var d=this.element.position();a=this.element;var c=function(l){return parseInt(l,10)||0},h=b.browser.msie&&b.browser.version<7;e.resizing=true;e.documentScroll={top:b(document).scrollTop(),left:b(document).scrollLeft()};
if(a.is(".ui-draggable")||/absolute/.test(a.css("position"))){var j=b.browser.msie&&!e.containment&&/absolute/.test(a.css("position"))&&!/relative/.test(a.parent().css("position"));a.css({position:"absolute",top:d.top+(j?e.documentScroll.top:0),left:d.left+(j?e.documentScroll.left:0)})}b.browser.opera&&/relative/.test(a.css("position"))&&a.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();d=c(this.helper.css("left"));c=c(this.helper.css("top"));if(e.containment){d+=b(e.containment).scrollLeft()||
0;c+=b(e.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:d,top:c};this.size=e.helper||h?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()};this.originalSize=e.helper||h?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()};this.originalPosition={left:d,top:c};this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};e.aspectRatio=
typeof e.aspectRatio=="number"?e.aspectRatio:this.originalSize.height/this.originalSize.width||1;e.preserveCursor&&b("body").css("cursor",this.axis+"-resize");this.propagate("start",f);return true},mouseDrag:function(f){var e=this.helper,a=this.options,d=this.originalMousePosition,c=this._change[this.axis];if(!c)return false;d=c.apply(this,[f,f.pageX-d.left||0,f.pageY-d.top||0]);if(a._aspectRatio||f.shiftKey)d=this._updateRatio(d,f);d=this._respectSize(d,f);this.propagate("resize",f);e.css({top:this.position.top+
"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!a.helper&&a.proportionallyResize&&this._proportionallyResize();this._updateCache(d);this.element.triggerHandler("resize",[f,this.ui()],this.options.resize);return false},mouseStop:function(f){this.options.resizing=false;var e=this.options;if(e.helper){var a=e.proportionallyResize,d=a&&/textarea/i.test(a.get(0).nodeName);a=d&&b.ui.hasScroll(a.get(0),"left")?0:this.sizeDiff.height;d={width:this.size.width-(d?
0:this.sizeDiff.width),height:this.size.height-a};a=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null;var c=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;e.animate||this.element.css(b.extend(d,{top:c,left:a}));e.helper&&!e.animate&&this._proportionallyResize()}e.preserveCursor&&b("body").css("cursor","auto");this.propagate("stop",f);e.helper&&this.helper.remove();return false},_updateCache:function(f){this.offset=
this.helper.offset();if(f.left)this.position.left=f.left;if(f.top)this.position.top=f.top;if(f.height)this.size.height=f.height;if(f.width)this.size.width=f.width},_updateRatio:function(f){var e=this.options,a=this.position,d=this.size,c=this.axis;if(f.height)f.width=d.height/e.aspectRatio;else if(f.width)f.height=d.width*e.aspectRatio;if(c=="sw"){f.left=a.left+(d.width-f.width);f.top=null}if(c=="nw"){f.top=a.top+(d.height-f.height);f.left=a.left+(d.width-f.width)}return f},_respectSize:function(f){var e=
this.options,a=this.axis,d=f.width&&e.maxWidth&&e.maxWidth<f.width,c=f.height&&e.maxHeight&&e.maxHeight<f.height,h=f.width&&e.minWidth&&e.minWidth>f.width,j=f.height&&e.minHeight&&e.minHeight>f.height;if(h)f.width=e.minWidth;if(j)f.height=e.minHeight;if(d)f.width=e.maxWidth;if(c)f.height=e.maxHeight;var l=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height,q=/sw|nw|w/.test(a);a=/nw|ne|n/.test(a);if(h&&q)f.left=l-e.minWidth;if(d&&q)f.left=l-e.maxWidth;if(j&&a)f.top=
n-e.minHeight;if(c&&a)f.top=n-e.maxHeight;if((e=!f.width&&!f.height)&&!f.left&&f.top)f.top=null;else if(e&&!f.top&&f.left)f.left=null;return f},_proportionallyResize:function(){var f=this.options;if(f.proportionallyResize){var e=f.proportionallyResize,a=this.helper||this.element;if(!f.borderDif){var d=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],c=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];f.borderDif=
b.map(d,function(h,j){var l=parseInt(h,10)||0,n=parseInt(c[j],10)||0;return l+n})}e.css({height:a.height()-f.borderDif[0]-f.borderDif[2]+"px",width:a.width()-f.borderDif[1]-f.borderDif[3]+"px"})}},_renderProxy:function(){var f=this.element,e=this.options;this.elementOffset=f.offset();if(e.helper){this.helper=this.helper||b('<div style="overflow:hidden;"></div>');var a=b.browser.msie&&b.browser.version<7,d=a?1:0;a=a?2:-1;this.helper.addClass(e.helper).css({width:f.outerWidth()+a,height:f.outerHeight()+
a,position:"absolute",left:this.elementOffset.left-d+"px",top:this.elementOffset.top-d+"px",zIndex:++e.zIndex});this.helper.appendTo("body");e.disableSelection&&b.ui.disableSelection(this.helper.get(0))}else this.helper=f},_change:{e:function(f,e){return{width:this.originalSize.width+e}},w:function(f,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(f,e,a){return{top:this.originalPosition.top+a,height:this.originalSize.height-a}},s:function(f,e,a){return{height:this.originalSize.height+
a}},se:function(f,e,a){return b.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,a]))},sw:function(f,e,a){return b.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,a]))},ne:function(f,e,a){return b.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,a]))},nw:function(f,e,a){return b.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,a]))}}}));b.extend(b.ui.resizable,{defaults:{cancel:":input",distance:1,
delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});b.ui.plugin.add("resizable","containment",{start:function(f,e){var a=e.options,d=b(this).data("resizable"),c=d.element;a=a.containment;if(c=a instanceof b?a.get(0):/parent/.test(a)?c.parent().get(0):a){d.containerElement=b(c);if(/document/.test(a)||a==document){d.containerOffset={left:0,top:0};d.containerPosition={left:0,top:0};d.parentData=
{element:b(document),left:0,top:0,width:b(document).width(),height:b(document).height()||document.body.parentNode.scrollHeight}}else{d.containerOffset=b(c).offset();d.containerPosition=b(c).position();d.containerSize={height:b(c).innerHeight(),width:b(c).innerWidth()};a=d.containerOffset;var h=d.containerSize.height,j=d.containerSize.width;j=b.ui.hasScroll(c,"left")?c.scrollWidth:j;h=b.ui.hasScroll(c)?c.scrollHeight:h;d.parentData={element:c,left:a.left,top:a.top,width:j,height:h}}}},resize:function(f,
e){var a=e.options,d=b(this).data("resizable"),c=d.containerOffset,h=d.position,j=a._aspectRatio||f.shiftKey,l={top:0,left:0},n=d.containerElement;if(n[0]!=document&&/static/.test(n.css("position")))l=d.containerPosition;if(h.left<(a.helper?c.left:l.left)){d.size.width+=a.helper?d.position.left-c.left:d.position.left-l.left;if(j)d.size.height=d.size.width*a.aspectRatio;d.position.left=a.helper?c.left:l.left}if(h.top<(a.helper?c.top:0)){d.size.height+=a.helper?d.position.top-c.top:d.position.top;if(j)d.size.width=
d.size.height/a.aspectRatio;d.position.top=a.helper?c.top:0}h=(a.helper?d.offset.left-c.left:d.position.left-l.left)+d.sizeDiff.width;c=(a.helper?d.offset.top-c.top:d.position.top)+d.sizeDiff.height;if(h+d.size.width>=d.parentData.width){d.size.width=d.parentData.width-h;if(j)d.size.height=d.size.width*a.aspectRatio}if(c+d.size.height>=d.parentData.height){d.size.height=d.parentData.height-c;if(j)d.size.width=d.size.height/a.aspectRatio}},stop:function(f,e){var a=e.options,d=b(this).data("resizable"),
c=d.containerOffset,h=d.containerPosition,j=d.containerElement,l=b(d.helper);d=l.offset();var n=l.innerWidth();l=l.innerHeight();a.helper&&!a.animate&&/relative/.test(j.css("position"))&&b(this).css({left:d.left-c.left,top:d.top-c.top,width:n,height:l});a.helper&&!a.animate&&/static/.test(j.css("position"))&&b(this).css({left:h.left+(d.left-c.left),top:h.top+(d.top-c.top),width:n,height:l})}});b.ui.plugin.add("resizable","grid",{resize:function(f,e){var a=e.options,d=b(this).data("resizable"),c=d.size,
h=d.originalSize,j=d.originalPosition,l=d.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var n=Math.round((c.width-h.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-h.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(l)){d.size.width=h.width+n;d.size.height=h.height+a}else if(/^(ne)$/.test(l)){d.size.width=h.width+n;d.size.height=h.height+a;d.position.top=j.top-a}else{if(/^(sw)$/.test(l)){d.size.width=h.width+n;d.size.height=h.height+a}else{d.size.width=h.width+
n;d.size.height=h.height+a;d.position.top=j.top-a}d.position.left=j.left-n}}});b.ui.plugin.add("resizable","animate",{stop:function(f,e){var a=e.options,d=b(this).data("resizable"),c=a.proportionallyResize,h=c&&/textarea/i.test(c.get(0).nodeName),j=h&&b.ui.hasScroll(c.get(0),"left")?0:d.sizeDiff.height;h={width:d.size.width-(h?0:d.sizeDiff.width),height:d.size.height-j};j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null;var l=parseInt(d.element.css("top"),10)+(d.position.top-
d.originalPosition.top)||null;d.element.animate(b.extend(h,l&&j?{top:l,left:j}:{}),{duration:a.animateDuration||"slow",easing:a.animateEasing||"swing",step:function(){var n={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};c&&c.css({width:n.width,height:n.height});d._updateCache(n);d.propagate("animate",f)}})}});b.ui.plugin.add("resizable","ghost",{start:function(f,e){var a=e.options,
d=b(this).data("resizable"),c=a.proportionallyResize,h=d.size;d.ghost=c?c.clone():d.element.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:h.height,width:h.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");d.ghost.appendTo(d.helper)},resize:function(){var f=b(this).data("resizable");f.ghost&&f.ghost.css({position:"relative",height:f.size.height,width:f.size.width})},stop:function(){var f=b(this).data("resizable");
f.ghost&&f.helper&&f.helper.get(0).removeChild(f.ghost.get(0))}});b.ui.plugin.add("resizable","alsoResize",{start:function(f,e){var a=e.options;b(this).data("resizable");var d=function(c){b(c).each(function(){b(this).data("resizable-alsoresize",{width:parseInt(b(this).width(),10),height:parseInt(b(this).height(),10),left:parseInt(b(this).css("left"),10),top:parseInt(b(this).css("top"),10)})})};if(typeof a.alsoResize=="object")if(a.alsoResize.length){a.alsoResize=a.alsoResize[0];d(a.alsoResize)}else b.each(a.alsoResize,
function(c){d(c)});else d(a.alsoResize)},resize:function(f,e){var a=e.options,d=b(this).data("resizable"),c=d.originalSize,h=d.originalPosition,j={height:d.size.height-c.height||0,width:d.size.width-c.width||0,top:d.position.top-h.top||0,left:d.position.left-h.left||0},l=function(n,q){b(n).each(function(){var x=b(this).data("resizable-alsoresize"),u={};b.each((q&&q.length?q:["width","height","top","left"])||["width","height","top","left"],function(w,v){var B=(x[v]||0)+(j[v]||0);if(B&&B>=0)u[v]=B||
null});b(this).css(u)})};typeof a.alsoResize=="object"?b.each(a.alsoResize,function(n,q){l(n,q)}):l(a.alsoResize)},stop:function(){b(this).removeData("resizable-alsoresize-start")}})})(jQuery);
(function(b){b.widget("ui.selectable",b.extend({},b.ui.mouse,{init:function(){var f=this;this.element.addClass("ui-selectable");this.dragged=false;var e;this.refresh=function(){e=b(f.options.filter,f.element[0]);e.each(function(){var a=b(this),d=a.offset();b.data(this,"selectable-item",{element:this,$element:a,left:d.left,top:d.top,right:d.left+a.width(),bottom:d.top+a.height(),startselected:false,selected:a.hasClass("ui-selected"),selecting:a.hasClass("ui-selecting"),unselecting:a.hasClass("ui-unselecting")})})};
this.refresh();this.selectees=e.addClass("ui-selectee");this.mouseInit();this.helper=b(document.createElement("div")).css({border:"1px dotted black"})},toggle:function(){this.options.disabled?this.enable():this.disable()},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this.mouseDestroy()},mouseStart:function(f){var e=this;this.opos=[f.pageX,f.pageY];if(!this.options.disabled){var a=this.options;this.selectees=b(a.filter,
this.element[0]);this.element.triggerHandler("selectablestart",[f,{selectable:this.element[0],options:a}],a.start);b("body").append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:f.clientX,top:f.clientY,width:0,height:0});a.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var c=b.data(this,"selectable-item");c.startselected=true;if(!f.ctrlKey){c.$element.removeClass("ui-selected");c.selected=false;c.$element.addClass("ui-unselecting");c.unselecting=
true;e.element.triggerHandler("selectableunselecting",[f,{selectable:e.element[0],unselecting:c.element,options:a}],a.unselecting)}});var d=false;b(f.target).parents().andSelf().each(function(){if(b.data(this,"selectable-item"))d=true});return this.options.keyboard?!d:true}},mouseDrag:function(f){var e=this;this.dragged=true;if(!this.options.disabled){var a=this.options,d=this.opos[0],c=this.opos[1],h=f.pageX,j=f.pageY;if(d>h){var l=h;h=d;d=l}if(c>j){l=j;j=c;c=l}this.helper.css({left:d,top:c,width:h-
d,height:j-c});this.selectees.each(function(){var n=b.data(this,"selectable-item");if(!(!n||n.element==e.element[0])){var q=false;if(a.tolerance=="touch")q=!(n.left>h||n.right<d||n.top>j||n.bottom<c);else if(a.tolerance=="fit")q=n.left>d&&n.right<h&&n.top>c&&n.bottom<j;if(q){if(n.selected){n.$element.removeClass("ui-selected");n.selected=false}if(n.unselecting){n.$element.removeClass("ui-unselecting");n.unselecting=false}if(!n.selecting){n.$element.addClass("ui-selecting");n.selecting=true;e.element.triggerHandler("selectableselecting",
[f,{selectable:e.element[0],selecting:n.element,options:a}],a.selecting)}}else{if(n.selecting)if(f.ctrlKey&&n.startselected){n.$element.removeClass("ui-selecting");n.selecting=false;n.$element.addClass("ui-selected");n.selected=true}else{n.$element.removeClass("ui-selecting");n.selecting=false;if(n.startselected){n.$element.addClass("ui-unselecting");n.unselecting=true}e.element.triggerHandler("selectableunselecting",[f,{selectable:e.element[0],unselecting:n.element,options:a}],a.unselecting)}if(n.selected)if(!f.ctrlKey&&
!n.startselected){n.$element.removeClass("ui-selected");n.selected=false;n.$element.addClass("ui-unselecting");n.unselecting=true;e.element.triggerHandler("selectableunselecting",[f,{selectable:e.element[0],unselecting:n.element,options:a}],a.unselecting)}}}});return false}},mouseStop:function(f){var e=this;this.dragged=false;var a=this.options;b(".ui-unselecting",this.element[0]).each(function(){var d=b.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=
false;e.element.triggerHandler("selectableunselected",[f,{selectable:e.element[0],unselected:d.element,options:a}],a.unselected)});b(".ui-selecting",this.element[0]).each(function(){var d=b.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;e.element.triggerHandler("selectableselected",[f,{selectable:e.element[0],selected:d.element,options:a}],a.selected)});this.element.triggerHandler("selectablestop",
[f,{selectable:e.element[0],options:this.options}],this.options.stop);this.helper.remove();return false}}));b.extend(b.ui.selectable,{defaults:{distance:1,delay:0,cancel:":input",appendTo:"body",autoRefresh:true,filter:"*",tolerance:"touch"}})})(jQuery);
(function(b){function f(e,a){var d=b.browser.safari&&b.browser.version<522;if(e.contains&&!d)return e.contains(a);if(e.compareDocumentPosition)return!!(e.compareDocumentPosition(a)&16);for(;a=a.parentNode;)if(a==e)return true;return false}b.widget("ui.sortable",b.extend({},b.ui.mouse,{init:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;/(relative|absolute|fixed)/.test(this.element.css("position"))||
this.element.css("position","relative");this.offset=this.element.offset();this.mouseInit()},plugins:{},ui:function(e){return{helper:(e||this).helper,placeholder:(e||this).placeholder||b([]),position:(e||this).position,absolutePosition:(e||this).positionAbs,options:this.options,element:this.element,item:(e||this).currentItem,sender:e?e.element:null}},propagate:function(e,a,d,c){b.ui.plugin.call(this,e,[a,this.ui(d)]);c||this.element.triggerHandler(e=="sort"?e:"sort"+e,[a,this.ui(d)],this.options[e])},
serialize:function(e){var a=(b.isFunction(this.options.items)?this.options.items.call(this.element):b(this.options.items,this.element)).not(".ui-sortable-helper"),d=[];e=e||{};a.each(function(){var c=(b(this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);if(c)d.push((e.key||c[1])+"[]="+(e.key&&e.expression?c[1]:c[2]))});return d.join("&")},toArray:function(e){var a=[];(b.isFunction(this.options.items)?this.options.items.call(this.element):b(this.options.items,this.element)).not(".ui-sortable-helper").each(function(){a.push(b(this).attr(e||
"id"))});return a},intersectsWith:function(e){var a=this.positionAbs.left,d=a+this.helperProportions.width,c=this.positionAbs.top,h=c+this.helperProportions.height,j=e.left,l=j+e.width,n=e.top,q=n+e.height;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?c+this.offset.click.top>n&&c+this.offset.click.top<q&&a+this.offset.click.left>j&&a+this.offset.click.left<
l:j<a+this.helperProportions.width/2&&d-this.helperProportions.width/2<l&&n<c+this.helperProportions.height/2&&h-this.helperProportions.height/2<q},intersectsWithEdge:function(e){var a=this.positionAbs.left,d=a+this.helperProportions.width,c=this.positionAbs.top,h=c+this.helperProportions.height,j=e.left,l=j+e.width,n=e.top,q=n+e.height;if(this.options.tolerance=="pointer"||this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]){if(!(c+
this.offset.click.top>n&&c+this.offset.click.top<q&&a+this.offset.click.left>j&&a+this.offset.click.left<l))return false;if(this.floating){if(a+this.offset.click.left>j&&a+this.offset.click.left<j+e.width/2)return 2;if(a+this.offset.click.left>j+e.width/2&&a+this.offset.click.left<l)return 1}else{if(c+this.offset.click.top>n&&c+this.offset.click.top<n+e.height/2)return 2;if(c+this.offset.click.top>n+e.height/2&&c+this.offset.click.top<q)return 1}}else{if(!(j<a+this.helperProportions.width/2&&d-this.helperProportions.width/
2<l&&n<c+this.helperProportions.height/2&&h-this.helperProportions.height/2<q))return false;if(this.floating){if(d>j&&a<j)return 2;if(a<l&&d>l)return 1}else{if(h>n&&c<n)return 1;if(c<q&&h>q)return 2}}return false},refresh:function(){this.refreshItems();this.refreshPositions()},refreshItems:function(){this.items=[];this.containers=[this];var e=this.items,a=[[b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,
this.element),this]];if(this.options.connectWith)for(var d=this.options.connectWith.length-1;d>=0;d--)for(var c=b(this.options.connectWith[d]),h=c.length-1;h>=0;h--){var j=b.data(c[h],"sortable");if(j&&!j.options.disabled){a.push([b.isFunction(j.options.items)?j.options.items.call(j.element):b(j.options.items,j.element),j]);this.containers.push(j)}}for(d=a.length-1;d>=0;d--)a[d][0].each(function(){b.data(this,"sortable-item",a[d][1]);e.push({item:b(this),instance:a[d][1],width:0,height:0,left:0,top:0})})},
refreshPositions:function(e){if(this.offsetParent){var a=this.offsetParent.offset();this.offset.parent={top:a.top+this.offsetParentBorders.top,left:a.left+this.offsetParentBorders.left}}for(a=this.items.length-1;a>=0;a--)if(!(this.items[a].instance!=this.currentContainer&&this.currentContainer&&this.items[a].item[0]!=this.currentItem[0])){var d=this.options.toleranceElement?b(this.options.toleranceElement,this.items[a].item):this.items[a].item;if(!e){this.items[a].width=d[0].offsetWidth;this.items[a].height=
d[0].offsetHeight}d=d.offset();this.items[a].left=d.left;this.items[a].top=d.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(a=this.containers.length-1;a>=0;a--){d=this.containers[a].element.offset();this.containers[a].containerCache.left=d.left;this.containers[a].containerCache.top=d.top;this.containers[a].containerCache.width=this.containers[a].element.outerWidth();this.containers[a].containerCache.height=this.containers[a].element.outerHeight()}},
destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this.mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData("sortable-item")},createPlaceholder:function(e){e=e||this;var a=e.options;if(a.placeholder.constructor==String){var d=a.placeholder;a.placeholder={element:function(){return b("<div></div>").addClass(d)[0]},update:function(c,h){h.css(c.offset()).css({width:c.outerWidth(),height:c.outerHeight()})}}}e.placeholder=
b(a.placeholder.element.call(e.element,e.currentItem)).appendTo("body").css({position:"absolute"});a.placeholder.update.call(e.element,e.currentItem,e.placeholder)},contactContainers:function(e){for(var a=this.containers.length-1;a>=0;a--)if(this.intersectsWith(this.containers[a].containerCache)){if(!this.containers[a].containerCache.over){if(this.currentContainer!=this.containers[a]){for(var d=1E4,c=null,h=this.positionAbs[this.containers[a].floating?"left":"top"],j=this.items.length-1;j>=0;j--)if(f(this.containers[a].element[0],
this.items[j].item[0])){var l=this.items[j][this.containers[a].floating?"left":"top"];if(Math.abs(l-h)<d){d=Math.abs(l-h);c=this.items[j]}}if(!c&&!this.options.dropOnEmpty)continue;this.placeholder&&this.placeholder.remove();if(this.containers[a].options.placeholder)this.containers[a].createPlaceholder(this);else this.placeholder=null;this.currentContainer=this.containers[a];c?this.rearrange(e,c,null,true):this.rearrange(e,null,this.containers[a].element,true);this.propagate("change",e);this.containers[a].propagate("change",
e,this)}this.containers[a].propagate("over",e,this);this.containers[a].containerCache.over=1}}else if(this.containers[a].containerCache.over){this.containers[a].propagate("out",e,this);this.containers[a].containerCache.over=0}},mouseCapture:function(e,a){if(this.options.disabled||this.options.type=="static")return false;this.refreshItems();var d=null,c=this;b(e.target).parents().each(function(){if(b.data(this,"sortable-item")==c){d=b(this);return false}});if(b.data(e.target,"sortable-item")==c)d=
b(e.target);if(!d)return false;if(this.options.handle&&!a){var h=false;b(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target)h=true});if(!h)return false}this.currentItem=d;return true},mouseStart:function(e,a,d){a=this.options;this.currentContainer=this;this.refreshPositions();this.helper=typeof a.helper=="function"?b(a.helper.apply(this.element[0],[e,this.currentItem])):this.currentItem.clone();this.helper.parents("body").length||b(a.appendTo!="parent"?a.appendTo:this.currentItem[0].parentNode)[0].appendChild(this.helper[0]);
this.helper.css({position:"absolute",clear:"both"}).addClass("ui-sortable-helper");this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0};this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();this.offsetParentBorders=
{top:parseInt(this.offsetParent.css("borderTopWidth"),10)||0,left:parseInt(this.offsetParent.css("borderLeftWidth"),10)||0};this.offset.parent={top:c.top+this.offsetParentBorders.top,left:c.left+this.offsetParentBorders.left};this.originalPosition=this.generatePosition(e);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};a.placeholder&&this.createPlaceholder();this.propagate("start",
e);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(a.cursorAt){if(a.cursorAt.left!=undefined)this.offset.click.left=a.cursorAt.left;if(a.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-a.cursorAt.right;if(a.cursorAt.top!=undefined)this.offset.click.top=a.cursorAt.top;if(a.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-a.cursorAt.bottom}if(a.containment){if(a.containment=="parent")a.containment=
this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.parent.left,0-this.offset.parent.top,b(a.containment=="document"?document:window).width()-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(b(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),
10)||0)];if(!/^(document|window|parent)$/.test(a.containment)){c=b(a.containment)[0];var h=b(a.containment).offset();this.containment=[h.left+(parseInt(b(c).css("borderLeftWidth"),10)||0)-this.offset.parent.left,h.top+(parseInt(b(c).css("borderTopWidth"),10)||0)-this.offset.parent.top,h.left+Math.max(c.scrollWidth,c.offsetWidth)-(parseInt(b(c).css("borderLeftWidth"),10)||0)-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.currentItem.css("marginRight"),10)||0),
h.top+Math.max(c.scrollHeight,c.offsetHeight)-(parseInt(b(c).css("borderTopWidth"),10)||0)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.currentItem.css("marginBottom"),10)||0)]}}this.options.placeholder!="clone"&&this.currentItem.css("visibility","hidden");if(!d)for(d=this.containers.length-1;d>=0;d--)this.containers[d].propagate("activate",e,this);if(b.ui.ddmanager)b.ui.ddmanager.current=this;b.ui.ddmanager&&!a.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,
e);this.dragging=true;this.mouseDrag(e);return true},convertPositionTo:function(e,a){if(!a)a=this.position;var d=e=="absolute"?1:-1;return{top:a.top+this.offset.parent.top*d-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*d+this.margins.top*d,left:a.left+this.offset.parent.left*d-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*d+this.margins.left*d}},generatePosition:function(e){var a=this.options;e={top:e.pageY-this.offset.click.top-this.offset.parent.top+
(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop),left:e.pageX-this.offset.click.left-this.offset.parent.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)};if(!this.originalPosition)return e;if(this.containment){if(e.left<this.containment[0])e.left=this.containment[0];if(e.top<this.containment[1])e.top=this.containment[1];if(e.left>this.containment[2])e.left=this.containment[2];if(e.top>this.containment[3])e.top=this.containment[3]}if(a.grid){var d=
this.originalPosition.top+Math.round((e.top-this.originalPosition.top)/a.grid[1])*a.grid[1];e.top=this.containment?!(d<this.containment[1]||d>this.containment[3])?d:!(d<this.containment[1])?d-a.grid[1]:d+a.grid[1]:d;d=this.originalPosition.left+Math.round((e.left-this.originalPosition.left)/a.grid[0])*a.grid[0];e.left=this.containment?!(d<this.containment[0]||d>this.containment[2])?d:!(d<this.containment[0])?d-a.grid[0]:d+a.grid[0]:d}return e},mouseDrag:function(e){this.position=this.generatePosition(e);
this.positionAbs=this.convertPositionTo("absolute");b.ui.plugin.call(this,"sort",[e,this.ui()]);this.positionAbs=this.convertPositionTo("absolute");this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";for(var a=this.items.length-1;a>=0;a--){var d=this.intersectsWithEdge(this.items[a]);if(d)if(this.items[a].item[0]!=this.currentItem[0]&&this.currentItem[d==1?"next":"prev"]()[0]!=this.items[a].item[0]&&!f(this.currentItem[0],this.items[a].item[0])&&(this.options.type==
"semi-dynamic"?!f(this.element[0],this.items[a].item[0]):true)){this.direction=d==1?"down":"up";this.rearrange(e,this.items[a]);this.propagate("change",e);break}}this.contactContainers(e);b.ui.ddmanager&&b.ui.ddmanager.drag(this,e);this.element.triggerHandler("sort",[e,this.ui()],this.options.sort);return false},rearrange:function(e,a,d,c){d?d[0].appendChild(this.currentItem[0]):a.item[0].parentNode.insertBefore(this.currentItem[0],this.direction=="down"?a.item[0]:a.item[0].nextSibling);this.counter=
this.counter?++this.counter:1;var h=this,j=this.counter;window.setTimeout(function(){j==h.counter&&h.refreshPositions(!c)},0);this.options.placeholder&&this.options.placeholder.update.call(this.element,this.currentItem,this.placeholder)},mouseStop:function(e,a){b.ui.ddmanager&&!this.options.dropBehaviour&&b.ui.ddmanager.drop(this,e);if(this.options.revert){var d=this,c=d.currentItem.offset();if(d.placeholder)d.placeholder.animate({opacity:"hide"},(parseInt(this.options.revert,10)||500)-50);b(this.helper).animate({left:c.left-
this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:c.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d.clear(e)})}else this.clear(e,a);return false},clear:function(e,a){if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])this.propagate("update",
e,null,a);if(!f(this.element[0],this.currentItem[0])){this.propagate("remove",e,null,a);for(var d=this.containers.length-1;d>=0;d--)if(f(this.containers[d].element[0],this.currentItem[0])){this.containers[d].propagate("update",e,this,a);this.containers[d].propagate("receive",e,this,a)}}for(d=this.containers.length-1;d>=0;d--){this.containers[d].propagate("deactivate",e,this,a);if(this.containers[d].containerCache.over){this.containers[d].propagate("out",e,this);this.containers[d].containerCache.over=
0}}this.dragging=false;if(this.cancelHelperRemoval){this.propagate("stop",e,null,a);return false}b(this.currentItem).css("visibility","");this.placeholder&&this.placeholder.remove();this.helper.remove();this.helper=null;this.propagate("stop",e,null,a);return true}}));b.extend(b.ui.sortable,{getter:"serialize toArray",defaults:{helper:"clone",tolerance:"guess",distance:1,delay:0,scroll:true,scrollSensitivity:20,scrollSpeed:20,cancel:":input",items:"> *",zIndex:1E3,dropOnEmpty:true,appendTo:"parent"}});
b.ui.plugin.add("sortable","cursor",{start:function(e,a){var d=b("body");if(d.css("cursor"))a.options._cursor=d.css("cursor");d.css("cursor",a.options.cursor)},stop:function(e,a){a.options._cursor&&b("body").css("cursor",a.options._cursor)}});b.ui.plugin.add("sortable","zIndex",{start:function(e,a){var d=a.helper;if(d.css("zIndex"))a.options._zIndex=d.css("zIndex");d.css("zIndex",a.options.zIndex)},stop:function(e,a){a.options._zIndex&&b(a.helper).css("zIndex",a.options._zIndex)}});b.ui.plugin.add("sortable",
"opacity",{start:function(e,a){var d=a.helper;if(d.css("opacity"))a.options._opacity=d.css("opacity");d.css("opacity",a.options.opacity)},stop:function(e,a){a.options._opacity&&b(a.helper).css("opacity",a.options._opacity)}});b.ui.plugin.add("sortable","scroll",{start:function(){var e=b(this).data("sortable");e.overflowY=function(a){do{if(/auto|scroll/.test(a.css("overflow"))||/auto|scroll/.test(a.css("overflow-y")))return a;a=a.parent()}while(a[0].parentNode);return b(document)}(e.currentItem);e.overflowX=
function(a){do{if(/auto|scroll/.test(a.css("overflow"))||/auto|scroll/.test(a.css("overflow-x")))return a;a=a.parent()}while(a[0].parentNode);return b(document)}(e.currentItem);if(e.overflowY[0]!=document&&e.overflowY[0].tagName!="HTML")e.overflowYOffset=e.overflowY.offset();if(e.overflowX[0]!=document&&e.overflowX[0].tagName!="HTML")e.overflowXOffset=e.overflowX.offset()},sort:function(e,a){var d=a.options,c=b(this).data("sortable");if(c.overflowY[0]!=document&&c.overflowY[0].tagName!="HTML"){if(c.overflowYOffset.top+
c.overflowY[0].offsetHeight-e.pageY<d.scrollSensitivity)c.overflowY[0].scrollTop+=d.scrollSpeed;if(e.pageY-c.overflowYOffset.top<d.scrollSensitivity)c.overflowY[0].scrollTop-=d.scrollSpeed}else{e.pageY-b(document).scrollTop()<d.scrollSensitivity&&b(document).scrollTop(b(document).scrollTop()-d.scrollSpeed);b(window).height()-(e.pageY-b(document).scrollTop())<d.scrollSensitivity&&b(document).scrollTop(b(document).scrollTop()+d.scrollSpeed)}if(c.overflowX[0]!=document&&c.overflowX[0].tagName!="HTML"){if(c.overflowXOffset.left+
c.overflowX[0].offsetWidth-e.pageX<d.scrollSensitivity)c.overflowX[0].scrollLeft+=d.scrollSpeed;if(e.pageX-c.overflowXOffset.left<d.scrollSensitivity)c.overflowX[0].scrollLeft-=d.scrollSpeed}else{e.pageX-b(document).scrollLeft()<d.scrollSensitivity&&b(document).scrollLeft(b(document).scrollLeft()-d.scrollSpeed);b(window).width()-(e.pageX-b(document).scrollLeft())<d.scrollSensitivity&&b(document).scrollLeft(b(document).scrollLeft()+d.scrollSpeed)}}});b.ui.plugin.add("sortable","axis",{sort:function(e,
a){var d=b(this).data("sortable");if(a.options.axis=="y")d.position.left=d.originalPosition.left;if(a.options.axis=="x")d.position.top=d.originalPosition.top}})})(jQuery);
(function(b){function f(a){var d;if(a&&a.constructor==Array&&a.length==3)return a;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a))return[parseInt(d[1]),parseInt(d[2]),parseInt(d[3])];if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a))return[parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55];if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))return[parseInt(d[1],16),parseInt(d[2],
16),parseInt(d[3],16)];if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a))return[parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(a))return e.transparent;return e[jQuery.trim(a).toLowerCase()]}b.effects=b.effects||{};b.extend(b.effects,{save:function(a,d){for(var c=0;c<d.length;c++)d[c]!==null&&b.data(a[0],"ec.storage."+d[c],a[0].style[d[c]])},restore:function(a,d){for(var c=0;c<d.length;c++)d[c]!==null&&a.css(d[c],b.data(a[0],"ec.storage."+d[c]))},
setMode:function(a,d){if(d=="toggle")d=a.is(":hidden")?"show":"hide";return d},getBaseline:function(a,d){var c,h;switch(a[0]){case "top":c=0;break;case "middle":c=0.5;break;case "bottom":c=1;break;default:c=a[0]/d.height}switch(a[1]){case "left":h=0;break;case "center":h=0.5;break;case "right":h=1;break;default:h=a[1]/d.width}return{x:h,y:c}},createWrapper:function(a){if(a.parent().attr("id")=="fxWrapper")return a;var d={width:a.outerWidth({margin:true}),height:a.outerHeight({margin:true}),"float":a.css("float")};
a.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var c=a.parent();if(a.css("position")=="static"){c.css({position:"relative"});a.css({position:"relative"})}else{var h=a.css("top");if(isNaN(parseInt(h)))h="auto";var j=a.css("left");if(isNaN(parseInt(j)))j="auto";c.css({position:a.css("position"),top:h,left:j,zIndex:a.css("z-index")}).show();a.css({position:"relative",top:0,left:0})}c.css(d);return c},removeWrapper:function(a){if(a.parent().attr("id")==
"fxWrapper")return a.parent().replaceWith(a);return a},setTransition:function(a,d,c,h){h=h||{};b.each(d,function(j,l){unit=a.cssUnit(l);if(unit[0]>0)h[l]=unit[0]*c+unit[1]});return h},animateClass:function(a,d,c,h){var j=typeof c=="function"?c:h?h:null,l=typeof c=="object"?c:null;return this.each(function(){var n={},q=b(this),x=q.attr("style")||"";if(typeof x=="object")x=x.cssText;if(a.toggle)q.hasClass(a.toggle)?a.remove=a.toggle:a.add=a.toggle;var u=b.extend({},document.defaultView?document.defaultView.getComputedStyle(this,
null):this.currentStyle);a.add&&q.addClass(a.add);a.remove&&q.removeClass(a.remove);var w=b.extend({},document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle);a.add&&q.removeClass(a.add);a.remove&&q.addClass(a.remove);for(var v in w)if(typeof w[v]!="function"&&w[v]&&v.indexOf("Moz")==-1&&v.indexOf("length")==-1&&w[v]!=u[v]&&(v.match(/color/i)||!v.match(/color/i)&&!isNaN(parseInt(w[v],10)))&&(u.position!="static"||u.position=="static"&&!v.match(/left|top|bottom|right/)))n[v]=
w[v];q.animate(n,d,l,function(){if(typeof b(this).attr("style")=="object"){b(this).attr("style").cssText="";b(this).attr("style").cssText=x}else b(this).attr("style",x);a.add&&b(this).addClass(a.add);a.remove&&b(this).removeClass(a.remove);j&&j.apply(this,arguments)})})}});b.fn.extend({_show:b.fn.show,_hide:b.fn.hide,__toggle:b.fn.toggle,_addClass:b.fn.addClass,_removeClass:b.fn.removeClass,_toggleClass:b.fn.toggleClass,effect:function(a,d,c,h){return b.effects[a]?b.effects[a].call(this,{method:a,
options:d||{},duration:c,callback:h}):null},show:function(){if(!arguments[0]||arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))return this._show.apply(this,arguments);else{var a=arguments[1]||{};a.mode="show";return this.effect.apply(this,[arguments[0],a,arguments[2]||a.duration,arguments[3]||a.callback])}},hide:function(){if(!arguments[0]||arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))return this._hide.apply(this,arguments);else{var a=arguments[1]||
{};a.mode="hide";return this.effect.apply(this,[arguments[0],a,arguments[2]||a.duration,arguments[3]||a.callback])}},toggle:function(){if(!arguments[0]||arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0])||arguments[0].constructor==Function)return this.__toggle.apply(this,arguments);else{var a=arguments[1]||{};a.mode="toggle";return this.effect.apply(this,[arguments[0],a,arguments[2]||a.duration,arguments[3]||a.callback])}},addClass:function(a,d,c,h){return d?b.effects.animateClass.apply(this,
[{add:a},d,c,h]):this._addClass(a)},removeClass:function(a,d,c,h){return d?b.effects.animateClass.apply(this,[{remove:a},d,c,h]):this._removeClass(a)},toggleClass:function(a,d,c,h){return d?b.effects.animateClass.apply(this,[{toggle:a},d,c,h]):this._toggleClass(a)},morph:function(a,d,c,h,j){return b.effects.animateClass.apply(this,[{add:d,remove:a},c,h,j])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(a){var d=this.css(a),c=[];b.each(["em","px","%","pt"],function(h,
j){if(d.indexOf(j)>0)c=[parseFloat(d),j]});return c}});jQuery.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(a,d){jQuery.fx.step[d]=function(c){if(c.state==0){var h;h=c.elem;var j=d,l;do{l=jQuery.curCSS(h,j);if(l!=""&&l!="transparent"||jQuery.nodeName(h,"body"))break;j="backgroundColor"}while(h=h.parentNode);h=f(l);c.start=h;c.end=f(c.end)}c.elem.style[d]="rgb("+[Math.max(Math.min(parseInt(c.pos*(c.end[0]-c.start[0])+
c.start[0]),255),0),Math.max(Math.min(parseInt(c.pos*(c.end[1]-c.start[1])+c.start[1]),255),0),Math.max(Math.min(parseInt(c.pos*(c.end[2]-c.start[2])+c.start[2]),255),0)].join(",")+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,
50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,
192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,d,c,h,j){return jQuery.easing[jQuery.easing.def](a,d,c,h,j)},easeInQuad:function(a,d,c,h,j){return h*(d/=j)*d+c},easeOutQuad:function(a,d,c,h,j){return-h*(d/=j)*(d-2)+c},easeInOutQuad:function(a,d,c,h,j){if((d/=j/2)<1)return h/2*d*d+c;return-h/2*(--d*(d-2)-1)+c},easeInCubic:function(a,d,c,h,j){return h*(d/=j)*d*d+c},easeOutCubic:function(a,
d,c,h,j){return h*((d=d/j-1)*d*d+1)+c},easeInOutCubic:function(a,d,c,h,j){if((d/=j/2)<1)return h/2*d*d*d+c;return h/2*((d-=2)*d*d+2)+c},easeInQuart:function(a,d,c,h,j){return h*(d/=j)*d*d*d+c},easeOutQuart:function(a,d,c,h,j){return-h*((d=d/j-1)*d*d*d-1)+c},easeInOutQuart:function(a,d,c,h,j){if((d/=j/2)<1)return h/2*d*d*d*d+c;return-h/2*((d-=2)*d*d*d-2)+c},easeInQuint:function(a,d,c,h,j){return h*(d/=j)*d*d*d*d+c},easeOutQuint:function(a,d,c,h,j){return h*((d=d/j-1)*d*d*d*d+1)+c},easeInOutQuint:function(a,
d,c,h,j){if((d/=j/2)<1)return h/2*d*d*d*d*d+c;return h/2*((d-=2)*d*d*d*d+2)+c},easeInSine:function(a,d,c,h,j){return-h*Math.cos(d/j*(Math.PI/2))+h+c},easeOutSine:function(a,d,c,h,j){return h*Math.sin(d/j*(Math.PI/2))+c},easeInOutSine:function(a,d,c,h,j){return-h/2*(Math.cos(Math.PI*d/j)-1)+c},easeInExpo:function(a,d,c,h,j){return d==0?c:h*Math.pow(2,10*(d/j-1))+c},easeOutExpo:function(a,d,c,h,j){return d==j?c+h:h*(-Math.pow(2,-10*d/j)+1)+c},easeInOutExpo:function(a,d,c,h,j){if(d==0)return c;if(d==
j)return c+h;if((d/=j/2)<1)return h/2*Math.pow(2,10*(d-1))+c;return h/2*(-Math.pow(2,-10*--d)+2)+c},easeInCirc:function(a,d,c,h,j){return-h*(Math.sqrt(1-(d/=j)*d)-1)+c},easeOutCirc:function(a,d,c,h,j){return h*Math.sqrt(1-(d=d/j-1)*d)+c},easeInOutCirc:function(a,d,c,h,j){if((d/=j/2)<1)return-h/2*(Math.sqrt(1-d*d)-1)+c;return h/2*(Math.sqrt(1-(d-=2)*d)+1)+c},easeInElastic:function(a,d,c,h,j){a=1.70158;var l=0,n=h;if(d==0)return c;if((d/=j)==1)return c+h;l||(l=j*0.3);if(n<Math.abs(h)){n=h;a=l/4}else a=
l/(2*Math.PI)*Math.asin(h/n);return-(n*Math.pow(2,10*(d-=1))*Math.sin((d*j-a)*2*Math.PI/l))+c},easeOutElastic:function(a,d,c,h,j){a=1.70158;var l=0,n=h;if(d==0)return c;if((d/=j)==1)return c+h;l||(l=j*0.3);if(n<Math.abs(h)){n=h;a=l/4}else a=l/(2*Math.PI)*Math.asin(h/n);return n*Math.pow(2,-10*d)*Math.sin((d*j-a)*2*Math.PI/l)+h+c},easeInOutElastic:function(a,d,c,h,j){a=1.70158;var l=0,n=h;if(d==0)return c;if((d/=j/2)==2)return c+h;l||(l=j*0.3*1.5);if(n<Math.abs(h)){n=h;a=l/4}else a=l/(2*Math.PI)*Math.asin(h/
n);if(d<1)return-0.5*n*Math.pow(2,10*(d-=1))*Math.sin((d*j-a)*2*Math.PI/l)+c;return n*Math.pow(2,-10*(d-=1))*Math.sin((d*j-a)*2*Math.PI/l)*0.5+h+c},easeInBack:function(a,d,c,h,j,l){if(l==undefined)l=1.70158;return h*(d/=j)*d*((l+1)*d-l)+c},easeOutBack:function(a,d,c,h,j,l){if(l==undefined)l=1.70158;return h*((d=d/j-1)*d*((l+1)*d+l)+1)+c},easeInOutBack:function(a,d,c,h,j,l){if(l==undefined)l=1.70158;if((d/=j/2)<1)return h/2*d*d*(((l*=1.525)+1)*d-l)+c;return h/2*((d-=2)*d*(((l*=1.525)+1)*d+l)+2)+c},
easeInBounce:function(a,d,c,h,j){return h-jQuery.easing.easeOutBounce(a,j-d,0,h,j)+c},easeOutBounce:function(a,d,c,h,j){return(d/=j)<1/2.75?h*7.5625*d*d+c:d<2/2.75?h*(7.5625*(d-=1.5/2.75)*d+0.75)+c:d<2.5/2.75?h*(7.5625*(d-=2.25/2.75)*d+0.9375)+c:h*(7.5625*(d-=2.625/2.75)*d+0.984375)+c},easeInOutBounce:function(a,d,c,h,j){if(d<j/2)return jQuery.easing.easeInBounce(a,d*2,0,h,j)*0.5+c;return jQuery.easing.easeOutBounce(a,d*2-j,0,h,j)*0.5+h*0.5+c}})})(jQuery);
(function(b){b.effects.blind=function(f){return this.queue(function(){var e=b(this),a=["position","top","left"],d=b.effects.setMode(e,f.options.mode||"hide"),c=f.options.direction||"vertical";b.effects.save(e,a);e.show();var h=b.effects.createWrapper(e).css({overflow:"hidden"}),j=c=="vertical"?"height":"width";c=c=="vertical"?h.height():h.width();d=="show"&&h.css(j,0);var l={};l[j]=d=="show"?c:0;h.animate(l,f.duration,f.options.easing,function(){d=="hide"&&e.hide();b.effects.restore(e,a);b.effects.removeWrapper(e);
f.callback&&f.callback.apply(e[0],arguments);e.dequeue()})})}})(jQuery);
(function(b){b.effects.bounce=function(f){return this.queue(function(){var e=b(this),a=["position","top","left"],d=b.effects.setMode(e,f.options.mode||"effect"),c=f.options.direction||"up",h=f.options.distance||20,j=f.options.times||5,l=f.duration||250;/show|hide/.test(d)&&a.push("opacity");b.effects.save(e,a);e.show();b.effects.createWrapper(e);var n=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";h=f.options.distance||(n=="top"?e.outerHeight({margin:true})/3:e.outerWidth({margin:true})/
3);if(d=="show")e.css("opacity",0).css(n,c=="pos"?-h:h);if(d=="hide")h/=j*2;d!="hide"&&j--;if(d=="show"){var q={opacity:1};q[n]=(c=="pos"?"+=":"-=")+h;e.animate(q,l/2,f.options.easing);h/=2;j--}for(q=0;q<j;q++){var x={},u={};x[n]=(c=="pos"?"-=":"+=")+h;u[n]=(c=="pos"?"+=":"-=")+h;e.animate(x,l/2,f.options.easing).animate(u,l/2,f.options.easing);h=d=="hide"?h*2:h/2}if(d=="hide"){q={opacity:0};q[n]=(c=="pos"?"-=":"+=")+h;e.animate(q,l/2,f.options.easing,function(){e.hide();b.effects.restore(e,a);b.effects.removeWrapper(e);
f.callback&&f.callback.apply(this,arguments)})}else{x={};u={};x[n]=(c=="pos"?"-=":"+=")+h;u[n]=(c=="pos"?"+=":"-=")+h;e.animate(x,l/2,f.options.easing).animate(u,l/2,f.options.easing,function(){b.effects.restore(e,a);b.effects.removeWrapper(e);f.callback&&f.callback.apply(this,arguments)})}e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);
(function(b){b.effects.clip=function(f){return this.queue(function(){var e=b(this),a=["position","top","left","height","width"],d=b.effects.setMode(e,f.options.mode||"hide"),c=f.options.direction||"vertical";b.effects.save(e,a);e.show();var h=b.effects.createWrapper(e).css({overflow:"hidden"});h=e[0].tagName=="IMG"?h:e;var j={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?h.height():h.width();if(d=="show"){h.css(j.size,0);h.css(j.position,c/2)}var l={};l[j.size]=
d=="show"?c:0;l[j.position]=d=="show"?0:c/2;h.animate(l,{queue:false,duration:f.duration,easing:f.options.easing,complete:function(){d=="hide"&&e.hide();b.effects.restore(e,a);b.effects.removeWrapper(e);f.callback&&f.callback.apply(e[0],arguments);e.dequeue()}})})}})(jQuery);
(function(b){b.effects.drop=function(f){return this.queue(function(){var e=b(this),a=["position","top","left","opacity"],d=b.effects.setMode(e,f.options.mode||"hide"),c=f.options.direction||"left";b.effects.save(e,a);e.show();b.effects.createWrapper(e);var h=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var j=f.options.distance||(h=="top"?e.outerHeight({margin:true})/2:e.outerWidth({margin:true})/2);if(d=="show")e.css("opacity",0).css(h,c=="pos"?-j:j);var l={opacity:d=="show"?1:
0};l[h]=(d=="show"?c=="pos"?"+=":"-=":c=="pos"?"-=":"+=")+j;e.animate(l,{queue:false,duration:f.duration,easing:f.options.easing,complete:function(){d=="hide"&&e.hide();b.effects.restore(e,a);b.effects.removeWrapper(e);f.callback&&f.callback.apply(this,arguments);e.dequeue()}})})}})(jQuery);
(function(b){b.effects.explode=function(f){return this.queue(function(){var e=f.options.pieces?Math.round(Math.sqrt(f.options.pieces)):3,a=f.options.pieces?Math.round(Math.sqrt(f.options.pieces)):3;f.options.mode=f.options.mode=="toggle"?b(this).is(":visible")?"hide":"show":f.options.mode;var d=b(this).show().css("visibility","hidden"),c=d.offset();c.top-=parseInt(d.css("marginTop"))||0;c.left-=parseInt(d.css("marginLeft"))||0;for(var h=d.outerWidth(true),j=d.outerHeight(true),l=0;l<e;l++)for(var n=
0;n<a;n++)d.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*(h/a),top:-l*(j/e)}).parent().addClass("effects-explode").css({position:"absolute",overflow:"hidden",width:h/a,height:j/e,left:c.left+n*(h/a)+(f.options.mode=="show"?(n-Math.floor(a/2))*(h/a):0),top:c.top+l*(j/e)+(f.options.mode=="show"?(l-Math.floor(e/2))*(j/e):0),opacity:f.options.mode=="show"?0:1}).animate({left:c.left+n*(h/a)+(f.options.mode=="show"?0:(n-Math.floor(a/2))*(h/a)),top:c.top+
l*(j/e)+(f.options.mode=="show"?0:(l-Math.floor(e/2))*(j/e)),opacity:f.options.mode=="show"?1:0},f.duration||500);setTimeout(function(){f.options.mode=="show"?d.css({visibility:"visible"}):d.css({visibility:"visible"}).hide();f.callback&&f.callback.apply(d[0]);d.dequeue();b(".effects-explode").remove()},f.duration||500)})}})(jQuery);
(function(b){b.effects.fold=function(f){return this.queue(function(){var e=b(this),a=["position","top","left"],d=b.effects.setMode(e,f.options.mode||"hide"),c=f.options.size||15,h=!!f.options.horizFirst;b.effects.save(e,a);e.show();var j=b.effects.createWrapper(e).css({overflow:"hidden"}),l=d=="show"!=h,n=l?["width","height"]:["height","width"];l=l?[j.width(),j.height()]:[j.height(),j.width()];var q=/([0-9]+)%/.exec(c);if(q)c=parseInt(q[1])/100*l[d=="hide"?0:1];if(d=="show")j.css(h?{height:0,width:c}:
{height:c,width:0});h={};q={};h[n[0]]=d=="show"?l[0]:c;q[n[1]]=d=="show"?l[1]:0;j.animate(h,f.duration/2,f.options.easing).animate(q,f.duration/2,f.options.easing,function(){d=="hide"&&e.hide();b.effects.restore(e,a);b.effects.removeWrapper(e);f.callback&&f.callback.apply(e[0],arguments);e.dequeue()})})}})(jQuery);
(function(b){b.effects.highlight=function(f){return this.queue(function(){var e=b(this),a=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(e,f.options.mode||"show"),c=f.options.color||"#ffff99",h=e.css("backgroundColor");b.effects.save(e,a);e.show();e.css({backgroundImage:"none",backgroundColor:c});c={backgroundColor:h};if(d=="hide")c.opacity=0;e.animate(c,{queue:false,duration:f.duration,easing:f.options.easing,complete:function(){d=="hide"&&e.hide();b.effects.restore(e,a);d==
"show"&&jQuery.browser.msie&&this.style.removeAttribute("filter");f.callback&&f.callback.apply(this,arguments);e.dequeue()}})})}})(jQuery);
(function(b){b.effects.pulsate=function(f){return this.queue(function(){var e=b(this),a=b.effects.setMode(e,f.options.mode||"show"),d=f.options.times||5;a=="hide"&&d--;if(e.is(":hidden")){e.css("opacity",0);e.show();e.animate({opacity:1},f.duration/2,f.options.easing);d-=2}for(var c=0;c<d;c++)e.animate({opacity:0},f.duration/2,f.options.easing).animate({opacity:1},f.duration/2,f.options.easing);a=="hide"?e.animate({opacity:0},f.duration/2,f.options.easing,function(){e.hide();f.callback&&f.callback.apply(this,
arguments)}):e.animate({opacity:0},f.duration/2,f.options.easing).animate({opacity:1},f.duration/2,f.options.easing,function(){f.callback&&f.callback.apply(this,arguments)});e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);
(function(b){b.effects.puff=function(f){return this.queue(function(){var e=b(this),a=b.extend(true,{},f.options),d=b.effects.setMode(e,f.options.mode||"hide"),c=parseInt(f.options.percent)||150;a.fade=true;var h={height:e.height(),width:e.width()},j=c/100;e.from=d=="hide"?h:{height:h.height*j,width:h.width*j};a.from=e.from;a.percent=d=="hide"?c:100;a.mode=d;e.effect("scale",a,f.duration,f.callback);e.dequeue()})};b.effects.scale=function(f){return this.queue(function(){var e=b(this),a=b.extend(true,
{},f.options),d=b.effects.setMode(e,f.options.mode||"effect"),c=parseInt(f.options.percent)||(parseInt(f.options.percent)==0?0:d=="hide"?0:100),h=f.options.direction||"both",j=f.options.origin;if(d!="effect"){a.origin=j||["middle","center"];a.restore=true}j={height:e.height(),width:e.width()};e.from=f.options.from||(d=="show"?{height:0,width:0}:j);c={y:h!="horizontal"?c/100:1,x:h!="vertical"?c/100:1};e.to={height:j.height*c.y,width:j.width*c.x};if(f.options.fade){if(d=="show"){e.from.opacity=0;e.to.opacity=
1}if(d=="hide"){e.from.opacity=1;e.to.opacity=0}}a.from=e.from;a.to=e.to;a.mode=d;e.effect("size",a,f.duration,f.callback);e.dequeue()})};b.effects.size=function(f){return this.queue(function(){var e=b(this),a=["position","top","left","width","height","overflow","opacity"],d=["position","top","left","overflow","opacity"],c=["width","height","overflow"],h=["fontSize"],j=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
n=b.effects.setMode(e,f.options.mode||"effect"),q=f.options.restore||false,x=f.options.scale||"both",u=f.options.origin,w={height:e.height(),width:e.width()};e.from=f.options.from||w;e.to=f.options.to||w;if(u){u=b.effects.getBaseline(u,w);e.from.top=(w.height-e.from.height)*u.y;e.from.left=(w.width-e.from.width)*u.x;e.to.top=(w.height-e.to.height)*u.y;e.to.left=(w.width-e.to.width)*u.x}var v={from:{y:e.from.height/w.height,x:e.from.width/w.width},to:{y:e.to.height/w.height,x:e.to.width/w.width}};
if(x=="box"||x=="both"){if(v.from.y!=v.to.y){a=a.concat(j);e.from=b.effects.setTransition(e,j,v.from.y,e.from);e.to=b.effects.setTransition(e,j,v.to.y,e.to)}if(v.from.x!=v.to.x){a=a.concat(l);e.from=b.effects.setTransition(e,l,v.from.x,e.from);e.to=b.effects.setTransition(e,l,v.to.x,e.to)}}if(x=="content"||x=="both")if(v.from.y!=v.to.y){a=a.concat(h);e.from=b.effects.setTransition(e,h,v.from.y,e.from);e.to=b.effects.setTransition(e,h,v.to.y,e.to)}b.effects.save(e,q?a:d);e.show();b.effects.createWrapper(e);
e.css("overflow","hidden").css(e.from);if(x=="content"||x=="both"){j=j.concat(["marginTop","marginBottom"]).concat(h);l=l.concat(["marginLeft","marginRight"]);c=a.concat(j).concat(l);e.find("*[width]").each(function(){child=b(this);q&&b.effects.save(child,c);var B={height:child.height(),width:child.width()};child.from={height:B.height*v.from.y,width:B.width*v.from.x};child.to={height:B.height*v.to.y,width:B.width*v.to.x};if(v.from.y!=v.to.y){child.from=b.effects.setTransition(child,j,v.from.y,child.from);
child.to=b.effects.setTransition(child,j,v.to.y,child.to)}if(v.from.x!=v.to.x){child.from=b.effects.setTransition(child,l,v.from.x,child.from);child.to=b.effects.setTransition(child,l,v.to.x,child.to)}child.css(child.from);child.animate(child.to,f.duration,f.options.easing,function(){q&&b.effects.restore(child,c)})})}e.animate(e.to,{queue:false,duration:f.duration,easing:f.options.easing,complete:function(){n=="hide"&&e.hide();b.effects.restore(e,q?a:d);b.effects.removeWrapper(e);f.callback&&f.callback.apply(this,
arguments);e.dequeue()}})})}})(jQuery);
(function(b){b.effects.shake=function(f){return this.queue(function(){var e=b(this),a=["position","top","left"];b.effects.setMode(e,f.options.mode||"effect");var d=f.options.direction||"left",c=f.options.distance||20,h=f.options.times||3,j=f.duration||f.options.duration||140;b.effects.save(e,a);e.show();b.effects.createWrapper(e);var l=d=="up"||d=="down"?"top":"left",n=d=="up"||d=="left"?"pos":"neg";d={};var q={},x={};d[l]=(n=="pos"?"-=":"+=")+c;q[l]=(n=="pos"?"+=":"-=")+c*2;x[l]=(n=="pos"?"-=":"+=")+
c*2;e.animate(d,j,f.options.easing);for(c=1;c<h;c++)e.animate(q,j,f.options.easing).animate(x,j,f.options.easing);e.animate(q,j,f.options.easing).animate(d,j/2,f.options.easing,function(){b.effects.restore(e,a);b.effects.removeWrapper(e);f.callback&&f.callback.apply(this,arguments)});e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);
(function(b){b.effects.slide=function(f){return this.queue(function(){var e=b(this),a=["position","top","left"],d=b.effects.setMode(e,f.options.mode||"show"),c=f.options.direction||"left";b.effects.save(e,a);e.show();b.effects.createWrapper(e).css({overflow:"hidden"});var h=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var j=f.options.distance||(h=="top"?e.outerHeight({margin:true}):e.outerWidth({margin:true}));if(d=="show")e.css(h,c=="pos"?-j:j);var l={};l[h]=(d=="show"?c=="pos"?
"+=":"-=":c=="pos"?"-=":"+=")+j;e.animate(l,{queue:false,duration:f.duration,easing:f.options.easing,complete:function(){d=="hide"&&e.hide();b.effects.restore(e,a);b.effects.removeWrapper(e);f.callback&&f.callback.apply(this,arguments);e.dequeue()}})})}})(jQuery);
(function(b){b.effects.transfer=function(f){return this.queue(function(){var e=b(this);b.effects.setMode(e,f.options.mode||"effect");var a=b(f.options.to),d=e.offset(),c=b('<div class="ui-effects-transfer"></div>').appendTo(document.body);f.options.className&&c.addClass(f.options.className);c.addClass(f.options.className);c.css({top:d.top,left:d.left,height:e.outerHeight()-parseInt(c.css("borderTopWidth"))-parseInt(c.css("borderBottomWidth")),width:e.outerWidth()-parseInt(c.css("borderLeftWidth"))-
parseInt(c.css("borderRightWidth")),position:"absolute"});d=a.offset();animation={top:d.top,left:d.left,height:a.outerHeight()-parseInt(c.css("borderTopWidth"))-parseInt(c.css("borderBottomWidth")),width:a.outerWidth()-parseInt(c.css("borderLeftWidth"))-parseInt(c.css("borderRightWidth"))};c.animate(animation,f.duration,f.options.easing,function(){c.remove();f.callback&&f.callback.apply(e[0],arguments);e.dequeue()})})}})(jQuery);
(function(b){function f(h,j){return function(){return h.apply(j,arguments)}}function e(h){if(b.data(this,"accordion")){var j=b.data(this,"accordion"),l=j.options;l.running=h?0:--l.running;if(!l.running){l.clearStyle&&l.toShow.add(l.toHide).css({height:"",overflow:""});b(this).triggerHandler("accordionchange",[b.event.fix({type:"accordionchange",target:j.element[0]}),l.data],l.change)}}}function a(h,j,l,n,q){var x=b.data(this,"accordion").options;x.toShow=h;x.toHide=j;x.data=l;l=f(e,this);x.running=
j.size()===0?h.size():j.size();if(x.animated)!x.alwaysOpen&&n?b.ui.accordion.animations[x.animated]({toShow:jQuery([]),toHide:j,complete:l,down:q,autoHeight:x.autoHeight}):b.ui.accordion.animations[x.animated]({toShow:h,toHide:j,complete:l,down:q,autoHeight:x.autoHeight});else{if(!x.alwaysOpen&&n)h.toggle();else{j.hide();h.show()}l(true)}}function d(h){var j=b.data(this,"accordion").options;if(j.disabled)return false;if(!h.target&&!j.alwaysOpen){j.active.parent().andSelf().toggleClass(j.selectedClass);
h=j.active.next();var l={options:j,newHeader:jQuery([]),oldHeader:j.active,newContent:jQuery([]),oldContent:h},n=j.active=b([]);a.call(this,n,h,l);return false}var q=b(h.target);q=b(q.parents(j.header)[0]||q);var x=q[0]==j.active[0];if(j.running||j.alwaysOpen&&x)return false;if(q.is(j.header)){j.active.parent().andSelf().toggleClass(j.selectedClass);x||q.parent().andSelf().addClass(j.selectedClass);n=q.next();h=j.active.next();l={options:j,newHeader:q,oldHeader:j.active,newContent:n,oldContent:h};
var u=j.headers.index(j.active[0])>j.headers.index(q[0]);j.active=x?b([]):q;a.call(this,n,h,l,x,u);return false}}function c(h,j){return j!=undefined?typeof j=="number"?h.filter(":eq("+j+")"):h.not(h.not(j)):j===false?b([]):h.filter(":eq(0)")}b.widget("ui.accordion",{init:function(){var h=this.options;if(h.navigation){var j=this.element.find("a").filter(h.navigationFilter);if(j.length)if(j.filter(h.header).length)h.active=j;else{h.active=j.parent().parent().prev();j.addClass("current")}}h.headers=
this.element.find(h.header);h.active=c(h.headers,h.active);b.browser.msie&&this.element.find("a").css("zoom","1");if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");b("<span class='ui-accordion-left'/>").insertBefore(h.headers);b("<span class='ui-accordion-right'/>").appendTo(h.headers);h.headers.addClass("ui-accordion-header").attr("tabindex","0")}var l;if(h.fillSpace){l=this.element.parent().height();h.headers.each(function(){l-=b(this).outerHeight()});var n=0;h.headers.next().each(function(){n=
Math.max(n,b(this).innerHeight()-b(this).height())}).height(l-n)}else if(h.autoHeight){l=0;h.headers.next().each(function(){l=Math.max(l,b(this).outerHeight())}).height(l)}h.headers.not(h.active||"").next().hide();h.active.parent().andSelf().addClass(h.selectedClass);h.event&&this.element.bind(h.event+".accordion",d)},activate:function(h){d.call(this.element[0],{target:c(this.options.headers,h)[0]})},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight)this.options.headers.next().css("height",
"");b.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")}});b.extend(b.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:"slide",event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(h,j){h=b.extend({easing:"swing",duration:300},h,j);if(h.toHide.size()){var l=h.toHide.height(),n=h.toShow.height()/l;h.toShow.css({height:0,
overflow:"hidden"}).show();h.toHide.filter(":hidden").each(h.complete).end().filter(":visible").animate({height:"hide"},{step:function(q){q=(l-q)*n;if(b.browser.msie||b.browser.opera)q=Math.ceil(q);h.toShow.height(q)},duration:h.duration,easing:h.easing,complete:function(){h.autoHeight||h.toShow.css("height","auto");h.complete()}})}else h.toShow.animate({height:"show"},h)},bounceslide:function(h){this.slide(h,{easing:h.down?"bounceout":"swing",duration:h.down?1E3:200})},easeslide:function(h){this.slide(h,
{easing:"easeinout",duration:700})}}});b.fn.activate=function(h){return this.accordion("activate",h)}})(jQuery);
(function(b){function f(){this.debug=false;this._curInst=null;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._promptClass="ui-datepicker-prompt";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this.regional=[];this.regional[""]={clearText:"Clear",clearStatus:"Erase the current date",
closeText:"Close",closeStatus:"Close without change",prevText:"&#x3c;Prev",prevStatus:"Show the previous month",nextText:"Next&#x3e;",nextStatus:"Show the next month",currentText:"Today",currentStatus:"Show the current month",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthStatus:"Show a different month",yearStatus:"Show a different year",
weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,
closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:true,changeYear:true,yearRange:"-10:+10",changeFirstDay:true,highlightWeek:false,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,
rangeSeparator:" - ",altField:"",altFormat:""};b.extend(this._defaults,this.regional[""]);this.dpDiv=b('<div id="'+this._mainDivId+'" style="display: none;"></div>')}function e(a,d){b.extend(a,d);for(var c in d)if(d[c]==null||d[c]==undefined)a[c]=d[c];return a}b.extend(f.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},setDefaults:function(a){e(this._defaults,a||{});return this},_attachDatepicker:function(a,d){var c=null;for(attrName in this._defaults){var h=
a.getAttribute("date:"+attrName);if(h){c=c||{};try{c[attrName]=eval(h)}catch(j){c[attrName]=h}}}h=a.nodeName.toLowerCase();var l=h=="div"||h=="span";if(!a.id)a.id="dp"+(new Date).getTime();var n=this._newInst(b(a),l);n.settings=b.extend({},d||{},c||{});if(h=="input")this._connectDatepicker(a,n);else l&&this._inlineDatepicker(a,n)},_newInst:function(a,d){return{id:a[0].id,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:d,dpDiv:!d?this.dpDiv:b('<div class="ui-datepicker-inline"></div>')}},
_connectDatepicker:function(a,d){var c=b(a);if(!c.hasClass(this.markerClassName)){var h=this._get(d,"appendText"),j=this._get(d,"isRTL");if(h)c[j?"before":"after"]('<span class="'+this._appendClass+'">'+h+"</span>");h=this._get(d,"showOn");if(h=="focus"||h=="both")c.focus(this._showDatepicker);if(h=="button"||h=="both"){h=this._get(d,"buttonText");var l=this._get(d,"buttonImage");h=b(this._get(d,"buttonImageOnly")?b("<img/>").addClass(this._triggerClass).attr({src:l,alt:h,title:h}):b('<button type="button"></button>').addClass(this._triggerClass).html(l==
""?h:b("<img/>").attr({src:l,alt:h,title:h})));c[j?"before":"after"](h);h.click(function(){b.datepicker._datepickerShowing&&b.datepicker._lastInput==a?b.datepicker._hideDatepicker():b.datepicker._showDatepicker(a);return false})}c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(n,q,x){d.settings[q]=x}).bind("getData.datepicker",function(n,q){return this._get(d,q)});b.data(a,"datepicker",d)}},_inlineDatepicker:function(a,d){var c=
b(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(d.dpDiv).bind("setData.datepicker",function(h,j,l){d.settings[j]=l}).bind("getData.datepicker",function(h,j){return this._get(d,j)});b.data(a,"datepicker",d);this._setDate(d,this._getDefaultDate(d));this._updateDatepicker(d)}},_dialogDatepicker:function(a,d,c,h,j){a=this._dialogInst;if(!a){a="dp"+(new Date).getTime();this._dialogInput=b('<input type="text" id="'+a+'" size="1" style="position: absolute; top: -100px;"/>');
this._dialogInput.keydown(this._doKeyDown);b("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};b.data(this._dialogInput[0],"datepicker",a)}e(a.settings,h||{});this._dialogInput.val(d);this._pos=j?j.length?j:[j.pageX,j.pageY]:null;if(!this._pos)this._pos=[(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),(window.innerHeight||document.documentElement.clientHeight||
document.body.clientHeight)/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);b.blockUI&&b.blockUI(this.dpDiv);b.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var d=a.nodeName.toLowerCase(),c=b(a);b.removeData(a,"datepicker");if(d=="input")c.siblings("."+
this._appendClass).remove().end().siblings("."+this._triggerClass).remove().end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress);else if(d=="div"||d=="span")c.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){a.disabled=false;b(a).siblings("button."+this._triggerClass).each(function(){this.disabled=false}).end().siblings("img."+this._triggerClass).css({opacity:"1.0",cursor:""});this._disabledInputs=
b.map(this._disabledInputs,function(d){return d==a?null:d})},_disableDatepicker:function(a){a.disabled=true;b(a).siblings("button."+this._triggerClass).each(function(){this.disabled=true}).end().siblings("img."+this._triggerClass).css({opacity:"0.5",cursor:"default"});this._disabledInputs=b.map(this._disabledInputs,function(d){return d==a?null:d});this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return false;for(var d=0;d<this._disabledInputs.length;d++)if(this._disabledInputs[d]==
a)return true;return false},_changeDatepicker:function(a,d,c){var h=d||{};if(typeof d=="string"){h={};h[d]=c}if(inst=b.data(a,"datepicker")){e(inst.settings,h);this._updateDatepicker(inst)}},_setDateDatepicker:function(a,d,c){if(a=b.data(a,"datepicker")){this._setDate(a,d,c);this._updateDatepicker(a)}},_getDateDatepicker:function(a){(a=b.data(a,"datepicker"))&&this._setDateFromField(a);return a?this._getDate(a):null},_doKeyDown:function(a){var d=b.data(a.target,"datepicker"),c=true;if(b.datepicker._datepickerShowing)switch(a.keyCode){case 9:b.datepicker._hideDatepicker(null,
"");break;case 13:b.datepicker._selectDay(a.target,d.selectedMonth,d.selectedYear,b("td.ui-datepicker-days-cell-over",d.dpDiv)[0]);return false;case 27:b.datepicker._hideDatepicker(null,b.datepicker._get(d,"duration"));break;case 33:b.datepicker._adjustDate(a.target,a.ctrlKey?-1:-b.datepicker._get(d,"stepMonths"),a.ctrlKey?"Y":"M");break;case 34:b.datepicker._adjustDate(a.target,a.ctrlKey?+1:+b.datepicker._get(d,"stepMonths"),a.ctrlKey?"Y":"M");break;case 35:a.ctrlKey&&b.datepicker._clearDate(a.target);
break;case 36:a.ctrlKey&&b.datepicker._gotoToday(a.target);break;case 37:a.ctrlKey&&b.datepicker._adjustDate(a.target,-1,"D");break;case 38:a.ctrlKey&&b.datepicker._adjustDate(a.target,-7,"D");break;case 39:a.ctrlKey&&b.datepicker._adjustDate(a.target,+1,"D");break;case 40:a.ctrlKey&&b.datepicker._adjustDate(a.target,+7,"D");break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)b.datepicker._showDatepicker(this);else c=false;if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var d=
b.data(a.target,"datepicker");d=b.datepicker._possibleChars(b.datepicker._get(d,"dateFormat"));var c=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||c<" "||!d||d.indexOf(c)>-1},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=b("input",a.parentNode)[0];if(!(b.datepicker._isDisabledDatepicker(a)||b.datepicker._lastInput==a)){var d=b.data(a,"datepicker"),c=b.datepicker._get(d,"beforeShow");e(d.settings,c?c.apply(a,[a,d]):{});b.datepicker._hideDatepicker(null,
"");b.datepicker._lastInput=a;b.datepicker._setDateFromField(d);if(b.datepicker._inDialog)a.value="";if(!b.datepicker._pos){b.datepicker._pos=b.datepicker._findPos(a);b.datepicker._pos[1]+=a.offsetHeight}var h=false;b(a).parents().each(function(){h|=b(this).css("position")=="fixed";return!h});if(h&&b.browser.opera){b.datepicker._pos[0]-=document.documentElement.scrollLeft;b.datepicker._pos[1]-=document.documentElement.scrollTop}a={left:b.datepicker._pos[0],top:b.datepicker._pos[1]};b.datepicker._pos=
null;d.rangeStart=null;d.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});b.datepicker._updateDatepicker(d);d.dpDiv.width(b.datepicker._getNumberOfMonths(d)[1]*b(".ui-datepicker",d.dpDiv[0])[0].offsetWidth);a=b.datepicker._checkOffset(d,a,h);d.dpDiv.css({position:b.datepicker._inDialog&&b.blockUI?"static":h?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"});if(!d.inline){a=b.datepicker._get(d,"showAnim")||"show";c=b.datepicker._get(d,"duration");var j=function(){b.datepicker._datepickerShowing=
true;b.browser.msie&&parseInt(b.browser.version)<7&&b("iframe.ui-datepicker-cover").css({width:d.dpDiv.width()+4,height:d.dpDiv.height()+4})};b.effects&&b.effects[a]?d.dpDiv.show(a,b.datepicker._get(d,"showOptions"),c,j):d.dpDiv[a](c,j);c==""&&j();d.input[0].type!="hidden"&&d.input[0].focus();b.datepicker._curInst=d}}},_updateDatepicker:function(a){var d={width:a.dpDiv.width()+4,height:a.dpDiv.height()+4};a.dpDiv.empty().append(this._generateDatepicker(a)).find("iframe.ui-datepicker-cover").css({width:d.width,
height:d.height});d=this._getNumberOfMonths(a);a.dpDiv[(d[0]!=1||d[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a.input&&a.input[0].type!="hidden"&&b(a.input[0]).focus()},_checkOffset:function(a,d,c){var h=a.input?this._findPos(a.input[0]):null,j=window.innerWidth||document.documentElement.clientWidth,l=window.innerHeight||document.documentElement.clientHeight,n=document.documentElement.scrollLeft||document.body.scrollLeft,
q=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(a,"isRTL")||d.left+a.dpDiv.width()-n>j)d.left=Math.max(c?0:n,h[0]+(a.input?a.input.width():0)-(c?n:0)-a.dpDiv.width()-(c&&b.browser.opera?document.documentElement.scrollLeft:0));else d.left-=c?n:0;if(d.top+a.dpDiv.height()-q>l)d.top=Math.max(c?0:q,h[1]-(c?q:0)-(this._inDialog?0:a.dpDiv.height())-(c&&b.browser.opera?document.documentElement.scrollTop:0));else d.top-=c?q:0;return d},_findPos:function(a){for(;a&&(a.type=="hidden"||
a.nodeType!=1);)a=a.nextSibling;a=b(a).offset();return[a.left,a.top]},_hideDatepicker:function(a,d){var c=this._curInst;if(c){this._get(c,"rangeSelect")&&this._stayOpen&&this._selectDate("#"+c.id,this._formatDate(c,c.currentDay,c.currentMonth,c.currentYear));this._stayOpen=false;if(this._datepickerShowing){d=d!=null?d:this._get(c,"duration");var h=this._get(c,"showAnim"),j=function(){b.datepicker._tidyDialog(c)};d!=""&&b.effects&&b.effects[h]?c.dpDiv.hide(h,b.datepicker._get(c,"showOptions"),d,j):
c.dpDiv[d==""?"hide":h=="slideDown"?"slideUp":h=="fadeIn"?"fadeOut":"hide"](d,j);d==""&&this._tidyDialog(c);if(h=this._get(c,"onClose"))h.apply(c.input?c.input[0]:null,[this._getDate(c),c]);this._datepickerShowing=false;this._lastInput=null;c.settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(b.blockUI){b.unblockUI();b("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker");
b("."+this._promptClass,a.dpDiv).remove()},_checkExternalClick:function(a){if(b.datepicker._curInst){a=b(a.target);a.parents("#"+b.datepicker._mainDivId).length==0&&!a.hasClass(b.datepicker.markerClassName)&&!a.hasClass(b.datepicker._triggerClass)&&b.datepicker._datepickerShowing&&!(b.datepicker._inDialog&&b.blockUI)&&b.datepicker._hideDatepicker(null,"")}},_adjustDate:function(a,d,c){a=b(a);a=b.data(a[0],"datepicker");this._adjustInstDate(a,d,c);this._updateDatepicker(a)},_gotoToday:function(a){a=
b(a);var d=b.data(a[0],"datepicker");if(this._get(d,"gotoCurrent")&&d.currentDay){d.selectedDay=d.currentDay;d.drawMonth=d.selectedMonth=d.currentMonth;d.drawYear=d.selectedYear=d.currentYear}else{var c=new Date;d.selectedDay=c.getDate();d.drawMonth=d.selectedMonth=c.getMonth();d.drawYear=d.selectedYear=c.getFullYear()}this._adjustDate(a);this._notifyChange(d)},_selectMonthYear:function(a,d,c){a=b(a);var h=b.data(a[0],"datepicker");h._selectingMonthYear=false;h[c=="M"?"drawMonth":"drawYear"]=d.options[d.selectedIndex].value-
0;this._adjustDate(a);this._notifyChange(h)},_clickMonthYear:function(a){a=b(a);a=b.data(a[0],"datepicker");a.input&&a._selectingMonthYear&&!b.browser.msie&&a.input[0].focus();a._selectingMonthYear=!a._selectingMonthYear},_changeFirstDay:function(a,d){var c=b(a);c=b.data(c[0],"datepicker");c.settings.firstDay=d;this._updateDatepicker(c)},_selectDay:function(a,d,c,h){if(!b(h).hasClass(this._unselectableClass)){var j=b(a);j=b.data(j[0],"datepicker");var l=this._get(j,"rangeSelect");if(l)if(this._stayOpen=
!this._stayOpen){b(".ui-datepicker td").removeClass(this._currentClass);b(h).addClass(this._currentClass)}j.selectedDay=j.currentDay=b("a",h).html();j.selectedMonth=j.currentMonth=d;j.selectedYear=j.currentYear=c;if(this._stayOpen)j.endDay=j.endMonth=j.endYear=null;else if(l){j.endDay=j.currentDay;j.endMonth=j.currentMonth;j.endYear=j.currentYear}this._selectDate(a,this._formatDate(j,j.currentDay,j.currentMonth,j.currentYear));if(this._stayOpen){j.rangeStart=this._daylightSavingAdjust(new Date(j.currentYear,
j.currentMonth,j.currentDay));this._updateDatepicker(j)}else if(l){j.selectedDay=j.currentDay=j.rangeStart.getDate();j.selectedMonth=j.currentMonth=j.rangeStart.getMonth();j.selectedYear=j.currentYear=j.rangeStart.getFullYear();j.rangeStart=null;j.inline&&this._updateDatepicker(j)}}},_clearDate:function(a){a=b(a);var d=b.data(a[0],"datepicker");if(!this._get(d,"mandatory")){this._stayOpen=false;d.endDay=d.endMonth=d.endYear=d.rangeStart=null;this._selectDate(a,"")}},_selectDate:function(a,d){var c=
b(a);c=b.data(c[0],"datepicker");d=d!=null?d:this._formatDate(c);if(this._get(c,"rangeSelect")&&d)d=(c.rangeStart?this._formatDate(c,c.rangeStart):d)+this._get(c,"rangeSeparator")+d;c.input&&c.input.val(d);this._updateAlternate(c);var h=this._get(c,"onSelect");if(h)h.apply(c.input?c.input[0]:null,[d,c]);else c.input&&c.input.trigger("change");if(c.inline)this._updateDatepicker(c);else if(!this._stayOpen){this._hideDatepicker(null,this._get(c,"duration"));this._lastInput=c.input[0];typeof c.input[0]!=
"object"&&c.input[0].focus();this._lastInput=null}},_updateAlternate:function(a){var d=this._get(a,"altField");if(d){var c=this._get(a,"altFormat"),h=this._getDate(a);dateStr=h&&(b.browser.safari&&typeof h=="object"&&h.length||h.constructor&&h.constructor.toString().match(/\Array\(\)/))?!h[0]&&!h[1]?"":this.formatDate(c,h[0],this._getFormatConfig(a))+this._get(a,"rangeSeparator")+this.formatDate(c,h[1]||h[0],this._getFormatConfig(a)):this.formatDate(c,h,this._getFormatConfig(a));b(d).each(function(){b(this).val(dateStr)})}},
noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getFullYear(),a.getMonth(),a.getDate());var d=new Date(a.getFullYear(),0,4),c=d.getDay()||7;d.setDate(d.getDate()+1-c);if(c<4&&a<d){a.setDate(a.getDate()-3);return b.datepicker.iso8601Week(a)}else if(a>new Date(a.getFullYear(),11,28)){c=(new Date(a.getFullYear()+1,0,4)).getDay()||7;if(c>4&&(a.getDay()||7)<c-3){a.setDate(a.getDate()+3);return b.datepicker.iso8601Week(a)}}return Math.floor((a-d)/864E5/7)+1},
dateStatus:function(a,d){return b.datepicker.formatDate(b.datepicker._get(d,"dateStatus"),a,b.datepicker._getFormatConfig(d))},parseDate:function(a,d,c){if(a==null||d==null)throw"Invalid arguments";d=typeof d=="object"?d.toString():d+"";if(d=="")return null;var h=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff,j=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,l=(c?c.dayNames:null)||this._defaults.dayNames,n=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:
null)||this._defaults.monthNames;for(var q=-1,x=-1,u=-1,w=false,v=function(I){(I=M+1<a.length&&a.charAt(M+1)==I)&&M++;return I},B=function(I){v(I);for(var N=I=I=="@"?14:I=="y"?4:2,O=0;N>0&&C<d.length&&d.charAt(C)>="0"&&d.charAt(C)<="9";){O=O*10+(d.charAt(C++)-0);N--}if(N==I)throw"Missing number at position "+C;return O},D=function(I,N,O){I=v(I)?O:N;for(O=N=0;O<I.length;O++)N=Math.max(N,I[O].length);O="";for(var g=C;N>0&&C<d.length;){O+=d.charAt(C++);for(var i=0;i<I.length;i++)if(O==I[i])return i+
1;N--}throw"Unknown name at position "+g;},H=function(){if(d.charAt(C)!=a.charAt(M))throw"Unexpected literal at position "+C;C++},C=0,M=0;M<a.length;M++)if(w)if(a.charAt(M)=="'"&&!v("'"))w=false;else H();else switch(a.charAt(M)){case "d":u=B("d");break;case "D":D("D",j,l);break;case "m":x=B("m");break;case "M":x=D("M",n,c);break;case "y":q=B("y");break;case "@":var E=new Date(B("@"));q=E.getFullYear();x=E.getMonth()+1;u=E.getDate();break;case "'":if(v("'"))H();else w=true;break;default:H()}if(q<100)q+=
(new Date).getFullYear()-(new Date).getFullYear()%100+(q<=h?0:-100);E=this._daylightSavingAdjust(new Date(q,x-1,u));if(E.getFullYear()!=q||E.getMonth()+1!=x||E.getDate()!=u)throw"Invalid date";return E},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(a,d,c){if(!d)return"";var h=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,
j=(c?c.dayNames:null)||this._defaults.dayNames,l=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var n=function(B){(B=v+1<a.length&&a.charAt(v+1)==B)&&v++;return B},q=function(B,D){return(n(B)&&D<10?"0":"")+D},x=function(B,D,H,C){return n(B)?C[D]:H[D]},u="",w=false;if(d)for(var v=0;v<a.length;v++)if(w)if(a.charAt(v)=="'"&&!n("'"))w=false;else u+=a.charAt(v);else switch(a.charAt(v)){case "d":u+=q("d",d.getDate());break;case "D":u+=x("D",
d.getDay(),h,j);break;case "m":u+=q("m",d.getMonth()+1);break;case "M":u+=x("M",d.getMonth(),l,c);break;case "y":u+=n("y")?d.getFullYear():(d.getYear()%100<10?"0":"")+d.getYear()%100;break;case "@":u+=d.getTime();break;case "'":if(n("'"))u+="'";else w=true;break;default:u+=a.charAt(v)}return u},_possibleChars:function(a){for(var d="",c=false,h=0;h<a.length;h++)if(c)if(a.charAt(h)=="'"&&!lookAhead("'"))c=false;else d+=a.charAt(h);else switch(a.charAt(h)){case "d":case "m":case "y":case "@":d+="0123456789";
break;case "D":case "M":return null;case "'":if(lookAhead("'"))d+="'";else c=true;break;default:d+=a.charAt(h)}return d},_get:function(a,d){return a.settings[d]!==undefined?a.settings[d]:this._defaults[d]},_setDateFromField:function(a){var d=this._get(a,"dateFormat"),c=a.input?a.input.val().split(this._get(a,"rangeSeparator")):null;a.endDay=a.endMonth=a.endYear=null;var h=defaultDate=this._getDefaultDate(a);if(c.length>0){var j=this._getFormatConfig(a);if(c.length>1){h=this.parseDate(d,c[1],j)||defaultDate;
a.endDay=h.getDate();a.endMonth=h.getMonth();a.endYear=h.getFullYear()}try{h=this.parseDate(d,c[0],j)||defaultDate}catch(l){this.log(l);h=defaultDate}}a.selectedDay=h.getDate();a.drawMonth=a.selectedMonth=h.getMonth();a.drawYear=a.selectedYear=h.getFullYear();a.currentDay=c[0]?h.getDate():0;a.currentMonth=c[0]?h.getMonth():0;a.currentYear=c[0]?h.getFullYear():0;this._adjustInstDate(a)},_getDefaultDate:function(a){var d=this._determineDate(this._get(a,"defaultDate"),new Date),c=this._getMinMaxDate(a,
"min",true);a=this._getMinMaxDate(a,"max");d=c&&d<c?c:d;return d=a&&d>a?a:d},_determineDate:function(a,d){var c=function(j){var l=new Date;l.setDate(l.getDate()+j);return l},h=function(j,l){var n=new Date,q=n.getFullYear(),x=n.getMonth();n=n.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,w=u.exec(j);w;){switch(w[2]||"d"){case "d":case "D":n+=w[1]-0;break;case "w":case "W":n+=w[1]*7;break;case "m":case "M":x+=w[1]-0;n=Math.min(n,l(q,x));break;case "y":case "Y":q+=w[1]-0;n=Math.min(n,l(q,
x));break}w=u.exec(j)}return new Date(q,x,n)};if(a=(a=a==null?d:typeof a=="string"?h(a,this._getDaysInMonth):typeof a=="number"?isNaN(a)?d:c(a):a)&&a.toString()=="Invalid Date"?d:a){a.setHours(0);a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0)}return this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,d,c){var h=!d;d=this._determineDate(d,new Date);a.selectedDay=a.currentDay=d.getDate();
a.drawMonth=a.selectedMonth=a.currentMonth=d.getMonth();a.drawYear=a.selectedYear=a.currentYear=d.getFullYear();if(this._get(a,"rangeSelect"))if(c){c=this._determineDate(c,null);a.endDay=c.getDate();a.endMonth=c.getMonth();a.endYear=c.getFullYear()}else{a.endDay=a.currentDay;a.endMonth=a.currentMonth;a.endYear=a.currentYear}this._adjustInstDate(a);if(a.input)a.input.val(h?"":this._formatDate(a)+(!this._get(a,"rangeSelect")?"":this._get(a,"rangeSeparator")+this._formatDate(a,a.endDay,a.endMonth,a.endYear)))},
_getDate:function(a){var d=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this._get(a,"rangeSelect")?[a.rangeStart||d,!a.endYear?a.rangeStart||d:this._daylightSavingAdjust(new Date(a.endYear,a.endMonth,a.endDay))]:d},_generateDatepicker:function(a){var d=new Date;d=this._daylightSavingAdjust(new Date(d.getFullYear(),d.getMonth(),d.getDate()));var c=this._get(a,"showStatus"),h=this._get(a,"isRTL"),j=this._get(a,
"mandatory")?"":'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#'+a.id+"');\""+(c?this._addStatus(a,this._get(a,"clearStatus")||"&#xa0;"):"")+">"+this._get(a,"clearText")+"</a></div>";j='<div class="ui-datepicker-control">'+(h?"":j)+'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"'+(c?this._addStatus(a,this._get(a,"closeStatus")||"&#xa0;"):"")+">"+this._get(a,"closeText")+"</a></div>"+(h?j:"")+"</div>";var l=this._get(a,"prompt"),n=
this._get(a,"closeAtTop"),q=this._get(a,"hideIfNoPrevNext"),x=this._get(a,"navigationAsDateFormat"),u=this._getNumberOfMonths(a),w=this._get(a,"stepMonths"),v=u[0]!=1||u[1]!=1,B=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),D=this._getMinMaxDate(a,"min",true),H=this._getMinMaxDate(a,"max"),C=a.drawMonth,M=a.drawYear;if(H){var E=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth()-u[1]+1,H.getDate()));for(E=D&&E<D?D:E;this._daylightSavingAdjust(new Date(M,
C,1))>E;){C--;if(C<0){C=11;M--}}}E=this._get(a,"prevText");E=!x?E:this.formatDate(E,this._daylightSavingAdjust(new Date(M,C-w,1)),this._getFormatConfig(a));E='<div class="ui-datepicker-prev">'+(this._canAdjustMonth(a,-1,M,C)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+a.id+"', -"+w+", 'M');\""+(c?this._addStatus(a,this._get(a,"prevStatus")||"&#xa0;"):"")+">"+E+"</a>":q?"":"<label>"+E+"</label>")+"</div>";var I=this._get(a,"nextText");I=!x?I:this.formatDate(I,this._daylightSavingAdjust(new Date(M,
C+w,1)),this._getFormatConfig(a));q='<div class="ui-datepicker-next">'+(this._canAdjustMonth(a,+1,M,C)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+a.id+"', +"+w+", 'M');\""+(c?this._addStatus(a,this._get(a,"nextStatus")||"&#xa0;"):"")+">"+I+"</a>":q?"":"<label>"+I+"</label>")+"</div>";w=this._get(a,"currentText");w=!x?w:this.formatDate(w,d,this._getFormatConfig(a));h=(l?'<div class="'+this._promptClass+'">'+l+"</div>":"")+(n&&!a.inline?j:"")+'<div class="ui-datepicker-links">'+(h?q:E)+(this._isInRange(a,
this._get(a,"gotoCurrent")&&a.currentDay?B:d)?'<div class="ui-datepicker-current"><a onclick="jQuery.datepicker._gotoToday(\'#'+a.id+"');\""+(c?this._addStatus(a,this._get(a,"currentStatus")||"&#xa0;"):"")+">"+w+"</a></div>":"")+(h?E:q)+"</div>";l=this._get(a,"firstDay");x=this._get(a,"changeFirstDay");q=this._get(a,"dayNames");w=this._get(a,"dayNamesShort");E=this._get(a,"dayNamesMin");I=this._get(a,"monthNames");for(var N=this._get(a,"beforeShowDay"),O=this._get(a,"highlightWeek"),g=this._get(a,
"showOtherMonths"),i=this._get(a,"showWeeks"),k=this._get(a,"calculateWeek")||this.iso8601Week,o=c?this._get(a,"dayStatus")||"&#xa0;":"",t=this._get(a,"statusForDate")||this.dateStatus,r=a.endDay?this._daylightSavingAdjust(new Date(a.endYear,a.endMonth,a.endDay)):B,z=0;z<u[0];z++)for(var A=0;A<u[1];A++){var m=this._daylightSavingAdjust(new Date(M,C,a.selectedDay));h+='<div class="ui-datepicker-one-month'+(A==0?" ui-datepicker-new-row":"")+'">'+this._generateMonthYearHeader(a,C,M,D,H,m,z>0||A>0,c,
I)+'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead><tr class="ui-datepicker-title-row">'+(i?"<td>"+this._get(a,"weekHeader")+"</td>":"");for(var F=0;F<7;F++){var G=(F+l)%7,L=o.indexOf("DD")>-1?o.replace(/DD/,q[G]):o.replace(/D/,w[G]);h+="<td"+((F+l+6)%7>=5?' class="ui-datepicker-week-end-cell"':"")+">"+(!x?"<span":"<a onclick=\"jQuery.datepicker._changeFirstDay('#"+a.id+"', "+G+');"')+(c?this._addStatus(a,L):"")+' title="'+q[G]+'">'+E[G]+(x?"</a>":"</span>")+"</td>"}h+="</tr></thead><tbody>";
G=this._getDaysInMonth(M,C);if(M==a.selectedYear&&C==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,G);F=(this._getFirstDayOfMonth(M,C)-l+7)%7;G=v?6:Math.ceil((F+G)/7);L=this._daylightSavingAdjust(new Date(M,C,1-F));for(var s=0;s<G;s++){h+='<tr class="ui-datepicker-days-row">'+(i?'<td class="ui-datepicker-week-col">'+k(L)+"</td>":"");for(F=0;F<7;F++){var K=N?N.apply(a.input?a.input[0]:null,[L]):[true,""],p=L.getMonth()!=C,y=p||!K[0]||D&&L<D||H&&L>H;h+='<td class="ui-datepicker-days-cell'+((F+
l+6)%7>=5?" ui-datepicker-week-end-cell":"")+(p?" ui-datepicker-otherMonth":"")+(L.getTime()==m.getTime()&&C==a.selectedMonth?" ui-datepicker-days-cell-over":"")+(y?" "+this._unselectableClass:"")+(p&&!g?"":" "+K[1]+(L.getTime()>=B.getTime()&&L.getTime()<=r.getTime()?" "+this._currentClass:"")+(L.getTime()==d.getTime()?" ui-datepicker-today":""))+'"'+((!p||g)&&K[2]?' title="'+K[2]+'"':"")+(y?O?" onmouseover=\"jQuery(this).parent().addClass('ui-datepicker-week-over');\" onmouseout=\"jQuery(this).parent().removeClass('ui-datepicker-week-over');\"":
"":" onmouseover=\"jQuery(this).addClass('ui-datepicker-days-cell-over')"+(O?".parent().addClass('ui-datepicker-week-over')":"")+";"+(!c||p&&!g?"":"jQuery('#ui-datepicker-status-"+a.id+"').html('"+(t.apply(a.input?a.input[0]:null,[L,a])||"&#xa0;")+"');")+"\" onmouseout=\"jQuery(this).removeClass('ui-datepicker-days-cell-over')"+(O?".parent().removeClass('ui-datepicker-week-over')":"")+";"+(!c||p&&!g?"":"jQuery('#ui-datepicker-status-"+a.id+"').html('&#xa0;');")+'" onclick="jQuery.datepicker._selectDay(\'#'+
a.id+"',"+C+","+M+', this);"')+">"+(p?g?L.getDate():"&#xa0;":y?L.getDate():"<a>"+L.getDate()+"</a>")+"</td>";L.setDate(L.getDate()+1);L=this._daylightSavingAdjust(L)}h+="</tr>"}C++;if(C>11){C=0;M++}h+="</tbody></table></div>"}h+=(c?'<div style="clear: both;"></div><div id="ui-datepicker-status-'+a.id+'" class="ui-datepicker-status">'+(this._get(a,"initStatus")||"&#xa0;")+"</div>":"")+(!n&&!a.inline?j:"")+'<div style="clear: both;"></div>'+(b.browser.msie&&parseInt(b.browser.version)<7&&!a.inline?
'<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>':"");return h},_generateMonthYearHeader:function(a,d,c,h,j,l,n,q,x){h=a.rangeStart&&h&&l<h?l:h;l='<div class="ui-datepicker-header">';if(n||!this._get(a,"changeMonth"))l+=x[d]+"&#xa0;";else{var u=h&&h.getFullYear()==c,w=j&&j.getFullYear()==c;l+='<select class="ui-datepicker-new-month" onchange="jQuery.datepicker._selectMonthYear(\'#'+a.id+"', this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+a.id+"');\""+(q?this._addStatus(a,
this._get(a,"monthStatus")||"&#xa0;"):"")+">";for(var v=0;v<12;v++)if((!u||v>=h.getMonth())&&(!w||v<=j.getMonth()))l+='<option value="'+v+'"'+(v==d?' selected="selected"':"")+">"+x[v]+"</option>";l+="</select>"}if(n||!this._get(a,"changeYear"))l+=c;else{d=this._get(a,"yearRange").split(":");x=n=0;if(d.length!=2){n=c-10;x=c+10}else if(d[0].charAt(0)=="+"||d[0].charAt(0)=="-"){n=x=(new Date).getFullYear();n+=parseInt(d[0],10);x+=parseInt(d[1],10)}else{n=parseInt(d[0],10);x=parseInt(d[1],10)}n=h?Math.max(n,
h.getFullYear()):n;x=j?Math.min(x,j.getFullYear()):x;for(l+='<select class="ui-datepicker-new-year" onchange="jQuery.datepicker._selectMonthYear(\'#'+a.id+"', this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+a.id+"');\""+(q?this._addStatus(a,this._get(a,"yearStatus")||"&#xa0;"):"")+">";n<=x;n++)l+='<option value="'+n+'"'+(n==c?' selected="selected"':"")+">"+n+"</option>";l+="</select>"}l+="</div>";return l},_addStatus:function(a,d){return" onmouseover=\"jQuery('#ui-datepicker-status-"+
a.id+"').html('"+d+"');\" onmouseout=\"jQuery('#ui-datepicker-status-"+a.id+"').html('&#xa0;');\""},_adjustInstDate:function(a,d,c){var h=a.drawYear+(c=="Y"?d:0),j=a.drawMonth+(c=="M"?d:0);d=Math.min(a.selectedDay,this._getDaysInMonth(h,j))+(c=="D"?d:0);h=this._daylightSavingAdjust(new Date(h,j,d));j=this._getMinMaxDate(a,"min",true);d=this._getMinMaxDate(a,"max");h=j&&h<j?j:h;h=d&&h>d?d:h;a.selectedDay=h.getDate();a.drawMonth=a.selectedMonth=h.getMonth();a.drawYear=a.selectedYear=h.getFullYear();
if(c=="M"||c=="Y")this._notifyChange(a)},_notifyChange:function(a){var d=this._get(a,"onChangeMonthYear");if(d)d.apply(a.input?a.input[0]:null,[new Date(a.selectedYear,a.selectedMonth,1),a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,d,c){d=this._determineDate(this._get(a,d+"Date"),null);return!c||!a.rangeStart?d:!d||a.rangeStart>d?a.rangeStart:d},_getDaysInMonth:function(a,d){return 32-(new Date(a,d,32)).getDate()},
_getFirstDayOfMonth:function(a,d){return(new Date(a,d,1)).getDay()},_canAdjustMonth:function(a,d,c,h){var j=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,h+(d<0?d:j[1]),1));d<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,d){var c=!a.rangeStart?null:this._daylightSavingAdjust(new Date(a.selectedYear,a.selectedMonth,a.selectedDay));c=(c=c&&a.rangeStart<c?a.rangeStart:c)||this._getMinMaxDate(a,"min");var h=this._getMinMaxDate(a,
"max");return(!c||d>=c)&&(!h||d<=h)},_getFormatConfig:function(a){var d=this._get(a,"shortYearCutoff");d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);return{shortYearCutoff:d,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,d,c,h){if(!d){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}d=d?typeof d=="object"?
d:this._daylightSavingAdjust(new Date(h,c,d)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),d,this._getFormatConfig(a))}});b.fn.datepicker=function(a){var d=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"))return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(d));return this.each(function(){typeof a=="string"?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,
[this].concat(d)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new f;b(document).ready(function(){b(document.body).append(b.datepicker.dpDiv).mousedown(b.datepicker._checkExternalClick)})})(jQuery);
(function(b){var f={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};b.widget("ui.dialog",{init:function(){var e=this,a=this.options,d=typeof a.resizable=="string"?a.resizable:"n,e,s,w,se,sw,ne,nw",c=this.element.addClass("ui-dialog-content").wrap("<div/>").wrap("<div/>"),
h=this.uiDialogContainer=c.parent().addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"}),j=a.title||c.attr("title")||"";j=(this.uiDialogTitlebar=b('<div class="ui-dialog-titlebar"/>')).append('<span class="ui-dialog-title">'+j+"</span>").append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>').prependTo(h);c=(this.uiDialog=h.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(a.dialogClass).addClass(c.attr("className")).removeClass("ui-dialog-content").css({position:"absolute",
width:a.width,height:a.height,overflow:"hidden",zIndex:a.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(l){a.closeOnEscape&&l.keyCode&&l.keyCode==27&&e.close()}).mousedown(function(){e.moveToTop()});(this.uiDialogButtonPane=b("<div/>")).addClass("ui-dialog-buttonpane").css({position:"absolute",bottom:0}).appendTo(c);this.uiDialogTitlebarClose=b(".ui-dialog-titlebar-close",j).hover(function(){b(this).addClass("ui-dialog-titlebar-close-hover")},function(){b(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(l){l.stopPropagation()}).click(function(){e.close();
return false});this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function(){b.ui.disableSelection(this)});if(b.fn.draggable){c.draggable({cancel:".ui-dialog-content",helper:a.dragHelper,handle:".ui-dialog-titlebar",start:function(){e.moveToTop();a.dragStart&&a.dragStart.apply(e.element[0],arguments)},drag:function(){a.drag&&a.drag.apply(e.element[0],arguments)},stop:function(){a.dragStop&&a.dragStop.apply(e.element[0],arguments);b.ui.dialog.overlay.resize()}});a.draggable||c.draggable("disable")}if(b.fn.resizable){c.resizable({cancel:".ui-dialog-content",
helper:a.resizeHelper,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:a.minHeight,start:function(){a.resizeStart&&a.resizeStart.apply(e.element[0],arguments)},resize:function(){a.autoResize&&e.size.apply(e);a.resize&&a.resize.apply(e.element[0],arguments)},handles:d,stop:function(){a.autoResize&&e.size.apply(e);a.resizeStop&&a.resizeStop.apply(e.element[0],arguments);b.ui.dialog.overlay.resize()}});a.resizable||c.resizable("disable")}this.createButtons(a.buttons);this.isOpen=
false;a.bgiframe&&b.fn.bgiframe&&c.bgiframe();a.autoOpen&&this.open()},setData:function(e,a){f[e]&&this.uiDialog.data(f[e],a);switch(e){case "buttons":this.createButtons(a);break;case "draggable":this.uiDialog.draggable(a?"enable":"disable");break;case "height":this.uiDialog.height(a);break;case "position":this.position(a);break;case "resizable":typeof a=="string"&&this.uiDialog.data("handles.resizable",a);this.uiDialog.resizable(a?"enable":"disable");break;case "title":b(".ui-dialog-title",this.uiDialogTitlebar).text(a);
break;case "width":this.uiDialog.width(a);break}b.widget.prototype.setData.apply(this,arguments)},position:function(e){var a=b(window),d=b(document),c=d.scrollTop();d=d.scrollLeft();var h=c;if(b.inArray(e,["center","top","right","bottom","left"])>=0)e=[e=="right"||e=="left"?e:"center",e=="top"||e=="bottom"?e:"middle"];if(e.constructor!=Array)e=["center","middle"];if(e[0].constructor==Number)d+=e[0];else switch(e[0]){case "left":d+=0;break;case "right":d+=a.width()-this.uiDialog.width();break;default:case "center":d+=
(a.width()-this.uiDialog.width())/2}if(e[1].constructor==Number)c+=e[1];else switch(e[1]){case "top":c+=0;break;case "bottom":c+=a.height()-this.uiDialog.height();break;default:case "middle":c+=(a.height()-this.uiDialog.height())/2}c=Math.max(c,h);this.uiDialog.css({top:c,left:d})},size:function(){var e=this.uiDialogContainer,a=this.uiDialogTitlebar,d=this.element,c=parseInt(d.css("margin-top"),10)+parseInt(d.css("margin-bottom"),10),h=parseInt(d.css("margin-left"),10)+parseInt(d.css("margin-right"),
10);d.height(e.height()-a.outerHeight()-c);d.width(e.width()-h)},open:function(){if(!this.isOpen){this.overlay=this.options.modal?new b.ui.dialog.overlay(this):null;this.uiDialog.next().length>0&&this.uiDialog.appendTo("body");this.position(this.options.position);this.uiDialog.show(this.options.show);this.options.autoResize&&this.size();this.moveToTop(true);var e={options:this.options};this.uiDialogTitlebarClose.focus();this.element.triggerHandler("dialogopen",[null,e],this.options.open);this.isOpen=
true}},moveToTop:function(e){if(this.options.modal&&!e||!this.options.stack&&!this.options.modal)return this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus);var a=this.options.zIndex,d=this.options;b(".ui-dialog:visible").each(function(){a=Math.max(a,parseInt(b(this).css("z-index"),10)||d.zIndex)});this.overlay&&this.overlay.$el.css("z-index",++a);this.uiDialog.css("z-index",++a);this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus)},
close:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide(this.options.hide);this.element.triggerHandler("dialogclose",[null,{options:this.options}],this.options.close);b.ui.dialog.overlay.resize();this.isOpen=false},destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove()},createButtons:function(e){var a=this,d=false,c=this.uiDialogButtonPane;
c.empty().hide();b.each(e,function(){return!(d=true)});if(d){c.show();b.each(e,function(h,j){b("<button/>").text(h).click(function(){j.apply(a.element[0],arguments)}).appendTo(c)})}}});b.extend(b.ui.dialog,{defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zIndex:1E3},overlay:function(e){this.$el=b.ui.dialog.overlay.create(e)}});b.extend(b.ui.dialog.overlay,
{instances:[],events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){b("a, :input").bind(b.ui.dialog.overlay.events,function(){var d=false,c=b(this).parents(".ui-dialog");if(c.length){d=b(".ui-dialog-overlay");if(d.length){var h=parseInt(d.css("z-index"),10);d.each(function(){h=Math.max(h,parseInt(b(this).css("z-index"),10))});d=parseInt(c.css("z-index"),10)>
h}else d=true}return d})},1);b(document).bind("keydown.dialog-overlay",function(d){d.keyCode&&d.keyCode==27&&e.close()});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var a=b("<div/>").appendTo(document.body).addClass("ui-dialog-overlay").css(b.extend({borderWidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},e.options.overlay));e.options.bgiframe&&b.fn.bgiframe&&a.bgiframe();this.instances.push(a);return a},destroy:function(e){this.instances.splice(b.inArray(this.instances,
e),1);this.instances.length===0&&b("a, :input").add([document,window]).unbind(".dialog-overlay");e.remove()},height:function(){if(b.browser.msie&&b.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return e<Math.max(document.documentElement.offsetHeight,document.body.offsetHeight)?b(window).height()+"px":e+"px"}else return b(document).height()+"px"},width:function(){if(b.browser.msie&&b.browser.version<7){var e=Math.max(document.documentElement.scrollWidth,
document.body.scrollWidth);return e<Math.max(document.documentElement.offsetWidth,document.body.offsetWidth)?b(window).width()+"px":e+"px"}else return b(document).width()+"px"},resize:function(){var e=b([]);b.each(b.ui.dialog.overlay.instances,function(){e=e.add(this)});e.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(b){b.fn.unwrap=b.fn.unwrap||function(f){return this.each(function(){b(this).parents(f).eq(0).after(this).remove()})};b.widget("ui.slider",{plugins:{},ui:function(){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:Math.round(this.value(null,"x")),y:Math.round(this.value(null,"y"))},range:this.getRange()}},propagate:function(f,e){b.ui.plugin.call(this,f,[e,this.ui()]);
this.element.triggerHandler(f=="slide"?f:"slide"+f,[e,this.ui()],this.options[f])},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){b(this).data("mouse").mouseDestroy()})}this.generated&&this.generated.remove()},setData:function(f,e){b.widget.prototype.setData.apply(this,arguments);/min|max|steps/.test(f)&&this.initBoundaries();if(f=="range")e?this.handle.length==
2&&this.createRange():this.removeRange()},init:function(){var f=this;this.element.addClass("ui-slider");this.initBoundaries();this.handle=b(this.options.handle,this.element);if(!this.handle.length)f.handle=f.generated=b(f.options.handles||[0]).map(function(){var a=b("<div/>").addClass("ui-slider-handle").appendTo(f.element);this.id&&a.attr("id",this.id);return a[0]});var e=function(a){this.element=b(a);this.element.data("mouse",this);this.options=f.options;this.element.bind("mousedown",function(){f.currentHandle&&
this.blur(f.currentHandle);f.focus(this,1)});this.mouseInit()};b.extend(e.prototype,b.ui.mouse,{mouseStart:function(a){return f.start.call(f,a,this.element[0])},mouseStop:function(a){return f.stop.call(f,a,this.element[0])},mouseDrag:function(a){return f.drag.call(f,a,this.element[0])},mouseCapture:function(){return true},trigger:function(a){this.mouseDown(a)}});b(this.handle).each(function(){new e(this)}).wrap('<a href="javascript:void(0)" style="outline:none;border:none;"></a>').parent().bind("focus",
function(){f.focus(this.firstChild)}).bind("blur",function(){f.blur(this.firstChild)}).bind("keydown",function(a){f.options.noKeyboard||f.keydown(a.keyCode,this.firstChild)});this.element.bind("mousedown.slider",function(a){f.click.apply(f,[a]);f.currentHandle.data("mouse").trigger(a);f.firstValue+=1});b.each(this.options.handles||[],function(a,d){f.moveTo(d.start,a,true)});isNaN(this.options.startValue)||this.moveTo(this.options.startValue,0,true);this.previousHandle=b(this.handle[0]);this.handle.length==
2&&this.options.range&&this.createRange()},initBoundaries:function(){var f=this.element[0],e=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};b.extend(e,{axis:e.axis||(f.offsetWidth<f.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(e.max,10))?{x:parseInt(e.max,10),y:parseInt(e.max,10)}:{x:e.max&&e.max.x||100,y:e.max&&e.max.y||100},min:!isNaN(parseInt(e.min,10))?{x:parseInt(e.min,10),y:parseInt(e.min,10)}:{x:e.min&&e.min.x||0,y:e.min&&e.min.y||
0}});e.realMax={x:e.max.x-e.min.x,y:e.max.y-e.min.y};e.stepping={x:e.stepping&&e.stepping.x||parseInt(e.stepping,10)||(e.steps?e.realMax.x/(e.steps.x||parseInt(e.steps,10)||e.realMax.x):0),y:e.stepping&&e.stepping.y||parseInt(e.stepping,10)||(e.steps?e.realMax.y/(e.steps.y||parseInt(e.steps,10)||e.realMax.y):0)}},keydown:function(f,e){if(/(37|38|39|40)/.test(f))this.moveTo({x:/(37|39)/.test(f)?(f==37?"-":"+")+"="+this.oneStep("x"):0,y:/(38|40)/.test(f)?(f==38?"-":"+")+"="+this.oneStep("y"):0},e)},
focus:function(f,e){this.currentHandle=b(f).addClass("ui-slider-handle-active");e&&this.currentHandle.parent()[0].focus()},blur:function(f){b(f).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==f){this.previousHandle=this.currentHandle;this.currentHandle=null}},click:function(f){var e=false;this.handle.each(function(){if(this==f.target)e=true});if(!(e||this.options.disabled||!(this.currentHandle||this.previousHandle))){!this.currentHandle&&this.previousHandle&&
this.focus(this.previousHandle,true);this.offset=this.element.offset();this.moveTo({y:this.convertValue(f.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this.convertValue(f.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance)}},createRange:function(){if(!this.rangeElement){this.rangeElement=b("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this.updateRange()}},removeRange:function(){this.rangeElement.remove();
this.rangeElement=null},updateRange:function(){var f=this.options.axis=="vertical"?"top":"left",e=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(f,(parseInt(b(this.handle[0]).css(f),10)||0)+this.handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(e,(parseInt(b(this.handle[1]).css(f),10)||0)-(parseInt(b(this.handle[0]).css(f),10)||0))},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?
"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null},handleIndex:function(){return this.handle.index(this.currentHandle[0])},value:function(f,e){if(this.handle.length==1)this.currentHandle=this.handle;e||(e=this.options.axis=="vertical"?"y":"x");var a=b(f!=undefined&&f!==null?this.handle[f]||f:this.currentHandle);return a.data("mouse").sliderValue?parseInt(a.data("mouse").sliderValue[e],10):parseInt(parseInt(a.css(e=="x"?"left":"top"),10)/(this.actualSize[e=="x"?"width":"height"]-this.handleSize(f,
e))*this.options.realMax[e]+this.options.min[e],10)},convertValue:function(f,e){return this.options.min[e]+f/(this.actualSize[e=="x"?"width":"height"]-this.handleSize(null,e))*this.options.realMax[e]},translateValue:function(f,e){return(f-this.options.min[e])/this.options.realMax[e]*(this.actualSize[e=="x"?"width":"height"]-this.handleSize(null,e))},translateRange:function(f,e){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&f>=this.translateValue(this.value(1),e))f=this.translateValue(this.value(1,
e)-this.oneStep(e),e);if(this.currentHandle[0]==this.handle[1]&&f<=this.translateValue(this.value(0),e))f=this.translateValue(this.value(0,e)+this.oneStep(e),e)}if(this.options.handles){var a=this.options.handles[this.handleIndex()];if(f<this.translateValue(a.min,e))f=this.translateValue(a.min,e);else if(f>this.translateValue(a.max,e))f=this.translateValue(a.max,e)}return f},translateLimits:function(f,e){if(f>=this.actualSize[e=="x"?"width":"height"]-this.handleSize(null,e))f=this.actualSize[e=="x"?
"width":"height"]-this.handleSize(null,e);if(f<=0)f=0;return f},handleSize:function(f,e){return b(f!=undefined&&f!==null?this.handle[f]:this.currentHandle)[0]["offset"+(e=="x"?"Width":"Height")]},oneStep:function(f){return this.options.stepping[f]||1},start:function(f,e){if(this.options.disabled)return false;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.currentHandle||this.focus(this.previousHandle,true);this.offset=this.element.offset();this.handleOffset=
this.currentHandle.offset();this.clickOffset={top:f.pageY-this.handleOffset.top,left:f.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate("start",f);this.drag(f,e);return true},stop:function(f){this.propagate("stop",f);this.firstValue!=this.value()&&this.propagate("change",f);this.focus(this.currentHandle,true);return false},drag:function(f){var e=this.options,a={top:f.pageY-this.offset.top-this.clickOffset.top,left:f.pageX-this.offset.left-this.clickOffset.left};this.currentHandle||
this.focus(this.previousHandle,true);a.left=this.translateLimits(a.left,"x");a.top=this.translateLimits(a.top,"y");if(e.stepping.x){var d=this.convertValue(a.left,"x");d=Math.round(d/e.stepping.x)*e.stepping.x;a.left=this.translateValue(d,"x")}if(e.stepping.y){d=this.convertValue(a.top,"y");d=Math.round(d/e.stepping.y)*e.stepping.y;a.top=this.translateValue(d,"y")}a.left=this.translateRange(a.left,"x");a.top=this.translateRange(a.top,"y");e.axis!="vertical"&&this.currentHandle.css({left:a.left});
e.axis!="horizontal"&&this.currentHandle.css({top:a.top});this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(a.left,"x"))||0,y:Math.round(this.convertValue(a.top,"y"))||0};this.rangeElement&&this.updateRange();this.propagate("slide",f);return false},moveTo:function(f,e,a){var d=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(e==undefined&&!this.currentHandle&&this.handle.length!=1)return false;if(e==undefined&&!this.currentHandle)e=
0;if(e!=undefined)this.currentHandle=this.previousHandle=b(this.handle[e]||e);if(f.x!==undefined&&f.y!==undefined){e=f.x;f=f.y}else f=e=f;if(e!==undefined&&e.constructor!=Number){var c=/^\-\=/.test(e),h=/^\+\=/.test(e);e=c||h?this.value(null,"x")+parseInt(e.replace(c?"=":"+=",""),10):isNaN(parseInt(e,10))?undefined:parseInt(e,10)}if(f!==undefined&&f.constructor!=Number){c=/^\-\=/.test(f);h=/^\+\=/.test(f);f=c||h?this.value(null,"y")+parseInt(f.replace(c?"=":"+=",""),10):isNaN(parseInt(f,10))?undefined:
parseInt(f,10)}if(d.axis!="vertical"&&e!==undefined){if(d.stepping.x)e=Math.round(e/d.stepping.x)*d.stepping.x;e=this.translateValue(e,"x");e=this.translateLimits(e,"x");e=this.translateRange(e,"x");d.animate?this.currentHandle.stop().animate({left:e},Math.abs(parseInt(this.currentHandle.css("left"))-e)*(!isNaN(parseInt(d.animate))?d.animate:5)):this.currentHandle.css({left:e})}if(d.axis!="horizontal"&&f!==undefined){if(d.stepping.y)f=Math.round(f/d.stepping.y)*d.stepping.y;f=this.translateValue(f,
"y");f=this.translateLimits(f,"y");f=this.translateRange(f,"y");d.animate?this.currentHandle.stop().animate({top:f},Math.abs(parseInt(this.currentHandle.css("top"))-f)*(!isNaN(parseInt(d.animate))?d.animate:5)):this.currentHandle.css({top:f})}this.rangeElement&&this.updateRange();this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(e,"x"))||0,y:Math.round(this.convertValue(f,"y"))||0};if(!a){this.propagate("start",null);this.propagate("stop",null);this.propagate("change",null);
this.propagate("slide",null)}}});b.ui.slider.getter="value";b.ui.slider.defaults={handle:".ui-slider-handle",distance:1,animate:false}})(jQuery);
(function(b){b.widget("ui.tabs",{init:function(){this.options.event+=".tabs";this.tabify(true)},setData:function(f,e){if(/^selected/.test(f))this.select(e);else{this.options[f]=e;this.tabify()}},length:function(){return this.$tabs.length},tabId:function(f){return f.title&&f.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+b.data(f)},ui:function(f,e){return{options:this.options,tab:f,panel:e,index:this.$tabs.index(f)}},tabify:function(f){function e(u,w,v){w.animate(j,
j.duration||q,function(){w.addClass(c.hideClass).css(x);if(b.browser.msie&&j.opacity)w[0].style.filter="";v&&a(u,v,w)})}function a(u,w){l===n&&w.css("display","block");w.animate(l,l.duration||q,function(){w.removeClass(c.hideClass).css(x);if(b.browser.msie&&l.opacity)w[0].style.filter="";b(d.element).triggerHandler("tabsshow",[d.fakeEvent("tabsshow"),d.ui(u,w[0])],c.show)})}this.$lis=b("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return b("a",this)[0]});this.$panels=b([]);var d=
this,c=this.options;this.$tabs.each(function(u,w){if(w.hash&&w.hash.replace("#",""))d.$panels=d.$panels.add(w.hash);else if(b(w).attr("href")!="#"){b.data(w,"href.tabs",w.href);b.data(w,"load.tabs",w.href);var v=d.tabId(w);w.href="#"+v;var B=b("#"+v);if(!B.length){B=b(c.panelTemplate).attr("id",v).addClass(c.panelClass).insertAfter(d.$panels[u-1]||d.element);B.data("destroy.tabs",true)}d.$panels=d.$panels.add(B)}else c.disabled.push(u+1)});if(f){this.element.addClass(c.navClass);this.$panels.each(function(){b(this).addClass(c.panelClass)});
if(c.selected===undefined)if(location.hash)this.$tabs.each(function(u,w){if(w.hash==location.hash){c.selected=u;if(b.browser.msie||b.browser.opera){var v=b(location.hash),B=v.attr("id");v.attr("id","");setTimeout(function(){v.attr("id",B)},500)}scrollTo(0,0);return false}});else if(c.cookie){if((f=parseInt(b.cookie("ui-tabs"+b.data(d.element)),10))&&d.$tabs[f])c.selected=f}else if(d.$lis.filter("."+c.selectedClass).length)c.selected=d.$lis.index(d.$lis.filter("."+c.selectedClass)[0]);c.selected=c.selected===
null||c.selected!==undefined?c.selected:0;c.disabled=b.unique(c.disabled.concat(b.map(this.$lis.filter("."+c.disabledClass),function(u){return d.$lis.index(u)}))).sort();b.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(b.inArray(c.selected,c.disabled),1);this.$panels.addClass(c.hideClass);this.$lis.removeClass(c.selectedClass);if(c.selected!==null){this.$panels.eq(c.selected).show().removeClass(c.hideClass);this.$lis.eq(c.selected).addClass(c.selectedClass);b.data(this.$tabs[c.selected],"load.tabs")||
b(d.element).triggerHandler("tabsshow",[d.fakeEvent("tabsshow"),d.ui(d.$tabs[c.selected],d.$panels[c.selected])],c.show)}b(window).bind("unload",function(){d.$tabs.unbind(".tabs");d.$lis=d.$tabs=d.$panels=null})}f=0;for(var h;h=this.$lis[f];f++)b(h)[b.inArray(f,c.disabled)!=-1&&!b(h).hasClass(c.selectedClass)?"addClass":"removeClass"](c.disabledClass);c.cache===false&&this.$tabs.removeData("cache.tabs");var j,l,n={"min-width":0,duration:1},q="normal";if(c.fx&&c.fx.constructor==Array){j=c.fx[0]||n;
l=c.fx[1]||n}else j=l=c.fx||n;var x={display:"",overflow:"",height:""};if(!b.browser.msie)x.opacity="";this.$tabs.unbind(".tabs").bind(c.event,function(){var u=b(this).parents("li:eq(0)"),w=d.$panels.filter(":visible"),v=b(this.hash);if(u.hasClass(c.selectedClass)&&!c.unselect||u.hasClass(c.disabledClass)||b(this).hasClass(c.loadingClass)||b(d.element).triggerHandler("tabsselect",[d.fakeEvent("tabsselect"),d.ui(this,v[0])],c.select)===false){this.blur();return false}d.options.selected=d.$tabs.index(this);
if(c.unselect)if(u.hasClass(c.selectedClass)){d.options.selected=null;u.removeClass(c.selectedClass);d.$panels.stop();e(this,w);this.blur();return false}else if(!w.length){d.$panels.stop();var B=this;d.load(d.$tabs.index(this),function(){u.addClass(c.selectedClass).addClass(c.unselectClass);a(B,v)});this.blur();return false}c.cookie&&b.cookie("ui-tabs"+b.data(d.element),d.options.selected,c.cookie);d.$panels.stop();if(v.length){B=this;d.load(d.$tabs.index(this),w.length?function(){var D=B;u.addClass(c.selectedClass).siblings().removeClass(c.selectedClass);
e(D,w,v)}:function(){u.addClass(c.selectedClass);a(B,v)})}else throw"jQuery UI Tabs: Mismatching fragment identifier.";b.browser.msie&&this.blur();return false});/^click/.test(c.event)||this.$tabs.bind("click.tabs",function(){return false})},add:function(f,e,a){if(a==undefined)a=this.$tabs.length;var d=this.options;e=b(d.tabTemplate.replace(/#\{href\}/g,f).replace(/#\{label\}/g,e));e.data("destroy.tabs",true);f=f.indexOf("#")==0?f.replace("#",""):this.tabId(b("a:first-child",e)[0]);var c=b("#"+f);
c.length||(c=b(d.panelTemplate).attr("id",f).addClass(d.hideClass).data("destroy.tabs",true));c.addClass(d.panelClass);if(a>=this.$lis.length){e.appendTo(this.element);c.appendTo(this.element[0].parentNode)}else{e.insertBefore(this.$lis[a]);c.insertBefore(this.$panels[a])}d.disabled=b.map(d.disabled,function(h){return h>=a?++h:h});this.tabify();if(this.$tabs.length==1){e.addClass(d.selectedClass);c.removeClass(d.hideClass);(e=b.data(this.$tabs[0],"load.tabs"))&&this.load(a,e)}this.element.triggerHandler("tabsadd",
[this.fakeEvent("tabsadd"),this.ui(this.$tabs[a],this.$panels[a])],d.add)},remove:function(f){var e=this.options,a=this.$lis.eq(f).remove(),d=this.$panels.eq(f).remove();if(a.hasClass(e.selectedClass)&&this.$tabs.length>1)this.select(f+(f+1<this.$tabs.length?1:-1));e.disabled=b.map(b.grep(e.disabled,function(c){return c!=f}),function(c){return c>=f?--c:c});this.tabify();this.element.triggerHandler("tabsremove",[this.fakeEvent("tabsremove"),this.ui(a.find("a")[0],d[0])],e.remove)},enable:function(f){var e=
this.options;if(b.inArray(f,e.disabled)!=-1){var a=this.$lis.eq(f).removeClass(e.disabledClass);if(b.browser.safari){a.css("display","inline-block");setTimeout(function(){a.css("display","block")},0)}e.disabled=b.grep(e.disabled,function(d){return d!=f});this.element.triggerHandler("tabsenable",[this.fakeEvent("tabsenable"),this.ui(this.$tabs[f],this.$panels[f])],e.enable)}},disable:function(f){var e=this.options;if(f!=e.selected){this.$lis.eq(f).addClass(e.disabledClass);e.disabled.push(f);e.disabled.sort();
this.element.triggerHandler("tabsdisable",[this.fakeEvent("tabsdisable"),this.ui(this.$tabs[f],this.$panels[f])],e.disable)}},select:function(f){if(typeof f=="string")f=this.$tabs.index(this.$tabs.filter("[href$="+f+"]")[0]);this.$tabs.eq(f).trigger(this.options.event)},load:function(f,e){var a=this,d=this.options,c=this.$tabs.eq(f),h=c[0],j=e==undefined||e===false,l=c.data("load.tabs");e=e||function(){};if(!l||!j&&b.data(h,"cache.tabs"))e();else{var n=function(u){u=b(u);var w=u.find("*:last");return w.length&&
w.is(":not(img)")&&w||u},q=function(){a.$tabs.filter("."+d.loadingClass).removeClass(d.loadingClass).each(function(){d.spinner&&n(this).parent().html(n(this).data("label.tabs"))});a.xhr=null};if(d.spinner){j=n(h).html();n(h).wrapInner("<em></em>").find("em").data("label.tabs",j).html(d.spinner)}var x=b.extend({},d.ajaxOptions,{url:l,success:function(u,w){b(h.hash).html(u);q();d.cache&&b.data(h,"cache.tabs",true);b(a.element).triggerHandler("tabsload",[a.fakeEvent("tabsload"),a.ui(a.$tabs[f],a.$panels[f])],
d.load);d.ajaxOptions.success&&d.ajaxOptions.success(u,w);e()}});if(this.xhr){this.xhr.abort();q()}c.addClass(d.loadingClass);setTimeout(function(){a.xhr=b.ajax(x)},0)}},url:function(f,e){this.$tabs.eq(f).removeData("cache.tabs").data("load.tabs",e)},destroy:function(){var f=this.options;this.element.unbind(".tabs").removeClass(f.navClass).removeData("tabs");this.$tabs.each(function(){var e=b.data(this,"href.tabs");if(e)this.href=e;var a=b(this).unbind(".tabs");b.each(["href","load","cache"],function(d,
c){a.removeData(c+".tabs")})});this.$lis.add(this.$panels).each(function(){b.data(this,"destroy.tabs")?b(this).remove():b(this).removeClass([f.selectedClass,f.unselectClass,f.disabledClass,f.panelClass,f.hideClass].join(" "))})},fakeEvent:function(f){return b.event.fix({type:f,target:this.element[0]})}});b.ui.tabs.defaults={unselect:false,event:"click",disabled:[],cookie:null,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',
panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",unselectClass:"ui-tabs-unselect",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"};b.ui.tabs.getter="length";b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(f,e){function a(){c.rotation=setInterval(function(){h=++h<c.$tabs.length?h:0;c.select(h)},f)}function d(j){if(!j||j.clientX)clearInterval(c.rotation)}e=e||false;var c=this,h=this.options.selected;
if(f){a();e?this.$tabs.bind(this.options.event,function(){d();h=c.options.selected;a()}):this.$tabs.bind(this.options.event,d)}else{d();this.$tabs.unbind(this.options.event,d)}}})})(jQuery);
(function(b){b.fn.extend({_offset:b.fn.offset,offset:function(f){return f?this.setXY(f):this._offset()},setXY:function(f){return this.each(function(){var e=false;if(b(this).css("display")=="none"){e=true;b(this).show()}var a=b(this).css("position");if(a=="static"){b(this).css("position","relative");a="relative"}var d=b(this).offset();if(d){var c={left:parseInt(b(this).css("left"),10),top:parseInt(b(this).css("top"),10)};if(isNaN(c.left))c.left=a=="relative"?0:this.offsetLeft;if(isNaN(c.top))c.top=
a=="relative"?0:this.offsetTop;if(f.left||f.left===0)b(this).css("left",f.left-d.left+c.left+"px");if(f.top||f.top===0)b(this).css("top",f.top-d.top+c.top+"px")}e&&b(this).hide()})}})})(jQuery);
jQuery.fn.DefaultValue=function(b,f,e){return this.each(function(){if(!(this.type!="text"&&this.type!="password"&&this.type!="textarea")){var a=this;if(this.value==""){this.value=b;jQuery(this).css("color",f);jQuery(this).focus(function(){if(this.value==b||this.value==""){this.value="";jQuery(this).css("color",e)}});jQuery(this).blur(function(){if(this.value==b||this.value==""){this.value=b;jQuery(this).css("color",f)}});jQuery(this).parents("form").each(function(){jQuery(this).submit(function(){if(a.value==
b)a.value=""})})}}})};jQuery.fn.extend({everyTime:function(b,f,e,a){return this.each(function(){jQuery.timer.add(this,b,f,e,a)})},oneTime:function(b,f,e){return this.each(function(){jQuery.timer.add(this,b,f,e,1)})},stopTime:function(b,f){return this.each(function(){jQuery.timer.remove(this,b,f)})}});
jQuery.extend({timer:{global:[],guid:1,dataKey:"jQuery.timer",regex:/^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,powers:{ms:1,cs:10,ds:100,s:1E3,das:1E4,hs:1E5,ks:1E6},timeParse:function(b){if(b==undefined||b==null)return null;var f=this.regex.exec(jQuery.trim(b.toString()));return f[2]?parseFloat(f[1])*(this.powers[f[2]]||1):b},add:function(b,f,e,a,d){var c=0;if(jQuery.isFunction(e)){d||(d=a);a=e;e=f}f=jQuery.timer.timeParse(f);if(!(typeof f!="number"||isNaN(f)||f<0)){if(typeof d!="number"||isNaN(d)||d<0)d=
0;d=d||0;var h=jQuery.data(b,this.dataKey)||jQuery.data(b,this.dataKey,{});h[e]||(h[e]={});a.timerID=a.timerID||this.guid++;var j=function(){if(++c>d&&d!==0||a.call(b,c)===false)jQuery.timer.remove(b,e,a)};j.timerID=a.timerID;h[e][a.timerID]||(h[e][a.timerID]=window.setInterval(j,f));this.global.push(b)}},remove:function(b,f,e){var a=jQuery.data(b,this.dataKey),d;if(a){if(f){if(a[f]){if(e){if(e.timerID){window.clearInterval(a[f][e.timerID]);delete a[f][e.timerID]}}else for(e in a[f]){window.clearInterval(a[f][e]);
delete a[f][e]}for(d in a[f])break;if(!d){d=null;delete a[f]}}}else for(f in a)this.remove(b,f,e);for(d in a)break;d||jQuery.removeData(b,this.dataKey)}}}});jQuery(window).bind("unload",function(){jQuery.each(jQuery.timer.global,function(b,f){jQuery.timer.remove(f)})});
(function(b){b.fn.jqm=function(u){var w={overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:c,ajaxText:"",target:c,modal:c,toTop:c,onShow:c,onHide:c,onLoad:c};return this.each(function(){if(this._jqm)return e[this._jqm].c=b.extend({},e[this._jqm].c,u);f++;this._jqm=f;e[f]={c:b.extend(w,b.jqm.params,u),a:c,w:b(this).addClass("jqmID"+f),s:f};w.trigger&&b(this).jqmAddTrigger(w.trigger)})};b.fn.jqmAddClose=function(u){return x(this,u,"jqmHide")};b.fn.jqmAddTrigger=function(u){return x(this,
u,"jqmShow")};b.fn.jqmShow=function(u){return this.each(function(){u=u||window.event;b.jqm.open(this._jqm,u)})};b.fn.jqmHide=function(u){return this.each(function(){u=u||window.event;b.jqm.close(this._jqm,u)})};b.jqm={hash:{},open:function(u,w){var v=e[u],B=v.c,D="."+B.closeClass,H=parseInt(v.w.css("z-index"));H=H>0?H:3E3;var C=b("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":H-1,opacity:B.overlay/100});if(v.a)return c;v.t=w;v.a=true;v.w.css("z-index",H);if(B.modal){a[0]||
n("bind");a.push(u)}else if(B.overlay>0)v.w.jqmAddClose(C);else C=c;v.o=C?C.addClass(B.overlayClass).prependTo("body"):c;if(d){b("html,body").css({height:"100%",width:"100%"});if(C){C=C.css({position:"absolute"})[0];for(var M in{Top:1,Left:1})C.style.setExpression(M.toLowerCase(),"(_=(document.documentElement.scroll"+M+" || document.body.scroll"+M+"))+'px'")}}if(B.ajax){H=B.target||v.w;C=B.ajax;H=typeof H=="string"?b(H,v.w):b(H);C=C.substr(0,1)=="@"?b(w).attr(C.substring(1)):C;H.html(B.ajaxText).load(C,
function(){B.onLoad&&B.onLoad.call(this,v);D&&v.w.jqmAddClose(b(D,v.w));j(v)})}else D&&v.w.jqmAddClose(b(D,v.w));B.toTop&&v.o&&v.w.before('<span id="jqmP'+v.w[0]._jqm+'"></span>').insertAfter(v.o);B.onShow?B.onShow(v):v.w.show();j(v);return c},close:function(u){u=e[u];if(!u.a)return c;u.a=c;if(a[0]){a.pop();a[0]||n("unbind")}u.c.toTop&&u.o&&b("#jqmP"+u.w[0]._jqm).after(u.w).remove();if(u.c.onHide)u.c.onHide(u);else{u.w.hide();u.o&&u.o.remove()}return c},params:{}};var f=0,e=b.jqm.hash,a=[],d=b.browser.msie&&
b.browser.version=="6.0",c=false,h=b('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),j=function(u){if(d)if(u.o)u.o.html('<p style="width:100%;height:100%"/>').prepend(h);else b("iframe.jqm",u.w)[0]||u.w.prepend(h);l(u)},l=function(u){try{b(":input:visible",u.w)[0].focus()}catch(w){}},n=function(u){b()[u]("keypress",q)[u]("keydown",q)[u]("mousedown",q)},q=function(u){var w=e[a[a.length-1]];(u=!b(u.target).parents(".jqmID"+w.s)[0])&&l(w);return!u},x=function(u,
w,v){return u.each(function(){var B=this._jqm;b(w).each(function(){if(!this[v]){this[v]=[];b(this).click(function(){for(var D in{jqmShow:1,jqmHide:1})for(var H in this[D])e[this[D][H]]&&e[this[D][H]].w[D](this);return c})}this[v].push(B)})})}})(jQuery);
(function(b){function f(a){return typeof a=="object"?a:{top:a,left:a}}var e=b.scrollTo=function(a,d,c){b(window).scrollTo(a,d,c)};e.defaults={axis:"y",duration:1};e.window=function(){return b(window).scrollable()};b.fn.scrollable=function(){return this.map(function(){var a=this.parentWindow||this.defaultView;a=this.nodeName=="#document"?a.frameElement||a:this;var d=a.contentDocument||(a.contentWindow||a).document,c=a.setInterval;return a.nodeName=="IFRAME"||c&&b.browser.safari?d.body:c?d.documentElement:
this})};b.fn.scrollTo=function(a,d,c){if(typeof d=="object"){c=d;d=0}if(typeof c=="function")c={onAfter:c};c=b.extend({},e.defaults,c);d=d||c.speed||c.duration;c.queue=c.queue&&c.axis.length>1;if(c.queue)d/=2;c.offset=f(c.offset);c.over=f(c.over);return this.scrollable().each(function(){function h(v){n.animate(u,d,c.easing,v&&function(){v.call(this,a,c)})}function j(v){v="scroll"+v;var B=l.ownerDocument;return w?Math.max(B.documentElement[v],B.body[v]):l[v]}var l=this,n=b(l),q=a,x,u={},w=n.is("html,body");
switch(typeof q){case "number":case "string":if(/^([+-]=)?\d+(px)?$/.test(q)){q=f(q);break}q=b(q,this);case "object":if(q.is||q.style)x=(q=b(q)).offset()}b.each(c.axis.split(""),function(v,B){var D=B=="x"?"Left":"Top",H=D.toLowerCase(),C="scroll"+D,M=l[C],E=B=="x"?"Width":"Height",I=E.toLowerCase();if(x){u[C]=x[H]+(w?0:M-n.offset()[H]);if(c.margin){u[C]-=parseInt(q.css("margin"+D))||0;u[C]-=parseInt(q.css("border"+D+"Width"))||0}u[C]+=c.offset[H]||0;if(c.over[H])u[C]+=q[I]()*c.over[H]}else u[C]=q[H];
if(/^\d+$/.test(u[C]))u[C]=u[C]<=0?0:Math.min(u[C],j(E));if(!v&&c.queue){M!=u[C]&&h(c.onAfterFirst);delete u[C]}});h(c.onAfter)}).end()}})(jQuery);
(function(b){b.fn.extend({autocomplete:function(f,e){var a=typeof f=="string";e=b.extend({},b.Autocompleter.defaults,{url:a?f:null,data:a?null:f,delay:a?b.Autocompleter.defaults.delay:10,max:e&&!e.scroll?10:150},e);e.highlight=e.highlight||function(d){return d};e.formatMatch=e.formatMatch||e.formatItem;return this.each(function(){new b.Autocompleter(this,e)})},result:function(f){return this.bind("result",f)},search:function(f){return this.trigger("search",[f])},flushCache:function(){return this.trigger("flushCache")},
setOptions:function(f){return this.trigger("setOptions",[f])},unautocomplete:function(){return this.trigger("unautocomplete")}});b.Autocompleter=function(f,e){function a(){var E=C.selected();if(!E)return false;var I=E.result;w=I;if(e.multiple){var N=c(x.val());if(N.length>1)I=N.slice(0,N.length-1).join(e.multipleSeparator)+e.multipleSeparator+I;I+=e.multipleSeparator}x.val(I);j();x.trigger("result",[E.data,E.value]);return true}function d(E,I){if(D==q.DEL)C.hide();else{var N=x.val();if(!(!I&&N==w)){w=
N;N=h(N);if(N.length>=e.minChars){x.addClass(e.loadingClass);e.matchCase||(N=N.toLowerCase());n(N,l,j)}else{x.removeClass(e.loadingClass);C.hide()}}}}function c(E){if(!E)return[""];E=E.split(e.multipleSeparator);var I=[];b.each(E,function(N,O){if(b.trim(O))I[N]=b.trim(O)});return I}function h(E){if(!e.multiple)return E;E=c(E);return E[E.length-1]}function j(){var E=C.visible();C.hide();clearTimeout(u);x.removeClass(e.loadingClass);e.mustMatch&&x.search(function(I){if(!I)if(e.multiple){I=c(x.val()).slice(0,
-1);x.val(I.join(e.multipleSeparator)+(I.length?e.multipleSeparator:""))}else x.val("")});E&&b.Autocompleter.Selection(f,f.value.length,f.value.length)}function l(E,I){if(I&&I.length&&B){x.removeClass(e.loadingClass);C.display(I,E);var N=I[0].value;if(e.autoFill&&h(x.val()).toLowerCase()==E.toLowerCase()&&D!=q.BACKSPACE){x.val(x.val()+N.substring(h(w).length));b.Autocompleter.Selection(f,w.length,w.length+N.length)}C.show()}else j()}function n(E,I,N){e.matchCase||(E=E.toLowerCase());var O=v.load(E);
if(O&&O.length)I(E,O);else if(typeof e.url=="string"&&e.url.length>0){var g={timestamp:+new Date};b.each(e.extraParams,function(i,k){g[i]=typeof k=="function"?k():k});b.ajax({mode:"abort",port:"autocomplete"+f.name,dataType:e.dataType,url:e.url,data:b.extend({q:h(E),limit:e.max},g),success:function(i){var k;if(!(k=e.parse&&e.parse(i))){k=[];i=i.split("\n");for(var o=0;o<i.length;o++){var t=b.trim(i[o]);if(t){t=t.split("|");k[k.length]={data:t,value:t[0],result:e.formatResult&&e.formatResult(t,t[0])||
t[0]}}}k=k}k=k;v.add(E,k);I(E,k)}})}else{C.emptyList();N(E)}}var q={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},x=b(f).attr("autocomplete","off").addClass(e.inputClass),u,w="",v=b.Autocompleter.Cache(e),B=0,D,H={mouseDownOnSelect:false},C=b.Autocompleter.Select(e,f,a,H),M;b.browser.opera&&b(f.form).bind("submit.autocomplete",function(){if(M)return M=false});x.bind((b.browser.opera?"keypress":"keydown")+".autocomplete",function(E){D=E.keyCode;switch(E.keyCode){case q.UP:E.preventDefault();
C.visible()?C.prev():d(0,true);break;case q.DOWN:E.preventDefault();C.visible()?C.next():d(0,true);break;case q.PAGEUP:E.preventDefault();C.visible()?C.pageUp():d(0,true);break;case q.PAGEDOWN:E.preventDefault();C.visible()?C.pageDown():d(0,true);break;case e.multiple&&b.trim(e.multipleSeparator)==","&&q.COMMA:case q.TAB:case q.RETURN:if(a()){E.preventDefault();M=true;return false}break;case q.ESC:C.hide();break;default:clearTimeout(u);u=setTimeout(d,e.delay);break}}).focus(function(){B++}).blur(function(){B=
0;if(!H.mouseDownOnSelect){clearTimeout(u);u=setTimeout(j,200)}}).click(function(){B++>1&&!C.visible()&&d(0,true)}).bind("search",function(){function E(N,O){var g;if(O&&O.length)for(var i=0;i<O.length;i++)if(O[i].result.toLowerCase()==N.toLowerCase()){g=O[i];break}typeof I=="function"?I(g):x.trigger("result",g&&[g.data,g.value])}var I=arguments.length>1?arguments[1]:null;b.each(c(x.val()),function(N,O){n(O,E,E)})}).bind("flushCache",function(){v.flush()}).bind("setOptions",function(E,I){b.extend(e,
I);"data"in I&&v.populate()}).bind("unautocomplete",function(){C.unbind();x.unbind();b(f.form).unbind(".autocomplete")})};b.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(f){return f[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(f,
e){return f.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+e.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};b.Autocompleter.Cache=function(f){function e(l,n){f.matchCase||(l=l.toLowerCase());var q=l.indexOf(n);if(f.matchContains=="word")q=l.toLowerCase().search("\\b"+n.toLowerCase());if(q==-1)return false;return q==0||f.matchContains}function a(l,n){j>f.cacheLength&&c();h[l]||j++;h[l]=n}function d(){if(!f.data)return false;
var l={},n=0;if(!f.url)f.cacheLength=1;l[""]=[];for(var q=0,x=f.data.length;q<x;q++){var u=f.data[q];u=typeof u=="string"?[u]:u;var w=f.formatMatch(u,q+1,f.data.length);if(w!==false){var v=w.charAt(0).toLowerCase();l[v]||(l[v]=[]);u={value:w,data:u,result:f.formatResult&&f.formatResult(u)||w};l[v].push(u);n++<f.max&&l[""].push(u)}}b.each(l,function(B,D){f.cacheLength++;a(B,D)})}function c(){h={};j=0}var h={},j=0;setTimeout(d,25);return{flush:c,add:a,populate:d,load:function(l){if(!f.cacheLength||
!j)return null;if(!f.url&&f.matchContains){var n=[];for(var q in h)if(q.length>0){var x=h[q];b.each(x,function(u,w){e(w.value,l)&&n.push(w)})}return n}else if(h[l])return h[l];else if(f.matchSubset)for(q=l.length-1;q>=f.minChars;q--)if(x=h[l.substr(0,q)]){n=[];b.each(x,function(u,w){if(e(w.value,l))n[n.length]=w});return n}return null}}};b.Autocompleter.Select=function(f,e,a,d){function c(){if(w){v=b("<div/>").hide().addClass(f.resultsClass).css("position","absolute").appendTo(document.body);B=b("<ul/>").appendTo(v).mouseover(function(D){if(h(D).nodeName&&
h(D).nodeName.toUpperCase()=="LI"){q=b("li",B).removeClass(l.ACTIVE).index(h(D));b(h(D)).addClass(l.ACTIVE)}}).click(function(D){b(h(D)).addClass(l.ACTIVE);a();e.focus();return false}).mousedown(function(){d.mouseDownOnSelect=true}).mouseup(function(){d.mouseDownOnSelect=false});f.width>0&&v.css("width",f.width);w=false}}function h(D){for(D=D.target;D&&D.tagName!="LI";)D=D.parentNode;if(!D)return[];return D}function j(D){n.slice(q,q+1).removeClass(l.ACTIVE);q+=D;if(q<0)q=n.size()-1;else if(q>=n.size())q=
0;D=n.slice(q,q+1).addClass(l.ACTIVE);if(f.scroll){var H=0;n.slice(0,q).each(function(){H+=this.offsetHeight});if(H+D[0].offsetHeight-B.scrollTop()>B[0].clientHeight)B.scrollTop(H+D[0].offsetHeight-B.innerHeight());else H<B.scrollTop()&&B.scrollTop(H)}}var l={ACTIVE:"ac_over"},n,q=-1,x,u="",w=true,v,B;return{display:function(D,H){c();x=D;u=H;B.empty();for(var C=f.max&&f.max<x.length?f.max:x.length,M=0;M<C;M++)if(x[M]){var E=f.formatItem(x[M].data,M+1,C,x[M].value,u);if(E!==false){E=b("<li/>").html(f.highlight(E,
u)).addClass(M%2==0?"ac_even":"ac_odd").appendTo(B)[0];b.data(E,"ac_data",x[M])}}n=B.find("li");if(f.selectFirst){n.slice(0,1).addClass(l.ACTIVE);q=0}b.fn.bgiframe&&B.bgiframe()},next:function(){j(1)},prev:function(){j(-1)},pageUp:function(){q!=0&&q-8<0?j(-q):j(-8)},pageDown:function(){q!=n.size()-1&&q+8>n.size()?j(n.size()-1-q):j(8)},hide:function(){v&&v.hide();n&&n.removeClass(l.ACTIVE);q=-1},visible:function(){return v&&v.is(":visible")},current:function(){return this.visible()&&(n.filter("."+
l.ACTIVE)[0]||f.selectFirst&&n[0])},show:function(){var D=b(e).offset();v.css({width:typeof f.width=="string"||f.width>0?f.width:b(e).width(),top:D.top+e.offsetHeight,left:D.left}).show();if(f.scroll){B.scrollTop(0);B.css({maxHeight:f.scrollHeight,overflow:"auto"});if(b.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var H=0;n.each(function(){H+=this.offsetHeight});D=H>f.scrollHeight;B.css("height",D?f.scrollHeight:H);D||n.width(B.width()-parseInt(n.css("padding-left"))-parseInt(n.css("padding-right")))}}},
selected:function(){var D=n&&n.filter("."+l.ACTIVE).removeClass(l.ACTIVE);return D&&D.length&&b.data(D[0],"ac_data")},emptyList:function(){B&&B.empty()},unbind:function(){v&&v.remove()}}};b.Autocompleter.Selection=function(f,e,a){if(f.createTextRange){var d=f.createTextRange();d.collapse(true);d.moveStart("character",e);d.moveEnd("character",a);d.select()}else if(f.setSelectionRange)f.setSelectionRange(e,a);else if(f.selectionStart){f.selectionStart=e;f.selectionEnd=a}f.focus()}})(jQuery);
jQuery(function(b){function f(p){if(!(s.loadingShown||s.transition||s.anim)){r("processModal");s.started=true;e(p);s.error=false;s.closing=false;s.dataReady=false;s.scripts=[];m.type=q();b.isFunction(m.processHandler)&&m.processHandler(m);from=m.from;url=m.url;if(m.type=="swf"){m.resizable=false;a({overflow:"hidden"},"css","content");m.content='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+m.width+'" height="'+m.height+'"><param name="movie" value="'+url+'"></param>';var y=
"";b.each(m.swf,function(Q,R){m.content+='<param name="'+Q+'" value="'+R+'"></param>';y+=" "+Q+'="'+R+'"'});m.content+='<embed src="'+url+'" type="application/x-shockwave-flash" width="'+m.width+'" height="'+m.height+'"'+y+"></embed></object>"}if(from)if(m.type=="form"){p=b(from).serializeArray();p.push({name:m.formIndicator,value:1});m.selector&&p.push({name:m.selIndicator,value:m.selector.substring(1)});b.ajax(b.extend({},m.ajax,{url:url,data:p,type:from.method,success:M,error:u}));r("Form Ajax Load: "+
from.action);l()}else if(m.type=="formData"){j();from.target="nyroModalIframe";from.action=url;b(from).prepend('<input type="hidden" name="'+m.formIndicator+'" value="1" />');m.selector&&b(from).prepend('<input type="hidden" name="'+m.selIndicator+'" value="'+m.selector.substring(1)+'" />');s.tmp.html('<iframe frameborder="0" hspace="0" name="nyroModalIframe"></iframe>');b("iframe",s.tmp).css({width:m.width,height:m.height}).error(u).load(E);r("Form Data Load: "+from.action);l();C()}else if(m.type==
"image"||m.type=="gallery"){p=from.title||m.defaultImgAlt;j();s.tmp.html('<img id="nyroModalImg" />').find("img").attr("alt",p);r("Image Load: "+url);b("img",s.tmp).error(u).load(function(){r("Image Loaded: "+this.src);b(this).unbind("load");var Q=s.tmp.width(),R=s.tmp.height();a({width:Q,height:R,imgWidth:Q,imgHeight:R});a({overflow:"hidden"},"css","content");s.dataReady=true;if(s.loadingShown||s.transition)C()}).attr("src",url);l()}else if(m.type=="iframe"){j();s.tmp.html('<iframe frameborder="0" hspace="0" src="'+
url+'" name="nyroModalIframe"></iframe>');r("Iframe Load: "+url);b("iframe",s.tmp).eq(0).css({width:"100%",height:"100%"});m.autoSizable=false;s.dataReady=true;l()}else if(m.type){r("Content: "+m.type);j();s.tmp.html(m.content);p=s.tmp.width();var J=s.tmp.height(),P=b(m.type);if(P.length){a({type:"div"});p=P.width();J=P.height();if(G)L=G;G=P;s.tmp.append(P.contents())}a({width:p,height:J});if(s.tmp.html())s.dataReady=true;else u();l();C()}else{r("Ajax Load: "+url);a({type:"ajax"});p={};if(m.selector){p=
m.ajax.data||{};p[m.selIndicator]=m.selector.substring(1)}b.ajax(b.extend({},m.ajax,{url:url,success:M,error:u,data:p}));l()}else if(m.content){r("Content: "+m.type);a({type:"manual"});j();s.tmp.html(b("<div/>").html(m.content).contents());if(s.tmp.html())s.dataReady=true;else u();l()}}}function e(p){r("setDefaultCurrentSettings");m=b.extend({},b.fn.nyroModal.settings,p);m.selector="";m.borderW=0;m.borderH=0;m.resizable=true;c()}function a(p,y,J){if(s.started)if(y&&J)b.extend(m[y][J],p);else y?b.extend(m[y],
p):b.extend(m,p);else if(y&&J)b.extend(b.fn.nyroModal.settings[y][J],p);else y?b.extend(b.fn.nyroModal.settings[y],p):b.extend(b.fn.nyroModal.settings,p)}function d(){if(z)if(document.documentElement){m.marginScrollLeft=document.documentElement.scrollLeft;m.marginScrollTop=document.documentElement.scrollTop}else{m.marginScrollLeft=document.body.scrollLeft;m.marginScrollTop=document.body.scrollTop}else{m.marginScrollLeft=0;m.marginScrollTop=0}}function c(){d();m.marginLeft=-(m.width+m.borderW)/2+m.marginScrollLeft;
m.marginTop=-(m.height+m.borderH)/2+m.marginScrollTop}function h(){d();var p=o(s.loading);m.marginTopLoading=-(s.loading.height()+p.h.border+p.h.padding)/2+m.marginScrollTop;m.marginLeftLoading=-(s.loading.width()+p.w.border+p.w.padding)/2+m.marginScrollLeft}function j(){r("initModal");if(!s.full){m.debug&&a({color:"white"},"css","bg");var p="";if(z){A.css({height:A.height()+"px",width:A.width()+"px",position:"static",overflow:"hidden"});b("html").css({overflow:"hidden"});a({position:"absolute",height:"110%",
width:"110%",top:m.marginScrollTop+"px",left:m.marginScrollLeft+"px"},"css","bg");a({position:"absolute"},"css","loading");a({position:"absolute"},"css","wrapper");p=b('<iframe id="nyroModalIframeHideIe"></iframe>').css(b.extend({},m.css.bg,{opacity:0,zIndex:50,border:"none"}))}A.append(b('<div id="nyroModalFull"><div id="nyroModalBg"></div><div id="nyroModalWrapper"><div id="nyroModalContent"></div></div><div id="nyrModalTmp"></div><div id="nyroModalLoading"></div></div>').hide());s.full=b("#nyroModalFull").show();
s.bg=b("#nyroModalBg").css(b.extend({backgroundColor:m.bgColor},m.css.bg)).before(p);m.modal||s.bg.click(H);s.loading=b("#nyroModalLoading").css(m.css.loading).hide();s.contentWrapper=b("#nyroModalWrapper").css(m.css.wrapper).hide();s.content=b("#nyroModalContent");s.tmp=b("#nyrModalTmp").hide();b.isFunction(b.fn.mousewheel)&&s.content.mousewheel(function(y,J){var P=s.content.get(0);if(J>0&&P.scrollTop==0||J<0&&P.scrollHeight-P.scrollTop==P.clientHeight){y.preventDefault();y.stopPropagation()}});
b(document).keydown(n);s.content.css({width:"auto",height:"auto"});s.contentWrapper.css({width:"auto",height:"auto"})}}function l(){r("showModal");if(s.ready){s.anim=true;s.transition=true;m.showTransition(s,m,function(){I();s.anim=false;C()})}else{j();s.anim=true;m.showBackground(s,m,O)}}function n(p){if(p.keyCode==27)m.modal||H();else if(m.type=="gallery"&&s.ready&&s.dataReady&&!s.anim&&!s.transition)if(p.keyCode==39||p.keyCode==40){p.preventDefault();b(".nyroModalNext",s.content).eq(0).trigger("click");
return false}else if(p.keyCode==37||p.keyCode==38){p.preventDefault();b(".nyroModalPrev",s.content).eq(0).trigger("click");return false}}function q(){if(m.forceType){var p=m.forceType;if(!m.content)m.from=true;m.forceType=null;return p}p=m.from;var y;if(p&&p.nodeName){m.url=y=p.nodeName.toLowerCase()=="form"?p.action:p.href;if(p.rev=="modal")m.modal=true;if(p.target&&p.target.toLowerCase()=="_blank"||p.hostname&&p.hostname.replace(/:\d*$/,"")!=window.location.hostname.replace(/:\d*$/,""))return"iframe";
else if(p.nodeName.toLowerCase()=="form"){a(x(y));if(p.enctype=="multipart/form-data")return"formData";return"form"}}else{y=m.url;if(!m.content)m.from=true;if(!y)return null;var J=RegExp("^http://","g");if(y.match(J))return"iframe"}if(RegExp(m.regexImg,"i").test(y))return p&&p.rel?"gallery":"image";if(/[^.].(swf)s*$/i.test(y))return"swf";p=x(y);a(p);if(!p.url)return p.selector}function x(p){var y={url:null,selector:null};if(p){var J=i(p),P=i(window.location.href);P=window.location.href.substring(0,
window.location.href.length-P.length);p=p.substring(0,p.length-J.length);if(p!=P)y.url=p;y.selector=J}return y}function u(){r("loadingError");s.error=true;if(s.ready){b.isFunction(m.handleError)&&m.handleError(s,m);s.loading.addClass(m.errorClass).html(m.contentError);b(m.closeSelector,s.loading).click(H);h();s.loading.css({marginTop:m.marginTopLoading+"px",marginLeft:m.marginLeftLoading+"px"})}}function w(){r("fillContent");if(s.tmp.html()){s.content.html(s.tmp.contents());s.tmp.empty();v();b.isFunction(m.endFillContent)&&
m.endFillContent(s,m);s.content.append(s.scripts);var p=b.extend({},m);if(K.width)p.width=null;if(K.height)p.height=null;b(m.closeSelector,s.contentWrapper).click(H);b(m.openSelector,s.contentWrapper).nyroModal(p)}}function v(){r("wrapContent");var p=b(m.wrap[m.type]);s.content.append(p.children().remove());s.contentWrapper.wrapInner(p);if(m.type=="gallery"){var y=B(-1);y?b(".nyroModalPrev",s.contentWrapper).attr("href",y.attr("href")).click(function(P){P.preventDefault();y.nyroModalManual(m);return false}):
b(".nyroModalPrev",s.contentWrapper).remove();var J=B(1);J?b(".nyroModalNext",s.contentWrapper).attr("href",J.attr("href")).click(function(P){P.preventDefault();J.nyroModalManual(m);return false}):b(".nyroModalNext",s.contentWrapper).remove()}D()}function B(p){if(m.type=="gallery"){m.rtl||(p*=-1);var y=b('[rel="'+m.from.rel+'"]');p=y.index(m.from)+p;if(p>=0&&p<y.length)return y.eq(p)}return false}function D(p){r("calculateSize");if(!s.wrapper)s.wrapper=s.contentWrapper.children(":first");K.width=
false;K.height=false;if(m.autoSizable&&(!m.width||!m.height)){s.contentWrapper.css({opacity:0}).show();var y={width:"auto",height:"auto"};if(m.width)y.width=m.width;if(m.height)y.height=m.height;s.content.css(y);if(!m.width){m.width=s.content.width();K.width=true}if(!m.height){m.height=s.content.height();K.height=true}s.contentWrapper.hide().css({opacity:1})}m.width=Math.max(m.width,m.minWidth);m.height=Math.max(m.height,m.minHeight);var J=o(s.contentWrapper),P=o(s.wrapper),Q=o(s.content);y={content:{width:m.width,
height:m.height},wrapper2:{width:m.width+Q.w.total,height:m.height+Q.h.total},wrapper:{width:m.width+Q.w.total+P.w.total,height:m.height+Q.h.total+P.h.total}};if(m.resizable){var R=b(window).height()-m.padding*2-J.h.border-(y.wrapper.height-m.height),S=b(window).width()-m.padding*2-J.w.border-(y.wrapper.width-m.width);if(y.content.height>R||y.content.width>S){if(m.type=="image"||m.type=="gallery"){var T=y.content.width-m.imgWidth,U=y.content.height-m.imgHeight;if(U<0)U=0;if(T<0)T=0;R=R-U;S=S-T;S=
Math.min(R/m.imgHeight,S/m.imgWidth);R=Math.floor(m.imgHeight*S);S=Math.floor(m.imgWidth*S);b("img#nyroModalImg",s.content).css({height:R+"px",width:S+"px"});y.content.height=R+U;y.content.width=S+T}else{y.content.height=Math.min(y.content.height,R);y.content.width=Math.min(y.content.width,S)}y.wrapper2={width:y.content.width+Q.w.total,height:y.content.height+Q.h.total};y.wrapper={width:y.content.width+Q.w.total+P.w.total,height:y.content.height+Q.h.total+P.h.total}}}s.content.css(b.extend({},y.content,
m.css.content));s.wrapper.css(b.extend({},y.wrapper2,m.css.wrapper2));if(!p){s.contentWrapper.css(b.extend({},y.wrapper,m.css.wrapper));if(m.type=="image"||m.type=="gallery"){p=b("img",s.content).attr("alt");b("img",s.content).removeAttr("alt");if(p!=m.defaultImgAlt){p=b("<div>"+p+"</div>");s.content.append(p);if(m.setWidthImgTitle){P=o(p);p.css({width:y.content.width+Q.w.padding-P.w.total+"px"})}}}m.modal||s.contentWrapper.prepend(m.closeButton)}y.wrapper.borderW=J.w.border;y.wrapper.borderH=J.h.border;
a(y.wrapper);c()}function H(p){r("removeModal");p&&p.preventDefault();if(s.full&&s.ready){s.ready=false;s.anim=true;s.closing=true;if(s.loadingShown||s.transition)m.hideLoading(s,m,function(){s.loading.hide();s.loadingShown=false;s.transition=false;m.hideBackground(s,m,N)});else{F&&s.content.css({position:""});s.wrapper.css({overflow:"hidden"});s.content.css({overflow:"hidden"});b.isFunction(m.beforeHideContent)?m.beforeHideContent(s,m,function(){m.hideContent(s,m,function(){I();m.hideBackground(s,
m,N)})}):m.hideContent(s,m,function(){I();m.hideBackground(s,m,N)})}}if(p)return false}function C(){r("showContentOrLoading");if(s.ready&&!s.anim)if(s.dataReady){if(s.tmp.html()){s.anim=true;if(s.transition){w();m.hideTransition(s,m,function(){s.loading.hide();s.transition=false;s.loadingShown=false;g()})}else m.hideLoading(s,m,function(){s.loading.hide();s.loadingShown=false;w();h();m.showContent(s,b.extend({},m),g)})}}else if(!s.loadingShown&&!s.transition){s.anim=true;s.loadingShown=true;s.error?
u():s.loading.html(m.contentLoading);b(m.closeSelector,s.loading).click(H);h();m.showLoading(s,m,function(){s.anim=false;C()})}}function M(p){r("AjaxLoaded: "+this.url);s.tmp.html(m.selector?k(b("<div>"+p+"</div>").find(m.selector).contents()):k(p));if(s.tmp.html()){s.dataReady=true;C()}else u()}function E(){r("formDataLoaded");m.from.action+=m.selector;m.from.target="";b("input[name="+m.formIndicator+"]",m.from).remove();var p=s.tmp.children("iframe"),y=p.unbind("load").contents().find(m.selector||
"body").not("script[src]");p.attr("src","about:blank");s.tmp.html(y.html());if(s.tmp.html()){s.dataReady=true;C()}else u()}function I(){r("endHideContent");s.anim=false;if(L){L.append(s.content.contents());L=null}else if(G){G.append(s.content.contents());G=null}s.content.empty();s.contentWrapper.empty().removeAttr("style");if(s.closing||s.transition)s.contentWrapper.hide();s.contentWrapper.css(m.css.wrapper).append(s.content);C()}function N(){r("endRemove");b(document).unbind("keydown",n);s.anim=
false;s.full.remove();s.full=null;if(z){A.css({height:"",width:"",position:"",overflow:""});b("html").css({overflow:""})}b.isFunction(m.endRemove)&&m.endRemove(s,m)}function O(){r("endBackground");s.ready=true;s.anim=false;C()}function g(){r("endShowContent");s.anim=false;s.contentWrapper.css({opacity:""});(F=b.browser.mozilla&&parseFloat(b.browser.version)<1.9&&m.type!="gallery"&&m.type!="image")&&s.content.css({position:"fixed"});b.isFunction(m.endShowContent)&&m.endShowContent(s,m);K.width&&a({width:null});
K.height&&a({height:null})}function i(p){if(typeof p=="string"){var y=p.indexOf("#");if(y>-1)return p.substring(y)}return""}function k(p){if(typeof p=="string")p=p.replace(/<\/?(html|head|body)([^>]*)>/gi,"");var y=[];b.each(b.clean({0:p},this.ownerDocument),function(){if(b.nodeName(this,"script")){if(!this.src||b(this).attr("rel")=="forceLoad")s.scripts.push(this)}else y.push(this)});return y}function o(p){p=p.get(0);p={h:{margin:t(p,"marginTop")+t(p,"marginBottom"),border:t(p,"borderTopWidth")+
t(p,"borderBottomWidth"),padding:t(p,"paddingTop")+t(p,"paddingBottom")},w:{margin:t(p,"marginLeft")+t(p,"marginRight"),border:t(p,"borderLeftWidth")+t(p,"borderRightWidth"),padding:t(p,"paddingLeft")+t(p,"paddingRight")}};p.h.outer=p.h.margin+p.h.border;p.w.outer=p.w.margin+p.w.border;p.h.inner=p.h.padding+p.h.border;p.w.inner=p.w.padding+p.w.border;p.h.total=p.h.outer+p.h.padding;p.w.total=p.w.outer+p.w.padding;return p}function t(p,y){var J=parseInt(b.curCSS(p,y,true));if(isNaN(J))J=0;return J}
function r(p){m&&m.debug&&s.full&&s.bg.prepend(p+"<br />")}var z=b.browser.msie&&parseInt(b.browser.version.substr(0,1))<7,A=b("body"),m,F=false,G,L,s={started:false,ready:false,dataReady:false,anim:false,loadingShown:false,transition:false,error:false,full:null,bg:null,loading:null,tmp:null,content:null,wrapper:null,closing:false,contentWrapper:null,scripts:[]},K={width:false,height:false};b.fn.nyroModal=function(p){if(!this)return false;return this.each(function(){this.nodeName.toLowerCase()=="form"?
b(this).submit(function(y){if(this.enctype=="multipart/form-data"){f(b.extend(p,{from:this}));return true}y.preventDefault();f(b.extend(p,{from:this}));return false}):b(this).click(function(y){y.preventDefault();f(b.extend(p,{from:this}));return false})})};b.fn.nyroModalManual=function(p){this.length||f(p);return this.each(function(){f(b.extend(p,{from:this}))})};b.nyroModalManual=function(p){f(p)};b.nyroModalSettings=function(p,y,J){a(p,y,J);if(!y&&s.ready){p.bgColor&&m.updateBgColor(s,m,function(){});
if(s.dataReady&&!s.anim&&!s.transition&&(p.width||p.height)){D(true);F&&s.content.css({position:""});m.resize(s,m,function(){F&&s.content.css({position:"fixed"});b.isFunction(m.endResize)&&m.endResize(s,m)})}}};b.nyroModalRemove=function(){H()};b.nyroModalNext=function(){var p=B(1);if(p)return p.nyroModalManual(m);return false};b.nyroModalPrev=function(){var p=B(-1);if(p)return p.nyroModalManual(m);return false};b.fn.nyroModal.settings={debug:false,modal:false,type:"",from:"",hash:"",processHandler:null,
selIndicator:"nyroModalSel",formIndicator:"nyroModal",content:null,bgColor:"#000000",ajax:{},swf:{wmode:"transparent"},width:null,height:null,minWidth:400,minHeight:300,resizeable:true,autoSizable:true,padding:20,regexImg:"[^.].(jpg|jpeg|png|tiff|gif|bmp)s*$",defaultImgAlt:"Image",setWidthImgTitle:true,rtl:true,css:{bg:{zIndex:100,position:"fixed",top:0,left:0,height:"100%",width:"100%"},wrapper:{zIndex:101,position:"fixed",top:"50%",left:"50%"},wrapper2:{},content:{overflow:"auto"},loading:{zIndex:102,
position:"fixed",top:"50%",left:"50%",marginTop:"-50px",marginLeft:"-50px"}},wrap:{div:'<div class="wrapper"></div>',ajax:'<div class="wrapper"></div>',form:'<div class="wrapper"></div>',formData:'<div class="wrapper"></div>',image:'<div class="wrapperImg"></div>',gallery:'<div class="wrapperImg"><a href="#" class="nyroModalPrev">Prev</a><a href="#"  class="nyroModalNext">Next</a></div>',swf:'<div class="wrapperSwf"></div>',iframe:'<div class="wrapperIframe"></div>',manual:'<div class="wrapper"></div>'},
closeButton:'<a href="#" class="nyroModalClose" id="closeBut" title="close">Close</a>',openSelector:".nyroModal",closeSelector:".nyroModalClose",contentLoading:'<a href="#" class="nyroModalClose">Cancel</a>',errorClass:"error",contentError:'The requested content cannot be loaded.<br />Please try again later.<br /><a href="#" class="nyroModalClose">Close</a>',handleError:null,showBackground:function(p,y,J){p.bg.css({opacity:0}).fadeTo(500,0.75,J)},hideBackground:function(p,y,J){p.bg.fadeOut(300,J)},
endFillContent:null,showContent:function(p,y,J){p.loading.css({marginTop:y.marginTopLoading+"px",marginLeft:y.marginLeftLoading+"px"}).show().animate({width:y.width+"px",height:y.height+"px",marginTop:y.marginTop+"px",marginLeft:y.marginLeft+"px"},{duration:350,complete:function(){p.contentWrapper.css({width:y.width+"px",height:y.height+"px",marginTop:y.marginTop+"px",marginLeft:y.marginLeft+"px"}).show();p.loading.fadeOut(200,J)}})},endShowContent:null,beforeHideContent:null,hideContent:function(p,
y,J){p.contentWrapper.animate({height:"50px",width:"50px",marginTop:-(25+m.borderH)/2+m.marginScrollTop+"px",marginLeft:-(25+m.borderW)/2+m.marginScrollLeft+"px"},{duration:350,complete:function(){p.contentWrapper.hide();J()}})},showTransition:function(p,y,J){p.loading.css({marginTop:p.contentWrapper.css("marginTop"),marginLeft:p.contentWrapper.css("marginLeft"),height:p.contentWrapper.css("height"),width:p.contentWrapper.css("width"),opacity:0}).show().fadeTo(400,1,function(){p.contentWrapper.hide();
J()})},hideTransition:function(p,y,J){p.contentWrapper.hide().css({width:y.width+"px",marginLeft:y.marginLeft+"px",height:y.height+"px",marginTop:y.marginTop+"px",opacity:1});p.loading.animate({width:y.width+"px",marginLeft:y.marginLeft+"px",height:y.height+"px",marginTop:y.marginTop+"px"},{complete:function(){p.contentWrapper.show();p.loading.fadeOut(400,function(){p.loading.hide();J()})},duration:350})},showLoading:function(p,y,J){p.loading.css({marginTop:y.marginTopLoading+"px",marginLeft:y.marginLeftLoading+
"px",opacity:0}).show().animate({opacity:1},{complete:J,duration:400})},hideLoading:function(p,y,J){J()},resize:function(p,y,J){p.contentWrapper.animate({width:y.width+"px",marginLeft:y.marginLeft+"px",height:y.height+"px",marginTop:y.marginTop+"px"},{complete:J,duration:400})},endResize:null,updateBgColor:function(p,y,J){if(b.fx.step.backgroundColor)p.bg.animate({backgroundColor:y.bgColor},{complete:J,duration:400});else{p.bg.css({backgroundColor:y.bgColor});J()}},endRemove:null};b(b.fn.nyroModal.settings.openSelector).nyroModal()});
jQuery.fn.__bindo=jQuery.fn.bind;jQuery.fn.bind=function(b,f,e){var a,d=false;if(typeof e!="undefined")a=e;else{d=true;a=e=f}if(typeof a=="object")e=function(c,h){c.args=a[2];a[0][a[1]](c,h)};return d?this.__bindo(b,e):this.__bindo(b,f,e)};var WIDGET_MODE_GUEST="guest",WIDGET_MODE_USER="user",WIDGET_LOADED={};function log(){try{console.log(arguments)}catch(b){}}function __(b){return b}
(function(b){var f={},e={};b.fn.mgWidgetPopup=function(a){log("[$.fn.mgWidgetPopup] setting",a);if(a=="remove")this.each(b.fn.mgWidgetPopup.removePopup);else if(a=="close-menu")this.each(b.fn.mgWidgetPopup.closeMenu);else{f.settings=b.extend({},jQuery.fn.mgWidgetPopup.defaults,a);this.each(function(){var d=b(this),c=b.extend({},f.settings);b.fn.mgWidgetPopup.init(d,c);b("div.widget-header-action-share",d).unbind("click").click(b.fn.mgWidgetPopup.click)})}};b.fn.mgWidgetPopup.click=function(a){a.preventDefault();
b.fn.mgWidgetPopup.start(this);return false};b.fn.mgWidgetPopup.start=function(a){a=b(a).mgWidgetContainer();a.trigger("click");b("div.widget-menu-popup-container").hide();a=b("div.widget-menu-popup-container",a);var d=b("div.widget-menu-panel",a);if(d.size()===0)log("no tabs defined");else{a.css("position","absolute");a.css("top",20);a.css("right",20);a.show();a=d.attr("id");a=e[a];b.fn.mgWidgetPopup.initTab(a);b("#"+a.id).show()}};b.fn.mgWidgetPopup.initTab=function(a){var d=b("#"+a.id);if(b("iframe",
d).size()===0){d.append("<iframe src='"+a.url+"' width='"+a.width+"' height='"+a.height+"'><p>your browser does not support iframes</p></iframe>");b("iframe",d)}};b.fn.mgWidgetPopup.defaults={tabs:[{action:"add",title:__("title_add"),width:"200px",height:"300px"},{action:"send",title:__("title_send"),width:"200px",height:"300px"},{action:"share",title:__("title_share"),width:"200px",height:"300px"}],baseContent:"<div class='widget-menu-popup-container'><div class='widget-menu-popup'><div class='widget-menu-tabs'><ul></ul><div class='widget-menu-tabs-close'>[c]</div></div><div class='widget-menu-panels'></div></div></a>"};
b.fn.mgWidgetPopup.clickTab=function(a){a.preventDefault();a=b(a.target);var d=a.mgWidgetContainer();b("div.widget-menu-panels",d).hide();b("a.widget-menu-popup-link",d).removeClass("widget-menu-popup-link-selected").addClass("widget-menu-popup-link-unselected");a.removeClass("widget-menu-popup-link-unselected").addClass("widget-menu-popup-link-selected");try{b.fn.mgWidgetPopup.initTab(e[a.attr("panel")])}catch(c){log(c)}b("div.widget-menu-panels",d).show();b("div.widget-menu-panel",d).hide();b("#"+
a.attr("panel"),d).show();return false};b.fn.mgWidgetPopup.closeMenu=function(a){var d=null;d=a.target?b(a.target).mgWidgetContainer():jQuery(this).mgWidgetContainer();b("div.widget-menu-popup-container",d).hide()};b.fn.mgWidgetPopup.removePopup=function(){var a=jQuery(this).mgWidgetContainer();log("remove popup : ",a);e[a.attr("id")]=null};b.fn.mgWidgetPopup.init=function(a,d){a.append(d.baseContent);var c=b("div.widget-menu-tabs ul",a),h=b("div.widget-menu-panels",a);for(var j in d.tabs){var l=
b.extend({url:WIDGET_BASE_URL+"/widget/popup-tab?tab="+d.tabs[j].action+"&wuid="+a.attr("id"),id:"widget-menu-panel-"+a.attr("id")+"-"+d.tabs[j].action},d.tabs[j]);c.append("<li><a panel='"+l.id+"' href='"+l.url+"' class='widget-menu-popup-link'>"+l.title+"</a></li>");h.append("<div class='widget-menu-panel' id='"+l.id+"' url='"+l.url+"'></div>");e[l.id]=l}b("a.widget-menu-popup-link",c).click(b.fn.mgWidgetPopup.clickTab);b("div.widget-menu-tabs-close",a).click(b.fn.mgWidgetPopup.closeMenu)}})(jQuery);
var Dependency={dependencies:{},loaded:{gmap:false,starrating:false},state:"load",load:function(){Dependency.state="run";for(var b in Dependency.dependencies){b=="gmap"&&google.load("maps","2.x",{callback:function(){jQuery.ajax({url:"/js/labeledmarker.js",dataType:"script",success:Dependency.gmapCallbackBundle,cache:true})}});b=="starrating"&&jQuery.ajax({url:"/swFormExtraPlugin/js/starrating/jquery.MetaData.js",dataType:"script",success:function(){jQuery.ajax({url:"/swFormExtraPlugin/js/starrating/jquery.rating.js",
dataType:"script",success:Dependency.starratingCallbackBundle,cache:true})},cache:true})}},add:function(b,f){if(Dependency.loaded[b]){b=="gmap"&&Dependency.gmapCallback(f);b=="starrating"&&Dependency.starratingCallback(f)}else{Dependency.dependencies[b]||(Dependency.dependencies[b]=[]);Dependency.dependencies[b].push(f);Dependency.state=="run"&&Dependency.load()}},starratingCallbackBundle:function(){Dependency.loaded.starrating=true;for(var b in Dependency.dependencies.starrating)Dependency.starratingCallback(Dependency.dependencies.starrating[b]);
Dependency.dependencies.starrating={}},starratingCallback:function(b){if(typeof b=="function")b();else typeof b=="object"&&b[0].loadStarRating()},gmapCallbackBundle:function(){Dependency.loaded.gmap=true;for(var b in Dependency.dependencies.gmap)Dependency.gmapCallback(Dependency.dependencies.gmap[b]);Dependency.dependencies.gmap={}},gmapCallback:function(b){if(typeof b=="function")b();else typeof b=="object"&&b[0].loadGmap()}},Request={in_progress:false,lock:function(b){Request.in_progress=b;log("[LOCK] Request.lock by "+
b)},unlock:function(b){Request.in_progress=false;log("[UNLOCK] Request.unlock by "+b)},diplayLockMessage:function(){alert("Lock by : "+Request.in_progress)},isLocked:function(){return Request.in_progress!==false}},Tab={is_locked:false,num_tabs:0,max_tabs:4,lock:function(b){Tab.is_locked=true;log("[LOCK] Tab.lock by "+b)},unlock:function(b){Tab.is_locked=false;log("[UNLOCK] Tab.unlock by "+b)},displayLockMessage:function(){alert(WIDGET_MESSAGE_MAX_TABS)},isLocked:function(){return Tab.is_locked!==
false}};function mgWidgetObject(){}mgWidgetObject.prototype.clickHideSendPopup=function(){jQuery("div#popup-send-to-a-friend-"+this.wuid).hide()};
mgWidgetObject.prototype.initSendToFriendsPopup=function(){jQuery("form.widget-send-to-friend-class-popup",this.widget).bind("submit",[this,"sendToFriends"]);jQuery("a.widget-popup-box-trigger-link",this.widget).bind("click",[this,"handlePopupTrigger"]);var b=jQuery("#popup-send-to-a-friend-"+this.wuid,this.widget);b.appendTo(jQuery("#page-container"));jQuery("div.popup-box-title, div.popup-box-close-x",b).bind("click",[this,"clickHideSendPopup"])};
mgWidgetObject.prototype.saveStates=function(){if(!Portal.isGuestMode()){reload=arguments.length==0?true:arguments[0];jQuery("form[wuid="+this.wuid+"]",this.widget).data("reload",reload).submit()}};mgWidgetObject.prototype.reload=function(){};
mgWidgetObject.prototype.handlePopupTrigger=function(b){b.preventDefault();b.stopPropagation();var f=jQuery("li.popup-trigger",this.widget);b=jQuery("div#popup-send-to-a-friend-"+this.wuid);var e=0;if(f.css("padding-top"))e=parseInt(f.css("padding-top").slice(0,-2));var a=0;if(f.css("border-top"))a=parseInt(f.css("border-top").slice(0,-2));e=e+a;a=f.offset();b.css("top",a.top+7+e);b.css("left",a.left-20);b.show();jQuery.scrollTo("#"+this.wuid);jQuery("div.popup-box-title a",b).css("width",jQuery("a",
f).width());f=jQuery("div.popup-box-title",b).width();jQuery("div.shadow-inline",b).css("width",f+20);jQuery("div.shadow-inline div.shadow-right",b).css("width",f);f=jQuery("div.popup-box-content",b).outerWidth();jQuery("div.shadow-full",b).css("width",f);return false};mgWidgetObject.prototype.hideLoading=function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").removeClass("widget-loading-indicator-display")};
mgWidgetObject.prototype.showLoading=function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").addClass("widget-loading-indicator-display")};
mgWidgetObject.prototype.sendToFriends=function(b){b.preventDefault();b=jQuery("div#popup-send-to-a-friend-"+this.wuid);b=jQuery("form.widget-send-to-friend-class-popup",b);var f=Portal.linkToAction(b.attr("widget"),"sendToFriends",this.wuid,b.serializeArray());jQuery.ajax({type:"GET",dataType:"json",url:f,data:b.serialize(),widget:this,success:function(e){var a=jQuery("div#popup-send-to-a-friend-"+this.widget.wuid);if(e.hasErrors){jQuery("div.send-popup-error",a).show();jQuery("div.send-popup-success",
a).hide();for(var d in e.errors)jQuery("#send_to_friends_"+d,a).addClass("error")}else{jQuery("div.send-popup-error",a).hide();jQuery("div.send-popup-success",a).show();jQuery(":input",a).each(function(){var c=this.id;if(this.type=="checkbox")this.checked=false;if(c!="send_to_friends_your_email"&&c!="send_to_friends_object_id"&&c!="send_to_friends_object_class")this.value=""})}}});return false};
var Portal={leftBlock:null,rightBlock:null,slotMinHeight:400,linkToAction:function(b,f,e,a){b=WIDGET_BASE_ACTION_URL.replace("-widget-name-",b).replace("-widget-action-",f).replace("-wuid-",e);b+="?"+jQuery.param(a);return b},updateUpDown:function(b){jQuery("dl:not(.ui-sortable-helper)",b).removeClass("first").removeClass("last").find(".up, .down").removeClass("disabled").end().filter(":first").addClass("first").find(".up").addClass("disabled").end().end().filter(":last").addClass("last").find(".down").addClass("disabled").end().end()},
moveUpDown:function(){var b=jQuery(this),f=b.parents("div.widget-container"),e=f.prev("div.widget-container"),a=f.next("div.widget-container");b.is(".up")&&e.length>0&&f.insertBefore(e);b.is(".down")&&a.length>0&&f.insertAfter(a);Portal.updateUpDown(f.parent())},sortableChange:function(b,f){log("Portal.sortableChange",f);f.placeholder.height(parseInt(f.item.height())+10);if(f.sender){var e=f.element.width();f.placeholder.width(e);f.helper.css("width",f.element.children().width());if(e==630){f.helper.removeClass("slot-small");
f.helper.addClass("slot-medium")}else{f.helper.removeClass("slot-medium");f.helper.addClass("slot-small")}Portal.resizeSlot()}},resizeSlot:function(){var b=jQuery(Portal.getSelectedTab()),f=0;jQuery("#"+b.attr("tuid")+" .slot").each(function(){var a=0;jQuery("#"+b.attr("tuid")+" #"+jQuery(this).attr("id")+" .widget-container").each(function(){a=a+parseInt(jQuery(this).height())+parseInt(jQuery(this).css("padding-top"))+parseInt(jQuery(this).css("padding-bottom"))+parseInt(jQuery(this).css("margin-bottom"))+
parseInt(jQuery(this).css("margin-top"))});if(a>f)f=a});if(f>Portal.slotMinHeight){var e=f+parseInt(jQuery("#widgets-tabs-container").css("padding-bottom"))+parseInt(jQuery("#widgets-tabs-container").css("padding-top"));jQuery("#"+jQuery(Portal.getSelectedTab()).attr("tuid")+" .slot").height(e)}},sortableUpdate:function(b,f){log("Portal.sortableUpdate",f);Portal.updateUpDown(f.element[0]);f.sender&&Portal.updateUpDown(f.sender[0]);log(f.item.hasClass("mg-add-widget-details-block"));f.item.hasClass("mg-add-widget-details-block")||
Portal.saveStates()},getSelectedTab:function(){var b=jQuery("ul.widget-tabs").data("selected.tabs");return jQuery("ul.widget-tabs li").get(b)},initTitleButtons:function(b){jQuery("div.widget-header",b).trigger("mouseout");if(Portal.isGuestMode()){jQuery("div.widget-header-actions",b).hide();b.addClass("guest-mode")}else{var f=jQuery("a.widget-header-action-close",b);f.click(Portal.bindWidgetConfirmCloseEvent);f=jQuery("a.widget-header-action-visible",b);f.click(Portal.bindWidgetHideEvent)}},bindWidgetConfirmCloseEvent:function(){var b=
jQuery(this).mgWidgetContainer();b.addClass("zindex");var f=b.attr("id"),e=jQuery("#widget-"+f+"-confirm-close");jQuery("div.actions button",e).click(Portal.bindWidgetCloseEvent);e.show();jQuery("div.close-x, div.actions a.cancel",e).bind("click",function(){b.removeClass("zindex");e.hide();return false})},bindWidgetCloseEvent:function(){var b=jQuery(this).mgWidgetContainer();try{var f="js_"+b.attr("id");eval("if("+f+") { "+f+".unload(); delete "+f+";}")}catch(e){log(e)}b.slideDown(400).fadeOut(function(){var a=
jQuery(this);log("remove widget container : ",a);a.mgWidgetPopup("remove");a.remove();Portal.saveStates();Portal.resizeSlot()});return false},bindWidgetReloadEvent:function(){var b=jQuery(this).mgWidgetContainer();jQuery("form[wuid="+b.attr("id")+"]").submit();return false},bindWidgetHideEvent:function(){var b=jQuery(this).mgWidgetContainer();jQuery("div.widget-settings",b).hide();var f=jQuery("div.widget-content",b),e=jQuery("#"+b.attr("id")+"_widget_settings__widget_hidden");e.val()!=1?e.val(1):
e.val(0);f.slideToggle();b.toggleClass("widget-hidden");log("form[wuid="+b.attr("id")+"]");jQuery("form[wuid="+b.attr("id")+"]",b).trigger("submit");return false},initSettingWidget:function(b){if(!Portal.isGuestMode()){b=jQuery("form.widget-form-settings",b);b.submit(Portal.bindFormEvent);b.data("reload",true)}},bindWidgetEditEvent:function(){var b=jQuery(this).mgWidgetContainer();jQuery("div.widget-settings",b).slideToggle();jQuery("div.widget-content",b).show();return false},bindFormEvent:function(b){b=
jQuery(b.target);if(Request.isLocked())return false;Request.lock("Portal.bindFormEvent");var f=jQuery(":input",this).serialize();f+="&widget_context="+WIDGET_CONTEXT;jQuery.ajax({url:WIDGET_BASE_URL+"/widget/save-settings",cache:false,type:"GET",dataType:"html",form:b,data:f,beforeSend:function(){jQuery("#"+this.wuid+" span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(e){var a=this.form.attr("wuid");Request.unlock("Portal.bindFormEvent (anonymous function)");
log("Portal.bindFormEvent, reload : ",this.form.data("reload"));if(this.form.data("reload")){Portal.updateWidgetHtmlContent(a,"#"+a+" div.widget-content",e);Portal.resizeSlot()}},complete:function(){jQuery("#"+this.wuid+" span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}});return false},initTabsAdd:function(){if(!Portal.isGuestMode()){Tab.num_tabs==0&&jQuery(".widget-tabs li.ui-tabs-nav-item").each(function(){Tab.num_tabs++});Tab.num_tabs>=Tab.max_tabs&&Tab.lock("initTabsAdd");
jQuery("#widget-add-tab").click(Portal.bindAddTab)}},initTabPanelsView:function(b){var f=Portal.slotMinHeight;slots=jQuery("div.slot",b);slots.each(function(e,a){var d=0;jQuery("div.widget-container",a).each(function(c,h){d=d+parseInt(jQuery(h).height())+parseInt(jQuery(h).css("padding-top"))+parseInt(jQuery(h).css("padding-bottom"))+parseInt(jQuery("#widgets-tabs-container").css("padding-bottom"))});f=d>f?d:f});slots.height(f)},initTabsView:function(b){if(!Portal.isGuestMode()){b.tabs({tabTemplate:'<li class="ui-tabs-nav-item"><div class="border-left"> </div><a class="widget-tab-name" href="#{href}">#{label}</a><span class="widget-tab-options">&nbsp;</span><span class="widget-tab-close">&nbsp;</span><div class="border-right"> </div></li>',
add:function(f,e){jQuery("ul.widget-tabs").tabs("select","#"+e.panel.id)}}).bind("tabsselect",Portal.bindTabSelect).bind("tabsremove",Portal.bindTabClose);Portal.initTabHandlerOptions(b)}},initTabHandlerOptions:function(b){Portal.isGuestMode()||jQuery("span.widget-tab-close",b).html("x").click(Portal.bindTabClose)},initTabRename:function(){if(!Portal.isGuestMode()){jQuery("#widget-tab-rename-form").bind("submit",Portal.bindTabRename);var b=jQuery(Portal.getSelectedTab());Portal.initTabRenameInput(b);
jQuery("a.widget-tab-name").bind("click.rename",Portal.bindTabInputRename);var f=b.attr("tuid");b=jQuery("a",b).text();jQuery("#widget-tab-rename-tuid").attr("value",f);jQuery("#widget-tab-rename-name").attr("value",b)}},initTabLayout:function(){if(!Portal.isGuestMode()){var b=jQuery("form#widget-tab-layout-form");b.submit(Portal.bindTabLayout);var f=Portal.getSelectedTab();f=jQuery(f).attr("tuid");var e=jQuery("#"+f).attr("layout");jQuery("#widget-tab-layout-tuid",b).attr("value",f);jQuery("div.widget--layout-option").attr("checked",
false);jQuery("#layout-"+e).attr("checked",true)}},bindTabLayout:function(b){var f=b.target;b.preventDefault();if(!f){log("[Portal.bindTabLayout] no form !");return false}b=jQuery(f).serialize();jQuery.ajax({url:f.action,data:b,cache:false,type:"GET",complete:function(e,a){if(a=="success"){var d=e.getResponseHeader("Widgets-Tab-Tuid"),c=e.getResponseHeader("Widgets-Tab-Layout");Portal.changeLayout(d,c)}}});return false},changeLayout:function(b,f){if(f){f=WIDGET_LAYOUTS[f];var e=jQuery("#"+b),a=jQuery("div.slot",
e),d=f.length,c=a.length;log("[Portal.changeLayout] size",d,c);if(d<c){jQuery("#slot_2 .widget-container",e).each(function(){jQuery("#slot_"+Math.round(Math.random())).append(jQuery(this))});Portal.saveStates();do{jQuery(a.get(c-1)).remove();c--}while(d<c)}else if(c<d){do{e.append("<div id='slot_"+c+"' class='slot ui-sortable' style='width:"+f[c]+"px'> <div style='clear:both'> </div></div>");c++}while(c<d)}a=jQuery("div.slot",e);a.each(function(h,j){for(var l in f)jQuery(j).removeClass(f[l]);jQuery(j).addClass(f[h])});
Portal.initTabPanelsView(e);log("[Portal.changeLayout] new slots elements",a);Portal.initSlotView(a)}else log("[Portal.changeLayout] no layout for tuid: "+b)},bindTabRename:function(b){if(Request.isLocked())return false;Request.lock("Portal.bindTabRename");b=b.target;if(!b){log("[Portal.bindTabRename] no form !");return false}var f=jQuery(b).serialize();jQuery.ajax({url:b.action,data:f,type:"GET",cache:false,complete:function(e,a){if(a=="success"){Request.unlock("Portal.bindTabRename");var d=e.getResponseHeader("Widgets-Tab-Tuid"),
c=e.getResponseHeader("Widgets-Tab-Name");Portal.renameTab(d,c)}}});return false},bindAddTab:function(){if(Request.isLocked())Request.diplayLockMessage();else if(Tab.isLocked())Tab.displayLockMessage();else{var b={context:WIDGET_CONTEXT};Request.lock("Portal.bindAddTab");jQuery.ajax({url:WIDGET_BASE_URL+"/widget/add-tab",data:b,type:"GET",dataType:"html",cache:false,complete:function(f,e){if(e=="success"){var a=f.getResponseHeader("Widgets-Tab-Tuid"),d=f.getResponseHeader("Widgets-Tab-Name");if(a){jQuery("ul.widget-tabs").tabs("add",
"#"+a,d);jQuery();d=jQuery("#"+a);d.appendTo(jQuery("#widgets-tabs-container"));d.append(f.responseText);d.addClass("tab-panels").addClass("ui-tabs-panel");Portal.initTabsAdd();d=jQuery("ul.widget-tabs li:last");d.attr("tuid",a);Portal.initTabHandlerOptions(d);Portal.initTabRenameInput(d);jQuery("a.widget-tab-name",d).bind("click.rename",Portal.bindTabInputRename);a=jQuery("#"+a);d=jQuery("div.slot",a);Portal.initSlotView(d);Portal.initTabPanelsView(a);Portal.initUpdateUpDown(d);jQuery("div.mg-add-widget-details").sortable("destroy").sortable({connectWith:jQuery("div.slot")});
Request.unlock("Portal.bindAddTab (anonymous function)");Tab.num_tabs++;Tab.num_tabs>=Tab.max_tabs&&Tab.lock("bindAddTab")}}}})}},countClickOnTab:0,bindTabInputRename:function(){var b=jQuery(Portal.getSelectedTab());if(Portal.countClickOnTab==0)Portal.countClickOnTab++;else{var f=b.attr("tuid");b=jQuery("li.ui-tabs-nav-item[tuid="+f+"] a.widget-tab-name");f=jQuery("<input id='widget-tab-rename-input' tuid='"+f+"' value='"+b.text()+"' />");f.keyup(function(e){e.preventDefault();var a=jQuery(this).val();
jQuery("#widget-tab-rename-name").attr("value",a);if(e.which==13){jQuery(this).attr("tuid");jQuery(this).val();jQuery(document).trigger("click.tab-rename").unbind("click.tab-rename")}});f.click(function(){return false});jQuery(document).bind("click.tab-rename",function(){jQuery("#widget-tab-rename-form").trigger("submit");jQuery(document).unbind("click.tab-rename");jQuery("#widget-tab-rename-input").prev().show().next().remove()});b.hide().after(f);f.focus()}},bindTabSelect:function(b,f){var e=jQuery("li.ui-tabs-nav-item[tuid="+
f.panel.id+"]");Portal.countClickOnTab=0;Portal.initTabRenameInput(e)},initTabRenameInput:function(b){jQuery("#widget-tab-rename-input").length>0&&jQuery(document).trigger("click.tab-rename");var f=b.attr("tuid");b=jQuery("a.widget-tab-name",b).text();var e=jQuery("#"+f).attr("layout");jQuery("#widget-tab-rename-tuid").attr("value",f);jQuery("#widget-tab-rename-name").attr("value",b);jQuery("div.widget-tab-layout-option").attr("checked",false);jQuery("#widget-tab-layout-tuid").attr("value",f);jQuery("#layout-"+
e).attr("checked",true)},bindTabClose:function(){if(jQuery(this).is("span.widget-tab-close")){var b={pos:null,tuid:null},f=this;jQuery("ul.widget-tabs span.widget-tab-close").each(function(e,a){if(f==a){b.pos=e;b.tuid=jQuery(a).parent().attr("tuid")}});log("remove tab",b.pos);jQuery.ajax({url:WIDGET_BASE_URL+"/widget/remove-tab",data:b,type:"GET",dataType:"html",cache:false,complete:function(){Tab.num_tabs--;Tab.isLocked()&&Tab.num_tabs<Tab.max_tabs&&Tab.unlock("bindTabClose")}});jQuery("ul.widget-tabs").tabs("remove",
b.pos)}log("I have been removed",this)},renameTab:function(b,f){if(typeof b!="object")b=jQuery("li.ui-tabs-nav-item[tuid="+b+"]");b=jQuery(b);jQuery("a",b).text(f)},closeMenuTab:function(b){if(!Portal.isGuestMode()){var f=jQuery("#"+b);if(f.size()===0){log(window.parent);f=window.parent.jQuery("#"+b)}f.size()!==0&&f.mgWidgetPopup("close-menu")}},initSlotView:function(b){if(!Portal.isGuestMode()){jQuery("div.widget-container",b).css("z-index",0);log("Portal.initSlotView - from : ",b);b.sortable("destroy");
b.sortable({items:"div.widget-container",handle:"div.widget-header",cursor:"move",appendTo:"body",connectWith:jQuery("div.slot"),placeholder:"placeholder-widget",start:function(f,e){log("Portal.initSlotView.start",e);e.helper.css("width",e.item.width());e.placeholder.height(parseInt(e.item.height())+18);e.helper.addClass("drag-widget");e.element.width()==630?e.helper.addClass("slot-medium"):e.helper.addClass("slot-small")},over:function(f,e){log("Portal.initSlotView.over",e.element.width(),e);e.helper.css("width",
e.element.width());return false},stop:function(f,e){log("Portal.initSlotView.stop",e)},receive:Portal.bindContainerReceive,change:Portal.sortableChange,update:Portal.sortableUpdate});jQuery("div.widget-container",b).click(Portal.bindContainerFocus);jQuery("div.widget-container",b).mgWidgetPopup()}},bindSlotResize:function(){},saveStates:function(){if(Request.isLocked())log("!!! request in progress, cannot save states !!!");else{Request.lock("Portal.saveStates");var b=jQuery("ul.widget-tabs").data("selected.tabs");
if(b=jQuery("ul.widget-tabs li").get(b)){var f={};f.tuid=b.getAttribute("tuid");log(b,"#"+f.tuid+" div.slot",jQuery("#"+f.tuid+" div.slot"));f.pos="";jQuery("#"+f.tuid+" div.slot").each(function(a,d){jQuery("div.widget-container",d).each(function(c,h){f.pos+=h.id+","+a+","+c+":"})});f.widget_context=WIDGET_CONTEXT;log("save state to ",WIDGET_BASE_URL+"/widget/save-states");try{jQuery.get(WIDGET_BASE_URL+"/widget/save-states",f,function(){Request.unlock("Portal.saveStates (anonymous function)")})}catch(e){Request.unlock("Portal.saveStates (anonymous function)");
alert("Something wrong happen, will required the server")}}else log("no tuid defined")}},bindContainerReceive:function(b,f){log("Portal.bindContainerReceive",f);f.helper.css("width",f.item.width());if(Request.isLocked())log("Request is locked");else{Request.lock("Portal.bindContainerReceive");var e=f.sender.get(0).getAttribute("widget"),a=f.element.get(0).id,d=null,c=null;if(e){if(jQuery(f.item.get(0)).prev().length>0)d=jQuery(f.item.get(0)).prev().get(0).id;log(e," to ",a,"previous",d);c=jQuery("ul.widget-tabs").data("selected.tabs");
if(c=jQuery("ul.widget-tabs li").get(c)){c=c.getAttribute("tuid");a={widget:e,slot:a,previous:d,tuid:c,context:WIDGET_CONTEXT};if(!WIDGET_LOADED[e]){d=e;d=RegExp("([ABCDEFGHIJKLMNOPQRSTUVWXYZ])","g");d=e.replace(d,"_$1").toLowerCase();d="<script type='text/javascript' src='"+WIDGET_BASE_MEDIA_URL+"/"+d+"/"+d+".js'><\/script>";jQuery("head").append(d)}jQuery.ajax({url:WIDGET_BASE_URL+"/widget/add-widget",data:a,type:"GET",dataType:"html",ui:f,cache:false,name:e,success:function(h){Request.unlock("Portal.bindContainerReceive (anonymous function)");
h=jQuery(h).insertAfter(f.item);Portal.initTitleButtons(h);Portal.initSettingWidget(h);h.click(Portal.bindContainerFocus);h.mgWidgetPopup();f.sender.append(f.item);var j=h.attr("id");try{eval("if(js_"+j+") { js_"+j+".load(); }")}catch(l){log(l)}Portal.initTabPanelsView(h.parents("div.tab-panels"))}})}}}},bindContainerFocus:function(b){var f=jQuery(b.target).mgWidgetContainer();jQuery("div.widget-container").css("z-index",1);jQuery("div.popup-box").each(function(){var e=jQuery(this).mgWidgetContainer().attr("id");
f.attr("id")!=e&&jQuery(this).hide()});f.css("z-index",2)},initAddWidgetsView:function(){if(!Portal.isGuestMode()){jQuery("li.add-widget-link").click(function(){jQuery("#mg-add-widgets-container").slideToggle();jQuery(this).toggleClass("add-widget-link-on");jQuery("#open-content-management",this).toggle();jQuery("#close-content-management",this).toggle()});Portal.initAddWidgetsViewDnd(jQuery("li.mg-add-widget-details"))}},initAddWidgetsViewDnd:function(b){b.sortable({appendTo:"body",connectWith:jQuery(".slot"),
cursor:"move",placeholder:"placeholder-add-widget",start:function(f,e){Portal.resizeSlot();e.item.height(200);e.item.width("100%")},stop:function(){Portal.resizeSlot()}});b.css("cursor","move")},initUpdateUpDown:function(b){Portal.isGuestMode()||b.each(function(){Portal.updateUpDown(this)})},updateWidgetContent:function(b,f){var e=jQuery("form[wuid='"+b+"']").serialize();jQuery.ajax({update:"#"+b+" div.widget-content",data:e,url:f,wuid:b,cache:false,method:"GET",dataType:"html",success:function(a){Portal.updateWidgetHtmlContent(this.wuid,
this.update,a)}});return false},updateWidgetHtmlContent:function(b,f,e){jQuery(f).html(e);try{eval("if(js_"+b+") { js_"+b+".load();}")}catch(a){log(a)}},isGuestMode:function(){return WIDGET_MODE==WIDGET_MODE_GUEST},initWidgetsContent:function(){jQuery("div.mg-down-list-widgets").bind("click",Portal.onClickDownWidgetContent);jQuery("div.mg-up-list-widgets").bind("click",Portal.onClickUpWidgetContent);jQuery("li.mg-add-widgets-list-category").bind("click",Portal.onClickWidgetListCategory);jQuery("li.mg-add-widget-details").bind("click",
Portal.onClickWidgetDetails)},AddContent:{step:20,box_height:140},pxToInt:function(b){return parseInt(b)},initWidgetListControls:function(){jQuery("div.mg-down-list-widgets,div.mg-up-list-widgets").hide();jQuery("ul.list-categories").height()<Portal.AddContent.box_height&&jQuery("div.mg-down-list-categories, div.mg-up-list-categories").hide()},onClickDownWidgetContent:function(){var b=jQuery("ul.list-widgets");if(!(b.height()<Portal.AddContent.box_height)){var f=Portal.pxToInt(b.css("top")),e=Portal.AddContent.box_height-
parseInt(b.height());if(f<=e){b.animate({top:e+"px"});log("[Portal.onClickDownWidgetContent] reset position, top="+f)}else b.animate({top:"-="+Portal.AddContent.step+"px"})}},onClickUpWidgetContent:function(){var b=jQuery("ul.list-widgets");if(!(b.height()<Portal.AddContent.box_height))if(Portal.pxToInt(b.css("top"))>=0){log("[Portal.onClickUpWidgetContent] reset position");b.animate({top:"0px"})}else b.animate({top:"+="+Portal.AddContent.step+"px"})},onClickWidgetListCategory:function(){jQuery("li.mg-add-widgets-list-category").removeClass("list-selected");
jQuery(this).addClass("list-selected");var b=jQuery(this).attr("rel");jQuery("li.mg-add-widget-details").hide();jQuery("li.mg-add-widget-details[cat="+b+"]").show();log("[Portal.onClickWidgetListCategory] show cat="+b);jQuery("ul.list-widgets").height()<Portal.AddContent.box_height&&jQuery("div.mg-down-list-widgets,div.mg-up-list-widgets").hide()},onClickWidgetDetails:function(){jQuery("li.mg-add-widget-details").removeClass("list-selected");jQuery(this).addClass("list-selected");var b=jQuery(this).attr("widget");
log("[Portal.onClickWidgetListCategory] getting widget preview : "+b);jQuery("div.list-description").html("<div style='text-align:center; line-height:120px'><img src='/mgWidgetsPlugin/ajax-loader.gif' style='vertical-align:center'/></div>");jQuery.get(WIDGET_BASE_URL+"/widget/content-preview/"+b,function(f){jQuery("div.list-description").html(f);Portal.initAddWidgetsViewDnd(jQuery("div.add-widget-button","div.list-description"))})}};
function addjQueryFunctions(){jQuery.fn.mgWidgetContainer=function(){if(jQuery(this).hasClass("widget-container"))return this;return jQuery(this).parents("div.widget-container")};jQuery.fn.wc=function(){var b=jQuery(this).parents("div.widget-container");try{var f=b.get(0).id;return eval("js_"+f)}catch(e){return null}}}WIDGET_MODE=false;
jQuery(window).bind("load",function(){var b=jQuery("div.slot");addjQueryFunctions();Portal.initSlotView(b);jQuery("div.tab-panels").each(function(f,e){Portal.initTabPanelsView(e)});Portal.initUpdateUpDown(b);Portal.initTabsView(jQuery("ul.widget-tabs"));Portal.initTabsAdd();Portal.initTabRename();Portal.initTabLayout();Portal.initTitleButtons(b);Portal.initSettingWidget(b);Portal.initAddWidgetsView();Portal.initWidgetListControls();Portal.initWidgetsContent();Dependency.load()});
function chefOfTheWeek(){this.widget=this.wuid=null}chefOfTheWeek.prototype=new mgWidgetObject;chefOfTheWeek.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.chefOfTheWeek",[this,"load"])};chefOfTheWeek.prototype.load=function(){this.initSendToFriendsPopup()};chefOfTheWeek.prototype.unload=function(){};chefOfTheWeek.prototype.onClickButton=function(){};
var sendToFriends=function(b){jQuery.ajax({type:"GET",dataType:"json",url:b.attr("action"),data:b.serialize(),success:function(f){if(f.hasErrors){jQuery("div.send-popup-error",this.widget).show();jQuery("div.send-popup-success",this.widget).hide();for(var e in f.errors)jQuery("#send_to_friends_"+e,this.widget).addClass("error")}else{jQuery("div.send-popup-error",this.widget).hide();jQuery("div.send-popup-success",this.widget).show();jQuery(":input",b).each(function(){var a=this.id;if(this.type=="checkbox")this.checked=
false;if(a!="send_to_friends_your_email"&&a!="send_to_friends_object_id"&&a!="send_to_friends_object_class")this.value=""})}}})};WIDGET_LOADED.chefOfTheWeek=true;function recipesOfTheDay(){this.widget=this.wuid=null}recipesOfTheDay.prototype=new mgWidgetObject;recipesOfTheDay.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.recipesOfTheDay",[this,"load"])};
recipesOfTheDay.prototype.load=function(){jQuery("div.customize-widget-title",this.widget).bind("click.recipesByIngredients",[this,"onClickToggleFold"]);jQuery("div.customize-widget-title",this.widget).bind("mouseover.recipesByIngredients",function(){jQuery(this).css("cursor","pointer")});jQuery("a.link-user-recipe",this.widget).bind("click",[this,"updateUserRecipe"]);this.initSendToFriendsPopup()};
recipesOfTheDay.prototype.onSlideStop=function(b){b.preventDefault();b=jQuery("div.slider",this.widget);jQuery("#"+this.wuid+"_widget_settings_starter",this.widget).val(jQuery(b[0]).slider("value"));jQuery("#"+this.wuid+"_widget_settings_dessert",this.widget).val(jQuery(b[1]).slider("value"));jQuery("#"+this.wuid+"_widget_settings_main_course",this.widget).val(jQuery(b[2]).slider("value"));jQuery("form.widget-form-settings",this.widget).trigger("submit")};
recipesOfTheDay.prototype.onClickToggleFold=function(b){b.preventDefault();jQuery("div.customize-widget-title",this.widget).toggleClass("unfold").next().toggle(500)};recipesOfTheDay.prototype.onClickViewList=function(b){b.preventDefault();jQuery("#"+this.wuid+"_widget_settings_view_mode_image",this.widget).removeAttr("checked");jQuery("#"+this.wuid+"_widget_settings_view_mode_list",this.widget).attr("checked","checked");jQuery("form.widget-form-settings",this.widget).trigger("submit");return false};
recipesOfTheDay.prototype.onClickViewPhoto=function(b){b.preventDefault();jQuery("#"+this.wuid+"_widget_settings_view_mode_list",this.widget).removeAttr("checked");jQuery("#"+this.wuid+"_widget_settings_view_mode_image",this.widget).attr("checked","checked");jQuery("form.widget-form-settings",this.widget).trigger("submit");return false};recipesOfTheDay.prototype.unload=function(){};recipesOfTheDay.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};
recipesOfTheDay.prototype.onClickButton=function(){alert("you click on the button from the widget recipesTop10 : "+this.wuid)};
recipesOfTheDay.prototype.updateUserRecipe=function(){if(User.isLogged()){var b=jQuery("#user_recipe_is_published",this.widget);b.attr("value")==0?b.attr("value",1):b.attr("value",0);b=jQuery("form#update_user_recipe_form",this.widget);b=Portal.linkToAction("recipeOfTheDay","updateUserRecipe",this.wuid,b.serializeArray());jQuery.ajax({type:"POST",cache:false,url:b,success:function(){jQuery("a.link-user-recipe",this.widget).toggle()}})}else{jQuery("#login-popup-filler").jqm({ajax:Portal.linkToAction("recipeOfTheDay",
"loginPopup",this.wuid,[]),overlay:50});Site.handleUserAuthentification()}};WIDGET_LOADED.recipesOfTheDay=true;function recipesByIngredients(){this.is_guest_mode=this.widget=this.wuid=null}recipesByIngredients.prototype=new mgWidgetObject;recipesByIngredients.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.recipesByIngredients",[this,"load"])};
recipesByIngredients.prototype.load=function(){jQuery("#"+this.wuid+"_ingredients_in",this.widget).bind("keyup.recipesByIngredients",[this,"onKeyUpIngredientIn"]);jQuery("#"+this.wuid+"_ingredients_out",this.widget).bind("keyup.recipesByIngredients",[this,"onKeyUpIngredientOut"]);jQuery("#"+this.wuid+"_ingredients_in",this.widget).bind("keyup.recipesByIngredients",[this,"onEnterIngredient"]);jQuery("#"+this.wuid+"_ingredients_out",this.widget).bind("keyup.recipesByIngredients",[this,"onEnterIngredient"]);
jQuery(".results-2-columns #"+this.wuid+"_ingredients_btn",this.widget).bind("click.recipesByIngredients",[this,"onButtonClick"]);jQuery(".results-1-column #"+this.wuid+"_ingredients_btn",this.widget).bind("click.recipesByIngredients",[this,"onButtonClick"]);this.initViewMode();jQuery("#"+this.wuid+"_ingredients_out",this.widget).val(jQuery("#"+this.wuid+"_widget_settings_out",this.widget).val());jQuery("#"+this.wuid+"_ingredients_in",this.widget).val(jQuery("#"+this.wuid+"_widget_settings_in",this.widget).val());
jQuery("#"+this.wuid+"_ingredients_in").autocomplete(Portal.linkToAction("recipesByIngredients","ingredientAutocomplete",this.wuid,[]),jQuery.extend({},{dataType:"json",multiple:true,selectFirst:false,parse:function(b){var f=[];for(key in b)f[f.length]={data:[b[key],key],value:b[key],result:b[key]};return f}},{})).result(function(b){jQuery("#"+this.wuid+"_ingredients_in").val(jQuery(b.target).val())});jQuery("#"+this.wuid+"_ingredients_out").autocomplete(Portal.linkToAction("recipesByIngredients",
"ingredientAutocomplete",this.wuid,[]),jQuery.extend({},{dataType:"json",multiple:true,selectFirst:false,parse:function(b){var f=[];for(key in b)f[f.length]={data:[b[key],key],value:b[key],result:b[key]};return f}},{})).result(function(b){jQuery("#"+this.wuid+"_ingredients_out").val(jQuery(b.target).val())});jQuery("div.small-popup-content").bind("click",function(){document.location.href=jQuery(this).find("a").attr("href")})};
recipesByIngredients.prototype.onKeyUpIngredientOut=function(){jQuery("#"+this.wuid+"_widget_settings_out").val(jQuery("#"+this.wuid+"_ingredients_out",this.widget).val())};recipesByIngredients.prototype.onKeyUpIngredientIn=function(){jQuery("#"+this.wuid+"_widget_settings_in").val(jQuery("#"+this.wuid+"_ingredients_in",this.widget).val())};recipesByIngredients.prototype.onButtonClick=function(b){b.preventDefault();jQuery(".ac_results").remove();this.updateContent(b);return false};
recipesByIngredients.prototype.onEnterIngredient=function(b){if(b.keyCode==13){b.preventDefault();jQuery(".ac_results").remove();this.updateContent(b)}return false};recipesByIngredients.prototype.onClickViewList=function(b){b.preventDefault();jQuery("#"+this.wuid+"_widget_settings_view_mode_image",this.widget).removeAttr("checked");jQuery("#"+this.wuid+"_widget_settings_view_mode_list",this.widget).attr("checked","checked");this.updateContent(b);return false};
recipesByIngredients.prototype.onClickViewPhoto=function(b){b.preventDefault();jQuery("#"+this.wuid+"_widget_settings_view_mode_list",this.widget).removeAttr("checked");jQuery("#"+this.wuid+"_widget_settings_view_mode_image",this.widget).attr("checked","checked");this.updateContent(b);return false};recipesByIngredients.prototype.unload=function(){};recipesByIngredients.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};
recipesByIngredients.prototype.onClickButton=function(){alert("you click on the button from the widget recipesTop10 : "+this.wuid)};recipesByIngredients.prototype.initViewMode=function(){jQuery("a.link_view_list",this.widget).bind("click.recipesByIngredients",[this,"onClickViewList"]);jQuery("a.link_view_photo",this.widget).bind("click.recipesByIngredients",[this,"onClickViewPhoto"])};
recipesByIngredients.prototype.updateContent=function(b){var f=this.wuid;b.preventDefault();if(this.is_guest_mode!="1")jQuery("form.widget-form-settings",this.widget).trigger("submit");else{b=jQuery("form.widget-form-settings",this.widget);b=Portal.linkToAction("recipesByIngredients","refreshWidget",this.wuid,b.serializeArray());jQuery.ajax({type:"POST",cache:false,url:b,beforeSend:function(){jQuery("#"+f+" span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(e){jQuery("div#"+
f+"-recipes-list",this.widget).html(e)},complete:function(){jQuery("#"+f+" span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}})}return false};WIDGET_LOADED.recipesByIngredients=true;function gourmetMap(){this.widget=this.wuid=null;this.icons={};this.map=this.geocoder=null;this.markers=[];this.disable_refresh=false}gourmetMap.prototype=new mgWidgetObject;
gourmetMap.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);this.inputs={where:jQuery("#"+b+"_where_input"),search:jQuery("#"+b+"_search_input"),category:jQuery("#"+b+"_search_category"),category_1c:jQuery("#"+b+"_search_category_1c"),btn_submit_2c:jQuery("#"+b+"_btn_submit_2c"),btn_submit_1c:jQuery("#"+b+"_btn_submit_1c")};this.settings={where:jQuery("#"+b+"_widget_settings_where"),category:jQuery("#"+b+"_widget_settings_categories"),search:jQuery("#"+b+"_widget_settings_search"),
lat:jQuery("#"+b+"_widget_settings_center_lat"),lng:jQuery("#"+b+"_widget_settings_center_lng"),zoom:jQuery("#"+b+"_widget_settings_zoom")};this.inputs.where.val(this.settings.where.val());this.inputs.search.val(this.settings.search.val());this.inputs.category.val(this.settings.category.val());this.inputs.category_1c.val(this.settings.category.val());Dependency.add("gmap",[this,"loadGmap"]);Dependency.add("starrating",[this,"loadStar"])};
gourmetMap.prototype.refreshMap=function(){log("refresh the map disabled : ",this.disable_refresh);if(!this.disable_refresh){var b=this.map.getCenter();this.settings.lat.val(b.lat());this.settings.lng.val(b.lng());this.settings.zoom.val(this.map.getZoom());this.saveStates(false);jQuery("h1.widget-header-title span.widget-loading-indicator",this.widget).addClass("widget-loading-indicator-display");b=jQuery("form[wuid="+this.wuid+"]",this.widget).serializeArray();b.push({name:"bounds",value:this.map.getBounds()});
var f=Portal.linkToAction("gourmetMap","refreshMap",this.wuid,{}),e=this;jQuery.post(f,b,function(a){e.map.clearOverlays();e.data=a;e.createListMappable();e.disable_refresh=false;var d=null;for(var c in a){var h=a[c],j=new google.maps.LatLng(h.lat,h.lng);d=h.pos<10?new GSize(1,-16):new GSize(-2,-16);d=new LabeledMarker(j,{icon:gourmetMap.icons[h.klass],title:h.main_type+" : "+h.name,labelText:"<strong style='color:white; font-size: 10px'>"+h.pos+"</strong>",labelOffset:d});d.widget=e;d.id=c;google.maps.Event.bind(d,
"click",d,gourmetMap.handleClickMarker);e.map.addOverlay(d)}},"json");this.attachModalBox()}};
gourmetMap.prototype.createListMappable=function(){jQuery("div.widget-map-filters",gourmetMap);var b=0,f="";for(var e in this.data){if(b>2)break;var a=this.data[e],d=a.photos.length>0?a.photos[0]:false,c=a.name.length>16?a.name.substr(0,16)+"...":a.name,h=a.addr1+" - "+a.postal_code+" "+a.city;h=h.length>33?h.substr(0,33)+"...":h;var j=a.num_comments<=0?leave_comment_message:a.num_comments,l=a.note!=null?Math.round(a.note):0,n="",q="";if(d){n=d.path;q=d.alt}else{n=a.default_photo;q=""}f+=' <li class="result-'+
b+'"> ';f+='     <div class="result-image"><a href="'+a.url+'" target="_parent"><img alt="'+q+'" src="'+n+'" /></a></div>';f+='     <div class="result-type"><span>'+a.type+"</span></div>";f+='     <div class="result-marker marker-'+a.klass+'">';f+="       "+a.pos;f+="     </div>";f+='     <div class="result-info">';f+='       <div class="result-name"><a href="'+a.url+'" target="_parent" title="'+a.name+'">'+c+"</a></div>";f+='       <div class="result-stars"><img alt="'+l+'" src="/images/icons/stars_'+
l+'.gif" /></div>';f+='       <div class="result-address">'+h+"</div>";f+='       <div class="result-comments"><a href="'+a.url+'#comments">'+j+"</a></div>";f+='       <div class="clear"></div>';f+="     </div>";f+='     <div class="clear"></div>';f+="   </li>";b++}jQuery("#list_"+this.wuid+"_mappables").html("<ul>"+f+"</ul>");jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").removeClass("widget-loading-indicator-display")};
gourmetMap.prototype.getDestinationPanBy=function(b){var f=jQuery(".widget-map-popup",this.widget).css("left")+jQuery(".widget-map-popup",this.widget).css("width")/2,e=jQuery(".widget-map-popup",this.widget).css("top");f=147;e=62;b=this.map.fromLatLngToContainerPixel(b.getLatLng());return new google.maps.Size(f-b.x,e-b.y)};gourmetMap.prototype.moveMapAfterMarkerClick=function(b){this.disable_refresh=true;this.map.panBy(this.getDestinationPanBy(b))};
gourmetMap.handleClickMarker=function(){var b=this.widget,f=b.data[this.id],e=b.wuid;b.moveMapAfterMarkerClick(this);jQuery("#data_"+e+"_main_type",this.wuid).html('<span class="color-'+f.klass+'">'+f.main_type+"</span>");jQuery("#data_"+e+"_name",this.wuid).html('<a href="'+f.url+'" title="'+f.name+'">'+f.name+"</a>");jQuery("#data_"+e+"_address",this.wuid).html(f.address);jQuery("#data_"+e+"_telephone",this.wuid).html(f.telephone);jQuery("#data_"+e+"_note",this.wuid).html(Math.round(f.note));jQuery("#data_"+
e+"_information",this.wuid).html(f.information);jQuery("#data_"+e+"_num_comments",this.wuid).html(f.num_comments);var a="";for(var d in f.comments){var c=f.comments[d];a+="<div> Name : "+c.name+"<br /> Message : "+c.message+"</div>"}c=f.photos.length>0?f.photos[0]:false;var h="",j="";if(c){h=c.path;j=c.alt}else{h=f.default_photo;j=""}var l="",n="";if(h){l="<img src='"+h+"' alt='"+j+"'/>";for(d in f.photos){j=h="";if(f.photos[d]){h=c.path;j=c.alt}else{h=f.default_photo;j=""}n+="<img src='"+h+"' alt='"+
h+"' />"}jQuery("div.tab-pictures-available",this.wuid).html(n).show();jQuery("div.tab-pictures-not-available",this.wuid).hide()}else{jQuery("div.tab-pictures-available",this.wuid).hide().html(n);jQuery("div.tab-pictures-not-available",this.wuid).show()}jQuery("#data_"+e+"_image",this.wuid).html(l);jQuery("#data_"+e+"_comments",this.wuid).html(a);jQuery("#add_note_"+e+"_id",this.wuid).val(f.id);jQuery("input.etoile",this.wuid).rating({callback:function(){jQuery(this.form).trigger("submit")}}).rating("drain");
jQuery("div.mappable-stars",this.wuid).attr("class","").attr("class","mappable-stars stars star-"+(Math.round(f.note)||0)).html("&nbsp;"+(Math.round(f.note)||0));a=f.pos<10?"mappable-marker-small":"mappable-marker-large";jQuery("div.mappable-marker",this.wuid).attr("class","").attr("class","mappable-marker "+a+" flat-marker-"+f.klass).html(f.pos);jQuery("label.star-label",this.wuid).hide();jQuery("#add_comment_"+e+"_error").hide();jQuery("#add_comment_"+e+"_confirmation").hide();jQuery("form#add_comment_"+
e+"_form").show();jQuery("textarea","form#add_comment_"+e+"_form").val("");jQuery("#add_comment_"+e+"_mappable_object_id").val(f.id);jQuery("div.widget-map-popup",b.widget).show()};
gourmetMap.prototype.loadGmap=function(){this.load();jQuery("div.widget-map-popup",this.widget).hide();if(GBrowserIsCompatible()){this.googleInitMarkers();this.geocoder=new GClientGeocoder;this.map=new google.maps.Map2(document.getElementById("map_"+this.wuid));this.centerMap();this.map.enableDoubleClickZoom();this.map.setUIToDefault();google.maps.Event.bind(this.map,"moveend",this,this.refreshMap);this.googleInitMarkers();this.refreshMap()}this.attachModalBox()};
gourmetMap.prototype.centerMap=function(){this.map.setCenter(new google.maps.LatLng(this.settings.lat.val(),this.settings.lng.val()),parseInt(this.settings.zoom.val()))};
gourmetMap.prototype.load=function(){jQuery("form#add_note_"+this.wuid+"_form",this.widget).submit(function(){var b=jQuery(this);jQuery.ajax({type:"GET",url:b.attr("action"),data:b.serialize()});return false});jQuery("a.mappable-show-comment-form",this.widget).bind("click",[this,"onClickShowCommentForm"]);jQuery("form#add_comment_"+this.wuid+"_form",this.widget).submit(function(){var b=jQuery(this);jQuery.ajax({type:"GET",dataType:"json",url:b.attr("action"),data:b.serialize(),wuid:b.mgWidgetContainer().attr("id"),
success:function(f){if(f.hasErrors){jQuery("#add_comment_"+this.wuid+"_error").show();jQuery("#add_comment_"+this.wuid+"_confirmation").hide();for(var e in f.errors)jQuery("#add_comment_"+this.wuid+"_"+e).addClass("error")}else{jQuery("#add_comment_"+this.wuid+"_confirmation").show();jQuery("form#add_comment_"+this.wuid+"_form").hide();jQuery("#add_comment_"+this.wuid+"_error").hide()}}});return false});jQuery("div.widget-map-popup-close",this.widget).click(function(){var b=jQuery(this).mgWidgetContainer().attr("id");
jQuery("div.widget-map-popup","#"+b).hide()}).mouseover(function(){jQuery(this).addClass("widget-map-popup-close-hover")}).mouseout(function(){jQuery(this).removeClass("widget-map-popup-close-hover")});this.inputs.btn_submit_2c.bind("click",[this,"bindFormSubmit"]);this.inputs.btn_submit_1c.bind("click",[this,"bindFormSubmit"]);this.inputs.where.bind("keyup",[this,"bindWhereChange"]);this.inputs.search.bind("keyup",[this,"bindSearchChange"]);this.inputs.category.bind("change",[this,"bindCategoryChange"]);
this.inputs.category_1c.bind("change",[this,"bindCategoryChange1c"]);jQuery("li.widget-map-tabs",this.widget).tabs()};gourmetMap.prototype.bindFormSubmit=function(b){var f=this;this.geocoder.getLatLng(this.settings.where.val(),function(e){f.map.setCenter(e,parseInt(f.settings.zoom.val()));f.refreshMap()});b.preventDefault()};
gourmetMap.prototype.bindSearchChange=function(b){if(b.keyCode==13){var f=this;this.geocoder.getLatLng(this.settings.where.val(),function(e){f.map.setCenter(e,parseInt(f.settings.zoom.val()));f.refreshMap()})}else this.settings.search.val(this.inputs.search.val())};gourmetMap.prototype.bindCategoryChange=function(){this.settings.category.val(this.inputs.category.val());this.refreshMap()};
gourmetMap.prototype.bindCategoryChange1c=function(){this.settings.category.val(this.inputs.category_1c.val());this.refreshMap()};gourmetMap.prototype.bindWhereChange=function(b){b.preventDefault();b.stopPropagation();if(b.keyCode==13){var f=this;this.geocoder.getLatLng(this.settings.where.val(),function(e){f.map.setCenter(e,parseInt(f.settings.zoom.val()));f.refreshMap()})}else this.settings.where.val(this.inputs.where.val())};gourmetMap.prototype.loadStarRating=function(){};
gourmetMap.prototype.attachModalBox=function(){jQuery("a.nyroModal",this.widget).nyroModal({modal:false,width:900,height:450,resizeable:true})};gourmetMap.prototype.googleInit=function(){};gourmetMap.prototype.unload=function(){jQuery(window).unbind("load.gourmetMap",[this,"load"]);this.load=function(){}};gourmetMap.prototype.onClickButton=function(){};
gourmetMap.prototype.onClickMoreChoices=function(){jQuery("li.choice-icon",this.widget).toggleClass("choice-icon-selected");jQuery("div.rounded-bottom-corners",this.widget).toggleClass("white-corners");jQuery("li.widget-map-tabs",this.widget).toggle();return false};gourmetMap.prototype.onClickShowCommentForm=function(){jQuery("li.comment-icon",this.widget).toggleClass("comment-icon-selected");jQuery("li.comment-icon a.mappable-show-comment-form",this.widget).next().toggle();return false};
gourmetMap.icons=false;
gourmetMap.prototype.googleInitMarkers=function(){if(!gourmetMap.icons){var b={restaurant:{image:WIDGET_BASE_MEDIA_URL+"/gourmet_map/images/small_marker_restaurant.png"},other:{image:WIDGET_BASE_MEDIA_URL+"/gourmet_map/images/small_marker_organization_school_other.png"},none:{image:WIDGET_BASE_MEDIA_URL+"/gourmet_map/images/small_marker_organization_school_other.png"},club:{image:WIDGET_BASE_MEDIA_URL+"/gourmet_map/images/small_marker_club.png"},event:{image:WIDGET_BASE_MEDIA_URL+"/gourmet_map/images/small_marker_event.png"},
school:{image:WIDGET_BASE_MEDIA_URL+"/gourmet_map/images/small_marker_organization_school_other.png"},organization:{image:WIDGET_BASE_MEDIA_URL+"/gourmet_map/images/small_marker_organization.png"},organisation:{image:WIDGET_BASE_MEDIA_URL+"/gourmet_map/images/small_marker_organization_school_other.png"},market:{image:WIDGET_BASE_MEDIA_URL+"/gourmet_map/images/small_marker_market.png"},supplier:{image:WIDGET_BASE_MEDIA_URL+"/gourmet_map/images/small_marker_supplier_producer.png"},producer:{image:WIDGET_BASE_MEDIA_URL+
"/gourmet_map/images/small_marker_supplier_producer.png"}};gourmetMap.icons={};for(var f in b){gourmetMap.icons[f]=new google.maps.Icon;gourmetMap.icons[f].image=b[f].image;gourmetMap.icons[f].iconSize=new google.maps.Size(28,32);gourmetMap.icons[f].iconAnchor=new google.maps.Point(8,22);gourmetMap.icons[f].infoWindowAnchor=new google.maps.Point(6,3);gourmetMap.icons[f].shadow="";gourmetMap.icons[f].shadowSize=new google.maps.Size(22,20)}}};WIDGET_LOADED.gourmetMap=true;
function recipesTop10(){this.widget=this.wuid=null}recipesTop10.prototype=new mgWidgetObject;recipesTop10.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.recipesTop10",[this,"load"])};recipesTop10.prototype.load=function(){jQuery("li.widget-tabs-nav-item a",this.widget).bind("click",[this,"onClickTab"])};
recipesTop10.prototype.unload=function(){jQuery(window).unbind("load.recipesTop10",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.recipesTop10",[this,"onClickButton"]);this.onClickButton=function(){}};recipesTop10.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};recipesTop10.prototype.onClickButton=function(){alert("you click on the button from the widget recipesTop10 : "+this.wuid)};
recipesTop10.prototype.onClickTab=function(b){b.preventDefault();b=jQuery(b.target,this.widget).parents("li");jQuery("#"+this.wuid+"_widget_settings_sort_by_"+b.attr("id"),this.widget).attr("checked",true);jQuery("li.widget-tabs-nav-item",this.widget).removeClass("widget-tabs-selected");b.addClass("widget-tabs-selected");b=jQuery("form[wuid="+this.wuid+"]",this.widget).serializeArray();b=Portal.linkToAction("recipesTop10","refreshList",this.wuid,b);jQuery.ajax({url:b,cache:false,type:"GET",dataType:"html",
wuid:this.wuid,beforeSend:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(f){Portal.updateWidgetHtmlContent(this.wuid,"#"+this.wuid+" div.widget-content",f)},complete:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}});return false};WIDGET_LOADED.recipesTop10=true;
function userHistories(){this.widget=this.wuid=null}userHistories.prototype=new mgWidgetObject;userHistories.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.userHistories",[this,"load"])};userHistories.prototype.load=function(){this.loadHistories()};
userHistories.prototype.loadHistories=function(){var b=Portal.linkToAction("userHistories","retrieveHistoriesList",this.wuid,{}),f=this;jQuery.getJSON(b,function(e){var a="";for(var d in e){var c=e[d];a+=' <ul class="view-mode-list-first-col">';for(var h in c){var j=c[h];a+='<li class="item-view-mode-list">';a+='  <div class="item-list-picture">';a+='    <a href="'+j.link+'" title="'+j.name+'">'+j.image+"</a>";a+="  </div>";a+='  <div class="item-list-info">';a+='    <a href="'+j.link+'" title="'+
j.name+'">'+j.truncated_name+"</a>";a+='    <div class="item-list-stars"><p class="stars star-'+parseInt(j.note)+'">&nbsp;</p></div>';a+='    <div class="clear"></div>';a+="  </div>";a+='  <div class="clear"></div>';a+="</li>"}a+=" </ul>"}jQuery("div.widget-results-list","#"+f.wuid).html(a)})};userHistories.prototype.unload=function(){};userHistories.prototype.resize=function(){};WIDGET_LOADED.userHistories=true;function blogArticle(){this.widget=this.wuid=null}blogArticle.prototype=new mgWidgetObject;
blogArticle.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.blogArticle",[this,"load"]);jQuery("form#blog_posts_send_to_friends_form").bind("submit",function(){blog_post_sendToFriends(jQuery(this));return false})};blogArticle.prototype.load=function(){jQuery(window).bind("click.blogArticle",[this,"onClickButton"]);jQuery("a#link_print_blog_post").bind("click",function(){window.print();return false})};
blogArticle.prototype.unload=function(){jQuery(window).unbind("load.blogArticle",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.blogArticle",[this,"onClickButton"]);this.onClickButton=function(){}};blogArticle.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};blogArticle.prototype.onClickButton=function(){};
var blog_post_sendToFriends=function(b){jQuery.ajax({type:"GET",dataType:"json",url:b.attr("action"),data:b.serialize(),success:function(f){if(f.hasErrors){jQuery("div.send-popup-error").show();jQuery("div.send-popup-success").hide();for(var e in f.errors)jQuery("#send_to_friends_"+e).addClass("error")}else{jQuery("div.send-popup-error").hide();jQuery("div.send-popup-success").show();jQuery(":input",b).each(function(){var a=this.id;if(this.type=="checkbox")this.checked=false;if(a!="send_to_friends_your_email"&&
a!="send_to_friends_object_id"&&a!="send_to_friends_object_class")this.value=""})}}})};WIDGET_LOADED.blogArticle=true;function blogAboutMe(){this.widget=this.wuid=null}blogAboutMe.prototype=new mgWidgetObject;blogAboutMe.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.blogAboutMe",[this,"load"])};blogAboutMe.prototype.load=function(){jQuery(window).bind("click.blogAboutMe",[this,"onClickButton"])};
blogAboutMe.prototype.unload=function(){jQuery(window).unbind("load.blogAboutMe",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.blogAboutMe",[this,"onClickButton"]);this.onClickButton=function(){}};blogAboutMe.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};blogAboutMe.prototype.onClickButton=function(){};WIDGET_LOADED.blogAboutMe=true;
function seasonRecipes(){this.months=this.seasons=this.months_traduction=this.seasons_traduction=this.widget=this.wuid=null;this.today=new Date;this.month=this.today.getMonth()+1}seasonRecipes.prototype=new mgWidgetObject;seasonRecipes.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.seasonRecipes",[this,"load"])};
seasonRecipes.prototype.load=function(){jQuery("div.slider",this.widget).slider({step:1,min:1,max:12,startValue:parseInt(jQuery("#"+this.wuid+"_widget_settings_month",this.widget).val())});jQuery("div.slider",this.widget).bind("slidestop.seasonRecipes",[this,"onSlideStop"]);jQuery("a.link_view_list",this.widget).bind("click.seasonRecipes",[this,"onClickViewList"]);jQuery("a.link_view_photo",this.widget).bind("click.seasonRecipes",[this,"onClickViewPhoto"]);jQuery("li.short-month",this.winter_traduction).bind("click.seasonRecipes",
[this,"onClickShortMonth"]);this.seasons_traduction=Array("",winter_traduction,winter_traduction,spring_traduction,spring_traduction,spring_traduction,summer_traduction,summer_traduction,summer_traduction,autumn_traduction,autumn_traduction,autumn_traduction,winter_traduction);this.months_traduction=Array("",january_traduction,february_traduction,march_traduction,april_traduction,may_traduction,june_traduction,july_traduction,august_traduction,september_traduction,october_traduction,november_traduction,
december_traduction);this.seasons=Array("","winter","winter","spring","spring","spring","summer","summer","summer","autumn","autumn","autumn","winter");this.months=Array("","january","february","march","april","may","june","july","august","september","october","november","december");var b=jQuery("div.slider",this.widget);parseInt(b.slider("value"));jQuery(this.widget).removeClass();jQuery(this.widget).addClass("widget-container mg-widget-season-recipes "+this.seasons[b.slider("value")])};
seasonRecipes.prototype.onSlideStop=function(b){b.preventDefault();var f=jQuery("div.slider",this.widget),e=parseInt(f.slider("value"));jQuery("#"+this.wuid+"_widget_settings_month",this.widget).val(e);jQuery("ul.slider-steps li",this.widget).removeClass("selected");jQuery("li.month-"+e,this.widget).addClass("selected");jQuery(this.widget).removeClass();jQuery(this.widget).addClass("widget-container mg-widget-season-recipes "+this.seasons[f.slider("value")]);jQuery("div.season-subheader span.season",
this.widget).text(this.seasons_traduction[f.slider("value")]);jQuery("div.season-subheader span.month",this.widget).text(this.months_traduction[f.slider("value")]);this.updateContent(b);return false};seasonRecipes.prototype.unload=function(){jQuery(window).unbind("load.seasonRecipes",[this,"load"]);this.load=function(){}};seasonRecipes.prototype.resize=function(){};seasonRecipes.prototype.onClickButton=function(){};
seasonRecipes.prototype.onClickViewList=function(b){b.preventDefault();jQuery("#"+this.wuid+"_widget_settings_view_mode_image",this.widget).removeAttr("checked");jQuery("#"+this.wuid+"_widget_settings_view_mode_list",this.widget).attr("checked","checked");this.updateContent(b);return false};
seasonRecipes.prototype.onClickViewPhoto=function(b){b.preventDefault();jQuery("#"+this.wuid+"_widget_settings_view_mode_list",this.widget).removeAttr("checked");jQuery("#"+this.wuid+"_widget_settings_view_mode_image",this.widget).attr("checked","checked");this.updateContent(b);return false};
seasonRecipes.prototype.onClickShortMonth=function(b){b.preventDefault();jQuery("div.slider",this.widget);var f=jQuery(b.target).attr("id").split("-")[1];jQuery("#"+this.wuid+"_widget_settings_month",this.widget).val(f);jQuery("ul.slider-steps li",this.widget).removeClass("selected");jQuery("li.month-"+f,this.widget).addClass("selected");jQuery(this.widget).removeClass();jQuery(this.widget).addClass("widget-container mg-widget-season-recipes "+this.seasons[f]);jQuery("div.season-subheader span.season",
this.widget).text(this.seasons_traduction[f]);jQuery("div.season-subheader span.month",this.widget).text(this.months_traduction[f]);this.updateContent(b);return false};
seasonRecipes.prototype.updateContent=function(b){var f=this.wuid;b.preventDefault();if(this.is_guest_mode!="1")jQuery("form.widget-form-settings",this.widget).trigger("submit");else{b=jQuery("form.widget-form-settings",this.widget);b=Portal.linkToAction("seasonRecipes","show",this.wuid,b.serializeArray());jQuery.ajax({type:"POST",cache:false,url:b,beforeSend:function(){jQuery("#"+f+" span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(e){jQuery("div#"+f+
" div.widget-content",this.widget).html(e)},complete:function(){jQuery("#"+f+" span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}})}return false};WIDGET_LOADED.seasonRecipes=true;function blogRecipes(){this.widget=this.wuid=null}blogRecipes.prototype=new mgWidgetObject;blogRecipes.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.blogRecipes",[this,"load"])};
blogRecipes.prototype.load=function(){jQuery(window).bind("click.blogRecipes",[this,"onClickButton"])};blogRecipes.prototype.unload=function(){jQuery(window).unbind("load.blogRecipes",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.blogRecipes",[this,"onClickButton"]);this.onClickButton=function(){}};blogRecipes.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};blogRecipes.prototype.onClickButton=function(){};WIDGET_LOADED.blogRecipes=true;
function blogAddresses(){this.widget=this.wuid=null}blogAddresses.prototype=new mgWidgetObject;blogAddresses.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.blogAddresses",[this,"load"])};blogAddresses.prototype.load=function(){jQuery(window).bind("click.blogAddresses",[this,"onClickButton"])};
blogAddresses.prototype.unload=function(){jQuery(window).unbind("load.blogAddresses",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.blogAddresses",[this,"onClickButton"]);this.onClickButton=function(){}};blogAddresses.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};blogAddresses.prototype.onClickButton=function(){};WIDGET_LOADED.blogAddresses=true;function blogArchive(){this.widget=this.wuid=null}blogArchive.prototype=new mgWidgetObject;
blogArchive.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.blogArchive",[this,"load"]);jQuery("li div.year-classification-control").bind("click",function(){jQuery(this).parent().find("#month_list").toggle(500);jQuery(this).parent().find(".year-classification-control").toggle();return false})};blogArchive.prototype.load=function(){jQuery(window).bind("click.blogArchive",[this,"onClickButton"])};
blogArchive.prototype.unload=function(){jQuery(window).unbind("load.blogArchive",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.blogArchive",[this,"onClickButton"]);this.onClickButton=function(){}};blogArchive.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};blogArchive.prototype.onClickButton=function(){};WIDGET_LOADED.blogArchive=true;function menusSelections(){this.widget=this.wuid=null}menusSelections.prototype=new mgWidgetObject;
menusSelections.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.menusSelections",[this,"load"])};
menusSelections.prototype.load=function(){jQuery("a.link_view_list",this.widget).bind("click.menusSelections",[this,"onClickViewList"]);jQuery("a.link_view_photo",this.widget).bind("click.menusSelections",[this,"onClickViewPhoto"]);jQuery("li.widget-tabs-nav-item a",this.widget).bind("click.menusSelections",[this,"onClickTab"]);jQuery("div.menu-link-"+this.wuid,this.widget).bind("click.menusSelections",[this,"onClickMenu"])};
menusSelections.prototype.unload=function(){jQuery(window).unbind("load.menusSelections",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.menusSelections",[this,"onClickButton"]);this.onClickButton=function(){}};
menusSelections.prototype.onClickViewList=function(b){b.preventDefault();jQuery("#"+this.wuid+"_widget_settings_view_mode_image",this.widget).removeAttr("checked");jQuery("#"+this.wuid+"_widget_settings_view_mode_list",this.widget).attr("checked","checked");this.updateContent(b);return false};
menusSelections.prototype.onClickViewPhoto=function(b){b.preventDefault();jQuery("#"+this.wuid+"_widget_settings_view_mode_list",this.widget).removeAttr("checked");jQuery("#"+this.wuid+"_widget_settings_view_mode_image",this.widget).attr("checked","checked");this.updateContent(b);return false};
menusSelections.prototype.onClickTab=function(b){b.preventDefault();var f=jQuery(b.target,this.widget).parents("li");jQuery("#"+this.wuid+"_widget_settings_selected_"+f.attr("id"),this.widget).attr("checked","checked");this.updateContent(b);return false};menusSelections.prototype.onClickMenu=function(b){document.location.href=jQuery(b.target).attr("goto");return false};menusSelections.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};
menusSelections.prototype.onClickButton=function(){};
menusSelections.prototype.updateContent=function(b){var f=this.wuid;b.preventDefault();if(this.is_guest_mode!="1")jQuery("form.widget-form-settings",this.widget).trigger("submit");else{b=jQuery("form.widget-form-settings",this.widget);b=Portal.linkToAction("menusSelections","show",this.wuid,b.serializeArray());jQuery.ajax({type:"POST",cache:false,url:b,beforeSend:function(){jQuery("#"+f+" span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(e){jQuery("div#"+
f+" div.widget-content",this.widget).html(e)},complete:function(){jQuery("#"+f+" span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}})}return false};WIDGET_LOADED.menusSelections=true;function newsFeed(){this.widget=this.wuid=null}newsFeed.prototype=new mgWidgetObject;newsFeed.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.newsFeed",[this,"load"])};
newsFeed.prototype.load=function(){jQuery(window).bind("click.newsFeed",[this,"onClickButton"]);jQuery("li.widget-tabs-nav-item a",this.widget).bind("click",[this,"onClickTab"])};newsFeed.prototype.unload=function(){jQuery(window).unbind("load.newsFeed",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.newsFeed",[this,"onClickButton"]);this.onClickButton=function(){}};newsFeed.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};
newsFeed.prototype.onClickButton=function(){};
newsFeed.prototype.onClickTab=function(b){b.preventDefault();b=jQuery(b.target,this.widget).parents("li");jQuery("#"+this.wuid+"_widget_settings_sort_by_"+b.attr("id"),this.widget).attr("checked",true);b=jQuery("form[wuid="+this.wuid+"]",this.widget).serializeArray();b=Portal.linkToAction("newsFeed","refreshList",this.wuid,b);jQuery.ajax({url:b,cache:false,type:"GET",dataType:"html",wuid:this.wuid,beforeSend:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(f){Portal.updateWidgetHtmlContent(this.wuid,
"#"+this.wuid+" div.widget-content",f)},complete:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}});return false};WIDGET_LOADED.newsFeed=true;function childrenCorner(){this.widget=this.wuid=null}childrenCorner.prototype=new mgWidgetObject;childrenCorner.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.childrenCorner",[this,"load"])};
childrenCorner.prototype.load=function(){jQuery(this.widget).addClass("w-children-corner");jQuery("li.widget-tabs-nav-item a",this.widget).bind("click",[this,"onClickTab"]);jQuery("a.link-user-recipe",this.widget).bind("click",[this,"updateUserRecipe"]);this.initSendToFriendsPopup()};childrenCorner.prototype.unload=function(){jQuery(window).unbind("load.childrenCorner",[this,"load"]);this.load=function(){};this.onClickButton=function(){}};
childrenCorner.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};childrenCorner.prototype.onClickButton=function(){};
childrenCorner.prototype.updateUserRecipe=function(){if(User.isLogged()){var b=jQuery("#user_recipe_is_published",this.widget);b.attr("value")==0?b.attr("value",1):b.attr("value",0);b=jQuery("form#update_user_recipe_form",this.widget);b=Portal.linkToAction("childrenCorner","updateUserRecipe",this.wuid,b.serializeArray());jQuery.ajax({type:"POST",cache:false,url:b,success:function(){jQuery("a.link-user-recipe",this.widget).toggle()}})}else{jQuery("#login-popup-filler").jqm({ajax:Portal.linkToAction("childrenCorner",
"loginPopup",this.wuid,[]),overlay:50});Site.handleUserAuthentification()}};
childrenCorner.prototype.onClickTab=function(b){b.preventDefault();b=jQuery(b.target,this.widget).parents("li");jQuery("#"+this.wuid+"_widget_settings_category_id_"+b.attr("id"),this.widget).attr("checked",true);jQuery("li.widget-tabs-nav-item",this.widget).removeClass("widget-tabs-selected");b.addClass("widget-tabs-selected");b=jQuery("form[wuid="+this.wuid+"]",this.widget).serializeArray();b=Portal.linkToAction("childrenCorner","show",this.wuid,b);jQuery.ajax({url:b,cache:false,type:"GET",dataType:"html",
wuid:this.wuid,beforeSend:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(f){Portal.updateWidgetHtmlContent(this.wuid,"#"+this.wuid+" div.widget-content",f)},complete:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}});return false};WIDGET_LOADED.childrenCorner=true;
function photoGrid(){this.widget=this.wuid=null}photoGrid.prototype=new mgWidgetObject;photoGrid.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.photoGrid",[this,"load"])};photoGrid.prototype.load=function(){jQuery("li.widget-tabs-nav-item a",this.widget).bind("click",[this,"onClickTab"])};
photoGrid.prototype.unload=function(){jQuery(window).unbind("load.photoGrid",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.photoGrid",[this,"onClickButton"]);this.onClickButton=function(){}};photoGrid.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};photoGrid.prototype.onClickButton=function(){};
photoGrid.prototype.onClickTab=function(b){b.preventDefault();b=jQuery(b.target,this.widget).parents("li");var f=b.attr("id").split("-");jQuery("#"+this.wuid+"_widget_settings_selected_tab",this.widget).val(f[1]);jQuery("li.widget-tabs-nav-item",this.widget).removeClass("widget-tabs-selected");b.addClass("widget-tabs-selected");b=jQuery("form[wuid="+this.wuid+"]",this.widget).serializeArray();b=Portal.linkToAction("photoGrid","show",this.wuid,b);jQuery.ajax({url:b,cache:false,type:"GET",dataType:"html",
wuid:this.wuid,beforeSend:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(e){Portal.updateWidgetHtmlContent(this.wuid,"#"+this.wuid+" div.widget-content",e)},complete:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}});return false};WIDGET_LOADED.photoGrid=true;
function photoGrid1(){this.widget=this.wuid=null}photoGrid1.prototype=new mgWidgetObject;photoGrid1.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.photoGrid1",[this,"load"])};photoGrid1.prototype.load=function(){jQuery("li.widget-tabs-nav-item a",this.widget).bind("click",[this,"onClickTab"])};
photoGrid1.prototype.unload=function(){jQuery(window).unbind("load.photoGrid1",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.photoGrid1",[this,"onClickButton"]);this.onClickButton=function(){}};photoGrid1.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};photoGrid1.prototype.onClickButton=function(){};
photoGrid1.prototype.onClickTab=function(b){b.preventDefault();b=jQuery(b.target,this.widget).parents("li");var f=b.attr("id").split("-");jQuery("#"+this.wuid+"_widget_settings_selected_tab",this.widget).val(f[1]);jQuery("li.widget-tabs-nav-item",this.widget).removeClass("widget-tabs-selected");b.addClass("widget-tabs-selected");b=jQuery("form[wuid="+this.wuid+"]",this.widget).serializeArray();b=Portal.linkToAction("photoGrid1","show",this.wuid,b);jQuery.ajax({url:b,cache:false,type:"GET",dataType:"html",
wuid:this.wuid,beforeSend:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(e){Portal.updateWidgetHtmlContent(this.wuid,"#"+this.wuid+" div.widget-content",e)},complete:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}});return false};WIDGET_LOADED.photoGrid1=true;
function photoGrid2(){this.widget=this.wuid=null}photoGrid2.prototype=new mgWidgetObject;photoGrid2.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.photoGrid2",[this,"load"])};photoGrid2.prototype.load=function(){jQuery("li.widget-tabs-nav-item a",this.widget).bind("click",[this,"onClickTab"])};
photoGrid2.prototype.unload=function(){jQuery(window).unbind("load.photoGrid2",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.photoGrid2",[this,"onClickButton"]);this.onClickButton=function(){}};photoGrid2.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};photoGrid2.prototype.onClickButton=function(){};
photoGrid2.prototype.onClickTab=function(b){b.preventDefault();b=jQuery(b.target,this.widget).parents("li");var f=b.attr("id").split("-");jQuery("#"+this.wuid+"_widget_settings_selected_tab",this.widget).val(f[1]);jQuery("li.widget-tabs-nav-item",this.widget).removeClass("widget-tabs-selected");b.addClass("widget-tabs-selected");b=jQuery("form[wuid="+this.wuid+"]",this.widget).serializeArray();b=Portal.linkToAction("photoGrid2","show",this.wuid,b);jQuery.ajax({url:b,cache:false,type:"GET",dataType:"html",
wuid:this.wuid,beforeSend:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(e){Portal.updateWidgetHtmlContent(this.wuid,"#"+this.wuid+" div.widget-content",e)},complete:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}});return false};WIDGET_LOADED.photoGrid2=true;
function photoGrid3(){this.widget=this.wuid=null}photoGrid3.prototype=new mgWidgetObject;photoGrid3.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.photoGrid3",[this,"load"])};photoGrid3.prototype.load=function(){jQuery("li.widget-tabs-nav-item a",this.widget).bind("click",[this,"onClickTab"])};
photoGrid3.prototype.unload=function(){jQuery(window).unbind("load.photoGrid3",[this,"load"]);this.load=function(){};jQuery(window).unbind("click.photoGrid3",[this,"onClickButton"]);this.onClickButton=function(){}};photoGrid3.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};photoGrid3.prototype.onClickButton=function(){};
photoGrid3.prototype.onClickTab=function(b){b.preventDefault();b=jQuery(b.target,this.widget).parents("li");var f=b.attr("id").split("-");jQuery("#"+this.wuid+"_widget_settings_selected_tab",this.widget).val(f[1]);jQuery("li.widget-tabs-nav-item",this.widget).removeClass("widget-tabs-selected");b.addClass("widget-tabs-selected");b=jQuery("form[wuid="+this.wuid+"]",this.widget).serializeArray();b=Portal.linkToAction("photoGrid3","show",this.wuid,b);jQuery.ajax({url:b,cache:false,type:"GET",dataType:"html",
wuid:this.wuid,beforeSend:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").addClass("widget-loading-indicator-display")},success:function(e){Portal.updateWidgetHtmlContent(this.wuid,"#"+this.wuid+" div.widget-content",e)},complete:function(){jQuery("#"+this.wuid+" h1.widget-header-title span.widget-loading-indicator").removeClass("widget-loading-indicator-display")}});return false};WIDGET_LOADED.photoGrid3=true;
function robuchonPresents(){this.widget=this.wuid=null}robuchonPresents.prototype=new mgWidgetObject;robuchonPresents.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b);jQuery(window).bind("load.robuchonPresents",[this,"load"])};robuchonPresents.prototype.load=function(){jQuery(this.widget).addClass("w-rp")};robuchonPresents.prototype.unload=function(){};robuchonPresents.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};
robuchonPresents.prototype.onClickButton=function(){};WIDGET_LOADED.robuchonPresents=true;function edito(){this.widget=this.wuid=null}edito.prototype=new mgWidgetObject;edito.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b)};edito.prototype.load=function(){};edito.prototype.unload=function(){};edito.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};edito.prototype.onClickButton=function(){};WIDGET_LOADED.edito=true;
function adSense1(){this.widget=this.wuid=null}adSense1.prototype=new mgWidgetObject;adSense1.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b)};adSense1.prototype.load=function(){};adSense1.prototype.unload=function(){};adSense1.prototype.resize=function(){};adSense1.prototype.onClickButton=function(){};WIDGET_LOADED.adSense1=true;function affCommissionJunction1(){this.widget=this.wuid=null}affCommissionJunction1.prototype=new mgWidgetObject;
affCommissionJunction1.prototype.init=function(b){this.wuid=b;this.widget=jQuery("#"+b)};affCommissionJunction1.prototype.load=function(){};affCommissionJunction1.prototype.unload=function(){};affCommissionJunction1.prototype.resize=function(){};affCommissionJunction1.prototype.onClickButton=function(){};WIDGET_LOADED.affCommissionJunction1=true;function quickIdea(){this.widget=this.wuid=null}quickIdea.prototype=new mgWidgetObject;
quickIdea.prototype.init=function(b){this.wuid=b;widget=this.widget=jQuery("#"+b);facet_options={};visual_options={};jQuery("div.checkbox-facets input[type:checkbox]",widget).each(function(f,e){e=jQuery(e);facet_options[e.attr("value")]=e;e.attr("checked")&&jQuery("li.quick-idea-choice-"+e.attr("value")+" a",widget).addClass("active")});this.facet_options=facet_options;jQuery("ul.quick-idea-choices a",widget).data("widget",this).click(function(f){f.preventDefault();f=jQuery(this);f.toggleClass("active");
var e=f.attr("rel"),a=f.data("widget");f.hasClass("active")?a.facet_options[e].attr("checked",true):a.facet_options[e].attr("checked",false);a.updateCounter()}).mouseover(function(){var f=jQuery(this);f.hasClass("active")||f.addClass("hover")}).mouseout(function(){var f=jQuery(this);f.hasClass("active")||f.removeClass("hover")});this.button=jQuery("a.button-results",this.widget);jQuery(window).bind("load.quickIdea",[this,"load"])};quickIdea.prototype.load=function(){this.updateCounter()};
quickIdea.prototype.updateCounter=function(){var b=jQuery("form.widget-form-settings",this.widget);b=Portal.linkToAction("quickIdea","updateCounter",this.wuid,b.serializeArray());jQuery.ajax({type:"GET",processData:true,url:b,widget:this,data:{},dataType:"json",success:function(f){this.widget.updateButton(f)},beforeSend:function(){this.widget.showLoading()},complete:function(){this.widget.hideLoading()}})};
quickIdea.prototype.unload=function(){jQuery(window).unbind("load.quickIdea",[this,"load"]);this.load=function(){}};quickIdea.prototype.updateButton=function(b){jQuery(this.button).attr("href",b.href);jQuery("span span",this.button).html(b.count)};quickIdea.prototype.resize=function(b){log("You have resized the widget to : "+b+"px")};WIDGET_LOADED.quickIdea=true;
var init_main_listeners=function(){jQuery("button, a").focus(function(){jQuery(this).blur()});jQuery(".close-x").bind("mouseover mouseout",function(){jQuery(this).toggleClass("close-x-hover")});jQuery("ul.auto-tabs-nav").tabs({spinner:"",select:function(){jQuery("div.loading-indicator",this).show()},load:function(){jQuery("div.loading-indicator",this).hide()}});jQuery("button.btn").bind("mouseover mouseout",function(){jQuery(this).toggleClass("btn-hover")});if(jQuery.fn.rating){jQuery("form.add-note-form").submit(function(){var d=
jQuery(this);jQuery.ajax({type:"GET",url:d.attr("action"),data:d.serialize()});return false}).each(function(){jQuery("label.star-label",this).hide()});jQuery("form.add-note-form input.etoile").rating({callback:function(){jQuery(this.form).trigger("submit")}})}var b=jQuery("#search-filters");jQuery("div.search-filter-category-title",b).bind("click",function(){jQuery(this).toggleClass("unfold").next().toggle(500)});if(!b.hasClass("disable-auto-folding")){b=jQuery("form.filter-parameters");jQuery("div.search-filter-category-item",
b).hide().each(function(){var d=jQuery("input, select",this).serializeArray();for(var c in d)if(d[c].value!=""){jQuery(this).show();return}jQuery(this).prev().removeClass("unfold")})}jQuery("div.menu-section-description-close").bind("mouseover mouseout",function(){jQuery(this).toggleClass("menu-section-description-close-hover")});b=jQuery("li.cms-menu-element-level-1",jQuery("#header div.cms-main-menu"));var f={},e={};b.each(function(){var d=jQuery(this),c=d.attr("id").slice(5);e[c]=jQuery("#section-"+
c);f[c]=jQuery("#menu-"+c);f[c].data("menu-section",e[c]);e[c].data("menu",f[c]);d.data("menu",f[c]);f[c].prev("li.cms-menu-separator").css("background-position","left top").next("li.cms-menu-separator").css("background-position","left top");e[c].css("left",d.position().left-11)});jQuery.each(e,function(d,c){c.bind("mouseenter",function(){c.data("menu").addClass("menu-hover");c.data("sub-section-active",true)});c.bind("mouseover",function(){c.data("menu").addClass("menu-hover")});c.bind("mouseleave",
function(){c.data("menu").removeClass("menu-hover");c.data("sub-section-active",false);jQuery(this).hide()})});b.bind("mouseover",function(){var d=jQuery(this),c=d.attr("id").slice(5);jQuery.each(f,function(h,j){c!=h&&j.data("menu-section").trigger("mouseleave")});d.addClass("menu-hover");e[c].show()});b.bind("mouseleave",function(){jQuery(this).attr("id").slice(5);jQuery(this).oneTime("50ms","remove-menu",function(){jQuery(this).data("menu").data("menu-section").data("sub-section-active")||jQuery(this).data("menu").data("menu-section").trigger("mouseleave")})});
jQuery("#header div.title").bind("mouseover",function(){jQuery("li.cms-menu-separator",jQuery("#header div.cms-main-menu")).css("background-position","left top");jQuery("li.cms-menu-element-level-1",jQuery("#header div.cms-main-menu")).removeClass("menu-hover");jQuery("div.shadow-full",jQuery("#sub-menu")).hide()});jQuery("li#menu-homepage").bind("mouseover",function(){jQuery("div.cms-main-menu-left").addClass("menu-hover")});jQuery("li#menu-homepage").bind("mouseout",function(){jQuery(this).removeClass("menu-hover");
jQuery(this).next("li.cms-menu-separator").css("background-position","left top");jQuery("div.cms-main-menu-left").removeClass("menu-hover")});jQuery("div.menu-section div.close-x").bind("click",function(){jQuery(this.parentNode).hide()});jQuery("#login-home-trigger").bind("click",function(){jQuery("#login-home-box").slideToggle(function(){jQuery.browser.msie&&this.style.removeAttribute("filter")})});jQuery("div.flash-close").bind("click",function(){jQuery(this.parentNode).hide();return false});var a=
jQuery("#print-banner");jQuery("a.close",a).bind("click",function(){a.toggle(200)});init_PopupListeners();jQuery("#login-popup-filler").jqm({ajax:popup_login_url,overlay:50});jQuery("#delete-popup-filler").jqm({overlay:50});init_TooltipListeners();jQuery("div.blog-admin-customize-small-title").bind("click",function(){jQuery(this).toggleClass("unfold").next().toggle(500)});User.isLogged()&&typeof menu_user_profile_link!="undefined"&&jQuery("li#sub_menu_my_profile span a").attr("href",menu_user_profile_link);
User.isLogged()&&typeof menu_my_messages_link!="undefined"&&jQuery("li#sub_menu_my_messages span a").attr("href",menu_my_messages_link);jQuery("#global-search").autocomplete(keyword_autocomplete_url,jQuery.extend({},{dataType:"json",multiple:true,selectFirst:false,parse:function(d){var c=[];for(key in d)c[c.length]={data:[d[key],key],value:d[key],result:d[key]};return c}},{})).result(function(d){jQuery("#global-search").val(jQuery(d.target).val())});jQuery("#global-search").keyup(function(d){d.keyCode!=
37&&d.keyCode!=38&&d.keyCode!=39&&d.keyCode!=40&&jQuery("#global-search").val(jQuery(d.target).val())});jQuery(window).trigger("main.js")},init_TooltipListeners=function(){jQuery("div.tooltip-trigger, li.tooltip-trigger").bind("mouseover",function(){var f=jQuery("#"+jQuery(this).attr("target")),e=jQuery(this).offset(),a=jQuery(this).width(),d=f.width(),c=f.height();f.offset({left:e.left-(d-a)/2,top:e.top-c});f.show()});jQuery("div.tooltip-trigger, li.tooltip-trigger").bind("mouseout",function(){var f=
jQuery(this).attr("target");jQuery("#"+f).hide()});var b=jQuery("div.tooltip");b.bind("mouseenter",function(){jQuery(this).show()});b.bind("mouseleave",function(){jQuery(this).hide()})},init_PopupListeners=function(){jQuery("li.popup-trigger").bind("click",function(){var b=jQuery(this),f=jQuery("#popup-"+b.attr("target"));if(!b.hasClass("widget-action-send"))if(f.css("display")!="block"){var e=0;if(b.css("padding-top"))e=parseInt(b.css("padding-top").slice(0,-2));var a=0;if(b.css("border-top"))a=
parseInt(b.css("border-top").slice(0,-2));e=e+a;a=b.position();f.css("top",a.top+7+e);f.css("left",a.left-20);f.show();jQuery("div.popup-box-title a",f).css("width",jQuery("a",b).width());b=jQuery("div.popup-box-title",f).width();jQuery("div.shadow-inline",f).css("width",b+20);jQuery("div.shadow-inline div.shadow-right",f).css("width",b);b=jQuery("div.popup-box-content",f).outerWidth();jQuery("div.shadow-full",f).css("width",b)}});jQuery("div.popup-box-title, div.popup-box-close-x").bind("click",
function(){var b=jQuery(this).parents("div.popup-box");b.hasClass("popup-send-widget")||b.hide()})};jQuery(document).ready(function(){init_main_listeners()});
var setLocation=function(b,f){if(b.Status.code!=200)return false;var e=15;switch(b.Placemark[0].AddressDetails.Accuracy){case 1:case 2:e=6;break;case 3:e=9;break;case 4:e=11;break;case 5:e=13;break;case 6:e=14;break;default:e=15;break}point=new GLatLng(b.Placemark[0].Point.coordinates[1],b.Placemark[0].Point.coordinates[0]);f.setCenter(point,e)},User={isLogged:function(){try{return user_information.is_logged}catch(b){return jQuery("ul.user-box-links").length>0||jQuery("a#blog_link_disconnect").length>
0}}},Site={handleUserAuthentification:function(){jQuery("#login-popup-filler").jqmShow()},closeLoginPopup:function(){jQuery("#login-popup-filler").jqmHide()}};function show_confirm(b,f){confirm(f)==true&&document.getElementById(b).submit()};