;(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.10",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);;;(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);;;jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0];h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.10",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case"top":b=0;break;case"middle":b=0.5;break;case"bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case"left":c=0;break;case"center":c=0.5;break;case"right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);;;(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.10",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);;;(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);;;(function($,window){var Sammy,PATH_REPLACER="([^\/]+)",PATH_NAME_MATCHER=/:([\w\d]+)/g,QUERY_STRING_MATCHER=/\?([^#]*)$/,_makeArray=function(nonarray){return Array.prototype.slice.call(nonarray);},_isFunction=function(obj){return Object.prototype.toString.call(obj)==="[object Function]";},_isArray=function(obj){return Object.prototype.toString.call(obj)==="[object Array]";},_decode=function(str){return decodeURIComponent((str||'').replace(/\+/g,' '));},_encode=encodeURIComponent,_escapeHTML=function(s){return String(s).replace(/&(?!\w+;)/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;');},_routeWrapper=function(verb){return function(path,callback){return this.route.apply(this,[verb,path,callback]);};},_template_cache={},_has_history=!!(window.history&&history.pushState),loggers=[];Sammy=function(){var args=_makeArray(arguments),app,selector;Sammy.apps=Sammy.apps||{};if(args.length===0||args[0]&&_isFunction(args[0])){return Sammy.apply(Sammy,['body'].concat(args));}else if(typeof(selector=args.shift())=='string'){app=Sammy.apps[selector]||new Sammy.Application();app.element_selector=selector;if(args.length>0){$.each(args,function(i,plugin){app.use(plugin);});}
if(app.element_selector!=selector){delete Sammy.apps[selector];}
Sammy.apps[app.element_selector]=app;return app;}};Sammy.VERSION='0.7.0';Sammy.addLogger=function(logger){loggers.push(logger);};Sammy.log=function(){var args=_makeArray(arguments);args.unshift("["+Date()+"]");$.each(loggers,function(i,logger){logger.apply(Sammy,args);});};if(typeof window.console!='undefined'){if(_isFunction(window.console.log.apply)){Sammy.addLogger(function(){});}else{Sammy.addLogger(function(){});}}else if(typeof console!='undefined'){Sammy.addLogger(function(){});}
$.extend(Sammy,{makeArray:_makeArray,isFunction:_isFunction,isArray:_isArray});Sammy.Object=function(obj){return $.extend(this,obj||{});};$.extend(Sammy.Object.prototype,{escapeHTML:_escapeHTML,h:_escapeHTML,toHash:function(){var json={};$.each(this,function(k,v){if(!_isFunction(v)){json[k]=v;}});return json;},toHTML:function(){var display="";$.each(this,function(k,v){if(!_isFunction(v)){display+="<strong>"+k+"</strong> "+v+"<br />";}});return display;},keys:function(attributes_only){var keys=[];for(var property in this){if(!_isFunction(this[property])||!attributes_only){keys.push(property);}}
return keys;},has:function(key){return this[key]&&$.trim(this[key].toString())!=='';},join:function(){var args=_makeArray(arguments);var delimiter=args.shift();return args.join(delimiter);},log:function(){Sammy.log.apply(Sammy,arguments);},toString:function(include_functions){var s=[];$.each(this,function(k,v){if(!_isFunction(v)||include_functions){s.push('"'+k+'": '+v.toString());}});return"Sammy.Object: {"+s.join(',')+"}";}});Sammy.DefaultLocationProxy=function(app,run_interval_every){this.app=app;this.is_native=false;this.has_history=_has_history;this._startPolling(run_interval_every);};Sammy.DefaultLocationProxy.fullPath=function(location_obj){var matches=location_obj.toString().match(/^[^#]*(#.+)$/);var hash=matches?matches[1]:'';return[location_obj.pathname,location_obj.search,hash].join('');};Sammy.DefaultLocationProxy.prototype={bind:function(){var proxy=this,app=this.app,lp=Sammy.DefaultLocationProxy;$(window).bind('hashchange.'+this.app.eventNamespace(),function(e,non_native){if(proxy.is_native===false&&!non_native){proxy.is_native=true;window.clearInterval(lp._interval);}
app.trigger('location-changed');});if(_has_history&&!app.disable_push_state){$(window).bind('popstate.'+this.app.eventNamespace(),function(e){app.trigger('location-changed');});$('a').live('click.history-'+this.app.eventNamespace(),function(e){var full_path=lp.fullPath(this);if(this.hostname==window.location.hostname){e.preventDefault();proxy.setLocation(full_path);return false;}});}
if(!lp._bindings){lp._bindings=0;}
lp._bindings++;},unbind:function(){$(window).unbind('hashchange.'+this.app.eventNamespace());$(window).unbind('popstate.'+this.app.eventNamespace());$('a').die('click.history-'+this.app.eventNamespace());Sammy.DefaultLocationProxy._bindings--;if(Sammy.DefaultLocationProxy._bindings<=0){window.clearInterval(Sammy.DefaultLocationProxy._interval);}},getLocation:function(){return Sammy.DefaultLocationProxy.fullPath(window.location);},setLocation:function(new_location){if(/^([^#\/]|$)/.test(new_location)){if(_has_history){new_location='/'+new_location;}else{new_location='#!/'+new_location;}}
if(new_location!=this.getLocation()){if(_has_history&&/^\//.test(new_location)){history.pushState({path:new_location},window.title,new_location);this.app.trigger('location-changed');}else{return(window.location=new_location);}}},_startPolling:function(every){var proxy=this;if(!Sammy.DefaultLocationProxy._interval){if(!every){every=10;}
var hashCheck=function(){var current_location=proxy.getLocation();if(typeof Sammy.DefaultLocationProxy._last_location=='undefined'||current_location!=Sammy.DefaultLocationProxy._last_location){window.setTimeout(function(){$(window).trigger('hashchange',[true]);},0);}
Sammy.DefaultLocationProxy._last_location=current_location;};hashCheck();Sammy.DefaultLocationProxy._interval=window.setInterval(hashCheck,every);}}};Sammy.Application=function(app_function){var app=this;this.routes={};this.listeners=new Sammy.Object({});this.arounds=[];this.befores=[];this.namespace=(new Date()).getTime()+'-'+parseInt(Math.random()*1000,10);this.context_prototype=function(){Sammy.EventContext.apply(this,arguments);};this.context_prototype.prototype=new Sammy.EventContext();if(_isFunction(app_function)){app_function.apply(this,[this]);}
if(!this._location_proxy){this.setLocationProxy(new Sammy.DefaultLocationProxy(this,this.run_interval_every));}
if(this.debug){this.bindToAllEvents(function(e,data){app.log(app.toString(),e.cleaned_type,data||{});});}};Sammy.Application.prototype=$.extend({},Sammy.Object.prototype,{ROUTE_VERBS:['get','post','put','delete'],APP_EVENTS:['run','unload','lookup-route','run-route','route-found','event-context-before','event-context-after','changed','error','check-form-submission','redirect','location-changed'],_last_route:null,_location_proxy:null,_running:false,element_selector:'body',debug:false,raise_errors:false,run_interval_every:50,disable_push_state:false,template_engine:null,toString:function(){return'Sammy.Application:'+this.element_selector;},$element:function(selector){return selector?$(this.element_selector).find(selector):$(this.element_selector);},use:function(){var args=_makeArray(arguments),plugin=args.shift(),plugin_name=plugin||'';try{args.unshift(this);if(typeof plugin=='string'){plugin_name='Sammy.'+plugin;plugin=Sammy[plugin];}
plugin.apply(this,args);}catch(e){if(typeof plugin==='undefined'){this.error("Plugin Error: called use() but plugin ("+plugin_name.toString()+") is not defined",e);}else if(!_isFunction(plugin)){this.error("Plugin Error: called use() but '"+plugin_name.toString()+"' is not a function",e);}else{this.error("Plugin Error",e);}}
return this;},setLocationProxy:function(new_proxy){var original_proxy=this._location_proxy;this._location_proxy=new_proxy;if(this.isRunning()){if(original_proxy){original_proxy.unbind();}
this._location_proxy.bind();}},route:function(verb,path,callback){var app=this,param_names=[],add_route,path_match;if(!callback&&_isFunction(path)){path=verb;callback=path;verb='any';}
verb=verb.toLowerCase();if(path.constructor==String){PATH_NAME_MATCHER.lastIndex=0;while((path_match=PATH_NAME_MATCHER.exec(path))!==null){param_names.push(path_match[1]);}
path=new RegExp(path.replace(PATH_NAME_MATCHER,PATH_REPLACER)+"$");}
if(typeof callback=='string'){callback=app[callback];}
add_route=function(with_verb){var r={verb:with_verb,path:path,callback:callback,param_names:param_names};app.routes[with_verb]=app.routes[with_verb]||[];app.routes[with_verb].push(r);};if(verb==='any'){$.each(this.ROUTE_VERBS,function(i,v){add_route(v);});}else{add_route(verb);}
return this;},get:_routeWrapper('get'),post:_routeWrapper('post'),put:_routeWrapper('put'),del:_routeWrapper('delete'),any:_routeWrapper('any'),mapRoutes:function(route_array){var app=this;$.each(route_array,function(i,route_args){app.route.apply(app,route_args);});return this;},eventNamespace:function(){return['sammy-app',this.namespace].join('-');},bind:function(name,data,callback){var app=this;if(typeof callback=='undefined'){callback=data;}
var listener_callback=function(){var e,context,data;e=arguments[0];data=arguments[1];if(data&&data.context){context=data.context;delete data.context;}else{context=new app.context_prototype(app,'bind',e.type,data,e.target);}
e.cleaned_type=e.type.replace(app.eventNamespace(),'');callback.apply(context,[e,data]);};if(!this.listeners[name]){this.listeners[name]=[];}
this.listeners[name].push(listener_callback);if(this.isRunning()){this._listen(name,listener_callback);}
return this;},trigger:function(name,data){this.$element().trigger([name,this.eventNamespace()].join('.'),[data]);return this;},refresh:function(){this.last_location=null;this.trigger('location-changed');return this;},before:function(options,callback){if(_isFunction(options)){callback=options;options={};}
this.befores.push([options,callback]);return this;},after:function(callback){return this.bind('event-context-after',callback);},around:function(callback){this.arounds.push(callback);return this;},isRunning:function(){return this._running;},helpers:function(extensions){$.extend(this.context_prototype.prototype,extensions);return this;},helper:function(name,method){this.context_prototype.prototype[name]=method;return this;},run:function(start_url){if(this.isRunning()){return false;}
var app=this;$.each(this.listeners.toHash(),function(name,callbacks){$.each(callbacks,function(i,listener_callback){app._listen(name,listener_callback);});});this.trigger('run',{start_url:start_url});this._running=true;this.last_location=null;if(!(/\#(.+)/.test(this.getLocation()))&&typeof start_url!='undefined'){this.setLocation(start_url);}
this._checkLocation();this._location_proxy.bind();this.bind('location-changed',function(){app._checkLocation();});this.bind('submit',function(e){var returned=app._checkFormSubmission($(e.target).closest('form'));return(returned===false)?e.preventDefault():false;});$(window).bind('beforeunload',function(){app.unload();});return this.trigger('changed');},unload:function(){if(!this.isRunning()){return false;}
var app=this;this.trigger('unload');this._location_proxy.unbind();this.$element().unbind('submit').removeClass(app.eventNamespace());$.each(this.listeners.toHash(),function(name,listeners){$.each(listeners,function(i,listener_callback){app._unlisten(name,listener_callback);});});this._running=false;return this;},bindToAllEvents:function(callback){var app=this;$.each(this.APP_EVENTS,function(i,e){app.bind(e,callback);});$.each(this.listeners.keys(true),function(i,name){if($.inArray(name,app.APP_EVENTS)==-1){app.bind(name,callback);}});return this;},routablePath:function(path){return path.replace(QUERY_STRING_MATCHER,'');},lookupRoute:function(verb,path){var app=this,routed=false,i=0,l,route;if(typeof this.routes[verb]!='undefined'){l=this.routes[verb].length;for(;i<l;i++){route=this.routes[verb][i];if(app.routablePath(path).match(route.path)){routed=route;break;}}}
return routed;},runRoute:function(verb,path,params,target){var app=this,route=this.lookupRoute(verb,path),context,wrapped_route,arounds,around,befores,before,callback_args,path_params,final_returned;this.log('runRoute',[verb,path].join(' '));this.trigger('run-route',{verb:verb,path:path,params:params});if(typeof params=='undefined'){params={};}
$.extend(params,this._parseQueryString(path));if(route){this.trigger('route-found',{route:route});if((path_params=route.path.exec(this.routablePath(path)))!==null){path_params.shift();$.each(path_params,function(i,param){if(route.param_names[i]){params[route.param_names[i]]=_decode(param);}else{if(!params.splat){params.splat=[];}
params.splat.push(_decode(param));}});}
context=new this.context_prototype(this,verb,path,params,target);arounds=this.arounds.slice(0);befores=this.befores.slice(0);callback_args=[context].concat(params.splat);wrapped_route=function(){var returned;while(befores.length>0){before=befores.shift();if(app.contextMatchesOptions(context,before[0])){returned=before[1].apply(context,[context]);if(returned===false){return false;}}}
app.last_route=route;context.trigger('event-context-before',{context:context});returned=route.callback.apply(context,callback_args);context.trigger('event-context-after',{context:context});return returned;};$.each(arounds.reverse(),function(i,around){var last_wrapped_route=wrapped_route;wrapped_route=function(){return around.apply(context,[last_wrapped_route]);};});try{final_returned=wrapped_route();}catch(e){this.error(['500 Error',verb,path].join(' '),e);}
return final_returned;}else{return this.notFound(verb,path);}},contextMatchesOptions:function(context,match_options,positive){var options=match_options;if(typeof options==='undefined'||options=={}){return true;}
if(typeof positive==='undefined'){positive=true;}
if(typeof options==='string'||_isFunction(options.test)){options={path:options};}
if(options.only){return this.contextMatchesOptions(context,options.only,true);}else if(options.except){return this.contextMatchesOptions(context,options.except,false);}
var path_matched=true,verb_matched=true;if(options.path){if(!_isFunction(options.path.test)){options.path=new RegExp(options.path.toString()+'$');}
path_matched=options.path.test(context.path);}
if(options.verb){if(typeof options.verb==='string'){verb_matched=options.verb===context.verb;}else{verb_matched=options.verb.indexOf(context.verb)>-1;}}
return positive?(verb_matched&&path_matched):!(verb_matched&&path_matched);},getLocation:function(){return this._location_proxy.getLocation();},setLocation:function(new_location){return this._location_proxy.setLocation(new_location);},swap:function(content){return this.$element().html(content);},templateCache:function(key,value){if(typeof value!='undefined'){return _template_cache[key]=value;}else{return _template_cache[key];}},clearTemplateCache:function(){return _template_cache={};},notFound:function(verb,path){var ret=this.error(['404 Not Found',verb,path].join(' '));return(verb==='get')?ret:true;},error:function(message,original_error){if(!original_error){original_error=new Error();}
original_error.message=[message,original_error.message].join(' ');this.trigger('error',{message:original_error.message,error:original_error});if(this.raise_errors){throw(original_error);}else{this.log(original_error.message,original_error);}},_checkLocation:function(){var location,returned;location=this.getLocation();if(!this.last_location||this.last_location[0]!='get'||this.last_location[1]!=location){this.last_location=['get',location];returned=this.runRoute('get',location);}
return returned;},_getFormVerb:function(form){var $form=$(form),verb,$_method;$_method=$form.find('input[name="_method"]');if($_method.length>0){verb=$_method.val();}
if(!verb){verb=$form[0].getAttribute('method');}
if(!verb||verb==''){verb='get';}
return $.trim(verb.toString().toLowerCase());},_checkFormSubmission:function(form){var $form,path,verb,params,returned;this.trigger('check-form-submission',{form:form});$form=$(form);path=$form.attr('action')||'';verb=this._getFormVerb($form);this.log('_checkFormSubmission',$form,path,verb);if(verb==='get'){this.setLocation(path+'?'+this._serializeFormParams($form));returned=false;}else{params=$.extend({},this._parseFormParams($form));returned=this.runRoute(verb,path,params,form.get(0));}
return(typeof returned=='undefined')?false:returned;},_serializeFormParams:function($form){var queryString="",fields=$form.serializeArray(),i;if(fields.length>0){queryString=this._encodeFormPair(fields[0].name,fields[0].value);for(i=1;i<fields.length;i++){queryString=queryString+"&"+this._encodeFormPair(fields[i].name,fields[i].value);}}
return queryString;},_encodeFormPair:function(name,value){return _encode(name)+"="+_encode(value);},_parseFormParams:function($form){var params={},form_fields=$form.serializeArray(),i;for(i=0;i<form_fields.length;i++){params=this._parseParamPair(params,form_fields[i].name,form_fields[i].value);}
return params;},_parseQueryString:function(path){var params={},parts,pairs,pair,i;parts=path.match(QUERY_STRING_MATCHER);if(parts){pairs=parts[1].split('&');for(i=0;i<pairs.length;i++){pair=pairs[i].split('=');params=this._parseParamPair(params,_decode(pair[0]),_decode(pair[1]||""));}}
return params;},_parseParamPair:function(params,key,value){if(params[key]){if(_isArray(params[key])){params[key].push(value);}else{params[key]=[params[key],value];}}else{params[key]=value;}
return params;},_listen:function(name,callback){return this.$element().bind([name,this.eventNamespace()].join('.'),callback);},_unlisten:function(name,callback){return this.$element().unbind([name,this.eventNamespace()].join('.'),callback);}});Sammy.RenderContext=function(event_context){this.event_context=event_context;this.callbacks=[];this.previous_content=null;this.content=null;this.next_engine=false;this.waiting=false;};Sammy.RenderContext.prototype=$.extend({},Sammy.Object.prototype,{then:function(callback){if(!_isFunction(callback)){if(typeof callback==='string'&&callback in this.event_context){var helper=this.event_context[callback];callback=function(content){return helper.apply(this.event_context,[content]);};}else{return this;}}
var context=this;if(this.waiting){this.callbacks.push(callback);}else{this.wait();window.setTimeout(function(){var returned=callback.apply(context,[context.content,context.previous_content]);if(returned!==false){context.next(returned);}},0);}
return this;},wait:function(){this.waiting=true;},next:function(content){this.waiting=false;if(typeof content!=='undefined'){this.previous_content=this.content;this.content=content;}
if(this.callbacks.length>0){this.then(this.callbacks.shift());}},load:function(location,options,callback){var context=this;return this.then(function(){var should_cache,cached,is_json,location_array;if(_isFunction(options)){callback=options;options={};}else{options=$.extend({},options);}
if(callback){this.then(callback);}
if(typeof location==='string'){is_json=(location.match(/\.json$/)||options.json);should_cache=((is_json&&options.cache===true)||options.cache!==false);context.next_engine=context.event_context.engineFor(location);delete options.cache;delete options.json;if(options.engine){context.next_engine=options.engine;delete options.engine;}
if(should_cache&&(cached=this.event_context.app.templateCache(location))){return cached;}
this.wait();$.ajax($.extend({url:location,data:{},dataType:is_json?'json':null,type:'get',success:function(data){if(should_cache){context.event_context.app.templateCache(location,data);}
context.next(data);}},options));return false;}else{if(location.nodeType){return location.innerHTML;}
if(location.selector){context.next_engine=location.attr('data-engine');if(options.clone===false){return location.remove()[0].innerHTML.toString();}else{return location[0].innerHTML.toString();}}}});},loadPartials:function(partials){if(partials){this.partials=this.partials||{};for(name in partials){this.load(partials[name]).then(function(template){this.partials[name]=template;});}}
return this;},render:function(location,data,callback,partials){if(_isFunction(location)&&!data){return this.then(location);}else{return this.loadPartials(partials).load(location).interpolate(data,location).then(callback);}},partial:function(location,data){return this.render(location,data).swap();},send:function(){var context=this,args=_makeArray(arguments),fun=args.shift();if(_isArray(args[0])){args=args[0];}
return this.then(function(content){args.push(function(response){context.next(response);});context.wait();fun.apply(fun,args);return false;});},collect:function(array,callback,now){var context=this;var coll=function(){if(_isFunction(array)){callback=array;array=this.content;}
var contents=[],doms=false;$.each(array,function(i,item){var returned=callback.apply(context,[i,item]);if(returned.jquery&&returned.length==1){returned=returned[0];doms=true;}
contents.push(returned);return returned;});return doms?contents:contents.join('');};return now?coll():this.then(coll);},renderEach:function(location,name,data,callback){if(_isArray(name)){callback=data;data=name;name=null;}
return this.load(location).then(function(content){var rctx=this;if(!data){data=_isArray(this.previous_content)?this.previous_content:[];}
if(callback){$.each(data,function(i,value){var idata={},engine=this.next_engine||location;name?(idata[name]=value):(idata=value);callback(value,rctx.event_context.interpolate(content,idata,engine));});}else{return this.collect(data,function(i,value){var idata={},engine=this.next_engine||location;name?(idata[name]=value):(idata=value);return this.event_context.interpolate(content,idata,engine);},true);}});},interpolate:function(data,engine,retain){var context=this;return this.then(function(content,prev){if(!data&&prev){data=prev;}
if(this.next_engine){engine=this.next_engine;this.next_engine=false;}
var rendered=context.event_context.interpolate(content,data,engine,this.partials);return retain?prev+rendered:rendered;});},swap:function(){return this.then(function(content){this.event_context.swap(content);}).trigger('changed',{});},appendTo:function(selector){return this.then(function(content){$(selector).append(content);}).trigger('changed',{});},prependTo:function(selector){return this.then(function(content){$(selector).prepend(content);}).trigger('changed',{});},replace:function(selector){return this.then(function(content){$(selector).html(content);}).trigger('changed',{});},trigger:function(name,data){return this.then(function(content){if(typeof data=='undefined'){data={content:content};}
this.event_context.trigger(name,data);});}});Sammy.EventContext=function(app,verb,path,params,target){this.app=app;this.verb=verb;this.path=path;this.params=new Sammy.Object(params);this.target=target;};Sammy.EventContext.prototype=$.extend({},Sammy.Object.prototype,{$element:function(){return this.app.$element(_makeArray(arguments).shift());},engineFor:function(engine){var context=this,engine_match;if(_isFunction(engine)){return engine;}
engine=(engine||context.app.template_engine).toString();if((engine_match=engine.match(/\.([^\.\?\#]+)$/))){engine=engine_match[1];}
if(engine&&_isFunction(context[engine])){return context[engine];}
if(context.app.template_engine){return this.engineFor(context.app.template_engine);}
return function(content,data){return content;};},interpolate:function(content,data,engine,partials){return this.engineFor(engine).apply(this,[content,data,partials]);},render:function(location,data,callback,partials){return new Sammy.RenderContext(this).render(location,data,callback,partials);},renderEach:function(location,name,data,callback){return new Sammy.RenderContext(this).renderEach(location,name,data,callback);},load:function(location,options,callback){return new Sammy.RenderContext(this).load(location,options,callback);},partial:function(location,data){return new Sammy.RenderContext(this).partial(location,data);},send:function(){var rctx=new Sammy.RenderContext(this);return rctx.send.apply(rctx,arguments);},redirect:function(){var to,args=_makeArray(arguments),current_location=this.app.getLocation(),l=args.length;if(l>1){var i=0,paths=[],pairs=[],params={},has_params=false;for(;i<l;i++){if(typeof args[i]=='string'){paths.push(args[i]);}else{$.extend(params,args[i]);has_params=true;}}
to=paths.join('/');if(has_params){for(var k in params){pairs.push(this.app._encodeFormPair(k,params[k]));}
to+='?'+pairs.join('&');}}else{to=args[0];}
this.trigger('redirect',{to:to});this.app.last_location=[this.verb,this.path];this.app.setLocation(to);if(new RegExp(to).test(current_location)){this.app.trigger('location-changed');}},trigger:function(name,data){if(typeof data=='undefined'){data={};}
if(!data.context){data.context=this;}
return this.app.trigger(name,data);},eventNamespace:function(){return this.app.eventNamespace();},swap:function(contents){return this.app.swap(contents);},notFound:function(){return this.app.notFound(this.verb,this.path);},json:function(string){return $.parseJSON(string);},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(' ');}});$.sammy=window.Sammy=Sammy;})(jQuery,window);;;(function($){Sammy=Sammy||{};Sammy.Store=function(options){var store=this;this.options=options||{};this.name=this.options.name||'store';this.element=this.options.element||'body';this.$element=$(this.element);if($.isArray(this.options.type)){$.each(this.options.type,function(i,type){if(Sammy.Store.isAvailable(type)){store.type=type;return false;}});}else{this.type=this.options.type||'memory';}
this.meta_key=this.options.meta_key||'__keys__';this.storage=new Sammy.Store[Sammy.Store.stores[this.type]](this.name,this.element,this.options);};Sammy.Store.stores={'memory':'Memory','data':'Data','local':'LocalStorage','session':'SessionStorage','cookie':'Cookie'};$.extend(Sammy.Store.prototype,{isAvailable:function(){if($.isFunction(this.storage.isAvailable)){return this.storage.isAvailable();}else{true;}},exists:function(key){return this.storage.exists(key);},set:function(key,value){var string_value=(typeof value=='string')?value:JSON.stringify(value);key=key.toString();this.storage.set(key,string_value);if(key!=this.meta_key){this._addKey(key);this.$element.trigger('set-'+this.name,{key:key,value:value});this.$element.trigger('set-'+this.name+'-'+key,{key:key,value:value});};return value;},get:function(key){var value=this.storage.get(key);if(typeof value=='undefined'||value==null||value==''){return value;}
try{return JSON.parse(value);}catch(e){return value;}},clear:function(key){this._removeKey(key);return this.storage.clear(key);},clearAll:function(){var self=this;this.each(function(key,value){self.clear(key);});},keys:function(){return this.get(this.meta_key)||[];},each:function(callback){var i=0,keys=this.keys(),returned;for(i;i<keys.length;i++){returned=callback(keys[i],this.get(keys[i]));if(returned===false){return false;}};},filter:function(callback){var found=[];this.each(function(key,value){if(callback(key,value)){found.push([key,value]);}
return true;});return found;},first:function(callback){var found=false;this.each(function(key,value){if(callback(key,value)){found=[key,value];return false;}});return found;},fetch:function(key,callback){if(!this.exists(key)){return this.set(key,callback.apply(this));}else{return this.get(key);}},load:function(key,path,callback){var s=this;$.get(path,function(response){s.set(key,response);if(callback){callback.apply(this,[response]);}});},_addKey:function(key){var keys=this.keys();if($.inArray(key,keys)==-1){keys.push(key);}
this.set(this.meta_key,keys);},_removeKey:function(key){var keys=this.keys();var index=$.inArray(key,keys);if(index!=-1){keys.splice(index,1);}
this.set(this.meta_key,keys);}});Sammy.Store.isAvailable=function(type){try{return Sammy.Store[Sammy.Store.stores[type]].prototype.isAvailable();}catch(e){return false;}};Sammy.Store.Memory=function(name,element){this.name=name;this.element=element;this.namespace=[this.element,this.name].join('.');Sammy.Store.Memory.store=Sammy.Store.Memory.store||{};Sammy.Store.Memory.store[this.namespace]=Sammy.Store.Memory.store[this.namespace]||{};this.store=Sammy.Store.Memory.store[this.namespace];};$.extend(Sammy.Store.Memory.prototype,{isAvailable:function(){return true;},exists:function(key){return(typeof this.store[key]!="undefined");},set:function(key,value){return this.store[key]=value;},get:function(key){return this.store[key];},clear:function(key){delete this.store[key];}});Sammy.Store.Data=function(name,element){this.name=name;this.element=element;this.$element=$(element);};$.extend(Sammy.Store.Data.prototype,{isAvailable:function(){return true;},exists:function(key){return!!this.$element.data(this._key(key));},set:function(key,value){return this.$element.data(this._key(key),value);},get:function(key){return this.$element.data(this._key(key));},clear:function(key){this.$element.removeData(this._key(key));},_key:function(key){return['store',this.name,key].join('.');}});Sammy.Store.LocalStorage=function(name,element){this.name=name;this.element=element;};$.extend(Sammy.Store.LocalStorage.prototype,{isAvailable:function(){return('localStorage'in window)&&(window.location.protocol!='file:');},exists:function(key){return(this.get(key)!=null);},set:function(key,value){return window.localStorage.setItem(this._key(key),value);},get:function(key){return window.localStorage.getItem(this._key(key));},clear:function(key){window.localStorage.removeItem(this._key(key));;},_key:function(key){return['store',this.element,this.name,key].join('.');}});Sammy.Store.SessionStorage=function(name,element){this.name=name;this.element=element;};$.extend(Sammy.Store.SessionStorage.prototype,{isAvailable:function(){return('sessionStorage'in window)&&(window.location.protocol!='file:')&&($.isFunction(window.sessionStorage.setItem));},exists:function(key){return(this.get(key)!=null);},set:function(key,value){return window.sessionStorage.setItem(this._key(key),value);},get:function(key){var value=window.sessionStorage.getItem(this._key(key));if(value&&typeof value.value!="undefined"){value=value.value}
return value;},clear:function(key){window.sessionStorage.removeItem(this._key(key));;},_key:function(key){return['store',this.element,this.name,key].join('.');}});Sammy.Store.Cookie=function(name,element,options){this.name=name;this.element=element;this.options=options||{};this.path=this.options.path||'/';this.expires_in=this.options.expires_in||(14*24*60*60);};$.extend(Sammy.Store.Cookie.prototype,{isAvailable:function(){return('cookie'in document)&&(window.location.protocol!='file:');},exists:function(key){return(this.get(key)!=null);},set:function(key,value){return this._setCookie(key,value);},get:function(key){return this._getCookie(key);},clear:function(key){this._setCookie(key,"",-1);},_key:function(key){return['store',this.element,this.name,key].join('.');},_getCookie:function(key){var escaped=this._key(key).replace(/(\.|\*|\(|\)|\[|\])/g,'\\$1');var match=document.cookie.match("(^|;\\s)"+escaped+"=([^;]*)(;|$)")
return(match?match[2]:null);},_setCookie:function(key,value,expires){if(!expires){expires=(this.expires_in*1000)}
var date=new Date();date.setTime(date.getTime()+expires);var set_cookie=[this._key(key),"=",value,"; expires=",date.toGMTString(),"; path=",this.path].join('');document.cookie=set_cookie;}});Sammy.Storage=function(app){this.use(Sammy.JSON);this.stores=this.stores||{};this.store=function(name,options){if(typeof this.stores[name]=='undefined'){var clear_method_name="clear"+name.substr(0,1).toUpperCase()+name.substr(1);this.stores[name]=new Sammy.Store($.extend({name:name,element:this.element_selector},options||{}));this[name]=function(key,value){if(typeof value=='undefined'){return this.stores[name].get(key);}else if($.isFunction(value)){return this.stores[name].fetch(key,value);}else{return this.stores[name].set(key,value)}};this[clear_method_name]=function(){return this.stores[name].clearAll();}
this.helper(name,function(){return this.app[name].apply(this.app,arguments);});this.helper(clear_method_name,function(){return this.app[clear_method_name]();});}
return this.stores[name];};this.helpers({store:function(){return this.app.store.apply(this.app,arguments);}});};Sammy.Session=function(app,options){this.use(Sammy.Storage);this.store('session',$.extend({type:['local','cookie','memory']},options));};Sammy.Cache=function(app,options){this.use(Sammy.Storage);this.cache_partials=true;this.store('cache',$.extend({type:['local','session','memory']},options));};})(jQuery);;;(function($)
{var name="frontcontroller";var qn="code28."+name;var eventQn="."+qn;var xtnds=$.Widget;var spr=xtnds.prototype;$.widget(qn,xtnds,{options:{},getSammy:function()
{return this._app;},getRouter:function()
{return this._app;},_create:function()
{$.ajaxSetup({});spr._create.apply(this,arguments);var $widget=this.widget();var o=this;this._store=new Sammy.Store();this._app=$.sammy("body");var app=this._app;var proxy=app._location_proxy;if(!proxy.has_history){var href=location.href;if(href.indexOf("#!")==-1){href=href.replace(/http:\/\/[^\/]+/i,"");if(href!="/"){location.href="/#!"+href;return false;}}
var lp=Sammy.DefaultLocationProxy;$('a').live('click.history-'+this._app.eventNamespace(),function(e){var full_path=lp.fullPath(this);if(this.hostname==window.location.hostname||this.hostname==""){e.preventDefault();if(full_path.indexOf("/")!=0){full_path="/"+full_path;}
proxy.setLocation("#!"+full_path);return false;}});}
this._app.notFound=$.proxy(o,"_notFound");this._app.run();this.track=true;},hasHistory:function()
{return this._app._location_proxy.has_history;},_getPath:function(path)
{var pos=path.indexOf("#!");if(pos!=-1){path=path.substr(pos+2);}
return path;},_notFound:function(verb,path)
{var a=new Array();this._request(verb,this._getPath(path),a);},_request:function(verb,path,deferred)
{if(path.indexOf("#!")!=-1){}
if(window._gaq!=null&&this.track){window._gaq.push(['_trackPageview']);}
var o=this;if(false){this.__response(path,data);}else{var xhr=$.get(path+"index.xml",{dataType:"html"});deferred.push(xhr);$.when.apply(null,deferred).done(function(data)
{o.__response(path,xhr.responseText);});}},_setTitle:function($newtitle)
{var $widget=this.widget();var $head=$widget.find("head");var $title=$head.find("title");var title=$.trim($newtitle.attr("content"))+" - "+$.trim(document.title.split(" - ")[1]);document.title=title;$newtitle.remove();},_normalize:function(response)
{var $widget=this.widget();if(response.indexOf("DOCTYPE")!=-1){var temp=response.split("body>");response=temp[1];response=response.substr(0,response.length-2);response="<div>"+response+"</div>";response=$(response).find("#body").html();}
var $response=$(response);return $(response);},_meta:function($response)
{var $widget=this.widget();var $script;if($response.is("script")){$script=$response;}else{$script=$response.find("script");}
if($script.length==0){return;}
var $data=$("<div>").append($script.html());var $head=$widget.find("head");this._setTitle($data.find("meta[name='title']"));var temp=new Array();$.each($widget.attr("class").split(" "),function()
{if(!this.indexOf("t-")==0){temp.push(this);}});var $meta;$meta=$data.find("meta[property=app\\:class]");if($meta.length==1){temp.push($meta.attr("content"));}
$meta.remove();$meta=$data.find("meta[property=app\\:id]");if($meta.length==1){$widget.attr("id",$meta.attr("content"));}
$meta.remove();$widget.attr("class",$.trim(temp.join(" ")));$widget.find("head").find("meta[property^=og]").remove()
$data.find("meta[property^=og]").each(function()
{$head.append(this);});},__response:function(path,response)
{var $response=this._normalize(response);var shouldReplace=this._before(path,$response);this._meta($response);if(shouldReplace!==false){this._response(path,$response);this._after(path,$response);}},_before:function(path,$response)
{return true;},_after:function(path,$response)
{var $widget=this.widget();if(!$widget.hasClass("app-created")){$widget.addClass("app-created");}
this._widgets();},_widgets:function()
{},_response:function(path,$response)
{var $widget=this.widget();var sel="#body";var $sel=$widget.find(sel);$sel.empty().html($response);}});})(jQuery);;;(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.10",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);;;(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);;;(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(true===c.data(b.target,a.widgetName+".preventClickEvent")){c.removeData(b.target,a.widgetName+".preventClickEvent");b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&c.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);;;(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.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";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;e=this.originalPageX+Math.round((e-this.originalPageX)/b.grid[0])*b.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?e:!(e-this.offset.click.left<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:g-this.offset.click.top-
this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.10"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var g=d.data(this,"sortable");if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","iframeFix",{start:function(){var a=d(this).data("draggable").options;d(a.iframeFix===true?"iframe":a.iframeFix).each(function(){d('<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(d(this).offset()).appendTo("body")})},stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-
c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-
(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,g=b.offset.left,n=g+c.helperProportions.width,m=b.offset.top,o=m+c.helperProportions.height,h=c.snapElements.length-1;h>=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e<g&&g<k+e&&j-e<m&&m<l+e||i-e<g&&g<k+e&&j-e<o&&o<l+e||i-e<n&&n<k+e&&j-e<m&&m<l+e||i-e<n&&n<k+e&&j-e<o&&o<l+e){if(f.snapMode!="inner"){var p=Math.abs(j-o)<=e,q=Math.abs(l-m)<=e,r=Math.abs(i-n)<=e,s=Math.abs(k-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left}var t=p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(j-m)<=e;q=Math.abs(l-o)<=e;r=Math.abs(i-g)<=e;s=Math.abs(k-n)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||q||r||s||t}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);;;(function($)
{var name="scrollbar";var qn="code28."+name;var eventQn="."+qn;var xtnds=$.Widget;var spr=xtnds.prototype;var $window=$(window);$.widget(qn,xtnds,{options:{direction:"vertical"},_create:function()
{if($("html").hasClass("touch")){return;}
spr._create.apply(this,arguments);var $widget=this.widget();var options=this.options;$widget.addClass(options.direction);this.positionProperty=options.direction=="vertical"?"top":"left";this.dimensionProperty=options.direction=="vertical"?"height":"width";this.scrollPositionProperty="scroll"+this.positionProperty.replace(/^(.)|\s(.)/g,function($1){return $1.toUpperCase()});this.scrollDimensionProperty="scroll"+this.dimensionProperty.replace(/^(.)|\s(.)/g,function($1){return $1.toUpperCase()});$widget.css({overflow:"hidden",position:"relative"});$widget.append('<div class="scrollbar track"><a href="#" class="thumb"></a></div>');this.$content=$widget;this.$track=$widget.find(".track");this.$thumb=$widget.find(".thumb");var track={position:"absolute"};track[this.positionProperty=="left"?"left":"right"]=0;track[this.positionProperty=="left"?"bottom":"top"]=0;this.$track.css(track);this.$thumb.draggable({containment:'parent',drag:$.proxy(this,"_scroll")}).css({display:"block"}).bind({click:function(e){e.preventDefault()}});$widget.bind({});$window.bind("resize.scrollbar",$.proxy(this,"_resize")).trigger("resize.scrollbar");},_resize:function()
{var $widget=this.widget();var scroll,perc,maxN,currentN,contentN,scrollableN,thumbN,track={},thumb={};maxN=this.$content.prop(this.scrollDimensionProperty);currentN=this.$content.prop(this.scrollPositionProperty);contentN=parseInt(this.$content.css(this.dimensionProperty));scrollableN=maxN-contentN;track[this.dimensionProperty]=contentN;if(scrollableN-currentN<=0){this.$thumb.css({display:"none"});scroll=0;thumbN=0;}else{thumbN=contentN/(maxN/contentN);thumb.display="block";track['float']="left";this.$track.css(track);perc=currentN/(scrollableN/100);scroll=((contentN-thumbN)/100)*perc;}
thumb[this.positionProperty]=scroll+"px";thumb[this.dimensionProperty]=thumbN+"px";this.$thumb.css(thumb);},_wheel:function(e,delta)
{var $widget=this.widget();var delta=Math.round(-delta*20);var top=(parseInt(this.$thumb.css("top"))+delta);top=Math.max(Math.min(this.$track.height()-this.$thumb.height(),top),0);this.$thumb.css({top:top+"px"});this._scroll();},_scroll:function(e,ui)
{var $widget=this.widget();var options=this.options;var maxN=this.$content.prop(this.scrollDimensionProperty)-this.$content[this.dimensionProperty]();if(maxN>0){var n=this.$track[this.dimensionProperty]()-this.$thumb[this.dimensionProperty]();var perc=perc||this.$thumb.position()[this.positionProperty]/(n/100);var scroll=(maxN/100)*perc;var track={};track[this.positionProperty]=scroll+"px";this.$track.css(track);this.$content.prop(this.scrollPositionProperty,scroll);}},_destroy:function()
{var $widget=this.widget();var options=this.options;$window.unbind(eventQn);spr._destroy.apply(this,arguments);}});})(jQuery);;;(function($)
{var $window=$(window);$.extend($.event.special,{imageload:{add:function(handleObject)
{var $widget=$(this);if(!$widget.is("img")&&$widget.length>0){return;}
var old_handler=handleObject.handler;var o=this;handleObject.handler=function(e)
{var $widget=$(e.currentTarget);var isLoaded=((e.currentTarget.complete)||(e.currentTarget.readyState=='complete'&&e.type=='readystatechange')||e.currentTarget.readyState=="loading"&&e.type=='readystatechange');if(isLoaded){if(parseInt($widget.css("width"))==0){}
$widget.unbind("load.imageload readystatechange.imageload");var res=old_handler.apply(o,arguments);return res;}else if(e.currentTarget.readyState===undefined){$widget.attr("src",$widget.attr("src"));}else if(e.currentTarget.readyState=="loading"){}};$widget.bind("load.imageload readystatechange.imageload",handleObject.handler);handleObject.handler({type:'readystatechange',target:this,currentTarget:this});},teardown:function(namespaces)
{},_default:function(e,data)
{}}});})(jQuery);;;(function($)
{var name="scrollpanel";var qn="code28."+name;var eventQn="."+qn;var xtnds=$.Widget;var spr=xtnds.prototype;var $window=$(window);$.widget(qn,xtnds,{options:{},_create:function()
{spr._create.apply(this,arguments);var $widget=this.widget();var options=this.options;$("#footer h3").text($("head").find("meta[property=og\\:title]").attr("content"));$("#body").css({position:"relative"});this.extraWidth=parseInt($widget.find("section").css("width"));$widget.scrollbar({direction:"horizontal"});var $images=$widget.find("img");var c=0;var o=this;$widget.find("section").hide();var $progress=$("#progress");var $progressbar=$("#progress progress");var $title=$progress.find("span");$title.css({display:"inline",width:"auto"});var w=$title.css("width");$title.css({display:"block",width:w});$progress.css({width:w,marginLeft:(-(w/2))+"px"});var $shim=$("<span />");$shim.css({width:0,height:"1px",backgroundColor:"#EDEDED",display:"block",padding:0});$progress.append($shim);var fraction=100/$images.length;var shimFraction=parseInt(w)/$images.length;$images.css({visibility:"hidden"}).one({"imageload.scrollpanel":function(e)
{var $img=$(e.currentTarget);c++;$progressbar.val(fraction*c);$shim.css({width:(shimFraction*c)+"px"});$window.trigger("resize");if(c==$images.length){setTimeout(function()
{o._show();$progress.remove();},10);}}}).fill({width:false,frame:$widget}).closest("li").css({overflow:"hidden"});$window.bind({"resize.scrollpanel":$.proxy(this,"_resize")}).trigger("resize.scrollpanel");},_allow:function()
{var $widget=this.widget();var options=this.options;$widget.find("li").bind({mouseenter:function(e)
{$(e.currentTarget).find("span").stop(true).animate({bottom:0},{duration:100});},mouseleave:function(e)
{$(e.currentTarget).find("span").stop(true).animate({bottom:"-40px"},{duration:300});}});this._fb();},_fb:function()
{var $widget=this.widget();var options=this.options;$widget.find("a.facebook-share-button").each(function()
{var $this=$(this);var url=$this.attr("href")+"?href="+location.href;var $iframe=$('<div style="width: 50px !important;overflow: hidden;"><iframe src="'+url+'&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:21px;" allowTransparency="true"></iframe></div>');$this.before($iframe);$this.remove();});},leave:function()
{var $widget=this.widget();var options=this.options;if($("html").hasClass("ie8")){$widget.hide();var dfd=$.Deferred();dfd.promise();dfd.resolve();return dfd;}
return $widget.stop(true).animate({opacity:0})},_show:function()
{var $widget=this.widget();var options=this.options;var $section=$widget.find("section");var $img=$widget.find("img");var o=this;$img.css({visibility:"visible",opacity:0}).each(function(i)
{(function($this,i)
{$this.delay((200*i)).queue(function(next)
{var c;if(i==$img.length-1){c=function()
{$section.fadeIn();$window.trigger("resize");o._allow();};}
$this.animate({opacity:1},{duration:600,easing:"easeInQuad",complete:c});next();});})($(this),i);});},_resize:function(e)
{var $widget=this.widget();var options=this.options;var offset=$widget.offset();var top=parseInt(offset.top);var h=$window.height()-(top*2)-parseInt($widget.css("paddingBottom"));h=Math.max(h,490);var w=0;$widget.css({height:h+"px"});$widget.find("img").fill("resize").each(function()
{var $this=$(this);var width=$this.css("width");var $li=$this.closest("li");w+=parseInt(width)+parseInt($li.css("marginRight"));$li.css({width:width});});$widget.find("ul").css({width:w+"px"});$widget.find("div").not(".track").css({width:(w+this.extraWidth)+"px"});$widget.find("iframe").parent().css({width:"50px"});},_destroy:function()
{var $widget=this.widget();var options=this.options;$window.unbind(eventQn);spr._destroy.apply(this,arguments);}});})(jQuery);;;(function($)
{var name="imagepanel";var qn="code28."+name;var eventQn="."+qn;var xtnds=$.Widget;var spr=xtnds.prototype;var $window=$(window);$.widget(qn,xtnds,{options:{},_create:function()
{spr._create.apply(this,arguments);var $widget=this.widget();var options=this.options;$widget.css({overflow:"hidden"});var $img=this.$img=$widget.find("img");$img.css({visibility:"hidden"}).bind({imageload:$.proxy(this,"_imageload")});},_getAreaHeight:function()
{return Math.max($window.height()-293,490);},leave:function()
{var $widget=this.widget();var options=this.options;var left=this.$img.position().left
var o=this;var dfd=this.$img.css({left:left}).animate({left:0}).delay(100).fadeOut();$widget.animate({height:this._getAreaHeight()},{step:function()
{o.$img.fill("resize");}});return dfd;},resize:function()
{},_imageload:function()
{var $widget=this.widget();var options=this.options;var o=this;this.$img.fill({frame:$widget,anchor:"top right"}).css({visibility:"visible",opacity:0,position:"absolute",top:0,right:0}).animate({opacity:1});$window.bind({"resize.imagepanel":function(e)
{$widget.css({width:(parseInt($("#wrapper > div").css("width"))-options.marginLeft)+"px",height:Math.max(o._getAreaHeight(),options.minHeight)+"px"});o.$img.fill("resize");}}).trigger("resize.imagepanel");},_destroy:function()
{var $widget=this.widget();var options=this.options;$window.unbind(eventQn);spr._destroy.apply(this,arguments);}});})(jQuery);;;(function($)
{var name="article";var qn="code28."+name;var eventQn="."+qn;var xtnds=$.Widget;var spr=xtnds.prototype;var $window=$(window);$.widget(qn,xtnds,{options:{marginBottom:880},_create:function()
{spr._create.apply(this,arguments);var $widget=this.widget();var options=this.options;$("#footer h3").text("");$window.bind({"resize.article":$.proxy(this,"_resize")}).trigger("resize.article");$widget.find("img").css({opacity:0}).bind({imageload:function(e)
{$(e.currentTarget).animate({opacity:1});}});$widget.scrollbar();},leave:function()
{var $widget=this.widget();var options=this.options;return $widget.css({opacity:0});},_resize:function()
{var $widget=this.widget();var options=this.options;$widget.css({height:Math.max(($window.height()-options.marginBottom),490)+"px"});},_destroy:function()
{var $widget=this.widget();var options=this.options;$window.unbind(eventQn);spr._destroy.apply(this,arguments);}});})(jQuery);;;(function($)
{var name="contact";var qn="code28."+name;var eventQn="."+qn;var xtnds=$.Widget;var spr=xtnds.prototype;var $window=$(window);$.widget(qn,xtnds,{options:{},_create:function()
{spr._create.apply(this,arguments);var $widget=this.widget();var options=this.options;$("#footer h3").text("");$widget.css({opacity:0}).animate({opacity:1});},leave:function()
{var $widget=this.widget();var options=this.options;$widget.animate({marginLeft:"-"+parseInt($widget.outerWidth())+"px"},{duration:500,easing:"easeOutQuint"});return $widget.fadeOut();},_destroy:function()
{var $widget=this.widget();var options=this.options;$window.unbind(eventQn);spr._destroy.apply(this,arguments);}});})(jQuery);;;(function($)
{var name="fill";var qn="code28."+name;var eventQn="."+qn;var xtnds=$.Widget;var spr=xtnds.prototype;var $window=$(window);$.widget(qn,xtnds,{options:{width:true,height:true,frame:$window},_create:function()
{spr._create.apply(this,arguments);var $widget=this.widget();var options=this.options;$widget.bind({"imageload.fill":$.proxy(this,"_load")});},_load:function()
{var $widget=this.widget();var options=this.options;var pos=$widget.css("position");$widget.css({position:"absolute"});var w=parseInt($widget.css("width"));var h=parseInt($widget.css("height"));$widget.css({position:pos});this.ratio=w/h;this.resize();},resize:function(e)
{var $widget=this.widget();var options=this.options;var w=options.frame.width();var h=parseInt(options.frame.css("height"));var isPortrait=w/this.ratio<h;if(isPortrait&&options.width!=false){nw=w;nh=w/this.ratio;}else{nw=h*this.ratio;nh=h;}
nw=Math.round(nw);nh=Math.round(nh);var css={width:nw+"px",height:nh+"px"};$widget.css(css);},_destroy:function()
{var $widget=this.widget();var options=this.options;$window.unbind(eventQn);spr._destroy.apply(this,arguments);}});})(jQuery);;;(function($)
{var name="app";var qn="code28."+name;var eventQn="."+qn;var xtnds=$.code28.frontcontroller;var spr=xtnds.prototype;$.widget(qn,xtnds,{options:{navAnimation:{duration:500,easing:"easeOutQuint"}},_create:function()
{var $widget=this.widget();var options=this.options;this.$menu=$("#wrapper > div > nav");this.$home=$("#wrapper > header > a");$("#footer a[rel='signup']").each(function()
{var $widget=$(this);$widget.bind({click:function(e)
{e.preventDefault();e.stopPropagation();$("#footer form").fadeIn(200);}});});$("#footer form").bind({submit:$.proxy(this,"_submit")});spr._create.apply(this,arguments);},_validate:function($form)
{var error=false;$form.find("input[type=text]").each(function(i)
{var $this=$(this);var $label=$this.closest("label");if($this.val()==""){error=true;$label.addClass("error");}else{$label.removeClass("error");}
if($label.hasClass("type-email")){if($this.val().indexOf("@")==-1||$this.val().indexOf(".")==-1){error=true;$label.addClass("error");}else{$label.removeClass("error");}}});return!error;},_submit:function(e)
{var $widget=this.widget();var options=this.options;e.preventDefault();e.stopPropagation();var $form=$("#footer form");if(!this._validate($form)){return;}
var method=$form.attr("method").toLowerCase();if(method=="post"||method=="get"){$[method]("/signup.php?url="+encodeURIComponent($form.attr("action")),$form.serialize(),$.proxy(this,"_success"));}},_success:function()
{var $widget=this.widget();var options=this.options;var $form=$("#footer form");$form.find("input").val("");$form.stop(true).fadeOut(100);},_widgets:function()
{var $widget=this.widget();var options=this.options;this.$scrollpanel=$(".t-project #body article").scrollpanel();this.$contact=$(".t-contact #body > section").contact();this.$articles=$(".t-articles #body > section").article({marginBottom:292});if($(":code28-imagepanel").length==0){this.$imagepanel=$("#page-index #body article").imagepanel({marginLeft:parseInt(this.$menu.outerWidth()),minHeight:parseInt(this.$menu.css("height"))});}},_request:function(verb,path,dfds)
{var $widget=this.widget();var options=this.options;var dfd,leave;var o=this;if($("html").hasClass("app-created")){switch(true){case $("html").hasClass("t-project"):leave=this.$scrollpanel.scrollpanel("leave");break;case $("html").hasClass("t-contact"):leave=this.$contact.contact("leave");break;case $("html").hasClass("t-articles"):leave=this.$articles.article("leave");break;case($("html").attr("id")=="page-index"):dfd=this.$menu.animate({marginLeft:"-"+parseInt(this.$menu.outerWidth())+"px"},options.navAnimation);if(path!="/contact/"){dfd=this.$imagepanel.imagepanel("leave");}else{}
dfds.push(dfd);break;}
if(path=="/"){$("#footer h3").text("");dfd=new $.Deferred();dfd.promise();$.when(leave).done(function()
{o.$menu.show().animate({marginLeft:0},options.navAnimation).queue(function(next)
{dfd.resolve();next();});});dfds.push(dfd);}else{dfds.push(leave);}}
var $home=$("#wrapper > header > a");if(path=="/"){this.$home.fadeOut();}
spr._request.apply(this,[verb,path,dfds]);},_before:function(path,$response)
{if($("html").attr("id")=="page-index"&&path=="/contact/"){$response.insertBefore("#body > article");this._after.apply(this,arguments);this.$contact=$("#body > section").contact();return false;}else if($("html").attr("id")=="page-contact"&&path=="/"){this._after.apply(this,arguments);this.$contact.contact("leave");return false;}
spr._before.apply(this,arguments);},_after:function(path,$response)
{if(path!="/"){this.$home.delay(1200).fadeIn();}
if(path=="/contact/"){$(window).trigger("resize");}
spr._after.apply(this,arguments);},_destroy:function()
{var $widget=this.widget();var options=this.options;spr._destroy.apply(this,arguments);}});})(jQuery);;;(function($)
{$(function()
{$("html").app();});})(jQuery);;
