(e),!1}),a(document).delegate(c.inputChangeSelector,"change.rails",function(b){vard=a(this);returnc.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(document).delegate(c.formSubmitSelector,"submit.rails",function(d){vare=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))returnc.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))returnc.stopEverything(d);if(f)returnh?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&a().jquery<"1.7"&&c.callFormSubmitBindings(e,d)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(document).delegate(c.formInputClickSelector,"click.rails",function(b){vard=a(this);if(!c.allowAction(d))returnc.stopEverything(b);vare=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(document).delegate(c.formSubmitSelector,"ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(document).delegate(c.formSubmitSelector,"ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})}(jQuery),jQuery(function(a){window.NestedFormEvents=function(){this.addFields=a.proxy(this.addFields,this),this.removeFields=a.proxy(this.removeFields,this)},NestedFormEvents.prototype={addFields:function(b){varc=b.currentTarget,d=a(c).attr("data-association"),e=a("#"+d+"_fields_blueprint").html(),f=(a(c).closest(".fields").find("input:first").attr("name")||"").replace(newRegExp("[[a-z]+]$"),""),g=newRegExp("new_"+d,"g"),h=(newDate).getTime();e=e.replace(g,"new_"+h);if(f){vari=f.match(/[a-z_]+_attributes/g)||[],j=f.match(/(new_)?[0-9]+/g)||[];for(vark=0;k<i.length;k++)j[k]&&(e=e.replace(newRegExp("(_"+i[k]+")_.+?_","g"),"$1_"+j[k]+"_"),e=e.replace(newRegExp("(\\["+i[k]+"\\])\\[.+?\\]","g"),"$1["+j[k]+"]"))}varl=this.insertFields(e,d,c);returna(c).closest("form").trigger({type:"nested:fieldAdded",field:l}).trigger({type:"nested:fieldAdded:"+d,field:l}),!1},insertFields:function(b,c,d){returna(b).insertBefore(d).hide().show("slow")},removeFields:function(b){varc=b.currentTarget;a(c).toggleClass("important").toggleClass("notice");vard=a(c).prev("input[type=hidden]");returnd.val(d.val()==="1"?"0":"1"),a(c).siblings("fieldset").toggle(),!1}},window.nestedFormEvents=newNestedFormEvents,a("form a.add_nested_fields").live("click",nestedFormEvents.addFields),a("form a.remove_nested_fields").live("click",nestedFormEvents.removeFields)}),function(a,b){a.ajaxPrefilter(function(a,b,c){if(a.iframe)return"iframe"}),a.ajaxTransport("iframe",function(b,c,d){functionm(){a(j).each(function(){this.remove()}),a(k).each(function(){this.disabled=!1}),e.attr("action",g||"").attr("target",h||"").attr("enctype",i||""),f.attr("src","javascript:false;").remove()}vare=null,f=null,g=null,h=null,i=null,j=[],k=[],l=a(b.files).filter(":file:enabled");b.dataTypes.shift();if(l.length)returnl.each(function(){e!==null&&this.form!==e&&jQuery.error("All file fields must belong to the same form"),e=this.form}),e=a(e),g=e.attr("action"),h=e.attr("target"),i=e.attr("enctype"),e.find(":input:not(:submit)").each(function(){!this.disabled&&(this.type!="file"||l.index(this)<0)&&(this.disabled=!0,k.push(this))}),typeofb.data=="string"&&b.data.length>0&&jQuery.error("data must not be serialized"),a.each(b.data||{},function(b,c){a.isPlainObject(c)&&(b=c.name,c=c.value),j.push(a("<input type='hidden'>").attr("name",b).attr("value",c).appendTo(e))}),j.push(a("<input type='hidden' name='X-Requested-With'>").attr("value","IFrame").appendTo(e)),accepts=b.dataTypes[0]&&b.accepts[b.dataTypes[0]]?b.accepts[b.dataTypes[0]]+(b.dataTypes[0]!=="*"?", */*; q=0.01":""):b.accepts["*"],j.push(a("<input type='hidden' name='X-Http-Accept'>").attr("value",accepts).appendTo(e)),{send:function(c,d){f=a("<iframe src='javascript:false;' name='iframe-"+a.now()+"' style='display:none'></iframe>"),f.bind("load",function(){f.unbind("load").bind("load",function(){vara=this.contentWindow?this.
{varb=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){varc=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b),this._curInst=null};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),$.datepicker._triggerOnClose(b),this._datepickerShowing=!1,this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;varb=$(a.target);b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){vard=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){varb=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{vard=newDate;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){vard=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){vare=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;varf=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){varb=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){varc=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);vare=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeofd.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){varb=this._get(a,"altField");if(b){varc=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){varb=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){varb=newDate(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));varc=b.getTime();returnb.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeofb=="object"?b.toString():b+"";if(b=="")returnnull;vard=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeofd!="string"?d:(newDate).getFullYear()%100+parseInt(d,10);vare=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){varc=s+1<a.length&&a.charAt(s+1)==b;returnc&&s++,c},o=function(a){varc=n(a),d=a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2,e=newRegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;returnr+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){vare=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,func
)})})}(window.jQuery||window.ender),!function(a){functionb(b,c){vard="disabled",e=a(b),f=e.data();c+="Text",f.resetText||e.data("resetText",e.html()),e.html(f[c]||a.fn.button.defaults[c]),setTimeout(function(){c=="loadingText"?e.addClass(d).attr(d,d):e.removeClass(d).removeAttr(d)},0)}functionc(b){a(b).toggleClass("active")}"use strict",a.fn.button=function(a){returnthis.each(function(){if(a=="toggle")returnc(this);a&&b(this,a)})},a.fn.button.defaults={loadingText:"loading..."},a(function(){a("body").delegate(".btn[data-toggle]","click",function(){a(this).button("toggle")})})}(window.jQuery||window.ender),!function(a){functionc(){a(b).parent("li").removeClass("open")}"use strict",a.fn.dropdown=function(e){returnthis.each(function(){a(this).delegate(e||b,"click",function(b){vard=a(this).parent("li"),e=d.hasClass("open");returnc(),!e&&d.toggleClass("open"),!1})})};varb="a.menu, .dropdown-toggle";a(function(){a("html").bind("click",c),a("body").dropdown("[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle")})}(window.jQuery||window.ender),!function(a){functionc(c,d){vare=a.proxy(this.processScroll,this);this.$topbar=a(c),this.selector=d||"li > a",this.refresh(),this.$topbar.delegate(this.selector,"click",e),b.scroll(e),this.processScroll()}"use strict";varb=a(window);c.prototype={refresh:function(){this.targets=this.$topbar.find(this.selector).map(function(){varb=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){returna(b).offset().top})},processScroll:function(){vara=b.scrollTop()+10,c=this.offsets,d=this.targets,e=this.activeTarget,f;for(f=c.length;f--;)e!=d[f]&&a>=c[f]&&(!c[f+1]||a<=c[f+1])&&this.activateButton(d[f])},activateButton:function(a){this.activeTarget=a,this.$topbar.find(this.selector).parent(".active").removeClass("active"),this.$topbar.find(this.selector+'[href="'+a+'"]').parent("li").addClass("active")}},a.fn.scrollSpy=function(b){vard=this.data("scrollspy");returnd?b===!0?d:(typeofb=="string"&&d[b](),this):this.each(function(){a(this).data("scrollspy",newc(this,b))})},a(document).ready(function(){a("body").scrollSpy("[data-scrollspy] li > a")})}(window.jQuery||window.ender),!function(a){functionb(a,b){b.find("> .active").removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),a.addClass("active"),a.parent(".dropdown-menu")&&a.closest("li.dropdown").addClass("active")}functionc(c){vard=a(this),e=d.closest("ul:not(.dropdown-menu)"),f=d.attr("href"),g,h;if(/^#\w+/.test(f)){c.preventDefault();if(d.parent("li").hasClass("active"))return;g=e.find(".active a").last()[0],h=a(f),b(d.parent("li"),e),b(h,h.parent()),d.trigger({type:"change",relatedTarget:g})}}"use strict",a.fn.tabs=a.fn.pills=function(b){returnthis.each(function(){a(this).delegate(b||".tabs li > a, .pills > li > a","click",c)})},a(document).ready(function(){a("body").tabs("ul[data-tabs] li > a, ul[data-pills] > li > a")})}(window.jQuery||window.ender),!function(a){functiond(a,b,c){returntypeofa=="function"?a.apply(b,c):a}"use strict";varb;a(document).ready(function(){a.support.transition=function(){vara=document.body||document.documentElement,b=a.style,c=b.transition!==undefined||b.WebkitTransition!==undefined||b.MozTransition!==undefined||b.MsTransition!==undefined||b.OTransition!==undefined;returnc}(),a.support.transition&&(b="TransitionEnd",a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"))});varc=function(b,c){this.$element=a(b),this.options=c,this.enabled=!0,this.fixTitle()};c.prototype={show:function(){varb,c,e,f,g,h;if(this.hasContent()&&this.enabled){g=this.tip(),this.setContent(),this.options.animate&&g.addClass("fade"),g.remove().css({top:0,left:0,display:"block"}).prependTo(document.body),b=a.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight}),c=g[0].offsetWidth,e=g[0].offsetHeight,f=d(this.options.placement,this,[g[0],this.$element[0]]);switch(f){case"below":h={top:b.top+b.height+this.options.offset,lef