require(["./config"],function(){requirejs(["routes","app","handlebars","utils","semantic","backboneValidation","jquery.cookie"],function(c,d,e,b,a){$(document).ready(function(){d.instance({routes:c});e.templates=e.templates||{};_.extend(Backbone.Validation.callbacks,{valid:function(h,g,f){var i=h.$("["+f+'~="'+g+'"]');i.removeClass("invalid");i.removeAttr("data-error");var j=i.closest(".form-group");var k=i.get(0)===j.find("["+f+"]").last().get(0)||i.get(0).name===j.find("["+f+"]").last().get(0).name;if(k){var l=j.find("["+f+"]").hasClass("invalid");if(l===false){j.removeClass("has-error");j.find(".help-block").html("").addClass("hidden");}}},invalid:function(h,g,i,f){var j=h.$("["+f+'~="'+g+'"]');j.addClass("invalid");j.attr("data-error",i);var k=j.closest(".form-group");k.addClass("has-error");k.find(".help-block").html(i).removeClass("hidden");}});$.fn.serialize=function(){var g={},f=function(h,j){var i=g[j.name];"undefined"!=typeof i&&i!==null?$.isArray(i)?i.push(j.value):g[j.name]=[i,j.value]:g[j.name]=j.value;};return $.each(this.serializeArray(),f),g;};});});});