/*! modernizr 3.5.0 (Custom Build) | MIT * * https://modernizr.com/download/?-placeholder-setclasses !*/ !function(e,n,a){function s(e,n){return typeof e===n}function o(){var e,n,a,o,t,i,c;for(var f in r)if(r.hasOwnProperty(f)){if(e=[],n=r[f],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(a=0;a 0) { $$('.gdwanimbox').each(function(i) { i.gdwAnimBox = new gdwAnimBox(i); }); } }); var gdwAnimBox = new Class({ options: { author: 'Géant du web - Michael Bourdeau', version: '3.0', lastUpdate: '2016-10-13' }, Implements: [Options, Events], initialize: function(animbox, options) { this.setOptions(options); this.input = animbox.getElement('input'); this.type = this.input.getProperty('type'); this.drawing = (animbox.getProperty('data-drawing') && animbox.getProperty('data-drawing') != '') ? animbox.getProperty('data-drawing') : 'cross'; this.color = (animbox.getProperty('data-color') && animbox.getProperty('data-color') != '') ? animbox.getProperty('data-color') : 'rgb(186,0,0)'; this.size = (animbox.getProperty('data-size') && animbox.getProperty('data-size') != '') ? +animbox.getProperty('data-size') : 16; this.canvas = new Element('canvas', { width: 30, height: 28 }).inject(new Element('label', { for: this.input.getProperty('id') }).inject(animbox, 'bottom'), 'bottom'); window.requestAnimFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function(callback) { var id = window.setTimeout(callback, 1000 / 144); }; })(); if (this.canvas.getContext) { this.input.setStyles({ position: 'absolute', top: -32768, left: -32768, visibility: 'hidden' }); this.canvas.hw = (this.canvas.width / 2); this.canvas.hh = (this.canvas.height / 2); this.canvas.endAnim = false; this.canvas.ctx = this.canvas.getContext('2d'); this.canvas.ctx.strokeStyle = this.color; this.canvas.ctx.lineWidth = 3.5; this.canvas.ctx.lineCap = 'butt'; this.pts = []; if (this.drawing == 'cross') { var bx = this.canvas.hw - (this.size / 2); var by = this.canvas.hh - (this.size / 2); for (var p = 0; p < (this.size + 1); p++) { this.pts.push({ x: bx + p, y: by + p }); } bx = this.canvas.hw + (this.size / 2); for (var p = 0; p < (this.size + 2); p++) { this.pts.push({ x: bx - p, y: by + p }); } } else if (this.drawing == 'checkmark') { var px = (this.canvas.width * 0.15); var py = this.canvas.hh; do { this.pts.push({ x: px, y: py }); px++; py++; } while(px < (this.canvas.width * 0.37)); do { this.pts.push({ x: px, y: py }); px++; py--; } while(px < (this.canvas.width * 0.90)); } this.clearCanvas(); if (this.input.checked) { this.drawCheck(); } this.input.addEvent('change', this.animateCheck.bind(this)); } else { animbox.addClass('no-canvas'); } }, drawCheck: function() { this.canvas.ctx.beginPath(); this.canvas.ctx.moveTo(this.pts[0].x, this.pts[0].y); if (this.drawing == 'cross') { this.canvas.ctx.lineTo((this.canvas.hw + (this.size / 2)), (this.canvas.hh + (this.size / 2))); this.canvas.ctx.moveTo((this.canvas.hw + (this.size / 2)), (this.canvas.hh - (this.size / 2))); this.canvas.ctx.lineTo((this.canvas.hw - (this.size / 2)), (this.canvas.hh + (this.size / 2))); } else if (this.drawing == 'checkmark') { for (var p = 0; p < this.pts.length; p++) { this.canvas.ctx.lineTo(this.pts[p].x, this.pts[p].y); } } this.canvas.ctx.stroke(); }, animateCheck: function() { if (this.input.checked) { this.canvas.endAnim = false; var self = this; var cp = 0; function draw() { setTimeout(function() { if (self.canvas.endAnim == false && self.input.checked != false) { requestAnimFrame(draw); } if (cp + 2 > self.pts.length) { self.canvas.endAnim = true; } else { cp++; } if (self.input.checked != false) { self.canvas.ctx.clearRect(0, 0, self.canvas.width, self.canvas.height); self.canvas.ctx.beginPath(); self.canvas.ctx.moveTo(self.pts[0].x, self.pts[0].y); for (var p = 0; p < cp; p++) { self.canvas.ctx.lineTo(self.pts[p].x, self.pts[p].y); if (self.drawing == 'cross' && self.pts[p].x == (self.canvas.hw + (self.size / 2))) { self.canvas.ctx.moveTo((self.canvas.hw + (self.size / 2)), (self.canvas.hh - (self.size / 2))); } } self.canvas.ctx.stroke(); } }, 1000 / 144); }; draw(); } else { this.clearCanvas(); } if (this.type == 'radio') { $$('input[name=' + this.input.get('name') + ']').filter(function(c) { return c.get('type') == 'radio' && c.id != self.input.id; }).each(function(c) { c.checked = false; c.getParent().gdwAnimBox.clearCanvas(); }); } }, clearCanvas: function() { this.canvas.endAnim = true; this.canvas.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); } }); var gll={};window.addEvent("load",function(){gll=new gdwLazyLoad,gll.activate()});var gdwLazyLoad=new Class({options:{author:"G�ant du web - Michael Bourdeau",version:"1.2",lastUpdate:"2016-03-09"},Implements:[Options,Events],initialize:function(t){this.setOptions(t)},activate:function(){$$(".lazy-load").each(function(t){t.removeClass("lazy-load"),t.hasAttribute("data-src")&&("/"!==t.getProperty("data-src").substring(0,1)&&t.setProperty("data-src","/"+t.getProperty("data-src")),new Element("img",{src:t.getProperty("data-src"),events:{load:function(a){var e=a.target;"IMG"==t.tagName?t.set("src",e.getProperty("src")):t.setStyle("background-image","url("+e.getProperty("src")+")")}}}),t.removeProperty("data-src"))})}});!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.svg4everybody=b()}):"object"==typeof module&&module.exports?module.exports=b():a.svg4everybody=b()}(this,function(){function a(a,b,c){if(c){var d=document.createDocumentFragment(),e=!b.hasAttribute("viewBox")&&c.getAttribute("viewBox");e&&b.setAttribute("viewBox",e);for(var f=c.cloneNode(!0);f.childNodes.length;)d.appendChild(f.firstChild);a.appendChild(d)}}function b(b){b.onreadystatechange=function(){if(4===b.readyState){var c=b._cachedDocument;c||(c=b._cachedDocument=document.implementation.createHTMLDocument(""),c.body.innerHTML=b.responseText,b._cachedTarget={}),b._embeds.splice(0).map(function(d){var e=b._cachedTarget[d.id];e||(e=b._cachedTarget[d.id]=c.getElementById(d.id)),a(d.parent,d.svg,e)})}},b.onreadystatechange()}function c(c){function e(){for(var c=0;c0)&&n(e,67)}var f,g=Object(c),h=/\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/,i=/\bAppleWebKit\/(\d+)\b/,j=/\bEdge\/12\.(\d+)\b/,k=/\bEdge\/.(\d+)\b/,l=window.top!==window.self;f="polyfill"in g?g.polyfill:h.test(navigator.userAgent)||(navigator.userAgent.match(j)||[])[1]<10547||(navigator.userAgent.match(i)||[])[1]<537||k.test(navigator.userAgent)&&l;var m={},n=window.requestAnimationFrame||setTimeout,o=document.getElementsByTagName("use"),p=0;f&&e()}function d(a){for(var b=a;"svg"!==b.nodeName.toLowerCase()&&(b=b.parentNode););return b}return c});var gb={};window.addEvent("load",function(){gb=new gdwPopBox});var gdwPopBox=new Class({options:{author:"G�ant du web - Michael Bourdeau",version:"0.7",lastUpdate:"2017-04-01"},Implements:[Options,Events],initialize:function(a){this.setOptions(a);var b=this;b.busy=!1,b.popBox,b.preload=[],b.prevElement=null,b.nextElement=null,b.params={},b.popBox=new Element("div",{id:"gdwbox",class:"hidden",html:'
×
'}),b.popBox.container=b.popBox.getElement(".img-container"),b.popBox.container.adopt(new Element("div",{class:"controls hidden",html:''})),b.popBox.fade("hide"),b.popBox.addEvent("click",b.closePopbox.bind(b)),b.popBox.getElement("i.close").addEvent("click",b.closePopbox.bind(b)),b.popBox.container.addEvent("click",function(a){return a.preventDefault(),a.stopPropagation(),!1}),document.body.adopt(b.popBox),b.params.loadingText="",b.params.width=0,b.params.height=0,b.params.resized=!1,window.addEvents({resize:function(){b.popBox.hasClass("hidden")||b.calculatePosition()},keypress:function(a){switch(a.code){case 33:case 37:case 38:b.slideshow(b.prevElement);break;case 34:case 39:case 40:b.slideshow(b.nextElement);break;case 27:b.closePopbox()}}}),b.popBox.container.getElements(".ctrl").addEvent("click",function(){b.slideshow(this.hasClass("prev")?b.prevElement:b.nextElement)})},openImage:function(a,b){var c=this;return!c.busy&&(c.busy=!0,"undefined"!=typeof b&&"object"==typeof b||(b={}),"undefined"!=typeof b.url&&""!=b.url||(b.url=a.get("href"),"undefined"!=typeof b.url&&""!=b.url)?(null!=a.get("data-gb-group")&&(c.params.group=a.get("data-gb-group"),$$("[data-gb-group="+c.params.group+"]").length>1&&(c.popBox.getElement(".controls").removeClass("hidden"),$$("[data-gb-group="+c.params.group+"]").each(function(b,d){b==a?($$("[data-gb-group="+c.params.group+"]")[d-1]?c.prevElement=$$("[data-gb-group="+c.params.group+"]")[d-1]:c.prevElement=$$("[data-gb-group="+c.params.group+"]")[$$("[data-gb-group="+c.params.group+"]").length-1],$$("[data-gb-group="+c.params.group+"]")[d+1]?c.nextElement=$$("[data-gb-group="+c.params.group+"]")[d+1]:c.nextElement=$$("[data-gb-group="+c.params.group+"]")[0]):c.preload.push(b)}))),"undefined"==typeof b.width||isNaN(b.width)||(c.params.width=b.width),"undefined"==typeof b.height||isNaN(b.height)||(c.params.height=b.height),new Element("img",{src:b.url,alt:a.get("title"),events:{load:function(){this.set("tween",{duration:300}),this.natural={},this.natural.width=this.width,this.natural.height=this.height,c.popBox.container.hasClass("resize")&&this.fade("hide"),c.popBox.container.adopt(this),c.openPopbox(),c.busy=!1}}}),c.loading(),!1):(console.log("gdwPopbox failed to find url"),!1))},loading:function(){var a=this;a.preload.length>0&&(a.preload.each(function(a){"undefined"==typeof a.preloaded&&new Element("img",{src:a.get("href"),events:{load:function(){a.preloaded=!0,this.destroy()}}})}),a.preload=[])},openPopbox:function(){var a=this;a.popBox.removeClass("hidden"),a.popBox.fade("in"),document.body.addClass("overflow"),a.calculatePosition(),a.popBox.container.hasClass("resize")&&function(){a.popBox.getElement("img").fade("in"),a.popBox.container.removeClass("resize")}.delay(305)},closePopbox:function(){this.popBox.addClass("hidden"),this.popBox.fade("hide"),document.body.removeClass("overflow"),this.popBox.getElement("img").destroy(),this.params.width=0,this.params.height=0,this.params.group="",this.params.resized=!1,this.popBox.container.removeProperty("style"),this.popBox.container.removeClass("resize"),this.popBox.getElement(".controls").addClass("hidden"),this.prevElement=null,this.nextElement=null},slideshow:function(a){if(null===a)return!1;var b=this;b.popBox.getElement("img").fade("out"),function(){b.popBox.getElement("img").destroy(),b.popBox.container.addClass("resize"),a.onclick()}.delay(305)},calculatePosition:function(){var a={},b=this.popBox.getElement("img"),c=window.getSize(),e=(window.getScroll(),0);if(a.width=b.natural.width,a.height=b.natural.height,a.extra=this.popBox.container.getComputedSize(),(this.params.width>0||this.params.height>0)&&(e=this.params.width>0&&this.params.height>0?this.params.width/a.width0?this.params.width/a.width:this.params.height/a.height,a.width=a.width*e,a.height=a.height*e),a.width>c.x||a.height>c.y){var f=.9*c.x,g=.9*c.y;e=0,a.width>f&&(e=f/a.width,a.width=a.width*e,a.height=a.height*e),a.height>g&&(e=g/a.height,a.width=a.width*e,a.height=a.height*e),this.params.resized=!0}this.popBox.container.setStyles({width:a.width+(a.extra["padding-left"]+a.extra["padding-right"]),height:a.height+(a.extra["padding-top"]+a.extra["padding-bottom"]),top:(c.y-(a.height+(a.extra["padding-left"]+a.extra["padding-right"])))/2,left:(c.x-(a.width+(a.extra["padding-top"]+a.extra["padding-bottom"])))/2})},calculateAspectRatio:function(a,b){return 0==b?a:this.calculateAspectRatio(b,a%b)}});