(function(b){function c(){b(a).parent("li").removeClass("open")}b.fn.dropdown=function(g){return this.each(function(){b(this).delegate(g||a,"click",function(){var a=b(this).parent("li"),g=a.hasClass("open");c();!g&&a.toggleClass("open");return false})})};var a="a.menu, .dropdown-toggle";b(function(){b("html").bind("click",c);b("body").dropdown("[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle")})})(window.jQuery||window.ender);
(function(b){var c;b(document).ready(function(){var a=(document.body||document.documentElement).style;b.support.transition=a.transition!==void 0||a.WebkitTransition!==void 0||a.MozTransition!==void 0||a.MsTransition!==void 0||a.OTransition!==void 0;b.support.transition&&(c="TransitionEnd",b.browser.webkit?c="webkitTransitionEnd":b.browser.mozilla?c="transitionend":b.browser.opera&&(c="oTransitionEnd"))});var a=function(a,c){this.$element=b(a);this.options=c;this.enabled=true;this.fixTitle()};a.prototype=
{show:function(){var a,c,d,e,f,h;if(this.hasContent()&&this.enabled){f=this.tip();this.setContent();this.options.animate&&f.addClass("fade");f.remove().css({top:0,left:0,display:"block"}).prependTo(document.body);a=b.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});c=f[0].offsetWidth;d=f[0].offsetHeight;e=typeof this.options.placement=="function"?this.options.placement.apply(this,[f[0],this.$element[0]]):this.options.placement;switch(e){case "below":h=
{top:a.top+a.height+this.options.offset,left:a.left+a.width/2-c/2};break;case "above":h={top:a.top-d-this.options.offset,left:a.left+a.width/2-c/2};break;case "left":h={top:a.top+a.height/2-d/2,left:a.left-c-this.options.offset};break;case "right":h={top:a.top+a.height/2-d/2,left:a.left+a.width+this.options.offset}}f.css(h).addClass(e).addClass("in")}},setContent:function(){var a=this.tip();a.find(".twipsy-inner")[this.options.html?"html":"text"](this.getTitle());a[0].className="twipsy"},hide:function(){function a(){j.remove()}
var j=this.tip();j.removeClass("in");b.support.transition&&this.$tip.hasClass("fade")?j.bind(c,a):a()},fixTitle:function(){var a=this.$element;if(a.attr("title")||typeof a.attr("data-original-title")!="string")a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getTitle:function(){var a,b=this.$element,c=this.options;this.fixTitle();typeof c.title=="string"?a=b.attr(c.title=="title"?"data-original-title":c.title):typeof c.title=="function"&&
(a=c.title.call(b[0]));return(a=(""+a).replace(/(^\s*|\s*$)/,""))||c.fallback},tip:function(){return this.$tip=this.$tip||b('<div class="twipsy" />').html(this.options.template)},validate:function(){if(!this.$element[0].parentNode)this.hide(),this.options=this.$element=null},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}};b.fn.twipsy=function(c){b.fn.twipsy.initWith.call(this,
c,a,"twipsy");return this};b.fn.twipsy.initWith=function(a,c,d){function e(e){var f=b.data(e,d);f||(f=new c(e,b.fn.twipsy.elementOptions(e,a)),b.data(e,d,f));return f}function f(){var b=e(this);b.hoverState="in";a.delayIn==0?b.show():(b.fixTitle(),setTimeout(function(){b.hoverState=="in"&&b.show()},a.delayIn))}function h(){var b=e(this);b.hoverState="out";a.delayOut==0?b.hide():setTimeout(function(){b.hoverState=="out"&&b.hide()},a.delayOut)}var i,k,l;if(a===true)return this.data(d);else if(typeof a==
"string"){if(i=this.data(d))i[a]();return this}a=b.extend({},b.fn[d].defaults,a);a.live||this.each(function(){e(this)});a.trigger!="manual"&&(i=a.live?"live":"bind",k=a.trigger=="hover"?"mouseenter":"focus",l=a.trigger=="hover"?"mouseleave":"blur",this[i](k,f)[i](l,h));return this};b.fn.twipsy.Twipsy=a;b.fn.twipsy.defaults={animate:true,delayIn:0,delayOut:0,fallback:"",placement:"above",html:false,live:false,offset:0,title:"title",trigger:"hover",template:'<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'};
b.fn.twipsy.rejectAttrOptions=["title"];b.fn.twipsy.elementOptions=function(a,c){for(var d=b(a).data(),e=b.fn.twipsy.rejectAttrOptions,f=e.length;f--;)delete d[e[f]];return b.extend({},c,d)}})(window.jQuery||window.ender);
(function(b){var c=function(a,c){this.$element=b(a);this.options=c;this.enabled=true;this.fixTitle()};c.prototype=b.extend({},b.fn.twipsy.Twipsy.prototype,{setContent:function(){var a=this.tip();a.find(".title")[this.options.html?"html":"text"](this.getTitle());a.find(".content > *")[this.options.html?"html":"text"](this.getContent());a[0].className="popover"},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element;typeof this.options.content==
"string"?a=b.attr(this.options.content):typeof this.options.content=="function"&&(a=this.options.content.call(this.$element[0]));return a},tip:function(){if(!this.$tip)this.$tip=b('<div class="popover" />').html(this.options.template);return this.$tip}});b.fn.popover=function(a){typeof a=="object"&&(a=b.extend({},b.fn.popover.defaults,a));b.fn.twipsy.initWith.call(this,a,c,"popover");return this};b.fn.popover.defaults=b.extend({},b.fn.twipsy.defaults,{placement:"right",content:"data-content",template:'<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>'});
b.fn.twipsy.rejectAttrOptions.push("content")})(window.jQuery||window.ender);
(function(b){b.fn.lazyload=function(c){var a={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:window,skip_invisible:true};if(c){if(null!==c.failurelimit)c.failure_limit=c.failurelimit,delete c.failurelimit;b.extend(a,c)}var g=this;0==a.event.indexOf("scroll")&&b(a.container).bind(a.event,function(){var c=0;g.each(function(){if((!a.skip_invisible||b(this).is(":visible"))&&!b.abovethetop(this,a)&&!b.leftofbegin(this,a))if(!b.belowthefold(this,a)&&!b.rightoffold(this,a))b(this).trigger("appear");
else if(++c>a.failure_limit)return false});var d=b.grep(g,function(a){return!a.loaded});g=b(d)});this.each(function(){var c=this;c.loaded=false;b(c).one("appear",function(){this.loaded||b("<img />").bind("load",function(){b(c).hide().attr("src",b(c).data("original"))[a.effect](a.effectspeed);c.loaded=true}).attr("src",b(c).data("original"))});0!=a.event.indexOf("scroll")&&b(c).bind(a.event,function(){c.loaded||b(c).trigger("appear")})});b(a.container).trigger(a.event);return this};b.belowthefold=
function(c,a){return(a.container===void 0||a.container===window?b(window).height()+b(window).scrollTop():b(a.container).offset().top+b(a.container).height())<=b(c).offset().top-a.threshold};b.rightoffold=function(c,a){return(a.container===void 0||a.container===window?b(window).width()+b(window).scrollLeft():b(a.container).offset().left+b(a.container).width())<=b(c).offset().left-a.threshold};b.abovethetop=function(c,a){return(a.container===void 0||a.container===window?b(window).scrollTop():b(a.container).offset().top)>=
b(c).offset().top+a.threshold+b(c).height()};b.leftofbegin=function(c,a){return(a.container===void 0||a.container===window?b(window).scrollLeft():b(a.container).offset().left)>=b(c).offset().left+a.threshold+b(c).width()};b.extend(b.expr[":"],{"below-the-fold":function(c){return b.belowthefold(c,{threshold:0,container:window})},"above-the-fold":function(c){return!b.belowthefold(c,{threshold:0,container:window})},"right-of-fold":function(c){return b.rightoffold(c,{threshold:0,container:window})},"left-of-fold":function(c){return!b.rightoffold(c,
{threshold:0,container:window})}})})(jQuery);
(function(){$(document).ready(function(){var b;$(document).ready(function(){var b,a;if((b=window.autoFocus)!=null?b:1)return a=$(".focus").find("input, textarea, select"),a=a.add($("input, textarea, select").filter(".focus")),b=$("form .error .input").find("input, textarea, select"),(b.length?b:a).not('*[type="file"], *[type="hidden"]').first().select().focus()});(function(b){return b.each(function(){var a,b,c,d,e;b=false;a=$(this).find("input, textarea").not('*[type="file"], *[type="hidden"]');for(d=
0,e=a.length;d<e;d++)c=a[d],$(c).val()===""&&$(c).addClass("focus"),b||(b=$(c).val()==="");if(!b)return a.addClass("focus")})})($(".focus-first-empty"));$("img.lazy").lazyload({threshold:200});if($("body").hasClass("account-login-index"))$(".forgot-password").on("focus click",function(){return $(this).attr({href:$(this).attr("href").replace(/(\?.*)?$/,"?email="+encodeURIComponent($("#id_email").val()))})});if(window.prevAccommEmailTo)return function(b){var a,g;a=$("#accomm"+b+" .contact");if(a.length)return g=
a.parents(".accomm").find(".details .name").text(),a.popover({title:function(){return"Email sent"},content:function(){return"Your message was sent to "+g},html:true,placement:"below",trigger:"manual"}),a.popover("show"),b=a.data("popover").$tip,b.css({cursor:"pointer"}),b.click(function(){return a.popover("hide")})}(prevAccommEmailTo)})}).call(this);

