1$(document).on("ready",function(){forms.init()}),$(window).on("load",function(){ems.init()}),jQuery.isMobile=function(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}},jQuery.browser=function(t){return matched=function(t){t=t.toLowerCase();var i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie)[\s?]([\w.]+)/.exec(t)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:i[1]||"",version:i[2]||"0"}}(navigator.userAgent),matched.browser="trident"==matched.browser?"msie":matched.browser,"version"===t?matched.version:matched.browser};var forms={init:function(){for(var t in forms)forms[t].init&&forms[t].init()},input:{}};forms.input.init=function(){$(".control-type-text, .control-type-password, .control-type-number, .control-type-email, .control-type-url, .control-type-date, .control-type-textarea").each(function(){for(var t=$(this).attr("class").split(/\s+/),i=0;i<t.length;i++)if(-1<t[i].indexOf("control-type-")){var o=t[i].split("-"),e="textarea"!==o[2]?$(this).find('input[type="'+o[2]+'"]'):$(this).find("textarea");break}e.val()||e.closest(".control-group").addClass("has-empty"),e.prop("disabled")&&e.closest(".control-group").addClass("has-disabled"),e.on({focus:function(){$(this)[0].hasAttribute("readonly")||($(".control-group.has-focus").removeClass("has-focus"),$(this).closest(".control-group").addClass("has-focus"))},"change blur":function(){$(this).val()?$(this).closest(".control-group").removeClass("has-empty has-error"):$(this).closest(".control-group").addClass("has-empty"),$(this).closest(".control-group").removeClass("has-focus")}})})},forms.inputFile={},forms.inputFile.init=function(){$(".control-type-file").find('input[type="file"]').each(function(){var t=$(this);0===t.closest(".control-group").find("img").length&&t.closest(".control-group").addClass("has-empty"),t.prop("disabled")&&t.closest(".control-group").addClass("has-disabled");$("<a/>
1",{href:"javascript:void(0)",class:"btn btn-error btn-small"}).html('<i class="fa fa-times"></i>').on({click:function(){$(this).closest(".controls").find('input[type="file"]').val(""),$(this).closest(".controls").find("img").remove(),$(this).closest(".controls").find(".input-filename").text(""),$(this).closest(".control-group").addClass("has-empty")}}).insertAfter(t).before('<div class="input-filename"/>');t.on({click:function(){$(".control-group.has-focus").removeClass("has-focus"),$(this).closest(".control-group").addClass("has-focus")},change:function(){var t,i,o,e,n;"files"in $(this)[0]&&$(this)[0].files.length?(o=(i=(t=$(this)[0].files[0]).name).match(/[^.]+$/).pop().toLowerCase(),-1!=$.inArray(o,["jpg","jpeg","gif","png","bmp"])?(e=$(this).closest(".controls").prepend("<img/>").find("img"),(n=new FileReader).addEventListener("load",function(){e.attr("src",n.result)},!1),n.readAsDataURL(t)):$(this).closest(".control-group").find(".input-filename").text(i),$(this).closest(".control-group").removeClass("has-empty has-error")):$(this).closest(".control-group").addClass("has-empty"),$(this).closest(".control-group").removeClass("has-focus")}})})},forms.select={},forms.select.init=function(){$(".control-type-select").find("select").each(function(){var t=$(this);t.val()&&0!==parseInt(t.val(),10)||t.closest(".control-group").addClass("has-empty"),t.prop("disabled")&&t.closest(".control-group").addClass("has-disabled"),t.on({focu
1s:function(){$(this)[0].hasAttribute("readonly")||($(".control-group.has-focus").removeClass("has-focus"),$(this).closest(".control-group").addClass("has-focus"))},"change blur":function(){t.val()&&0!==t.val()?$(this).closest(".control-group").removeClass("has-empty has-error"):$(this).closest(".control-group").addClass("has-empty"),$(this).closest(".control-group").removeClass("has-focus")}})})},forms.checkbox={},forms.checkbox.init=function(){$(".checkbox, .checkbox-inline").find('input[type="checkbox"]').each(function(){var t=$(this);0===t.next(".checked").length&&t.after('<span class="checked"></span>'),t.is(":checked")||t.closest("label").addClass("has-empty"),t.on({click:function(){$(this)[0].hasAttribute("readonly")||($(".control-group.has-focus").removeClass("has-focus"),$(this).closest("label").toggleClass("has-empty"),$(this).is(":checked")&&$(this).closest(".control-group").removeClass("has-error"))}})})},forms.radio={},forms.radio.init=function(){$(".radio, .radio-inline").find('input[type="radio"]').each(function(){var t=$(this),i=t.attr("name");0===t.next(".checked").length&&t.after('<span class="checked"></span>'),t.is(":checked")||t.closest("label").addClass("has-empty"),t.on({click:function(){$(this)[0].hasAttribute("readonly")||($(".control-group.has-focus").removeClass("has-focus"),$(this).is(":checked")&&($(this).closest("label").removeClass("has-empty"),$(this).closest(".control-group").removeClass("has-error"),$('input[type="radio"][name="'+i+'"]').not(this).closest("label").addClass("has-empty")))}})})};var ems={init:function(){for(var t in ems)ems[t].init&&ems[t].init()}};(function(l){l.fn.audioplayer=function(i){var o={autoplay:!1,download:!0,index:0,loop:!1,tracklist:!0,tracks:[],volume:!0};return this.each(function(){if(!!document.createElement("audio").canPlayType){var t=l.extend({},o,i);if(l(this).data()&&l.extend(t,l(this).data()),t.count=t.tracks.length,t.playing=!(!t.autoplay||l.isMobile()),"boolean"!=typeof t.autoplay)throw"AUDIOPLAYER [EMS FRAMEWORK] : autoplay option '"+t.autoplay+"' is not a boolean.";if("boolean"!=typeof t.download)throw"AUDIOPLAYER [EMS FRAMEWORK] : download option '"+t.download+"' is not a boolean.";if("number"!=typeof t.index)throw"AUDIOPLAYER [EMS FRAMEWORK] : index option '"+t.index+"' is not a number.";if("boolean"!=typeof t.loop)throw"AUDIOPLAYER [EMS FRAMEWORK] : loop option '"+t.loop+"' is not a boolean.";if("boolean"!=typeof t.tracklist)throw"AUDIOPLAYER [EMS FRAMEWORK] : tracklist option '"+t.tracklist+"' is not a boolean.";if("object"!=typeof t.tracks)throw"AUDIOPLAYER [EMS FRAMEWORK] : tracks option '"+t.tracks+"' is not an object.";var e=["artist","cover","file","title"];if(l.each(t.tracks,function(o,t){if("object"!=typeof t)throw"AUDIOPLAYER [EMS FRAMEWORK] : track '"+o+"' is not an object.";if(l.each(Object.keys(t),function(t,i){if(-1===l.inArray(i,e))throw"AUDIOPLAYER [EMS FRAMEWORK] : '"+i+"' in track n° "+o+" is not a valid key."}),!t.file||0===t.file.length)throw"AUDIOPLAYER [EMS FRAMEWORK] : file track n° "+o+" is not defined."}),"boolean"!=typeof t.volume)throw"AUTOPLAYER [EMS FRAMEWORK] : volume option '"+t.volume+"' is not a boolean.";var n=l(this);n.data("settings",t),n.append(function(){var t='<div class="audioplayer-cover"><div class="audioplayer-infos"><div class="audioplayer-title"> </div><div class="audioplayer-artist"> </div><div class="audioplayer-progress-wrapper"><div class="audioplayer-progress" style="width: 0%;"><span class="audioplayer-progress-pointer"></span></div></div><div class="audioplayer-time"><div class="audioplayer-time-elapsed">--:--</div>';return n.data("settings").volume&&(t+='<div class="audioplayer-volume-container"><div class="audioplayer-volume-wrapper"><div class="audioplayer-volume"><span class="audioplayer-volume-pointer"></span></div></div></div>'),t+='<div class="audioplayer-time-total">--:--</div></div></div></div><audio preload="auto"'+(n.data("settings").autoplay?" autoplay":"")+'></audio><div class="audioplayer-controls"></div>',n.data("settings").tracklist&&(t+='<ul class="audioplayer-tracklist"> </ul>'),t}).addClass("audioplayer");var s=l(this).find("audio");s.on({canplay:function(){!1===n.data("settings").playing?s[0].pause():s[0].play()},ended:function(){n.data("settings").index+1<n.data("settings").count?n.data("settings").index++:n.data("settings").index=0,(0!=n.data("settings").index||0==n.data("settings").index&&n.data("settings").loop)&&(n.data("settings").playing=!0),a(n,n.data("settings").index)},pause:function(){n.data("settings").playing=!1,n.find(".audioplayer
1-pause-btn").removeClass("audioplayer-pause-btn").addClass("audioplayer-play-btn"),n.find(".audioplayer-play-btn").html('<i class="fa fa-play"></i>')},play:function(){n.data("settings").playing=!0,n.find(".audioplayer-play-btn").removeClass("audioplayer-play-btn").addClass("audioplayer-pause-btn"),n.find(".audioplayer-pause-btn").html('<i class="fa fa-pause"></i>')},loadedmetadata:function(){n.find(".audioplayer-time-elapsed").text(r(Math.round(s[0].currentTime))),n.find(".audioplayer-time-total").text(r(Math.round(s[0].duration)))},loaded:function(t,i){i&&s[0].play(),n.find(".audioplayer-overlay").animate({opacity:0},240,function(){l(this).remove(),n.find(".audioplayer-controls").find(".btn").removeAttr("disabled")})},loading:function(t,i){i&&s[0].pause(),n.find(".audioplayer-controls").find(".btn").attr("disabled","disabled"),n.find(".audioplayer-cover").prepend(function(){return l("<div/>").attr({class:"audioplayer-overlay"}).css({opacity:"0"}).append(function(){return'<i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i>'}).animate({opacity:1},240)})},timeupdate:function(){var t=r(Math.round(s[0].currentTime)),i=100*s[0].currentTime/s[0].duration;n.find(".audioplayer-time-elapsed").text(t),n.find(".audioplayer-progress").css({width:i+"%"})}}),n.find(".audioplayer-progress-wrapper").on({click:function(t){var i=l(this).width(),o=100*(t.pageX-(l(this).offsetParent().offset().left+l(this).position().left))/i;n.find(".playlist-progress").css({width:o+"%"}),s[0].currentTime=s[0].duration/100*o}}),n.find(".audioplayer-controls").append(function(){return l("<a/>").attr({class:"audioplayer-controls-btn audioplayer-prev-btn btn btn",href:"javascript:void(0)"}).html('<i class="fa fa-backward"></i>').on("click",function(){-1<n.data("settings").index-1?n.data("settings").index--:n.data("settings").index=n.data("settings").count-1,a(n,n.data("settings").index)})}),n.find(".audioplayer-controls").append(function(){return l("<a/>").attr({class:function(){return n.data("settings").playing?"audioplayer-controls-btn audioplayer-play-btn btn":"audioplayer-controls-btn audioplayer-pause-btn btn"},href:"javascript:void(0)"}).html(function(){return n.data("settings").playing?'<i class="fa fa-pause"></i>':'<i class="fa fa-play"></i>'}).on("click",function(){n.data("settings").playing?n.find("audio")[0].pause():n.find("audio")[0].play()})}),n.data("settings").download&&n.find(".audioplayer-controls").append(function(){return l("<a/>").attr({class:"audioplayer-controls-btn audioplayer-download-btn btn",href:"#"}).prop({download:""}).html('<i class="fa fa-download"></i>')}),n.find(".audioplayer-controls").append(function(){return l("<a/>").attr({class:"audioplayer-controls-btn audioplayer-next-btn btn",href:"javascript:void(0)"}).html('<i class="fa fa-forward"></i>').on("click",function(){n.data("settings").index+1<n.data("settings").count?n.data("settings").index++:n.data("settings").index=0,a(n,n.data("settings").index)})}),n.data("settings").volume&&(n.find(".audioplayer-volume").css({width:100*s[0].volume+"%"}),n.find(".audioplayer-volume-wrapper").before(function(){return l("<span/>").attr({class:"audioplayer-volume-btn audioplayer-volume-down-btn"}).html('<i class="fa fa-volume-down"></i>').on("click",function(){s[0].muted?(s[0].muted=!1,l(this).html('<i class="fa fa-volume-down"></i>'),n.find(".audioplayer-volume").css({width:100*s[0].volume+"%"})):(s[0].muted=!0,l(this).html('<i class="fa fa-volume-off"></i>'),n.find(".audioplayer-volume").css({width:"0%"}))})}).after(function(){return l("<span/>").attr({class:"audioplayer-volume-btn audioplayer-volume-up-btn"}).html('<i class="fa fa-volume-up"></i>').on("click",function(){s[0].muted&&(s[0].muted=!1,n.find(".audioplayer-volume-down-btn").html('<i class="fa fa-volume-down"></i>')),s[0].volume=1,n.find(".audioplayer-volume").css({width:"100%"})})}),n.find(".audioplayer-volume-wrapper").on({click:function(t){s[0].muted&&(s[0].muted=!1,n.find(".audioplayer-volume-down-btn").html('<i class="fa fa-volume-down"></i>'));var i=l(this).width(),o=100*(t.pageX-(l(this).offsetParent().offset().left+l(this).position().left))/i;
1s[0].volume=(o/100).toFixed(1),n.find(".audioplayer-volume").css({width:o+"%"})}})),l.each(n.data("settings").tracks,function(t,i){var o;i.artist=i.artist?i.artist:"",i.cover=!!i.cover&&i.cover,i.title=i.title?i.title:"",0===t&&(4<n.data("settings").tracks.length&&n.find(".audioplayer-tracklist").css({"overflow-y":"scroll"}),n.find(".audioplayer-cover").css({"background-image":i.cover?"url('"+i.cover+"')":""}),n.find(".audioplayer-title").text(i.title),n.find(".audioplayer-artist").text(i.artist)),n.data("settings").tracklist&&(n.find(".audioplayer-tracklist").append(function(){return l('<li class="audioplayer-track"/>').append(function(){return'<span class="audioplayer-track-cover"'+(i.cover?" style=\"background-image:url('"+i.cover+"')\")":"")+'></span><span class="audioplayer-track-meta"><span class="audioplayer-track-title">'+i.title+'</span><span class="audioplayer-track-artist">'+i.artist+'</span></span><span class="audioplayer-track-duration"></span>'}).on("click",function(){t!==n.data("settings").index&&a(n,t)})}),(o=new Audio(i.file)).addEventListener("loadedmetadata",function(){n.find(".audioplayer-tracklist li:eq("+t+")").find(".audioplayer-track-duration").text(r(Math.round(o.duration)))}),3===t&&n.find(".audioplayer-tracklist").css({height:n.find(".audioplayer-tracklist").height()+"px"}))}),a(n,n.data("settings").index)}});function a(o,t){var i,e=o.data("settings").tracks,n=e[t].file,s=o.find("audio")[0],a=o.data("settings").playing;o.find("audio").trigger("loading",a),o.data("settings").index=t,o.find(".audioplayer-artist").text(e[t].artist),e[t].cover&&o.find(".audioplayer-cover").css({"background-image":'url("'+e[t].cover+'")'}),o.find(".audioplayer-title").text(e[t].title),o.data("settings").tracklist&&(o.find(".audioplayer-track.current").removeClass("current"),o.find(".audioplayer-track:eq("+t+")").addClass("current")),o.find(".audioplayer-progress").css({width:"0%"}),o.find(".audioplayer-time-elapsed, .audioplayer-time-total").text("--:--"),o.data("settings").download&&(i=e[t].file.split("/")[e[t].file.split("/").length-1],o.find(".audioplayer-download-btn").attr({download:i,href:e[t].file})),fetch(n).then(function(t){t.blob().then(function(t){t.size,t.type;var i=new FileReader;i.addEventListener("loadend",function(){s.src=i.result,s.load(),o.find("audio").trigger("loaded",a)}),i.readAsDataURL(t)})})}function r(t){var i=Number(t),o=Math.floor(i/3600),e=Math.floor(i%3600/60),n=Math.floor(i%3600%60);return(0<o?o+":":"")+(e<10?"0":"")+e+":"+(n<10?"0":"")+n}}})(jQuery),function(a,d){function i(t,i){this.elem=t,this.$elem=d(t),this.options=i,this.metadata=d(t).data()}((i.prototype={defaults:{cycling:!1,height:!1,heightfrom:!1,heightto:!1,hidecaption:!1,pauseonhover:!1,thumbnails:!1,transition:"slide"},adjust_height:function(t){var i=this,o=this.$elem.find(".item.active").outerHeight(),e=this.$elem.find(".item:eq("+t+")").outerHeight();e!=o?this.$elem.find(".carousel-inner").css({height:o+"px"}).delay(500).animate({height:e+"px"},240,function(){d(this).css({height:""}),i.$elem.trigger("on.afterSlide.carousel")}):setTimeout(function(){i.$elem.trigger("on.afterSlide.carousel")},740)},caption_position:function(){this.$elem.find(".item").each(function(){d(this).css({display:"block"}).find(".carousel-caption").css({bottom:function(){return-Math.abs(d(this).outerHeight())+"px"}}).data("from",-Math.abs(d(this).find(".carousel-caption").outerHeight())).closest(".item").css({display:""})})},caption_toggle:function(t){var i=this.$elem.find(".carousel-caption");i.animate({bottom:t?"0":i.data("from")+"px"},240)},cycling:function(){var t=this;setInterval(function(){t.pause||(t.timer=t.timer+1e3,t.timer>t.config.cycling&&t.next())},1e3)},fix_height:function(t){var i,o,e=!0;(this.config.heightfrom||this.config.heightto)&&(i="",this.config.heightfrom&&(i+="(min-width: "+this.config.heightfrom+"px)"),this.config.heightfrom&&this.config.heightto&&(i+=" and "),this.config.heightto&&(i+="(max-width: "+this.config.heightto+"px)"),e=a.matchMedia(i).matches),e?"auto"===this.config.height?(o=this.$elem.width()<this.$elem.find(".item:eq("+this.highest_img+")").find("img").prop("naturalWi
1dth")?this.$elem.width()/this.$elem.find(".item:eq("+this.highest_img+")").find("img").prop("naturalWidth"):1,this.$elem.css({height:this.$elem.find(".item:eq("+this.highest_img+")").find("img").prop("naturalHeight")*o+"px"})):this.$elem.css({height:this.config.height+"px"}):this.$elem.css({height:""})},indicators:function(){var i=this;this.$elem.find(".item").each(function(t){t===i.current?(d(this).addClass("active").css({display:""}),d('[data-slide-to="'+t+'"][data-target="#'+i.id+'"]').addClass("active")):(d(this).removeClass("active"),d('[data-slide-to="'+t+'"][data-target="#'+i.id+'"]').removeClass("active"))})},init:function(){if(this.config=d.extend({},this.defaults,this.options,this.metadata),this.validTransition=["fade","slide"],this.config.cycling&&"number"!=typeof this.config.cycling)throw"SLIDER [EMS FRAMEWORK] : cycling option '"+this.config.cycling+"' is not a number.";if(this.config.height&&"string"==typeof this.config.height&&"auto"!=this.config.height)throw"SLIDER [EMS FRAMEWORK] : height option '"+this.config.height+"' is wrong.";if(this.config.height&&"string"!=typeof this.config.height&&"number"!=typeof this.config.height)throw"SLIDER [EMS FRAMEWORK] : height option '"+this.config.height+"' is wrong.";if(this.config.height&&this.config.heightfrom&&"number"!=typeof this.config.heightfrom)throw"SLIDER [EMS FRAMEWORK] : heightfrom option '"+this.config.heightfrom+"' is not a number.";if(this.config.height&&this.config.heightto&&"number"!=typeof this.config.heightto)throw"SLIDER [EMS FRAMEWORK] : heightto option '"+this.config.heightto+"' is not a number.";if("boolean"!=typeof this.config.pauseonhover)throw"SLIDER [EMS FRAMEWORK] : pauseonhover option '"+this.config.pauseonhover+"' is not a boolean.";if("boolean"!=typeof this.config.thumbnails)throw"SLIDER [EMS FRAMEWORK] : thumbnails option '"+this.config.thumbnails+"' is not a boolean.";if("string"!=typeof this.config.transition||-1===d.inArray(this.config.transition,this.validTransition))throw"SLIDER [EMS FRAMEWORK] : transition option '"+this.config.transition+"' is wrong.";var o,t,e,i,n,s=this;return this.id=this.$elem.attr("id"),this.current=0,this.count=this.$elem.find(".item").length,this.pause=!1,this.timer=0,this.indicators(),this.config.cycling&&this.cycling(this.config.cycling),this.$elem.on({next:function(){s.next()},pause:function(){s.pause=!0},play:function(){s.pause=!1},prev:function(){s.prev()},"slide-to":function(t,i){i.index!=s.current&&i.index>s.current?s.next(i.index):i.index!=s.current&&s.prev(i.index)},mouseenter:function(){s.config.pauseonhover&&(s.pause=!0),s.config.hidecaption&&s.caption_toggle(!0)},mouseleave:function(){s.config.pauseonhover&&(s.pause=!1),s.config.hidecaption&&s.caption_toggle(!1)}}),d.isMobile()&&jQuery.mobile?this.$elem.find(".item").each(function(){d(this).on({swipeleft:function(){s.next()},swiperight:function(){s.prev()}})}):this.config.hidecaption&&(this.caption_position(),d(a).on({resize:function(){s.caption_position()}})),d('[data-slide][href="#'+this.id+'"], [data-slide][data-target="#'+this.id+'"]').each(function(){d(this).on("click",function(t){t.preventDefault(),"prev"===d(this).attr("data-slide")?s.prev():s.next()})}),d('[data-slide-to][href="#'+this.id+'"], [data-slide-to][data-target="#'+this.id+'"]').each(function(){d(this).on("click",function(t){t.preventDefault(),s.next(parseInt(d(this).attr("data-slide-to"),10))})}),this.config.height&&(this.$elem.not("[data-height]").attr("data-height",this.config.height),"auto"===this.config.height&&(o=0,this.$elem.find(".item").each(function(t){var i=d(this).find("img");i.prop("naturalHeight")>o&&(o=i.prop("naturalHeight"),s.highest_img=t)})),this.fix_height(),d(a).on({resize:function(){s.fix_height()}})),this.config.thumbnails&&(this.$elem.not("[data-thumbnails]").attr("data-thumbnails","true"),d("<div/>").attr({class:"filmstrip",id:s.id+"-filmstrip"}).append(function(){return d("<div/>").attr({class:"filmstrip-inner"}).prepend(function(){return d("<span/>").attr({class:"filmstrip-frame"})}).append(function(){return d("<ul/>").attr({class:"filmstrip-thumbnails"}).prepend(function(){return d("<li/>").attr({class:"filmstrip-thumb virtual-thumb"})})})}).insertAfter(s.$elem),t=d("#"+s.id+"-filmstrip"),e=t.find(".filmstrip-thumbn
1ails"),this.$elem.find(".item").each(function(t){var i=d(this).find("img");d("<img/>").attr({src:i.attr("src"),alt:i.attr("alt")}).on("load",function(){t+1===s.count&&s.$elem.trigger("on.thumbnailsLoaded.carousel")}).appendTo(e).wrap(function(){return d("<li/>").attr({"data-slide-to":t,"data-target":"#"+s.id,class:"filmstrip-thumb"+(s.current===t?" active":"")}).on({click:function(){d(this).hasClass("active")||s.next(t)}})})}),1<this.count&&(i=d("<span/>").html('<i class="fa"></i>').addClass("filmstrip-control prev").on("click",function(){s.prev()}),n=d("<span/>").html('<i class="fa"></i>').addClass("filmstrip-control next").on("click",function(){s.next()}),t.prepend(i).append(n)),this.resize_thumbnails(),d(a).on({resize:function(){s.resize_thumbnails()}})),this},next:function(t){var o,e,i=this,n=i.$elem.find(".carousel-inner"),s=i.current+1<i.count?i.current+1:0,s=null!=t?t:s;i.pause=!0,i.$elem.trigger("on.beforeSlide.carousel"),n.find(".item:eq("+s+")").addClass("next"),i.config.height||i.adjust_height(s),"slide"==i.config.transition?(n.find(".item.active").animate({left:"-100%"},500,function(){d(this).css({left:""}),i.current=s,i.timer=0,i.pause=!1,i.indicators()}),n.find(".item.next").animate({left:"0"},500,function(){d(this).css({left:""}).removeClass("next"),i.config.height&&i.$elem.trigger("on.afterSlide.carousel")})):(n.find(".item.active").css({opacity:"1"}).animate({opacity:"0"},500,function(){d(this).css({opacity:""}),i.current=s,i.timer=0,i.pause=!1,i.indicators()}),n.find(".item.next").css({left:"0",opacity:"0",zindex:"1"}).animate({opacity:"1"},500,function(){d(this).css({left:"",opacity:"",zindex:""}).removeClass("next"),i.config.height&&i.$elem.trigger("on.afterSlide.carousel")})),i.config.thumbnails&&(o=d("#"+i.id+"-filmstrip").find(".filmstrip-thumbnails"),e=o.find('[data-slide-to="'+s+'"]'),o.find(".active").removeClass("active"),e.addClass("active"),o.append(function(){var t=d(),i=o.find(".filmstrip-thumb").index(e);return o.find(".filmstrip-thumb:lt("+i+")").each(function(){t=t.add(d(this).clone(!0))}),t}).animate({left:"-"+e.position().left+"px"},500,function(){o.find(".active").prevAll().remove(),o.css({left:""})}))},prev:function(t){var o,e,n,i=this,s=i.$elem.find(".carousel-inner"),a=0<=i.current-1?i.current-1:i.count-1,a=null!=t?t:a;i.pause=!0,i.$elem.trigger("on.beforeSlide.carousel"),s.find(".item:eq("+a+")").addClass("prev"),i.config.height||i.adjust_height(a),"slide"==i.config.transition?(s.find(".item.active").animate({left:"100%"},500,function(){d(this).css({left:""}),i.current=a,i.timer=0,i.pause=!1,i.indicators()}),s.find(".item.prev").animate({left:"0"},500,function(){d(this).css({left:""}).removeClass("prev"),i.config.height&&i.$elem.trigger("on.afterSlide.carousel")})):(s.find(".item.active").css({opacity:"1"}).animate({opacity:"0"},500,function(){d(this).css({opacity:""}),i.current=a,i.timer=0,i.pause=!1,i.indicators()}),s.find(".item.prev").css({left:"0",opacity:"0",zindex:"1"}).animate({opacity:"1"},500,function(){d(this).css({left:"",opacity:"",zindex:""}).removeClass("prev"),i.config.height&&i.$elem.trigger("on.afterSlide.carousel")})),i.config.thumbnails&&(o=d("#"+i.id+"-filmstrip").find(".filmstrip-thumbnails"),e=o.find('[data-slide-to="'+a+'"]'),n=0,o.find(".active").removeClass("active"),e.addClass("active"),o.prepend(function(){var t=d(),i=o.find(".filmstrip-thumb").index(e);return o.find(".filmstrip-thumb:eq("+i+"), .filmstrip-thumb:gt("+i+")").each(function(){t=t.add(d(this).clone(!0)),n-=d(this).outerWidth(!0)}),t}).css({left:n+"px"}).animate({left:"0px"},500,function(){var t=o.find(".filmstrip-thumb").index(o.find(".active:last"));o.find(".filmstrip-thumb:eq("+t+"), .filmstrip-thumb:gt("+t+")").remove()}))},resize_thumbnails:function(){var s=this,a=d("#"+this.id+"-filmstrip"),t=a.find(".filmstrip-thumbnails"),r=parseInt(t.find(".filmstrip-thumb:first").css("margin-left").replace("px",""),10),l=t.find(".filmstrip-thumb:first").outerWidth(),h=t.find(".filmstrip-thumb:first").outerHeight(),c=a.find(".filmstrip-control.prev").outerWidth(!0)+a.find(".filmstrip-control.next").outerWidth(!0),f=parseInt(a.css("padding-left").replace("px",""),10)+parseInt(a.css("padding-right").replace("px",""),10);a.addClass("hide").find(".filmstrip-frame").css({width:l,height:h}),t.css({"margin-left":"-"+r+"px"}).find(".virtual-thumb").remove(),t.find(".filmstrip-thumb").find("img:first").each(function(t){var i=new Image;i.src=d(this).attr("src");var o,e,n=s.resize_img(i.width,i.height,l,h,!1);d(this).attr({width:n.width,height:n.height}).css({left:n.left,top:n.top}),t+1===s.count&&(o=s.$elem.outerWidth()-(c+f),e=(l+r)*s.count-r,a.removeClass("hide").find(".filmstrip-inner").css({width:function(){return(e<o?e:Math.floor(o/(l+r))*(l+r)-r)+"px"}}))})},resize_img:function(t,i,o,e,n){var s,a,r,l={width:0,height:0,fScaleToTargetWidth:!0};return t<=0||i<=0||o<=0||e<=0||(t<o&&i<e?(l.width=t,l.height=i):(s=i*o/t,(o<(a=t*(r=e)/i)?n:!n)?(l.width=Math.floor(o),l.height=Math.floor(s),l.fScaleToTargetWidth=!0):(l.width=Math.floor(a),l.height=Math.floor(r),l.fScaleToTargetWidth=!1)),l.left=Math.floor((o-l.width)/2),l.to
1p=Math.floor((e-l.height)/2)),l}}).constructor=i).defaults=i.prototype.defaults,d.fn.carousel=function(t){return"current"===t?d(this).find(".item").index(d(this).find(".item.active")):this.each(function(){"string"==typeof t?d(this).trigger(t):"number"==typeof t?d(this).trigger("slide-to",[{index:t}]):void 0!==t&&"object"!=typeof t||new i(this,t).init()})},a.Carousel=i}(window,jQuery),function(e){e.fn.clickable=function(t){var o={classname:null,maxwidth:991,target:null};return this.each(function(){var i=e.extend({},o,t);if(e(this).data()&&e.extend(i,e(this).data()),"number"!=typeof i.maxwidth)throw"CLICKABLE [EMS FRAMEWORK] : maxwidth option '"+i.maxwidth+"' is not a number.";i.target=i.target?i.target:e(this).find("a:first").attr("href"),e(this).unbind("mouseenter mouseleave click").on({mouseenter:function(){window.matchMedia("(max-width: "+i.maxwidth+"px)").matches&&i.classname&&e(this).addClass(i.classname)},mouseleave:function(){i.classname&&e(this).removeClass(i.classname)},click:function(t){window.matchMedia("(max-width: "+i.maxwidth+"px)").matches&&(t.preventDefault(),document.location.href=i.target)}})})}}(jQuery),ems.clickable={},ems.clickable.init=function(){$('[data-provide="clickable"]').each(function(){$(this).clickable()})},function(t,o){function i(t,i){this.elem=t,this.$elem=o(t),this.options=i,this.metadata=o(t).data()}((i.prototype={defaults:{accordion:null,orientation:"vertical",parent:null},init:function(){if(this.config=o.extend({},this.defaults,this.options,this.metadata),this.validOrientation=["vertical","horizontal"],this.config.accordion&&!this.$elem.closest(this.config.accordion).length)throw"COLLAPSE [EMS FRAMEWORK] : accordion option '"+this.config.accordion+"' is undefined.";if(this.config.parent&&!this.$elem.closest(this.config.parent).length)throw"COLLAPSE [EMS FRAMEWORK] : parent option '"+this.config.parent+"' is undefined.";if("string"!=typeof this.config.orientation||-1===o.inArray(this.config.orientation,this.validOrientation))throw"COLLAPSE [EMS FRAMEWORK] : orientation option '"+this.config.orientation+"' is undefined.";var i=this;return this.$elem.on({hide:function(t){o(this).hasClass("in")&&i.up()},reset:function(){i.reset()},show:function(){o(this).hasClass("in")||i.down()},toggle:function(){i.toggle()}}),i},up:function(){var t=this;this.$elem.trigger("on.hide.collapse"),this.config.accordion||!this.config.accordion&&"vertical"===this.config.orientation?this.$elem.slideUp(240,function(){o(this).removeClass("in").removeAttr("style"),t.config.parent&&o(this).closest(t.config.parent).removeClass("open"),o(this).trigger("on.hidden.collapse")}):this.$elem.animate({left:"-"+this.$elem.width()},240,function(){o(this).removeClass("in drawer").css("left",""),t.config.parent&&o(this).closest(t.config.parent).removeClass("open"),o(this).trigger("on.hidden.collapse")})},reset:function(){this.config={},this.$elem.unbind("hide reset show toggle on.show.collapse on.shown.collapse on.hide.collapse on.hidden.collapse").removeData()},down:function(){var t=this;this.config.accordion?o(this.config.accordion).find(".in").length?(o(this.config.accordion).find(".in").trigger("on.hide.collapse"),o(this.config.accordion).find(".in").slideUp(240,function(){o(this).removeClass("in").removeAttr("style"),o(this).trigger("on.hidden.collapse"),t.$elem.trigger("on.show.collapse"),t.$elem.slideDown(240,function(){o(this).addClass("in").removeAttr("style"),t.config.parent&&(o(t.config.accordion).find(".open").removeClass("open"),o(this).closest(t.config.parent).addClass("open")),o(this).trigger("on.shown.collapse")})})):(this.$elem.trigger("on.show.collapse"),this.$elem.slideDown(240,function(){o(this).addClass("in").removeAttr("style"),t.config.parent&&o(this).closest(t.config.parent).addClass("open"),o(this).trigger("on.shown.collapse")})):(this.$elem.trigger("on.show.collapse"),"vertical"===this.config.orientation?this.$elem.slideDown(240,function(){o(this).addClass("in").removeAttr("style"),t.config.parent&&o(this).closest(t.config.parent).addClass("open"),o(this).trigger("on.shown.collapse")}):this.$elem.addClass("drawer").animate({left:0},240,function(){o(this).addClass("in").css("left",""),t.config.parent&&o(this).closest(t.config.parent).addClass("open"),o(this).trigger("on.shown.collapse")}))},toggle:function(){this.$elem.hasClass("in")?this.up():this.down()}}).constructor=i).defaults=i.prototype.defaults,o.fn.collapse=function(t){return this.each(function(){"string"==typeof t?o(this).trigger(t):void 0!==t&&"object"!=typeof t||new i(this,t).init()})},t.Collapse=i}(window,jQuery),ems.collapse={},ems.collapse.init=function(){$('[data-toggle="collapse"]').each(function(){var i=$(this).data("target")?$(this).data("target"):$(this).attr("href"),t=$(this).data();$(i).collapse(t),$(this).on("click",function(t){$(this).not(".disabled, :disabled")&&(t.preventDefault(),t.stopPropagation(),$(i).collapse("toggle"))})})},function(t,o){function i(t,i){this.elem=t,this.$elem=o(t),this.options=i,this.metadata=o(t).data()}((i.prototype={defaults:{animation:!1},init:function(){if(this.config=o.extend({},this.defaults,this.options,this.metadata),this.validAnimation=["fade","slide"],this.config.animation&&-1===o.inArray(this.config.animation,this.validAnimation))throw"DROPDOWN [EMS FRAMEWORK] : animation option '"+this.config.animation+"' is wrong.";var i=this;return i.$elem.on({click:function(t){o(this).not(".disabled, :disabled")&&t.preventDefault(),t.stopPropagation(),i.toggle()},hide:function(){o(this).parent(".dropdown").hasClass("open")&&i.hide()},reset:function(){i.reset()},show:function(){o(this).parent(".dropdown").hasClass("open")||i.show()},toggle:function(){i.toggle()}}),i},hide:function(){var t=this;t.$elem.trigger("on.hide.dropdown"),t.config.animation?"fade"===t.config.animation?t.$elem.next(".dropdown-menu").fadeOut(240,function(){o(this).parent(".dropdown").removeClass("open"),o(this).css("display",""),t.$elem.trigger("on.hidden.dropdown")}):t.$elem.next(".dropdown-menu").slideUp(240,function(){o(this).parent(".dropdown").removeClass("open"),o(this).css("display",""),t.$elem.trigger("on.hidden.dropdown")}):(t.$elem.parent(".dropdown").removeClass("open"),t.$elem.trigger("on.hidden.dropdown"))},reset:function(){this.config={},this.$elem.unbind("click hide reset show toggle on.show.dropdown on.shown.dropdown on.hide.dropdown on.hidden.dropdown").removeData()},show:function(){var t=this;o(".dropdown.open").find('[data-toggle="dropdown"]').each(function(){o(this).trigger("hide")}),t.$elem.trigger("on.show.dropdown"),t.config.animation?(t.$elem.next(".dropdown-menu").css("display","none"),"fade"===t.config.animation?t.$elem.next(".dropdown-menu").fadeIn(240,function(){o(this).parent(".dropdown").addClass("open"),o(this).css("display",""),t.$elem.trigger("on.shown.dropdown")}):t.$elem.next(".dropdown-menu").slideDown(240,function(){o(this).parent(".dropdown").addClass("open"),o(this).css("display",""),t.$elem.trigger("on.shown.dropdown")})):(t.$elem.parent(".dropdown").addClass("open"),t.$elem.trigger("on.shown.dropdown"))},toggle:function(){this.$elem.parent(".dropdown").hasClass("open")?this.hide():this.show()}}).constructor=i).defaults=i.prototype.defaults,o.fn.dropdown=function(t){return this.each(function(){"string"==typeof t?o(this).trigger(t):void 0!==t&&"object"!=typeof t||new i(this,t).init()})},t.Dropdown=i}(window,jQuery),ems.dropdown={},ems.dropdown.init=function(){$(document).on({click:function(t){$(".dropdown.open").length&&$(".dropdown.open")!==t.target&&!$(".dropdown.open").has(t.target).length&&$(".dropdown.open").find('> [data-toggle="dropdown"]').trigger("hide")}}),$('[data-toggle="dropdown"]').each(function(){$(this).dropdown()})},function(e,n){function o(t,i){this.elem=t,this.$elem=n(t),this.options=i,this.metadata=n(t).data()}((o.prototype={defaults:{classname:null,from:0,offset:0,to:null,viewportmax:null,viewportmin:null,width:null},init:function(){if(this.config=n.extend({},this.defaults,this.options,this.metadata),this.config.from&&"number"!=typeof this.config.from&&"string"!=typeof this.config.from)throw"FIX [EMS FRAMEWORK] : from option '"+this.config.from+"' is not a number or a string.";if("string"==typeof this.config.from&&0===n(this.config.from).length)throw"FIX [EMS FRAMEWORK] : element '"+this.config.from+"' is undefined.";if(1<n(this.config.from).length)throw"FIX [EMS FRAMEWORK] : element '"+this.config.from+"' is ambiguous.";if(this.config.to&&"number"!=typeof this.config.to&&"string"!=typeof this.config.to)throw"FIX [EMS FRAMEWORK] : to option '"+this.config.to+"' is not a number or a string.";if(this.config.to&&"string"==typeof this.config.to&&0===n(this.config.to).length)throw"FIX [EMS FRAMEWORK] : element '"+this.config.to+"' is undefined.";if(this.config.to&&"string"==typeof this.config.to&&1<n(this.config.to).length)throw"FIX [EMS FRAMEWORK] : element '"+this.config.to+"' is ambiguous.";if(this.config.offset&&"number"!=typeof this.config.offset)throw"FIX [EMS FRAMEWORK] : offset option '"+this.config.offset+"' is not a number.";if(this.config.viewportmax&&"number"!=typeof this.config.viewportmax)throw"FIX [EMS FRAMEWORK] : wiewportmax option '"+this.config.wiewportmax+"' is not a number.";if(this.config.viewportmin&&"number"!=typeof this.config.viewportmin)throw"FIX [EMS FRAMEWORK] : wiewportmin option '"+this.config.wiewportmin+"' is not a number.";if(this.config.viewportmin&&this.config.viewportmax&&this.config.viewportmin>=this.config.viewportmax)throw"FIX [EMS FRAMEWORK] : wiewportmin option '"+this.config.wiewportmin+"' is greater than '"+this.config.wiewportmax+"'.";if(this.config.width&&"number"!=typeof this.config.width&&"string"!=typeof this.config.width)throw"FIX [EMS FRAMEWORK] : width option '"+this.config.width+"' is not a number or a string.";if(this.config.width&&"string"==typeof this.config.width&&0===n(this.config.width).length)throw"FIX [EMS FRAMEWORK] : element '"+this.config.width+"' is undefined.";if(this.config.width&&"string"==typeof this.config.width&&1<n(this.config.width).length)throw"FIX [EMS FRAMEWORK] : element '"+this.config.width+"' is ambiguous.";var o=this;return this.fixstart=!1,this.fixend=!1,this.$elem.on({refresh:function(t,i){"object"==typeof i&&n.extend(o.config,i),o.remove(),o.settings(),n(this).trigger("on.refresh.fix")},reset:function(){o.reset()}}),n(e).on({resize:function(){o.config&&(o.remove(),o.settings())},scroll:function(){o.config&&o.position()}}),this.settings(),n(e).trigger("scroll"),o},position:function(){var t,i=this,o=!0;(this.config.viewportmin||this.config.viewportmax)&&(t="",this.config.viewportmin&&(t+="(min-width: "+this.config.viewportmin+"px)"),this.config.viewportmin&&this.config.viewportmax&&(t+=" and "),this.config.viewportmax&&(t+="(max-width: "+this.config.viewportmax+"px)"),o=e.matchMedia(t).matches),o&&n(e).scrollTop()>=this.startTo?(this.$elem.css({position:"fixed",left:i.posX,width:function(){return i.config.width?("number"!=typeof i.config.width?n(i.config.width)[0].getBoundingClientRect().width:i.config.width)+"px":""}}),!this.endTo||this.endTo&&n(e).scrollTop()<this.endTo?(this.fixstart||(this.fixstart=!0,this.fixend=!1,this.$elem.trigger("on.start.fix")),this.$elem.css({top:i.posY-i.startTo+"px"}).addClass(function(){return i.config.classname?i.config.classname:""})):this.endTo&&n(e).scrollTop()>=this.endTo&&(this.fixend||(this.fixend=!0,this.fixstart=!1,this.$elem.trigger("on.end.fix")),this.$elem.css({top:i.endTo-n(e).scrollTop()+(i.posY-i.startTo)+"px"}).removeClass(function(){return i.config.classname?i.config.classname:""}))):((this.fixstart||this.fixend)&&(this.fixstart=!1,this.fixend=!1,this.$elem.trigger("on.end.fix")),this.remove())},remove:function(){var t=this;this.$elem.css({position:"",top:"",left:"",width:""}).removeClass(function(){return t.config.classname?t.config.classname:""}),this.$elem.filter('[style=""]').removeAttr("style"),this.$elem.filter('[class=""]').removeAttr("class")},reset:function(){this.remove(),this.$elem.unbind("refresh reset on.start.fix on.end.fix"),delete this.config,delete this.defaults,delete this.options,delete this.metadata},settings:function(){var t=parseInt(n("body").css("padding-top").replace("px",""),10)+parseInt(n("body").css("margin-top").replace("px",""),10);this.posY=this.$elem.offset().top,this.posX=this.$elem.offset().left,this.startTo="string"==typeof this.config.from?n(this.config.from).offset().top:this.config.from,this.startTo=this.startTo>=this.config.offset?this.startTo-this.config.offset:this.startTo,this.endTo=null!==this.config.to&&this.config.to,this.endTo&&(this.endTo="str
1ing"==typeof this.endTo?this.startTo+n(this.endTo).outerHeight()-this.$elem.outerHeight():this.endTo,this.endTo=this.endTo-t),this.startTo=this.startTo-t,this.position()}}).constructor=o).defaults=o.prototype.defaults,n.fn.fix=function(t,i){return this.each(function(){"string"==typeof t?n(this).trigger(t,i):void 0!==t&&"object"!=typeof t||new o(this,t).init()})},e.Fix=o}(window,jQuery),ems.fix={},ems.fix.init=function(){$('[data-provide="fix"]').each(function(){$(this).fix()})},function(t,l){function i(t){this.elem=t,this.$elem=l(t)}(i.prototype={init:function(){var r=this;return this.$elem.on({submit:function(t){var i={submit:!0};if(l(this).trigger("on.submit.validate",[i]),i.submit){var a=[];l(this).find(".has-required").each(function(){var t,i;i="LABEL"===l(this).prop("tagName")||l(this).hasClass("as-label")?(t=l(this),l(this).closest(".control-group")):(t=0!==l(this).find(".as-label").length?l(this).find(".as-label"):l(this).find("label:first"),l(this));var o={};o.index=r.$elem.find(".control-group").index(i),o.label=l.trim(t.text()),o.isvalid=!1;var e=!!t.is("[for]")&&l("#"+t.attr("for"));e||(0!==i.find('input:not([type="hidden"])').length?e=i.find('input:not([type="hidden"]):first'):0!==i.find("select:visible").length?e=i.find("select:visible:first"):0!==i.find("textarea:visible").length&&(e=i.find("textarea:visible:first")));var n,s=e.is("[type]")?e.prop("type"):e.prop("tagName");"radio"==s||"checkbox"==s?(n=i.find('input[type="'+s+'"]:first').attr("name"),0!=l('input[name="'+n+'"]:checked').length&&(o.isvalid=!0)):("file"==s&&!i.hasClass("has-empty")||e.val())&&(o.isvalid=!0),a.push(o)});var o=0;for($i=0;$i<a.length;$i++)a[$i].isvalid||(r.$elem.find(".control-group:eq("+a[$i].index+")").addClass("has-error"),o++);if(0!==o)return l(this).trigger("on.error.validate",[a]),!1;var e={success:!0};return l(this).trigger("on.success.validate",[e]),e.success}return!1}}),r}}).constructor=i,l.fn.validate=function(){return this.each(function(){new i(this).init()})},t.Validate=i}(window,jQuery),ems.form_validation={},ems.form_validation.init=function(){$('form[data-provide="validate"]').each(function(){$(this).validate()})},function(t,o){function i(t){this.options=t}((i.prototype={defaults:{buttonCancel:null,buttonConfirm:null,classname:null,content:null,height:null,id:null,title:null,type:null,width:null},init:function(){if(this.config=o.extend({},this.defaults,this.options),this.validType=["error","primary","success","warning"],null!=this.config.buttonCancel&&"string"!=typeof this.config.buttonCancel)throw"MODAL [EMS FRAMEWORK] : buttonCancel option is not a string.";if(null!=this.config.buttonConfirm&&"string"!=typeof this.config.buttonConfirm)throw"MODAL [EMS FRAMEWORK] : buttonConfirm option is not a string.";if(null!=this.config.classname&&"string"!=typeof this.config.classname)throw"MOADL [EMS FRAMEWORK] : classname option '"+this.config.classname+"' is not a string.";if(null===this.config.content)throw"MODAL [EMS FRAMEWORK] : content option is undefined.";if("string"!=typeof this.config.content&&"object"!=typeof this.config.content)throw"MODAL [EMS FRAMEWORK] : content option must be a string or a jQuery object.";if("object"==typeof this.config.content&&!this.config.content.length)throw"MODAL [EMS FRAMEWORK] : content object is undefined.";if(null!=this.config.height&&"number"!=typeof this.config.height&&"string"!=typeof this.config.height)throw"MODAL [EMS FRAMEWORK] : height option '"+this.config.height+"' is wrong.";if(null!=this.config.height&&"string"==typeof this.config.height&&"auto"!=this.config.height)throw"MODAL [EMS FRAMEWORK] : height option '"+this.config.height+"' is wrong.";if(null!=this.config.id&&"string"!=typeof this.config.id)throw"MODAL [EMS FRAMEWORK] : id option is not a string.";if(null!=this.config.title&&"string"!=typeof this.config.title)throw"MODAL [EMS FRAMEWORK] : title option is not a string.";if(null!=this.config.type&&"string"!=typeof this.config.type)throw"MODAL [EMS FRAMEWORK] : title option is not a string.";if(null!=this.config.type&&-1===o.inArray(this.config.type,this.validType))throw"MODA
1L [EMS FRAMEWORK] : type option '"+this.config.type+"' is wrong.";if(null!=this.config.width&&"number"!=typeof this.config.width)throw"MODAL [EMS FRAMEWORK] : width option is not a number.";var t=this;"object"==typeof t.config.content&&t.config.content.wrap('<div class="modal-placeholder hide"></div>');var i='<div class="modal-overlay"><div class="modal'+(this.config.type?" modal-"+this.config.type:"")+'"'+(this.config.id?' id="'+this.config.id+'"':"")+">"+(this.config.title?'<div class="modal-heading'+(this.config.type?" bg-"+this.config.type:"")+'"><span class="modal-title">'+this.config.title+"</span></div>":"")+'<div class="modal-body'+(this.config.classname?" "+this.config.classname:"")+'"></div><div class="modal-footer"><button type="button" class="btn btn-default" data-role="modal-cancel">'+(this.config.buttonCancel?this.config.buttonCancel:"Fermer")+"</button>"+(this.config.buttonConfirm?'<button type="button" class="btn btn-primary" data-role="modal-confirm">'+this.config.buttonConfirm+"</button>":"")+"</div></div></div>";return o(i).appendTo("body").find(".modal").css({width:function(){return t.config.width?t.config.width+"px":""}}).find(".modal-body").css({height:function(){return t.config.height?"number"==typeof t.config.height?t.config.height+"px":"auto":""},"max-height":function(){return t.config.height?"none":""}}).append(function(){return t.config.content}),o("body").addClass("modal-open"),o(".modal-overlay").addClass("in").on({click:function(t){var i=o(".modal");i===t.target||i.has(t.target).length||(t.stopPropagation(),o.modal("hide"))}}),o(".modal-overlay").find(".modal-footer").find(".btn").on("click",function(){if("modal-confirm"===o(this).data("role")){if(!o(".modal-overlay").triggerHandler("on.confirm.modal"))return!1;o.modal("hide")}else o(".modal-overlay").trigger("on.cancel.modal"),o.modal("hide")}),o(".modal-overlay").on({"on.confirm.modal":function(t){return t}}),o(".modal-overlay")}}).constructor=i).defaults=i.prototype.defaults,o.modal=function(t){if("hide"===t)o(".modal-overlay").removeClass("in").delay(500).queue(function(){o(".modal-placeholder").length&&o(".modal-placeholder").append(o(".modal-body").contents()).children().first().unwrap(),o(this).parents("body").removeClass("modal-open").find(".modal-overlay").remove(),o(this).dequeue()});else if("object"==typeof t)return new i(t).init()},t.Modal=i}(window,jQuery),function(c,f){function i(t,i){this.elem=t,this.$elem=f(t),this.options=i,this.metadata=f(t).data()}((i.prototype={defaults:{background:null,height:null,inertia:.5,posx:"center",posy:"center",responsive:!0,scroller:"window",viewportmin:null},init:function(){if(this.config=f.extend({},this.defaults,this.options,this.metadata),this.validPosX=["left","center","right"],this.validPosY=["top","center","bottom"],this.validScroller=["window","parent"],!this.config.background)throw"PARALLAX [EMS FRAMEWORK] : background option is undefined.";if(this.config.height&&"string"!=typeof this.config.height)throw"PARALLAX [EMS FRAMEWORK] : height option '"+this.config.height+"' is not a string.";if("number"!=typeof parseInt(this.config.inertia))throw"PARALLAX [EMS FRAMEWORK] : inertia option '"+this.config.inertia+"' is not a number.";if(-1===f.inArray(this.config.posx,this.validPosX))throw"PARALLAX [EMS FRAMEWORK] : posx option '"+this.config.posx+"' is wrong.";if(-1===f.inArray(this.config.posy,this.validPosY))throw"PARALLAX [EMS FRAMEWORK] : posy option '"+this.config.posy+"' is wrong.";if(this.config.responsive&&"boolean"!=typeof this.config.responsive)throw"PARALLAX [EMS FRAMEWORK] : responsive option '"+this.config.responsive+"' is not a boolean.";if(-1===f.inArray(this.config.scroller,this.validScroller))throw"PARALLAX [EMS FRAMEWORK] : scroller option '"+this.config.scroller+"' is wrong.";if(this.config.viewportmin&&"number"!=typeof this.config.viewportmin)throw"PARALLAX [EMS FRAMEWORK] : viewportmin option '"+this.config.viewportmin+"' is not a number.";var t=this;return this.$scroller="window"==this.config.scroller?f(c):this.$elem.parent(),this.scrolling=!1,this.$wrapper=this.$elem.parent(),this.img=new Image,this.img.src=this.config.background,this.$scroller.on({scroll:function(){t.scrolling||(requestAnimationFrame(function(){t.scroll()}),t.scrolling=!0)},resize:function(){t.resize()}}).trigger("scroll"),this.$wrapper.filter(":not(body)").css({position:"relative"}),this.$elem.css({height:function(){return t.config.height?t.config.height:""}}).addClass("parallax"),f(this.img).on("load",function(){f("<div/>").attr({class:"parallax-img"}).css({background:"url("+t.img.src+") center center / cover no-repeat"}).appendTo(t.$elem),t.resize()}),t},resize:function(){var t=this.config.responsive?this.$elem.outerWidth()/this.img.width:1,i=this.img.height*t;this.$elem.find(".parallax-img").css({height:i+"px"}),this.scroll()},scroll:function(){this.scrolling=!1;var t,i,o=this.$elem.find(".parallax-img").height(),e=this.$elem.find(".parallax-img").width();t="top"===this.config.posy?0:"center"===this.config.posy?Math.round(-Math.abs((o-this.$elem.outerHeight())/2)):o>this.$elem.outerHeight()?Math.round(-Math.abs(o-this.$elem.outerHeight())):Math.round(Math.abs(this.$elem.outerHeight()-o)),i="left"===this.config.posx?0:"center"===this.config.posx?-Math.abs((e-this.$elem.outerWidth())/2):Math.round(this.$elem.outerWidth()-e);var n,s="window"==this.config.scroller?f(c).scrollTop():this.$wrapper.scrollTop(),a="window"==this.config.scroller?f(c).height():this.$scroller.outerHeight(),r="window"==this.config.scroller?this.$elem.offset().top:this.$elem.position().top,l=r<=a?0:r-a,h=l+this.$elem.outerHeight();s<l||h<=s||(n=!this.config.viewportmin||this.config.viewportmin&&c.matchMedia("(min-width: "+this.config.viewportmin+"px)").matches?t+(s-l)*this.config.inertia:"top"===this.config.posy?0:"center"===this.config.posx?(this.$elem.outerHeight()-o)/2:this.$elem.outerHeight()-o,this.$elem.find(".parallax-img").css({transform:"translate3d("+parseFloat(i).toFixed(0)+"px, "+parseFloat(n).toFixed(0)+"px, 0)"}))}}).constructor=i).defaults=i.prototype.defaults,f.fn.parallax=function(t){return this.each(function(){void 0!==t&&"object"!=typeof t||new i(this,t).init()})},c.Parallax=i}(window,jQuery),ems.parallax={},ems.parallax.init=function(){$('[data-provide="parallax"]').each(function(){$(this).parallax()})},function(t,e){function i(t,i){this.elem=t,this.$elem=e(t).is("body")?e("body, html"):e(t),this.options=i,this.metadata=e(t).data()}((i.prototype={defaults:{classname:"active",offset:0,speed:240,target:null},set_coord:function(t){var i,o=e("#"+t.attr("href").split("#")[1]);i=this.$elem.is("body")?1==e(".navbar-fixed-top").length?o.offset().top-e(".navbar-fixed-top").outerHeight():o.offset().top:this.$elem.scrollTop()+o.position().top,t.attr({"data-from":0!=this.config.offset&&i>this.config.offset?Math.round(i-this.config.offset):Math.round(i),"data-to":Math.round(i+o.outerHeight())})},init:function(){if(this.config=e.extend({},this.defaults,this.options,this.metadata),"string"!=typeof this.config.classname)throw"SCROLLSPY [EMS FRAMEWORK] : classname option '"+this.config.classname+"' is not a string.";if(0===this.config.classname.length)throw"SCROLLSPY [EMS FRAMEWORK] : classname option '"+this.config.classname+"' is empty.";if("number"!=typeof this.config.offset)throw"SCROLLSPY [EMS FRAMEWORK] : offset option '"+this.config.offset+"' is not a number.";if("number"!=typeof this.config.speed)throw"SCROLLSPY [EMS FRAMEWORK] : speed option '"+this.config.speed+"' is not a number.";if(null===this.config.target)throw"SCROLLSPY [EMS FRAMEWORK] : target option is undefined.";if(!e(this.config.target).length)throw"SCROLLSPY [EMS FRAMEWORK] : target option '"+this.config.target+"' is undefined.";if(1<e(this.config.target).length)throw"SCROLLSPY [EMS FRAMEWORK] : target '"+this.config.to+"' is ambiguous.";var o=this;return this.$scroller=e(this.elem).is("body")?e(t):e(this.elem),this.$elem.not("body")&&"static"===this.$elem.css("position").toLowerCase()&&this.$elem.css("position","relative"),e(this.config.target).find('a[href^="'+t.location.href+'#"], a[href^="#"]').filter(':not([href$="#"])').each(function(){var i=e(this),t=i.attr("href").split("#")[1];0!=o.$elem.find("#"+t).length&&(o.set_coord(e(this)),e(this).on("click",function(t){t.preventDefault(),o.$elem.trigger("on.beforeScroll.
1scrollspy"),o.$elem.animate({scrollTop:e(this).data("from")},o.config.speed,function(){i.trigger("blur"),o.$elem.trigger("on.afterScroll.scrollspy")})}))}),this.$scroller.on({resize:function(){e(o.config.target).find("a[data-from]").each(function(){o.set_coord(e(this))}),o.$scroller.trigger("scroll")},scroll:function(){e(o.config.target).find("a[data-from]").each(function(){o.$scroller.scrollTop()>=e(this).data("from")&&o.$scroller.scrollTop()<e(this).data("to")?e(this).parent().hasClass(o.config.classname)||(e(this).trigger("on.start.scrollspy"),e(this).parent().addClass(o.config.classname)):e(this).parent().hasClass(o.config.classname)&&(e(this).trigger("on.stop.scrollspy"),e(this).parent().removeClass(o.config.classname))})}}).trigger("scroll"),o}}).constructor=i).defaults=i.prototype.defaults,e.fn.scrollspy=function(t){return this.each(function(){void 0!==t&&"object"!=typeof t||new i(this,t).init()})},t.Scrollspy=i}(window,jQuery),ems.scrollspy={},ems.scrollspy.init=function(){$('[data-provide="scrollspy"]').each(function(){$(this).scrollspy()})},function(t,o){function i(t,i){this.elem=t,this.$elem=o(t),this.options=i,this.metadata=o(t).data()}((i.prototype={defaults:{animation:!1},init:function(){if(this.config=o.extend({},this.defaults,this.options,this.metadata),this.validAnimation=["fade","rise","slide"],this.config.animation&&-1===o.inArray(this.config.animation,this.validAnimation))throw"SUBNAV [EMS FRAMEWORK] : animation option '"+this.config.animation+"' is wrong.";var e=this;return e.$elem.on({click:function(t){o(this).parents(".navbar").length?o.isMobile()?t.preventDefault():t.stopPropagation():(t.preventDefault(),t.stopPropagation(),o(this).parent(".subnav").hasClass("open")?e.hide("slide"):e.show("slide"))},hide:function(t,i){var o=void 0===i?e.config.animation:i.animation;t.preventDefault(),t.stopPropagation(),e.hide(o)},reset:function(){e.reset()},show:function(){o(this).parent(".subnav").hasClass("open")||e.show()},toggle:function(){e.toggle()},tap:function(t){o(this).parents(".navbar").length&&o(this).parent(".subnav").not(".disabled, :disabled")&&(t.preventDefault(),o(this).parent(".subnav").hasClass("open")?e.hide("slide"):e.show("slide"))}}).parent(".subnav").on({mouseenter:function(){!o(this).hasClass("open")&&o(this).parents(".navbar").length&&e.show()},mouseleave:function(){o(this).hasClass("open")&&o(this).parents(".navbar").length&&e.hide()}}),e},hide:function(t){this.$elem.trigger("on.hide.subnav"),(t=void 0===t?this.config.animation:t)?"fade"===t?this.$elem.next(".subnav-menu").fadeOut(240,function(){o(this).parent(".subnav").removeClass("open"),o(this).css("display",""),o(this).prev('[data-toggle="subnav"]').trigger("on.hidden.subnav")}):"rise"===t?this.$elem.next(".subnav-menu").animate({top:"+=10",opacity:"0"},240,function(){o(this).parent(".subnav").removeClass("open"),o(this).css({display:"",top:"",opacity:""}),o(this).prev('[data-toggle="subnav"]').trigger("on.hidden.subnav")}):"slide"===t&&this.$elem.next(".subnav-menu").slideUp(240,function(){o(this).parent(".subnav").removeClass("open"),o(this).parent(".subnav").find(".open").removeClass("open"),o(this).css("display",""),o(this).prev('[data-toggle="subnav"]').trigger("on.hidden.subnav")}):(this.$elem.parent(".subnav").removeClass("open"),this.$elem.trigger("on.hidden.subnav"))},reset:function(){this.config={},this.$elem.unbind("click hide reset show toggle touchstart on.show.subnav on.shown.subnav on.hide.subnav on.hidden.subnav").removeData(),this.$elem.parent(".subnav").unbind("mouseenter mouseleave")},show:function(t){t=void 0===t?this.config.animation:t,this.$elem.closest(".
1nav").find("> .subnav.open").find('> [data-toggle="subnav"]').each(function(){o(this).trigger("hide",[{animation:t}])}),this.$elem.parent(".subnav").addClass("open"),this.$elem.trigger("on.show.subnav"),t?"fade"===t?this.$elem.next(".subnav-menu").css({display:"none"}).fadeIn(240,function(){o(this).css("display",""),o(this).prev('[data-toggle="subnav"]').trigger("on.shown.subnav")}):"rise"===t?this.$elem.next(".subnav-menu").css({top:"+=10",opacity:"0"}).animate({top:"-=10",opacity:"1"},240,function(){o(this).prev('[data-toggle="subnav"]').trigger("on.shown.subnav")}):"slide"===t&&this.$elem.next(".subnav-menu").css({display:"none"}).slideDown(240,function(){o(this).css("display",""),o(this).prev('[data-toggle="subnav"]').trigger("on.shown.subnav")}):this.$elem.trigger("on.shown.subnav")},toggle:function(){this.$elem.parent(".subnav").hasClass("open")?this.hide():this.show()}}).constructor=i).defaults=i.prototype.defaults,o.fn.subnav=function(t){return this.each(function(){"string"==typeof t?o(this).trigger(t):void 0!==t&&"object"!=typeof t||new i(this,t).init()})},t.Subnav=i}(window,jQuery),ems.subnav={},ems.subnav.init=function(){$('[data-toggle="subnav"]').each(function(){$(this).subnav()})},function(t,g){function i(t,i){this.elem=t,this.$elem=g(t),this.options=i,this.metadata=g(t).data()}var e=1;((i.prototype={defaults:{animation:!0,bgcolor:null,color:null,classname:null,container:!1,content:null,id:null,event:"hover focus",html:!1,mouse:!1,origin:"default",position:"top"},checkColor:function(t){return 0==!g("<div/>").css("border","1px solid "+t).css("border-color").length},hide:function(){var t=this;this.visible=!1,this.$elem.trigger("on.hide.tooltip"),this.config.animation?this.tooltip.animate({opacity:"0"},240,function(){g(this).remove(),null!=t.config.bgcolor&&g("head").find('style[data-tooltip-number="'+t.number+'"]').remove(),t.$elem.trigger("on.hidden.tooltip")}):(this.tooltip.remove(),null!=t.config.bgcolor&&g("head").find('style[data-tooltip-number="'+t.number+'"]').remove(),this.$elem.trigger("on.hidden.tooltip")),delete this.tooltip},init:function(){this.config=g.extend({},this.defaults,this.options,this.metadata),this.validEvent=["hover","focus","click","manual"],this.validOrigin=["default","center","mouse"],this.validPosition=["top","right","bottom","left"];var o=this;if(this.visible=!1,this.eventsDisplay=["show","toggle"],this.eventsHide=["hide"],this.number=e,"boolean"!=typeof this.config.animation)throw"TOOLTIP [EMS FRAMEWORK] : animation option '"+this.config.animation+"' is not a boolean.";if(null!=this.config.bgcolor&&!this.checkColor(this.config.bgcolor))throw"TOOLTIP [EMS FRAMEWORK] : bgcolor option '"+this.config.bgcolor+"' is not a color.";if(null!=this.config.color&&!this.checkColor(this.config.color))throw"TOOLTIP [EMS FRAMEWORK] : color option '"+this.config.color+"' is not a color.";if(null!=this.config.classname&&"string"!=typeof this.config.classname)throw"TOOLTIP [EMS FRAMEWORK] : classname option '"+this.config.classname+"' is not a string.";if(this.config.container&&("string"!=typeof this.config.container||0===g(this.config.container).length))throw"TOOLTIP [EMS FRAMEWORK] : element '"+this.config.container+"' is undefined.";if(1<g(this.config.container).length)throw"TOOLTIP [EMS FRAMEWORK] : element '"+this.config.container+"' is ambiguous.";if(null!=this.config.content&&"string"!=typeof this.config.content)throw"TOOLTIP [EMS FRAMEWORK] : content '"+this.config.from+"' is not a string.";if(null===this.config.content&&!this.$elem.attr("title"))throw"TOOLTIP [EMS FRAMEWORK] : content is not defined.";if("string"!=typeof this.config.event)throw"TOOLTIP [EMS FRAMEWORK] : event option '"+this.config.event+"' is not a string.";if(g.each(this.config.event.split(" "),function(t,i){if(-1===g.inArray(i,o.validEvent))throw"TOOLTIP [EMS FRAMEWORK] : event option '"+i+"' is wrong.";"hover"===i?(o.eventsDisplay.push("mouseenter"),o.eventsHide.push("mouseleave")):"focus"===i?(o.eventsDisplay.push("focus"),o.eventsHide.push("blur")):"click"===i&&o.eventsDisplay.push("click")}),this.config.id&&"string"!=typeof this.config.id)throw"TOOLTIP [EMS FRAMEWORK] : element '"+this.config.id+"' is not a string.";if("boolean"!=typeof this.config.html)throw"TOOLTIP [EMS FRAMEWORK] : html option '"+this.config.html+"' is not a boolean.";if("boolean"!=typeof this.config.mouse)throw"TOOLTIP [EMS FRAMEWORK] : mouse option '"+this.config.mouse+"' is not a boolean.";if("string"!=typeof this.config.origin)throw"TOOLTIP [EMS FRAMEWORK] : origin option '"+this.config.origin+"' is not a string.";if(-1===g.inArray(this.config.origin,this.validOrigin))throw"TOOLTIP [EMS FRAMEWORK] : origin option '"+this.config.origin+"' is wrong.";if("string"!=typeof this.config.position)throw"TOOLTIP [EMS FRAMEWORK] : position option '"+this.config.position+"' is not a string.";if(-1===g.inArray(this.config.position,this.validPosition))throw"TOOLTIP [EMS FRAMEWORK] : position option '"+this.config.position+"' is wrong.";return this.$elem.is("[title]")&&(this.config.content=null===this.config.content?this.$elem.attr("title"):this.config.content,this.$elem.removeAttr("title")),"mouse"===this.config.origin&&-1===g.inArray("click",o.eventsDisplay)&&this.eventsDisplay.push("mousemove"),this.$elem.on(o.eventsDisplay.join(" "),function(t){"click"!==t.type&&"toggle"!==t.type||!o.visible?o.show(t):o.hide()}),this.$elem.on(o.eventsHide.join(" "),function(){o.visible&&o.hide()}),this.$elem.on("reset",function(){o.reset()}),e++,o},position:function(t,i){var o,e,n,s=this.$elem.offsetParent().offset().left,a=this.$elem.offsetParent().offset().top;e="mouse"==this.config.origin?(o=i.pageX>s?i.pageX-s:s-i.pageX,i.pageY>a?i.pageY-a:a-i.pageY):(o=this.$elem.position().left,this.$elem.position().top),this.config.container&&(o+=s>
1(n=g(t.offsetParent())).offset().left?s-n.offset().left:n.offset().left-s,e+=a>n.offset().top?a-n.offset().top:-Math.abs(n.offset().top-a)),o+=parseInt(this.$elem.css("margin-left").replace("px",""),10),e+=parseInt(this.$elem.css("margin-top").replace("px",""),10);var r,l,h,c,f=this.$elem.outerWidth(),d=this.$elem.outerHeight(),p=t.outerWidth(!0),u=t.outerHeight(!0);return"top"===this.config.position||"bottom"===this.config.position?(c=h="mouse"==this.config.origin?o-p/2:o+f/2-p/2,r=e,l="top"===this.config.position?(r="center"===this.config.origin?r+d/2+5:r,(r-=u)-5):(r="center"===this.config.origin?r-(d/2+5):r,r+="mouse"===this.config.origin?0:d,"mouse"===this.config.origin?r+15:r+5)):(l=r="mouse"==this.config.origin?e-u/2:e+d/2-u/2,c="right"===this.config.position?(h="center"===this.config.origin?o+f/2-5:o+f,h="mouse"===this.config.origin?o:h,"mouse"===this.config.origin?h+10:h+5):(h="center"===this.config.origin?o+f/2+5-p:o-p,(h="mouse"===this.config.origin?o-p:h)-5)),{fromX:h,toX:c,fromY:r,toY:l}},reset:function(){this.config={},this.$elem.unbind("hide reset show toggle on.show.tooltip on.shown.tooltip on.hide.tooltip on.hidden.tooltip").removeData()},show:function(t){var i,o,e=this;this.visible?"mouse"===this.config.origin&&(i=this.tooltip,o=this.position(i,t),i.stop().css({top:o.toY+"px",left:o.toX+"px",opacity:"1"})):(this.visible=!0,this.$elem.trigger("on.show.tooltip"),i=g("<div/>").attr({class:"tooltip "+e.config.position+(e.config.classname?" "+e.config.classname:""),"data-number":this.number,id:e.config.id?e.config.id:""}),this.config.html?i.html(this.config.content):i.text(this.config.content),this.config.container?i.appendTo(this.config.container):i.insertAfter(this.$elem),o=this.position(i,t),this.config.animation?i.css({top:o.fromY+"px",left:o.fromX+"px",opacity:"0"}).animate({top:o.toY+"px",left:o.toX+"px",opacity:"1"},240,function(){e.$elem.trigger("on.shown.tooltip")}):(i.css({top:o.toY+"px",left:o.toX+"px"}),this.$elem.trigger("on.shown.tooltip")),this.tooltip=i),i&&(e.config.bgcolor&&g('<style type="text/css" data-tooltip-number="'+this.number+'">.tooltip[data-number="'+this.number+'"]:before{border-'+e.config.position+"-color: "+e.config.bgcolor+" !important;}</style>").appendTo("head"),i.css({"background-color":e.config.bgcolor?e.config.bgcolor:"",color:e.config.color?e.config.color:""}))},toggle:function(){this.visible?this.hide():this.show()}}).constructor=i).defaults=Scrollspy.prototype.defaults,g.fn.tooltip=function(t){return this.each(function(){"string"==typeof t?g(this).trigger(t):void 0!==t&&"object"!=typeof t||new i(this,t).init()})},t.Tooltip=i}(window,jQuery),ems.tooltip={},ems.tooltip.init=function(){$('[data-toggle="tooltip"]').each(function(){$(this).tooltip()})};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.