(function(){var U=this,Q=U._,X={},aa=Array.prototype,W=Object.prototype,ac=aa.slice,O=aa.unshift,L=W.toString,Y=W.hasOwnProperty,N=aa.forEach,M=aa.map,K=aa.reduce,G=aa.reduceRight,k=aa.filter,e=aa.every,c=aa.some,V=aa.indexOf,a=aa.lastIndexOf;W=Array.isArray;var J=Object.keys,S=Function.prototype.bind,ad=function(b){return new Z(b)};typeof module!=="undefined"&&module.exports?(module.exports=ad,ad._=ad):U._=ad;ad.VERSION="1.1.6";var ab=ad.each=ad.forEach=function(b,j,i){if(b!=null){if(N&&b.forEach===N){b.forEach(j,i)}else{if(ad.isNumber(b.length)){for(var h=0,f=b.length;h<f;h++){if(j.call(i,b[h],h,b)===X){break}}}else{for(h in b){if(Y.call(b,h)&&j.call(i,b[h],h,b)===X){break}}}}}};ad.map=function(h,j,f){var i=[];if(h==null){return i}if(M&&h.map===M){return h.map(j,f)}ab(h,function(b,m,l){i[i.length]=j.call(f,b,m,l)});return i};ad.reduce=ad.foldl=ad.inject=function(b,j,i,h){var f=i!==void 0;b==null&&(b=[]);if(K&&b.reduce===K){return h&&(j=ad.bind(j,h)),f?b.reduce(j,i):b.reduce(j)}ab(b,function(m,l,n){!f&&l===0?(i=m,f=!0):i=j.call(h,i,m,l,n)});if(!f){throw new TypeError("Reduce of empty array with no initial value")}return i};ad.reduceRight=ad.foldr=function(b,i,h,f){b==null&&(b=[]);if(G&&b.reduceRight===G){return f&&(i=ad.bind(i,f)),h!==void 0?b.reduceRight(i,h):b.reduceRight(i)}b=(ad.isArray(b)?b.slice():ad.toArray(b)).reverse();return ad.reduce(b,i,h,f)};ad.find=ad.detect=function(h,j,f){var i;T(h,function(b,l,m){if(j.call(f,b,l,m)){return i=b,!0}});return i};ad.filter=ad.select=function(h,j,f){var i=[];if(h==null){return i}if(k&&h.filter===k){return h.filter(j,f)}ab(h,function(b,l,m){j.call(f,b,l,m)&&(i[i.length]=b)});return i};ad.reject=function(h,j,f){var i=[];if(h==null){return i}ab(h,function(b,l,m){j.call(f,b,l,m)||(i[i.length]=b)});return i};ad.every=ad.all=function(h,j,f){var i=!0;if(h==null){return i}if(e&&h.every===e){return h.every(j,f)}ab(h,function(b,l,m){if(!(i=i&&j.call(f,b,l,m))){return X}});return i};var T=ad.some=ad.any=function(b,i,h){i||(i=ad.identity);var f=!1;if(b==null){return f}if(c&&b.some===c){return b.some(i,h)}ab(b,function(l,j,m){if(f=i.call(h,l,j,m)){return X}});return f};ad.include=ad.contains=function(h,i){var f=!1;if(h==null){return f}if(V&&h.indexOf===V){return h.indexOf(i)!=-1}T(h,function(b){if(f=b===i){return !0}});return f};ad.invoke=function(b,h){var f=ac.call(arguments,2);return ad.map(b,function(i){return(h.call?h||i:i[h]).apply(i,f)})};ad.pluck=function(b,f){return ad.map(b,function(h){return h[f]})};ad.max=function(b,i,h){if(!i&&ad.isArray(b)){return Math.max.apply(Math,b)}var f={computed:-Infinity};ab(b,function(l,j,m){j=i?i.call(h,l,j,m):l;j>=f.computed&&(f={value:l,computed:j})});return f.value};ad.min=function(b,i,h){if(!i&&ad.isArray(b)){return Math.min.apply(Math,b)}var f={computed:Infinity};ab(b,function(l,j,m){j=i?i.call(h,l,j,m):l;j<f.computed&&(f={value:l,computed:j})});return f.value};ad.sortBy=function(b,h,f){return ad.pluck(ad.map(b,function(j,i,l){return{value:j,criteria:h.call(f,j,i,l)}}).sort(function(j,i){var m=j.criteria,l=i.criteria;return m<l?-1:m>l?1:0}),"value")};ad.sortedIndex=function(b,m,l){l||(l=ad.identity);for(var j=0,i=b.length;j<i;){var h=j+i>>1;l(b[h])<l(m)?j=h+1:i=h}return j};ad.toArray=function(b){if(!b){return[]}if(b.toArray){return b.toArray()}if(ad.isArray(b)){return b}if(ad.isArguments(b)){return ac.call(b)}return ad.values(b)};ad.size=function(b){return ad.toArray(b).length};ad.first=ad.head=function(h,f,i){return f!=null&&!i?ac.call(h,0,f):h[0]};ad.rest=ad.tail=function(h,f,i){return ac.call(h,f==null||i?1:f)};ad.last=function(b){return b[b.length-1]};ad.compact=function(b){return ad.filter(b,function(f){return !!f})};ad.flatten=function(b){return ad.reduce(b,function(f,h){if(ad.isArray(h)){return f.concat(ad.flatten(h))}f[f.length]=h;return f},[])};ad.without=function(b){var f=ac.call(arguments,1);return ad.filter(b,function(h){return !ad.include(f,h)})};ad.uniq=ad.unique=function(b,f){return ad.reduce(b,function(h,j,i){if(0==i||(f===!0?ad.last(h)!=j:!ad.include(h,j))){h[h.length]=j}return h},[])};ad.intersect=function(b){var f=ac.call(arguments,1);return ad.filter(ad.uniq(b),function(h){return ad.every(f,function(i){return ad.indexOf(i,h)>=0})})};ad.zip=function(){for(var b=ac.call(arguments),i=ad.max(ad.pluck(b,"length")),h=Array(i),f=0;f<i;f++){h[f]=ad.pluck(b,""+f)}return h};ad.indexOf=function(b,i,h){if(b==null){return -1}var f;if(h){return h=ad.sortedIndex(b,i),b[h]===i?h:-1}if(V&&b.indexOf===V){return b.indexOf(i)}h=0;for(f=b.length;h<f;h++){if(b[h]===i){return h}}return -1};ad.lastIndexOf=function(h,f){if(h==null){return -1}if(a&&h.lastIndexOf===a){return h.lastIndexOf(f)}for(var i=h.length;i--;){if(h[i]===f){return i}}return -1};ad.range=function(i,h,n){arguments.length<=1&&(h=i||0,i=0);n=arguments[2]||1;for(var m=Math.max(Math.ceil((h-i)/n),0),l=0,j=Array(m);l<m;){j[l++]=i,i+=n}return j};ad.bind=function(h,f){if(h.bind===S&&S){return S.apply(h,ac.call(arguments,1))}var i=ac.call(arguments,2);return function(){return h.apply(f,i.concat(ac.call(arguments)))}};ad.bindAll=function(b){var f=ac.call(arguments,1);f.length==0&&(f=ad.functions(b));ab(f,function(h){b[h]=ad.bind(b[h],b)});return b};ad.memoize=function(b,h){var f={};h||(h=ad.identity);return function(){var i=h.apply(this,arguments);return Y.call(f,i)?f[i]:f[i]=b.apply(this,arguments)}};ad.delay=function(h,f){var i=ac.call(arguments,2);return setTimeout(function(){return h.apply(h,i)},f)};ad.defer=function(b){return ad.delay.apply(ad,[b,1].concat(ac.call(arguments,1)))};var R=function(h,f,j){var i;return function(){var m=this,l=arguments,b=function(){i=null;h.apply(m,l)};j&&clearTimeout(i);if(j||!i){i=setTimeout(b,f)}}};ad.throttle=function(h,f){return R(h,f,!1)};ad.debounce=function(h,f){return R(h,f,!0)};ad.once=function(h){var f=!1,i;return function(){if(f){return i}f=!0;return i=h.apply(this,arguments)}};ad.wrap=function(h,f){return function(){var b=[h].concat(ac.call(arguments));return f.apply(this,b)}};ad.compose=function(){var b=ac.call(arguments);return function(){for(var f=ac.call(arguments),h=b.length-1;h>=0;h--){f=[b[h].apply(this,f)]}return f[0]}};ad.after=function(h,f){return function(){if(--h<1){return f.apply(this,arguments)}}};ad.keys=J||function(h){if(h!==Object(h)){throw new TypeError("Invalid object")}var f=[],i;for(i in h){Y.call(h,i)&&(f[f.length]=i)}return f};ad.values=function(b){return ad.map(b,ad.identity)};ad.functions=ad.methods=function(b){return ad.filter(ad.keys(b),function(f){return ad.isFunction(b[f])}).sort()};ad.extend=function(b){ab(ac.call(arguments,1),function(f){for(var h in f){f[h]!==void 0&&(b[h]=f[h])}});return b};ad.defaults=function(b){ab(ac.call(arguments,1),function(f){for(var h in f){b[h]==null&&(b[h]=f[h])}});return b};ad.clone=function(b){return ad.isArray(b)?b.slice():ad.extend({},b)};ad.tap=function(h,f){f(h);return h};ad.isEqual=function(b,l){if(b===l){return !0}var j=typeof b;if(j!=typeof l){return !1}if(b==l){return !0}if(!b&&l||b&&!l){return !1}if(b._chain){b=b._wrapped}if(l._chain){l=l._wrapped}if(b.isEqual){return b.isEqual(l)}if(ad.isDate(b)&&ad.isDate(l)){return b.getTime()===l.getTime()}if(ad.isNaN(b)&&ad.isNaN(l)){return !1}if(ad.isRegExp(b)&&ad.isRegExp(l)){return b.source===l.source&&b.global===l.global&&b.ignoreCase===l.ignoreCase&&b.multiline===l.multiline}if(j!=="object"){return !1}if(b.length&&b.length!==l.length){return !1}j=ad.keys(b);var i=ad.keys(l);if(j.length!=i.length){return !1}for(var h in b){if(!(h in l)||!ad.isEqual(b[h],l[h])){return !1}}return !0};ad.isEmpty=function(b){if(ad.isArray(b)||ad.isString(b)){return b.length===0}for(var f in b){if(Y.call(b,f)){return !1}}return !0};ad.isElement=function(b){return !!(b&&b.nodeType==1)};ad.isArray=W||function(b){return L.call(b)==="[object Array]"};ad.isArguments=function(b){return !(!b||!Y.call(b,"callee"))};ad.isFunction=function(b){return !(!b||!b.constructor||!b.call||!b.apply)};ad.isString=function(b){return !!(b===""||b&&b.charCodeAt&&b.substr)};ad.isNumber=function(b){return !!(b===0||b&&b.toExponential&&b.toFixed)};ad.isNaN=function(b){return b!==b};ad.isBoolean=function(b){return b===!0||b===!1};ad.isDate=function(b){return !(!b||!b.getTimezoneOffset||!b.setUTCFullYear)};ad.isRegExp=function(b){return !(!b||!b.test||!b.exec||!(b.ignoreCase||b.ignoreCase===!1))};ad.isNull=function(b){return b===null};ad.isUndefined=function(b){return b===void 0};ad.noConflict=function(){U._=Q;return this};ad.identity=function(b){return b};ad.times=function(h,f,j){for(var i=0;i<h;i++){f.call(j,i)}};ad.mixin=function(b){ab(ad.functions(b),function(f){g(f,ad[f]=b[f])})};var d=0;ad.uniqueId=function(h){var f=d++;return h?h+f:f};ad.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};ad.template=function(b,h){var f=ad.templateSettings;f="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+b.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(f.interpolate,function(j,i){return"',"+i.replace(/\\'/g,"'")+",'"}).replace(f.evaluate||null,function(j,i){return"');"+i.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";f=new Function("obj",f);return h?f(h):f};var Z=function(b){this._wrapped=b};ad.prototype=Z.prototype;var P=function(b,f){return f?ad(b).chain():b},g=function(b,f){Z.prototype[b]=function(){var h=ac.call(arguments);O.call(h,this._wrapped);return P(f.apply(ad,h),this._chain)}};ad.mixin(ad);ab(["pop","push","reverse","shift","sort","splice","unshift"],function(h){var f=aa[h];Z.prototype[h]=function(){f.apply(this._wrapped,arguments);return P(this._wrapped,this._chain)}});ab(["concat","join","slice"],function(h){var f=aa[h];Z.prototype[h]=function(){return P(f.apply(this._wrapped,arguments),this._chain)}});Z.prototype.chain=function(){this._chain=!0;return this};Z.prototype.value=function(){return this._wrapped}})();(function(){var K=this,C=K.Backbone,N;N=typeof exports!=="undefined"?exports:K.Backbone={};N.VERSION="0.5.3";var M=K._;if(!M&&typeof require!=="undefined"){M=require("underscore")._}var L=K.jQuery||K.Zepto;N.noConflict=function(){K.Backbone=C;return this};N.emulateHTTP=!1;N.emulateJSON=!1;N.Events={bind:function(f,e,h){var g=this._callbacks||(this._callbacks={});(g[f]||(g[f]=[])).push([e,h]);return this},unbind:function(g,f){var j;if(g){if(j=this._callbacks){if(f){j=j[g];if(!j){return this}for(var i=0,h=j.length;i<h;i++){if(j[i]&&f===j[i][0]){j[i]=null;break}}}else{j[g]=[]}}}else{this._callbacks={}}return this},trigger:function(j){var i,p,o,n,m=2;if(!(p=this._callbacks)){return this}for(;m--;){if(i=m?j:"all",i=p[i]){for(var l=0,k=i.length;l<k;l++){(o=i[l])?(n=m?Array.prototype.slice.call(arguments,1):arguments,o[0].apply(o[1]||this,n)):(i.splice(l,1),l--,k--)}}}return this}};N.Model=function(f,e){var g;f||(f={});if(g=this.defaults){M.isFunction(g)&&(g=g.call(this)),f=M.extend({},g,f)}this.attributes={};this._escapedAttributes={};this.cid=M.uniqueId("c");this.set(f,{silent:!0});this._changed=!1;this._previousAttributes=M.clone(this.attributes);if(e&&e.collection){this.collection=e.collection}this.initialize(f,e)};M.extend(N.Model.prototype,N.Events,{_previousAttributes:null,_changed:!1,idAttribute:"id",initialize:function(){},toJSON:function(){return M.clone(this.attributes)},get:function(e){return this.attributes[e]},escape:function(f){var e;if(e=this._escapedAttributes[f]){return e}e=this.attributes[f];return this._escapedAttributes[f]=(e==null?"":""+e).replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")},has:function(e){return this.attributes[e]!=null},set:function(i,f){f||(f={});if(!i){return this}if(i.attributes){i=i.attributes}var n=this.attributes,m=this._escapedAttributes;if(!f.silent&&this.validate&&!this._performValidation(i,f)){return !1}if(this.idAttribute in i){this.id=i[this.idAttribute]}var l=this._changing;this._changing=!0;for(var k in i){var j=i[k];if(!M.isEqual(n[k],j)){n[k]=j,delete m[k],this._changed=!0,f.silent||this.trigger("change:"+k,this,j,f)}}!l&&!f.silent&&this._changed&&this.change(f);this._changing=!1;return this},unset:function(f,e){if(!(f in this.attributes)){return this}e||(e={});var g={};g[f]=void 0;if(!e.silent&&this.validate&&!this._performValidation(g,e)){return !1}delete this.attributes[f];delete this._escapedAttributes[f];f==this.idAttribute&&delete this.id;this._changed=!0;e.silent||(this.trigger("change:"+f,this,void 0,e),this.change(e));return this},clear:function(f){f||(f={});var e,h=this.attributes,g={};for(e in h){g[e]=void 0}if(!f.silent&&this.validate&&!this._performValidation(g,f)){return !1}this.attributes={};this._escapedAttributes={};this._changed=!0;if(!f.silent){for(e in h){this.trigger("change:"+e,this,void 0,f)}this.change(f)}return this},fetch:function(f){f||(f={});var e=this,g=f.success;f.success=function(j,i,h){if(!e.set(e.parse(j,h),f)){return !1}g&&g(e,j)};f.error=J(f.error,e,f);return(this.sync||N.sync).call(this,"read",this,f)},save:function(g,e){e||(e={});if(g&&!this.set(g,e)){return !1}var j=this,i=e.success;e.success=function(k,m,l){if(!j.set(j.parse(k,l),e)){return !1}i&&i(j,k,l)};e.error=J(e.error,j,e);var h=this.isNew()?"create":"update";return(this.sync||N.sync).call(this,h,this,e)},destroy:function(f){f||(f={});if(this.isNew()){return this.trigger("destroy",this,this.collection,f)}var e=this,g=f.success;f.success=function(h){e.trigger("destroy",e,e.collection,f);g&&g(e,h)};f.error=J(f.error,e,f);return(this.sync||N.sync).call(this,"delete",this,f)},url:function(){var e=H(this.collection)||this.urlRoot||G();if(this.isNew()){return e}return e+(e.charAt(e.length-1)=="/"?"":"/")+encodeURIComponent(this.id)},parse:function(e){return e},clone:function(){return new this.constructor(this)},isNew:function(){return this.id==null},change:function(e){this.trigger("change",this,e);this._previousAttributes=M.clone(this.attributes);this._changed=!1},hasChanged:function(e){if(e){return this._previousAttributes[e]!=this.attributes[e]}return this._changed},changedAttributes:function(f){f||(f=this.attributes);var e=this._previousAttributes,h=!1,g;for(g in f){M.isEqual(e[g],f[g])||(h=h||{},h[g]=f[g])}return h},previous:function(e){if(!e||!this._previousAttributes){return null}return this._previousAttributes[e]},previousAttributes:function(){return M.clone(this._previousAttributes)},_performValidation:function(f,e){var g=this.validate(f);if(g){return e.error?e.error(this,g,e):this.trigger("error",this,g,e),!1}return !0}});N.Collection=function(f,e){e||(e={});if(e.comparator){this.comparator=e.comparator}M.bindAll(this,"_onModelEvent","_removeReference");this._reset();f&&this.reset(f,{silent:!0});this.initialize.apply(this,arguments)};M.extend(N.Collection.prototype,N.Events,{model:N.Model,initialize:function(){},toJSON:function(){return this.map(function(e){return e.toJSON()})},add:function(f,e){if(M.isArray(f)){for(var h=0,g=f.length;h<g;h++){this._add(f[h],e)}}else{this._add(f,e)}return this},remove:function(f,e){if(M.isArray(f)){for(var h=0,g=f.length;h<g;h++){this._remove(f[h],e)}}else{this._remove(f,e)}return this},get:function(e){if(e==null){return null}return this._byId[e.id!=null?e.id:e]},getByCid:function(e){return e&&this._byCid[e.cid||e]},at:function(e){return this.models[e]},sort:function(e){e||(e={});if(!this.comparator){throw Error("Cannot sort a set without a comparator")}this.models=this.sortBy(this.comparator);e.silent||this.trigger("reset",this,e);return this},pluck:function(e){return M.map(this.models,function(f){return f.get(e)})},reset:function(f,e){f||(f=[]);e||(e={});this.each(this._removeReference);this._reset();this.add(f,{silent:!0});e.silent||this.trigger("reset",this,e);return this},fetch:function(f){f||(f={});var e=this,g=f.success;f.success=function(j,h,i){e[f.add?"add":"reset"](e.parse(j,i),f);g&&g(e,j)};f.error=J(f.error,e,f);return(this.sync||N.sync).call(this,"read",this,f)},create:function(f,e){var h=this;e||(e={});f=this._prepareModel(f,e);if(!f){return !1}var g=e.success;e.success=function(i,k,j){h.add(i,e);g&&g(i,k,j)};f.save(null,e);return f},parse:function(e){return e},chain:function(){return M(this.models).chain()},_reset:function(){this.length=0;this.models=[];this._byId={};this._byCid={}},_prepareModel:function(f,e){if(f instanceof N.Model){if(!f.collection){f.collection=this}}else{var g=f;f=new this.model(g,{collection:this});f.validate&&!f._performValidation(g,e)&&(f=!1)}return f},_add:function(f,e){e||(e={});f=this._prepareModel(f,e);if(!f){return !1}var g=this.getByCid(f);if(g){throw Error(["Can't add the same model to a set twice",g.id])}this._byId[f.id]=f;this._byCid[f.cid]=f;this.models.splice(e.at!=null?e.at:this.comparator?this.sortedIndex(f,this.comparator):this.length,0,f);f.bind("all",this._onModelEvent);this.length++;e.silent||f.trigger("add",f,this,e);return f},_remove:function(f,e){e||(e={});f=this.getByCid(f)||this.get(f);if(!f){return null}delete this._byId[f.id];delete this._byCid[f.cid];this.models.splice(this.indexOf(f),1);this.length--;e.silent||f.trigger("remove",f,this,e);this._removeReference(f);return f},_removeReference:function(e){this==e.collection&&delete e.collection;e.unbind("all",this._onModelEvent)},_onModelEvent:function(f,e,h,g){(f=="add"||f=="remove")&&h!=this||(f=="destroy"&&this._remove(e,g),e&&f==="change:"+e.idAttribute&&(delete this._byId[e.previous(e.idAttribute)],this._byId[e.id]=e),this.trigger.apply(this,arguments))}});M.each(["forEach","each","map","reduce","reduceRight","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","sortBy","sortedIndex","toArray","size","first","rest","last","without","indexOf","lastIndexOf","isEmpty","groupBy"],function(e){N.Collection.prototype[e]=function(){return M[e].apply(M,[this.models].concat(M.toArray(arguments)))}});N.Router=function(e){e||(e={});if(e.routes){this.routes=e.routes}this._bindRoutes();this.initialize.apply(this,arguments)};var B=/:([\w\d]+)/g,A=/\*([\w\d]+)/g,z=/[-[\]{}()+?.,\\^$|#\s]/g;M.extend(N.Router.prototype,N.Events,{initialize:function(){},route:function(f,e,g){N.history||(N.history=new N.History);M.isRegExp(f)||(f=this._routeToRegExp(f));N.history.route(f,M.bind(function(h){h=this._extractParameters(f,h);g.apply(this,h);this.trigger.apply(this,["route:"+e].concat(h))},this))},navigate:function(f,e){N.history.navigate(f,e)},_bindRoutes:function(){if(this.routes){var f=[],e;for(e in this.routes){f.unshift([e,this.routes[e]])}e=0;for(var g=f.length;e<g;e++){this.route(f[e][0],f[e][1],this[f[e][1]])}}},_routeToRegExp:function(e){e=e.replace(z,"\\$&").replace(B,"([^/]*)").replace(A,"(.*?)");return RegExp("^"+e+"$")},_extractParameters:function(f,e){return f.exec(e).slice(1)}});N.History=function(){this.handlers=[];M.bindAll(this,"checkUrl")};var I=/^#*/,d=/msie [\w.]+/,F=!1;M.extend(N.History.prototype,{interval:50,getFragment:function(f,e){if(f==null){if(this._hasPushState||e){f=window.location.pathname;var g=window.location.search;g&&(f+=g);f.indexOf(this.options.root)==0&&(f=f.substr(this.options.root.length))}else{f=window.location.hash}}return decodeURIComponent(f.replace(I,""))},start:function(f){if(F){throw Error("Backbone.history has already been started")}this.options=M.extend({},{root:"/"},this.options,f);this._wantsPushState=!!this.options.pushState;this._hasPushState=!(!this.options.pushState||!window.history||!window.history.pushState);f=this.getFragment();var e=document.documentMode;if(e=d.exec(navigator.userAgent.toLowerCase())&&(!e||e<=7)){this.iframe=L('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(f)}this._hasPushState?L(window).bind("popstate",this.checkUrl):"onhashchange" in window&&!e?L(window).bind("hashchange",this.checkUrl):setInterval(this.checkUrl,this.interval);this.fragment=f;F=!0;f=window.location;e=f.pathname==this.options.root;if(this._wantsPushState&&!this._hasPushState&&!e){return this.fragment=this.getFragment(null,!0),window.location.replace(this.options.root+"#"+this.fragment),!0}else{if(this._wantsPushState&&this._hasPushState&&e&&f.hash){this.fragment=f.hash.replace(I,""),window.history.replaceState({},document.title,f.protocol+"//"+f.host+this.options.root+this.fragment)}}if(!this.options.silent){return this.loadUrl()}},route:function(f,e){this.handlers.unshift({route:f,callback:e})},checkUrl:function(){var e=this.getFragment();e==this.fragment&&this.iframe&&(e=this.getFragment(this.iframe.location.hash));if(e==this.fragment||e==decodeURIComponent(this.fragment)){return !1}this.iframe&&this.navigate(e);this.loadUrl()||this.loadUrl(window.location.hash)},loadUrl:function(f){var e=this.fragment=this.getFragment(f);return M.any(this.handlers,function(g){if(g.route.test(e)){return g.callback(e),!0}})},navigate:function(f,e){var h=(f||"").replace(I,"");if(!(this.fragment==h||this.fragment==decodeURIComponent(h))){if(this._hasPushState){var g=window.location;h.indexOf(this.options.root)!=0&&(h=this.options.root+h);this.fragment=h;window.history.pushState({},document.title,g.protocol+"//"+g.host+h)}else{if(window.location.hash=this.fragment=h,this.iframe&&h!=this.getFragment(this.iframe.location.hash)){this.iframe.document.open().close(),this.iframe.location.hash=h}}e&&this.loadUrl(f)}}});N.View=function(e){this.cid=M.uniqueId("view");this._configure(e||{});this._ensureElement();this.delegateEvents();this.initialize.apply(this,arguments)};var c=/^(\S+)\s*(.*)$/,E=["model","collection","el","id","attributes","className","tagName"];M.extend(N.View.prototype,N.Events,{tagName:"div",$:function(e){return L(e,this.el)},initialize:function(){},render:function(){return this},remove:function(){L(this.el).remove();return this},make:function(f,e,g){f=document.createElement(f);e&&L(f).attr(e);g&&L(f).html(g);return f},delegateEvents:function(g){if(g||(g=this.events)){for(var f in M.isFunction(g)&&(g=g.call(this)),L(this.el).unbind(".delegateEvents"+this.cid),g){var j=this[g[f]];if(!j){throw Error('Event "'+g[f]+'" does not exist')}var i=f.match(c),h=i[1];i=i[2];j=M.bind(j,this);h+=".delegateEvents"+this.cid;i===""?L(this.el).bind(h,j):L(this.el).delegate(i,h,j)}}},_configure:function(f){this.options&&(f=M.extend({},this.options,f));for(var e=0,h=E.length;e<h;e++){var g=E[e];f[g]&&(this[g]=f[g])}this.options=f},_ensureElement:function(){if(this.el){if(M.isString(this.el)){this.el=L(this.el).get(0)}}else{var e=this.attributes||{};if(this.id){e.id=this.id}if(this.className){e["class"]=this.className}this.el=this.make(this.tagName,e)}}});N.Model.extend=N.Collection.extend=N.Router.extend=N.View.extend=function(f,e){var g=b(this,f,e);g.extend=this.extend;return g};var a={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};N.sync=function(f,e,h){var g=a[f];h=M.extend({type:g,dataType:"json"},h);if(!h.url){h.url=H(e)||G()}if(!h.data&&e&&(f=="create"||f=="update")){h.contentType="application/json",h.data=JSON.stringify(e.toJSON())}if(N.emulateJSON){h.contentType="application/x-www-form-urlencoded",h.data=h.data?{model:h.data}:{}}if(N.emulateHTTP&&(g==="PUT"||g==="DELETE")){if(N.emulateJSON){h.data._method=g}h.type="POST";h.beforeSend=function(i){i.setRequestHeader("X-HTTP-Method-Override",g)}}if(h.type!=="GET"&&!N.emulateJSON){h.processData=!1}return L.ajax(h)};var D=function(){},b=function(f,e,h){var g;g=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return f.apply(this,arguments)};M.extend(g,f);D.prototype=f.prototype;g.prototype=new D;e&&M.extend(g.prototype,e);h&&M.extend(g,h);g.prototype.constructor=g;g.__super__=f.prototype;return g},H=function(e){if(!e||!e.url){return null}return M.isFunction(e.url)?e.url():e.url},G=function(){throw Error('A "url" property or function must be specified')},J=function(f,e,g){return function(h){f?f(e,h,g):e.trigger("error",e,h,g)}}}).call(this);(function(f){var i={width:1280,height:800};if((function(){var r=document.createElement("div"),o="backgroundSize",s=o.charAt(0).toUpperCase()+o.substr(1),q=[o,"Webkit"+s,"Moz"+s,"O"+s];for(var p in q){if(r.style[q[p]]!==undefined){return true}}return true}())){return}if(f.browser.msie&&parseInt(f.browser.version,10)<=6){return}var b=f(window),k="expando",m="tall",n="wide",c,g,h,e,a,l,d=function(){if(screen.availWidth<=i.width&&screen.availHeight<=i.height){return}f(".background").each(function(p){var o=f(this).css("backgroundImage").replace(/^url\(("|')?|("|')?\);?$/g,"")||false;if(!o||o==="none"||o===""){return}f(this).css("backgroundImage","");g=f(document.createElement("img")).attr("src",o).css({overflow:"hidden",position:"absolute",top:"0",left:"0","z-index":"-1"}).attr("bg-img");f(this).prepend(g)})},j=function(){};f(document).ready(d)})(jQuery);jQuery.effects||function(r,i){function e(j){var f;if(j&&j.constructor==Array&&j.length==3){return j}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(j)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(j)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(j)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(j)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(/rgba\(0, 0, 0, 0\)/.exec(j)){return d.transparent}return d[r.trim(j).toLowerCase()]}function z(k,j){var f;do{f=r.curCSS(k,j);if(f!=""&&f!="transparent"||r.nodeName(k,"body")){break}j="backgroundColor"}while(k=k.parentNode);return e(f)}function c(){var m=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,j={},f,l;if(m&&m.length&&m[0]&&m[m[0]]){for(var k=m.length;k--;){f=m[k];if(typeof m[f]=="string"){l=f.replace(/\-(\w)/g,function(o,n){return n.toUpperCase()});j[l]=m[f]}}}else{for(f in m){if(typeof m[f]==="string"){j[f]=m[f]}}}return j}function b(k){var j,f;for(j in k){f=k[j];if(f==null||r.isFunction(f)||j in w||/scrollbar/.test(j)||!/color/i.test(j)&&isNaN(parseFloat(f))){delete k[j]}}return k}function v(l,j){var f={_:0},k;for(k in j){if(l[k]!=j[k]){f[k]=j[k]}}return f}function h(l,j,f,k){if(typeof l=="object"){k=j;f=null;j=l;l=j.effect}if(r.isFunction(j)){k=j;f=null;j={}}if(typeof j=="number"||r.fx.speeds[j]){k=f;f=j;j={}}if(r.isFunction(f)){k=f;f=null}j=j||{};f=f||j.duration;f=r.fx.off?0:typeof f=="number"?f:f in r.fx.speeds?r.fx.speeds[f]:r.fx.speeds._default;k=k||j.complete;return[l,j,f,k]}function g(f){if(!f||typeof f==="number"||r.fx.speeds[f]){return true}if(typeof f==="string"&&!r.effects[f]){return true}return false}r.effects={};r.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(j,f){r.fx.step[f]=function(k){if(!k.colorInit){k.start=z(k.elem,f);k.end=e(k.end);k.colorInit=true}k.elem.style[f]="rgb("+Math.max(Math.min(parseInt(k.pos*(k.end[0]-k.start[0])+k.start[0],10),255),0)+","+Math.max(Math.min(parseInt(k.pos*(k.end[1]-k.start[1])+k.start[1],10),255),0)+","+Math.max(Math.min(parseInt(k.pos*(k.end[2]-k.start[2])+k.start[2],10),255),0)+")"}});var d={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]},a=["add","remove","toggle"],w={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};r.effects.animateClass=function(l,j,f,k){if(r.isFunction(f)){k=f;f=null}return this.queue(function(){var q=r(this),p=q.attr("style")||" ",n=b(c.call(this)),o,m=q.attr("class");r.each(a,function(s,t){l[t]&&q[t+"Class"](l[t])});o=b(c.call(this));q.attr("class",m);q.animate(v(n,o),{queue:false,duration:j,easing:f,complete:function(){r.each(a,function(s,t){l[t]&&q[t+"Class"](l[t])});if(typeof q.attr("style")=="object"){q.attr("style").cssText="";q.attr("style").cssText=p}else{q.attr("style",p)}k&&k.apply(this,arguments);r.dequeue(this)}})})};r.fn.extend({_addClass:r.fn.addClass,addClass:function(l,j,f,k){return j?r.effects.animateClass.apply(this,[{add:l},j,f,k]):this._addClass(l)},_removeClass:r.fn.removeClass,removeClass:function(l,j,f,k){return j?r.effects.animateClass.apply(this,[{remove:l},j,f,k]):this._removeClass(l)},_toggleClass:r.fn.toggleClass,toggleClass:function(m,j,f,l,k){return typeof j=="boolean"||j===i?f?r.effects.animateClass.apply(this,[j?{add:m}:{remove:m},f,l,k]):this._toggleClass(m,j):r.effects.animateClass.apply(this,[{toggle:m},j,f,l])},switchClass:function(m,j,f,l,k){return r.effects.animateClass.apply(this,[{add:j,remove:m},f,l,k])}});r.extend(r.effects,{version:"1.8.16",save:function(k,j){for(var f=0;f<j.length;f++){j[f]!==null&&k.data("ec.storage."+j[f],k[0].style[j[f]])}},restore:function(k,j){for(var f=0;f<j.length;f++){j[f]!==null&&k.css(j[f],k.data("ec.storage."+j[f]))}},setMode:function(j,f){if(f=="toggle"){f=j.is(":hidden")?"show":"hide"}return f},getBaseline:function(k,j){var f;switch(k[0]){case"top":f=0;break;case"middle":f=0.5;break;case"bottom":f=1;break;default:f=k[0]/j.height}switch(k[1]){case"left":k=0;break;case"center":k=0.5;break;case"right":k=1;break;default:k=k[1]/j.width}return{x:k,y:f}},createWrapper:function(l){if(l.parent().is(".ui-effects-wrapper")){return l.parent()}var j={width:l.outerWidth(true),height:l.outerHeight(true),"float":l.css("float")},f=r("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),k=document.activeElement;l.wrap(f);if(l[0]===k||r.contains(l[0],k)){r(k).focus()}f=l.parent();if(l.css("position")=="static"){f.css({position:"relative"});l.css({position:"relative"})}else{r.extend(j,{position:l.css("position"),zIndex:l.css("z-index")});r.each(["top","left","bottom","right"],function(n,m){j[m]=l.css(m);if(isNaN(parseInt(j[m],10))){j[m]="auto"}});l.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return f.css(j).show()},removeWrapper:function(k){var j,f=document.activeElement;if(k.parent().is(".ui-effects-wrapper")){j=k.parent().replaceWith(k);if(k[0]===f||r.contains(k[0],f)){r(f).focus()}return j}return k},setTransition:function(l,j,f,k){k=k||{};r.each(j,function(n,m){unit=l.cssUnit(m);if(unit[0]>0){k[m]=unit[0]*f+unit[1]}});return k}});r.fn.extend({effect:function(l){var j=h.apply(this,arguments),f={options:j[1],duration:j[2],callback:j[3]};j=f.options.mode;var k=r.effects[l];if(r.fx.off||!k){return j?this[j](f.duration,f.callback):this.each(function(){f.callback&&f.callback.call(this)})}return k.call(this,f)},_show:r.fn.show,show:function(j){if(g(j)){return this._show.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="show";return this.effect.apply(this,f)}},_hide:r.fn.hide,hide:function(j){if(g(j)){return this._hide.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="hide";return this.effect.apply(this,f)}},__toggle:r.fn.toggle,toggle:function(j){if(g(j)||typeof j==="boolean"||r.isFunction(j)){return this.__toggle.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="toggle";return this.effect.apply(this,f)}},cssUnit:function(k){var j=this.css(k),f=[];r.each(["em","px","%","pt"],function(m,l){if(j.indexOf(l)>0){f=[parseFloat(j),l]}});return f}});r.easing.jswing=r.easing.swing;r.extend(r.easing,{def:"easeOutQuad",swing:function(m,j,f,l,k){return r.easing[r.easing.def](m,j,f,l,k)},easeInQuad:function(m,j,f,l,k){return l*(j/=k)*j+f},easeOutQuad:function(m,j,f,l,k){return -l*(j/=k)*(j-2)+f},easeInOutQuad:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j+f}return -l/2*(--j*(j-2)-1)+f},easeInCubic:function(m,j,f,l,k){return l*(j/=k)*j*j+f},easeOutCubic:function(m,j,f,l,k){return l*((j=j/k-1)*j*j+1)+f},easeInOutCubic:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j+f}return l/2*((j-=2)*j*j+2)+f},easeInQuart:function(m,j,f,l,k){return l*(j/=k)*j*j*j+f},easeOutQuart:function(m,j,f,l,k){return -l*((j=j/k-1)*j*j*j-1)+f},easeInOutQuart:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j*j+f}return -l/2*((j-=2)*j*j*j-2)+f},easeInQuint:function(m,j,f,l,k){return l*(j/=k)*j*j*j*j+f},easeOutQuint:function(m,j,f,l,k){return l*((j=j/k-1)*j*j*j*j+1)+f},easeInOutQuint:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j*j*j+f}return l/2*((j-=2)*j*j*j*j+2)+f},easeInSine:function(m,j,f,l,k){return -l*Math.cos(j/k*(Math.PI/2))+l+f},easeOutSine:function(m,j,f,l,k){return l*Math.sin(j/k*(Math.PI/2))+f},easeInOutSine:function(m,j,f,l,k){return -l/2*(Math.cos(Math.PI*j/k)-1)+f},easeInExpo:function(m,j,f,l,k){return j==0?f:l*Math.pow(2,10*(j/k-1))+f},easeOutExpo:function(m,j,f,l,k){return j==k?f+l:l*(-Math.pow(2,-10*j/k)+1)+f},easeInOutExpo:function(m,j,f,l,k){if(j==0){return f}if(j==k){return f+l}if((j/=k/2)<1){return l/2*Math.pow(2,10*(j-1))+f}return l/2*(-Math.pow(2,-10*--j)+2)+f},easeInCirc:function(m,j,f,l,k){return -l*(Math.sqrt(1-(j/=k)*j)-1)+f},easeOutCirc:function(m,j,f,l,k){return l*Math.sqrt(1-(j=j/k-1)*j)+f},easeInOutCirc:function(m,j,f,l,k){if((j/=k/2)<1){return -l/2*(Math.sqrt(1-j*j)-1)+f}return l/2*(Math.sqrt(1-(j-=2)*j)+1)+f},easeInElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m)==1){return f+n}l||(l=m*0.3);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}return -(k*Math.pow(2,10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l))+f},easeOutElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m)==1){return f+n}l||(l=m*0.3);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}return k*Math.pow(2,-10*j)*Math.sin((j*m-o)*2*Math.PI/l)+n+f},easeInOutElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m/2)==2){return f+n}l||(l=m*0.3*1.5);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}if(j<1){return -0.5*k*Math.pow(2,10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l)+f}return k*Math.pow(2,-10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l)*0.5+n+f},easeInBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}return m*(j/=l)*j*((k+1)*j-k)+f},easeOutBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}return m*((j=j/l-1)*j*((k+1)*j+k)+1)+f},easeInOutBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}if((j/=l/2)<1){return m/2*j*j*(((k*=1.525)+1)*j-k)+f}return m/2*((j-=2)*j*(((k*=1.525)+1)*j+k)+2)+f},easeInBounce:function(m,j,f,l,k){return l-r.easing.easeOutBounce(m,k-j,0,l,k)+f},easeOutBounce:function(m,j,f,l,k){return(j/=k)<1/2.75?l*7.5625*j*j+f:j<2/2.75?l*(7.5625*(j-=1.5/2.75)*j+0.75)+f:j<2.5/2.75?l*(7.5625*(j-=2.25/2.75)*j+0.9375)+f:l*(7.5625*(j-=2.625/2.75)*j+0.984375)+f},easeInOutBounce:function(m,j,f,l,k){if(j<k/2){return r.easing.easeInBounce(m,j*2,0,l,k)*0.5+f}return r.easing.easeOutBounce(m,j*2-k,0,l,k)*0.5+l*0.5+f}})}(jQuery);(function(a){a.effects.slide=function(b){return this.queue(function(){var d=a(this),k=["position","top","bottom","left","right"],m=a.effects.setMode(d,b.options.mode||"show"),c=b.options.direction||"left";a.effects.save(d,k);d.show();a.effects.createWrapper(d).css({overflow:"hidden"});var l=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var n=b.options.distance||(l=="top"?d.outerHeight({margin:true}):d.outerWidth({margin:true}));if(m=="show"){d.css(l,c=="pos"?isNaN(n)?"-"+n:-n:n)}var j={};j[l]=(m=="show"?c=="pos"?"+=":"-=":c=="pos"?"-=":"+=")+n;d.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){m=="hide"&&d.hide();a.effects.restore(d,k);a.effects.removeWrapper(d);b.callback&&b.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);(function(c){var a=new Array();var b=new Array();var d=0;jQuery.fn.MyDropdown=function(g){a[a.length]=c.extend({},c.fn.MyDropdown.defaults,g);b[a.length]=0;var e=a.length-1;var h=a[e];var f={};c(this).attr("idx",e);c(this).each(function(){var n=c(this);var p=n.find("option");var m;var o="";b[e]=p.length;for(var k=0;k!=p.length;k++){m=p[k].value;txt=p[k].text;o+="<LI v="+m+">"+txt}if(p.length>0){o="<UL class='advMenuUL advMenuUL"+e+"'>"+o+"</UL>"}else{o=""}var j="<DIV class='genHeader genHeader"+e+"'>SELECT</DIV>";if(!h.bDebug){n.hide()}if(typeof h.container!=="undefined"){f=c(h.container).append(j+o)}else{f=n.after(j+o)}c(".advMenuUL"+e).addClass("menuHeader").addClass("menuHeader"+e);function l(q,i){q.css("height",i);if(typeof h.max_height!=="undefined"){if(q.height()>h.max_height){q.height(h.max_height)}q.css("overflow-y","auto")}}c(".genHeader"+e).click(function(){var i=c(n).val();c(".advMenuUL li").each(function(){var q=c(this).attr("v");if(q==i){this.className="sel"}});l(c(".menuHeader"+e),b[e]*h.lineHeight);c(".menuHeader"+e).toggle()}).mouseleave(function(){c(".menuHeader"+e).css("height",h.lineHeight+"px");d=setTimeout(function(){c(".menuHeader"+e).hide()},10)});c(".advMenuUL"+e+" li").mouseover(function(){c(".advMenuUL li").each(function(){this.className=""})});c(".menuHeader"+e).mouseenter(function(){l(c(this),b[e]*h.lineHeight);clearTimeout(d)});c(".menuHeader"+e).mouseleave(function(){c(this).css("height",h.lineHeight+"px");c(this).hide()});c(".advMenuUL"+e+" LI").click(function(){c(".genHeader"+e).html(c(this).text());var i=c(this).attr("v");c(n).children().each(function(){if(c(this).val()==i){this.selected=true}});c(".menuHeader"+e).hide();n.trigger("change")});c(".advMenuUL").hide();c(n).children().each(function(){if(this.selected){var i=c(this).val();var q=c(this).text();c(".advMenuUL LI").each(function(){var r=c(this).attr("v");if(r==i){c(".genHeader"+e).html(q)}})}})});return f};jQuery.fn.MyDropdown.defaults={bDebug:false,lineHeight:20}})(jQuery);(function(a){a.fn.numeric=function(d,e){if(typeof d==="boolean"){d={decimal:d}}d=d||{};if(typeof d.negative=="undefined"){d.negative=true}var b=(d.decimal===false)?"":d.decimal||".";var c=(d.negative===true)?true:false;var e=typeof e=="function"?e:function(){};return this.data("numeric.decimal",b).data("numeric.negative",c).data("numeric.callback",e).keypress(a.fn.numeric.keypress).keyup(a.fn.numeric.keyup).blur(a.fn.numeric.blur)};a.fn.numeric.keypress=function(g){var b=a.data(this,"numeric.decimal");var c=a.data(this,"numeric.negative");var d=g.charCode?g.charCode:g.keyCode?g.keyCode:0;if(d==13&&this.nodeName.toLowerCase()=="input"){return true}else{if(d==13){return false}}var f=false;if((g.ctrlKey&&d==97)||(g.ctrlKey&&d==65)){return true}if((g.ctrlKey&&d==120)||(g.ctrlKey&&d==88)){return true}if((g.ctrlKey&&d==99)||(g.ctrlKey&&d==67)){return true}if((g.ctrlKey&&d==122)||(g.ctrlKey&&d==90)){return true}if((g.ctrlKey&&d==118)||(g.ctrlKey&&d==86)||(g.shiftKey&&d==45)){return true}if(d<48||d>57){if(this.value.indexOf("-")!=0&&c&&d==45&&(this.value.length==0||(a.fn.getSelectionStart(this))==0)){return true}if(b&&d==b.charCodeAt(0)&&this.value.indexOf(b)!=-1){f=false}if(d!=8&&d!=9&&d!=13&&d!=35&&d!=36&&d!=37&&d!=39&&d!=46){f=false}else{if(typeof g.charCode!="undefined"){if(g.keyCode==g.which&&g.which!=0){f=true;if(g.which==46){f=false}}else{if(g.keyCode!=0&&g.charCode==0&&g.which==0){f=true}}}}if(b&&d==b.charCodeAt(0)){if(this.value.indexOf(b)==-1){f=true}else{f=false}}}else{f=true}return f};a.fn.numeric.keyup=function(p){var k=this.value;if(k.length>0){var f=a.fn.getSelectionStart(this);var o=a.data(this,"numeric.decimal");var l=a.data(this,"numeric.negative");if(o!=""){var d=k.indexOf(o);if(d==0){this.value="0"+k}if(d==1&&k.charAt(0)=="-"){this.value="-0"+k.substring(1)}k=this.value}var c=[0,1,2,3,4,5,6,7,8,9,"-",o];var h=k.length;for(var n=h-1;n>=0;n--){var b=k.charAt(n);if(n!=0&&b=="-"){k=k.substring(0,n)+k.substring(n+1)}else{if(n==0&&!l&&b=="-"){k=k.substring(1)}}var g=false;for(var m=0;m<c.length;m++){if(b==c[m]){g=true;break}}if(!g||b==" "){k=k.substring(0,n)+k.substring(n+1)}}var q=k.indexOf(o);if(q>0){for(var n=h-1;n>q;n--){var b=k.charAt(n);if(b==o){k=k.substring(0,n)+k.substring(n+1)}}}this.value=k;a.fn.setSelection(this,f)}};a.fn.numeric.blur=function(){var b=a.data(this,"numeric.decimal");var e=a.data(this,"numeric.callback");var d=this.value;if(d!=""){var c=new RegExp("^\\d+$|\\d*"+b+"\\d+");if(!c.exec(d)){e.apply(this)}}};a.fn.removeNumeric=function(){return this.data("numeric.decimal",null).data("numeric.negative",null).data("numeric.callback",null).unbind("keypress",a.fn.numeric.keypress).unbind("blur",a.fn.numeric.blur)};a.fn.getSelectionStart=function(c){if(c.createTextRange){var b=document.selection.createRange().duplicate();b.moveEnd("character",c.value.length);if(b.text==""){return c.value.length}return c.value.lastIndexOf(b.text)}else{return c.selectionStart}};a.fn.setSelection=function(d,c){if(typeof c=="number"){c=[c,c]}if(c&&c.constructor==Array&&c.length==2){if(d.createTextRange){var b=d.createTextRange();b.collapse(true);b.moveStart("character",c[0]);b.moveEnd("character",c[1]);b.select()}else{if(d.setSelectionRange){d.focus();d.setSelectionRange(c[0],c[1])}}}}})(jQuery);(function(a){a.fn.extend({reflect:function(b){b=a.extend({height:1/3,opacity:0.33},b);return this.unreflect().each(function(){var c=this;if(/^img$/i.test(c.tagName)){function d(){var g=c.width,f=c.height,l,i,m,h,k;i=Math.floor((b.height>1)?Math.min(f,b.height):f*b.height);l=a("<canvas />")[0];if(l.getContext){h=l.getContext("2d");try{a(l).attr({width:g,height:i});h.save();h.translate(0,f-1);h.scale(1,-1);h.drawImage(c,0,0,g,f);h.restore();h.globalCompositeOperation="destination-out";k=h.createLinearGradient(0,0,0,i);k.addColorStop(0,"rgba(255, 255, 255, "+(1-b.opacity)+")");k.addColorStop(0.5,"rgba(255, 255, 255, "+(1-b.opacity*0.2)+")");k.addColorStop(1,"rgba(255, 255, 255, 1.0)");h.fillStyle=k;h.rect(0,0,g,i);h.fill()}catch(j){return}}else{if(!a.browser.msie){return}l=a("<img />").attr("src",c.src).css({width:g,height:f,marginBottom:i-f,filter:"FlipV progid:DXImageTransform.Microsoft.Alpha(Opacity="+(b.opacity*100)+", FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=0, FinishY="+(i/f*100)+")"})[0]}a(l).css({display:"block",border:0});m=a(/^a$/i.test(c.parentNode.tagName)?"<span />":"<div />").insertAfter(c).append([c,l])[0];m.className=c.className;a.data(c,"reflected",m.style.cssText=c.style.cssText);a(m).css({width:g,height:f+i,overflow:"hidden"});c.style.cssText="display: block; border: 0px";c.className="reflected"}if(c.complete){d()}else{a(c).load(d)}}})},unreflect:function(){return this.unbind("load").each(function(){var c=this,b=a.data(this,"reflected"),d;if(b!==undefined){d=c.parentNode;c.className=d.className;c.style.cssText=b;a.removeData(c,"reflected");d.parentNode.replaceChild(c,d)}})}})})(jQuery);jQuery(function(a){a("img.reflect").reflect()});
/*!	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var F="undefined",r="object",U="Shockwave Flash",Y="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",T="SWFObjectExprInst",z="onreadystatechange",Q=window,j=document,t=navigator,V=false,W=[h],o=[],P=[],K=[],l,S,G,D,L=false,a=false,n,I,m=true,O=function(){var ac=typeof j.getElementById!=F&&typeof j.getElementsByTagName!=F&&typeof j.createElement!=F,aj=t.userAgent.toLowerCase(),aa=t.platform.toLowerCase(),ag=aa?/win/.test(aa):/win/.test(aj),ae=aa?/mac/.test(aa):/mac/.test(aj),ah=/webkit/.test(aj)?parseFloat(aj.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,Z=!+"\v1",ai=[0,0,0],ad=null;if(typeof t.plugins!=F&&typeof t.plugins[U]==r){ad=t.plugins[U].description;if(ad&&!(typeof t.mimeTypes!=F&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){V=true;Z=false;ad=ad.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ai[0]=parseInt(ad.replace(/^(.*)\..*$/,"$1"),10);ai[1]=parseInt(ad.replace(/^.*\.(.*)\s.*$/,"$1"),10);ai[2]=/[a-zA-Z]/.test(ad)?parseInt(ad.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof Q.ActiveXObject!=F){try{var af=new ActiveXObject(Y);if(af){ad=af.GetVariable("$version");if(ad){Z=true;ad=ad.split(" ")[1].split(",");ai=[parseInt(ad[0],10),parseInt(ad[1],10),parseInt(ad[2],10)]}}}catch(ab){}}}return{w3:ac,pv:ai,wk:ah,ie:Z,win:ag,mac:ae}}(),k=function(){if(!O.w3){return}if((typeof j.readyState!=F&&j.readyState=="complete")||(typeof j.readyState==F&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!L){if(typeof j.addEventListener!=F){j.addEventListener("DOMContentLoaded",f,false)}if(O.ie&&O.win){j.attachEvent(z,function(){if(j.readyState=="complete"){j.detachEvent(z,arguments.callee);f()}});if(Q==top){(function(){if(L){return}try{j.documentElement.doScroll("left")}catch(Z){setTimeout(arguments.callee,0);return}f()})()}}if(O.wk){(function(){if(L){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(L){return}try{var ab=j.getElementsByTagName("body")[0].appendChild(E("span"));ab.parentNode.removeChild(ab)}catch(ac){return}L=true;var Z=W.length;for(var aa=0;aa<Z;aa++){W[aa]()}}function M(Z){if(L){Z()}else{W[W.length]=Z}}function s(aa){if(typeof Q.addEventListener!=F){Q.addEventListener("load",aa,false)}else{if(typeof j.addEventListener!=F){j.addEventListener("load",aa,false)}else{if(typeof Q.attachEvent!=F){i(Q,"onload",aa)}else{if(typeof Q.onload=="function"){var Z=Q.onload;Q.onload=function(){Z();aa()}}else{Q.onload=aa}}}}}function h(){if(V){X()}else{J()}}function X(){var Z=j.getElementsByTagName("body")[0];var ac=E(r);ac.setAttribute("type",q);var ab=Z.appendChild(ac);if(ab){var aa=0;(function(){if(typeof ab.GetVariable!=F){var ad=ab.GetVariable("$version");if(ad){ad=ad.split(" ")[1].split(",");O.pv=[parseInt(ad[0],10),parseInt(ad[1],10),parseInt(ad[2],10)]}}else{if(aa<10){aa++;setTimeout(arguments.callee,10);return}}Z.removeChild(ac);ab=null;J()})()}else{J()}}function J(){var ai=o.length;if(ai>0){for(var ah=0;ah<ai;ah++){var aa=o[ah].id;var ad=o[ah].callbackFn;var ac={success:false,id:aa};if(O.pv[0]>0){var ag=c(aa);if(ag){if(H(o[ah].swfVersion)&&!(O.wk&&O.wk<312)){w(aa,true);if(ad){ac.success=true;ac.ref=B(aa);ad(ac)}}else{if(o[ah].expressInstall&&C()){var ak={};ak.data=o[ah].expressInstall;ak.width=ag.getAttribute("width")||"0";ak.height=ag.getAttribute("height")||"0";if(ag.getAttribute("class")){ak.styleclass=ag.getAttribute("class")}if(ag.getAttribute("align")){ak.align=ag.getAttribute("align")}var aj={};var Z=ag.getElementsByTagName("param");var ae=Z.length;for(var af=0;af<ae;af++){if(Z[af].getAttribute("name").toLowerCase()!="movie"){aj[Z[af].getAttribute("name")]=Z[af].getAttribute("value")}}R(ak,aj,aa,ad)}else{p(ag);if(ad){ad(ac)}}}}}else{w(aa,true);if(ad){var ab=B(aa);if(ab&&typeof ab.SetVariable!=F){ac.success=true;ac.ref=ab}ad(ac)}}}}}function B(ac){var Z=null;var aa=c(ac);if(aa&&aa.nodeName=="OBJECT"){if(typeof aa.SetVariable!=F){Z=aa}else{var ab=aa.getElementsByTagName(r)[0];if(ab){Z=ab}}}return Z}function C(){return !a&&H("6.0.65")&&(O.win||O.mac)&&!(O.wk&&O.wk<312)}function R(ac,ad,Z,ab){a=true;G=ab||null;D={success:false,id:Z};var ag=c(Z);if(ag){if(ag.nodeName=="OBJECT"){l=g(ag);S=null}else{l=ag;S=Z}ac.id=T;if(typeof ac.width==F||(!/%$/.test(ac.width)&&parseInt(ac.width,10)<310)){ac.width="310"}if(typeof ac.height==F||(!/%$/.test(ac.height)&&parseInt(ac.height,10)<137)){ac.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var af=O.ie&&O.win?"ActiveX":"PlugIn",ae="MMredirectURL="+encodeURI(window.location).toString().replace(/&/g,"%26")+"&MMplayerType="+af+"&MMdoctitle="+j.title;if(typeof ad.flashvars!=F){ad.flashvars+="&"+ae}else{ad.flashvars=ae}if(O.ie&&O.win&&ag.readyState!=4){var aa=E("div");Z+="SWFObjectNew";aa.setAttribute("id",Z);ag.parentNode.insertBefore(aa,ag);ag.style.display="none";(function(){if(ag.readyState==4){ag.parentNode.removeChild(ag)}else{setTimeout(arguments.callee,10)}})()}u(ac,ad,Z)}}function p(aa){if(O.ie&&O.win&&aa.readyState!=4){var Z=E("div");aa.parentNode.insertBefore(Z,aa);Z.parentNode.replaceChild(g(aa),Z);aa.style.display="none";(function(){if(aa.readyState==4){aa.parentNode.removeChild(aa)}else{setTimeout(arguments.callee,10)}})()}else{aa.parentNode.replaceChild(g(aa),aa)}}function g(ae){var ad=E("div");if(O.win&&O.ie){ad.innerHTML=ae.innerHTML}else{var aa=ae.getElementsByTagName(r)[0];if(aa){var af=aa.childNodes;if(af){var Z=af.length;for(var ab=0;ab<Z;ab++){if(!(af[ab].nodeType==1&&af[ab].nodeName=="PARAM")&&!(af[ab].nodeType==8)){ad.appendChild(af[ab].cloneNode(true))}}}}}return ad}function u(ak,ai,aa){var Z,ac=c(aa);if(O.wk&&O.wk<312){return Z}if(ac){if(typeof ak.id==F){ak.id=aa}if(O.ie&&O.win){var aj="";for(var ag in ak){if(ak[ag]!=Object.prototype[ag]){if(ag.toLowerCase()=="data"){ai.movie=ak[ag]}else{if(ag.toLowerCase()=="styleclass"){aj+=' class="'+ak[ag]+'"'}else{if(ag.toLowerCase()!="classid"){aj+=" "+ag+'="'+ak[ag]+'"'}}}}}var ah="";for(var af in ai){if(ai[af]!=Object.prototype[af]){ah+='<param name="'+af+'" value="'+ai[af]+'" />'}}ac.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+aj+">"+ah+"</object>";P[P.length]=ak.id;Z=c(ak.id)}else{var ab=E(r);ab.setAttribute("type",q);for(var ae in ak){if(ak[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="styleclass"){ab.setAttribute("class",ak[ae])}else{if(ae.toLowerCase()!="classid"){ab.setAttribute(ae,ak[ae])}}}}for(var ad in ai){if(ai[ad]!=Object.prototype[ad]&&ad.toLowerCase()!="movie"){e(ab,ad,ai[ad])}}ac.parentNode.replaceChild(ab,ac);Z=ab}}return Z}function e(ab,Z,aa){var ac=E("param");ac.setAttribute("name",Z);ac.setAttribute("value",aa);ab.appendChild(ac)}function A(aa){var Z=c(aa);if(Z&&Z.nodeName=="OBJECT"){if(O.ie&&O.win){Z.style.display="none";(function(){if(Z.readyState==4){b(aa)}else{setTimeout(arguments.callee,10)}})()}else{Z.parentNode.removeChild(Z)}}}function b(ab){var aa=c(ab);if(aa){for(var Z in aa){if(typeof aa[Z]=="function"){aa[Z]=null}}aa.parentNode.removeChild(aa)}}function c(ab){var Z=null;try{Z=j.getElementById(ab)}catch(aa){}return Z}function E(Z){return j.createElement(Z)}function i(ab,Z,aa){ab.attachEvent(Z,aa);K[K.length]=[ab,Z,aa]}function H(ab){var aa=O.pv,Z=ab.split(".");Z[0]=parseInt(Z[0],10);Z[1]=parseInt(Z[1],10)||0;Z[2]=parseInt(Z[2],10)||0;return(aa[0]>Z[0]||(aa[0]==Z[0]&&aa[1]>Z[1])||(aa[0]==Z[0]&&aa[1]==Z[1]&&aa[2]>=Z[2]))?true:false}function v(ae,aa,af,ad){if(O.ie&&O.mac){return}var ac=j.getElementsByTagName("head")[0];if(!ac){return}var Z=(af&&typeof af=="string")?af:"screen";if(ad){n=null;I=null}if(!n||I!=Z){var ab=E("style");ab.setAttribute("type","text/css");ab.setAttribute("media",Z);n=ac.appendChild(ab);if(O.ie&&O.win&&typeof j.styleSheets!=F&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}I=Z}if(O.ie&&O.win){if(n&&typeof n.addRule==r){n.addRule(ae,aa)}}else{if(n&&typeof j.createTextNode!=F){n.appendChild(j.createTextNode(ae+" {"+aa+"}"))}}}function w(ab,Z){if(!m){return}var aa=Z?"visible":"hidden";if(L&&c(ab)){c(ab).style.visibility=aa}else{v("#"+ab,"visibility:"+aa)}}function N(aa){var ab=/[\\\"<>\.;]/;var Z=ab.exec(aa)!=null;return Z&&typeof encodeURIComponent!=F?encodeURIComponent(aa):aa}var d=function(){if(O.ie&&O.win){window.attachEvent("onunload",function(){var ae=K.length;for(var ad=0;ad<ae;ad++){K[ad][0].detachEvent(K[ad][1],K[ad][2])}var ab=P.length;for(var ac=0;ac<ab;ac++){A(P[ac])}for(var aa in O){O[aa]=null}O=null;for(var Z in swfobject){swfobject[Z]=null}swfobject=null})}}();return{registerObject:function(ad,Z,ac,ab){if(O.w3&&ad&&Z){var aa={};aa.id=ad;aa.swfVersion=Z;aa.expressInstall=ac;aa.callbackFn=ab;o[o.length]=aa;w(ad,false)}else{if(ab){ab({success:false,id:ad})}}},getObjectById:function(Z){if(O.w3){return B(Z)}},embedSWF:function(ad,aj,ag,ai,aa,ac,ab,af,ah,ae){var Z={success:false,id:aj};if(O.w3&&!(O.wk&&O.wk<312)&&ad&&aj&&ag&&ai&&aa){w(aj,false);M(function(){ag+="";ai+="";var al={};if(ah&&typeof ah===r){for(var an in ah){al[an]=ah[an]}}al.data=ad;al.width=ag;al.height=ai;var ao={};if(af&&typeof af===r){for(var am in af){ao[am]=af[am]}}if(ab&&typeof ab===r){for(var ak in ab){if(typeof ao.flashvars!=F){ao.flashvars+="&"+ak+"="+ab[ak]}else{ao.flashvars=ak+"="+ab[ak]}}}if(H(aa)){var ap=u(al,ao,aj);if(al.id==aj){w(aj,true)}Z.success=true;Z.ref=ap}else{if(ac&&C()){al.data=ac;R(al,ao,aj,ae);return}else{w(aj,true)}}if(ae){ae(Z)}})}else{if(ae){ae(Z)}}},switchOffAutoHideShow:function(){m=false},ua:O,getFlashPlayerVersion:function(){return{major:O.pv[0],minor:O.pv[1],release:O.pv[2]}},hasFlashPlayerVersion:H,createSWF:function(ab,aa,Z){if(O.w3){return u(ab,aa,Z)}else{return undefined}},showExpressInstall:function(ab,ac,Z,aa){if(O.w3&&C()){R(ab,ac,Z,aa)}},removeSWF:function(Z){if(O.w3){A(Z)}},createCSS:function(ac,ab,aa,Z){if(O.w3){v(ac,ab,aa,Z)}},addDomLoadEvent:M,addLoadEvent:s,getQueryParamValue:function(ac){var ab=j.location.search||j.location.hash;if(ab){if(/\?/.test(ab)){ab=ab.split("?")[1]}if(ac==null){return N(ab)}var aa=ab.split("&");for(var Z=0;Z<aa.length;Z++){if(aa[Z].substring(0,aa[Z].indexOf("="))==ac){return N(aa[Z].substring((aa[Z].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var Z=c(T);if(Z&&l){Z.parentNode.replaceChild(l,Z);if(S){w(S,true);if(O.ie&&O.win){l.style.display="block"}}if(G){G(D)}}a=false}}}}();jQuery.fn.supersleight=function(a){a=jQuery.extend({imgs:true,backgrounds:true,shim:"/public/themes/hogan/images/transparent.gif",apply_positioning:true},a);return this.each(function(){if(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)<7&&parseInt(jQuery.browser.version,10)>4){jQuery(this).find("*").andSelf().each(function(d,f){var b=jQuery(f);if(a.backgrounds&&b.css("background-image").match(/\.png/i)!==null){var c=b.css("background-image");var h=c.substring(5,c.length-2);var g=(b.css("background-repeat")=="no-repeat"?"crop":"scale");var e={filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+h+"', sizingMethod='"+g+"')","background-image":"url("+a.shim+")"};b.css(e)}if(a.imgs&&b.is("img[src$=png]")){var e={width:b.width()+"px",height:b.height()+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b.attr("src")+"', sizingMethod='scale')"};b.css(e).attr("src",a.shim)}if(a.apply_positioning&&b.is("a, input")&&(b.css("position")===""||b.css("position")=="static")){b.css("position","relative")}})}})};(function(){var ao,p,ak,d,ad,s,z,c,H,K,G,Y,ab,ac,h,u,E,w,g,am,A,S,aj,e,R,k,f,L,l,o,W,X,aa,F,U,an,C,J,D,al,aq,ai,Q,b,j,ah,r,V,N,B,t,af,v,T,ag,q,I,m,ae,a,Z,P,M,O;var ap=Object.prototype.hasOwnProperty,n=function(av,at){for(var ar in at){if(ap.call(at,ar)){av[ar]=at[ar]}}function au(){this.constructor=av}au.prototype=at.prototype;av.prototype=new au;av.__super__=at.prototype;return av},i=function(ar,at){return function(){return ar.apply(at,arguments)}};ac=(function(){n(ar,Backbone.Model);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.defaults={name:"",role:"",thumbnail:"",width:944,height:531,poster:"",mp4:"",webm:"",ogg:"",flv:""};return ar})();ab=(function(){n(ar,Backbone.Collection);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.model=ac;return ar})();ao=(function(){n(ar,Backbone.Model);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.initialize=function(){return this.navigation=new C};return ar})();F=(function(){n(ar,Backbone.Model);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.defaults={thumbnailUrl:"",imageUrl:""};return ar})();aa=(function(){n(ar,Backbone.Collection);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.model=F;return ar})();L=(function(){n(ar,Backbone.Model);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.defaults={name:"",role:"",imageCollection:new aa()};ar.prototype.initialize=function(){return this.set({imageCollection:new aa(this.get("imageCollection"))})};return ar})();f=(function(){n(ar,Backbone.Collection);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.model=L;return ar})();window.app={};O=false;$(document).ready(function(){app.model=new ao;app.view=new p(window.layout||$("#main").attr("role"));return app.router=new B});$(window).load(function(){return O=true});B=(function(){n(ar,Backbone.Router);function ar(){this.defaultRoute=i(this.defaultRoute,this);this.select_subcategory=i(this.select_subcategory,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.pending=false;ar.prototype.routes={"":"defaultRoute",":id":"select_subcategory"};ar.prototype.initialize=function(){return Backbone.history.start({pushState:false})};ar.prototype.set_default_section=function(au,at){this.default_section=au;if(!this.pending||at){this.pending=this.default_section;return this.navigate(this.default_section)}};ar.prototype.on_app_loaded=function(){return this.trigger("prefade",app.router.pending)};ar.prototype.on_app_showing=function(){if(app.router.pending!==false){window.app.router.select_subcategory(app.router.pending)}this.trigger("ready",app.router.pending);return window.app.router.pending=false};ar.prototype.select_subcategory=function(au,at){if(!O){return this.pending=au}else{return this.trigger("change",au)}};ar.prototype.defaultRoute=function(){if(!O){return this.pending=""}else{return this.trigger("change","")}};return ar})();C=(function(){n(ar,Backbone.Collection);function ar(){this.current=i(this.current,this);this.previous=i(this.previous,this);this.next=i(this.next,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.model=an;ar.prototype.initialize=function(){};ar.prototype.createWithoutSaving=function(au){var at;at=new an(au);this.add(at);return at};ar.prototype.select=function(au){var at;if(this.length===0){return}au=au!=null?au:this.models[0].get("id");if((at=this.get(au))!=null){return this.each(i(function(av){return av.set({selected:av===at})},this))}};ar.prototype.next=function(){var at;at=1+this.models.indexOf(this.current());if(at>this.models.length-1){return false}window.app.router.navigate(this.at(at).get("id"),true);return true};ar.prototype.previous=function(){var at;at=this.models.indexOf(this.current())-1;if(at<0){return false}window.app.router.navigate(this.at(at).get("id"),true);return true};ar.prototype.current=function(){var at;at=null;this.each(i(function(au){if(au.get("selected")===true){return at=au}},this));return at};return ar})();an=(function(){n(ar,Backbone.Model);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.defaults={selected:false};return ar})();al=(function(){n(ar,Backbone.View);function ar(){this._on_navigation_change=i(this._on_navigation_change,this);this.on_scroll=i(this.on_scroll,this);this.on_load=i(this.on_load,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.touch=false;ar.prototype.initialize=function(){this.loaded=false;this.first_section_initialised=false;this.init_navigation();this.init_layout();this.model=app.model;this.model.navigation.bind("change:selected",this._on_navigation_change);$(window).load(this.on_load);if(false){this.num_scroll_items=this.model.navigation.length;return $(window).scroll(this.on_scroll)}};ar.prototype.on_load=function(){this.loaded=true;if(this.pending_navigation_model!=null){this._on_navigation_change(this.pending_navigation_model)}return delete this.pending_navigation_model};ar.prototype.on_scroll=function(aw){var av,au,at;av=window.pageYOffset/($("#scroller").height()-$(window).height());au=av*this.num_scroll_items;at=Math.floor(au);if(this.model.navigation.at(at)!==this.model.navigation.current()){return app.router.select_subcategory(this.model.navigation.at(at).id)}};ar.prototype.init_navigation=function(){};ar.prototype.init_layout=function(){return this};ar.prototype._on_navigation_change=function(at){if(this.loaded===false){this.pending_navigation_model=at;return false}if(at.get("selected")){this.on_navigate(at,this.first_section_initialised)}return this.first_section_initialised=true};return ar})();p=(function(){n(ar,Backbone.View);function ar(){this.on_load=i(this.on_load,this);this.on_resize=i(this.on_resize,this);this.on_scroll=i(this.on_scroll,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.el=$(window);ar.prototype.events={scroll:"on_scroll",resize:"on_resize",load:"on_load"};ar.prototype.initialize=function(av){var at,aw,au;this.layout_id=av;this.BODY=$("body");this.WINDOW=$("window");this.DOCUMENT=$("document");au=$("#sub-nav");at=au.find("li").length;if(at){aw=new t({el:au,model:app.model.navigation})}switch(this.layout_id){case"future-roots-day":new u;break;case"future-roots-gallery":new E;break;case"future-roots-video":new am;break;case"future-roots-photo":new g;break;case"future-roots-index":new w;break;case"contact":new Y;break;case"register":new N;break;case"stores":new m;break;case"history":new o}this.on_resize();return this.fix_png()};ar.prototype.on_scroll=function(){};ar.prototype.on_resize=function(){var at,au;at=parseInt(this.BODY.css("minHeight").replace("px",""));this.BODY.height((au=this.DOCUMENT.height()<at)!=null?au:{min:this.WINDOW.height()});return $(".stage").height(this.BODY.height())};ar.prototype.on_load=function(){this.fix_png();return setTimeout(i(function(){return window.scrollTo(0,1)},this),100)};ar.prototype.fix_png=function(){return this.BODY.supersleight()};return ar})();U=(function(){n(ar,Backbone.View);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.initialize=function(){};ar.prototype.show=function(){};ar.prototype.hide=function(){};return ar})();H=(function(){function ar(){this.LOADING=STR_LOADING;this.FORM_SENT=STR_FORM_SENT;this.FORM_ERROR=STR_FORM_ERROR;this.TITLE_THANK_YOU=STR_TITLE_THANK_YOU;this.SELECT_SUBJECT=STR_SELECT_SUBJECT;this.SELECT_REGION=STR_SELECT_REGION;this.SELECT_COUNTRY=STR_SELECT_COUNTRY;this.INTERNAL_SERVER_ERROR=STR_INTERNAL_SERVER_ERROR}return ar})();c=(function(){function ar(){}ar.prototype.format_uri=function(ay,ax,aw){var av,at,au;if(aw==null){aw=false}at=b;if(!aw){for(av in ax){au=ax[av];ay=ay.replace("{"+av+"}",""+au)}}at=b+ay;if(aw){ax.file=at}if(ae){if(aw){return D}else{return D+"?file="+at}}else{return at}if(ae){return D+at}else{return at}};ar.prototype.call=function(ax,aw,av,au){var at;if(au==null){au=false}ax=this.format_uri(ax,aw,au);if(au){return at=$.post(ax,aw,av).error(K.error)}else{$.ajax({type:"GET",url:ax,dataType:"xml",success:av,error:K.on_error});return;return at=$.get(ax,av).error(K.on_error)}};ar.prototype.get_countries=function(){var at;$("#country_selector").html("");at={idLang:W};return this.call(S,at,K.after_get_countries)};ar.prototype.get_regions_by_country=function(au){var at;$("#region_selector").html("");at={idLang:W,idCountry:au};return this.call(e,at,K.after_get_regions)};ar.prototype.get_subjects=function(){var at;$("#subject_selector").html("");at={idSite:X,idLang:W};return this.call(k,at,K.after_get_subjects)};ar.prototype.contact=function(at){K.before_post_form();return this.call(ad,at,K.after_post_form,true)};return ar})();K=(function(){function ar(){this.each_subject=i(this.each_subject,this);this.after_get_subjects=i(this.after_get_subjects,this);this.after_get_regions=i(this.after_get_regions,this);this.after_get_countries=i(this.after_get_countries,this);this.make_city_required=i(this.make_city_required,this);this.on_country_select=i(this.on_country_select,this);this.add_subject=i(this.add_subject,this);this.add_region=i(this.add_region,this);this.add_country=i(this.add_country,this);this.add_city=i(this.add_city,this);$("#country_selector").change(this.on_country_select);$("#country_selector, #region_selector, #subject_selector").css("visibility","hidden");$("#submit").css({cursor:"pointer"});$("#submit").mouseover(function(){return $(this).css({opacity:0.9})});$("#submit").mouseout(function(){return $(this).css({opacity:1})});$(document).keypress(function(at){if(at.which!==13){}});$("#submit").click(i(function(){return z.form.submit()},this))}ar.prototype.fix_dropdown_options=function(){return $(".advMenuUL").css("margin-top",-3)};ar.prototype.add_city=function(au,at){return $("#city_selector").append("<option value='"+au+"'>"+at+"</option>")};ar.prototype.add_country=function(au,at){return $("#country_selector").append("<option value='"+au+"'>"+at+"</option>")};ar.prototype.add_region=function(au,at){return $("#region_selector").append("<option value='"+au+"'>"+at+"</option>")};ar.prototype.add_subject=function(au,at){return $("#subject_selector").append("<option value='"+au+"'>"+at+"</option>")};ar.prototype.on_error=function(){return alert("some problem ocurred")};ar.prototype.on_country_select=function(){if(this.is_city_required()){this.make_city_required()}return c.get_regions_by_country($("#country_selector").val())};ar.prototype.is_city_required=function(){return parseInt($("#country_selector").val())===s};ar.prototype.make_city_required=function(){if(String($('[for="city"]').html()).indexOf("*")===-1){return $('[for="city"]').append("*")}};ar.prototype.after_get_countries=function(at){$("#country_selector").css("visibility","visible");this.add_country("",H.SELECT_COUNTRY);$(at).find("country").each(i(function(av,aw){var ax,au;ax=$(aw).find("id").text();au=$(aw).find("name").text();return this.add_country(ax,au)},this));$("#country_selector").MyDropdown({lineHeight:20,max_height:200,container:$("#country_box")}).find(".genHeader").attr("for","custom_idCountry");return this.fix_dropdown_options()};ar.prototype.after_get_regions=function(at){$("#region_selector").css("visibility","visible");this.add_region("",H.SELECT_REGION);$(at).find("region").each(i(function(av,aw){var ax,au;ax=$(aw).find("id").text();au=$(aw).find("name").text();return this.add_region(ax,au)},this));$("#region_box").html(" ");$("#region_selector").MyDropdown({lineHeight:20,max_height:200,container:$("#region_box")}).find(".genHeader").attr("for","custom_idRegion");this.fix_dropdown_options();if($("#region_label").css("visibility")!=="visible"){return $("#region_label").css("visibility","visible")}};ar.prototype.after_get_subjects=function(at){$("#subject_selector").css("visibility","visible");this.add_subject("",H.SELECT_SUBJECT);$(at).find("subject").each(this.each_subject);$("#subject_selector").MyDropdown({lineHeight:20,max_height:200,container:$("#subject_box")}).find(".genHeader").attr("for","custom_idSubject");return this.fix_dropdown_options()};ar.prototype.each_subject=function(au,av){var aw,at;aw=$(av).find("id").text();at=$(av).find("name").text();return this.add_subject(aw,at)};ar.prototype.before_post_form=function(){$("#submit").unbind("click");$("#submit .send").css({display:"none"});$("#submit .sending").css({display:""});$("#submit").css({cursor:""});$("#submit").css({opacity:1});$("#submit").unbind("mouseover");return $("#submit").unbind("mouseout")};ar.prototype.after_post_form=function(av,at,au){if(au.status===201){$("#submit .sending").html(H.FORM_SENT);$("#wrapper-form").fadeOut();$("#wrapper-success").delay(400).fadeIn();return $("#title").html(H.TITLE_THANK_YOU)}else{return $("#submit .sending").html(H.FORM_ERROR)}};return ar})();z=(function(){function ar(){this.on_submit=i(this.on_submit,this);this.form=$("#form");this.form.submit(this.on_submit)}ar.prototype.on_submit=function(){var at;at={idSite:X,idLang:W,name:$('[name="name"]').val(),surname:$('[name="surname"]').val(),email:$('[name="email"]').val(),gender:$('[name="gender"]:checked').val(),idCountry:$('[name="idCountry"]').val(),idRegion:$('[name="idRegion"]').val(),idSubject:$('[name="idSubject"]').val(),message:$('[name="message"]').val(),privacy:$('[name="privacy"]:checked').val()||false,company:$('[name="company"]').val(),phone:$('[name="phone"]').val(),city:$('[name="city"]').val(),address:"",zipCode:""};G.reset();if(G.is_empty(at.name)){G.invalidate("name")}else{G.validate("name")}if(G.is_empty(at.surname)){G.invalidate("surname")}else{G.validate("surname")}if(!G.is_email(at.email)){G.invalidate("email")}else{G.validate("email")}if(G.is_empty(at.gender)){G.invalidate("gender")}else{G.validate("gender")}if(G.is_empty(at.idSubject)){G.invalidate("idSubject")}else{G.validate("idSubject")}if(K.is_city_required()){if(G.is_empty(at.city)){G.invalidate("city")}else{G.validate("city")}}if(G.is_empty(at.idCountry)){G.invalidate("idCountry")}else{G.validate("idCountry")}if(G.is_empty(at.idRegion)){G.invalidate("idRegion")}else{G.validate("idRegion")}if(G.is_empty(at.message)){G.invalidate("message")}else{G.validate("message")}if(!at.privacy){G.invalidate("privacy")}else{G.validate("privacy")}if(G.valid){c.contact(at)}return false};return ar})();G=(function(){ar.prototype.INVALID_COLOR="#FF000C";ar.prototype.VALID_COLOR="#FFFFFF";ar.prototype.valid=true;function ar(){this.reset=i(this.reset,this);window.error=this.error}ar.prototype.reset=function(){this.valid=true;$(".error-messages").hide();if($(".error-messages").find('[class!="invisible"]').length){return $(".error-messages").find('[class!="invisible"]').addClass("invisible")}};ar.prototype.error=function(at){if(!$(".error-messages").find('[class!="invisible"]').length){$(".error-messages").find('[for="'+at+'"]').toggleClass("invisible");return $(".error-messages").fadeIn()}};ar.prototype.is_empty=function(at){return $.trim(at).length===0};ar.prototype.is_email=function(at){var au;au=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return au.test(at)};ar.prototype.is_date=function(aw,au,at){var av;at=Number(at);au=Number(au)-1;aw=Number(aw);av=new Date(aw,au,at);return av.getFullYear()===aw&&av.getMonth()===au&&at===av.getDate()};ar.prototype.invalidate=function(au){var at;$('[for="'+au+'"]').css({color:this.INVALID_COLOR});if(false){$('[name="'+au+'"]').css({border:"1px solid "+this.INVALID_COLOR});at=$('[for="custom_'+au+'"]');if(at){at.css({border:"1px solid "+this.INVALID_COLOR})}}this.error(au);return this.valid=false};ar.prototype.validate=function(at){$('[name="'+at+'"]').css({border:1});return $('[for="'+at+'"]').css({color:this.VALID_COLOR})};return ar})();Y=(function(){n(ar,al);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.init_layout=function(){H=new H;G=new G;c=new c;z=new z;K=new K;c.get_countries();return c.get_subjects()};return ar})();t=(function(){n(ar,Backbone.View);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.el=$("#sub-nav");ar.prototype.initialize=function(){return false};return ar})();af=(function(){n(ar,Backbone.View);function ar(){this.onChange=i(this.onChange,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.events={click:"clicked"};ar.prototype.initialize=function(){return false;this.model.bind("change:selected",this.onChange);return this.onChange(this.model)};ar.prototype.clicked=function(at){$(at).preventDefault();return app.router.navigate(this.model.get("id"),true)};ar.prototype.onChange=function(at){if(at.get("selected")){return $(this.el).addClass("selected")}else{return $(this.el).removeClass("selected")}};ar.prototype.render=function(){$(this.el).html(this.template({name:this.model.get("name").toUpperCase(),id:this.model.get("id")}));return this};ar.prototype.close=function(){return this};return ar})();E=(function(){n(ar,al);function ar(){this.onThumbnailOut=i(this.onThumbnailOut,this);this.onThumbnailOver=i(this.onThumbnailOver,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.thumbnailOpacityOver=1;ar.prototype.thumbnailOpacityOut=0.4;ar.prototype.init_layout=function(){var at;this.thumbnails=$(".imageTile");this.thumbnails.bind("mouseenter",this.onThumbnailOver);this.thumbnails.bind("mouseleave",this.onThumbnailOut);$("img",this.thumbnails).css("opacity",this.thumbnailOpacityOut);at=$(".over");at.css({opacity:0});return at.css({visibility:"visible"})};ar.prototype.onThumbnailOver=function(at){$(".over",at.currentTarget).stop().animate({opacity:1},250);return $("img",at.currentTarget).stop().animate({opacity:this.thumbnailOpacityOver},250)};ar.prototype.onThumbnailOut=function(at){$(".over",at.currentTarget).stop().animate({opacity:0},250);return $("img",at.currentTarget).stop().animate({opacity:this.thumbnailOpacityOut},250)};ar.prototype.on_navigate=function(at){return this};return ar})();u=(function(){n(ar,al);function ar(){this.onThumbnailOut=i(this.onThumbnailOut,this);this.onThumbnailOver=i(this.onThumbnailOver,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.thumbnails=null;ar.prototype.currentSlug="";ar.prototype.init_layout=function(){var aw,av,ay,au,ax,at;this.thumbnails=$(".tile");this.thumbnails.bind("mouseenter",this.onThumbnailOver);this.thumbnails.bind("mouseleave",this.onThumbnailOut);aw=$(".over");aw.css({opacity:0});aw.css({visibility:"visible"});ax=this.thumbnails;at=[];for(ay=0,au=ax.length;ay<au;ay++){av=ax[ay];at.push(this.animateThumbnail(av,false))}return at};ar.prototype.onThumbnailOver=function(at){this.currentSlug=$(at.currentTarget).attr("data-slug");return this.animateAllThumbnails(true)};ar.prototype.onThumbnailOut=function(at){this.currentSlug="";return this.animateAllThumbnails(false)};ar.prototype.animateAllThumbnails=function(ay){var av,ax,au,aw,at;aw=this.thumbnails;at=[];for(ax=0,au=aw.length;ax<au;ax++){av=aw[ax];at.push(this.animateThumbnail(av,ay))}return at};ar.prototype.animateThumbnail=function(au,ax){var az,aB,av,ay,at,aA,aw;at=$(au).attr("data-slug");aB=$(".name",au);ay=$(".profession",au);av=$(".over",au);aA=$(".thumbnail",au);az=$(".arrow",au);aw=$(".over-watch",au);if(ax){if(at===this.currentSlug){this.fadeObject(av,1);this.fadeObject(aB,0);this.fadeObject(ay,0);this.fadeObject(aA,1);this.fadeObject(az,1);return this.fadeObject(aw,1)}else{this.fadeObject(av,0);this.fadeObject(aB,0);this.fadeObject(ay,0);this.fadeObject(aA,0.5);this.fadeObject(az,0);return this.fadeObject(aw,0)}}else{this.fadeObject(av,0);this.fadeObject(aB,1);this.fadeObject(ay,1);this.fadeObject(aA,1);this.fadeObject(az,0);return this.fadeObject(aw,0)}};ar.prototype.fadeObject=function(au,at){if(au.css("opacity")!==at){return au.stop().fadeTo(250,at)}};ar.prototype.on_navigate=function(at){return this};return ar})();w=(function(){n(ar,al);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.init_layout=function(){return this.bgs=new d()};ar.prototype.on_navigate=function(at){return this};return ar})();d=(function(){n(ar,al);function ar(){this.onMenuClick=i(this.onMenuClick,this);this.onNavigationChange=i(this.onNavigationChange,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.current=null;ar.prototype.next=null;ar.prototype.initialize=function(){$(".bg-future-roots").hide();this.current=$(".bg-future-roots:first");this.current.show();this.current.css("height","100%");this.createMenu();this.setupMenu();$(".level2 a:first").addClass("selected");return $(".future-roots-info a").bind("click",function(){return Hogan.submenu.stopscroll})};ar.prototype.createMenu=function(){var av,ax,au,aw,at;$("li","#sub-nav").remove();aw=$(".bg-future-roots");at=[];for(ax=0,au=aw.length;ax<au;ax++){av=aw[ax];at.push($("ul","#sub-nav").append('<li id="'+$(av).attr("id").substr(1)+'"><a href="#'+$(av).attr("id").substr(1)+'" >'+$(av).attr("data-label")+"</a></li>"))}return at};ar.prototype.setupMenu=function(){$(i(function(){window.app.router.bind("ready",this.onNavigationChange);return window.app.router.bind("change",this.onNavigationChange)},this));return $(window).load(i(function(){return setTimeout(i(function(){window.Hogan.submenu.autoscroll(true,3000);return window.Hogan.submenu.setReadyToScroll()},this),250)},this))};ar.prototype.onNavigationChange=function(at){this.next=$("#_"+at);if(this.next.attr("id")===this.current.attr("id")){return}this.next.parent().append(this.next);this.next.parent().append(this.current);this.next.show();this.next.css("height","100%");this.current.slideUp(1200,function(){return window.Hogan.submenu.setReadyToScroll()});return this.current=this.next};ar.prototype.onMenuClick=function(at){var au;at.preventDefault();$(".level2 a").removeClass("selected");$(at.currentTarget).addClass("selected");au=$(at.currentTarget).parent().attr("id");this.next=$("#_"+$(at.currentTarget).parent().attr("id"));if(this.next.attr("id")===this.current.attr("id")){return}this.next.parent().append(this.next);this.next.parent().append(this.current);this.next.show();this.next.css("height","100%");this.current.slideUp(1200);return this.current=this.next};return ar})();g=(function(){n(ar,al);function ar(){this.onNavigate=i(this.onNavigate,this);this.onNextClicked=i(this.onNextClicked,this);this.onPrevClicked=i(this.onPrevClicked,this);this.start=i(this.start,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.photoIndex=0;ar.prototype.init_layout=function(){this.photoView=new ai({model:new aq({title:window.photos.title})});this.photoView.bind(this.photoView.EVENT_PREV_CLICKED,this.onPrevClicked);this.photoView.bind(this.photoView.EVENT_NEXT_CLICKED,this.onNextClicked);$("#stage").append(this.photoView.el);return setTimeout(this.start,100)};ar.prototype.start=function(){var at;app.router.bind("change",this.onNavigate);at=window.location.hash.substring(1);if(at==="last"){at=window.photos.array.length-1}return this.onNavigate(at)};ar.prototype.onPrevClicked=function(){if(this.photoIndex===0){if($("#prev-link").length>0){document.location=$("#prev-link").text()}else{this.navigate(window.photos.array.length-1)}return}return this.navigate(this.photoIndex-1)};ar.prototype.onNextClicked=function(){if(this.photoIndex===(window.photos.array.length-1)){if($("#next-link").length>0){document.location=$("#next-link").text()}else{this.navigate(0)}return}return this.navigate(this.photoIndex+1)};ar.prototype.navigate=function(at){return app.router.navigate(String(at),true)};ar.prototype.onNavigate=function(au){var at;window._gaq.push(["_trackPageview",window.location.pathname.split(".html").join("/"+window.location.hash.substr(1)+".html")]);at=parseInt(au);if(at>=0){this.photoIndex=at}return this.photoView.model.set({image:window.photos.array[this.photoIndex]})};ar.prototype.on_navigate=function(at){return this};return ar})();ai=(function(){n(ar,Backbone.View);function ar(){this.onArrowClick=i(this.onArrowClick,this);this.show=i(this.show,this);this.onLoaded=i(this.onLoaded,this);this.render=i(this.render,this);this.onResize=i(this.onResize,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.EVENT_PREV_CLICKED="EVENT_PREV_CLICKED";ar.prototype.EVENT_NEXT_CLICKED="EVENT_NEXT_CLICKED";ar.prototype.prevEnabled=true;ar.prototype.nextEnabled=true;ar.prototype.events={"click img":"onArrowClick"};ar.prototype.initialize=function(){this.model.bind("change",this.render,this);this.template=_.template($("#template_photo").html());$(this.el).addClass("slideshow");$(this.el).append(this.template({title:this.model.get("title").toUpperCase()}));this.img=$("<img>");this.img.bind("load",this.onLoaded);$(window).resize(this.onResize);this.onResize();return $(this.el).hide()};ar.prototype.onResize=function(){var au,av,aw,aB,aA,az,ax,ay,at;az=$(window).width();aw=$(window).height();aB=Math.max(aw-220,250);this.img.height(aB);aA=this.img.width();$(this.el).css("position","absolute");$(this.el).height(aB);$(this.el).width(aA);$(this.el).css("top",120);$(this.el).css("left",(1024-aA)*0.5);av=14;au=24;this.enabledArrow($("#arrow_prev"),this.prevEnabled);this.enabledArrow($("#arrow_next"),this.nextEnabled);$("#photo").css("width",aA);$("#photo").css("height",aB);at=parseInt($(this.el).css("padding-top").split("px").join(""));ay=Math.round(at+aB*0.5-au*0.5);$("#arrow_prev").css("top",ay);$("#arrow_next").css("top",ay);ax=20;$("#arrow_prev").css("margin-left",-Math.round(ax+aA*0.5+av));return $("#arrow_next").css("margin-left",+Math.round(ax+aA*0.5))};ar.prototype.render=function(){$("#photo").append(this.img);$(this.el).stop().animate({opacity:0},250,i(function(){return this.img.attr("src",this.model.get("image"))},this));return this};ar.prototype.onLoaded=function(){$(this.el).show();return this.show()};ar.prototype.show=function(){if(this.img.width()===0){setTimeout(this.show,100);return}this.onResize();return $(this.el).stop().animate({opacity:1},250)};ar.prototype.enabledArrow=function(au,at){au.css("visibility","visible");if(at){au.css("opacity",1);return au.css("cursor","pointer")}else{au.css("opacity",0);return au.css("cursor","auto")}};ar.prototype.onArrowClick=function(at){if($(at.currentTarget).attr("id")==="arrow_prev"){return this.trigger(this.EVENT_PREV_CLICKED)}else{return this.trigger(this.EVENT_NEXT_CLICKED)}};return ar})();aq=(function(){n(ar,Backbone.Model);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.defaults={title:"",image:""};return ar})();am=(function(){n(ar,al);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.init_layout=function(){return this.videoView=new Z()};ar.prototype.on_navigate=function(at){return this};return ar})();Z=(function(){n(ar,Backbone.View);function ar(){this.on_resize=i(this.on_resize,this);ar.__super__.constructor.apply(this,arguments)}ar.prototype.el=$(".slideshow");ar.prototype.initialize=function(){$(window).resize(this.on_resize);this.on_resize();return setTimeout(this.on_resize,100)};ar.prototype.on_resize=function(){var av,aw,ax,aD,au,aC,az,ay,aA,aB,at;aB=800;aA=450;aw=14;av=24;ax=Math.max($(window).height()-220,250);ay=ax/aA;aD=aA*ay;at=aB*ay;if(at>940){ay=940/aB;aD=aA*ay;at=aB*ay}$("#video").width(at).height(aD);$("#video").css("position","absolute");$("#video").css("top",Math.max(ax-aD,110));$("#video").css("marginLeft",(940-at)/2);if(!$("#arrow_next").length&&!$("#arrow_prev").length){au=($("#video").parent().width()-$("#video").width())/2}$("#video").css("margin-left",au);az=parseInt($("#video").css("top"),10)+aD*0.5-av*0.5;aC=20;if($("#arrow_prev").length){$("#arrow_prev").css("top",az);$("#arrow_prev").css("margin-left",-Math.round(aC+at*0.5+aw+4));$("#video").css("left",40)}if($("#arrow_next").length){$("#arrow_next").css("top",az);$("#arrow_next").css("margin-left",+Math.round(aC+at*0.5));$("#video").css("left",40)}if($(".video-js").length){$(".video-js").width(at).height(aD);$("#poster_image").width(at).height(aD);$(".vjs-poster").width(at).height(aD);return $("#flash_fallback_1").width(at).height(aD)}};return ar})();P=11701;P="12601,12217";M=LANGUAGE_ID;q=(function(){function ar(){this.LOADING=STRL_LOADING;this.SELECT_COUNTRY=STR_SELECT_COUNTRY;this.SELECT_COUNTRY_OPTION=STR_SELECT_COUNTRY_OPTION;this.SELECT_CITY=STR_SELECT_CITY;this.SELECT_ALL_OPTIONS=STR_SELECT_ALL_OPTIONS}return ar})();T=(function(){function ar(){}ar.prototype.COLLAPSED_BOX=62;ar.prototype.EXPANDED_BOX=115;ar.prototype.ITALY_ID=105;return ar})();ag=(function(){function ar(){this.get_stores_by_country=i(this.get_stores_by_country,this)}ar.prototype.format_uri=function(ax,aw){var av,at,au;at=b;for(av in aw){au=aw[av];ax=ax.replace("{"+av+"}",""+au)}at=b+ax;if(ae){return D+"?file="+at}};ar.prototype.call=function(av,au,at){av=this.format_uri(av,au);return $.ajax({type:"GET",url:av,dataType:"xml",success:at,error:I.on_error})};ar.prototype.get_countries=function(){var at;$("#country_selector").html("");at={idLang:M,arrayBrand:ak};return this.call(A,at,I.after_get_countries)};ar.prototype.get_stores_by_country=function(aw){var at,av,au;I.collapse_city_box();au={idCountry:aw,idLang:M,arrayBrand:ak};at=i(function(ax){return i(function(ay){return I.after_get_stores(ay,ax)},this)},this);av=at($("#country_selector").val());return this.call(R,au,av)};return ar})();I=(function(){function ar(){this.after_get_stores=i(this.after_get_stores,this);this.after_get_countries=i(this.after_get_countries,this);this.on_city_select=i(this.on_city_select,this);this.on_country_select=i(this.on_country_select,this);this.collapse_city_box=i(this.collapse_city_box,this);this.expand_city_box=i(this.expand_city_box,this);this.add_country=i(this.add_country,this);this.add_city=i(this.add_city,this);$("#country_title").text(q.LOADING);$("#city_title").text(q.SELECT_CITY);$("#country_selector").hide();$("#city_box").hide();$("#country_selector").change(this.on_country_select);$("#city_selector").change(this.on_city_select)}ar.prototype.add_city=function(au,at){if(at.length>20){return}return $("#city_selector").append("<option value='"+au+"'>"+at+"</option>")};ar.prototype.add_country=function(au,at){return $("#country_selector").append("<option value='"+au+"'>"+at+"</option>")};ar.prototype.expand_city_box=function(){$("#selector").animate({height:T.EXPANDED_BOX});return $("#city_box").delay(400).fadeIn()};ar.prototype.collapse_city_box=function(){$("#city_box").fadeOut();return $("#selector").animate({height:T.COLLAPSED_BOX})};ar.prototype.on_error=function(at){return this};ar.prototype.on_country_select=function(){v.reset();return ag.get_stores_by_country($("#country_selector").val())};ar.prototype.on_city_select=function(){return v.filter($("#city_selector").val())};ar.prototype.after_get_countries=function(at){$("#country_title").text(q.SELECT_COUNTRY);this.add_country("",q.SELECT_COUNTRY_OPTION);$(at).find("country").each(i(function(av,aw){var ax,au;ax=$(aw).find("id").text();au=$(aw).find("name").text();return this.add_country(ax,au)},this));$("#selector").animate({height:T.COLLAPSED_BOX});$("#country_selector").MyDropdown({lineHeight:20,container:$("#custom_country_selector")});return $("#country_box").css("z-index",30)};ar.prototype.after_get_stores=function(at,av){var au;av=parseInt(av);$("#map_overlay").fadeOut();$("#city_selector").html("");au=[];$(at).find("store").each(function(aw,ax){au.push($(ax).find("city").text());return v.add(ax,av)});if(av===T.ITALY_ID){v.manager=new MarkerManager(v.map,null,true);google.maps.event.addListener(v.manager,"loaded",i(function(){var aw;aw=_.pluck(v.items,"marker");v.manager.addMarkers(aw,7);return v.manager.addMarkers(v.get_fake_italy_markers(),0,6)},this))}v.filter(q.SELECT_ALL_OPTIONS);au=_.unique(au);au.sort();if(au.length>1){this.expand_city_box();this.add_city(q.SELECT_ALL_OPTIONS,q.SELECT_ALL_OPTIONS);$(au).each(i(function(ax,aw){return this.add_city(aw,aw)},this))}else{this.collapse_city_box()}$("#custom_city_selector").html(" ");return $("#city_selector").MyDropdown({lineHeight:20,max_height:300,container:$("#custom_city_selector")})};return ar})();v=(function(){function ar(at){this.on_fakemarker_click=i(this.on_fakemarker_click,this);this.get_fake_italy_markers=i(this.get_fake_italy_markers,this);this.filter=i(this.filter,this);this.fit=i(this.fit,this);this.unselect_marker=i(this.unselect_marker,this);this.on_marker_click=i(this.on_marker_click,this);this.add=i(this.add,this);this.on_zoom_change=i(this.on_zoom_change,this);this.reset=i(this.reset,this);var au;this.items=[];this.selected=null;au={zoom:3,center:new google.maps.LatLng(46.652254049659504,52.09984468984385),mapTypeId:google.maps.MapTypeId.ROADMAP};this.map=new google.maps.Map(document.getElementById("map_canvas"),au);this.icon=new google.maps.MarkerImage(URL_PUBLIC+"public/themes/hogan/images/stores/pin.png",null,null,new google.maps.Point(31,33));this.zoom_to=0;google.maps.event.addListener(this.map,"zoom_changed",i(function(){clearInterval(this.zoom_to);return this.zoom_to=setTimeout(this.on_zoom_change,300)},this))}ar.prototype.reset=function(){this.unselect_marker();this.selected=null;if(this.items!==null){_.each(this.items,function(at){return at.marker.setMap(null)})}return this.items=[]};ar.prototype.on_zoom_change=function(at){if(this.map.getZoom()<7){this.unselect_marker()}if(parseInt($("#country_selector").val())===T.ITALY_ID){if(this.map.getZoom()<7&&$("#city_selector").val()!==q.SELECT_ALL_OPTIONS){$("#custom_city_selector li").eq(0).click()}}if(ar.manager!=null){return ar.manager.refresh()}};ar.prototype.add=function(aw,ay){var av,ax,au,at;aw=$(aw);ax={id:aw.find("id").text(),city:aw.find("city").text()||"",name:String(aw.find("name").text()).toUpperCase(),brands:String(aw.find("brands").text()).toUpperCase(),address:aw.find("address").text(),phone:aw.find("phone").text()||null,email:aw.find("email").text()||null};ax.position=new google.maps.LatLng($(aw.find("coordinates latitiude")).text(),$(aw.find("coordinates longitude")).text());at=new google.maps.Marker({title:$(ax.brands).text(),position:ax.position,icon:this.icon});if(ay!==T.ITALY_ID){at.setMap(this.map)}av='<div style="color: black;"><br />';av+="<b>"+ax.brands+", "+String(ax.city).toUpperCase()+"</b> <br />";av+=ax.address+"<br />";if(ax.email!=null){av+="<a href='mailto:data.email'>"+ax.email+"</a><br />"}if(ax.phone!=null){av+=ax.phone+"<br /><br />"}av+="</div>";au={data:ax,marker:at,window:new google.maps.InfoWindow({content:av})};this.items.push(au);return google.maps.event.addListener(at,"click",i(function(){return this.on_marker_click(au)},this))};ar.prototype.on_marker_click=function(at){this.unselect_marker();this.selected=at;return at.window.open(this.map,at.marker)};ar.prototype.unselect_marker=function(){$.each(this.items,function(at,au){return au.window.close()});return this.selected=null};ar.prototype.fit=function(ax){var at,av,aw,aA,ay,az,au,aB;if(ax.length===1){av=ax[0];at=new google.maps.LatLngBounds(av.data.position,av.data.position);this.map.panTo(av.data.position);this.map.fitBounds(at);this.map.setZoom(Math.round(this.map.getZoom()*0.7))}if(ax.length>1){ax=_.pluck(ax,"data");ax=_.pluck(ax,"position");aw=_.invoke(ax,"lat");aA=_.invoke(ax,"lng");ay={lat:_.max(aw),lng:_.max(aA)};au={lat:_.min(aw),lng:_.min(aA)};az={lat:(ay.lat-au.lat)/2+au.lat,lng:(ay.lng-au.lng)/2+au.lng};au=new google.maps.LatLng(au.lat,au.lng);ay=new google.maps.LatLng(ay.lat,ay.lng);at=new google.maps.LatLngBounds(au,ay);aB={strokeColor:"#FF0000",strokeOpacity:0.8,strokeWeight:2,fillColor:"#CF0",fillOpacity:0.35,map:this.map,bounds:at};this.map.fitBounds(at);this.map.panTo(at.getCenter());return this.map.setZoom(Math.round(this.map.getZoom()*0.95))}};ar.prototype.filter=function(au){var at,av;this.unselect_marker();at=[];$(this.items).each(i(function(aw,ax){if(ax.data.city===au||au===q.SELECT_ALL_OPTIONS){ax.marker.setVisible(true);return at.push(ax)}else{ax.window.close();return ax.marker.setVisible(false)}},this));if(at.length){av=at[0];this.map.panTo(av.data.position)}if(at.length===1){this.on_marker_click(av)}return this.fit(at)};ar.prototype.get_fake_italy_markers=function(){var at;at=[];at.push(new google.maps.Marker({position:new google.maps.LatLng(41.197522931035024,13.941506975000038),icon:this.icon}));at.push(new google.maps.Marker({position:new google.maps.LatLng(45.118598652527275,10.030374162500038),icon:this.icon}));at.push(new google.maps.Marker({position:new google.maps.LatLng(40.29890434260258,9.338235490625038),icon:this.icon}));at.push(new google.maps.Marker({position:new google.maps.LatLng(38.07674339247006,13.364482924999947),icon:this.icon}));$.each(at,i(function(av,au){return google.maps.event.addListener(au,"click",i(function(){return this.on_fakemarker_click(au)},this))},this));return at};ar.prototype.on_fakemarker_click=function(at){this.unselect_marker();this.map.setCenter(at.getPosition());return this.map.setZoom(7)};return ar})();m=(function(){n(ar,al);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.init_layout=function(){T=new T;q=new q;I=new I;ag=new ag;ag.get_countries();return v=new v};return ar})();X=19535;W=LANGUAGE_ID;J="Y";D=URL_PUBLIC+"rest/proxy.php";ae=true;b="http://service.todsgroup.com/tods-portal-rest";Q="/user-mailing-list";ad="/contact";S="/countries?idLang={idLang}";A="/store-countries/{arrayBrand}?idLang={idLang}";R="/countries/{idCountry}/stores/{arrayBrand}?idLang={idLang}";e="/countries/{idCountry}/regions?idLang={idLang}";aj="/occupations?idLang={idLang}";k="/sites/{idSite}/subjects?idLang={idLang}";s=45;ak=11701;ak="12601,12217";r=(function(){function ar(){this.LOADING=STR_LOADING;this.FORM_SENT=STR_FORM_SENT+" !";this.FORM_ERROR=STR_FORM_ERROR;this.TITLE_THANK_YOU=STR_TITLE_THANK_YOU;this.SELECT_OCCUPATION=STR_SELECT_OCCUPATION;this.SELECT_REGION=STR_SELECT_REGION;this.SELECT_COUNTRY=STR_SELECT_COUNTRY}return ar})();ah=(function(){function ar(){}ar.prototype.format_uri=function(ay,ax,aw){var av,at,au;if(aw==null){aw=false}at=b;if(!aw){for(av in ax){au=ax[av];ay=ay.replace("{"+av+"}",""+au)}}at=b+ay;if(aw){ax.file=at}if(ae){if(aw){return D}else{return D+"?file="+at}}else{return at}};ar.prototype.call=function(ax,aw,av,au){var at;if(au==null){au=false}ax=this.format_uri(ax,aw,au);if(au){return at=$.post(ax,aw,av).error(V.error)}else{$.ajax({type:"GET",url:ax,dataType:"xml",success:av,error:V.on_error});return;return at=$.get(ax,av).error(V.on_error)}};ar.prototype.get_countries=function(){var at;$("#country_selector").html("");at={idLang:W};return this.call(S,at,V.after_get_countries)};ar.prototype.get_regions_by_country=function(au){var at;$("#region_selector").html("");at={idLang:W,idCountry:au};return this.call(e,at,V.after_get_regions)};ar.prototype.get_occupations=function(au){var at;$("#occupation_selector").html("");at={idLang:W};return this.call(aj,at,V.after_get_occupations)};ar.prototype.subscribe=function(at){V.before_post_form();return this.call(Q,at,V.after_post_form,true)};return ar})();V=(function(){function ar(){this.after_get_occupations=i(this.after_get_occupations,this);this.after_get_regions=i(this.after_get_regions,this);this.after_get_countries=i(this.after_get_countries,this);this.make_city_required=i(this.make_city_required,this);this.on_country_select=i(this.on_country_select,this);this.add_occupation=i(this.add_occupation,this);this.add_region=i(this.add_region,this);this.add_country=i(this.add_country,this);this.add_city=i(this.add_city,this);$("#country_selector").change(this.on_country_select);$("#submit").click(i(function(){return j.form.submit()},this));$("#country_selector, #region_selector, #occupation_selector").css("visibility","hidden");$("#submit").css({cursor:"pointer"});$("#submit").mouseover(function(){return $(this).css({opacity:0.9})});$("#submit").mouseout(function(){return $(this).css({opacity:1})});$(document).keypress(function(at){if(at.which!==13){}})}ar.prototype.fix_dropdown_options=function(){return $(".advMenuUL").css("margin-top",-3)};ar.prototype.add_city=function(au,at){return $("#city_selector").append("<option value='"+au+"'>"+at+"</option>")};ar.prototype.add_country=function(au,at){return $("#country_selector").append("<option value='"+au+"'>"+at+"</option>")};ar.prototype.add_region=function(au,at){return $("#region_selector").append("<option value='"+au+"'>"+at+"</option>")};ar.prototype.add_occupation=function(au,at){return $("#occupation_selector").append("<option value='"+au+"'>"+at+"</option>")};ar.prototype.on_error=function(){return alert("some problem ocurred")};ar.prototype.on_country_select=function(){if(this.is_city_required()){this.make_city_required()}return ah.get_regions_by_country($("#country_selector").val())};ar.prototype.is_city_required=function(){return parseInt($("#country_selector").val())===s};ar.prototype.make_city_required=function(){if(String($('label[for="city"]').html()).indexOf("*")===-1){return $('label[for="city"]').append("*")}};ar.prototype.after_get_countries=function(at){$("#country_selector").css("visibility","visible");this.add_country("",r.SELECT_COUNTRY);$(at).find("country").each(i(function(av,aw){var ax,au;ax=$(aw).find("id").text();au=$(aw).find("name").text();return this.add_country(ax,au)},this));$("#country_selector").MyDropdown({lineHeight:20,max_height:200,container:$("#country_box")}).find(".genHeader").attr("for","custom_idCountry");return this.fix_dropdown_options()};ar.prototype.after_get_regions=function(at){$("#region_selector").css("visibility","visible");this.add_region("",r.SELECT_REGION);$(at).find("region").each(i(function(av,aw){var ax,au;ax=$(aw).find("id").text();au=$(aw).find("name").text();return this.add_region(ax,au)},this));$("#region_box").html(" ");$("#region_selector").MyDropdown({lineHeight:20,max_height:200,container:$("#region_box")}).find(".genHeader").attr("for","custom_idRegion");this.fix_dropdown_options();if($("#region_label").css("visibility")!=="visible"){return $("#region_label").css("visibility","visible")}};ar.prototype.after_get_occupations=function(at){$("#occupation_selector").css("visibility","visible");this.add_occupation("",r.SELECT_OCCUPATION);$(at).find("occupation").each(i(function(av,aw){var ax,au;ax=$(aw).find("id").text();au=$(aw).find("name").text();return this.add_occupation(ax,au)},this));$("#occupation_selector").MyDropdown({lineHeight:20,container:$("#occupation_box")}).find(".genHeader").attr("for","custom_idOccupation");return this.fix_dropdown_options()};ar.prototype.before_post_form=function(){$("#submit").unbind("click");$("#submit .send").css({display:"none"});$("#submit .sending").css({display:""});$("#submit").css({cursor:""});$("#submit").css({opacity:1});$("#submit").unbind("mouseover");return $("#submit").unbind("mouseout")};ar.prototype.after_post_form=function(av,at,au){if(au.status===201){$("#wrapper-form").fadeOut();$("#wrapper-success").delay(400).fadeIn();$("#title").html(r.TITLE_THANK_YOU);return window._gaq.push(["_trackEvent","Newletter","register-success"])}else{window._gaq.push(["_trackEvent","Newletter","register-fail"]);return $("#submit .sending").html(r.FORM_ERROR)}};return ar})();j=(function(){function ar(){this.on_submit=i(this.on_submit,this);this.form=$("#form");this.form.submit(this.on_submit)}ar.prototype.on_submit=function(){var at;at={idSite:X,idLang:W,name:$('[name="name"]').val(),surname:$('[name="surname"]').val(),email:$('[name="email"]').val(),gender:$('[name="gender"]:checked').val(),idCountry:$('[name="idCountry"]').val(),idRegion:$('[name="idRegion"]').val(),privacy:$('[name="privacy"]:checked').val()||false,mailingList:$('[name="subscribe"]:checked').val()||"N",privacyMarketing:$('[name="subscribe"]:checked').val()||"N",privacyProfiling:$('[name="subscribe"]:checked').val()||"N",city:$('[name="city"]').val(),zipCode:$('[name="zipCode"]').val()};a.reset();if(a.is_empty(at.name)){a.invalidate("name")}else{a.validate("name")}if(a.is_empty(at.surname)){a.invalidate("surname")}else{a.validate("surname")}if(!a.is_email(at.email)){a.invalidate("email")}else{a.validate("email")}if(a.is_empty(at.gender)){a.invalidate("gender")}else{a.validate("gender")}if(V.is_city_required()){if(a.is_empty(at.city)){a.invalidate("city")}else{a.validate("city")}}if(a.is_empty(at.idCountry)){a.invalidate("idCountry")}else{a.validate("idCountry")}if(a.is_empty(at.idRegion)){a.invalidate("idRegion")}else{a.validate("idRegion")}if(!at.privacy){a.invalidate("privacy")}else{a.validate("privacy")}if(a.valid){ah.subscribe(at)}return false};return ar})();a=(function(){ar.prototype.INVALID_COLOR="#FF000C";ar.prototype.VALID_COLOR="#FFFFFF";ar.prototype.valid=true;function ar(){this.reset=i(this.reset,this);window.error=this.error}ar.prototype.reset=function(){this.valid=true;$(".error-messages").css("visibility","hidden");if($(".error-messages").find('[class!="invisible"]').length){return $(".error-messages").find('[class!="invisible"]').addClass("invisible")}};ar.prototype.error=function(at){at=$(".error-messages").find('[for="'+at+'"]');if(!$(".error-messages").find('[class!="invisible"]').length){at.toggleClass("invisible");at.text(at.text().toUpperCase());$(".error-messages").css("opacity",0);return $(".error-messages").css("visibility","visible").animate({opacity:1})}};ar.prototype.is_empty=function(at){return $.trim(at).length===0};ar.prototype.is_email=function(at){var au;au=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return au.test(at)};ar.prototype.is_date=function(aw,au,at){var av;at=Number(at);au=Number(au)-1;aw=Number(aw);av=new Date(aw,au,at);return av.getFullYear()===aw&&av.getMonth()===au&&at===av.getDate()};ar.prototype.invalidate=function(au){var at;$('[for="'+au+'"]').css({color:this.INVALID_COLOR});if(false){$('[name="'+au+'"]').css({border:"1px solid "+this.INVALID_COLOR});at=$('[for="custom_'+au+'"]');if(at){at.css({border:"1px solid "+this.INVALID_COLOR})}}this.error(au);return this.valid=false};ar.prototype.validate=function(at){$('[name="'+at+'"]').css({border:0});return $('[for="'+at+'"]').css({color:this.VALID_COLOR})};return ar})();N=(function(){n(ar,al);function ar(){ar.__super__.constructor.apply(this,arguments)}ar.prototype.init_layout=function(){r=new r;a=new a;ah=new ah;j=new j;V=new V;$(".integer").numeric(false);return ah.get_countries()};return ar})();h=(function(){function ar(){}return ar})();l=(function(){function ar(){}return ar})();o=(function(){n(ar,al);function ar(){ar.__super__.constructor.apply(this,arguments)}return ar})()}).call(this);window.Hogan=window.Hogan||{};Hogan.core=(function(){var b={clickEvent:"click",transitionEndOptions:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionEnd"},pageRole:"",transitionEnd:"",transition:Modernizr.prefixed("transition"),transform:Modernizr.prefixed("transform"),hasTransitions:Modernizr.csstransitions,isIpad:(navigator.userAgent.match(/iPad/i)!=null)?true:false,isAnimating:false,isLoading:false,winHeight:$(window).height()};function i(n){$.extend(b,n);$("#loading").width($(window).width());$("#loading").height($(window).height());$(window).scroll(e);$(window).resize(k);$(window).load(h);d();var m=pageRole=$("#main").attr("role");if(pageRole=="home"){if(b.splashpage){f(b.splashpage)}if(b.flashintro){j()}$("#intro").fadeIn();$("#wheel").hide()}else{$("#wheel").delay(1500).fadeIn();$("#intro").hide()}if(Hogan[m]){Hogan[m].init($(".target"))}$("#menu-top a").live("click",function(p){Hogan.submenu.stopscroll();var o=$(p.currentTarget).attr("track");_gaq.push(["_trackEvent","Menu","click",o]);if($(p.currentTarget).attr("target")){return true}else{p.preventDefault();setTimeout('document.location = "'+p.currentTarget.href+'"',100);return false}});$("footer a").live("click",function(p){var o=$(p.currentTarget).text();o=$.trim(o).split(" ").join("-").toLowerCase();_gaq.push(["_trackEvent","Footer","click",o]);if($(p.currentTarget).attr("target")){return true}else{p.preventDefault();setTimeout('document.location = "'+p.currentTarget.href+'"',100);return false}});$(window).bind("popstate",a)}var c=false;function f(p){if(p.langs.indexOf(LANGUAGE_ID)==-1){return}p.active=true;$("#intro").attr("src","");$("#intro").css("visibility","hidden");setTimeout(function(){$("#intro").attr("src",p.src);$("#intro").css("margin","0 auto");$("#intro").css("left",0);$("#intro").css("top",0);$("#intro").css({width:p.width,height:p.height});n();$(window).resize(n);$("#intro").load(function(){$("#intro").show();$("#intro").css("visibility","visible");setTimeout(m,2500)})},100);function m(){p.active=false;if(p.callback){p.callback.call()}}function n(){var q=$(document).width(),u=$(document).height(),o=p.width,s=p.height,t=o/s;if(p.width/960<q/u){$("#intro").width(q);$("#intro").height(q/t)}else{$("#intro").height(u);$("#intro").width(u*t)}$("#intro").css("left",($("#intro").width()-q)*-0.5);$("#intro").css("top",($("#intro").height()-u)*-0.2)}}function j(){$("#intro").remove();$("<div/>").attr("id","intro").appendTo("#loading");var n="10.1.0";var p=URL_PUBLIC+"public/themes/hogan/swf/christmas/playerProductInstall.swf";var m={};var q={};q.quality="high";q.bgcolor="#000000";q.allowscriptaccess="always";q.allowfullscreen="true";var o={};o.id="Main";o.name="Main";o.align="middle";swfobject.embedSWF(URL_PUBLIC+"public/themes/hogan/swf/christmas/HoganIntro.swf","intro","100%","100%",n,p,m,q,o);HoganIntro={handShake:function(){},done:function(){l()}}}function a(p){if(c==false){c=true;return}if(p.originalEvent.state){var n=p.originalEvent.state.url,o=p.originalEvent.state.page;if(p.originalEvent.state.page){var m=Hogan[pageRole]["load_"+o];if(typeof(m)=="function"){pageRole=o;m.call(this,p.originalEvent.state);return}}}}function l(){var n=((new Date()).getTime()-window.startTime)<1000,o=(pageRole=="home"),m=o?1500:0;window.app.router.on_app_loaded();setTimeout(function(){window.app.router.on_app_showing();$("#loading").delay(m).animate({opacity:0},n&&!o?250:750,function(){$("#loading").css("visibility","hidden");$("#intro").remove()})},n?150:250)}function k(){var m=$(window).width(),o=$(window).height(),p=Math.max(100,(o-100)*0.2)+"px";$(".background").height($(window).height());var n=1280/800;if($(".overview .coverimagecontainer").length){$(".coverimagecontainer").width(m);$(".coverimagecontainer").height(m/n)}else{if($(".coverimagecontainer").length){if(m/o>n){$(".coverimagecontainer").width(m);$(".coverimagecontainer").height(m/n);$(".coverimagecontainer").css("marginLeft",0);$(".coverimagecontainer").css("marginTop",(o-m/n)*0.5)}else{$(".coverimagecontainer").height(o);$(".coverimagecontainer").width(o*n);$(".coverimagecontainer").css("marginTop",0);$(".coverimagecontainer").css("marginLeft",(m-o*n)*0.5)}}}$(".stage").height($(window).height());$(".position-vertical-center").stop().animate({"margin-top":p},{duration:200});if($("#loading").is(":visible")){$("#loading").width($(window).width());$("#loading").height($(window).height())}g()}function e(){}function h(){if(!b.splashpage||!b.splashpage.active||pageRole!="home"){Hogan.submenu.init();l();k();g()}else{if(b.splashpage.active){b.splashpage.callback=h}}}function g(){if($(".terms .scroller")){$(".terms .scroller").height($(window).height()-200)}}function d(){var m=false;$("#collec>li:last>a").click(function(){return false});$(".l-switch").click(function(){if($("#lang-container").css("display")=="none"){$("#lang-container").css("display","inline")}else{$("#lang-container").css("display","none")}return false});$(".menu-btn").click(function(){if(!m){$("header").mouseleave(function(o){if($(o).offsetY<250){return}m=false;$("header").unbind("mouseleave");$("header").slideUp("fast");n(false)});m=true;n(true);$("header").slideDown("fast")}else{m=false;$("header").slideUp("fast");n(false)}return false});function n(o){setTimeout((function(){return function(){if(o){$("#logo").addClass("withmenu");$("#logo").removeClass("nomenu")}else{$("#logo").removeClass("withmenu");$("#logo").addClass("nomenu")}}})(),o?0:200)}}return{init:i,settings:b,resize:k}}());Hogan.submenu=(function(){var b=false,c=[],a=0,i=false,j,h=4000;return{init:g,autoscroll:f,stopscroll:k,setReadyToScroll:e};function g(){$("#sub-nav").find("a").each(function(l,m){c.push($(m).attr("href").split("#").pop())});window.app.router.bind("change",function(m){var l=$("#sub-nav").find('a[href|="#'+m+'"]');if(l){$("#sub-nav").find("a").each(function(o,n){$(n).parent().removeClass("selected")});l.parent().addClass("selected")}});$("#sub-nav a").click(function(){k()});window.app.router.set_default_section(c[0])}function k(){b=false;clearTimeout(i)}function f(l,m){b=true;h=m||h;if(!c||c.length<1){return}if(i){clearTimeout(i)}if(l){j=true;d()}app.router.bind("change",function(o){var n=c.indexOf(o);if(n>-1){a=n}})}function e(){if(b){clearTimeout(i);i=setTimeout(d,h)}}function d(){if(j){j=false;return}a++;if(a>=c.length){a=0}window.app.router.navigate(c[a],true)}})();Hogan.home=(function(){var e={},k=e,c=null,i=null,m=true,g=null,d="index",l;function j(n){$.extend(e,n);Hogan.core.resize();$(".background").hide();i=$(".background:first");i.show();a(i);b()}function b(){app.router.bind("change",f);app.router.bind("prefade",h);$(".stripes a").click(function(n){Hogan.submenu.stopscroll()})}function h(n){d=n;$("#container").show();$(".background").css("height",$(window).height());Hogan.submenu.autoscroll(true);f(n);Hogan.submenu.setReadyToScroll()}function a(n){if(n.hasClass("white")){$("body").addClass("white")}else{$("body").removeClass("white")}}function f(p){var o=m;m=false;var n=$("#_"+p);if(n.length&&(!i||n.attr("id")!=i.attr("id"))){setTimeout(function(){a(n)},800);if(i){n.after(i).show()}else{n.show()}if(i&&n.find(".stripes").length==0){i.find(".stripes").css("position","relative")}else{n.find(".stripes").css("position","fixed");i.find(".stripes").css("position","fixed")}i.css("height",$(window).height());n.css("height",$(window).height());if(o){i.hide();i=n;Hogan.submenu.setReadyToScroll()}else{if(l==p){i=n;return}if(n!=i){i.animate({height:0},{duration:1600,complete:function(){i.hide();i=n;Hogan.submenu.setReadyToScroll()}})}else{Hogan.submenu.setReadyToScroll();n.show()}}}l=p}return{init:j}}());Hogan.grid=(function(){var e={transitionSpeed:800},i=e,c=null;function h(k,j){$.extend(e,j);c=k;$(".background").hide();$(window).load(b);a();if(window.history&&typeof(window.history.replaceState)=="function"){window.history.replaceState({url:window.location.href,page:"grid"},window.location.href,window.location.href)}}function b(){$(".img").hide().each(function(j){$(this).css({position:"absolute",top:150-($(this).find("img").attr("height")/2),left:155-($(this).find("img").attr("width")/2)}).show().fadeTo(0,0).delay(j*200).fadeTo(300,1)})}function a(){var j=$("#main").hasClass("junior");if(!j){$(".labels").hide()}else{$(".labels").show();$(".labels").find("img").hide()}c.find("li").hover(function(){$(".product-grid li .img").stop(true,true).fadeTo(600,0.3);$(this).find(".img").stop(true).fadeTo(600,1);if(!j){$(this).find(".labels").stop(true,true).fadeIn()}},function(){$(".product-grid li .img").stop().delay(100).fadeTo(600,1);if(!j){$(this).find(".labels").stop(true,true).fadeOut(200)}});c.find("li").click(g);c.find("a").click(g)}function g(l){l.stopPropagation();var k=$(this).find("a").attr("href")||$(this).attr("href");if($("#main").hasClass("junior")){return window.location=k}var j={url:k,page:"grid"};if(typeof(window.history.pushState)=="function"){_gaq.push(["_trackPageview",k]);window.history.pushState(j,k,k)}else{return true}$.ajax({url:k,success:d});l.preventDefault();return false}function f(j){$.ajax({url:j.url,success:d})}function d(l){var j=$(window).width();var k=$(l).detach().wrap('<div class="content product" />').insertAfter(".background").css({zIndex:160,marginLeft:"+="+j,marginTop:$(window).scrollTop()}).show();$("#product-image img").load(function(){$(this).reflect()});$(".background").height($(".background").height()+$(window).scrollTop());$(".background").css({marginLeft:"+="+j}).show();k.animate({marginLeft:"-="+j},i.transitionSpeed,function(){$("#product-image").fadeTo(1000,1);$(".grid").remove();k.css({zIndex:0,marginTop:0});$(".background").height($(window).height());$(".background").css({zIndex:0});$("#sharing").show()});$(".background").animate({marginLeft:"-="+j},800);Hogan.product.init();Hogan.product.positionImage()}return{init:h,load_product:f}}());Hogan.product=(function(){var t={transitionSpeed:800},c=80,j=false,l=t,m=null;function p(){pageRole="product";d();g();a();h();e();if(typeof(window.history.pushState)=="function"){window.history.replaceState({url:window.location.href,page:"product"},window.location.href,window.location.href)}$(window).resize(e);$(document).keydown(function(o){switch(o.keyCode){case 39:$(".navigation a.right").click();break;case 37:$(".navigation a.left").click();break}})}function r(){var o=$("#product-url").val().match(/([0-9A-Z]{18})\-(.+)\.html/i);if(o.length==3){return o[1]}}function f(){var o=$("#product-url").val().match(/([0-9A-Z]{18})\-(.+)\.html/i);if(o.length==3){return o[2]}}function h(){$("#share-fb").live("click",function(){_gaq.push(["_trackEvent","Product","share-fb",r()]);var o="http://www.facebook.com/sharer.php?u="+escape($("#product-url").val());window.open(o);return false});$("#share-tw").live("click",function(){var o=$("#product-url").val();_gaq.push(["_trackEvent","Product","share-twitter",r()]);if(o&&o.length>1){o="http://twitter.com/home?status="+encodeURIComponent("Love this from Hogan - "+o+" #Hogan");window.open(o);return true}return false})}function g(){$(".background").show();$(".navigation a").live("click",q)}var u=false;function a(){if($(".thumbs ul li").size()<=3){$(".navigation-thumb").hide()}else{$(".navigation-thumb").show()}$(".navigation-thumb>.left").hide();var w=0;$(".thumbs ul li").each(function(z,A){if($(A).find("a").attr("href")==window.location){w=Math.floor(z/3)}});var s=u?200:0;$(".thumbs").animate({marginLeft:-202*w},s);o();$(".navigation>a").hover(function(){$(this).animate({opacity:0.5},{duration:100})},function(){$(this).animate({opacity:1},{duration:200})});$(".navigation-thumb>.left").unbind("click").click(function(){$(".thumbs").animate({marginLeft:"+=202"},800);$(".navigation-thumb>.right").show();w--;o()});$(".navigation-thumb>.right").unbind("click").click(function(){$(".thumbs").animate({marginLeft:"-=202"},800);w++;o()});function o(){if(w<=0){$(".navigation-thumb>.right").hide(0,function(){var z=$(this);z.css({marginRight:27});setTimeout(function(){z.fadeIn(400)},200)});$(".product-detail .thmbs-msk").animate({left:-5},{duration:400});$(".navigation-thumb>.left").hide()}else{$(".product-detail .thmbs-msk").animate({left:23},{duration:400});setTimeout(function(){$(".navigation-thumb>.left").show()},200);$(".navigation-thumb>.right").animate({marginRight:0},{duration:200})}if((w+1)*3>=$(".thumbs ul li").size()){$(".navigation-thumb>.right").hide()}}}function q(A){if(j){return false}j=true;var B=$(this).attr("id").replace("p-",""),o=$(this).attr("class"),w=$(this).attr("href"),s;if(typeof(window.history.pushState)!="function"){return true}A.preventDefault();var z=(o=="right")?1:-1;n(w,z,true);return false}function v(o){window.location=o.url}function n(A,B,z){if(typeof(A)=="string"){urlProduct=A}else{urlProduct=A.url}var w,o;B=B||-1;var s={url:urlProduct,page:"product"};if(B==1){w="+=1500";o="-=1500"}else{w="-=1500";o="+=1500"}$(".navigation").fadeOut(200);$.ajax({url:urlProduct,success:function(D){_gaq.push(["_trackPageview",urlProduct]);if(z==true){window.history.pushState(s,urlProduct,urlProduct)}var E=$(".content"),C=new Image();C.onload=function(){var F=$(D).hide().insertAfter(".background").css({marginLeft:w}).show().animate({marginLeft:o},800).find(".reflect").reflect({height:c});e();if($.browser.msie){setTimeout(function(){$(".reflected").reflect({height:c})},100)}E.animate({marginLeft:o},1200,function(){E.remove();$("#product-url").val(urlProduct);a();j=false})};C.src=$($(D).find("#product-image").html()).attr("src");f()}})}function d(){$(".thumbs img").live("click",function(){var s=$(this).parent().attr("href");var o={url:s,page:"product"};if(typeof(window.history.pushState)=="function"){_gaq.push(["_trackPageview",s]);window.history.pushState(o,s,s)}else{return true}$("#product-url").val(s);$.ajax({url:URL_PUBLIC+"/variation/"+$(this).attr("id").replace("tb-",""),datatype:"json",success:i});return false})}function b(o){if(o.description!=""){$(".description").text(o.description)}$(".sku").text(o.sku)}function i(o){b(o);$("#product-image").fadeTo(300,0,function(){$("#loading").css("visibility","show").fadeIn();$("#product-image").html(o.img);e();$("#product-image img").reflect();var s=new Image();s.onload=function(){$("#loading").fadeOut();$("#product-image").fadeTo(1000,1);$("#product-image img").reflect()};s.src=$(o.img).attr("src")})}function e(){var o=Math.max(100,($(window).height()-$("#product-image img").height())*0.45);$("#product-image").css({marginLeft:30-$("#product-image img").width()/2,marginTop:o});$(".navigation").css({marginTop:Math.max(35,$(window).height()*0.5-300)})}function k(o){$(o).each(function(){$("<img/>")[0].src=this})}return{init:p,positionImage:e,load_product:n,load_grid:v}}());Hogan.overview=(function(){var i=$("div.overview"),j,c,g,k,r,l=0,n=0,h={e:null,v:9999},m=false;return{moveTo:moveTo,init:p};function p(){if(!i.length){return}$(window).resize(d);$(window).scroll(e);$(".label").parent().mouseenter(a);$(".stripes .level2").live("click",function(u){u.preventDefault();var t=$(this).attr("id").substr(5);app.router.navigate(t,true)});k=i.find("li.section");k.each(function(t,u){u=k[t]=$(u);u.elements=u.find("div.parallax");u.elements.each(function(w,v){v=u.elements[w]=$(v);v.inside=v.find(">div")})});d();b()}function a(t){$target=$(t.currentTarget).find("img");$label=$(".label",t.currentTarget);x=$target.position().left+$target.width()*0.8-$label.width();y=$target.position().top+$target.height()*0.9;$label.css({left:x+"px",top:y+"px"});$label.position()}function b(){app.router.bind("change",q)}function q(t){o(t)}function o(v){if(!v){v="index"}var t=$("#part_"+v);if(t.length){r=t;if(!m){$("html,body").scrollTop(t.offset().top)}else{g=true;n=t.offset().top>$(window).scrollTop()?-1:1;var u=Math.abs(t.offset().top-$(window).scrollTop());$("html,body").stop().animate({scrollTop:t.offset().top},{duration:u<600?500:u<2000?2000:3500,complete:s})}if(t.offset().top>0||v=="index"){m=true}}}function d(){var t=$(window).width();i.width(t);i.find(">ul").width(t);$("li.section").height($(window).height());$("li.section").css("padding-top",Math.floor(Math.max(($(window).height()-540)*0.5,60))+"px");$(".cover").width($(window).width());$(".cover").height($(window).width()*(9/16));if(c){clearTimeout(c)}c=setTimeout(function(){if(!!h&&!!h.element){f()}},100)}function f(){j=false;if(!r){return}if(r.attr("id")==h.element.attr("id")){o(r.attr("id").substr(5))}else{app.router.navigate(h.element.attr("id").substr(5),true)}}function s(){g=false;n=0}function e(z){z.preventDefault();var B,C,A,v,t,D=$(window).scrollTop(),w=(l-D)<0?-1:1,u=$(window).height();if(!g){if(j){clearTimeout(j);j=false}j=setTimeout(f,500)}h.proximity=99999;k.each(function(E,F){C=F.offset().top;v=C-D;if(!g){A=Math.abs(v)/u;if(A<h.proximity){h.element=F;h.proximity=A}}t=(v/u)*350;F.elements.each(function(J,H){if(!H.ratio){var I=H.hasClass("moveup"),G=H.hasClass("moveuphalf");if(!I&&!G){H.ratio=-0.001}else{var K=H.inside.height();H.ratio=(K>0)?(I?-1:-0.25)*(1-((Math.max(0,250-K))/100)):0}}H.inside.css("margin-top",(t+(75*H.ratio)))})});if(g&&n!==0&&(n!==w)){$("html,body").stop(true,false);s()}l=D}}());if(!Array.prototype.indexOf){Array.prototype.indexOf=function(b){var a=this.length>>>0;var c=Number(arguments[1])||0;c=(c<0)?Math.ceil(c):Math.floor(c);if(c<0){c+=a}for(;c<a;c++){if(c in this&&this[c]===b){return c}}return -1}}$(function(){Hogan.core.init()});
