Notice: Undefined index: css in /home/delanget/public_html/combine.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /home/delanget/public_html/combine.php:37) in /home/delanget/public_html/combine.php on line 99

Warning: Cannot modify header information - headers already sent by (output started at /home/delanget/public_html/combine.php:37) in /home/delanget/public_html/combine.php on line 158

Warning: Cannot modify header information - headers already sent by (output started at /home/delanget/public_html/combine.php:37) in /home/delanget/public_html/combine.php on line 161
/* js combination file */ /* Including js file: /javascript/nivo-slider/jquery.nivo.slider.pack.js */ /* * jQuery Nivo Slider v3.2 * http://nivo.dev7studios.com * * Copyright 2012, Dev7studios * Free to use and abuse under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function(e){var t=function(t,n){var r=e.extend({},e.fn.nivoSlider.defaults,n);var i={currentSlide:0,currentImage:"",totalSlides:0,running:false,paused:false,stop:false,controlNavEl:false};var s=e(t);s.data("nivo:vars",i).addClass("nivoSlider");var o=s.children();o.each(function(){var t=e(this);var n="";if(!t.is("img")){if(t.is("a")){t.addClass("nivo-imageLink");n=t}t=t.find("img:first")}var r=r===0?t.attr("width"):t.width(),s=s===0?t.attr("height"):t.height();if(n!==""){n.css("display","none")}t.css("display","none");i.totalSlides++});if(r.randomStart){r.startSlide=Math.floor(Math.random()*i.totalSlides)}if(r.startSlide>0){if(r.startSlide>=i.totalSlides){r.startSlide=i.totalSlides-1}i.currentSlide=r.startSlide}if(e(o[i.currentSlide]).is("img")){i.currentImage=e(o[i.currentSlide])}else{i.currentImage=e(o[i.currentSlide]).find("img:first")}if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}var u=e("").addClass("nivo-main-image");u.attr("src",i.currentImage.attr("src")).show();s.append(u);e(window).resize(function(){s.children("img").width(s.width());u.attr("src",i.currentImage.attr("src"));u.stop().height("auto");e(".nivo-slice").remove();e(".nivo-box").remove()});s.append(e('
'));var a=function(t){var n=e(".nivo-caption",s);if(i.currentImage.attr("title")!=""&&i.currentImage.attr("title")!=undefined){var r=i.currentImage.attr("title");if(r.substr(0,1)=="#")r=e(r).html();if(n.css("display")=="block"){setTimeout(function(){n.html(r)},t.animSpeed)}else{n.html(r);n.stop().fadeIn(t.animSpeed)}}else{n.stop().fadeOut(t.animSpeed)}};a(r);var f=0;if(!r.manualAdvance&&o.length>1){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}if(r.directionNav){s.append('
'+r.prevText+''+r.nextText+"
");e(s).on("click","a.nivo-prevNav",function(){if(i.running){return false}clearInterval(f);f="";i.currentSlide-=2;d(s,o,r,"prev")});e(s).on("click","a.nivo-nextNav",function(){if(i.running){return false}clearInterval(f);f="";d(s,o,r,"next")})}if(r.controlNav){i.controlNavEl=e('
');s.after(i.controlNavEl);for(var l=0;l')}else{i.controlNavEl.append(''+(l+1)+"")}}e("a:eq("+i.currentSlide+")",i.controlNavEl).addClass("active");e("a",i.controlNavEl).bind("click",function(){if(i.running)return false;if(e(this).hasClass("active"))return false;clearInterval(f);f="";u.attr("src",i.currentImage.attr("src"));i.currentSlide=e(this).attr("rel")-1;d(s,o,r,"control")})}if(r.pauseOnHover){s.hover(function(){i.paused=true;clearInterval(f);f=""},function(){i.paused=false;if(f===""&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}})}s.bind("nivo:animFinished",function(){u.attr("src",i.currentImage.attr("src"));i.running=false;e(o).each(function(){if(e(this).is("a")){e(this).css("display","none")}});if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}if(f===""&&!i.paused&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}r.afterChange.call(this)});var h=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().is("a")?e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().height():e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height();for(var s=0;s').css({left:o*s+"px",width:t.width()-o*s+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}else{t.append(e('
').css({left:o*s+"px",width:o+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}}e(".nivo-slice",t).height(i);u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var p=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=Math.round(t.width()/n.boxCols),s=Math.round(e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height()/n.boxRows);for(var o=0;o').css({opacity:0,left:i*a+"px",top:s*o+"px",width:t.width()-i*a+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}else{t.append(e('
').css({opacity:0,left:i*a+"px",top:s*o+"px",width:i+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}}}u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var d=function(t,n,r,i){var s=t.data("nivo:vars");if(s&&s.currentSlide===s.totalSlides-1){r.lastSlide.call(this)}if((!s||s.stop)&&!i){return false}r.beforeChange.call(this);if(!i){u.attr("src",s.currentImage.attr("src"))}else{if(i==="prev"){u.attr("src",s.currentImage.attr("src"))}if(i==="next"){u.attr("src",s.currentImage.attr("src"))}}s.currentSlide++;if(s.currentSlide===s.totalSlides){s.currentSlide=0;r.slideshowEnd.call(this)}if(s.currentSlide<0){s.currentSlide=s.totalSlides-1}if(e(n[s.currentSlide]).is("img")){s.currentImage=e(n[s.currentSlide])}else{s.currentImage=e(n[s.currentSlide]).find("img:first")}if(r.controlNav){e("a",s.controlNavEl).removeClass("active");e("a:eq("+s.currentSlide+")",s.controlNavEl).addClass("active")}a(r);e(".nivo-slice",t).remove();e(".nivo-box",t).remove();var o=r.effect,f="";if(r.effect==="random"){f=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");o=f[Math.floor(Math.random()*(f.length+1))];if(o===undefined){o="fade"}}if(r.effect.indexOf(",")!==-1){f=r.effect.split(",");o=f[Math.floor(Math.random()*f.length)];if(o===undefined){o="fade"}}if(s.currentImage.attr("data-transition")){o=s.currentImage.attr("data-transition")}s.running=true;var l=0,c=0,d="",m="",g="",y="";if(o==="sliceDown"||o==="sliceDownRight"||o==="sliceDownLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({top:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUp"||o==="sliceUpRight"||o==="sliceUpLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceUpLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({bottom:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUpDown"||o==="sliceUpDownRight"||o==="sliceUpDownLeft"){h(t,r,s);l=0;c=0;var b=0;d=e(".nivo-slice",t);if(o==="sliceUpDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);if(c===0){n.css("top","0px");c++}else{n.css("bottom","0px");c=0}if(b===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;b++})}else if(o==="fold"){h(t,r,s);l=0;c=0;e(".nivo-slice",t).each(function(){var n=e(this);var i=n.width();n.css({top:"0px",width:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="fade"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:t.width()+"px"});m.animate({opacity:"1.0"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInRight"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInLeft"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1",left:"",right:"0px"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){m.css({left:"0px",right:""});t.trigger("nivo:animFinished")})}else if(o==="boxRandom"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;y=v(e(".nivo-box",t));y.each(function(){var n=e(this);if(c===g-1){setTimeout(function(){n.animate({opacity:"1"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1"},r.animSpeed)},100+l)}l+=20;c++})}else if(o==="boxRain"||o==="boxRainReverse"||o==="boxRainGrow"||o==="boxRainGrowReverse"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;var w=0;var E=0;var S=[];S[w]=[];y=e(".nivo-box",t);if(o==="boxRainReverse"||o==="boxRainGrowReverse"){y=e(".nivo-box",t)._reverse()}y.each(function(){S[w][E]=e(this);E++;if(E===r.boxCols){w++;E=0;S[w]=[]}});for(var x=0;x=0&&T").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},s=this;return t.each(e.split(/\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(e,i){var s=this[0];if(e){var r=t.data(s.form,"validator").settings,n=r.rules,a=t.validator.staticRules(s);switch(e){case"add":t.extend(a,t.validator.normalizeRule(i)),delete a.messages,n[s.name]=a,i.messages&&(r.messages[s.name]=t.extend(r.messages[s.name],i.messages));break;case"remove":if(!i)return delete n[s.name],a;var u={};return t.each(i.split(/\s/),function(t,e){u[e]=a[e],delete a[e]}),u}}var o=t.validator.normalizeRules(t.extend({},t.validator.classRules(s),t.validator.attributeRules(s),t.validator.dataRules(s),t.validator.staticRules(s)),s);if(o.required){var l=o.required;delete o.required,o=t.extend({required:l},o)}return o}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),s="on"+e.type.replace(/^validate/,"");i.settings[s]&&i.settings[s].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\s/)),t.each(s,function(t,s){i[s]=e})});var s=this.settings.rules;t.each(s,function(e,i){s[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=this.check(e)!==!1;return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),s=t(e).val();return"radio"===i||"checkbox"===i?t("input[name='"+t(e).attr("name")+"']:checked").val():"string"==typeof s?s.replace(/\r/g,""):s},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s=t(e).rules(),r=!1,n=this.elementValue(e);for(var a in s){var u={method:a,parameters:s[a]};try{if(i=t.validator.methods[a].call(this,n,e,u.parameters),"dependency-mismatch"===i){r=!0;continue}if(r=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(e)),void 0;if(!i)return this.formatAndAdd(e,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+u.method+"' method.",o),o}}return r?void 0:(this.objectLength(s)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"Warning: No message defined for "+e.name+"")},formatAndAdd:function(e,i){var s=this.defaultMessage(e,i.method),r=/\$?\{(\d+)\}/g;"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:s,element:e}),this.errorMap[e.name]=s,this.submitted[e.name]=s},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s=this.errorsFor(e);s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(s).length||(this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},s=t(e),r=s[0].getAttribute("type");for(var n in t.validator.methods){var a;"required"===n?(a=s.get(0).getAttribute(n),""===a&&(a=!0),a=!!a):a=s.attr(n),/min|max/.test(n)&&(null===r||/number|range|text/.test(r))&&(a=Number(a)),a?i[n]=a:r===n&&"range"!==r&&(i[n]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,s,r={},n=t(e);for(i in t.validator.methods)s=n.data("rule-"+i.toLowerCase()),void 0!==s&&(r[i]=s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(r===!1)return delete e[s],void 0;if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0!==r.param?r.param:!0:delete e[s]}}),t.each(e,function(s,r){e[s]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i=0,s=0,r=!1;t=t.replace(/\D/g,"");for(var n=t.length-1;n>=0;n--){var a=t.charAt(n);s=parseInt(a,10),r&&(s*=2)>9&&(s-=9),i+=s,r=!r}return 0===i%10},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=r},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s[0]&&s[1]>=r},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s){if(this.optional(i))return"dependency-mismatch";var r=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),r.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=r.message,s="string"==typeof s&&{url:s}||s,r.old===e)return r.valid;r.old=e;var n=this;this.startRequest(i);var a={};return a[i.name]=e,t.ajax(t.extend(!0,{url:s,mode:"abort",port:"validate"+i.name,dataType:"json",data:a,success:function(s){n.settings.messages[i.name].remote=r.originalMessage;var a=s===!0||"true"===s;if(a){var u=n.formSubmitted;n.prepareElement(i),n.formSubmitted=u,n.successList.push(i),delete n.invalid[i.name],n.showErrors()}else{var o={},l=s||n.defaultMessage(i,"remote");o[i.name]=r.message=t.isFunction(l)?l(e):l,n.invalid[i.name]=!0,n.showErrors(o)}r.valid=a,n.stopRequest(i,a)}},s)),"pending"}}}),t.format=t.validator.format})(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,s){var r=t.port;"abort"===t.mode&&(e[r]&&e[r].abort(),e[r]=s)});else{var i=t.ajax;t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(e[n]&&e[n].abort(),e[n]=i.apply(this,arguments),e[n]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,s){return this.bind(i,function(i){var r=t(i.target);return r.is(e)?s.apply(r,arguments):void 0})}})}(jQuery); /* Including js file: /javascript/validate/additional-methods.min.js */ /*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation * Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */ (function(){function t(t){return t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'"_+=\/\-]*/g,"")}jQuery.validator.addMethod("maxWords",function(e,i,a){return this.optional(i)||a>=t(e).match(/\b\w+\b/g).length},jQuery.validator.format("Please enter {0} words or less.")),jQuery.validator.addMethod("minWords",function(e,i,a){return this.optional(i)||t(e).match(/\b\w+\b/g).length>=a},jQuery.validator.format("Please enter at least {0} words.")),jQuery.validator.addMethod("rangeWords",function(e,i,a){var r=t(e),n=/\b\w+\b/g;return this.optional(i)||r.match(n).length>=a[0]&&r.match(n).length<=a[1]},jQuery.validator.format("Please enter between {0} and {1} words."))})(),jQuery.validator.addMethod("letterswithbasicpunc",function(t,e){return this.optional(e)||/^[a-z\-.,()'"\s]+$/i.test(t)},"Letters or punctuation only please"),jQuery.validator.addMethod("alphanumeric",function(t,e){return this.optional(e)||/^\w+$/i.test(t)},"Letters, numbers, and underscores only please"),jQuery.validator.addMethod("lettersonly",function(t,e){return this.optional(e)||/^[a-z]+$/i.test(t)},"Letters only please"),jQuery.validator.addMethod("nowhitespace",function(t,e){return this.optional(e)||/^\S+$/i.test(t)},"No white space please"),jQuery.validator.addMethod("ziprange",function(t,e){return this.optional(e)||/^90[2-5]\d\{2\}-\d{4}$/.test(t)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx"),jQuery.validator.addMethod("zipcodeUS",function(t,e){return this.optional(e)||/\d{5}-\d{4}$|^\d{5}$/.test(t)},"The specified US ZIP Code is invalid"),jQuery.validator.addMethod("integer",function(t,e){return this.optional(e)||/^-?\d+$/.test(t)},"A positive or negative non-decimal number please"),jQuery.validator.addMethod("vinUS",function(t){if(17!==t.length)return!1;var e,i,a,r,n,s,u=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],d=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],o=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],l=0;for(e=0;17>e;e++){if(r=o[e],a=t.slice(e,e+1),8===e&&(s=a),isNaN(a)){for(i=0;u.length>i;i++)if(a.toUpperCase()===u[i]){a=d[i],a*=r,isNaN(s)&&8===i&&(s=u[i]);break}}else a*=r;l+=a}return n=l%11,10===n&&(n="X"),n===s?!0:!1},"The specified vehicle identification number (VIN) is invalid."),jQuery.validator.addMethod("dateITA",function(t,e){var i=!1,a=/^\d{1,2}\/\d{1,2}\/\d{4}$/;if(a.test(t)){var r=t.split("/"),n=parseInt(r[0],10),s=parseInt(r[1],10),u=parseInt(r[2],10),d=new Date(u,s-1,n);i=d.getFullYear()===u&&d.getMonth()===s-1&&d.getDate()===n?!0:!1}else i=!1;return this.optional(e)||i},"Please enter a correct date"),jQuery.validator.addMethod("iban",function(t,e){if(this.optional(e))return!0;if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(t))return!1;var i=t.replace(/ /g,"").toUpperCase(),a=i.substring(0,2),r={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},n=r[a];if(n!==void 0){var s=RegExp("^[A-Z]{2}\\d{2}"+n+"$","");if(!s.test(i))return!1}for(var u,d=i.substring(4,i.length)+i.substring(0,4),o="",l=!0,h=0;d.length>h;h++)u=d.charAt(h),"0"!==u&&(l=!1),l||(o+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(u));for(var F="",c="",m=0;o.length>m;m++){var f=o.charAt(m);c=""+F+f,F=c%97}return 1===F},"Please specify a valid IBAN"),jQuery.validator.addMethod("dateNL",function(t,e){return this.optional(e)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(t)},"Please enter a correct date"),jQuery.validator.addMethod("phoneNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid phone number."),jQuery.validator.addMethod("mobileNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid mobile number"),jQuery.validator.addMethod("postalcodeNL",function(t,e){return this.optional(e)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},"Please specify a valid postal code"),jQuery.validator.addMethod("bankaccountNL",function(t,e){if(this.optional(e))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(t))return!1;for(var i=t.replace(/ /g,""),a=0,r=i.length,n=0;r>n;n++){var s=r-n,u=i.substring(n,n+1);a+=s*u}return 0===a%11},"Please specify a valid bank account number"),jQuery.validator.addMethod("giroaccountNL",function(t,e){return this.optional(e)||/^[0-9]{1,7}$/.test(t)},"Please specify a valid giro account number"),jQuery.validator.addMethod("bankorgiroaccountNL",function(t,e){return this.optional(e)||$.validator.methods.bankaccountNL.call(this,t,e)||$.validator.methods.giroaccountNL.call(this,t,e)},"Please specify a valid bank or giro account number"),jQuery.validator.addMethod("time",function(t,e){return this.optional(e)||/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(t)},"Please enter a valid time, between 00:00 and 23:59"),jQuery.validator.addMethod("time12h",function(t,e){return this.optional(e)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(t)},"Please enter a valid time in 12-hour am/pm format"),jQuery.validator.addMethod("phoneUS",function(t,e){return t=t.replace(/\s+/g,""),this.optional(e)||t.length>9&&t.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number"),jQuery.validator.addMethod("phoneUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),jQuery.validator.addMethod("mobileUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[45789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),jQuery.validator.addMethod("phonesUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[45789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),jQuery.validator.addMethod("postcodeUK",function(t,e){return this.optional(e)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(t)},"Please specify a valid UK postcode"),jQuery.validator.addMethod("strippedminlength",function(t,e,i){return jQuery(t).text().length>=i},jQuery.validator.format("Please enter at least {0} characters")),jQuery.validator.addMethod("email2",function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(t)},jQuery.validator.messages.email),jQuery.validator.addMethod("url2",function(t,e){return this.optional(e)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},jQuery.validator.messages.url),jQuery.validator.addMethod("creditcardtypes",function(t,e,i){if(/[^0-9\-]+/.test(t))return!1;t=t.replace(/\D/g,"");var a=0;return i.mastercard&&(a|=1),i.visa&&(a|=2),i.amex&&(a|=4),i.dinersclub&&(a|=8),i.enroute&&(a|=16),i.discover&&(a|=32),i.jcb&&(a|=64),i.unknown&&(a|=128),i.all&&(a=255),1&a&&/^(5[12345])/.test(t)?16===t.length:2&a&&/^(4)/.test(t)?16===t.length:4&a&&/^(3[47])/.test(t)?15===t.length:8&a&&/^(3(0[012345]|[68]))/.test(t)?14===t.length:16&a&&/^(2(014|149))/.test(t)?15===t.length:32&a&&/^(6011)/.test(t)?16===t.length:64&a&&/^(3)/.test(t)?16===t.length:64&a&&/^(2131|1800)/.test(t)?15===t.length:128&a?!0:!1},"Please enter a valid credit card number."),jQuery.validator.addMethod("ipv4",function(t,e){return this.optional(e)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(t)},"Please enter a valid IP v4 address."),jQuery.validator.addMethod("ipv6",function(t,e){return this.optional(e)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(t)},"Please enter a valid IP v6 address."),jQuery.validator.addMethod("pattern",function(t,e,i){return this.optional(e)?!0:("string"==typeof i&&(i=RegExp("^(?:"+i+")$")),i.test(t))},"Invalid format."),jQuery.validator.addMethod("require_from_group",function(t,e,i){var a=this,r=i[1],n=$(r,e.form).filter(function(){return a.elementValue(this)}).length>=i[0];if(!$(e).data("being_validated")){var s=$(r,e.form);s.data("being_validated",!0),s.valid(),s.data("being_validated",!1)}return n},jQuery.format("Please fill at least {0} of these fields.")),jQuery.validator.addMethod("skip_or_fill_minimum",function(t,e,i){var a=this,r=i[0],n=i[1],s=$(n,e.form).filter(function(){return a.elementValue(this)}).length,u=s>=r||0===s;if(!$(e).data("being_validated")){var d=$(n,e.form);d.data("being_validated",!0),d.valid(),d.data("being_validated",!1)}return u},jQuery.format("Please either skip these fields or fill at least {0} of them.")),jQuery.validator.addMethod("accept",function(t,e,i){var a,r,n="string"==typeof i?i.replace(/\s/g,"").replace(/,/g,"|"):"image/*",s=this.optional(e);if(s)return s;if("file"===$(e).attr("type")&&(n=n.replace(/\*/g,".*"),e.files&&e.files.length))for(a=0;e.files.length>a;a++)if(r=e.files[a],!r.type.match(RegExp(".?("+n+")$","i")))return!1;return!0},jQuery.format("Please enter a value with a valid mimetype.")),jQuery.validator.addMethod("extension",function(t,e,i){return i="string"==typeof i?i.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(e)||t.match(RegExp(".("+i+")$","i"))},jQuery.format("Please enter a value with a valid extension.")); /* Including js file: /javascript/validate/messages_nl.js */ /* * Translated default messages for the jQuery validation plugin. * Locale: NL (Dutch; Nederlands, Vlaams) */ (function ($) { $.extend($.validator.messages, { required: "Dit is een verplicht veld.", remote: "Controleer dit veld.", email: "Vul hier een geldig e-mailadres in.", url: "Vul hier een geldige URL in.", date: "Vul hier een geldige datum in.", dateISO: "Vul hier een geldige datum in (ISO-formaat).", number: "Vul hier een geldig getal in.", digits: "Vul hier alleen getallen in.", creditcard: "Vul hier een geldig creditcardnummer in.", equalTo: "Vul hier dezelfde waarde in.", accept: "Vul hier een waarde in met een geldige extensie.", maxlength: $.validator.format("Vul hier maximaal {0} tekens in."), minlength: $.validator.format("Vul hier minimaal {0} tekens in."), rangelength: $.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1} tekens."), range: $.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1}."), max: $.validator.format("Vul hier een waarde in kleiner dan of gelijk aan {0}."), min: $.validator.format("Vul hier een waarde in groter dan of gelijk aan {0}."), // for validations in additional-methods.js iban: "Vul hier een geldig IBAN in.", dateNL: "Vul hier een geldige datum in.", phoneNL: "Vul hier een geldig telefoonnummer in.", mobileNL: "Vul hier een geldig mobiel telefoonnummer in.", postalcodeNL: "Vul hier een geldige postcode in.", bankaccountNL: "Vul hier een geldig bankrekeningnummer in.", giroaccountNL: "Vul hier een geldig gironummer in.", bankorgiroaccountNL: "Vul hier een geldig bank- of gironummer in." }); }(jQuery)); /* Including js file: /javascript/fancybox/jquery.fancybox.js */ /*! * fancyBox - jQuery Plugin * version: 3.0.0 Beta 1 (Tue, 29 Jan 2013) * @requires jQuery v1.7 or later * * Examples at http://fancyapps.com/fancybox/ * License: www.fancyapps.com/fancybox/#license * * Copyright 2013 Janis Skarnelis - janis@fancyapps.com * */ (function (window, document, $, undefined) { "use strict"; var W = $(window), D = $(document), H = $('html'); var F = $.fancybox = function () { F.open.apply( this, arguments ); }; var isTouch = F.isTouch = (document.createTouch !== undefined || window.ontouchstart !== undefined); var isQuery = function(object) { return object && object.hasOwnProperty && object instanceof $; }; var isString = function(str) { return str && $.type(str) === "string"; }; var isPercentage = function(str) { return isString(str) && str.indexOf('%') > 0; }; var getScalar = function(orig, dim) { var value = parseFloat(orig, 10) || 0; if (dim && isPercentage(orig)) { value = F.getViewport()[ dim ] / 100 * value; } return Math.ceil(value); }; var getValue = function(value, dim) { return getScalar(value, dim) + 'px'; }; var getTime = Date.now || function() { return +new Date; }; var removeWrap = function(what) { var el = isString(what) ? $(what) : what; if (el && el.length) { el.removeClass('fancybox-wrap').stop(true).trigger('onReset').hide().unbind(); try { el.find('iframe').unbind().attr('src', isTouch ? '' : '//about:blank'); // Give the document in the iframe to get a chance to unload properly before remove setTimeout(function () { el.empty().remove(); // Remove the lock if there are no elements if (F.lock && !F.coming && !F.current) { var scrollV, scrollH; $('.fancybox-margin').removeClass('fancybox-margin'); scrollV = W.scrollTop(); scrollH = W.scrollLeft(); H.removeClass('fancybox-lock'); F.lock.remove(); F.lock = null; W.scrollTop( scrollV ).scrollLeft( scrollH ); } }, 150); } catch(e) {} } }; $.extend(F, { // The current version of fancyBox version: '3.0.0', defaults: { theme : 'default', // 'default', dark', 'light' padding : 15, // space inside box, around content margin : [30, 55, 30, 55], // space between viewport and the box loop : true, // Continuous gallery item loop arrows : true, closeBtn : true, expander : !isTouch, caption : { type : 'outside' // 'float', 'inside', 'outside' or 'over', }, overlay : { closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay speedIn : 0, // duration of fadeIn animation speedOut : 250, // duration of fadeOut animation showEarly : true, // indicates if should be opened immediately or wait until the content is ready css : {} // custom CSS properties }, helpers : {}, // list of enabled helpers // Dimensions width : 800, height : 450, minWidth : 100, minHeight : 100, maxWidth : 99999, maxHeight : 99999, aspectRatio : false, fitToView : true, autoHeight : true, autoWidth : true, autoResize : true, // Location autoCenter : !isTouch, topRatio : 0.5, leftRatio : 0.5, // Opening animation openEffect : 'elastic', // 'elastic', 'fade', 'drop' or 'none' openSpeed : 350, openEasing : 'easeOutQuad', // Closing animation closeEffect : 'elastic', // 'elastic', 'fade', 'drop' or 'none' closeSpeed : 350, closeEasing : 'easeOutQuad', // Animation for next gallery item nextEffect : 'elastic', // 'elastic', 'fade', 'drop' or 'none' nextSpeed : 350, nextEasing : 'easeOutQuad', // Animation for previous gallery item prevEffect : 'elastic', // 'elastic', 'fade', 'drop' or 'none' prevSpeed : 350, prevEasing : 'easeOutQuad', // Slideshow autoPlay : false, playSpeed : 3000, /* Advanced */ // Callbacks onCancel : $.noop, // If canceling beforeLoad : $.noop, // Before loading afterLoad : $.noop, // After loading beforeShow : $.noop, // Before changing in current item afterShow : $.noop, // After opening beforeClose : $.noop, // Before closing afterClose : $.noop, // After closing // Properties specific to content type ajax : { dataType : 'html', headers : { 'X-fancyBox': true } }, iframe : { scrolling : 'auto', preload : true }, swf : { wmode : 'transparent', allowfullscreen : 'true', allowscriptaccess : 'always' }, // Default keyboard keys : { next : { 13 : 'left', // enter 34 : 'up', // page down 39 : 'left', // right arrow 40 : 'up' // down arrow }, prev : { 8 : 'right', // backspace 33 : 'down', // page up 37 : 'right', // left arrow 38 : 'down' // up arrow }, close : [27], // escape key play : [32], // space - start/stop slideshow toggle : [70] // letter "f" - toggle fullscreen }, // Default direction direction : { next : 'left', prev : 'right' }, // HTML templates tpl: { wrap : '
', iframe : '', error : '

{{ERROR}}

', closeBtn : '', next : '', prev : '' }, // Localization locale : 'nl', locales : { 'en' : { CLOSE : 'Close', NEXT : 'Next', PREV : 'Previous', ERROR : 'The requested content cannot be loaded.
Please try again later.', EXPAND : 'Display actual size', SHRINK : 'Fit to the viewport', PLAY_START : 'Start slideshow', PLAY_STOP : 'Pause slideshow' }, 'nl' : { CLOSE : 'Sluiten', NEXT : 'Volgende', PREV : 'Vorige', ERROR : 'De opgevraagde content kon niet worden ingeladen.
Probeer het later nogmaals.', EXPAND : 'Toon in ware grote', SHRINK : 'Verklein tot scherm formaat', PLAY_START : 'Start slideshow', PLAY_STOP : 'Pause slideshow' } }, // Override some properties index : 0, content : null, href : null, // Various wrapCSS : '', // CSS class name for the box modal : false, locked : true, preload : 3, // Number of gallery images to preload mouseWheel : true, // Enable or disable mousewheel support scrolling : 'auto', // 'yes', 'no', any valid value for CSS "overflow" property scrollOutside : true // If trye, fancyBox will try to set scrollbars outside the content }, // Current state current : null, coming : null, group : [], index : 0, isActive : false, // Is activated isOpen : false, // Is currently open isOpened : false, // Have been fully opened at least once isMaximized : false, player : { timer : null, isActive : false }, // Loaders ajaxLoad : null, imgPreload : null, // Object containing all helpers helpers : {}, // Open fancyBox open: function( items, options ) { if (!items) { return; } // Close if already active if (false === F.close(true)) { return; } if (!$.isPlainObject( options )) { options = {}; } F.opts = $.extend(true, {}, F.defaults, options); F.populate( items ); if (F.group.length) { F._start( F.opts.index ); } }, // Add new items to the group populate : function( items ) { var group = []; if ( !$.isArray( items )) { items = [ items ]; } // Build group array, each item is object containing element // and most important attributes - href, title and type $.each(items, function(i, element) { var defaults = $.extend(true, {}, F.opts), item, obj, type, margin, padding; if ($.isPlainObject(element)) { item = element; } else if (isString(element)) { item = { href : element }; } else if (isQuery(element) || $.type(element) === 'object' && element.nodeType) { obj = $(element); item = $(obj).get(0); if (!item.href) { item = { href : element }; } item = $.extend({ href : obj.data('fancybox-href') || obj.attr('href') || item.href, title : obj.data('fancybox-title') || obj.attr('title') || item.title, type : obj.data('fancybox-type'), element : obj }, obj.data('fancybox-options') ); } else { return; } // If the type has not specified, then try to guess if (!item.type && (item.content || item.href)) { item.type = item.content ? "html" : F.guessType( obj, item.href ); } // Adjust some defaults depending on content type type = item.type || F.opts.type; if (type === 'image' || type === 'swf') { defaults.autoWidth = defaults.autoHeight = false; defaults.scrolling = 'visible'; } if (type === 'image') { defaults.aspectRatio = true; } if (type === 'iframe') { defaults.autoWidth = false; defaults.scrolling = isTouch ? 'scroll' : 'visible'; } if (items.length < 2) { defaults.margin = 30; } item = $.extend(true, {}, defaults, item); // Recheck some parameters margin = item.margin; padding = item.padding; // Convert margin and padding properties to array - top, right, bottom, left if ($.type(margin) === 'number') { item.margin = [margin, margin, margin, margin]; } if ($.type(padding) === 'number') { item.padding = [padding, padding, padding, padding]; } // 'modal' propery is just a shortcut if (item.modal) { $.extend(true, item, { closeBtn : false, closeClick : false, nextClick : false, arrows : false, mouseWheel : false, keys : null, overlay : { closeClick : false } }); } if (item.autoSize !== undefined) { item.autoWidth = item.autoHeight = !!item.autoSize; } if (item.width === 'auto') { item.autoWidth = true; } if (item.height === 'auto') { item.autoHeight = true; } group.push( item ); }); F.group = F.group.concat( group ); }, // Cancel image loading and abort ajax request cancel: function () { var coming = F.coming; if (!coming || false === F.trigger('onCancel')) { return; } F.hideLoading(); if (F.ajaxLoad) { F.ajaxLoad.abort(); } if (F.imgPreload) { F.imgPreload.onload = F.imgPreload.onerror = null; } if (coming.wrap) { removeWrap( coming.wrap ); } F.ajaxLoad = F.imgPreload = F.coming = null; // If the first item has been canceled, then clear everything if (!F.current) { F._afterZoomOut( coming ); } }, // Start closing or remove immediately if is opening/closing close: function (e) { if (e && $.type(e) === 'object') { e.preventDefault(); } F.cancel(); // Do not close if: // - the script has not been activated // - cancel event has triggered opening a new item // - "beforeClose" trigger has returned false if (!F.isActive || F.coming || false === F.trigger('beforeClose')) { return; } F.unbind(); F.isClosing = true; if (F.lock) { F.lock.css('overflow', 'hidden'); } if (!F.isOpen || e === true) { F._afterZoomOut(); } else { F.isOpen = F.isOpened = false; F.transitions.close(); } }, prev : function( direction ) { var current = F.current; if (current) { F.jumpto( current.index - 1, (isString(direction) ? direction : current.direction.prev) ); } }, next : function( direction ) { var current = F.current; if (current) { F.jumpto( current.index + 1, (isString(direction) ? direction : current.direction.next) ); } }, jumpto : function( index, direction ) { var current = F.current; if (!(F.coming && F.coming.index === index)) { F.cancel(); if (current.index == index) { direction = null; } else if (!direction) { direction = current.direction[ index > current.index ? 'next' : 'prev' ]; } F.direction = direction; F._start( index ); } } }); $.extend(F, { guessType : function(item, href) { var rez = item && item.prop('class') ? item.prop('class').match(/fancybox\.(\w+)/) : 0, type = false; if (rez) { return rez[1]; } if (isString(href)) { if (href.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)) { type = 'image'; } else if (href.match(/\.(swf)((\?|#).*)?$/i)) { type = 'swf'; } else if (href.charAt(0) === '#') { type = 'inline'; } } else if (isString(item)) { type = 'html'; } return type; }, trigger: function (event, o) { var ret, obj = o || F.coming || F.current; if (!obj) { return; } if ($.isFunction( obj[event] )) { ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); } // Cancel further execution if afterClose callback has opened new instance if (ret === false || (event === 'afterClose' && F.isActive) ) { return false; } if (obj.helpers) { $.each(obj.helpers, function (helper, opts) { var helperObject = F.helpers[helper], helperOpts; if (opts && helperObject && $.isFunction(helperObject[event])) { helperOpts = $.extend(true, {}, helperObject.defaults, opts); helperObject.opts = helperOpts; helperObject[event](helperOpts, obj ); } }); } $.event.trigger(event); }, // Center inside viewport reposition: function (e, object) { var obj = object || F.current, wrap = obj && obj.wrap, pos; if (F.isOpen && wrap) { pos = F._getPosition( obj ); if (e === false || (e && e.type === 'scroll')) { wrap.stop(true).animate(pos, 200).css('overflow', 'visible'); } else { wrap.css(pos); } } }, update: function (e) { var type = (e && e.type), timeNow = getTime(), current = F.current, width; if (!current || !F.isOpen ) { return; } if (type === 'scroll') { if (F.wrap.outerHeight(true) > F.getViewport().h) { return; } if (F.didUpdate) { clearTimeout( F.didUpdate ); } F.didUpdate = setTimeout(function() { F.reposition(e); F.didUpdate = null; }, 50); return; } if (F.lock) { F.lock.css('overflow', 'hidden'); } F._setDimension(); F.reposition(e); if (F.lock) { F.lock.css('overflow', 'auto'); } // Re-center float type caption if (current.caption.type === 'float') { width = F.getViewport().w - (F.wrap.outerWidth(true) - F.inner.width() ); current.caption.wrap.css('width', width).css('marginLeft', (width * 0.5 - F.inner.width() * 0.5) * -1 ); } if (current.expander) { if ( current.canShrink) { $(".fancybox-expand").show().attr('title', current.locales[ current.locale ].SHRINK ); } else if (current.canExpand) { $(".fancybox-expand").show().attr('title', current.locales[ current.locale ].EXPAND ); } else { $(".fancybox-expand").hide(); } } F.trigger('onUpdate'); }, // Shrink content to fit inside viewport or restore if resized toggle: function ( action ) { var current = F.current; if (current && F.isOpen) { F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; F.update( true ); } }, hideLoading: function () { $('#fancybox-loading').remove(); }, showLoading: function () { var el, view; F.hideLoading(); el = $('
').click(F.cancel).appendTo('body'); if (!F.defaults.fixed) { view = F.getViewport(); el.css({ position : 'absolute', top : (view.h * 0.5) + view.y, left : (view.w * 0.5) + view.x }); } }, getViewport: function () { var rez; if (F.lock) { rez = { x: F.lock.scrollLeft(), y: F.lock.scrollTop(), w: F.lock[0].clientWidth, h: F.lock[0].clientHeight }; } else { rez = { x: W.scrollLeft(), y: W.scrollTop(), // See http://bugs.jquery.com/ticket/6724 w : isTouch && window.innerWidth ? window.innerWidth : W.width(), h : isTouch && window.innerHeight ? window.innerHeight : W.height() }; } return rez; }, unbind : function() { if (isQuery(F.wrap)) { F.wrap.unbind('.fb'); } if (isQuery(F.inner)) { F.inner.unbind('.fb'); } D.unbind('.fb'); W.unbind('.fb'); }, rebind: function () { var current = F.current, keys; F.unbind(); if (!current || !F.isOpen) { return; } // Changing document height on iOS devices triggers a 'resize' event, // that can change document height... repeating infinitely W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); keys = current.keys; if (keys) { D.bind('keydown.fb', function (e) { var code = e.which || e.keyCode, target = e.target || e.srcElement; // Skip esc key if loading, because showLoading will cancel preloading if (code === 27 && F.coming) { return false; } // Ignore key combinations and key events within form elements if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { $.each(keys, function(i, val) { //if (current.group.length > 1 && val[ code ] !== undefined) { if (val[ code ] !== undefined) { e.preventDefault(); if (current.group.length > 1) { F[ i ]( val[ code ] ); } return false; } if ($.inArray(code, val) > -1) { e.preventDefault(); if (i === 'play') { F.slideshow.toggle(); } else { F[ i ] (); } return false; } }); } }); } F.lastScroll = getTime(); if (current.mouseWheel && F.group.length > 1) { F.wrap.bind('DOMMouseScroll.fb mousewheel.fb MozMousePixelScroll.fb', function (event) { var e = event.originalEvent, el = e.target || 0, delta = (e.wheelDelta || e.detail || 0), deltaX = e.wheelDeltaX || 0, deltaY = e.wheelDeltaY || 0, now = getTime(); if (((el && el.style && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight)))) ) { return; } if (delta === 0 || (F.current && F.current.canShrink)) { return; } e.stopPropagation(); if (F.lastScroll && (now - F.lastScroll) < 80) { F.lastScroll = now; return; } F.lastScroll = now; if (e.axis) { if (e.axis === e.HORIZONTAL_AXIS) { deltaX = delta * -1; } else if (e.axis === e.VERTICAL_AXIS) { deltaY = delta * -1; } } if ( deltaX === 0 ) { if (deltaY > 0) { F.prev( 'down' ); } else { F.next( 'up' ); } } else { if (deltaX > 0) { F.prev( 'right' ); } else { F.next( 'left' ); } } }); } F.touch.init(); }, rebuild : function() { var current = F.current; current.wrap.find('.fancybox-nav, .fancybox-close, .fancybox-expand').remove(); // Create navigation arrows if (current.arrows && F.group.length > 1) { if (current.loop || current.index > 0) { $( F._translate( current.tpl.prev) ).appendTo(F.inner).bind('click.fb', F.prev); } if (current.loop || current.index < F.group.length - 1) { $( F._translate( current.tpl.next) ).appendTo(F.inner).bind('click.fb', F.next); } } // Create a close button if (current.closeBtn) { $( F._translate( current.tpl.closeBtn) ).appendTo(F.wrap).bind('click.fb', F.close); } // Add expand button to image if (current.expander && current.type === 'image') { $('') .appendTo( F.inner ) .bind('click.fb', F.toggle); if ( !current.canShrink && !current.canExpand) { } } }, // Create upcoming object and prepare for loading the content _start: function( index ) { var coming, type; // Check index and get object from the groups if (F.opts.loop) { if (index < 0) { index = F.group.length + (index % F.group.length); } index = index % F.group.length; } coming = F.group[ index ]; if (!coming) { return false; } // Add all properties coming = $.extend(true, {}, F.opts, coming); /* * Add reference to the group, so it`s possible to access from callbacks, example: * afterLoad : function() { * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); * } */ coming.group = F.group; coming.index = index; // Give a chance for callback or helpers to update coming item (type, title, etc) F.coming = coming; if (false === F.trigger('beforeLoad')) { F.coming = null; return; } F.isActive = true; // Build the neccessary markup F._build(); // If user will press the escape-button, the request will be canceled D.bind('keydown.loading', function(e) { if ((e.which || e.keyCode) === 27) { D.unbind('.loading'); e.preventDefault(); F.cancel(); } }); // Show overlay if (coming.overlay && coming.overlay.showEarly) { F.overlay.open( coming.overlay ); } // Load content type = coming.type; if (type === 'image') { F._loadImage(); } else if (type === 'ajax') { F._loadAjax(); } else if (type === 'iframe') { F._loadIframe(); } else if (type === 'inline') { F._loadInline(); } else if (type === 'html' || type === 'swf') { F._afterLoad(); } else { F._error(); } }, _build : function() { var coming = F.coming, captionType = coming.caption.type, wrap, inner, scrollV, scrollH; coming.wrap = wrap = $('
').appendTo( coming.parent || 'body' ).addClass('fancybox-' + coming.theme); coming.inner = inner = $('
').appendTo( wrap ); coming[ captionType === 'outside' || captionType === 'float' ? 'inner' : 'wrap' ].addClass('fancybox-skin fancybox-' + coming.theme + '-skin'); if (coming.locked && coming.overlay && F.defaults.fixed) { if (!F.lock) { F.lock = $('
').appendTo( wrap.parent() ); } F.lock.unbind().append( wrap ); if (coming.overlay.closeClick) { F.lock.click(function(e) { if ($(e.target).is(F.lock)) { F.close(); } }); } // Compensate missing page scrolling by increasing margin if (D.height() > W.height() || H.css('overflow-y') === 'scroll') { $('*:visible').filter(function(){ return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && $(this).attr('id') !== "fancybox-lock"); }).addClass('fancybox-margin'); H.addClass('fancybox-margin'); } // Workaround for FF jumping bug scrollV = W.scrollTop(); scrollH = W.scrollLeft(); H.addClass('fancybox-lock'); W.scrollTop( scrollV ).scrollLeft( scrollH ); } F.trigger('onReady'); }, _error: function ( type ) { if (!F.coming) { return; } $.extend(F.coming, { type : 'html', autoWidth : true, autoHeight : true, closeBtn : true, minWidth : 0, minHeight : 0, padding : [15, 15, 15, 15], scrolling : 'visible', hasError : type, content : F._translate( F.coming.tpl.error ) }); F._afterLoad(); }, _loadImage: function () { // Reset preload image so it is later possible to check "complete" property var img = F.imgPreload = new Image(); img.onload = function () { this.onload = this.onerror = null; $.extend(F.coming, { width : this.width, height : this.height, content : $(this).addClass('fancybox-image') }); F._afterLoad(); }; img.onerror = function () { this.onload = this.onerror = null; F._error( 'image' ); }; img.src = F.coming.href; if (img.complete !== true || img.width < 1) { F.showLoading(); } }, _loadAjax: function () { var coming = F.coming, href = coming.href, hrefParts, selector; hrefParts = href.split(/\s+/, 2); href = hrefParts.shift(); selector = hrefParts.shift(); F.showLoading(); F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { url: coming.href, error: function (jqXHR, textStatus) { if (F.coming && textStatus !== 'abort') { F._error( 'ajax', jqXHR ); } else { F.hideLoading(); } }, success: function (data, textStatus) { if (textStatus === 'success') { if (selector) { data = $('
').html(data).find(selector); } coming.content = data; F._afterLoad(); } } })); }, _loadIframe: function() { var coming = F.coming, iframe; coming.content = iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling); if (coming.iframe.preload) { F.showLoading(); F._setDimension( coming ); coming.wrap.addClass('fancybox-tmp'); iframe.one('load.fb', function() { if (coming.iframe.preload) { $(this).data('ready', 1); $(this).bind('load.fb', F.update); F._afterLoad(); } }); } iframe.attr('src', coming.href).appendTo(coming.inner); if (!coming.iframe.preload) { F._afterLoad(); } else if (iframe.data('ready') !== 1) { F.showLoading(); } }, _loadInline : function() { var coming = F.coming, href = coming.href; coming.content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 if (coming.content.length) { F._afterLoad(); } else { F._error(); } }, _preloadImages: function() { var group = F.group, current = F.current, len = group.length, cnt = current.preload ? Math.min(current.preload, len - 1) : 0, item, i; for (i = 1; i <= cnt; i += 1) { item = group[ (current.index + i ) % len ]; if (item && item.type === 'image' && item.href) { new Image().src = item.href; } } }, _afterLoad : function() { var current = F.coming, previous = F.current; D.unbind('.loading'); if (!current || F.isActive === false || false === F.trigger('afterLoad', current, previous)) { F.hideLoading(); if (current && current.wrap) { removeWrap( current.wrap ); } if (!previous) { F._afterZoomOut( current ); } F.coming = null; return; } $.extend(F, { wrap : current.wrap.addClass('fancybox-type-' + current.type + ' fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-' + current.theme + '-' + (isTouch ? 'mobile' : 'desktop') + ' ' + current.wrapCSS), inner : current.inner, current : current, previous : previous }); // Set content, margin/padding, caption, etc F._prepare(); // Give a chance for helpers or callbacks to update elements F.trigger('beforeShow', current, previous); F.isOpen = false; F.coming = null; // Set initial dimension F._setDimension(); F.hideLoading(); // Open overlay if is not yet open if (current.overlay && !F.overlay.el) { F.overlay.open( current.overlay ); } F.transitions.open(); }, _prepare : function() { var current = F.current, content = current.content || '', wrap = current.wrap, inner = current.inner, margin = current.margin, padding = current.padding, href = current.href, type = current.type, scrolling = current.scrolling, caption = current.caption, captionText = current.title, captionType = caption.type, placeholder = 'fancybox-placeholder', display = 'fancybox-display', embed; if (type !== 'iframe' && isQuery(content) && content.length) { if (!content.data(placeholder)) { content.data(display, content.css('display')) .data(placeholder, $('
').insertAfter( content ).hide() ); } content = content.show().detach(); current.wrap.bind('onReset', function () { if ($(this).find(content).length) { content.css('display', content.data(display)) .replaceAll( content.data(placeholder) ) .data(placeholder, false) .data(display, false); } }); } if (type === 'swf') { content = ''; embed = ''; $.each(current.swf, function(name, val) { content += ''; embed += ' ' + name + '="' + val + '"'; }); content += ''; } if (!(isQuery(content) && content.parent().is(current.inner))) { current.inner.append( content ); current.content = current.inner.children(':last'); } // Add margin / padding $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { if (margin[ i ]) { wrap.css('margin' + v, getValue(margin[ i ])); } if (padding[ i ]) { if (!(v === 'Bottom' && captionType === 'outside')) { wrap.css('padding' + v, getValue(padding[ i ]) ); } if (captionType === 'outside' || captionType === 'float') { inner.css('border' + v + 'Width', getValue(padding[ i ])); if (v === 'Top' || v === 'Left') { inner.css('margin' + v, getValue(padding[ i ] * -1)); } } } }); // Add caption if ($.isFunction(captionText)) { captionText = captionText.call(current.element, current); } if (isString(captionText) && $.trim(captionText) !== '') { current.caption.wrap = $('
' + captionText + '
').appendTo( current[ captionType === 'over' ? 'inner' : 'wrap' ] ); if (captionType === 'float') { current.caption.wrap.width( F.getViewport().w - (F.wrap.outerWidth(true) - F.inner.width() ) ).wrapInner('
'); } } }, _setDimension: function( object ) { var view = F.getViewport(), current = object || F.current, wrap = current.wrap, inner = current.inner, width = current.width, height = current.height, minWidth = current.minWidth, minHeight = current.minHeight, maxWidth = current.maxWidth, maxHeight = current.maxHeight, margin = current.margin, scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, margin = current.margin, padding = current.padding, scrolling = current.scrolling, steps = 1, scrollingX, scrollingY, hSpace, wSpace, origWidth, origHeight, ratio, iframe, body, maxWidth_, maxHeight_, width_, height_, canShrink, canExpand; // Set scrolling scrolling = scrolling.split(','); scrollingX = scrolling[0]; scrollingY = scrolling[1] || scrollingX; current.inner .css('overflow-x', scrollingX === 'yes' ? 'scroll' : (scrollingX === 'no' ? 'hidden' : scrollingX)) .css('overflow-y', scrollingY === 'yes' ? 'scroll' : (scrollingY === 'no' ? 'hidden' : scrollingY)); wSpace = margin[1] + margin[3] + padding[1] + padding[3]; hSpace = margin[0] + margin[2] + padding[0] + padding[2]; // Calculations for the content minWidth = getScalar( isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth ); maxWidth = getScalar( isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth ); minHeight = getScalar( isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight ); maxHeight = getScalar( isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight ); origWidth = getScalar( isPercentage(width) ? getScalar(width, 'w') - wSpace : width ); origHeight = getScalar( isPercentage(height) ? getScalar(height, 'h') - hSpace : height ); if (current.fitToView) { maxWidth = Math.min(maxWidth, getScalar('100%', 'w') - wSpace ); maxHeight = Math.min(maxHeight, getScalar('100%', 'h') - hSpace ); } maxWidth_ = view.w; maxHeight_ = view.h; if (current.type === 'iframe') { iframe = current.content; wrap.removeClass('fancybox-tmp'); if ((current.autoWidth || current.autoHeight) && iframe && iframe.data('ready') === 1) { try { if (iframe[0].contentWindow && iframe[0].contentWindow.document.location) { body = iframe.contents().find('body'); inner.addClass( 'fancybox-tmp' ); inner.width( screen.width - wSpace ).height( 99999 ); if (scrollOut) { body.css('overflow-x', 'hidden'); } if (current.autoWidth) { origWidth = body.outerWidth(true); } if (current.autoHeight) { origHeight = body.outerHeight(true); } inner.removeClass( 'fancybox-tmp' ); } } catch (e) {} } } else if ( (current.autoWidth || current.autoHeight) && !(current.type === 'image' || current.type === 'swf') ) { inner.addClass( 'fancybox-tmp' ); // Set width or height in case we need to calculate only one dimension if (current.autoWidth) { inner.width( 'auto' ); } else { inner.width( maxWidth ); } if (current.autoHeight) { inner.height( 'auto' ); } else { inner.height( maxHeight ); } if (current.autoWidth) { origWidth = inner[0].scrollWidth || inner.width(); } if (current.autoHeight) { origHeight = inner[0].scrollHeight || inner.height(); } inner.removeClass( 'fancybox-tmp' ); } width = origWidth; height = origHeight; ratio = origWidth / origHeight; if (!current.autoResize) { wrap.css({ width : getValue( width ), height : 'auto' }); inner.css({ width : getValue( width ), height : getValue( height ) }); return; } if (current.aspectRatio) { if (width > maxWidth) { width = maxWidth; height = width / ratio; } if (height > maxHeight) { height = maxHeight; width = height * ratio; } if (width < minWidth) { width = minWidth; height = width / ratio; } if (height < minHeight) { height = minHeight; width = height * ratio; } } else { width = Math.max(minWidth, Math.min(width, maxWidth)); if (current.autoHeight && current.type !== 'iframe') { inner.width( width ); origHeight = height = inner[0].scrollHeight; } height = Math.max(minHeight, Math.min(height, maxHeight)); } // Wrap element has to have fixed width, because long title can expand it wrap.css({ width : getValue( width ), height : 'auto' }); inner.css({ width : getValue( width ), height : getValue( height ) }); width_ = getScalar( wrap.outerWidth(true) ); height_ = getScalar( wrap.outerHeight(true) ); if (current.fitToView) { // Since we do not know how many lines will be at the final, we need to // resize box till it fits inside max dimensions if (current.aspectRatio) { while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { if (steps++ > 30) { break; } height = Math.max(minHeight, Math.min(maxHeight, height - 10)); width = getScalar(height * ratio); if (width < minWidth) { width = minWidth; height = getScalar(width / ratio); } if (width > maxWidth) { width = maxWidth; height = getScalar(width / ratio); } wrap.css({ width : getValue( width ) }); inner.css({ width : getValue( width ), height : getValue( height ) }); width_ = getScalar( wrap.outerWidth(true) ); height_ = getScalar( wrap.outerHeight(true) ); } } else { width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_ ))); height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_ ))); } } if (scrollOut && scrollingX === 'auto' && (height < inner[0].scrollHeight || (isQuery(current.content) && current.content[0] && height < current.content[0].offsetHeight)) && (width + wSpace + scrollOut) < maxWidth) { width += scrollOut; } wrap.css({ width : width }); inner.css({ width : getValue( width ), height : getValue( height ) }); width_ = getScalar( wrap.outerWidth(true) ); height_ = getScalar( wrap.outerHeight(true) ); canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; canExpand = (width_ < maxWidth_ || height_ < maxHeight_) && ( current.aspectRatio ? (width < maxWidth && height < maxHeight && width < origWidth && height < origHeight) : ((width < maxWidth || height < maxHeight) && (width < origWidth || height < origHeight)) ); current.canShrink = canShrink; current.canExpand = canExpand; if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { inner.height('auto'); } }, _getPosition: function( object ) { var obj = object || F.current, wrap = obj.wrap, view = F.getViewport(), pos = {}, top = view.y, left = view.x; pos = { top : getValue( Math.max(top, top + ((view.h - wrap.outerHeight(true)) * obj.topRatio)) ), left : getValue( Math.max(left, left + ((view.w - wrap.outerWidth(true)) * obj.leftRatio)) ), width : getValue( wrap.width() ), height : getValue( wrap.height() ) }; return pos; }, _afterZoomIn : function() { var current = F.current; if (!current) { return; } if (F.lock) { F.lock.css('overflow', 'auto'); } F.isOpen = F.isOpened = true; F.rebuild(); F.rebind(); if (current.caption && current.caption.wrap) { current.caption.wrap.show().css({ 'visibility' : 'visible', 'opacity' : 0, 'left' : 0 }) .animate({opacity:1}, "fast"); } F.update(); F.wrap.css('overflow', 'visible').addClass('fancybox-open').focus(); F[ F.wrap.hasClass('fancybox-skin') ? 'wrap' : 'inner' ].addClass('fancybox-' + current.theme + '-skin-open'); if (current.caption && current.caption.wrap) { current.caption.wrap.show().css('left', 0).animate({opacity:1}, "fast"); } // Add empty element to simulate bottom margin, this trick helps to avoid extra element if (current.margin[2] > 0) { $('
').css('height', getValue( current.margin[2] - 2) ).appendTo( F.wrap ); } F.trigger('afterShow'); F._preloadImages(); if (current.autoPlay && !F.slideshow.isActive) { F.slideshow.start(); } }, _afterZoomOut : function(obj) { var cleanup = function() { removeWrap('.fancybox-wrap'); }; F.hideLoading(); obj = obj || F.current; if (obj && obj.wrap) { obj.wrap.hide(); } $.extend(F, { group : [], opts : {}, coming : null, current : null, isActive : false, isOpened : false, isOpen : false, isClosing : false, wrap : null, skin : null, inner : null }); F.trigger('afterClose', obj); if (!F.coming && !F.current) { if (obj.overlay) { F.overlay.close( obj.overlay, cleanup ); } else { cleanup(); } } }, _translate : function( str ) { var obj = F.coming || F.current, arr = obj.locales[ obj.locale ]; return str.replace(/\{\{(\w+)\}\}/g, function(match, n) { var value = arr[n]; if (value === undefined) { return match; } return value; }); } }); /* * Transition object */ F.transitions = { _getOrig: function( object ) { var obj = object || F.current, wrap = obj.wrap, element = obj.element, orig = obj.orig, view = F.getViewport(), pos = {}, width = 50, height = 50; if (!orig && element && element.is(':visible')) { orig = element.find('img:first:visible'); if (!orig.length) { orig = element; } } // If there is no orig element, maybe only the first thumbnail is visible if (!orig && obj.group[0].element) { orig = obj.group[0].element.find('img:visible:first'); } if (isQuery(orig) && orig.is(':visible')) { pos = orig.offset(); if (orig.is('img')) { width = orig.outerWidth(); height = orig.outerHeight(); } if (F.lock) { pos.top -= W.scrollTop(); pos.left -= W.scrollLeft(); } } else { pos.top = view.y + (view.h - height) * obj.topRatio; pos.left = view.x + (view.w - width) * obj.leftRatio; } pos = { top : getValue( pos.top - (wrap.outerHeight(true) - wrap.height() ) * 0.5 ), left : getValue( pos.left - (wrap.outerWidth(true) - wrap.width() ) * 0.5 ), width : getValue( width ), height : getValue( height ) }; return pos; }, _getCenter: function( object ) { var obj = object || F.current, wrap = obj.wrap, view = F.getViewport(), pos = {}, top = view.y, left = view.x; pos = { top : getValue( Math.max(top, top + ((view.h - wrap.outerHeight(true)) * obj.topRatio)) ), left : getValue( Math.max(left, left + ((view.w - wrap.outerWidth(true)) * obj.leftRatio)) ), width : getValue( wrap.width() ), height : getValue( wrap.height() ) }; return pos; }, _prepare : function( object, forClosing ) { var obj = object || F.current, wrap = obj.wrap, inner = obj.inner; // Little trick to avoid animating both elements and to improve performance wrap.height( wrap.height() ); inner.css({ 'width' : (inner.width() * 100 / wrap.width() ) + '%', 'height' : (Math.floor( (inner.height() * 100 / wrap.height() ) * 100 ) / 100 ) + '%' }); if (forClosing === true) { wrap.find('.fancybox-title, .fancybox-spacer, .fancybox-close, .fancybox-nav').remove(); } inner.css('overflow', 'hidden'); }, fade : function( object, stage ) { var pos = this._getCenter( object ), opa = {opacity: 0}; return ((stage === 'open' || stage === 'changeIn') ? [ $.extend(pos, opa), {opacity: 1} ] : [ {}, opa ]); }, drop : function( object, stage ) { var a = $.extend(this._getCenter( object ), {opacity: 1}), b = $.extend({}, a, {opacity: 0, top: getValue( Math.max( F.getViewport().y - object.margin[0], getScalar( a.top ) - 200 ) )}); return ((stage === 'open' || stage === 'changeIn') ? [ b, a ] : [ {}, b ]); }, elastic : function( object, stage ) { var wrap = object.wrap, margin = object.margin, view = F.getViewport(), direction = F.direction, pos = this._getCenter( object ), from = $.extend({}, pos), to = $.extend({}, pos), prop, amount, value; if (stage === 'open') { from = this._getOrig( object ); } else if (stage === 'close') { from = {}; to = this._getOrig( object ); } else if (direction) { // Calculate max distance and try to avoid scrollbars prop = (direction === 'up' || direction === 'down') ? 'top' : 'left'; amount = (direction === 'up' || direction === 'left') ? 200 : -200; if (stage === 'changeIn') { value = getScalar(from[ prop ]) + amount; if (direction === 'left') { // from viewport right to center value = Math.min( value, view.x + view.w - margin[3] - wrap.outerWidth() - 1 ); } else if (direction === 'right') { // from viewport left to center value = Math.max( value, view.x - margin[1] ); } else if (direction === 'up') { // from viewport bottom to center value = Math.min( value, view.y + view.h - margin[0] - wrap.outerHeight() - 1); } else { // down - from viewport top to center value = Math.max( value, view.y - margin[2] ); } from[ prop ] = value; } else { value = getScalar(wrap.css(prop)) - amount; from = {}; if (direction === 'left') { // from viewport center to left value = Math.max( value, view.x - margin[3] ); } else if (direction === 'right') { // from viewport center to right value = Math.min( value, view.x + view.w - margin[1] - wrap.outerWidth() - 1 ); } else if (direction === 'up') { // from viewport center to top value = Math.max( value, view.y - margin[0] ); } else { // down - from center to bottom value = Math.min( value, view.y + view.h - margin[2] - wrap.outerHeight() - 1 ); } to[ prop ] = value; } } if (stage === 'open' || stage === 'changeIn') { from.opacity = 0; to.opacity = 1; } else { to.opacity = 0; } return [ from, to ]; }, open : function() { var current = F.current, previous = F.previous, direction = F.direction, effect, pos, speed, easing, stage; if (previous) { previous.wrap.stop(true).removeClass('fancybox-opened'); } if ( F.isOpened ) { effect = current.nextEffect, speed = current.nextSpeed; easing = current.nextEasing; stage = 'changeIn'; } else { effect = current.openEffect; speed = current.openSpeed; easing = current.openEasing; stage = 'open'; } /* * Open current item */ if (effect === 'none') { F._afterZoomIn(); } else { pos = this[ effect ]( current, stage ); if (effect === 'elastic') { this._prepare( current ); } current.wrap.css( pos[ 0 ] ); current.wrap.animate( pos[ 1 ], speed, easing, F._afterZoomIn ); } /* * Close previous item */ if (previous) { if (!F.isOpened || previous.prevEffect === 'none') { // Remove previous item if it has not fully opened removeWrap( $('.fancybox-wrap').not( current.wrap ) ); } else { previous.wrap.stop(true).removeClass('fancybox-opened'); pos = this[ previous.prevEffect ]( previous, 'changeOut' ); this._prepare( previous, true ); previous.wrap.animate( pos[ 1 ], previous.prevSpeed, previous.prevEasing, function() { removeWrap( previous.wrap ); } ); } } }, close : function() { var current = F.current, wrap = current.wrap.stop(true).removeClass('fancybox-opened'), effect = current.closeEffect, pos; if (effect === 'none') { return F._afterZoomOut(); } this._prepare( current, true ); pos = this[ effect ]( current, 'close' ); wrap.addClass('fancybox-animating') .animate( pos[ 1 ], current.closeSpeed, current.closeEasing, F._afterZoomOut ); } }; /* * Slideshow object */ F.slideshow = { _clear : function () { if (this._timer) { clearTimeout(this._timer); } }, _set : function () { this._clear(); if (F.current && this.isActive) { this._timer = setTimeout(F.next, this._speed); } }, _timer : null, _speed : null, isActive : false, start : function ( speed ) { var current = F.current; if (current && (current.loop || current.index < current.group.length - 1)) { this.stop(); this.isActive = true; this._speed = speed || current.playSpeed; D.bind({ 'beforeLoad.player' : $.proxy(this._clear, this), 'onUpdate.player' : $.proxy(this._set, this), 'onCancel.player beforeClose.player' : $.proxy(this.stop, this) }); this._set(); F.trigger('onPlayStart'); } }, stop : function () { this._clear(); D.unbind('.player'); this.isActive = false; this._timer = this._speed = null; F.trigger('onPlayEnd'); }, toggle : function() { if (this.isActive) { this.stop(); } else { this.start.apply(this, arguments ); } } }; /* * Overlay object */ F.overlay = { el : null, // current handle theme : '', // current theme // Public methods open : function(opts) { var that = this, el = this.el, fixed = F.defaults.fixed, opacity, theme; opts = $.extend({}, F.defaults.overlay, opts); if (el) { el.stop(true).removeAttr('style').unbind('.overlay'); } else { el = $('
').appendTo( opts.parent || 'body' ); } if (opts.closeClick) { el.bind('click.overlay', function(e) { // fix Android touch event bubbling issue if (F.lastTouch && (getTime() - F.lastTouch) < 300) { return false; } if (F.isActive) { F.close(); } else { that.close(); } return false; }); } theme = opts.theme || (F.coming ? F.coming.theme : 'default'); if (theme !== this.theme) { el.removeClass('fancybox-' + this.theme + '-overlay') } this.theme = theme; el.addClass('fancybox-' + theme + '-overlay').css( opts.css ); opacity = el.css('opacity'); if (!this.el && opacity < 1 && opts.speedIn) { el.css({ opacity : 0, filter : 'alpha(opacity=0)' // This fixes IE flickering }) .fadeTo( opts.speedIn, opacity ); } this.el = el; if (!fixed) { W.bind('resize.overlay', $.proxy( this.update, this) ); this.update(); } }, close : function(opts, callback) { opts = $.extend({}, F.defaults.overlay, opts); if (this.el) { this.el.stop(true).fadeOut(opts.speedOut, function() { W.unbind('resize.overlay'); $('.fancybox-overlay').remove(); F.overlay.el = null; if ($.isFunction(callback)) { callback(); } }); } }, update : function () { // Reset width/height so it will not mess this.el.css({width: '100%', height: '100%'}); this.el.width(D.width()).height(D.height()); } }; /* * Touch object - adds swipe left/right events */ F.touch = { startX : 0, wrapX : 0, dx : 0, isMoving : false, _start : function(e) { var current = F.current, data = e.originalEvent.touches ? e.originalEvent.touches[0] : e, now = getTime(); if (!F.isOpen || F.wrap.is(':animated') || !( $(e.target).is(F.inner) || $(e.target).parent().is(F.inner) )) { return; } if (F.lastTouch && (now - F.lastTouch) < 300) { e.preventDefault(); F.lastTouch = now; this._cancel(true); F.toggle(); return false; } F.lastTouch = now; if (F.wrap && F.wrap.outerWidth() > F.getViewport().w) { return; } e.preventDefault(); if (data && F.wrap && F.wrap.outerWidth() < F.getViewport().w) { this.startX = data.pageX; this.wrapX = F.wrap.position().left; this.isMoving = true; F.inner .bind('touchmove.fb', $.proxy(this._move, this) ) .one("touchend.fb touchcancel.fb", $.proxy(this._cancel, this) ); } }, _move : function(e) { var data = e.originalEvent.touches ? e.originalEvent.touches[0] : e, dx = this.startX - data.pageX; if (!this.isMoving || !F.isOpen) { return; } this.dx = dx; if (F.current.wrap.outerWidth(true) <= W.width()) { if (Math.abs(dx) >= 50) { e.preventDefault(); this.last = 0; this._cancel(true); if (dx > 0) { F.next('left'); } else { F.prev('right'); } } else if (Math.abs(dx) > 3) { e.preventDefault(); this.last = 0; F.wrap.css('left', this.wrapX - dx); } } }, _clear : function() { this.startX = this.wrapX = this.dx = 0; this.isMoving = false; }, _cancel : function( stop ) { if (F.inner) { F.inner.unbind('touchmove.fb'); } if (F.isOpen && Math.abs(this.dx) > 3) { F.reposition(false); } this._clear(); }, init : function() { var that = this; if (F.inner && F.touch) { this._cancel(true); F.inner.bind('touchstart.fb', $.proxy(this._start, this)); } } }; /* * Add default easing */ if (!$.easing.easeOutQuad) { $.easing.easeOutQuad = function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; }; } /* * */ D.ready(function() { var w1, w2, scrollV, scrollH; // Tests that need a body at doc ready if ( $.scrollbarWidth === undefined ) { $.scrollbarWidth = function() { var parent = $('
').appendTo('body'), child = parent.children(), width = child.innerWidth() - child.height( 99 ).innerWidth(); parent.remove(); return width; }; } if ( $.support.fixedPosition === undefined ) { $.support.fixedPosition = (function() { var elem = $('
').appendTo('body'), fixed = elem.css( 'position' ) === 'fixed' && ((elem[0].offsetTop > 18 && elem[0].offsetTop < 22) || elem[0].offsetTop === 15 ); elem.remove(); return fixed; }()); } $.extend(F.defaults, { scrollbarWidth : $.scrollbarWidth(), fixed : $.support.fixedPosition, parent : $('body') }); // Quick and dirty code to get page scroll-bar width and create CSS style // Workaround for FF jumping bug scrollV = W.scrollTop(); scrollH = W.scrollLeft(); w1 = $(window).width(); H.addClass('fancybox-lock-test'); w2 = $(window).width(); H.removeClass('fancybox-lock-test'); W.scrollTop( scrollV ).scrollLeft( scrollH ); F.lockMargin = (w2 - w1); $("").appendTo("head"); // Auto start if ($("script[src*='jquery.fancybox.js']").attr('src').match(/autorun/) ){ $("a[href$='.jpg'],a[href$='.png'],a[href$='.gif'],.fancybox").attr('data-fancybox-group', 'gallery').fancybox(); } }); // jQuery plugin initialization $.fn.fancybox = function (options) { var that = this, selector = this.length ? this.selector : false, live = (selector && selector.indexOf('()') < 0 && !(options && options.live === false)); var handler = function(e) { var collection = live ? $(selector) : that, group = $(this).blur(), param = options.groupAttr || 'data-fancybox-group', value = group.attr( param ), tmp = this.rel; if (!value && tmp && tmp !== 'nofollow') { param = 'rel'; value = tmp; } if (value) { group = collection.filter('[' + param + '="' + value + '"]'); options.index = group.index( this ); } if (group.length) { e.preventDefault(); F.open(group.get(), options); } }; options = options || {}; if (live) { D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-close,.fancybox-nav,.fancybox-wrap')", 'click.fb-start', handler); } else { that.unbind('click.fb-start').bind('click.fb-start', handler); } return this; }; }(window, document, jQuery)); /* Including js file: /javascript/fancybox/jquery.fancybox-thumbs.js */ /*! * Thumbnail helper for fancyBox * version: 2.0.0 (Tue, 29 Jan 2013) * @requires fancyBox v3.0 or later * * Usage: * $(".fancybox").fancybox({ * helpers : { * thumbs: { * width : 50, * height : 50 * } * } * }); * */ (function ($) { //Shortcut for fancyBox object var F = $.fancybox; //Add helper object F.helpers.thumbs = { defaults : { width : 75, // thumbnail width height : 50, // thumbnail height position : 'bottom', // 'top' or 'bottom' source : function() {} // callback for setting cutom thumb url }, list : null, items : null, count : 0, _create : function( obj ) { var opts = this.opts, str, list; str = ''; $.each(obj.group, function (i) { str += '
  • '; }); this.list = list = $('
      ' + str + '
    '); this.items = list.children(); this.count = this.items.length; this.wrap = $('
    ') .append(list) .wrapInner('
    ') .wrapInner('
    ') .appendTo('body'); $('') .click( $.proxy(this.prev, this) ) .prependTo( this.wrap ); $('') .click( $.proxy(this.next, this) ) .appendTo( this.wrap ); //Set dimensions and get initial width list.find('a').width( opts.width ).height( opts.height ); this.width = this.items.outerWidth(true); this.height = this.items.outerHeight(true); list.width( this.width * this.count ).height( this.height ); }, _loadPage : function() { var that = this, link, item, src; var callback = function( href ) { that._setThumb( link, href ); }; if (!this.list) { return; } // Find next one that is not already loaded link = this.list.find('a').slice( this.start, this.end + 1).not('.ready').first(); if (link && link.length) { link.addClass('ready'); item = F.group[ link.data('index') ]; href = this._getThumb( item, callback ); if ($.type(href) === 'string') { callback( href ); } else if (!href) { this._loadPage(); } } }, _getThumb : function( item, callback ) { var that = this, href, rez; // First, call callback href = this.opts.source( item, callback ); // Try to find thumbnail image from the link if (!href && item.element) { href = $(item.element).find('img').attr('src'); } // Try to match youtube or vimeo if (!href && (rez = item.href.match(/(youtube\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i))) { href = 'http://img.youtube.com/vi/' + rez[ 3 ] + '/mqdefault.jpg'; } if (!href && (rez = item.href.match(/(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/))) { $.getJSON('http://www.vimeo.com/api/v2/video/' + rez[ 1 ] + '.json?callback=?', {format: "json"}, function(data) { callback( data[0].thumbnail_small ); }); return true; } // If not found and item type is image, then use link url instead if (!href && item.type === 'image' && item.href) { href = item.href; } return href; }, _setThumb : function( link, thumbUrl ) { var that = this; var go = function() { // Start loading next thumb that._loadPage(); } if (!this.list) { return; } $("") .load(function() { var width = this.width, height = this.height, thumbWidth = link.width(), thumbHeight = link.height(), widthRatio, heightRatio; if (!that.wrap || !width || !height) { go(); return; } //Calculate thumbnail width/height and center it widthRatio = width / thumbWidth; heightRatio = height / thumbHeight; if (widthRatio >= 1 && heightRatio >= 1) { if (widthRatio > heightRatio) { width = width / heightRatio; height = thumbHeight; } else { width = thumbWidth; height = height / widthRatio; } } $(this).css({ width : Math.floor(width), height : Math.floor(height), 'margin-top' : Math.floor(thumbHeight * 0.3 - height * 0.3 ), 'margin-left' : Math.floor(thumbWidth * 0.5 - width * 0.5 ) }) .appendTo( link ); go(); }) .error( go ) .attr( 'src', thumbUrl ); }, _move : function( page ) { var left = 0, speed = 400, pages, start, end; if (!this.wrap) { return; } pages = Math.ceil( this.count / this.itemsMin ); if (page === undefined) { page = Math.floor( F.current.index / this.itemsMin ) + 1; } $(".fancybox-thumb-prev, .fancybox-thumb-next").hide(); if ( pages < 2 ) { $.extend(this, { pages : pages, page : 1, start : 0, end : this.count }); this.list.stop(true).css({ 'margin-left' : 'auto', 'margin-right' : 'auto', 'left' : 0 }); this._loadPage(); return; } if (page <= 1) { page = 1; } else { $(".fancybox-thumb-prev").show(); } if (page >= pages) { page = pages; } else { $(".fancybox-thumb-next").show(); } start = (page - 1) * this.itemsMin; end = (start + this.itemsMax) - 1; left = (this.width * this.itemsMin * (page - 1) * -1); if (this.left === left) { return; } $.extend(this, { pages : pages, page : page, start : start, end : end, left : left }); this._loadPage(); this.list.stop(true).animate({'margin-left' : left + 'px'}, speed); }, prev : function() { this._move( this.page - 1 ); }, next : function() { this._move( this.page + 1 ); }, afterLoad : function(opts, obj) { var pos = opts.position === 'bottom' ? 2 : 0; //Remove self if gallery does not have at least two items if (obj.group.length < 2) { obj.helpers.thumbs = false; return; } if (!this.wrap) { this._create( obj ); } if (opts.margin !== false) { obj.margin[ pos ] = Math.max(((this.height) + 40), obj.margin[ pos ] ); } }, beforeShow : function(opts, obj) { if (this.items) { this.items.removeClass('fancybox-thumb-active'); this.current = this.list.find("a[data-index='" + obj.index + "']").parent().addClass('fancybox-thumb-active'); } }, onUpdate: function() { if (!this.wrap) { return; } this.wrap.width( F.getViewport().w ); this.view = this.list.parent().innerWidth(); this.itemsMin = Math.floor( this.view / this.width ); this.itemsMax = Math.ceil( this.view / this.width ); this._move(); }, beforeClose : function() { // Remove thumbnails if (this.wrap) { this.wrap.stop(true).remove(); } $.extend(this, { pages : 0, page : 0, start : 0, end : 0, count : 0, items : null, left : null, wrap : null, list : null }); } } }(jQuery)); /* Including js file: /javascript/jquery.slicknav.min.js */ /*! SlickNav Responsive Mobile Menu (c) 2014 Josh Cope licensed under MIT */ !function(e,n,t){function a(n,t){this.element=n,this.settings=e.extend({},i,t),this._defaults=i,this._name=s,this.init()}var i={label:"MENU",duplicate:!0,duration:200,easingOpen:"swing",easingClose:"swing",closedSymbol:"►",openedSymbol:"▼",prependTo:"body",appendTo:"",parentTag:"a",closeOnClick:!1,allowParentLinks:!1,nestedParentLinks:!0,showChildren:!1,removeIds:!1,removeClasses:!1,brand:"",init:function(){},beforeOpen:function(){},beforeClose:function(){},afterOpen:function(){},afterClose:function(){}},s="slicknav",l="slicknav";a.prototype.init=function(){var t,a,i=this,s=e(this.element),o=this.settings;if(o.duplicate?(i.mobileNav=s.clone(),i.mobileNav.removeAttr("id"),i.mobileNav.find("*").each(function(n,t){e(t).removeAttr("id")})):(i.mobileNav=s,i.mobileNav.removeAttr("id"),i.mobileNav.find("*").each(function(n,t){e(t).removeAttr("id")})),i.mobileNav.find("*").each(function(n,t){e(t).css({padding:"",marging:"",width:""})}),o.removeClasses&&(i.mobileNav.removeAttr("class"),i.mobileNav.find("*").each(function(n,t){e(t).removeAttr("class")})),t=l+"_icon",""===o.label&&(t+=" "+l+"_no-text"),"a"==o.parentTag&&(o.parentTag='a href="#"'),i.mobileNav.attr("class",l+"_nav"),a=e('
    '),""!==o.brand){var r=e('
    '+o.brand+"
    ");e(a).append(r)}i.btn=e(["<"+o.parentTag+' aria-haspopup="true" tabindex="0" class="'+l+"_btn "+l+'_collapsed">',''+o.label+"",'','','','',"",""].join("")),e(a).append(i.btn),""!==o.appendTo?e(o.appendTo).append(a):e(o.prependTo).prepend(a),a.append(i.mobileNav);var d=i.mobileNav.find("li");e(d).each(function(){var n=e(this),t={};if(t.children=n.children("ul").attr("role","menu"),n.data("menu",t),t.children.length>0){var a=n.contents(),s=!1,r=[];e(a).each(function(){return e(this).is("ul")?!1:(r.push(this),void(e(this).is("a")&&(s=!0)))});var d=e("<"+o.parentTag+' role="menuitem" aria-haspopup="true" tabindex="-1" class="'+l+'_item"/>');if(o.allowParentLinks&&!o.nestedParentLinks&&s)e(r).wrapAll('').parent();else{var c=e(r).wrapAll(d).parent();c.addClass(l+"_row")}o.showChildren?n.addClass(l+"_open"):n.addClass(l+"_collapsed"),n.addClass(l+"_parent");var p=e(''+(o.showChildren?o.openedSymbol:o.closedSymbol)+"");o.allowParentLinks&&!o.nestedParentLinks&&s&&(p=p.wrap(d).parent()),e(r).last().after(p)}else 0===n.children().length&&n.addClass(l+"_txtnode");n.children("a").attr("role","menuitem").click(function(n){o.closeOnClick&&!e(n.target).parent().closest("li").hasClass(l+"_parent")&&e(i.btn).click()}),o.closeOnClick&&o.allowParentLinks&&(n.children("a").children("a").click(function(n){e(i.btn).click()}),n.find("."+l+"_parent-link a:not(."+l+"_item)").click(function(n){e(i.btn).click()}))}),e(d).each(function(){var n=e(this).data("menu");o.showChildren||i._visibilityToggle(n.children,null,!1,null,!0)}),i._visibilityToggle(i.mobileNav,null,!1,"init",!0),i.mobileNav.attr("role","menu"),e(n).mousedown(function(){i._outlines(!1)}),e(n).keyup(function(){i._outlines(!0)}),e(i.btn).click(function(e){e.preventDefault(),i._menuToggle()}),i.mobileNav.on("click","."+l+"_item",function(n){n.preventDefault(),i._itemClick(e(this))}),e(i.btn).keydown(function(e){var n=e||event;13==n.keyCode&&(e.preventDefault(),i._menuToggle())}),i.mobileNav.on("keydown","."+l+"_item",function(n){var t=n||event;13==t.keyCode&&(n.preventDefault(),i._itemClick(e(n.target)))}),o.allowParentLinks&&o.nestedParentLinks&&e("."+l+"_item a").click(function(e){e.stopImmediatePropagation()})},a.prototype._menuToggle=function(e){var n=this,t=n.btn,a=n.mobileNav;t.hasClass(l+"_collapsed")?(t.removeClass(l+"_collapsed"),t.addClass(l+"_open")):(t.removeClass(l+"_open"),t.addClass(l+"_collapsed")),t.addClass(l+"_animating"),n._visibilityToggle(a,t.parent(),!0,t)},a.prototype._itemClick=function(e){var n=this,t=n.settings,a=e.data("menu");a||(a={},a.arrow=e.children("."+l+"_arrow"),a.ul=e.next("ul"),a.parent=e.parent(),a.parent.hasClass(l+"_parent-link")&&(a.parent=e.parent().parent(),a.ul=e.parent().next("ul")),e.data("menu",a)),a.parent.hasClass(l+"_collapsed")?(a.arrow.html(t.openedSymbol),a.parent.removeClass(l+"_collapsed"),a.parent.addClass(l+"_open"),a.parent.addClass(l+"_animating"),n._visibilityToggle(a.ul,a.parent,!0,e)):(a.arrow.html(t.closedSymbol),a.parent.addClass(l+"_collapsed"),a.parent.removeClass(l+"_open"),a.parent.addClass(l+"_animating"),n._visibilityToggle(a.ul,a.parent,!0,e))},a.prototype._visibilityToggle=function(n,t,a,i,s){var o=this,r=o.settings,d=o._getActionItems(n),c=0;a&&(c=r.duration),n.hasClass(l+"_hidden")?(n.removeClass(l+"_hidden"),s||r.beforeOpen(i),n.slideDown(c,r.easingOpen,function(){e(i).removeClass(l+"_animating"),e(t).removeClass(l+"_animating"),s||r.afterOpen(i)}),n.attr("aria-hidden","false"),d.attr("tabindex","0"),o._setVisAttr(n,!1)):(n.addClass(l+"_hidden"),s||r.beforeClose(i),n.slideUp(c,this.settings.easingClose,function(){n.attr("aria-hidden","true"),d.attr("tabindex","-1"),o._setVisAttr(n,!0),n.hide(),e(i).removeClass(l+"_animating"),e(t).removeClass(l+"_animating"),s?"init"==i&&r.init():r.afterClose(i)}))},a.prototype._setVisAttr=function(n,t){var a=this,i=n.children("li").children("ul").not("."+l+"_hidden");t?i.each(function(){var n=e(this);n.attr("aria-hidden","true");var i=a._getActionItems(n);i.attr("tabindex","-1"),a._setVisAttr(n,t)}):i.each(function(){var n=e(this);n.attr("aria-hidden","false");var i=a._getActionItems(n);i.attr("tabindex","0"),a._setVisAttr(n,t)})},a.prototype._getActionItems=function(e){var n=e.data("menu");if(!n){n={};var t=e.children("li"),a=t.find("a");n.links=a.add(t.find("."+l+"_item")),e.data("menu",n)}return n.links},a.prototype._outlines=function(n){n?e("."+l+"_item, ."+l+"_btn").css("outline",""):e("."+l+"_item, ."+l+"_btn").css("outline","none")},a.prototype.toggle=function(){var e=this;e._menuToggle()},a.prototype.open=function(){var e=this;e.btn.hasClass(l+"_collapsed")&&e._menuToggle()},a.prototype.close=function(){var e=this;e.btn.hasClass(l+"_open")&&e._menuToggle()},e.fn[s]=function(n){var t=arguments;if(void 0===n||"object"==typeof n)return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new a(this,n))});if("string"==typeof n&&"_"!==n[0]&&"init"!==n){var i;return this.each(function(){var l=e.data(this,"plugin_"+s);l instanceof a&&"function"==typeof l[n]&&(i=l[n].apply(l,Array.prototype.slice.call(t,1)))}),void 0!==i?i:this}}}(jQuery,document,window);