text: !function(){"use strict";function t(){this.$dom=$(document),this.isOldie=!!this.$dom.find("html").hasClass("oldie"),this.click="click",this.onReady=this.onOldie=this.onTouch=!1,this.uiModules={},this.inits={},this.path=$("script[gumby-path]").attr("gumby-path")||"js/libs",this.breakpoint=Number($("script[gumby-breakpoint]").attr("gumby-breakpoint"))||1024}t.prototype.init=function(){var t=this;this.$dom.ready(function(){t.initUIModules(),t.onReady&&t.onReady(),t.isOldie&&t.onOldie&&t.onOldie(),Modernizr.touch&&t.onTouch&&t.onTouch()})},t.prototype.ready=function(t){t&&"function"==typeof t&&(this.onReady=t)},t.prototype.oldie=function(t){t&&"function"==typeof t&&(this.onOldie=t)},t.prototype.touch=function(t){t&&"function"==typeof t&&(this.onTouch=t)},t.prototype.debug=function(){return{$dom:this.$dom,isOldie:this.isOldie,uiModules:this.uiModules,click:this.click}},t.prototype.selectAttr=function(){for(var t=0;t<arguments.length;t++){var i=arguments[t],e="data-"+arguments[t],s="gumby-"+arguments[t];if(this.is("["+e+"]"))return this.attr(e)?this.attr(e):!0;if(this.is("["+s+"]"))return this.attr(s)?this.attr(s):!0;if(this.is("["+i+"]"))return this.attr(i)?this.attr(i):!0}return!1},t.prototype.addInitalisation=function(t,i){this.inits[t]=i},t.prototype.initialize=function(t,i){this.inits[t]&&"function"==typeof this.inits[t]&&this.inits[t](i)},t.prototype.UIModule=function(t){var i=t.module;this.uiModules[i]=t},t.prototype.initUIModules=function(){var t;for(t in this.uiModules)this.uiModules[t].init()},window.Gumby=new t}(),!function(){"use strict";function t(t){this.$el=t,this.$input=this.$el.find("input[type=checkbox]");var i=this;this.$el.on(Gumby.click,function(t){t.stopImmediatePropagation(),t.preventDefault(),i.$input.is("[disabled]")||(i.$el.hasClass("checked")?i.update(!1):i.update(!0))}).on("gumby.check",function(){i.update(!0)}).on("gumby.uncheck",function(){i.update(!1)}),i.$el.hasClass("checked")&&i.update(!0)}t.prototype.update=function(t){var i=this.$el.find("span");t?(i.append('<i class="icon-check" />'),this.$input.prop("checked",!0).end().addClass("checked").trigger("gumby.onCheck").trigger("gumby.onChange")):this.$input.prop("checked",!1).end().find("i").remove().end().removeClass("checked").trigger("gumby.onUncheck").trigger("gumby.onChange")},Gumby.addInitalisation("checkboxes",function(){$(".checkbox").each(function(){var i=$(this);return i.data("isCheckbox")?!0:(i.data("isCheckbox",!0),new t(i),void 0)})}),Gumby.UIModule({module:"checkbox",events:["onCheck","onUncheck","onChange","check","uncheck"],init:function(){Gumby.initialize("checkboxes")}})}(),!function(){"use strict";function t(t){this.$el=t,this.rate=0,this.fontSizes={},this.setup();var i=this;this.$el.on("gumby.initialize",function(){i.setup()}),$(window).on("load resize orientationchange",function(){i.resize()})}t.prototype.setup=function(){this.rate=Number(Gumby.selectAttr.apply(this.$el,["rate"]))||1,this.fontSizes=this.parseSizes(Gumby.selectAttr.apply(this.$el,["sizes"]))},t.prototype.resize=function(){this.$el.css("font-size",this.calculateSize())},t.prototype.calculateSize=function(){return Math.max(Math.min(this.$el.width()/(10*this.rate),parseFloat(this.fontSizes.max)),parseFloat(this.fontSizes.min))},t.prototype.parseSizes=function(t){var i={min:Number.NEGATIVE_INFINITY,max:Number.POSITIVE_INFINITY};return t?(t.indexOf("|")>-1&&(t=t.split("|"),i.min=Number(t[0])||i.min,i.max=Number(t[1])||i.max),i.min=Number(t)||i.min,i):i},Gumby.addInitalisation("fittext",function(i){$(".fittext").each(function(){var e=$(this);return e.data("isFittext")&&!i?!0:e.data("isFittext")&&i?(e.trigger("gumby.initialize"),!0):(e.data("isFittext",!0),new t(e),void 0)})}),Gumby.UIModule({module:"fittext",events:[],init:function(){Gumby.initialize("fittext")}})}(),!function(){"use strict";function t(t){this.$el=t,this.fixedPoint="",this.pinPoint=!1,this.offset=0,this.pinOffset=0,this.top=0,this.constrainEl=!0,this.state=!1,this.measurements={left:0,width:0},this.setup();var i=this;$(window).on("scroll load",function(){i.monitorScroll()}),this.$el.on("gumby.initialize",function(){i.setup()})}t.prototype.setup=function(){var t=this;this.fixedPoint=this.parseAttrValue(Gumby.selectAttr.apply(this.$el,["fixed"])),this.pinPoint=Gumby.selectAttr.apply(this.$el,["pin"])||!1,this.offset=Number(Gumby.selectAttr.apply(this.$el,["offset"]))||0,this.pinOffset=Number(Gumby.selectAttr.apply(this.$el,["pinoffset"]))||0,this.top=Number(Gumby.selectAttr.apply(this.$el,["top"]))||0,this.constrainEl=Gumby.selectAttr.apply(this.$el,["constrain"])||!0,"false"===this.constrainEl&&(this.constrainEl=!1),this.$parent=this.$el.parents(".columns, .column, .row"),this.$parent=this.$parent.length?this.$parent.first():!1,this.parentRow=this.$parent?!!this.$parent.hasClass("row"):!1,this.pinPoint&&(this.pinPoint=this.parseAttrValue(this.pinPoint)),this.$parent&&this.constrainEl&&(this.measure(),$(window).resize(function(){t.state&&(t.measure(),t.constrain())}))},t.prototype.monitorScroll=function(){var t=$(window).scrollTop(),i=this.fixedPoint instanceof jQuery?this.fixedPoint.offset().top:this.fixedPoint,e=!1;this.pinPoint&&(e=this.pinPoint instanceof jQuery?this.pinPoint.offset().top:this.pinPoint),this.offset&&(i-=this.offset),this.pinOffset&&(e-=this.pinOffset),t>=i&&"fixed"!==this.state?(!e||e>t)&&this.fix():i>t&&"fixed"===this.state?this.unfix():e&&t>=e&&"pinned"!==this.state&&this.pin()},t.prototype.fix=function(){this.state="fixed",this.$el.css({top:0+this.top}).addClass("fixed").removeClass("unfixed pinned").trigger("gumby.onFixed"),this.$parent&&this.constrain()},t.prototype.unfix=function(){this.state="unfixed",this.$el.addClass("unfixed").removeClass("fixed pinned").trigger("gumby.onUnfixed")},t.prototype.pin=function(){this.state="pinned",this.$el.css({top:this.$el.offset().top}).addClass("pinned fixed").removeClass("unfixed").trigger("gumby.onPinned")},t.prototype.constrain=function(){this.$el.css({left:this.measurements.left,width:this.measurements.width})},t.prototype.measure=function(){var t,i=this.$parent.offset();this.measurements.left=i.left,this.measurements.width=this.$parent.width(),this.parentRow&&(t=Number(this.$parent.css("paddingLeft").replace(/px/,"")),t&&(this.measurements.left+=t))},t.prototype.parseAttrValue=function(t){if($.isNumeric(t))return Number(t);if("top"===t)return this.$el.offset().top;var i=$(t);return i},Gumby.addInitalisation("fixed",function(){$("[data-fixed],[gumby-fixed],[fixed]").each(function(){var i=$(this);return i.data("isFixed")?!0:(i.data("isFixed",!0),new t(i),void 0)})}),Gumby.UIModule({module:"fixed",events:["onFixed","onUnfixed"],init:function(){Gumby.initialize("fixed")}})}(),!function(){"use strict";function t(t){this.$el=t,this.$dropDowns=this.$el.find("li:has(.dropdown)");var i=this;this.$dropDowns.on("tap",this.toggleDropdown).on("swiperight",this.openLink),"#"!==this.$dropDowns.children("a").attr("href")&&this.$dropDowns.children("a").append('<i class="icon-popup"></i>').children("i").on("tap",this.openLink),this.$dropDowns.find(".dropdown li:not(:has(.dropdown)) a[href]").on("tap",this.openLink),$(window).on("mousemove touchstart",function(t){t.stopImmediatePropagation(),"mousemove"===t.type&&i.$dropDowns.on("mouseover mouseout",i.toggleDropdown)})}var i=Gumby.$dom.find("html");return!Modernizr.touch||$(window).width()>Gumby.breakpoint?(i.addClass("gumby-no-touch"),void 0):(i.addClass("gumby-touch"),t.prototype.toggleDropdown=function(t){t.stopImmediatePropagation(),t.preventDefault();var i=$(this);i.hasClass("active")?i.removeClass("active"):i.addClass("active")},t.prototype.openLink=function(t){t.stopImmediatePropagation(),t.preventDefault();var i,e=$(this),s=e;e.is("i")?s=e.parent("a"):e.is("li")&&(s=e.children("a")),i=s.attr("href"),"blank"==s.attr("target")?window.open(i):window.location=i},Gumby.addInitalisation("navbars",function(){$(".navbar").each(function(){var i=$(this);return i.data("isNavbar")?!0:(i.data("isNavbar",!0),new t(i),void 0)})}),Gumby.UIModule({module:"navbar",events:[],init:function(){Gumby.initialize("navbars")}}),void 0)}(),!function(){"use strict";function t(t){this.$el=t,this.$input=this.$el.find("input[type=radio]");var i=this;this.$el.on(Gumby.click,function(t){t.stopImmediatePropagation(),t.preventDefault(),i.$input.is("[disabled]")||i.update()}).on("gumby.check",function(){i.update()}),i.$el.hasClass("checked")&&i.update()}t.prototype.update=function(){var t=this.$el.find("span"),i='input[name="'+this.$input.attr("name")+'"]';$(".radio").has(i).removeClass("checked").find("input").prop("checked",!1).end().find("i").remove(),this.$input.prop("checked",!0),t.append('<i class="icon-dot" />'),this.$el.addClass("checked").trigger("gumby.onChange")},Gumby.addInitalisation("radiobtns",function(){$(".radio").each(function(){var i=$(this);return i.data("isRadioBtn")?!0:(i.data("isRadioBtn",!0),new t(i),void 0)})}),Gumby.UIModule({module:"radiobtn",events:["onChange","check"],init:function(){Gumby.initialize("radiobtns")}})}(),!function(){"use strict";function t(t){this.$el=t,this.imageSrc=this.$el.attr("src"),this.retinaSrc=this.fetchRetinaImage(),this.$retinaImg=$(new Image);var i=this;return this.retinaSrc?(this.$retinaImg.attr("src",this.retinaSrc).load(function(){i.retinaImageLoaded()}),void 0):!1}t.prototype.fetchRetinaImage=function(){var t=this.imageSrc,i=this.imageSrc.search(/(\.|\/)(gif|jpe?g|png)$/i);return 0>i?!1:t.substr(0,i)+"@2x"+t.substr(i,t.length)},t.prototype.retinaImageLoaded=function(){this.$el.attr("src",this.$retinaImg.attr("src")).trigger("gumby.onRetina")},Gumby.addInitalisation("retina",function(){!window.devicePixelRatio||window.devicePixelRatio<=1||$("img[data-retina],img[gumby-retina],img[retina]").each(function(){var i=$(this);return i.data("isRetina")?!0:(i.data("isRetina",!0),new t(i),void 0)})}),Gumby.UIModule({module:"retina",events:["onRetina"],init:function(){Gumby.initialize("retina")}})}(),!function(){"use strict";function t(t){this.$el=t,this.targetPos=0,this.duration=0,this.offset=!1,this.easing="",this.update=!1,this.setup();var i=this;this.$el.on(Gumby.click+" gumby.skip",function(t){t.stopImmediatePropagation(),t.preventDefault(),i.update?i.calculateTarget(i.skipTo):i.skipTo()}).on("gumby.initialize",function(){i.setup()})}t.prototype.setup=function(){this.duration=Number(Gumby.selectAttr.apply(this.$el,["duration"]))||200,this.offset=Gumby.selectAttr.apply(this.$el,["offset"])||!1,this.easing=Gumby.selectAttr.apply(this.$el,["easing"])||"swing",this.update=Gumby.selectAttr.apply(this.$el,["update"])?!0:!1,this.calculateTarget()},t.prototype.calculateTarget=function(t){var i,e=Gumby.selectAttr.apply(this.$el,["goto"]);if("top"==e)this.targetPos=0;else if($.isNumeric(e))this.targetPos=Number(e);else{if(i=$(e),!i)return!1;this.targetPos=i.offset().top}t&&t.apply(this)},t.prototype.skipTo=function(){var t=this;$("html,body").animate({scrollTop:this.calculateOffset()},this.duration,this.easing).promise().done(function(){t.$el.trigger("gumby.onComplete")})},t.prototype.calculateOffset=function(){if(!this.offset)return this.targetPos;var t=this.offset.substr(0,1),i=Number(this.offset.substr(1,this.offset.length));return"-"===t?this.targetPos-i:"+"===t?this.targetPos+i:void 0},Gumby.addInitalisation("skiplinks",function(i){$(".skiplink > a, .skip").each(function(){var e=$(this);return e.data("isSkipLink")&&!i?!0:e.data("isSkipLink")&&i?(e.trigger("gumby.initialize"),!0):(e.data("isSkipLink",!0),new t(e),void 0)})}),Gumby.UIModule({module:"skiplink",events:["onComplete","skip"],init:function(){Gumby.initialize("skiplinks")}})}(),!function(){"use strict";function t(t){this.$el=t,this.$nav=this.$el.find("ul.tab-nav > li"),this.$content=this.$el.find(".tab-content");var i=this;this.$nav.children("a").on(Gumby.click,function(t){t.stopImmediatePropagation(),t.preventDefault(),i.click($(this))}),this.$el.on("gumby.set",function(t,e){i.set(t,e)})}t.prototype.click=function(t){var i=t.parent().index();this.$nav.add(this.$content).removeClass("active"),this.$nav.eq(i).add(this.$content.eq(i)).addClass("active"),this.$el.trigger("gumby.onChange",i)},t.prototype.set=function(t,i){this.$nav.eq(i).find("a").trigger(Gumby.click)},Gumby.addInitalisation("tabs",function(){$(".tabs").each(function(){var i=$(this);return i.data("isTabs")?!0:(i.data("isTabs",!0),new t(i),void 0)})}),Gumby.UIModule({module:"tabs",events:["onChange","set"],init:function(){Gumby.initialize("tabs")}})}(),!function(){"use strict";function t(t){this.$el=$(t),this.targets=[],this.on="",this.$el.length&&this.init()}function i(t){this.$el=$(t),this.targets=[],this.on="",this.$el.length&&this.init()}t.prototype.init=function(){var t=this;this.setup(),this.$el.on(this.on,function(i){i.stopImmediatePropagation(),"A"===$(this).prop("tagName")&&i.preventDefault(),t.trigger(t.triggered)}).on("gumby.trigger",function(){t.trigger(t.triggered)}).on("gumby.initialize",function(){t.setup()})},t.prototype.setup=function(){this.targets=this.parseTargets(),this.on=Gumby.selectAttr.apply(this.$el,["on"])||Gumby.click,this.className=Gumby.selectAttr.apply(this.$el,["classname"])||"active"},t.prototype.parseTargets=function(){var t=Gumby.selectAttr.apply(this.$el,["trigger"]),i=0,e=[];return t?(i=t.indexOf("|"),-1===i?[$(t)]:(e=t.split("|"),e.length>1?[$(e[0]),$(e[1])]:[$(e[0])])):!1},t.prototype.triggered=function(){this.$el.trigger("gumby.onTrigger",[this.$el.hasClass(this.className)])},i.prototype=new t,t.prototype.trigger=function(t){this.targets?1==this.targets.length?this.$el.add(this.targets[0]).toggleClass(this.className):this.targets.length>1&&(this.targets[0].hasClass(this.className)?(this.$el.add(this.targets[0]).removeClass(this.className),this.targets[1].addClass(this.className)):(this.targets[1].removeClass(this.className),this.$el.add(this.targets[0]).addClass(this.className))):this.$el.toggleClass(this.className),t&&"function"==typeof t&&t.apply(this)},i.prototype.trigger=function(t){this.targets?1==this.targets.length?this.$el.add(this.targets[0]).addClass(this.className):this.targets.length>1&&(this.$el.add(this.targets[0]).addClass(this.className),this.targets[1].removeClass(this.className)):this.$el.addClass(this.className),t&&"function"==typeof t&&t.apply(this)},Gumby.addInitalisation("toggles",function(i){$(".toggle").each(function(){var e=$(this);return e.data("isToggle")&&!i?!0:(e.data("isToggle")&&i&&e.trigger("gumby.initialize"),e.data("isToggle",!0),new t(e),void 0)})}),Gumby.addInitalisation("switches",function(t){$(".switch").each(function(){var e=$(this);return e.data("isSwitch")&&!t?!0:e.data("isSwitch")&&t?(e.trigger("gumby.initialize"),!0):(e.data("isSwitch",!0),new i(e),void 0)})}),Gumby.UIModule({module:"toggleswitch",events:["trigger","onTrigger"],init:function(){Gumby.initialize("switches"),Gumby.initialize("toggles")}})}(),!function(t){"use strict";function i(t,i){this.$this=t,this.$field=this.$this.parents(".field"),this.req=i||function(){return!!this.$this.val().length};var e=this;this.$this.is("[type=checkbox], [type=radio]")?(this.$field=this.$this.parent("label"),this.$field.on("gumby.onChange",function(){e.validate()})):this.$this.is("select")?(this.$field=this.$this.parents(".picker"),this.$field.on("change",function(){e.validate()})):this.$this.on("blur",function(t){9!==t.which&&e.validate()})}i.prototype.validate=function(){var t=this.req(this.$this);return t?this.$field.removeClass("danger").addClass("success"):this.$field.removeClass("success").addClass("danger"),t},t.fn.validation=function(e){var s=t.extend({submit:!1,fail:!1,required:[]},e),n=[];return this.each(function(){if(!s.required.length)return!1;var e,a=t(this),o=s.required.length;for(e=0;o>e;e++)n.push(new i(a.find('[name="'+s.required[e].name+'"]'),s.required[e].validate||!1));a.on("submit",function(t){var i=!1;if(!a.data("passed")){t.preventDefault();var e,o=n.length;for(e=0;o>e;e++)n[e].validate()||(i=!0);if(i){if(s.fail&&"function"==typeof s.fail)return s.fail(),void 0}else{if(s.submit&&"function"==typeof s.submit)return s.submit(a.serializeArray()),void 0;a.data("passed",!0).submit()}}})})}}(jQuery),Modernizr.load({test:Modernizr.touch,yep:Gumby.path+"/jquery.mobile.custom.min.js",callback:function(){$.mobile&&(window.Gumby.click+=" tap")},complete:function(){window.Gumby.init(),"function"==typeof define&&define.amd&&define(window.Gumby)}});
  