function a(f){throw f;}var m=true,o=null,p=false,r=window.ko={};r.b=function(f,b){for(var c=f.split("."),d=window,e=0;e<c.length-1;e++)d=d[c[e]];d[c[c.length-1]]=b};r.g=function(f,b,c){f[b]=c};r.a=new function(){var f=/^(\s|\u00A0)+|(\s|\u00A0)+$/g;return{ba:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],h:function(b,c){for(var d=0,e=b.length;d<e;d++)c(b[d])},i:function(b,c){if(typeof b.indexOf=="function")return b.indexOf(c);for(var d=0,e=b.length;d<e;d++)if(b[d]==c)return d;return-1},xa:function(b,c,d){for(var e=0,g=b.length;e<g;e++)if(c.call(d,b[e]))return b[e];return o},Z:function(b,c){var d=r.a.i(b,c);d>=0&&b.splice(d,1)},Y:function(b){b=b||[];for(var c=[],d=0,e=b.length;d<e;d++)r.a.i(c,b[d])<0&&c.push(b[d]);return c},K:function(b,c){b=b||[];for(var d=[],e=0,g=b.length;e<g;e++)d.push(c(b[e]));return d},J:function(b,c){b=b||[];for(var d=[],e=0,g=b.length;e<g;e++)c(b[e])&&d.push(b[e]);return d},L:function(b,c){for(var d=0,e=c.length;d<e;d++)b.push(c[d])},aa:function(b){for(;b.firstChild;){r.a.e.N(b.firstChild);b.removeChild(b.firstChild)}},Ua:function(b,c){r.a.aa(b);c&&r.a.h(c,function(d){b.appendChild(d)})},ka:function(b,c){var d=b.nodeType?[b]:b;if(d.length>0){for(var e=d[0],g=e.parentNode,h=0,i=c.length;h<i;h++)g.insertBefore(c[h],e);h=0;for(i=d.length;h<i;h++){r.a.e.N(d[h]);g.removeChild(d[h])}}},na:function(b,c){if(navigator.userAgent.indexOf("MSIE 6")>=0)b.setAttribute("selected",c);else b.selected=c},Ia:function(b,c){if(!b||b.nodeType!=1)return[];var d=[];b.getAttribute(c)!==o&&d.push(b);for(var e=b.getElementsByTagName("*"),g=0,h=e.length;g<h;g++)e[g].getAttribute(c)!==o&&d.push(e[g]);return d},l:function(b){return(b||"").replace(f,"")},$a:function(b,c){for(var d=[],e=(b||"").split(c),g=0,h=e.length;g<h;g++){var i=r.a.l(e[g]);i!==""&&d.push(i)}return d},Va:function(b,c){b=b||"";if(c.length>b.length)return p;return b.substring(0,c.length)===c},Ga:function(b,c){if(c===undefined)return(new Function("return "+b))();with(c)return eval("("+b+")")},Ea:function(b,c){if(c.compareDocumentPosition)return(c.compareDocumentPosition(b)&16)==16;for(;b!=o;){if(b==c)return m;b=b.parentNode}return p},A:function(b){return r.a.Ea(b,document)},q:function(b,c,d){if(typeof jQuery!="undefined")jQuery(b).bind(c,d);else if(typeof b.addEventListener=="function")b.addEventListener(c,d,p);else if(typeof b.attachEvent!="undefined")b.attachEvent("on"+c,function(e){d.call(b,e)});else a(Error("Browser doesn't support addEventListener or attachEvent"))},qa:function(b,c){if(!(b&&b.nodeType))a(Error("element must be a DOM node when calling triggerEvent"));if(typeof document.createEvent=="function")if(typeof b.dispatchEvent=="function"){var d=document.createEvent(c=="click"?"MouseEvents":"HTMLEvents");d.initEvent(c,m,m,window,0,0,0,0,0,p,p,p,p,0,b);b.dispatchEvent(d)}else a(Error("The supplied element doesn't support dispatchEvent"));else if(typeof b.fireEvent!="undefined"){if(c=="click")if(b.tagName=="INPUT"&&(b.type.toLowerCase()=="checkbox"||b.type.toLowerCase()=="radio"))b.checked=b.checked!==m;b.fireEvent("on"+c)}else a(Error("Browser doesn't support triggering events"))},d:function(b){return r.C(b)?b():b},Da:function(b,c){return r.a.i((b.className||"").split(/\s+/),c)>=0},Xa:function(b,c,d){var e=r.a.Da(b,c);if(d&&!e)b.className=(b.className||"")+" "+c;else if(e&&!d){d=(b.className||"").split(/\s+/);e="";for(var g=0;g<d.length;g++)if(d[g]!=c)e+=d[g]+" ";b.className=r.a.l(e)}},Ra:function(b,c){b=r.a.d(b);c=r.a.d(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},ga:function(b){for(var c=[],d=b.length-1;d>=0;d--)c.push(b[d]);return c},P:/MSIE 6/i.test(navigator.userAgent),La:/MSIE 7/i.test(navigator.userAgent),da:function(b,c){for(var d=r.a.ga(b.getElementsByTagName("INPUT")).concat(r.a.ga(b.getElementsByTagName("TEXTAREA"))),e=typeof c=="string"?function(i){return i.name===c}:function(i){return c.test(i.name)},g=[],h=d.length-1;h>=0;h--)e(d[h])&&g.push(d[h]);return g},F:function(b){if(typeof b=="string")if(b=r.a.l(b)){if(window.JSON&&window.JSON.parse)return window.JSON.parse(b);return(new Function("return "+b))()}return o},T:function(b){if(typeof JSON=="undefined"||typeof JSON.stringify=="undefined")a(Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js"));return JSON.stringify(r.a.d(b))},Qa:function(b,c,d){d=d||{};var e=d.params||{},g=d.includeFields||this.ba,h=b;if(typeof b=="object"&&b.tagName=="FORM"){h=b.action;for(var i=g.length-1;i>=0;i--)for(var j=r.a.da(b,g[i]),l=j.length-1;l>=0;l--)e[j[l].name]=j[l].value}c=r.a.d(c);var k=document.createElement("FORM");k.style.display="none";k.action=h;k.method="post";for(var n in c){b=document.createElement("INPUT");b.name=n;b.value=r.a.T(r.a.d(c[n]));k.appendChild(b)}for(n in e){b=document.createElement("INPUT");b.name=n;b.value=e[n];k.appendChild(b)}document.body.appendChild(k);d.submitter?d.submitter(k):k.submit();setTimeout(function(){k.parentNode.removeChild(k)},0)},e:{Ya:0,w:"__ko__"+(new Date).getTime(),Za:{},t:function(b,c){var d=r.a.e.ca(b,p);return d===undefined?undefined:d[c]},la:function(b,c,d){r.a.e.ca(b,m)[c]=d},ca:function(b,c){var d=b[r.a.e.w];if(!d){if(!c)return;d=b[r.a.e.w]="ko"+r.a.e.Ya++;r.a.e[d]={}}return r.a.e[d]},M:function(b){var c=b[r.a.e.w];if(c){delete r.a.e[c];b[r.a.e.w]=o}},N:function(b){if(!(b.nodeType!=1&&b.nodeType!=9)){r.a.e.M(b);b=b.getElementsByTagName("*");for(var c=0,d=b.length;c<d;c++)r.a.e.M(b[c])}}}}};r.b("ko.utils",r.a);r.b("ko.utils.arrayForEach",r.a.h);r.b("ko.utils.arrayFirst",r.a.xa);r.b("ko.utils.arrayFilter",r.a.J);r.b("ko.utils.arrayGetDistinctValues",r.a.Y);r.b("ko.utils.arrayIndexOf",r.a.i);r.b("ko.utils.arrayMap",r.a.K);r.b("ko.utils.arrayPushAll",r.a.L);r.b("ko.utils.arrayRemoveItem",r.a.Z);r.b("ko.utils.fieldsIncludedWithJsonPost",r.a.ba);r.b("ko.utils.getFormFields",r.a.da);r.b("ko.utils.postJson",r.a.Qa);r.b("ko.utils.parseJson",r.a.F);r.b("ko.utils.stringifyJson",r.a.T);r.b("ko.utils.range",r.a.Ra);r.b("ko.utils.triggerEvent",r.a.qa);r.b("ko.utils.unwrapObservable",r.a.d);Function.prototype.bind||(Function.prototype.bind=function(f){var b=this,c=Array.prototype.slice.call(arguments);f=c.shift();return function(){return b.apply(f,c.concat(Array.prototype.slice.call(arguments)))}});r.j=function(){function f(){return((1+Math.random())*4294967296|0).toString(16).substring(1)}function b(d,e){if(d)if(d.nodeType==8){var g=r.j.ia(d.nodeValue);g!=o&&e.push({Ca:d,Na:g})}else if(d.nodeType==1){g=0;for(var h=d.childNodes,i=h.length;g<i;g++)b(h[g],e)}}var c={};return{R:function(d){if(typeof d!="function")a(Error("You can only pass a function to ko.memoization.memoize()"));var e=f()+f();c[e]=d;return"<!--[ko_memo:"+e+"]--\>"},ra:function(d,e){var g=c[d];if(g===undefined)a(Error("Couldn't find any memo with ID "+
d+". Perhaps it's already been unmemoized."));try{g.apply(o,e||[]);return m}finally{delete c[d]}},sa:function(d,e){var g=[];b(d,g);for(var h=0,i=g.length;h<i;h++){var j=g[h].Ca,l=[j];e&&r.a.L(l,e);r.j.ra(g[h].Na,l);j.nodeValue="";j.parentNode&&j.parentNode.removeChild(j)}},ia:function(d){return(d=d.match(/^\[ko_memo\:(.*?)\]$/))?d[1]:o}}}();r.b("ko.memoization",r.j);r.b("ko.memoization.memoize",r.j.R);r.b("ko.memoization.unmemoize",r.j.ra);r.b("ko.memoization.parseMemoText",r.j.ia);r.b("ko.memoization.unmemoizeDomNodeAndDescendants",r.j.sa);r.Wa=function(f,b){this.za=f;this.s=b;r.g(this,"dispose",this.s)};r.U=function(){var f=[];this.V=function(b,c){var d=new r.Wa(c?function(){b.call(c)}:b,function(){r.a.Z(f,d)});f.push(d);return d};this.v=function(b){r.a.h(f.slice(0),function(c){c&&c.za(b)})};this.Ja=function(){return f.length};r.g(this,"subscribe",this.V);r.g(this,"notifySubscribers",this.v);r.g(this,"getSubscriptionsCount",this.Ja)};r.fa=function(f){return typeof f.V=="function"&&typeof f.v=="function"};r.b("ko.subscribable",r.U);r.b("ko.isSubscribable",r.fa);r.z=function(){var f=[];return{ya:function(){f.push([])},end:function(){return f.pop()},ja:function(b){if(!r.fa(b))a("Only subscribable things can act as dependencies");f.length>0&&f[f.length-1].push(b)}}}();r.p=function(f){function b(){if(arguments.length>0){c=arguments[0];b.v(c);return this}else{r.z.ja(b);return c}}var c=f;b.n=r.p;b.H=function(){b.v(c)};r.U.call(b);r.g(b,"valueHasMutated",b.H);return b};r.C=function(f){if(f===o||f===undefined||f.n===undefined)return p;if(f.n===r.p)return m;return r.C(f.n)};r.D=function(f){if(typeof f=="function"&&f.n===r.p)return m;if(typeof f=="function"&&f.n===r.m&&f.Ka)return m;return p};r.b("ko.observable",r.p);r.b("ko.isObservable",r.C);r.b("ko.isWriteableObservable",r.D);r.Pa=function(f){var b=new r.p(f);r.a.h(["pop","push","reverse","shift","sort","splice","unshift"],function(c){b[c]=function(){var d=b();d=d[c].apply(d,arguments);b.H();return d}});r.a.h(["slice"],function(c){b[c]=function(){var d=b();return d[c].apply(d,arguments)}});b.remove=function(c){for(var d=b(),e=[],g=[],h=typeof c=="function"?c:function(k){return k===c},i=0,j=d.length;i<j;i++){var l=d[i];h(l)?g.push(l):e.push(l)}b(e);return g};b.Sa=function(c){if(!c)return[];return b.remove(function(d){return r.a.i(c,d)>=0})};b.$=function(c){for(var d=b(),e=typeof c=="function"?c:function(h){return h===c},g=d.length-1;g>=0;g--)if(e(d[g]))d[g]._destroy=m;b.H()};b.Ba=function(c){if(!c)return[];return b.$(function(d){return r.a.i(c,d)>=0})};b.indexOf=function(c){var d=b();return r.a.i(d,c)};b.replace=function(c,d){var e=b.indexOf(c);if(e>=0){b()[e]=d;b.H()}};r.g(b,"remove",b.remove);r.g(b,"removeAll",b.Sa);r.g(b,"destroy",b.$);r.g(b,"destroyAll",b.Ba);r.g(b,"indexOf",b.indexOf);return b};r.b("ko.observableArray",r.Pa);r.m=function(f,b,c){function d(){r.a.h(i,function(k){k.s()});i=[]}function e(k){d();r.a.h(k,function(n){i.push(n.V(g))})}function g(){if(l&&typeof c.disposeWhen=="function")if(c.disposeWhen()){h.s();return}try{r.z.ya();j=c.owner?c.read.call(c.owner):c.read()}finally{var k=r.a.Y(r.z.end());e(k)}h.v(j);l=m}function h(){if(arguments.length>0)if(typeof c.write==="function"){var k=arguments[0];c.owner?c.write.call(c.owner,k):c.write(k)}else a("Cannot write a value to a dependentObservable unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");else{l||g();r.z.ja(h);return j}}if(f&&typeof f=="object")c=f;else{c=c||{};c.read=f||c.read;c.owner=b||c.owner}if(typeof c.read!="function")a("Pass a function that returns the value of the dependentObservable");var i=[],j,l=p;h.n=r.m;h.Ha=function(){return i.length};h.Ka=typeof c.write==="function";h.s=function(){d()};r.U.call(h);c.deferEvaluation!==m&&g();r.g(h,"dispose",h.s);r.g(h,"getDependenciesCount",h.Ha);return h};r.m.n=r.p;r.b("ko.dependentObservable",r.m);(function(){function f(d,e,g){g=g||new c;d=e(d);if(!(typeof d=="object"&&d!==o&&d!==undefined))return d;var h=d instanceof Array?[]:{};g.save(d,h);b(d,function(i){var j=e(d[i]);switch(typeof j){case"boolean":case"number":case"string":case"function":h[i]=j;break;case"object":case"undefined":var l=g.t(j);h[i]=l!==undefined?l:f(j,e,g)}});return h}function b(d,e){if(d instanceof Array)for(var g=0;g<d.length;g++)e(g);else for(g in d)e(g)}function c(){var d=[],e=[];this.save=function(g,h){var i=r.a.i(d,g);if(i>=0)e[i]=h;else{d.push(g);e.push(h)}};this.t=function(g){g=r.a.i(d,g);return g>=0?e[g]:undefined}}r.pa=function(d){if(arguments.length==0)a(Error("When calling ko.toJS, pass the object you want to convert."));return f(d,function(e){for(var g=0;r.C(e)&&g<10;g++)e=e();return e})};r.toJSON=function(d){d=r.pa(d);return r.a.T(d)}})();r.b("ko.toJS",r.pa);r.b("ko.toJSON",r.toJSON);r.f={k:function(f){if(f.tagName=="OPTION"){if(f.__ko__hasDomDataOptionValue__===m)return r.a.e.t(f,r.c.options.ha);return f.getAttribute("value")}else return f.tagName=="SELECT"?f.selectedIndex>=0?r.f.k(f.options[f.selectedIndex]):undefined:f.value},I:function(f,b){if(f.tagName=="OPTION")switch(typeof b){case"string":case"number":r.a.e.M(f);"__ko__hasDomDataOptionValue__"in f&&delete f.__ko__hasDomDataOptionValue__;f.value=b;break;default:r.a.e.la(f,r.c.options.ha,b);f.__ko__hasDomDataOptionValue__=m;f.value=""}else if(f.tagName=="SELECT")for(var c=f.options.length-1;c>=0;c--){if(r.f.k(f.options[c])==b){f.selectedIndex=c;break}}else{if(b===o||b===undefined)b="";f.value=b}}};r.b("ko.selectExtensions",r.f);r.b("ko.selectExtensions.readValue",r.f.k);r.b("ko.selectExtensions.writeValue",r.f.I);r.o=function(){function f(e,g){return e.replace(b,function(h,i){return g[i]})}var b=/\[ko_token_(\d+)\]/g,c=/^[\_$a-z][\_$a-z0-9]*(\[.*?\])*(\.[\_$a-z][\_$a-z0-9]*(\[.*?\])*)*$/i,d=["true","false"];return{F:function(e){e=r.a.l(e);if(e.length<3)return{};for(var g=[],h=o,i,j=e.charAt(0)=="{"?1:0;j<e.length;j++){var l=e.charAt(j);if(h===o)switch(l){case'"':case"'":case"/":h=j;i=l;break;case"{":h=j;i="}";break;case"[":h=j;i="]"}else if(l==i){l=e.substring(h,j+1);g.push(l);var k="[ko_token_"+(g.length-
1)+"]";e=e.substring(0,h)+k+e.substring(j+1);j-=l.length-k.length;h=o}}h={};e=e.split(",");i=0;for(j=e.length;i<j;i++){k=e[i];var n=k.indexOf(":");if(n>0&&n<k.length-1){l=r.a.l(k.substring(0,n));k=r.a.l(k.substring(n+1));if(l.charAt(0)=="{")l=l.substring(1);if(k.charAt(k.length-1)=="}")k=k.substring(0,k.length-1);l=r.a.l(f(l,g));k=r.a.l(f(k,g));h[l]=k}}return h},O:function(e){var g=r.o.F(e),h=[],i;for(i in g){var j=g[i],l;l=j;l=r.a.i(d,r.a.l(l).toLowerCase())>=0?p:l.match(c)!==o;if(l){h.length>0&&h.push(", ");h.push(i+" : function(__ko_value) { "+j+" = __ko_value; }")}}if(h.length>0)e=e+", '_ko_property_writers' : { "+h.join("")+" } ";return e}}}();r.b("ko.jsonExpressionRewriting",r.o);r.b("ko.jsonExpressionRewriting.parseJson",r.o.F);r.b("ko.jsonExpressionRewriting.insertPropertyAccessorsIntoJson",r.o.O);r.c={};r.X=function(f,b,c){function d(i){return function(){return h[i]}}function e(){return h}var g=m,h;new r.m(function(){var i;if(!(i=typeof b=="function"?b():b)){var j=f.getAttribute("data-bind");try{var l=" { "+r.o.O(j)+" } ";i=r.a.Ga(l,c===o?window:c)}catch(k){a(Error("Unable to parse binding attribute.\nMessage: "+k+";\nAttribute value: "+j))}}h=i;if(g)for(var n in h)r.c[n]&&typeof r.c[n].init=="function"&&(0,r.c[n].init)(f,d(n),e,c);for(n in h)r.c[n]&&typeof r.c[n].update=="function"&&(0,r.c[n].update)(f,d(n),e,c)},o,{disposeWhen:function(){return!r.a.A(f)}});g=p};r.ua=function(f,b){if(b&&b.nodeType==undefined)a(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node (note: this is a breaking change since KO version 1.05)"));b=b||window.document.body;var c=r.a.Ia(b,"data-bind");r.a.h(c,function(d){r.X(d,o,f)})};r.b("ko.bindingHandlers",r.c);r.b("ko.applyBindings",r.ua);r.c.click={init:function(f,b,c,d){r.a.q(f,"click",function(e){var g,h=b();try{g=h.call(d)}finally{if(g!==m)if(e.preventDefault)e.preventDefault();else e.returnValue=p}})}};r.c.submit={init:function(f,b,c,d){if(typeof b()!="function")a(Error("The value for a submit binding must be a function to invoke on submit"));r.a.q(f,"submit",function(e){var g,h=b();try{g=h.call(d,f)}finally{if(g!==m)if(e.preventDefault)e.preventDefault();else e.returnValue=p}})}};r.c.visible={update:function(f,b){var c=r.a.d(b()),d=f.style.display!="none";if(c&&!d)f.style.display="";else if(!c&&d)f.style.display="none"}};r.c.enable={update:function(f,b){var c=r.a.d(b());if(c&&f.disabled)f.removeAttribute("disabled");else if(!c&&!f.disabled)f.disabled=m}};r.c.disable={update:function(f,b){r.c.enable.update(f,function(){return!r.a.d(b())})}};r.c.value={init:function(f,b,c){var d=c().valueUpdate||"change",e=p;if(r.a.Va(d,"after")){e=m;d=d.substring(5)}var g=e?function(h){setTimeout(h,0)}:function(h){h()};r.a.q(f,d,function(){g(function(){var h=b(),i=r.f.k(f);if(r.D(h))h(i);else{h=c();h._ko_property_writers&&h._ko_property_writers.value&&h._ko_property_writers.value(i)}})})},update:function(f,b){var c=r.a.d(b()),d=r.f.k(f),e=c!=d;if(c===0&&d!==0&&d!=="0")e=m;if(e){d=function(){r.f.I(f,c)};d();f.tagName=="SELECT"&&setTimeout(d,0)}if(f.tagName=="SELECT"){d=r.f.k(f);d!==c&&r.a.qa(f,"change")}}};r.c.options={update:function(f,b,c){if(f.tagName!="SELECT")a(Error("options binding applies only to SELECT elements"));var d=r.a.K(r.a.J(f.childNodes,function(k){return k.tagName&&k.tagName=="OPTION"&&k.selected}),function(k){return r.f.k(k)||k.innerText||k.textContent}),e=f.scrollTop,g=r.a.d(b());r.a.aa(f);if(g){var h=c();if(typeof g.length!="number")g=[g];if(h.optionsCaption){var i=document.createElement("OPTION");i.innerHTML=h.optionsCaption;r.f.I(i,undefined);f.appendChild(i)}c=0;for(b=g.length;c<b;c++){i=document.createElement("OPTION");var j=typeof h.optionsValue=="string"?g[c][h.optionsValue]:g[c],l=typeof h.optionsText=="string"?g[c][h.optionsText]:j;j=r.a.d(j);l=r.a.d(l);r.f.I(i,j);i.innerHTML=l.toString();f.appendChild(i)}g=f.getElementsByTagName("OPTION");c=h=0;for(b=g.length;c<b;c++)if(r.a.i(d,r.f.k(g[c]))>=0){r.a.na(g[c],m);h++}if(e)f.scrollTop=e}}};r.c.options.ha="__ko.bindingHandlers.options.optionValueDomData__";r.c.selectedOptions={ea:function(f){var b=[];f=f.childNodes;for(var c=0,d=f.length;c<d;c++){var e=f[c];e.tagName=="OPTION"&&e.selected&&b.push(r.f.k(e))}return b},init:function(f,b,c){r.a.q(f,"change",function(){var d=b();if(r.D(d))d(r.c.selectedOptions.ea(this));else{d=c();d._ko_property_writers&&d._ko_property_writers.value&&d._ko_property_writers.value(r.c.selectedOptions.ea(this))}})},update:function(f,b){if(f.tagName!="SELECT")a(Error("values binding applies only to SELECT elements"));var c=r.a.d(b());if(c&&typeof c.length=="number")for(var d=f.childNodes,e=0,g=d.length;e<g;e++){var h=d[e];h.tagName=="OPTION"&&r.a.na(h,r.a.i(c,r.f.k(h))>=0)}}};r.c.text={update:function(f,b){var c=r.a.d(b());if(c===o||c===undefined)c="";typeof f.innerText=="string"?f.innerText=c:f.textContent=c}};r.c.css={update:function(f,b){var c=r.a.d(b()||{}),d;for(d in c)if(typeof d=="string"){var e=r.a.d(c[d]);r.a.Xa(f,d,e)}}};r.c.style={update:function(f,b){var c=r.a.d(b()||{}),d;for(d in c)if(typeof d=="string"){var e=r.a.d(c[d]);f.style[d]=e||""}}};r.c.uniqueName={init:function(f,b){if(b()){f.name="ko_unique_"+ ++r.c.uniqueName.Aa;r.a.P&&f.mergeAttributes(document.createElement("<INPUT name='"+f.name+"'/>"),p)}}};r.c.uniqueName.Aa=0;r.c.checked={init:function(f,b,c){function d(){var e;if(f.type=="checkbox")e=f.checked;else if(f.type=="radio"&&f.checked)e=f.value;else return;var g=b();if(r.D(g))g()!==e&&g(e);else{g=c();g._ko_property_writers&&g._ko_property_writers.checked&&g._ko_property_writers.checked(e)}}r.a.q(f,"change",d);r.a.q(f,"click",d);f.type=="radio"&&!f.name&&r.c.uniqueName.init(f,function(){return m})},update:function(f,b){var c=r.a.d(b());if(f.type=="checkbox")(f.checked=c)&&r.a.P&&f.mergeAttributes(document.createElement("<INPUT type='checkbox' checked='checked' />"),p);else if(f.type=="radio"){f.checked=f.value==c;if(f.value==c&&(r.a.P||r.a.La))f.mergeAttributes(document.createElement("<INPUT type='radio' checked='checked' />"),p)}}};r.W=function(){this.renderTemplate=function(){a("Override renderTemplate in your ko.templateEngine subclass")};this.isTemplateRewritten=function(){a("Override isTemplateRewritten in your ko.templateEngine subclass")};this.rewriteTemplate=function(){a("Override rewriteTemplate in your ko.templateEngine subclass")};this.createJavaScriptEvaluatorBlock=function(){a("Override createJavaScriptEvaluatorBlock in your ko.templateEngine subclass")}};r.b("ko.templateEngine",r.W);r.G=function(){var f=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/g;return{Fa:function(b,c){c.isTemplateRewritten(b)||c.rewriteTemplate(b,function(d){return r.G.Oa(d,c)})},Oa:function(b,c){return b.replace(f,function(d,e,g,h,i,j,l){d=l;d=r.o.O(d);return c.createJavaScriptEvaluatorBlock("ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() {                     return (function() { return { "+d+" } })()                 })")+e})},va:function(b){return r.j.R(function(c,d){c.nextSibling&&r.X(c.nextSibling,b,d)})}}}();r.b("ko.templateRewriting",r.G);r.b("ko.templateRewriting.applyMemoizedBindingsToNextSibling",r.G.va);(function(){function f(c,d,e,g,h){var i=r.a.d(g);h=h||{};var j=h.templateEngine||b;r.G.Fa(e,j);e=j.renderTemplate(e,i,h);if(typeof e.length!="number"||e.length>0&&typeof e[0].nodeType!="number")a("Template engine must return an array of DOM nodes");e&&r.a.h(e,function(l){r.j.sa(l,[g])});switch(d){case"replaceChildren":r.a.Ua(c,e);break;case"replaceNode":r.a.ka(c,e);break;case"ignoreTargetNode":break;default:a(Error("Unknown renderMode: "+d))}h.afterRender&&h.afterRender(e,g);return e}var b;r.oa=function(c){if(c!=undefined&&!(c instanceof r.W))a("templateEngine must inherit from ko.templateEngine");b=c};r.S=function(c,d,e,g,h){e=e||{};if((e.templateEngine||b)==undefined)a("Set a template engine before calling renderTemplate");h=h||"replaceChildren";if(g){var i=g.nodeType?g:g.length>0?g[0]:o;return new r.m(function(){var j=f(g,h,c,d,e);if(h=="replaceNode"){g=j;i=g.nodeType?g:g.length>0?g[0]:o}},o,{disposeWhen:function(){return!i||!r.a.A(i)}})}else return r.j.R(function(j){r.S(c,d,e,j,"replaceNode")})};r.Ta=function(c,d,e,g){new r.m(function(){var h=r.a.d(d)||[];if(typeof h.length=="undefined")h=[h];h=r.a.J(h,function(i){return e.includeDestroyed||!i._destroy});r.a.ma(g,h,function(i){return f(o,"ignoreTargetNode",c,i,e)},e)},o,{disposeWhen:function(){return!r.a.A(g)}})};r.c.template={update:function(c,d,e,g){d=r.a.d(d());e=typeof d=="string"?d:d.name;if(typeof d.foreach!="undefined")r.Ta(e,d.foreach||[],{afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,includeDestroyed:d.includeDestroyed,afterRender:d.afterRender},c);else{var h=d.data;r.S(e,typeof h=="undefined"?g:h,{afterRender:d.afterRender},c)}}}})();r.b("ko.setTemplateEngine",r.oa);r.b("ko.renderTemplate",r.S);r.a.r=function(f,b,c){if(c===undefined)return r.a.r(f,b,1)||r.a.r(f,b,10)||r.a.r(f,b,Number.MAX_VALUE);else{f=f||[];b=b||[];for(var d=f,e=b,g=[],h=0;h<=e.length;h++)g[h]=[];h=0;for(var i=Math.min(d.length,c);h<=i;h++)g[0][h]=h;h=1;for(i=Math.min(e.length,c);h<=i;h++)g[h][0]=h;i=d.length;var j,l=e.length;for(h=1;h<=i;h++){var k=Math.min(l,h+c);for(j=Math.max(1,h-c);j<=k;j++)g[j][h]=d[h-1]===e[j-1]?g[j-1][h-1]:Math.min(g[j-1][h]===undefined?Number.MAX_VALUE:g[j-1][h]+1,g[j][h-1]===undefined?Number.MAX_VALUE:g[j][h-1]+1)}f=f;b=b;c=f.length;d=b.length;e=[];h=g[d][c];if(h===undefined)g=o;else{for(;c>0||d>0;){i=g[d][c];j=d>0?g[d-1][c]:h+1;l=c>0?g[d][c-1]:h+1;k=d>0&&c>0?g[d-1][c-1]:h+1;if(j===undefined||j<i-1)j=h+1;if(l===undefined||l<i-1)l=h+1;if(k<i-1)k=h+1;if(j<=l&&j<k){e.push({status:"added",value:b[d-1]});d--}else{if(l<j&&l<k)e.push({status:"deleted",value:f[c-1]});else{e.push({status:"retained",value:f[c-1]});d--}c--}}g=e.reverse()}return g}};r.b("ko.utils.compareArrays",r.a.r);(function(){function f(b,c){var d=[];r.m(function(){var e=b(c)||[];d.length>0&&r.a.ka(d,e);d.splice(0,d.length);r.a.L(d,e)},o,{disposeWhen:function(){return d.length==0||!r.a.A(d[0])}});return d}r.a.ma=function(b,c,d,e){c=c||[];e=e||{};var g=r.a.e.t(b,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===undefined,h=r.a.e.t(b,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],i=r.a.K(h,function(s){return s.wa}),j=r.a.r(i,c);c=[];var l=0,k=[];i=[];for(var n=o,q=0,w=j.length;q<w;q++)switch(j[q].status){case"retained":var t=h[l];c.push(t);if(t.B.length>0)n=t.B[t.B.length-1];l++;break;case"deleted":r.a.h(h[l].B,function(s){k.push({element:s,index:q,value:j[q].value});n=s});l++;break;case"added":t=f(d,j[q].value);c.push({wa:j[q].value,B:t});for(var v=0,x=t.length;v<x;v++){var u=t[v];i.push({element:u,index:q,value:j[q].value});if(n==o)b.firstChild?b.insertBefore(u,b.firstChild):b.appendChild(u);else n.nextSibling?b.insertBefore(u,n.nextSibling):b.appendChild(u);n=u}}r.a.h(k,function(s){r.a.e.N(s.element)});d=p;if(!g){if(e.afterAdd)for(q=0;q<i.length;q++)e.afterAdd(i[q].element,i[q].index,i[q].value);if(e.beforeRemove){for(q=0;q<k.length;q++)e.beforeRemove(k[q].element,k[q].index,k[q].value);d=m}}d||r.a.h(k,function(s){s.element.parentNode&&s.element.parentNode.removeChild(s.element)});r.a.e.la(b,"setDomNodeChildrenFromArrayMapping_lastMappingResult",c)}})();r.b("ko.utils.setDomNodeChildrenFromArrayMapping",r.a.ma);r.Q=function(){function f(c){var d=document.getElementById(c);if(d==o)a(Error("Cannot find template with ID="+c));return d}this.u=function(){if(typeof jQuery=="undefined"||!jQuery.tmpl)return 0;if(jQuery.tmpl.tag)return 2;return 1}();var b=RegExp("__ko_apos__","g");this.renderTemplate=function(c,d){if(this.u==0)a(Error("jquery.tmpl not detected.\nTo use KO's default template engine, reference jQuery and jquery.tmpl. See Knockout installation documentation for more details."));if(this.u==1){var e='<script type="text/html">'+f(c).text+"<\/script>";e=jQuery.tmpl(e,d)[0].text.replace(b,"'");return jQuery.clean([e],document)}d=[d];e=f(c).text;return jQuery.tmpl(e,d)};this.isTemplateRewritten=function(c){return f(c).Ma===m};this.rewriteTemplate=function(c,d){var e=f(c),g=d(e.text);if(this.u==1){g=r.a.l(g);g=g.replace(/([\s\S]*?)(\${[\s\S]*?}|{{[\=a-z][\s\S]*?}}|$)/g,function(h,i,j){return i.replace(/\'/g,"__ko_apos__")+j})}e.text=g;e.Ma=m};this.createJavaScriptEvaluatorBlock=function(c){if(this.u==1)return"{{= "+c+"}}";return"{{ko_code ((function() { return "+c+" })()) }}"};this.ta=function(c,d){document.write("<script type='text/html' id='"+c+"'>"+d+"<\/script>")};r.g(this,"addTemplate",this.ta);if(this.u>1)jQuery.tmpl.tag.ko_code={open:"_.push($1 || '');"}};r.Q.prototype=new r.W;r.oa(new r.Q);r.b("ko.jqueryTmplTemplateEngine",r.Q);;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);(function($){$.fn.batchImageLoad=function(options){var images=$(this);var originalTotalImagesCount=images.size();var totalImagesCount=originalTotalImagesCount;var elementsLoaded=0;$.fn.batchImageLoad.defaults={loadingCompleteCallback:null,imageLoadedCallback:null}
var opts=$.extend({},$.fn.batchImageLoad.defaults,options);images.each(function(){if($(this)[0].complete){totalImagesCount--;if(opts.imageLoadedCallback)opts.imageLoadedCallback(elementsLoaded,originalTotalImagesCount);}else{$(this).load(function(){elementsLoaded++;if(opts.imageLoadedCallback)opts.imageLoadedCallback(elementsLoaded,originalTotalImagesCount);if(elementsLoaded>=totalImagesCount)
if(opts.loadingCompleteCallback)opts.loadingCompleteCallback();});$(this).error(function(){elementsLoaded++;if(opts.imageLoadedCallback)opts.imageLoadedCallback(elementsLoaded,originalTotalImagesCount);if(elementsLoaded>=totalImagesCount)
if(opts.loadingCompleteCallback)opts.loadingCompleteCallback();});}});if(totalImagesCount<=0)
if(opts.loadingCompleteCallback)opts.loadingCompleteCallback();};})(jQuery);(function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))
return(q=query)&&false;});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;q.run();return this;},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)
$.livequery.stop(query.id);});return this;}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this;};$.livequery.prototype={stop:function(){var query=this;if(this.type)
this.elements.unbind(this.type,this.fn);else if(this.fn2)
this.elements.each(function(i,el){query.fn2.apply(el);});this.elements=[];this.stopped=true;},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
$.event.remove(el,query.type,query.fn);});}
else{nEls.each(function(){query.fn.apply(this);});if(this.fn2&&oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
query.fn2.apply(el);});}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)
$.livequery.queries[$.livequery.queue.shift()].run();}},pause:function(){$.livequery.running=false;},play:function(){$.livequery.running=true;$.livequery.run();},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r;}});},run:function(id){if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);}
else
$.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20);},stop:function(id){if(id!=undefined)
$.livequery.queries[id].stop();else
$.each($.livequery.queries,function(id){$.livequery.queries[id].stop();});}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove','html');$(function(){$.livequery.play();});})(jQuery);(function($){$.fn.ghostText=function(){return this.each(function(){var text=$(this).attr("placeholder");if(text!=""&&($(this).val()==""||$(this).val()==text)){$(this).addClass("disabled");$(this).val(text);$(this).focus(function(){$(this).removeClass("disabled");if($(this).val()==text){$(this).val("");}});$(this).blur(function(){if($(this).val()==""){$(this).val(text);$(this).addClass("disabled");}});}});};})(jQuery)
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+ date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+ 1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+ 1));break;}}}
return cookieValue;}};function detectBrowserVersion(){var userAgent=navigator.userAgent.toLowerCase();$.browser.chrome=/chrome/.test(navigator.userAgent.toLowerCase());var version=0;var name=0;if($.browser.msie){userAgent=$.browser.version;userAgent=userAgent.substring(0,userAgent.indexOf('.'));version=userAgent;name='msie';}
if($.browser.chrome){userAgent=userAgent.substring(userAgent.indexOf('chrome/')+7);userAgent=userAgent.substring(0,userAgent.indexOf('.'));version=userAgent;name='chrome';$.browser.safari=false;}
if($.browser.safari){userAgent=userAgent.substring(userAgent.indexOf('safari/')+7);userAgent=userAgent.substring(0,userAgent.indexOf('.'));version=userAgent;name='safari';}
if($.browser.mozilla){if(navigator.userAgent.toLowerCase().indexOf('firefox')!=-1){userAgent=userAgent.substring(userAgent.indexOf('firefox/')+8);userAgent=userAgent.substring(0,userAgent.indexOf('.'));version=userAgent;name='firefox';}
else{version=userAgent;name='mozilla';}}
if($.browser.opera){userAgent=userAgent.substring(userAgent.indexOf('version/')+8);userAgent=userAgent.substring(0,userAgent.indexOf('.'));version=userAgent;name='opera';}
return{v:version,n:name};}
(function($,r){var h,n=Array.prototype.slice,t=decodeURIComponent,a=$.param,j,c,m,y,b=$.bbq=$.bbq||{},s,x,k,e=$.event.special,d="hashchange",B="querystring",F="fragment",z="elemUrlAttr",l="href",w="src",p=/^.*\?|#.*$/g,u,H,g,i,C,E={};function G(I){return typeof I==="string"}function D(J){var I=n.call(arguments,1);return function(){return J.apply(this,I.concat(n.call(arguments)))}}function o(I){return I.replace(H,"$2")}function q(I){return I.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(K,P,I,L,J){var R,O,N,Q,M;if(L!==h){N=I.match(K?H:/^([^#?]*)\??([^#]*)(#?.*)/);M=N[3]||"";if(J===2&&G(L)){O=L.replace(K?u:p,"")}else{Q=m(N[2]);L=G(L)?m[K?F:B](L):L;O=J===2?L:J===1?$.extend({},L,Q):$.extend({},Q,L);O=j(O);if(K){O=O.replace(g,t)}}R=N[1]+(K?C:O||!N[1]?"?":"")+O+M}else{R=P(I!==h?I:location.href)}return R}a[B]=D(f,0,q);a[F]=c=D(f,1,o);a.sorted=j=function(J,K){var I=[],L={};$.each(a(J,K).split("&"),function(P,M){var O=M.replace(/(?:%5B|=).*$/,""),N=L[O];if(!N){N=L[O]=[];I.push(O)}N.push(M)});return $.map(I.sort(),function(M){return L[M]}).join("&")};c.noEscape=function(J){J=J||"";var I=$.map(J.split(""),encodeURIComponent);g=new RegExp(I.join("|"),"g")};c.noEscape(",/");c.ajaxCrawlable=function(I){if(I!==h){if(I){u=/^.*(?:#!|#)/;H=/^([^#]*)(?:#!|#)?(.*)$/;C="#!"}else{u=/^.*#/;H=/^([^#]*)#?(.*)$/;C="#"}i=!!I}return i};c.ajaxCrawlable(0);$.deparam=m=function(L,I){var K={},J={"true":!0,"false":!1,"null":null};$.each(L.replace(/\+/g," ").split("&"),function(O,T){var N=T.split("="),S=t(N[0]),M,R=K,P=0,U=S.split("]["),Q=U.length-1;if(/\[/.test(U[0])&&/\]$/.test(U[Q])){U[Q]=U[Q].replace(/\]$/,"");U=U.shift().split("[").concat(U);Q=U.length-1}else{Q=0}if(N.length===2){M=t(N[1]);if(I){M=M&&!isNaN(M)?+M:M==="undefined"?h:J[M]!==h?J[M]:M}if(Q){for(;P<=Q;P++){S=U[P]===""?R.length:U[P];R=R[S]=P<Q?R[S]||(U[P+1]&&isNaN(U[P+1])?{}:[]):M}}else{if($.isArray(K[S])){K[S].push(M)}else{if(K[S]!==h){K[S]=[K[S],M]}else{K[S]=M}}}}else{if(S){K[S]=I?h:""}}});return K};function A(K,I,J){if(I===h||typeof I==="boolean"){J=I;I=a[K?F:B]()}else{I=G(I)?I.replace(K?u:p,""):I}return m(I,J)}m[B]=D(A,0);m[F]=y=D(A,1);$[z]||($[z]=function(I){return $.extend(E,I)})({a:l,base:l,iframe:w,img:w,input:w,form:"action",link:l,script:w});k=$[z];function v(L,J,K,I){if(!G(K)&&typeof K!=="object"){I=K;K=J;J=h}return this.each(function(){var O=$(this),M=J||k()[(this.nodeName||"").toLowerCase()]||"",N=M&&O.attr(M)||"";O.attr(M,a[L](N,K,I))})}$.fn[B]=D(v,B);$.fn[F]=D(v,F);b.pushState=s=function(L,I){if(G(L)&&/^#/.test(L)&&I===h){I=2}var K=L!==h,J=c(location.href,K?L:{},K?I:2);location.href=J};b.getState=x=function(I,J){return I===h||typeof I==="boolean"?y(I):y(J)[I]};b.removeState=function(I){var J={};if(I!==h){J=x();$.each($.isArray(I)?I:arguments,function(L,K){delete J[K]})}s(J,2)};e[d]=$.extend(e[d],{add:function(I){var K;function J(M){var L=M[F]=c();M.getState=function(N,O){return N===h||typeof N==="boolean"?m(L,N):m(L,O)[N]};K.apply(this,arguments)}if($.isFunction(I)){K=I;return J}else{K=I.handler;I.handler=J}}})})(jQuery,this);(function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},i=0,c=0,l=[];function g(g,d,h,e){var c={data:e||(e===0||e===false)?e:d?d.data:{},_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};g&&a.extend(c,g,{nodes:[],parent:d});if(h){c.tmpl=h;c._ctnt=c._ctnt||c.tmpl(a,c);c.key=++i;(l.length?f:b)[i]=c}return c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h<m;h++){c=h;k=(h>0?this.clone(true):this).get();a(i[h])[d](k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return g}});a.fn.extend({tmpl:function(d,c,b){return a.tmpl(this[0],d,c,b)},tmplItem:function(){return a.tmplItem(this[0])},template:function(b){return a.template(b,this[0])},domManip:function(d,m,k){if(d[0]&&a.isArray(d[0])){var g=a.makeArray(arguments),h=d[0],j=h.length,i=0,f;while(i<j&&!(f=a.data(h[i++],"tmplItem")));if(f&&c)g[2]=function(b){a.tmpl.afterManip(this,b,k)};r.apply(this,g)}else r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return this}});a.extend({tmpl:function(d,h,e,c){var i,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return a(j(c,null,c.tmpl(a,c)))}if(!d)return[];if(typeof h==="function")h=h.call(c||{});e&&e.wrapped&&n(e,e.wrapped);i=a.isArray(h)?a.map(h,function(a){return a?g(e,c,d,a):null}):[g(e,c,d,h)];return k?a(j(c,null,i)):i},tmplItem:function(b){var c;if(b instanceof a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||a.data(b,"tmpl",o(b.innerHTML));return typeof c==="string"?(a.template[c]=b):b}return c?typeof c!=="string"?a.template(null,c):a.template[c]||a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return(""+a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.childNodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function j(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:j(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=k(c).concat(b);if(d)b=b.concat(k(d))});return b?b:k(c)}function k(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,k,g,b,c,d){var j=a.tmpl.tag[k],i,e,f;if(!j)throw"Unknown template tag: "+k;i=j._default||[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=h(b);d=d?","+h(d)+")":c?")":"";e=c?b.indexOf(".")>-1?b+h(c):"("+b+").call($item"+d:b;f=c?e:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else f=e=i.$1||"null";g=h(g);return"');"+j[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(f).split("$1").join(e).split("$2").join(g||i.$2||"")+"__.push('"})+"');}return __;")}function n(c,b){c._wrap=j(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function h(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,h;for(e=0,p=o.length;e<p;e++){if((k=o[e]).nodeType!==1)continue;j=k.getElementsByTagName("*");for(h=j.length-1;h>=0;h--)m(j[h]);m(k)}function m(j){var p,h=j,k,e,m;if(m=j.getAttribute(d)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(p=h.getAttribute(d)));if(p!==m){h=h.parentNode?h.nodeType===11?0:h.getAttribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[h]||f[h]);e.key=++i;b[i]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;h=a.data(j.parentNode,"tmplItem");h=h?h.key:0}if(e){k=e;while(k&&k.key!=h){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery);//(function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery);
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);(function(window,document,$){var W=$(window),D=$(document),F=$.fancybox=function(){F.open.apply(this,arguments);},didResize=false,resizeTimer=null;$.extend(F,{version:'2.0.3',defaults:{padding:24,margin:20,width:800,height:600,minWidth:200,minHeight:200,maxWidth:9999,maxHeight:9999,autoSize:true,fitToView:false,aspectRatio:false,topRatio:0.5,fixed:!$.browser.msie||$.browser.version>6,scrolling:'auto',wrapCSS:'fancybox-default',arrows:true,closeBtn:true,closeClick:false,nextClick:false,mouseWheel:true,autoPlay:false,playSpeed:3000,modal:false,loop:true,ajax:{},keys:{next:[13,32,34,39,40],prev:[8,33,37,38],close:[27]},index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0" '+($.browser.msie?'allowtransparency="true""':'')+' scrolling="{scrolling}" src="{href}"></iframe>',swf:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>',error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<div title="Close" class="fancybox-item fancybox-close"></div>',next:'<a title="Next" class="fancybox-item fancybox-next"><span></span></a>',prev:'<a title="Previous" class="fancybox-item fancybox-prev"><span></span></a>'},openEffect:'none',openSpeed:0,openEasing:'swing',openOpacity:true,openMethod:'zoomIn',closeEffect:'none',closeSpeed:0,closeEasing:'swing',closeOpacity:true,closeMethod:'zoomOut',nextEffect:'elastic',nextSpeed:300,nextEasing:'swing',nextMethod:'changeIn',prevEffect:'elastic',prevSpeed:300,prevEasing:'swing',prevMethod:'changeOut',helpers:{overlay:{speedIn:0,speedOut:0,opacity:0.3,css:{cursor:'pointer','background-color':'rgba(0, 0, 0, 0.85)'},closeClick:true},title:{type:'float'}},onCancel:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeClose:$.noop,afterClose:$.noop},group:{},opts:{},coming:null,current:null,isOpen:false,isOpened:false,wrap:null,outer:null,inner:null,player:{timer:null,isActive:false},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(group,opts){if(!$.isArray(group)){group=[group];}
if(!group.length){return;}
F.close(true);F.opts=$.extend(true,{},F.defaults,opts);F.group=group;F._start(F.opts.index||0);},cancel:function(){if(F.coming&&false===F.trigger('onCancel')){return;}
F.coming=null;F.hideLoading();if(F.ajaxLoad){F.ajaxLoad.abort();}
F.ajaxLoad=null;if(F.imgPreload){F.imgPreload.onload=F.imgPreload.onabort=F.imgPreload.onerror=null;}},close:function(a){F.cancel();if(!F.current||false===F.trigger('beforeClose')){return;}
F.unbindEvents();if(!F.isOpen||(a&&a[0]===true)){$(".fancybox-wrap").stop().trigger('onReset').remove();F._afterZoomOut();}else{F.isOpen=F.isOpened=false;$(".fancybox-item").remove();F.wrap.stop(true).removeClass('fancybox-opened');F.inner.css('overflow','hidden');F.transitions[F.current.closeMethod]();}},play:function(a){var clear=function(){clearTimeout(F.player.timer);},set=function(){clear();if(F.current&&F.player.isActive){F.player.timer=setTimeout(F.next,F.current.playSpeed);}},stop=function(){clear();$('body').unbind('.player');F.player.isActive=false;F.trigger('onPlayEnd');},start=function(){if(F.current&&(F.current.loop||F.current.index<F.group.length- 1)){F.player.isActive=true;set();$('body').bind({'onCancel.player afterShow.player onUpdate.player':set,'beforeClose.player':stop,'beforeLoad.player':clear});F.trigger('onPlayStart');}};if(F.player.isActive||(a&&a[0]===false)){stop();}else{start();}},next:function(){if(F.current){F.jumpto(F.current.index+ 1);}},prev:function(){if(F.current){F.jumpto(F.current.index- 1);}},jumpto:function(index){if(!F.current){return;}
index=parseInt(index,10);if(F.group.length>1&&F.current.loop){if(index>=F.group.length){index=0;}else if(index<0){index=F.group.length- 1;}}
if(typeof F.group[index]!=='undefined'){F.cancel();F._start(index);}},reposition:function(a){if(F.isOpen){F.wrap.css(F._getPosition(a));}},update:function(){if(F.isOpen){if(!didResize){resizeTimer=setInterval(function(){if(didResize){didResize=false;clearTimeout(resizeTimer);if(F.current){if(F.current.autoSize){F.inner.height('auto');F.current.height=F.inner.height();}
F._setDimension();if(F.current.canGrow){F.inner.height('auto');}
F.reposition();F.trigger('onUpdate');}}},100);}
didResize=true;}},toggle:function(){if(F.isOpen){F.current.fitToView=!F.current.fitToView;F.update();}},hideLoading:function(){$("#fancybox-loading").remove();},showLoading:function(){F.hideLoading();$('<div id="fancybox-loading"></div>').click(F.cancel).appendTo('body');},getViewport:function(){return{x:W.scrollLeft(),y:W.scrollTop(),w:W.width(),h:W.height()};},unbindEvents:function(){if(F.wrap){F.wrap.unbind('.fb');}
D.unbind('.fb');W.unbind('.fb');},bindEvents:function(){var current=F.current,keys=current.keys;if(!current){return;}
W.bind('resize.fb, orientationchange.fb',F.update);if(keys){D.bind('keydown.fb',function(e){if($.inArray(e.target.tagName.toLowerCase(),['input','textarea','select','button'])>-1){return;}
if($.inArray(e.keyCode,keys.close)>-1){F.close();e.preventDefault();}else if($.inArray(e.keyCode,keys.next)>-1){F.next();e.preventDefault();}else if($.inArray(e.keyCode,keys.prev)>-1){F.prev();e.preventDefault();}});}
if($.fn.mousewheel&&current.mouseWheel&&F.group.length>1){F.wrap.bind('mousewheel.fb',function(e,delta){if($(e.target).get(0).clientHeight===0||$(e.target).get(0).scrollHeight===$(e.target).get(0).clientHeight){e.preventDefault();F[delta>0?'prev':'next']();}});}},trigger:function(event){var ret,obj=$.inArray(event,['onCancel','beforeLoad','afterLoad'])>-1?'coming':'current';if(!F[obj]){return;}
if($.isFunction(F[obj][event])){ret=F[obj][event].apply(F[obj],Array.prototype.slice.call(arguments,1));}
if(ret===false){return false;}
if(F[obj].helpers){$.each(F[obj].helpers,function(helper,opts){if(opts&&typeof F.helpers[helper]!=='undefined'&&$.isFunction(F.helpers[helper][event])){F.helpers[helper][event](opts);}});}
$.event.trigger(event+'.fb');},isImage:function(str){return str&&str.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i);},isSWF:function(str){return str&&str.match(/\.(swf)(.*)?$/i);},_start:function(index){var element=F.group[index]||null,isDom,href,type,rez,coming=$.extend(true,{},F.opts,($.isPlainObject(element)?element:{}),{index:index,element:element});if(typeof coming.margin==='number'){coming.margin=[coming.margin,coming.margin,coming.margin,coming.margin];}
if(coming.modal){$.extend(true,coming,{closeBtn:false,closeClick:false,nextClick:false,arrows:false,mouseWheel:false,keys:null,helpers:{overlay:{css:{cursor:'auto'},closeClick:false}}});}
F.coming=coming;if(false===F.trigger('beforeLoad')){F.coming=null;return;}
if(typeof element==='object'&&(element.nodeType||element instanceof $)){isDom=true;coming.href=$(element).attr('href')||coming.href;coming.title=$(element).attr('title')||coming.title;if($.metadata){$.extend(coming,$(element).metadata());}}
type=coming.type;href=coming.href;if(!type){if(isDom){rez=$(element).data('fancybox-type');if(!rez&&element.className){rez=element.className.match(/fancybox\.(\w+)/);rez=rez?rez[1]:false;}}
if(rez){type=rez;}else if(href){if(F.isImage(href)){type='image';}else if(F.isSWF(href)){type='swf';}else if(href.match(/^#/)){type='inline';}}
if(!type){type=isDom?'inline':'html';}
coming.type=type;}
if(type==='inline'||type==='html'){if(!coming.content){coming.content=type==='inline'&&href?$(href):element;}
if(!coming.content.length){type=null;}}else{coming.href=href||element;if(!coming.href){type=null;}}
coming.group=F.group;if(type==='image'){F._loadImage();}else if(type==='ajax'){F._loadAjax();}else if(type){F._afterLoad();}else{F._error();}},_error:function(){F.coming.type='html';F.coming.minHeight=0;F.coming.autoSize=true;F.coming.content=F.coming.tpl.error;F._afterLoad();},_loadImage:function(){F.imgPreload=new Image();F.imgPreload.onload=function(){this.onload=this.onerror=null;F.coming.width=this.width;F.coming.height=this.height;F._afterLoad();};F.imgPreload.onerror=function(){this.onload=this.onerror=null;F._error();};F.imgPreload.src=F.coming.href;if(!F.imgPreload.complete){F.showLoading();}},_loadAjax:function(){F.showLoading();F.ajaxLoad=$.ajax($.extend({},F.coming.ajax,{url:F.coming.href,error:function(jqXHR,textStatus,errorThrown){if(textStatus!=='abort'){F.coming.content=errorThrown;F._error();}else{F.hideLoading();}},success:function(data,textStatus,jqXHR){if(textStatus==='success'){F.coming.content=data;F._afterLoad();}}}));},_afterLoad:function(){F.hideLoading();if(!F.coming||false===F.trigger('afterLoad',F.current)){F.coming=false;return;}
if(F.isOpened){$(".fancybox-item").remove();F.wrap.stop(true).removeClass('fancybox-opened');F.inner.css('overflow','hidden');F.transitions[F.current.prevMethod]();}else{$(".fancybox-wrap").stop().trigger('onReset').remove();F.trigger('afterClose');}
F.unbindEvents();F.isOpen=false;F.current=F.coming;F.coming=false;F.wrap=$(F.current.tpl.wrap).addClass('fancybox-tmp '+ F.current.wrapCSS).appendTo('body');F.outer=$('.fancybox-outer',F.wrap).css('padding',F.current.padding+'px');F.inner=$('.fancybox-inner',F.wrap);F._setContent();F.trigger('beforeShow');F._setDimension();F.wrap.hide().removeClass('fancybox-tmp');F.bindEvents();F.transitions[F.isOpened?F.current.nextMethod:F.current.openMethod]();},_setContent:function(){var content,loadingBay,current=F.current,type=current.type;switch(type){case'inline':case'ajax':case'html':if(type==='inline'){content=current.content.show().detach();if(content.parent().hasClass('fancybox-inner')){content.parents('.fancybox-wrap').trigger('onReset').remove();}
$(F.wrap).bind('onReset',function(){content.appendTo('body').hide();});}else{content=current.content;}
if(current.autoSize){loadingBay=$('<div class="fancybox-tmp"></div>').appendTo($("body")).append(content);current.width=loadingBay.outerWidth();current.height=loadingBay.outerHeight(true);content=loadingBay.contents().detach();loadingBay.remove();}
break;case'image':content=current.tpl.image.replace('{href}',current.href);current.aspectRatio=true;break;case'swf':content=current.tpl.swf.replace(/\{width\}/g,current.width).replace(/\{height\}/g,current.height).replace(/\{href\}/g,current.href);break;case'iframe':content=current.tpl.iframe.replace('{href}',current.href).replace('{scrolling}',current.scrolling).replace('{rnd}',new Date().getTime());break;}
if($.inArray(type,['image','swf','iframe'])>-1){current.autoSize=false;current.scrolling=false;}
F.inner.append(content);},_setDimension:function(){var current=F.current,viewport=F.getViewport(),margin=current.margin,padding2=current.padding*2,width=current.width+ padding2,height=current.height+ padding2,ratio=current.width/current.height,maxWidth=current.maxWidth,maxHeight=current.maxHeight,minWidth=current.minWidth,minHeight=current.minHeight,height_,space;viewport.w-=(margin[1]+ margin[3]);viewport.h-=(margin[0]+ margin[2]);if(width.toString().indexOf('%')>-1){width=((viewport.w*parseFloat(width))/100);}
if(height.toString().indexOf('%')>-1){height=((viewport.h*parseFloat(height))/100);}
if(current.fitToView){maxWidth=Math.min(viewport.w,maxWidth);maxHeight=Math.min(viewport.h,maxHeight);}
maxWidth=Math.max(minWidth,maxWidth);maxHeight=Math.max(minHeight,maxHeight);if(current.aspectRatio){if(width>maxWidth){width=maxWidth;height=((width- padding2)/ratio)+ padding2;}
if(height>maxHeight){height=maxHeight;width=((height- padding2)*ratio)+ padding2;}
if(width<minWidth){width=minWidth;height=((width- padding2)/ratio)+ padding2;}
if(height<minHeight){height=minHeight;width=((height- padding2)*ratio)+ padding2;}}else{width=Math.max(minWidth,Math.min(width,maxWidth));height=Math.max(minHeight,Math.min(height,maxHeight));}
width=Math.round(width);height=Math.round(height);$(F.wrap.add(F.outer).add(F.inner)).width('auto').height('auto');F.inner.width(width- padding2).height(height- padding2);F.wrap.width(width);height_=F.wrap.height();if(width>maxWidth||height_>maxHeight){while((width>maxWidth||height_>maxHeight)&&width>minWidth&&height_>minHeight){height=height- 10;if(current.aspectRatio){width=Math.round(((height- padding2)*ratio)+ padding2);if(width<minWidth){width=minWidth;height=((width- padding2)/ratio)+ padding2;}}else{width=width- 10;}
F.inner.width(width- padding2).height(height- padding2);F.wrap.width(width);height_=F.wrap.height();}}
current.dim={width:width,height:height_};current.canGrow=current.autoSize&&height>minHeight&&height<maxHeight;current.canShrink=false;current.canExpand=false;if((width- padding2)<current.width||(height- padding2)<current.height){current.canExpand=true;}else if((width>viewport.w||height_>viewport.h)&&width>minWidth&&height>minHeight){current.canShrink=true;}
space=height_- padding2;F.innerSpace=space- F.inner.height();F.outerSpace=space- F.outer.height();},_getPosition:function(a){var viewport=F.getViewport(),margin=F.current.margin,width=F.wrap.width()+ margin[1]+ margin[3],height=F.wrap.height()+ margin[0]+ margin[2],rez={position:'absolute',top:margin[0]+ viewport.y,left:margin[3]+ viewport.x};if(F.current.fixed&&(!a||a[0]===false)&&height<=viewport.h&&width<=viewport.w){rez={position:'fixed',top:margin[0],left:margin[3]};}
rez.top=Math.ceil(Math.max(rez.top,rez.top+((viewport.h- height)*F.current.topRatio)))+'px';rez.left=Math.ceil(Math.max(rez.left,rez.left+((viewport.w- width)*0.5)))+'px';return rez;},_afterZoomIn:function(){var current=F.current;F.isOpen=F.isOpened=true;F.wrap.addClass('fancybox-opened').css('overflow','visible');F.update();F.inner.css('overflow',current.scrolling==='auto'?'auto':(current.scrolling==='yes'?'scroll':'hidden'));if(current.closeClick||current.nextClick){F.inner.bind('click.fb',current.nextClick?F.next:F.close);}
if(current.closeBtn){$(F.current.tpl.closeBtn).appendTo(F.wrap).bind('click.fb',F.close);}
if(current.arrows&&F.group.length>1){if(current.loop||current.index>0){$(current.tpl.prev).appendTo(F.wrap).bind('click.fb',F.prev);}
if(current.loop||current.index<F.group.length- 1){$(current.tpl.next).appendTo(F.wrap).bind('click.fb',F.next);}}
F.trigger('afterShow');if(F.opts.autoPlay&&!F.player.isActive){F.opts.autoPlay=false;F.play();}},_afterZoomOut:function(){F.trigger('afterClose');F.wrap.trigger('onReset').remove();$.extend(F,{group:{},opts:{},current:null,isOpened:false,isOpen:false,wrap:null,outer:null,inner:null});}});F.transitions={getOrigPosition:function(){var element=F.current.element,pos={},width=50,height=50,image,viewport;if(element&&element.nodeName&&$(element).is(':visible')){image=$(element).find('img:first');if(image.length){pos=image.offset();width=image.outerWidth();height=image.outerHeight();}else{pos=$(element).offset();}}else{viewport=F.getViewport();pos.top=viewport.y+(viewport.h- height)*0.5;pos.left=viewport.x+(viewport.w- width)*0.5;}
pos={top:Math.ceil(pos.top)+'px',left:Math.ceil(pos.left)+'px',width:Math.ceil(width)+'px',height:Math.ceil(height)+'px'};return pos;},step:function(now,fx){var ratio,innerValue,outerValue;if(fx.prop==='width'||fx.prop==='height'){innerValue=outerValue=Math.ceil(now-(F.current.padding*2));if(fx.prop==='height'){ratio=(now- fx.start)/(fx.end- fx.start);if(fx.start>fx.end){ratio=1- ratio;}
innerValue-=F.innerSpace*ratio;outerValue-=F.outerSpace*ratio;}
F.inner[fx.prop](innerValue);F.outer[fx.prop](outerValue);}},zoomIn:function(){var current=F.current,startPos,endPos,dim=current.dim;if(current.openEffect==='elastic'){endPos=$.extend({},dim,F._getPosition(true));delete endPos.position;startPos=this.getOrigPosition();if(current.openOpacity){startPos.opacity=0;endPos.opacity=1;}
F.wrap.css(startPos).show().animate(endPos,{duration:current.openSpeed,easing:current.openEasing,step:this.step,complete:F._afterZoomIn});}else{F.wrap.css($.extend({},dim,F._getPosition()));if(current.openEffect==='fade'){F.wrap.fadeIn(current.openSpeed,F._afterZoomIn);}else{F.wrap.show();F._afterZoomIn();}}},zoomOut:function(){var current=F.current,endPos;if(current.closeEffect==='elastic'){if(F.wrap.css('position')==='fixed'){F.wrap.css(F._getPosition(true));}
endPos=this.getOrigPosition();if(current.closeOpacity){endPos.opacity=0;}
F.wrap.animate(endPos,{duration:current.closeSpeed,easing:current.closeEasing,step:this.step,complete:F._afterZoomOut});}else{F.wrap.fadeOut(current.closeEffect==='fade'?current.closeSpeed:0,F._afterZoomOut);}},changeIn:function(){var current=F.current,startPos;if(F.current.nextEffect==='elastic'){startPos=F._getPosition(true);startPos.opacity=0;startPos.top=(parseInt(startPos.top,10)- 200)+'px';F.wrap.css(startPos).show().animate({opacity:1,top:'+=200px'},{duration:current.nextSpeed,complete:F._afterZoomIn});}else{F.wrap.css(F._getPosition());if(current.nextEffect==='fade'){F.wrap.hide().fadeIn(current.nextSpeed,F._afterZoomIn);}else{F.wrap.show();F._afterZoomIn();}}},changeOut:function(){function cleanUp(){$(this).trigger('onReset').remove();}
F.wrap.removeClass('fancybox-opened');if(F.current.prevEffect==='elastic'){F.wrap.animate({'opacity':0,top:'+=200px'},{duration:F.current.prevSpeed,complete:cleanUp});}else{F.wrap.fadeOut(F.current.prevEffect==='fade'?F.current.prevSpeed:0,cleanUp);}}};F.helpers.overlay={overlay:null,update:function(){var width,scrollWidth,offsetWidth;this.overlay.width(0).height(0);if($.browser.msie){scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);width=scrollWidth<offsetWidth?W.width():scrollWidth;}else{width=D.width();}
this.overlay.width(width).height(D.height());},beforeShow:function(opts){if(this.overlay){return;}
this.overlay=$('<div id="fancybox-overlay"></div>').css(opts.css||{background:'black'}).appendTo('body');this.update();if(opts.closeClick){this.overlay.bind('click.fb',F.close);}
W.bind("resize.fb",$.proxy(this.update,this));this.overlay.fadeTo(opts.speedIn||"fast",opts.opacity||1);},onUpdate:function(){this.update();},afterClose:function(opts){if(this.overlay){this.overlay.fadeOut(opts.speedOut||"fast",function(){$(this).remove();});}
this.overlay=null;}};F.helpers.title={beforeShow:function(opts){var title,text=F.current.title;if(text){title=$('<div class="fancybox-title fancybox-title-'+ opts.type+'-wrap">'+ text+'</div>').appendTo('body');if(opts.type==='float'){title.width(title.width());title.wrapInner('<span class="child"></span>');F.current.margin[2]+=Math.abs(parseInt(title.css('margin-bottom'),10));}
title.appendTo(opts.type==='over'?F.inner:(opts.type==='outside'?F.wrap:F.outer));}}};$.fn.fancybox=function(options){var opts=options||{},selector=this.selector||'';function run(e){var group=[],relType=false,relVal=$(this).data('fancybox-group');e.preventDefault();if(typeof relVal!=='undefined'){relType=relVal?'data-fancybox-group':false;}else if(this.rel&&this.rel!==''&&this.rel!=='nofollow'){relVal=this.rel;relType='rel';}
if(relType){group=selector.length?$(selector).filter('['+ relType+'="'+ relVal+'"]'):$('['+ relType+'="'+ relVal+'"]');}
if(group.length){opts.index=group.index(this);F.open(group.get(),opts);}else{F.open(this,opts);}
return false;}
if(selector){D.undelegate(selector,'click.fb-start').delegate(selector,'click.fb-start',run);}else{$(this).unbind('click.fb-start').bind('click.fb-start',run);}
return this;};}(window,document,jQuery));var Mustache=function(){var regexCache={};var Renderer=function(){};Renderer.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(template,context,partials,in_recursion){if(!in_recursion){this.context=context;this.buffer=[];}
if(!this.includes("",template)){if(in_recursion){return template;}else{this.send(template);return;}}
template=this.render_pragmas(template);var html=this.render_section(template,context,partials);if(html===false){html=this.render_tags(template,context,partials,in_recursion);}
if(in_recursion){return html;}else{this.sendLines(html);}},send:function(line){if(line!==""){this.buffer.push(line);}},sendLines:function(text){if(text){var lines=text.split("\n");for(var i=0;i<lines.length;i++){this.send(lines[i]);}}},render_pragmas:function(template){if(!this.includes("%",template)){return template;}
var that=this;var regex=this.getCachedRegex("render_pragmas",function(otag,ctag){return new RegExp(otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+ ctag,"g");});return template.replace(regex,function(match,pragma,options){if(!that.pragmas_implemented[pragma]){throw({message:"This implementation of mustache doesn't understand the '"+
pragma+"' pragma"});}
that.pragmas[pragma]={};if(options){var opts=options.split("=");that.pragmas[pragma][opts[0]]=opts[1];}
return"";});},render_partial:function(name,context,partials){name=this.trim(name);if(!partials||partials[name]===undefined){throw({message:"unknown_partial '"+ name+"'"});}
if(typeof(context[name])!="object"){return this.render(partials[name],context,partials,true);}
return this.render(partials[name],context[name],partials,true);},render_section:function(template,context,partials){if(!this.includes("#",template)&&!this.includes("^",template)){return false;}
var that=this;var regex=this.getCachedRegex("render_section",function(otag,ctag){return new RegExp("^([\\s\\S]*?)"+
otag+"(\\^|\\#)\\s*(.+)\\s*"+
ctag+"\n*([\\s\\S]*?)"+
otag+"\\/\\s*\\3\\s*"+
ctag+"\\s*([\\s\\S]*)$","g");});return template.replace(regex,function(match,before,type,name,content,after){var renderedBefore=before?that.render_tags(before,context,partials,true):"",renderedAfter=after?that.render(after,context,partials,true):"",renderedContent,value=that.find(name,context);if(type==="^"){if(!value||that.is_array(value)&&value.length===0){renderedContent=that.render(content,context,partials,true);}else{renderedContent="";}}else if(type==="#"){if(that.is_array(value)){renderedContent=that.map(value,function(row){return that.render(content,that.create_context(row),partials,true);}).join("");}else if(that.is_object(value)){renderedContent=that.render(content,that.create_context(value),partials,true);}else if(typeof value==="function"){renderedContent=value.call(context,content,function(text){return that.render(text,context,partials,true);});}else if(value){renderedContent=that.render(content,context,partials,true);}else{renderedContent="";}}
return renderedBefore+ renderedContent+ renderedAfter;});},render_tags:function(template,context,partials,in_recursion){var that=this;var new_regex=function(){return that.getCachedRegex("render_tags",function(otag,ctag){return new RegExp(otag+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+ ctag+"+","g");});};var regex=new_regex();var tag_replace_callback=function(match,operator,name){switch(operator){case"!":return"";case"=":that.set_delimiters(name);regex=new_regex();return"";case">":return that.render_partial(name,context,partials);case"{":return that.find(name,context);default:return that.escape(that.find(name,context));}};var lines=template.split("\n");for(var i=0;i<lines.length;i++){lines[i]=lines[i].replace(regex,tag_replace_callback,this);if(!in_recursion){this.send(lines[i]);}}
if(in_recursion){return lines.join("\n");}},set_delimiters:function(delimiters){var dels=delimiters.split(" ");this.otag=this.escape_regex(dels[0]);this.ctag=this.escape_regex(dels[1]);},escape_regex:function(text){if(!arguments.callee.sRE){var specials=['/','.','*','+','?','|','(',')','[',']','{','}','\\'];arguments.callee.sRE=new RegExp('(\\'+ specials.join('|\\')+')','g');}
return text.replace(arguments.callee.sRE,'\\$1');},find:function(name,context){name=this.trim(name);function is_kinda_truthy(bool){return bool===false||bool===0||bool;}
var value;if(name.match(/([a-z_]+)\./ig)){var childValue=this.walk_context(name,context);if(is_kinda_truthy(childValue)){value=childValue;}}
else{if(is_kinda_truthy(context[name])){value=context[name];}else if(is_kinda_truthy(this.context[name])){value=this.context[name];}}
if(typeof value==="function"){return value.apply(context);}
if(value!==undefined){return value;}
return"";},walk_context:function(name,context){var path=name.split('.');var value_context=(context[path[0]]!=undefined)?context:this.context;var value=value_context[path.shift()];while(value!=undefined&&path.length>0){value_context=value;value=value[path.shift()];}
if(typeof value==="function"){return value.apply(value_context);}
return value;},includes:function(needle,haystack){return haystack.indexOf(this.otag+ needle)!=-1;},escape:function(s){s=String(s===null?"":s);return s.replace(/&(?!\w+;)|["'<>\\]/g,function(s){switch(s){case"&":return"&amp;";case'"':return'&quot;';case"'":return'&#39;';case"<":return"&lt;";case">":return"&gt;";default:return s;}});},create_context:function(_context){if(this.is_object(_context)){return _context;}else{var iterator=".";if(this.pragmas["IMPLICIT-ITERATOR"]){iterator=this.pragmas["IMPLICIT-ITERATOR"].iterator;}
var ctx={};ctx[iterator]=_context;return ctx;}},is_object:function(a){return a&&typeof a=="object";},is_array:function(a){return Object.prototype.toString.call(a)==='[object Array]';},trim:function(s){return s.replace(/^\s*|\s*$/g,"");},map:function(array,fn){if(typeof array.map=="function"){return array.map(fn);}else{var r=[];var l=array.length;for(var i=0;i<l;i++){r.push(fn(array[i]));}
return r;}},getCachedRegex:function(name,generator){var byOtag=regexCache[this.otag];if(!byOtag){byOtag=regexCache[this.otag]={};}
var byCtag=byOtag[this.ctag];if(!byCtag){byCtag=byOtag[this.ctag]={};}
var regex=byCtag[name];if(!regex){regex=byCtag[name]=generator(this.otag,this.ctag);}
return regex;}};return({name:"mustache.js",version:"0.4.0-dev",to_html:function(template,view,partials,send_fun){var renderer=new Renderer();if(send_fun){renderer.send=send_fun;}
renderer.render(template,view||{},partials);if(!send_fun){return renderer.buffer.join("\n");}}});}();!function($){"use strict"
var transitionEnd
$(document).ready(function(){$.support.transition=(function(){var thisBody=document.body||document.documentElement,thisStyle=thisBody.style,support=thisStyle.transition!==undefined||thisStyle.WebkitTransition!==undefined||thisStyle.MozTransition!==undefined||thisStyle.MsTransition!==undefined||thisStyle.OTransition!==undefined
return support})()
if($.support.transition){transitionEnd="TransitionEnd"
if($.browser.webkit){transitionEnd="webkitTransitionEnd"}else if($.browser.mozilla){transitionEnd="transitionend"}else if($.browser.opera){transitionEnd="oTransitionEnd"}}})
var Twipsy=function(element,options){this.$element=$(element)
this.options=options
this.enabled=true
this.fixTitle()}
Twipsy.prototype={show:function(){var pos,actualWidth,actualHeight,placement,$tip,tp
if(this.hasContent()&&this.enabled){$tip=this.tip()
this.setContent()
if(this.options.animate){$tip.addClass('fade')}
$tip.remove().css({top:0,left:0,display:'block'}).prependTo(document.body)
pos=$.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})
actualWidth=$tip[0].offsetWidth
actualHeight=$tip[0].offsetHeight
placement=maybeCall(this.options.placement,this,[$tip[0],this.$element[0]])
switch(placement){case'below':tp={top:pos.top+ pos.height+ this.options.offset,left:pos.left+ pos.width/2- actualWidth/2}
break
case'above':tp={top:pos.top- actualHeight- this.options.offset,left:pos.left+ pos.width/2- actualWidth/2}
break
case'left':tp={top:pos.top+ pos.height/2- actualHeight/2,left:pos.left- actualWidth- this.options.offset}
break
case'right':tp={top:pos.top+ pos.height/2- actualHeight/2,left:pos.left+ pos.width+ this.options.offset}
break}
$tip.css(tp).addClass(placement).addClass('in')}},setContent:function(){var $tip=this.tip()
$tip.find('.twipsy-inner')[this.options.html?'html':'text'](this.getTitle())
$tip[0].className='twipsy'},hide:function(){var that=this,$tip=this.tip()
$tip.removeClass('in')
function removeElement(){$tip.remove()}
$.support.transition&&this.$tip.hasClass('fade')?$tip.bind(transitionEnd,removeElement):removeElement()},fixTitle:function(){var $e=this.$element
if($e.attr('title')||typeof($e.attr('data-original-title'))!='string'){$e.attr('data-original-title',$e.attr('title')||'').removeAttr('title')}},hasContent:function(){return this.getTitle()},getTitle:function(){var title,$e=this.$element,o=this.options
this.fixTitle()
if(typeof o.title=='string'){title=$e.attr(o.title=='title'?'data-original-title':o.title)}else if(typeof o.title=='function'){title=o.title.call($e[0])}
title=(''+ title).replace(/(^\s*|\s*$)/,"")
return title||o.fallback},tip:function(){return this.$tip=this.$tip||$('<div class="twipsy" />').html(this.options.template)},validate:function(){if(!this.$element[0].parentNode){this.hide()
this.$element=null
this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass('in')?'hide':'show']()}}
function maybeCall(thing,ctx,args){return typeof thing=='function'?thing.apply(ctx,args):thing}
$.fn.twipsy=function(options){$.fn.twipsy.initWith.call(this,options,Twipsy,'twipsy')
return this}
$.fn.twipsy.initWith=function(options,Constructor,name){var twipsy,binder,eventIn,eventOut
if(options===true){return this.data(name)}else if(typeof options=='string'){twipsy=this.data(name)
if(twipsy){twipsy[options]()}
return this}
options=$.extend({},$.fn[name].defaults,options)
function get(ele){var twipsy=$.data(ele,name)
if(!twipsy){twipsy=new Constructor(ele,$.fn.twipsy.elementOptions(ele,options))
$.data(ele,name,twipsy)}
return twipsy}
function enter(){var twipsy=get(this)
twipsy.hoverState='in'
if(options.delayIn==0){twipsy.show()}else{twipsy.fixTitle()
setTimeout(function(){if(twipsy.hoverState=='in'){twipsy.show()}},options.delayIn)}}
function leave(){var twipsy=get(this)
twipsy.hoverState='out'
if(options.delayOut==0){twipsy.hide()}else{setTimeout(function(){if(twipsy.hoverState=='out'){twipsy.hide()}},options.delayOut)}}
if(!options.live){this.each(function(){get(this)})}
if(options.trigger!='manual'){binder=options.live?'live':'bind'
eventIn=options.trigger=='hover'?'mouseenter':'focus'
eventOut=options.trigger=='hover'?'mouseleave':'blur'
this[binder](eventIn,enter)[binder](eventOut,leave)}
return this}
$.fn.twipsy.Twipsy=Twipsy
$.fn.twipsy.defaults={animate:true,delayIn:0,delayOut:0,fallback:'',placement:'above',html:false,live:false,offset:0,title:'title',trigger:'hover',template:'<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'}
$.fn.twipsy.rejectAttrOptions=['title']
$.fn.twipsy.elementOptions=function(ele,options){var data=$(ele).data(),rejects=$.fn.twipsy.rejectAttrOptions,i=rejects.length
while(i--){delete data[rejects[i]]}
return $.extend({},options,data)}}(window.jQuery||window.ender);
