/*!
 * jQuery UI 1.8.10
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */function css_browser_selector(a){var b=a.toLowerCase(),d=function(a){return b.indexOf(a)>-1},e="gecko",f="webkit",g="safari",h="opera",i="mobile",j=document.documentElement,k=[!/opera|webtv/i.test(b)&&/msie\s(\d)/.test(b)?"ie ie"+RegExp.$1:d("firefox/2")?e+" ff2":d("firefox/3.5")?e+" ff3 ff3_5":d("firefox/3.6")?e+" ff3 ff3_6":d("firefox/3")?e+" ff3":d("gecko/")?e:d("opera")?h+(/version\/(\d+)/.test(b)?" "+h+RegExp.$1:/opera(\s|\/)(\d+)/.test(b)?" "+h+RegExp.$2:""):d("konqueror")?"konqueror":d("blackberry")?i+" blackberry":d("android")?i+" android":d("chrome")?f+" chrome":d("iron")?f+" iron":d("applewebkit/")?f+" "+g+(/version\/(\d+)/.test(b)?" "+g+RegExp.$1:""):d("mozilla/")?e:"",d("j2me")?i+" j2me":d("iphone")?i+" iphone":d("ipod")?i+" ipod":d("ipad")?i+" ipad":d("mac")?"mac":d("darwin")?"mac":d("webtv")?"webtv":d("win")?"win"+(d("windows nt 6.0")?" vista":""):d("freebsd")?"freebsd":d("x11")||d("linux")?"linux":"","js"];return c=k.join(" "),j.className+=" "+c,c}(function(a,b){function c(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{},a.ui.version||(a.extend(a.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}}),a.fn.extend({_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return b=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){c=a(this[0]);for(var d;c.length&&c[0]!==document;){d=c.css("position");if(d==="absolute"||d==="relative"||d==="fixed"){d=parseInt(c.css("zIndex"),10);if(!isNaN(d)&&d!==0)return d}c=c.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function e(b,c,d,e){return a.each(f,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),e&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var f=d==="Width"?["Left","Right"]:["Top","Bottom"],g=d.toLowerCase(),h={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?h["inner"+d].call(this):this.each(function(){a(this).css(g,e(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?h["outer"+d].call(this,b):this.each(function(){a(this).css(g,e(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){var d=b.nodeName.toLowerCase(),e=a.attr(b,"tabindex");return"area"===d?(d=b.parentNode,e=d.name,!b.href||!e||d.nodeName.toLowerCase()!=="map"?!1:(b=a("img[usemap=#"+e+"]")[0],!!b&&c(b))):(/input|select|textarea|button|object/.test(d)?!b.disabled:"a"==d?b.href||!isNaN(e):!isNaN(e))&&c(b)},tabbable:function(b){var c=a.attr(b,"tabindex");return(isNaN(c)||c>=0)&&a(b).is(":focusable")}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){b=a.ui[b].prototype;for(var e in d)b.plugins[e]=b.plugins[e]||[],b.plugins[e].push([c,d[e]])},call:function(a,b,c){if((b=a.plugins[b])&&a.element[0].parentNode)for(var d=0;d<b.length;d++)a.options[b[d][0]]&&b[d][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;c=c&&c==="left"?"scrollLeft":"scrollTop";var d=!1;return b[c]>0?!0:(b[c]=1,d=b[c]>0,b[c]=0,d)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}}))})(jQuery),function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)a(e).triggerHandler("remove");c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)},c=new c,c.options=a.extend(!0,{},c.options),a[e][b].prototype=a.extend(!0,c,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&&e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.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(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e=this.options[b];c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),d=d||{};if(c.originalEvent){b=a.event.props.length;for(var f;b;)f=a.event.props[--b],c[f]=c.originalEvent[f]}return this.element.trigger(c,d),!(a.isFunction(e)&&e.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}}(jQuery),jQuery.effects||function(a,b){function c(b){var c;return b&&b.constructor==Array&&b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:/rgba\(0, 0, 0, 0\)/.exec(b)?j.transparent:j[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function e(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]])for(var e=a.length;e--;)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c]);else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function f(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in l||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function g(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function h(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function i(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&&!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var j={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]},k=["add","remove","toggle"],l={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,h){return a.isFunction(d)&&(h=d,d=null),this.queue("fx",function(){var i=a(this),j=i.attr("style")||" ",l=f(e.call(this)),m,n=i.attr("className");a.each(k,function(a,c){b[c]&&i[c+"Class"](b[c])}),m=f(e.call(this)),i.attr("className",n),i.animate(g(l,m),c,d,function(){a.each(k,function(a,c){b[c]&&i[c+"Class"](b[c])}),typeof i.attr("style")=="object"?(i.attr("style").cssText="",i.attr("style").cssText=j):i.attr("style",j),h&&h.apply(this,arguments)}),l=a.queue(this),m=l.splice(l.length-1,1)[0],l.splice(1,0,m),a.dequeue(this)})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.10",save:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){return b=="toggle"&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":a=0;break;case"center":a=.5;break;case"right":a=1;break;default:a=a[1]/b.width}return{x:a,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});return b.wrap(d),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(a){return a.parent().is(".ui-effects-wrapper")?a.parent().replaceWith(a):a},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){unit=b.cssUnit(c),unit[0]>0&&(e[c]=unit[0]*d+unit[1])}),e}}),a.fn.extend({effect:function(b){var c=h.apply(this,arguments),d={options:c[1],duration:c[2],callback:c[3]};c=d.options.mode;var e=a.effects[b];return a.fx.off||!e?c?this[c](d.duration,d.callback):this.each(function(){d.callback&&d.callback.call(this)}):e.call(this,d)},_show:a.fn.show,show:function(a){if(i(a))return this._show.apply(this,arguments);var b=h.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(i(a))return this._hide.apply(this,arguments);var b=h.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(i(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=h.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){a=1.70158;var f=0,g=d;return b==0?c:(b/=e)==1?c+d:(f||(f=e*.3),g<Math.abs(d)?(g=d,a=f/4):a=f/(2*Math.PI)*Math.asin(d/g),-(g*Math.pow(2,10*(b-=1))*Math.sin((b*e-a)*2*Math.PI/f))+c)},easeOutElastic:function(a,b,c,d,e){a=1.70158;var f=0,g=d;return b==0?c:(b/=e)==1?c+d:(f||(f=e*.3),g<Math.abs(d)?(g=d,a=f/4):a=f/(2*Math.PI)*Math.asin(d/g),g*Math.pow(2,-10*b)*Math.sin((b*e-a)*2*Math.PI/f)+d+c)},easeInOutElastic:function(a,b,c,d,e){a=1.70158;var f=0,g=d;return b==0?c:(b/=e/2)==2?c+d:(f||(f=e*.3*1.5),g<Math.abs(d)?(g=d,a=f/4):a=f/(2*Math.PI)*Math.asin(d/g),b<1?-0.5*g*Math.pow(2,10*(b-=1))*Math.sin((b*e-a)*2*Math.PI/f)+c:g*Math.pow(2,-10*(b-=1))*Math.sin((b*e-a)*2*Math.PI/f)*.5+d+c)},easeInBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),e*(c/=f)*c*((g+1)*c-g)+d},easeOutBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),e*((c=c/f-1)*c*((g+1)*c+g)+1)+d},easeInOutBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),(c/=f/2)<1?e/2*c*c*(((g*=1.525)+1)*c-g)+d:e/2*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+d},easeInBounce:function(b,c,d,e,f){return e-a.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(b,c,d,e,f){return c<f/2?a.easing.easeInBounce(b,c*2,0,e,f)*.5+d:a.easing.easeOutBounce(b,c*2-f,0,e,f)*.5+e*.5+d}})}(jQuery),css_browser_selector(navigator.userAgent),function(a,b){var c,d="([^/]+)",e=/:([\w\d]+)/g,f=/\?([^#]*)$/,g=function(a){return Array.prototype.slice.call(a)},h=function(a){return Object.prototype.toString.call(a)==="[object Function]"},i=function(a){return Object.prototype.toString.call(a)==="[object Array]"},j=function(a){return decodeURIComponent((a||"").replace(/\+/g," "))},k=encodeURIComponent,l=function(a){return String(a).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},m=function(a){return function(b,c){return this.route.apply(this,[a,b,c])}},n={},o=!!b.history&&!!history.pushState,p=[];c=function(){var b=g(arguments),d,e;c.apps=c.apps||{};if(b.length===0||b[0]&&h(b[0]))return c.apply(c,["body"].concat(b));if(typeof (e=b.shift())=="string")return d=c.apps[e]||new c.Application,d.element_selector=e,b.length>0&&a.each(b,function(a,b){d.use(b)}),d.element_selector!=e&&delete c.apps[e],c.apps[d.element_selector]=d,d},c.VERSION="0.7.0",c.addLogger=function(a){p.push(a)},c.log=function(){var b=g(arguments);b.unshift("["+Date()+"]"),a.each(p,function(a,d){d.apply(c,b)})},typeof b.console!="undefined"?h(b.console.log.apply)?c.addLogger(function(){b.console.log.apply(b.console,arguments)}):c.addLogger(function(){b.console.log(arguments)}):typeof console!="undefined"&&c.addLogger(function(){console.log.apply(console,arguments)}),a.extend(c,{makeArray:g,isFunction:h,isArray:i}),c.Object=function(b){return a.extend(this,b||{})},a.extend(c.Object.prototype,{escapeHTML:l,h:l,toHash:function(){var b={};return a.each(this,function(a,c){h(c)||(b[a]=c)}),b},toHTML:function(){var b="";return a.each(this,function(a,c){h(c)||(b+="<strong>"+a+"</strong> "+c+"<br />")}),b},keys:function(a){var b=[];for(var c in this)(!h(this[c])||!a)&&b.push(c);return b},has:function(b){return this[b]&&a.trim(this[b].toString())!==""},join:function(){var a=g(arguments),b=a.shift();return a.join(b)},log:function(){c.log.apply(c,arguments)},toString:function(b){var c=[];return a.each(this,function(a,d){(!h(d)||b)&&c.push('"'+a+'": '+d.toString())}),"Sammy.Object: {"+c.join(",")+"}"}}),c.DefaultLocationProxy=function(a,b){this.app=a,this.is_native=!1,this.has_history=o,this._startPolling(b)},c.DefaultLocationProxy.fullPath=function(a){var b=a.toString().match(/^[^#]*(#.+)$/),c=b?b[1]:"";return[a.pathname,a.search,c].join("")},c.DefaultLocationProxy.prototype={bind:function(){var d=this,e=this.app,f=c.DefaultLocationProxy;a(b).bind("hashchange."+this.app.eventNamespace(),function(a,c){d.is_native===!1&&!c&&(d.is_native=!0,b.clearInterval(f._interval)),e.trigger("location-changed")}),o&&!e.disable_push_state&&(a(b).bind("popstate."+this.app.eventNamespace(),function(a){e.trigger("location-changed")}),a("a").live("click.history-"+this.app.eventNamespace(),function(a){var c=f.fullPath(this);if(this.hostname==b.location.hostname)return a.preventDefault(),d.setLocation(c),!1})),f._bindings||(f._bindings=0),f._bindings++},unbind:function(){a(b).unbind("hashchange."+this.app.eventNamespace()),a(b).unbind("popstate."+this.app.eventNamespace()),a("a").die("click.history-"+this.app.eventNamespace()),c.DefaultLocationProxy._bindings--,c.DefaultLocationProxy._bindings<=0&&b.clearInterval(c.DefaultLocationProxy._interval)},getLocation:function(){return c.DefaultLocationProxy.fullPath(b.location)},setLocation:function(a){/^([^#\/]|$)/.test(a)&&(o?a="/"+a:a="#!/"+a);if(a!=this.getLocation())if(o&&/^\//.test(a))history.pushState({path:a},b.title,a),this.app.trigger("location-changed");else return b.location=a},_startPolling:function(d){var e=this;if(!c.DefaultLocationProxy._interval){d||(d=10);var f=function(){var d=e.getLocation();(typeof c.DefaultLocationProxy._last_location=="undefined"||d!=c.DefaultLocationProxy._last_location)&&b.setTimeout(function(){a(b).trigger("hashchange",[!0])},0),c.DefaultLocationProxy._last_location=d};f(),c.DefaultLocationProxy._interval=b.setInterval(f,d)}}},c.Application=function(a){var b=this;this.routes={},this.listeners=new c.Object({}),this.arounds=[],this.befores=[],this.namespace=(new Date).getTime()+"-"+parseInt(Math.random()*1e3,10),this.context_prototype=function(){c.EventContext.apply(this,arguments)},this.context_prototype.prototype=new c.EventContext,h(a)&&a.apply(this,[this]),this._location_proxy||this.setLocationProxy(new c.DefaultLocationProxy(this,this.run_interval_every)),this.debug&&this.bindToAllEvents(function(a,c){b.log(b.toString(),a.cleaned_type,c||{})})},c.Application.prototype=a.extend({},c.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:!1,element_selector:"body",debug:!1,raise_errors:!1,run_interval_every:50,disable_push_state:!1,template_engine:null,toString:function(){return"Sammy.Application:"+this.element_selector},$element:function(b){return b?a(this.element_selector).find(b):a(this.element_selector)},use:function(){var a=g(arguments),b=a.shift(),d=b||"";try{a.unshift(this),typeof b=="string"&&(d="Sammy."+b,b=c[b]),b.apply(this,a)}catch(e){typeof b=="undefined"?this.error("Plugin Error: called use() but plugin ("+d.toString()+") is not defined",e):h(b)?this.error("Plugin Error",e):this.error("Plugin Error: called use() but '"+d.toString()+"' is not a function",e)}return this},setLocationProxy:function(a){var b=this._location_proxy;this._location_proxy=a,this.isRunning()&&(b&&b.unbind(),this._location_proxy.bind())},route:function(b,c,f){var g=this,i=[],j,k;!f&&h(c)&&(c=b,f=c,b="any"),b=b.toLowerCase();if(c.constructor==String){e.lastIndex=0;while((k=e.exec(c))!==null)i.push(k[1]);c=new RegExp(c.replace(e,d)+"$")}return typeof f=="string"&&(f=g[f]),j=function(a){var b={verb:a,path:c,callback:f,param_names:i};g.routes[a]=g.routes[a]||[],g.routes[a].push(b)},b==="any"?a.each(this.ROUTE_VERBS,function(a,b){j(b)}):j(b),this},get:m("get"),post:m("post"),put:m("put"),del:m("delete"),any:m("any"),mapRoutes:function(b){var c=this;return a.each(b,function(a,b){c.route.apply(c,b)}),this},eventNamespace:function(){return["sammy-app",this.namespace].join("-")},bind:function(a,b,c){var d=this;typeof c=="undefined"&&(c=b);var e=function(){var a,b,e;a=arguments[0],e=arguments[1],e&&e.context?(b=e.context,delete e.context):b=new d.context_prototype(d,"bind",a.type,e,a.target),a.cleaned_type=a.type.replace(d.eventNamespace(),""),c.apply(b,[a,e])};return this.listeners[a]||(this.listeners[a]=[]),this.listeners[a].push(e),this.isRunning()&&this._listen(a,e),this},trigger:function(a,b){return this.$element().trigger([a,this.eventNamespace()].join("."),[b]),this},refresh:function(){return this.last_location=null,this.trigger("location-changed"),this},before:function(a,b){return h(a)&&(b=a,a={}),this.befores.push([a,b]),this},after:function(a){return this.bind("event-context-after",a)},around:function(a){return this.arounds.push(a),this},isRunning:function(){return this._running},helpers:function(b){return a.extend(this.context_prototype.prototype,b),this},helper:function(a,b){return this.context_prototype.prototype[a]=b,this},run:function(c){if(this.isRunning())return!1;var d=this;return a.each(this.listeners.toHash(),function(b,c){a.each(c,function(a,c){d._listen(b,c)})}),this.trigger("run",{start_url:c}),this._running=!0,this.last_location=null,!/\#(.+)/.test(this.getLocation())&&typeof c!="undefined"&&this.setLocation(c),this._checkLocation(),this._location_proxy.bind(),this.bind("location-changed",function(){d._checkLocation()}),this.bind("submit",function(b){var c=d._checkFormSubmission(a(b.target).closest("form"));return c===!1?b.preventDefault():!1}),a(b).bind("beforeunload",function(){d.unload()}),this.trigger("changed")},unload:function(){if(!this.isRunning())return!1;var b=this;return this.trigger("unload"),this._location_proxy.unbind(),this.$element().unbind("submit").removeClass(b.eventNamespace()),a.each(this.listeners.toHash(),function(c,d){a.each(d,function(a,d){b._unlisten(c,d)})}),this._running=!1,this},bindToAllEvents:function(b){var c=this;return a.each(this.APP_EVENTS,function(a,d){c.bind(d,b)}),a.each(this.listeners.keys(!0),function(d,e){a.inArray(e,c.APP_EVENTS)==-1&&c.bind(e,b)}),this},routablePath:function(a){return a.replace(f,"")},lookupRoute:function(a,b){var c=this,d=!1,e=0,f,g;if(typeof this.routes[a]!="undefined"){f=this.routes[a].length;for(;e<f;e++){g=this.routes[a][e];if(c.routablePath(b).match(g.path)){d=g;break}}}return d},runRoute:function(b,c,d,e){var f=this,g=this.lookupRoute(b,c),h,i,k,l,m,n,o,p,q;this.trigger("run-route",{verb:b,path:c,params:d}),typeof d=="undefined"&&(d={}),a.extend(d,this._parseQueryString(c));if(g){this.trigger("route-found",{route:g}),(p=g.path.exec(this.routablePath(c)))!==null&&(p.shift(),a.each(p,function(a,b){g.param_names[a]?d[g.param_names[a]]=j(b):(d.splat||(d.splat=[]),d.splat.push(j(b)))})),h=new this.context_prototype(this,b,c,d,e),k=this.arounds.slice(0),m=this.befores.slice(0),o=[h].concat(d.splat),i=function(){var a;while(m.length>0){n=m.shift();if(f.contextMatchesOptions(h,n[0])){a=n[1].apply(h,[h]);if(a===!1)return!1}}return f.last_route=g,h.trigger("event-context-before",{context:h}),a=g.callback.apply(h,o),h.trigger("event-context-after",{context:h}),a},a.each(k.reverse(),function(a,b){var c=i;i=function(){return b.apply(h,[c])}});try{q=i()}catch(r){this.error(["500 Error",b,c].join(" "),r)}return q}return this.notFound(b,c)},contextMatchesOptions:function(a,b,c){var d=b;if(typeof d=="undefined"||d=={})return!0;typeof c=="undefined"&&(c=!0);if(typeof d=="string"||h(d.test))d={path:d};if(d.only)return this.contextMatchesOptions(a,d.only,!0);if(d.except)return this.contextMatchesOptions(a,d.except,!1);var e=!0,f=!0;return d.path&&(h(d.path.test)||(d.path=new RegExp(d.path.toString()+"$")),e=d.path.test(a.path)),d.verb&&(typeof d.verb=="string"?f=d.verb===a.verb:f=d.verb.indexOf(a.verb)>-1),c?f&&e:!f||!e},getLocation:function(){return this._location_proxy.getLocation()},setLocation:function(a){return this._location_proxy.setLocation(a)},swap:function(a){return this.$element().html(a)},templateCache:function(a,b){return typeof b!="undefined"?n[a]=b:n[a]},clearTemplateCache:function(){return n={}},notFound:function(a,b){var c=this.error(["404 Not Found",a,b].join(" "));return a==="get"?c:!0},error:function(a,b){b||(b=new Error),b.message=[a,b.message].join(" "),this.trigger("error",{message:b.message,error:b});if(this.raise_errors)throw b;this.log(b.message,b)},_checkLocation:function(){var a,b;a=this.getLocation();if(!this.last_location||this.last_location[0]!="get"||this.last_location[1]!=a)this.last_location=["get",a],b=this.runRoute("get",a);return b},_getFormVerb:function(b){var c=a(b),d,e;e=c.find('input[name="_method"]'),e.length>0&&(d=e.val()),d||(d=c[0].getAttribute("method"));if(!d||d=="")d="get";return a.trim(d.toString().toLowerCase())},_checkFormSubmission:function(b){var c,d,e,f,g;return this.trigger("check-form-submission",{form:b}),c=a(b),d=c.attr("action")||"",e=this._getFormVerb(c),this.log("_checkFormSubmission",c,d,e),e==="get"?(this.setLocation(d+"?"+this._serializeFormParams(c)),g=!1):(f=a.extend({},this._parseFormParams(c)),g=this.runRoute(e,d,f,b.get(0))),typeof g=="undefined"?!1:g},_serializeFormParams:function(a){var b="",c=a.serializeArray(),d;if(c.length>0){b=this._encodeFormPair(c[0].name,c[0].value);for(d=1;d<c.length;d++)b=b+"&"+this._encodeFormPair(c[d].name,c[d].value)}return b},_encodeFormPair:function(a,b){return k(a)+"="+k(b)},_parseFormParams:function(a){var b={},c=a.serializeArray(),d;for(d=0;d<c.length;d++)b=this._parseParamPair(b,c[d].name,c[d].value);return b},_parseQueryString:function(a){var b={},c,d,e,g;c=a.match(f);if(c){d=c[1].split("&");for(g=0;g<d.length;g++)e=d[g].split("="),b=this._parseParamPair(b,j(e[0]),j(e[1]||""))}return b},_parseParamPair:function(a,b,c){return a[b]?i(a[b])?a[b].push(c):a[b]=[a[b],c]:a[b]=c,a},_listen:function(a,b){return this.$element().bind([a,this.eventNamespace()].join("."),b)},_unlisten:function(a,b){return this.$element().unbind([a,this.eventNamespace()].join("."),b)}}),c.RenderContext=function(a){this.event_context=a,this.callbacks=[],this.previous_content=null,this.content=null,this.next_engine=!1,this.waiting=!1},c.RenderContext.prototype=a.extend({},c.Object.prototype,{then:function(a){if(!h(a)){if(!(typeof a=="string"&&a in this.event_context))return this;var c=this.event_context[a];a=function(a){return c.apply(this.event_context,[a])}}var d=this;return this.waiting?this.callbacks.push(a):(this.wait(),b.setTimeout(function(){var b=a.apply(d,[d.content,d.previous_content]);b!==!1&&d.next(b)},0)),this},wait:function(){this.waiting=!0},next:function(a){this.waiting=!1,typeof a!="undefined"&&(this.previous_content=this.content,this.content=a),this.callbacks.length>0&&this.then(this.callbacks.shift())},load:function(b,c,d){var e=this;return this.then(function(){var f,g,i,j;h(c)?(d=c,c={}):c=a.extend({},c),d&&this.then(d);if(typeof b=="string")return i=b.match(/\.json$/)||c.json,f=i&&c.cache===!0||c.cache!==!1,e.next_engine=e.event_context.engineFor(b),delete c.cache,delete c.json,c.engine&&(e.next_engine=c.engine,delete c.engine),f&&(g=this.event_context.app.templateCache(b))?g:(this.wait(),a.ajax(a.extend({url:b,data:{},dataType:i?"json":null,type:"get",success:function(a){f&&e.event_context.app.templateCache(b,a),e.next(a)}},c)),!1);if(b.nodeType)return b.innerHTML;if(b.selector)return e.next_engine=b.attr("data-engine"),c.clone===!1?b.remove()[0].innerHTML.toString():b[0].innerHTML.toString()})},loadPartials:function(a){if(a){this.partials=this.partials||{};for(name in a)this.load(a[name]).then(function(a){this.partials[name]=a})}return this},render:function(a,b,c,d){return h(a)&&!b?this.then(a):this.loadPartials(d).load(a).interpolate(b,a).then(c)},partial:function(a,b){return this.render(a,b).swap()},send:function(){var a=this,b=g(arguments),c=b.shift();return i(b[0])&&(b=b[0]),this.then(function(d){return b.push(function(b){a.next(b)}),a.wait(),c.apply(c,b),!1})},collect:function(b,c,d){var e=this,f=function(){h(b)&&(c=b,b=this.content);var d=[],f=!1;return a.each(b,function(a,b){var g=c.apply(e,[a,
b]);return g.jquery&&g.length==1&&(g=g[0],f=!0),d.push(g),g}),f?d:d.join("")};return d?f():this.then(f)},renderEach:function(b,c,d,e){return i(c)&&(e=d,d=c,c=null),this.load(b).then(function(f){var g=this;d||(d=i(this.previous_content)?this.previous_content:[]);if(e)a.each(d,function(a,d){var h={},i=this.next_engine||b;c?h[c]=d:h=d,e(d,g.event_context.interpolate(f,h,i))});else return this.collect(d,function(a,d){var e={},g=this.next_engine||b;return c?e[c]=d:e=d,this.event_context.interpolate(f,e,g)},!0)})},interpolate:function(a,b,c){var d=this;return this.then(function(e,f){!a&&f&&(a=f),this.next_engine&&(b=this.next_engine,this.next_engine=!1);var g=d.event_context.interpolate(e,a,b,this.partials);return c?f+g:g})},swap:function(){return this.then(function(a){this.event_context.swap(a)}).trigger("changed",{})},appendTo:function(b){return this.then(function(c){a(b).append(c)}).trigger("changed",{})},prependTo:function(b){return this.then(function(c){a(b).prepend(c)}).trigger("changed",{})},replace:function(b){return this.then(function(c){a(b).html(c)}).trigger("changed",{})},trigger:function(a,b){return this.then(function(c){typeof b=="undefined"&&(b={content:c}),this.event_context.trigger(a,b)})}}),c.EventContext=function(a,b,d,e,f){this.app=a,this.verb=b,this.path=d,this.params=new c.Object(e),this.target=f},c.EventContext.prototype=a.extend({},c.Object.prototype,{$element:function(){return this.app.$element(g(arguments).shift())},engineFor:function(a){var b=this,c;if(h(a))return a;a=(a||b.app.template_engine).toString();if(c=a.match(/\.([^\.\?\#]+)$/))a=c[1];return a&&h(b[a])?b[a]:b.app.template_engine?this.engineFor(b.app.template_engine):function(a,b){return a}},interpolate:function(a,b,c,d){return this.engineFor(c).apply(this,[a,b,d])},render:function(a,b,d,e){return(new c.RenderContext(this)).render(a,b,d,e)},renderEach:function(a,b,d,e){return(new c.RenderContext(this)).renderEach(a,b,d,e)},load:function(a,b,d){return(new c.RenderContext(this)).load(a,b,d)},partial:function(a,b){return(new c.RenderContext(this)).partial(a,b)},send:function(){var a=new c.RenderContext(this);return a.send.apply(a,arguments)},redirect:function(){var b,c=g(arguments),d=this.app.getLocation(),e=c.length;if(e>1){var f=0,h=[],i=[],j={},k=!1;for(;f<e;f++)typeof c[f]=="string"?h.push(c[f]):(a.extend(j,c[f]),k=!0);b=h.join("/");if(k){for(var l in j)i.push(this.app._encodeFormPair(l,j[l]));b+="?"+i.join("&")}}else b=c[0];this.trigger("redirect",{to:b}),this.app.last_location=[this.verb,this.path],this.app.setLocation(b),(new RegExp(b)).test(d)&&this.app.trigger("location-changed")},trigger:function(a,b){return typeof b=="undefined"&&(b={}),b.context||(b.context=this),this.app.trigger(a,b)},eventNamespace:function(){return this.app.eventNamespace()},swap:function(a){return this.app.swap(a)},notFound:function(){return this.app.notFound(this.verb,this.path)},json:function(b){return a.parseJSON(b)},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(" ")}}),a.sammy=b.Sammy=c}(jQuery,window),function(a){Sammy=Sammy||{},Sammy.Store=function(b){var c=this;this.options=b||{},this.name=this.options.name||"store",this.element=this.options.element||"body",this.$element=a(this.element),a.isArray(this.options.type)?a.each(this.options.type,function(a,b){if(Sammy.Store.isAvailable(b))return c.type=b,!1}):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"},a.extend(Sammy.Store.prototype,{isAvailable:function(){if(a.isFunction(this.storage.isAvailable))return this.storage.isAvailable();!0},exists:function(a){return this.storage.exists(a)},set:function(a,b){var c=typeof b=="string"?b:JSON.stringify(b);return a=a.toString(),this.storage.set(a,c),a!=this.meta_key&&(this._addKey(a),this.$element.trigger("set-"+this.name,{key:a,value:b}),this.$element.trigger("set-"+this.name+"-"+a,{key:a,value:b})),b},get:function(a){var b=this.storage.get(a);if(typeof b=="undefined"||b==null||b=="")return b;try{return JSON.parse(b)}catch(c){return b}},clear:function(a){return this._removeKey(a),this.storage.clear(a)},clearAll:function(){var a=this;this.each(function(b,c){a.clear(b)})},keys:function(){return this.get(this.meta_key)||[]},each:function(a){var b=0,c=this.keys(),d;for(b;b<c.length;b++){d=a(c[b],this.get(c[b]));if(d===!1)return!1}},filter:function(a){var b=[];return this.each(function(c,d){return a(c,d)&&b.push([c,d]),!0}),b},first:function(a){var b=!1;return this.each(function(c,d){if(a(c,d))return b=[c,d],!1}),b},fetch:function(a,b){return this.exists(a)?this.get(a):this.set(a,b.apply(this))},load:function(b,c,d){var e=this;a.get(c,function(a){e.set(b,a),d&&d.apply(this,[a])})},_addKey:function(b){var c=this.keys();a.inArray(b,c)==-1&&c.push(b),this.set(this.meta_key,c)},_removeKey:function(b){var c=this.keys(),d=a.inArray(b,c);d!=-1&&c.splice(d,1),this.set(this.meta_key,c)}}),Sammy.Store.isAvailable=function(a){try{return Sammy.Store[Sammy.Store.stores[a]].prototype.isAvailable()}catch(b){return!1}},Sammy.Store.Memory=function(a,b){this.name=a,this.element=b,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]},a.extend(Sammy.Store.Memory.prototype,{isAvailable:function(){return!0},exists:function(a){return typeof this.store[a]!="undefined"},set:function(a,b){return this.store[a]=b},get:function(a){return this.store[a]},clear:function(a){delete this.store[a]}}),Sammy.Store.Data=function(b,c){this.name=b,this.element=c,this.$element=a(c)},a.extend(Sammy.Store.Data.prototype,{isAvailable:function(){return!0},exists:function(a){return!!this.$element.data(this._key(a))},set:function(a,b){return this.$element.data(this._key(a),b)},get:function(a){return this.$element.data(this._key(a))},clear:function(a){this.$element.removeData(this._key(a))},_key:function(a){return["store",this.name,a].join(".")}}),Sammy.Store.LocalStorage=function(a,b){this.name=a,this.element=b},a.extend(Sammy.Store.LocalStorage.prototype,{isAvailable:function(){return"localStorage"in window&&window.location.protocol!="file:"},exists:function(a){return this.get(a)!=null},set:function(a,b){return window.localStorage.setItem(this._key(a),b)},get:function(a){return window.localStorage.getItem(this._key(a))},clear:function(a){window.localStorage.removeItem(this._key(a))},_key:function(a){return["store",this.element,this.name,a].join(".")}}),Sammy.Store.SessionStorage=function(a,b){this.name=a,this.element=b},a.extend(Sammy.Store.SessionStorage.prototype,{isAvailable:function(){return"sessionStorage"in window&&window.location.protocol!="file:"&&a.isFunction(window.sessionStorage.setItem)},exists:function(a){return this.get(a)!=null},set:function(a,b){return window.sessionStorage.setItem(this._key(a),b)},get:function(a){var b=window.sessionStorage.getItem(this._key(a));return b&&typeof b.value!="undefined"&&(b=b.value),b},clear:function(a){window.sessionStorage.removeItem(this._key(a))},_key:function(a){return["store",this.element,this.name,a].join(".")}}),Sammy.Store.Cookie=function(a,b,c){this.name=a,this.element=b,this.options=c||{},this.path=this.options.path||"/",this.expires_in=this.options.expires_in||1209600},a.extend(Sammy.Store.Cookie.prototype,{isAvailable:function(){return"cookie"in document&&window.location.protocol!="file:"},exists:function(a){return this.get(a)!=null},set:function(a,b){return this._setCookie(a,b)},get:function(a){return this._getCookie(a)},clear:function(a){this._setCookie(a,"",-1)},_key:function(a){return["store",this.element,this.name,a].join(".")},_getCookie:function(a){var b=this._key(a).replace(/(\.|\*|\(|\)|\[|\])/g,"\\$1"),c=document.cookie.match("(^|;\\s)"+b+"=([^;]*)(;|$)");return c?c[2]:null},_setCookie:function(a,b,c){c||(c=this.expires_in*1e3);var d=new Date;d.setTime(d.getTime()+c);var e=[this._key(a),"=",b,"; expires=",d.toGMTString(),"; path=",this.path].join("");document.cookie=e}}),Sammy.Storage=function(b){this.use(Sammy.JSON),this.stores=this.stores||{},this.store=function(b,c){if(typeof this.stores[b]=="undefined"){var d="clear"+b.substr(0,1).toUpperCase()+b.substr(1);this.stores[b]=new Sammy.Store(a.extend({name:b,element:this.element_selector},c||{})),this[b]=function(c,d){return typeof d=="undefined"?this.stores[b].get(c):a.isFunction(d)?this.stores[b].fetch(c,d):this.stores[b].set(c,d)},this[d]=function(){return this.stores[b].clearAll()},this.helper(b,function(){return this.app[b].apply(this.app,arguments)}),this.helper(d,function(){return this.app[d]()})}return this.stores[b]},this.helpers({store:function(){return this.app.store.apply(this.app,arguments)}})},Sammy.Session=function(b,c){this.use(Sammy.Storage),this.store("session",a.extend({type:["local","cookie","memory"]},c))},Sammy.Cache=function(b,c){this.use(Sammy.Storage),this.cache_partials=!0,this.store("cache",a.extend({type:["local","session","memory"]},c))}}(jQuery),function(a){var b="frontcontroller",c="code28."+b,d="."+c,e=a.Widget,f=e.prototype;a.widget(c,e,{options:{},getSammy:function(){return this._app},getRouter:function(){return this._app},_create:function(){f._create.apply(this,arguments);var b=this.widget(),c=this;this._store=new Sammy.Store,this._app=a.sammy("body");var d=this._app,e=d._location_proxy;if(!e.has_history){var g=location.href;if(g.indexOf("#!")==-1){g=g.replace(/http:\/\/[^\/]+/i,"");if(g!="/")return location.href="/#!"+g,!1}var h=Sammy.DefaultLocationProxy;a("a").live("click.history-"+this._app.eventNamespace(),function(a){var b=h.fullPath(this);if(this.hostname==window.location.hostname||this.hostname=="")return a.preventDefault(),b.indexOf("/")!=0&&(b="/"+b),e.setLocation("#!"+b),!1})}this._app.notFound=a.proxy(c,"_notFound"),this._app.run();this.track = true;	},hasHistory:function(){return this._app._location_proxy.has_history},_notFound:function(a,b){var c=new Array;this._request(a,b,c)},_request:function(b,c,d){c.indexOf("#!")!=-1&&(c=c.substr(3));if(_gaq != null && this.track) {_gaq.push(['_trackPageview']);}var e=this,f=a.get(c);d.push(f),a.when.apply(null,d).then(function(a){e.__response(c,f.responseText)})},_setTitle:function(b){var c=this.widget(),d=c.find("head"),e=d.find("title"),f=a.trim(b.attr("content"))+" - "+a.trim(document.title.split(" - ")[1]);document.title=f,b.remove()},_normalize:function(b){var c=this.widget();if(b.indexOf("DOCTYPE")!=-1){var d=b.split("body>");b=d[1],b=b.substr(0,b.length-2),b="<div>"+b+"</div>",b=a(b).find("#body").html()}var e=a(b);return a(b)},_meta:function(b){var c=this.widget(),d;b.is("script")?d=b:d=b.find("script");if(d.length==0)return;var e=a("<div>").append(d.html()),f=c.find("head");this._setTitle(e.find("meta[name='title']"));var g=new Array;a.each(c.attr("class").split(" "),function(){!this.indexOf("t-")==0&&g.push(this)});var h;h=e.find("meta[property=app\\:class]"),h.length==1&&g.push(h.attr("content")),h.remove(),h=e.find("meta[property=app\\:id]"),h.length==1&&c.attr("id",h.attr("content")),h.remove(),c.attr("class",a.trim(g.join(" "))),c.find("head").find("meta[property^=og]").remove(),e.find("meta[property^=og]").each(function(){f.append(this)})},__response:function(a,b){var c=this._normalize(b),d=this._before(a,c);this._meta(c),this._response(a,c),this._after(a,c)},_before:function(a,b){},_after:function(a,b){},_response:function(a,b){var c=this.widget(),d="#body",e=c.find(d);e.empty().html(b)}})}(jQuery),function(a){var b="gmap",c="code28."+b,d="."+c;a.widget(c,{options:{latitude:0,longitude:0,zoom:16},_init:function(){a.Widget.prototype._init.apply(this,arguments);var b=this.widget(),c=this.options,d=c.latitude,e=c.longitude,f=this.map=new google.maps.Map(b.get(0),{navigationControl:!0,scaleControl:!1,zoom:c.zoom,center:new google.maps.LatLng(d,e),mapTypeId:google.maps.MapTypeId.ROADMAP});this.addMarker(f.getCenter())},addInfoWindow:function(a,b){var c=this.info=new google.maps.InfoWindow({content:a});c.open(this.map,this.marker)},center:function(){this.map.panTo(this.marker.getPosition());if(this.info!=null){this.info.close();var a=this;a.info.open(a.map,a.marker)}},setLatLong:function(a,b){var c=new google.maps.LatLng(a,b);this.marker.setPosition(c),this.map.panTo(c)},addMarker:function(a){arguments.length==2&&(a=new google.maps.LatLng(arguments[0],arguments[1]));var b=this.marker=new google.maps.Marker({position:a,map:this.map})}})}(jQuery),function(a){a.fn.extend({scrollto:function(b){return b=a.extend({duration:500,easing:"easeOutQuint",element:a(this)},b),this.each(function(){var c=b.element.offset().top,d=this;if(d===window||d===document)a.browser.mozilla==!0||a.browser.msie==!0?d="html":d="body";a(d).animate({scrollTop:c},{duration:b.duration,easing:b.easing,complete:function(){}})})}})}(jQuery),function(a){var b="app",c="code28."+b,d="."+c,e=a.code28.frontcontroller,f=e.prototype;a.widget(c,e,{options:{},_create:function(){this.$menu=a("#header .main-menu").menu(),f._create.apply(this,arguments),this._app.get(":project/project/:id/",a.proxy(this,"_image"))},_widgets:function(){this.$images=a("#page-index #body .images").images(),a(".t-category").find("#body img").fullscreen({top:127,left:33,bottom:33,right:33}).end().find(".images a").bind({click:function(a){a.preventDefault(),a.stopPropagation()}}),a(".t-project").each(function(){var b=a(this),c=a(".images");a(window).bind({"resize.project":function(){var b=500;c.find("img").each(function(){b+=a(this).height()}),a(".images").width(a(window).width()-40).height(b)}}).trigger("resize"),c.find("img").fullscreen({top:127,left:33,bottom:33,right:33,$reference:c}),c.find("li").not("::first").find("a").linkswitch()}),a("#page-contact .article").contact(),a("#page-about #body .article, #page-vacancies #body .article").fullscreen({top:127,left:33,bottom:33,right:33}),a(".t-studio").not("#page-contact").find(".article").css({display:"none"}).fadeIn()},_image:function(b){var c=this.widget();if(c.hasClass("t-category")||c.hasClass("t-index")&&c.find(".images li").length<2){this._request("get",b.path,new Array);return}var d=b.params.id||"01",c=this.widget(),e=a("#image-"+d);d=="01"&&(e=a("#wrapper")),a(window).scrollto({element:e}),this.$menu.menu("select",b.path)},_before:function(a,b){f._before.apply(this,arguments),$(window).unbind("resize.project"),this.$menu.menu("prepareTransition")},_after:function(b,c){f._after.apply(this,arguments),this.$menu.menu("select",b),this.$menu.menu("transition"),a("#page-contact .article").contact(),a(".t-studio").not("#page-contact").find(".article").css({display:"none"}).fadeIn()},_response:function(a,b){f._response.apply(this,arguments);var c=this.widget(),d="#body";c.find(d).empty().html(b),this._widgets()}})}(jQuery),function(a){var b="menu",c="code28."+b,d="."+c,e=a.Widget,f=e.prototype;a.widget(c,e,{options:{duration:1050,easing:"easeOutQuint"},select:function(a){var b=this.widget();a.indexOf("/#!")==0&&(a=a.substr(3));if(a=="/"){b.find(".selected").removeClass("selected");return}var c=b.find("a[href$='"+a+"']:not(.back-link)").last();b.find(".clicked").removeClass("clicked"),c.addClass("clicked").animate({marginTop:0,fontSize:"1em"}),c.closest("ul").find(".selected").removeClass("selected");var d=c.closest("li").addClass("selected");d.addClass("selected"),d.closest("ul").closest("li").addClass("selected").closest("ul").closest("li").addClass("selected")},prepareTransition:function(){var b=this.widget();this.top=b.css("marginTop"),a("html").hasClass("ie7")&&(this.top=b.css("top"))},transition:function(){var b=this.widget(),c=this.options,d=b.css("marginTop");a("html").hasClass("t-project")?b.find("> ul > li.selected > ul > li > a").hide():b.find("> ul > li > ul > li > a").show();var e={marginTop:this.top},f={marginTop:d};a("html").hasClass("ie7")&&(e={top:this.top},f={top:d}),b.css({marginTop:this.top}).animate({marginTop:d},{duration:300,easing:c.easing,complete:function(){b.attr("style","")}})},_size:function(b){var c=this;b.each(function(b){var c=a(this),d=c.parent(),e=d.find("> ul").detach();c.data("menu",e);var f=14;d.hasClass("first")&&(f=6);var g=c.outerWidth()+f;d.width(g).data("width",g),d.height(20)})},_create:function(){if(a("html").hasClass("webkit")||a("html").hasClass("gecko")&&a("html").hasClass("win")||a("html").hasClass("ie6")||a("html").hasClass("ie7")||a("html").hasClass("ie8"))this.options.duration=200;f._create.apply(this,arguments);var b=this.widget();b.find("li").not(".back").find("> a").bind({mouseenter:a.proxy(this,"_mouseenter"),mouseleave:a.proxy(this,"_mouseleave"),click:a.proxy(this,"_click")})},_click:function(b){var c=this.widget(),d=a(b.currentTarget),e=this.options;d.animate({marginTop:0,fontSize:"1em"},e)},_mouseenter:function(b){var c=this.widget(),d=a(b.currentTarget),e=d.parent(),f=this.options;d.stop(!0).animate({fontSize:"1.2em",marginTop:"-.2em"},f)},_mouseleave:function(b){b.preventDefault();var c=this.widget(),d=this.options,e=a(b.currentTarget),f=e.parent();e.stop(!0).animate({fontSize:"1em",marginTop:"0"},d)}})}(jQuery),function(a){var b="images",c="code28."+b,d="."+c,e=a.Widget,f=e.prototype;a.widget(c,e,{options:{duration:400,easing:"easeOutQuad"},_create:function(){f._create.apply(this,arguments);var b=this.widget();b.linkswitch(),b.css({visibility:"visible",display:"none"}).fadeIn(200),b.fullscreen({bottom:33,right:33}),b.find("img").fullscreen({$reference:b});if(a("html").hasClass("t-category")){b.find("a").bind({click:function(a){a.preventDefault(),a.stopPropagation()}});return}if(b.find("img").length<2){b.find("li").eq(0).addClass("selected");return}a("html").attr("id")=="page-index"&&b.find("a").bind({click:a.proxy(this,"_click")})},_click:function(a){a.preventDefault(),a.stopPropagation(),this.next()},previous:function(){var a=this.widget(),b=a.find(".selected").prev().prev();b.length==0&&(b=a.find("li").last().prev());var c=b.attr("id").split("-")[1]},next:function(){var a=this.widget(),b=a.find(".selected").next();b.length==0&&(b=a.find("li").eq(0));var c=b.attr("id").split("-")[1];this.show(c)},show:function(a){var b=this.widget(),c=this.options,d=b.find(".selected").removeClass("selected"),e=b.find("#image-"+a).addClass("selected"),f=d.height()+40;e.stop(!0).show().find("img").stop(!0).css({opacity:1}),d.stop(!0).css({display:"block",zIndex:1}).animate({top:-f+"px"},{duration:c.duration}).find("img").stop(!0).animate({opacity:0},{duration:c.duration*.8}),b.find(".selected").stop(!0).css({top:f+"px",zIndex:2,display:"block"}).animate({top:0},{easing:c.easing,duration:c.duration,complete:function(){d.stop(!0).hide().css({top:0}).find("img").stop(!0).css({opacity:1})}})}})}(jQuery),function(a){var b="contact",c="code28."+b,d="."+c,e=a.Widget,f=e.prototype;a.widget(c,e,{options:{duration:300,easing:"easeOutQuad"},_create:function(){f._create.apply(this,arguments);var b=this.widget(),c=b.find(".vcard"),d=c.show().height()+10;c.hide();var e=a("<div />");e.appendTo(b),e.css({width:624,height:476,visibility:"hidden"}).fullscreen({left:33,top:127,bottom:33,right:33}).gmap({latitude:c.find(".latitude").text(),longitude:new Number(c.find(".longitude").text()),zoom:16}),a(window).bind({resize:function(a){e.gmap("center")}}),c.find(".geo").remove(),setTimeout(function(){e.gmap("addInfoWindow",'<div style="width: 250px;height: '+d+'px;">'+c.html()+"</div>"),setTimeout(function(){e.css({display:"none",visibility:"visible"}).fadeIn(),e.find("h2").css({})},200)},500)}})}(jQuery),function(a){a.fn.onImagesLoaded=function(b){return this.each(function(){var c=this.tagName.toLowerCase()==="img"?a(this):a("img",this),d=this,e=0,f=function(){typeof b=="function"&&b(d)};c.length?c.each(function(){var b=this,d=function(d){b.complete||b.readyState=="complete"&&d.type=="readystatechange"?++e===c.length&&f():b.readyState===undefined&&a(b).attr("src",a(b).attr("src"))};a(b).bind("load readystatechange",function(a){d(a)}),d({type:"readystatechange"})}):f()})};var b="fullscreen",c="code28."+b,d="."+c,e=a.Widget,f=e.prototype;a.widget(c,e,{options:{$reference:a(window),bottom:0,right:0},_destroy:function(){f._destroy.apply(this,arguments);var b=this.widget();a(window).unbind("resize.fullscreen")},_create:function(){f._create.apply(this,arguments);var a=this.widget();if(a.is("img")){var b=this;a.hide().onImagesLoaded(function(){a.fadeIn(100),b.__init()});return}this.__init()},__init:function(){var b=this.widget(),c=b.width(),d=b.height();this.ratio=c/d,a(window).bind({"resize.fullscreen":a.proxy(this,"_resize")}),this._resize()},_resize:function(){var a=this.widget(),b=this.options.$reference;try{var c=a.position()}catch(d){c={top:0,left:0}}var e=b.width()-c.left,f=b.height()-c.top;this.options.left&&(e-=this.options.left,f-=this.options.top),e-=this.options.right,f-=this.options.bottom;var g=1030,h=590;e=Math.max(h,Math.min(e,g)),g=768,h=440,f=Math.max(h,Math.min(f,g));var i,j,k=this.ratio;e/k<f?(i=e,j=e/k):(i=f*k,j=f),a.css({width:Math.round(i)+"px",height:Math.round(j)+"px"})}})}(jQuery),function(a){var b="linkswitch",c="code28."+b,d="."+c,e=a.Widget,f=e.prototype;a.widget(c,e,{options:{},_create:function(){f._create.apply(this,arguments);var b=this.widget();this.reversed=!1,b.bind({click:a.proxy(this,"_mousemove")})},_mousemove:function(b){var c=this.widget(),d=c.height()/2,e=b.pageY-c.offset().top;if(e<d&&!this.reversed||e>d&&this.reversed){var f=c,g=f.length;this.reversed=!this.reversed,f.each(function(b){var c=a(this),d=c.attr("href");c.attr("href",c.data("reverseHref")),c.data("reverseHref",d),!!a("html").app("hasHistory")})}}})}(jQuery),function(){$(function(){$("html").app()})}()
