PageSourceSearch

https://www.imra.eu/wp-content/themes/imra/public/js/main.js?ver=1725278257

js imra.eu collected 2026-10-10 01:04:41 UTC 165,854 bytes, 4,483 lines download raw bytes

vendor: 17,065 bytes, lines 1-54
1/**
2 * SCRIPTS FRONT-OFFICE
3 *
4 * v1.1 - (c) 2016 @nakorinteractive
5 * http://www.nakor-interactive.fr
6 *
7**/
8
9
10 	// Animation WOW sur un conteneur spécifique
11 	// var wow = new WOW({ scrollContainer: '#page'});
12 	
13 	var wow = new WOW(
14 		{
15		    boxClass:     'wow',
16		    animateClass: 'animated',
17		    offset:       40,
18		    mobile:       true,       // Désactiver sur mobile
19		    live:         true,       // Chargement asynchrone des contenus
20		    callback:     function ( box ) {
21		      // the callback is fired every time an animation is started
22		      // the argument that is passed in is the DOM node being animated
23		    },
24		    scrollContainer: null // optional scroll container selector, otherwise use window
25		  }
26 	);
27 	wow.init();
28 	
29 	
30	// Variables accessibles par tous les scripts
31 	var grid_values = { xs: 0, sm: 544, md: 768, lg: 992, xl: 1200 };
32 	var content_lower_window;
33
34 	var datepicker_date_format = ( CT.current_language == 'en' ) ? 'mm-dd-yy' : 'dd-mm-yy';
35
36 	var form_codename;
37 	var form_notification_progress;
38
39	// On charge en premier les librairies externes non chargées dans le VENDOR
40	/**
41	 * Chargement des scripts des librairies externes
42	**/
43	
44		/*! jQuery UI - v1.12.1 - 2016-10-17
45	
46		* http://jqueryui.com
47	
48		* Includes: widget.js, form-reset-mixin.js, keycode.js, labels.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/spinner.js
49	
50		* Copyright jQuery Foundation and other contributors; Licensed MIT */
51	
52		
53	
54		(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var i=0,s=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,n,o=s.call(arguments,1),a=0,r=o.length;r>a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))};var n=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var l=n[s]("widget");t.data(l[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(l[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(o){var a=i.options.classes[o]||"";a=t.trim(a.replace(n,"")),s[o]=(a+" "+e[o]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();
vendor: 1,446 bytes, line 54
54this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>
54"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconS
vendor: 4,391 bytes, line 54
54pace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e}
vendor: 5,966 bytes, line 54
54,_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:e(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}
54),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner});
55
56
57	// Chargement des FONCTIONS générales (dont) pour scripts UTILS
58	/**
59	 * Chargement des fonctions générales (dont) pour les scripts UTILS
60	 */
61	
62	 	/** 
63	
64	 	 * Champs INPUT[type="FILE"] stylisé
65	
66	 	 *
67	
68	 	 * Thanks to Osvaldas Valutis, www.osvaldas.info
69	
70	 	 * Available for use under the MIT License
71	
72	 	 **/
73	
74	 	
75	
76	 		'use strict';
77	
78	 	
79	
80	 		;( function( $, window, document, undefined ) {
81	
82	 			$( 'input[type="file"].stylized' ).each( function() {
83	
84	 	
85	
86	 				// console.log( 'test' );
87	
88	 	
89	
90	 				var $input	 = $( this ),
91	
92	 					$label	 = $input.next( 'label' ),
93	
94	 					val 	 = $label.html();
95	
96	 	
97	
98	 				$input.on( 'change', function( e ) {
99	
100	 	
101	
102	 					var file_name = '';
103	
104	 	
105	
106	 					if( this.files && this.files.length > 1 ) {
107	
108	 	
109	
110	 						file_name = ( this.getAttribute( 'data-multiple-caption' ) || '' ).replace( '{count}', this.files.length );
111	
112	 					
113	
114	 					} else if( e.target.value ) {
115	
116	 	
117	
118	 						file_name = e.target.value.split( '\\' ).pop();
119	
120	 	
121	
122	 					}
123	
124	 	
125	
126	 					if( file_name ) {
127	
128	 	
129	
130	 						$label.attr( 'data-has-value', 'true' )
131	
132	 							  .find( 'span' ).html( file_name );
133	
134	 					
135	
136	 					} else {
137	
138	 	
139	
140	 						$label.attr( 'data-has-value', 'true' )
141	
142	 						  	  .html( val );
143	
144	 	
145	
146	 					}
147	
148	 	
149	
150	 				});
151	
152	 	
153	
154	 				// Firefox bug fix
155	
156	 				$input.on( 'focus', function(){ $input.addClass( 'has-focus' ); })
157	
158	 					  .on( 'blur', function(){ $input.removeClass( 'has-focus' ); });
159	
160	 			
161	
162	 			});
163	
164	 	
165	
166	 		})( jQuery, window, document );
167
168
169	//--------------------//
170	// SCRIPTS PRINCIPAUX //
171	//--------------------//
172
173	jQuery(document).ready( function($) {
174
175		// Définitions des variables (NE PAS SUPPRIMER)
176		var body 	  = $( 'html', 'body' );
177		/*
178		var is_mobile = (navigator.userAgent.match(/iPhone/i)) ||
179					    (navigator.userAgent.match(/iPod/i)) ||
180					    (navigator.userAgent.match(/iPad/i)) ||
181					    (navigator.userAgent.match(/Android/i)) ||
182					    (navigator.userAgent.match(/Blackberry/i)) ||
183					    (navigator.userAgent.match(/Windows Phone/i)) ? true : false;
184		*/
185		// var $px,
186		// var current_width;
187
188
189		// Variable scrollTop actualisée pour tous les javascripts
190		var scrollTop = $( window ).scrollTop();
191
192		$( window ).on( 'scroll', function() {
193			scrollTop = $( window ).scrollTop();
194			// console.log(scrollTop);
195		});
196
197
198		// Chargement des scripts UTILS
199		/**
200		 * Chargement des scripts "utilitaires"
201		**/
202		
203		
204		//-------------------------------------------------------------------------------------------//
205		// mode DEDUG                                                                                //
206		//-------------------------------------------------------------------------------------------//
207		// require debug.js
208		
209		
210		//-------------------------------------------------------------------------------------------//
211		// Outils communs                                                                            //
212		//-------------------------------------------------------------------------------------------//
213		/**
214		 * Fonctions communes
215		 */
216		 	
217		 	function validate_email( email ) {
218		  		// var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
219		
220		  		var regex = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
221		
222		  		return regex.test(email);
223		  	}
224		
225		
226		/**
227		
228		
229		 * Les ajustements autoatiques de hauteur des TEXTAREA
230		
231		
232		**/
233		
234		
235		
236		
237		
238			//----------------------------------//
239		
240		
241			// Autosize général 				//
242		
243		
244			//----------------------------------//
245		
246		
247			autosize( $( 'textarea[ data-autosize="true" ]' ) );
248		
249		
250		
251		
252		
253		
254		
255		
256			//----------------------------------//
257		
258		
259			// Autosize spécifique 				//
260		
261		
262			//----------------------------------//
263		
264		
265			// autosize( $( '#xxx' ) );
266		
267		
268		
269		/**
270		 * Comparaison entre la hauteur du content et la hauteur de la fenêtre
271		 */
272		
273			function compare_content_and_window_height () {
274		
275				// On recalcule le body.height en fonction de son contenu
276				var bodyHeight = $('#masthead').height() + $('#main').height() + $('#mastfoot').height();
277				var windowHeight = $(window).height();
278		
279				if( bodyHeight < windowHeight ) {
280					content_lower_window = true;
281					$('html').addClass('content-lower-window');
282				}
283				else {
284					content_lower_window = false;
285					$('html').removeClass('content-lower-window');
286				}
287			}
288		
289		
290			// Initialisation de la variable 'content_lower_window' au chargement de la page
291			compare_content_and_window_height();
292		
293		
294			// Mise à jour de la variable 'content_lower_window' si la largeur de fenêtre change
295			$(window).on( 'orientationchange resize', function() {
296				compare_content_and_window_height();
297			});
298		//	require sticky-header.js							// Fixation du header au scroll
299		/**
300		 * Footer fixé si la fenêtre est plus haute que le contenu
301		 */
302		
303			function fixed_footer ( cible ) {
304		
305		  		if( content_lower_window ) {
306		    		$( cible ).addClass( 'footer-fixed' );
307				}
308				
309				else if( $(cible).hasClass( 'footer-fixed' ) ) {
310					$( cible ).removeClass( 'footer-fixed' );
311				}
312			}
313		/**
314		 * Retour haut de page
315		 */
316		
317			function back_to_top ( element, activate_height ) {
318		
319				$(element).on( 'click', function(e) {
320					e.preventDefault();		
321					$( 'html, body' ).animate({scrollTop:0},'2000','swing');
322				});
323		
324				// Au chargement on affiche ou non le bouton TOTOP
325				var scrollTop = $(window).scrollTop();
326		  		back_to_top_display (scrollTop, element, activate_height);
327		
328				// On affiche à une certaine hauteur de scroll
329				$(window).scroll( function() {
330		
331		  			scrollTop = $(window).scrollTop();
332		  			back_to_top_display (scrollTop, element, activate_height);
333		
334		  		});
335			}
336		
337		
338			function back_to_top_display(scroll_position, element, activate_height) {
339		
340				if ( scroll_position >= activate_height && ! $(element).hasClass('active') ) {
341					$(element).addClass('active');
342				}
343				else if ( scroll_position < activate_height && $(element).hasClass('active') ) {
344					$(element).removeClass('active');
345				}
346			}
347		/**
348		 * Effet SCROLL DOWN
349		 */
350		
351		 	function scroll_down( element, cible, delta, speed, header_fixed ) {
352		
353		 		if( $( element ).length ) {
354		
355		 			$( document ).on( 'click', element, function(e) {
356		
357		 				e.stopPropagation();
358		 				e.preventDefault();
359		
360		 				var cible_position = $( cible ).offset().top;
361		
362		 				if( header_fixed ) {
363		 				
364		 					var header_height  = $( '#main' ).offset().top;
365		 					var range = cible_position - header_height + delta;
366		 				}
367		
368		 				else {
369		 					var range = cible_position + delta;
370		 				}
371		
372		 				// console.log( range );
373		
374		 				$( 'html, body' ).animate(
375		 					{
376		 						scrollTop: range
377		 					},
378		 					speed
379		 				);
380		    		
381		    			return false;
382		
383		 			})
384		 		}
385		 	}
386		/** 
387		 * Nettoyage de chaîne HTML
388		 */
389		
390			function CT_string_escape_html( s, forAttribute ) {
391		
392				var CT_string_escape_html_map = {
393				    '&'  : '&amp;',
394				    '<'  : '&lt;',
395				    '>'  : '&gt;',
396				    '"'  : '&quot;',
397				    "'"  : '&#39;'
398				};
399			
400				return s.replace( forAttribute ? /[&<>'"]/g : /[&<>]/g, function( c ) {
401			
402					return CT_string_escape_html_map[ c ];
403				
404				});
405		
406			}
407		//	require equal-height.js 							// Fixer une hauteur commune à un groupe d'éléments
408		/**
409		 * Test si navigateur MOBILE
410		**/
411		
412			// http://stackoverflow.com/a/11381730/989439
413			function mobilecheck() {
414				var check = false;
415				(function(a){if(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
416				return check;
417			}
418		/**
419		 *  Empêche le scroll sur un élément parent de l'élément scrollé
420		**/
421		
422			function prevent_scroll ( element ) {
423		
424				$( document ).on(
425					'DOMMouseScroll mousewheel',
426					element,
427					function ( ev ) {
428		    	
429		    			var _this = $(this),
430		        			scrollTop = this.scrollTop,
431		       				scrollHeight = this.scrollHeight,
432		        			height = _this.innerHeight(),
433		        			delta = ( ev.type == 'DOMMouseScroll' ? ev.originalEvent.detail * -40 : ev.originalEvent.wheelDelta ),
434		        			up = delta > 0;
435		
436		    			var prevent = function() {
437		        			ev.stopPropagation();
438		        			ev.preventDefault();
439		        			ev.returnValue = false;
440		        			return false;
441		    			}
442		
443		    			if( ! up && -delta > scrollHeight - height - scrollTop ) {
444		        
445		        			// Scrolling down, but this will take us past the bottom.
446		        			_this.scrollTop( scrollHeight );
447		        			return prevent();
448		    
449		    			}
450		
451		    			else if ( up && delta > scrollTop ) {
452		        
453		        			// Scrolling up, but this will take us past the top.
454		        			_this.scrollTop(0);
455		        			return prevent();
456		    
457		    			}
458				
459					}
460				);
461		
462			}
463		
464		//	require bx-slider.js								// slider bxslider.js personnalisable via data-attributs
465		//	require layerslider.js								// slider layerslider.js personnalisable via data-attributs
466		/** 
467		 * Champs SELECT2.JS personnalisable via data-attributs
468		**/
469		
470			if( $('.select2').length ) {
471		
472				$('.select2').each( function () {
473		
474					CT_select2_init( $(this) );
475		
476		        });
477		
478			}
479		
480		
481			//------------------------------------------//
482			// Fonction d'activation d'un champ SELECT2 //
483			//------------------------------------------//
484			function CT_select2_init( _cible ) {
485		
486				var  datas = typeof _cible.attr('data-attrs')  !== 'undefined' ? JSON.parse( _cible.attr('data-attrs') ) : {};
487				var _datas = {};
488		
489				// Paramètre par défaut
490				_datas['dropdownAutoWidth'] = true;
491				// _datas['dropdownCssClass'] = 'select2-dropdown-custom';
492				_datas['debug'] = false;
493				_datas['title'] = " ";
494		
495				// On traite chaque paramètre unitairement
496				if( datas['placeholder'] != undefined ) _datas['placeholder'] = datas['placeholder'];
497				if( datas['search'] != true ) 			_datas['minimumResultsForSearch'] = -1;
498				if( datas['width'] != undefined )		_datas['width'] = datas['width'];
499		
500				// Si gestion de niveaux multiples
501				if( datas['multi-levels'] == true ) {
502		
503					_datas['templateResult'] = function ( data ) {
504		
505						// Si vide ou si OPTGROUP, on retourne le texte par défaut
506						if( ! data.element || data.element.tagName == 'OPTGROUP' ) { return data.text; }
507		
508						// Si il doit y avoir un rendu HTML
509						if( datas['render-html'] == true ) {
510		
511							$text_html = data.element.dataset.renderHtml;
512							$text_html = $text_html.replace(/\\/g,'');
513		
514							$return = '<span class="' + data.element.className + '">' + $text_html + '</span>';
515						}
516						else {
517							$return = data.text;
518						}
519		
520						return $( $return );
521					
522					};
523				}
524		
525				// Si il doit y avoir un rendu HTML
526				else if( datas['render-html'] == true ) {
527		
528					_datas['templateResult'] = function ( data ) {
529		
530						// Si vide ou si OPTGROUP, on retourne le texte par défaut
531						if( ! data.element || data.element.tagName == 'OPTGROUP' ) { return data.text; }
532		
533						$text_html = data.element.dataset.renderHtml;
534						$text_html = $text_html.replace(/\\/g,'');
535		
536						$return = '<span>' + $text_html + '</span>';
537		
538						return $( $return );
539					
540					};
541		
542				}
543		
544				if( Object.keys(datas).length > 0 ) {
545					_cible.select2( _datas );
546				}
547		
548				else {
549					_cible.select2();
550				}
551		
552				//--------------------------------------------//
553				// Réinitialisation du titre "popup" au HOVER //
554				//--------------------------------------------//
555				function select2_reset_title_multiple( _object ) {
556					_object.next('.select2-container')
557						   .children('.selection')
558						   .children('.select2-selection')
559						   .children('.select2-selection__rendered')
560						   .children('li')
561						   .removeAttr('title');
562				}
563		
564				function select2_reset_title( _object ) {
565					_object.next('.select2-container')
566						   .children('.selection')
567						   .children('.select2-selection')
568						   .children('.select2-selection__rendered')
569						   .removeAttr('title');
570				}
571		
572				if( datas['multiple'] == true ) {
573					select2_reset_title_multiple( _cible );
574					_cible.on('change', function(e) { select2_reset_title_multiple( _cible ); });
575				}
576				else {
577					select2_reset_title( _cible );
578					_cible.on('change', function(e) { select2_reset_title( _cible ); });
579				}
580		
581			}
582		
583		//	require clock-canvas.js								// Canvas "horloge"
584		
585		/**
586		
587		 * Nettoyage d'une chaîne avec des caractères latins
588		
589		**/
590		
591		
592		
593		
594		
595			var base64map = "eyLDgSI6IkEiLCLEgiI6IkEiLCLhuq4iOiJBIiwi4bq2IjoiQSIsIuG6sCI6IkEiLCLhurIiOiJBIiwi4bq0IjoiQSIsIseNIjoiQSIsIsOCIjoiQSIsIuG6pCI6IkEiLCLhuqwiOiJBIiwi4bqmIjoiQSIsIuG6qCI6IkEiLCLhuqoiOiJBIiwiw4QiOiJBIiwix54iOiJBIiwiyKYiOiJBIiwix6AiOiJBIiwi4bqgIjoiQSIsIsiAIjoiQSIsIsOAIjoiQSIsIuG6oiI6IkEiLCLIgiI6IkEiLCLEgCI6IkEiLCLEhCI6IkEiLCLDhSI6Ik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InciLCLhuoEiOiJ3Iiwi4rGzIjoidyIsIuG6mCI6InciLCLhuo0iOiJ4Iiwi4bqLIjoieCIsIuG2jSI6IngiLCLDvSI6InkiLCLFtyI6InkiLCLDvyI6InkiLCLhuo8iOiJ5Iiwi4bu1IjoieSIsIuG7syI6InkiLCLGtCI6InkiLCLhu7ciOiJ5Iiwi4bu/IjoieSIsIsizIjoieSIsIuG6mSI6InkiLCLJjyI6InkiLCLhu7kiOiJ5IiwixboiOiJ6Iiwixb4iOiJ6Iiwi4bqRIjoieiIsIsqRIjoieiIsIuKxrCI6InoiLCLFvCI6InoiLCLhupMiOiJ6IiwiyKUiOiJ6Iiwi4bqVIjoieiIsIuG1tiI6InoiLCLhto4iOiJ6IiwiypAiOiJ6IiwixrYiOiJ6IiwiyYAiOiJ6Iiwi76yAIjoiZmYiLCLvrIMiOiJmZmkiLCLvrIQiOiJmZmwiLCLvrIEiOiJmaSIsIu+sgiI6ImZsIiwixLMiOiJpaiIsIsWTIjoib2UiLCLvrIYiOiJzdCIsIuKCkCI6ImEiLCLigpEiOiJlIiwi4bWiIjoiaSIsIuKxvCI6ImoiLCLigpIiOiJvIiwi4bWjIjoiciIsIuG1pCI6InUiLCLhtaUiOiJ2Iiwi4oKTIjoieCJ9";
596		
597			var Latinise = {};
598		
599		
600		
601			Latinise.latin_map = JSON.parse(
602		
603				decodeURIComponent(
604		
605					escape(
606		
607						atob( base64map )
608		
609					)
610		
611				)
612		
613			);
614		
615		
616		
617			String.prototype.latinise = function() {
618		
619				return this.replace( /[^A-Za-z0-9\[\] ]/g , function(a) {
620		
621					return Latinise.latin_map[a]||a;
622		
623				})
624		
625			};
626		
627		
628		
629			String.prototype.latinize = String.prototype.latinise;
630		
631		
632		
633			String.prototype.isLatin = function() {
634		
635				return this==this.latinise();
636		
637			}
638		/**
639		 * Fonction de vérification de la sécurité du MOT DE PASSE => depuis le script WP
640		 */
641		
642			function wp_check_password_strength($pwd1, $pwd2, $strength, $submit, blacklist) {
643		
644				// Valeurs des 2 champs MOMT DE PASSE
645		    	var pwd1 = $pwd1.val();
646				var pwd2 = $pwd2.val();
647		
648				// Reinitialisation de la vérification
649				$submit.removeClass('disabled').prop('disabled', true);
650		    	$strength.removeClass('short bad good strong').addClass('hidden');
651		
652				// On ajoute les mots "blacklistés" à ceux des champs et des données du site
653				blacklist = blacklist.concat(wp.passwordStrength.userInputBlacklist());
654		
655				// Force du MOT DE PASSE
656				var strength = wp.passwordStrength.meter(pwd1, blacklist, pwd2);
657		
658			    // Retour HTML de la force de la sécurité
659			    switch (strength) {
660			 
661			    	case -1 :
662			    		$strength.addClass('hidden').html();
663			            break;
664		
665			        case 0 :
666			    		$strength.removeClass('hidden').addClass('bad').html(CT_translations['password_strength_bad']);				// pwsL10n.bad
667			            break;
668		
669			        case 1 :
670			    		$strength.removeClass('hidden').addClass('bad').html(CT_translations['password_strength_bad']);				// pwsL10n.bad
671			            break;
672		
673			        case 2 :
674			            $strength.removeClass('hidden').addClass('bad').html(CT_translations['password_strength_bad']);				// pwsL10n.bad
675			            break;
676			 
677			        case 3 :
678			            $strength.removeClass('hidden').addClass('good').html(CT_translations['password_strength_good']);			// pwsL10n.good
679			            break;
680			 
681			        case 4 :
682			            $strength.removeClass('hidden').addClass('strong').html(CT_translations['password_strength_strong']);		// pwsL10n.strong
683			            break;
684			 
685			        case 5 :
686			            $strength.removeClass('hidden').addClass('short').html(CT_translations['password_strength_mismatch']);		// pwsL10n.mismatch
687			            break;
688			 
689			        default :
690			            $strength.addClass('short').html(pwsL10n.short);															// pwsL10n.short
691			    }
692		
693			    // Même si pwd2 est vide un retour HTML est fait,
694			    // On active le bouton SUBMIT seulement si la force de sécurité est forte ET que les 2 mots de passe sont identiques
695			    if ( ( 3 === strength || 4 === strength ) && '' !== pwd2.trim() ) {
696			        $submit.addClass('disabled').prop('disabled', false);
697			    }
698		
699				return strength;
700			}
701
702		// Chargement des scripts du COEUR du thème
703		/**
704		 * Chargement des scripts du COEUR
705		**/
706		
707			/**
708		
709			 * Traitement d'un Carrousel avec la librairie BX Slider
710		
711			**/
712		
713			
714		
715			 	function CT_bxslider( codename, $object_BXS, $_options, $_breakpoints ) {
716		
717			
718		
719			 		if( $('#' + codename + '-carrousel > ul').length ) {
720		
721			
722		
723			
724		
725						function build() {
726		
727			
728		
729				 			var container_width = $('#' + codename).width();
730		
731			
732		
733				 			var $object_breakpoints = $_breakpoints;
734		
735				 			var total_breakpoints   = Object.keys($object_breakpoints).length;
736		
737			
738		
739				 			var breakpoints = [];
740		
741				 			var numbers = [];
742		
743			
744		
745				 			var slides_number;
746		
747			
748		
749				 			var $object_options = $_options;
750		
751			
752		
753				 			var $options = {
754		
755				 				'mode'			 : 'horizontal',
756		
757								'slideWidth'	 : '5000',
758		
759								'minSlides'		 : '1',
760		
761								'maxSlides'		 : '1',
762		
763								'slideMargin'	 : '0',
764		
765								'moveSlides'	 : '1',
766		
767								'infiniteLoop'	 : true,
768		
769								'autoReload' 	 : true,
770		
771				 				'pager'			 : false,
772		
773								'controls'		 : false,
774		
775								'auto'			 : false,
776		
777								'pause'			 : '6000',
778		
779								'speed'			 : '750',
780		
781								'startSlide'	 : '0',
782		
783								'nextText'		 : ' ',
784		
785								'prevText'		 : ' ',
786		
787								'adaptiveHeight' : false,
788		
789								'responsive' 	 : true
790		
791				 			};
792		
793			
794		
795			
796		
797				 			//-----------------------------------------------------------------------------------------------//
798		
799				 			// Construction des tableaux BREAKPOINTS et NUMBERS et définition de la variable "slides_number" //
800		
801				 			//-----------------------------------------------------------------------------------------------//
802		
803				 			$.each( $object_breakpoints, function( _breakpoint, _number ) {
804		
805			
806		
807				 				breakpoints.push(_breakpoint);
808		
809				 				numbers.push(_number);
810		
811			
812		
813				 			});
814		
815			
816		
817				 			// Définition du nombre de slides par défaut
818		
819				 			slides_number = numbers[0];
820		
821			
822		
823				 			// (re)Définition du nombre de slides en fonction de la largeur d'écran
824		
825				 			for( var i = 0 ; i < total_breakpoints ; i++ ) {
826		
827			
828		
829				 				// Dernière condition
830		
831				 				if( container_width >= breakpoints[i] && i == ( total_breakpoints - 1 ) ) {
832		
833				 					slides_number = numbers[i];
834		
835				 					break;
836		
837				 				}
838		
839			
840		
841				 				// Condition intermédiaire
842		
843				 				else if( container_width >= breakpoints[i] && container_width < breakpoints[i+1]  && i < ( total_breakpoints - 1 ) ) {
844		
845				 					slides_number = numbers[i];
846		
847				 					break;
848		
849				 				}
850		
851				 			}
852		
853			
854		
855				 			// On met à jour les valeurs de $options : "minSlides" et "maxSlides"
856		
857				 			$options['minSlides'] = slides_number;
858		
859				 			$options['maxSlides'] = slides_number;
860		
861			
862		
863			
864		
865				 			//--------------------------------------------------//
866		
867				 			// Retour des options de configuration du Carrousel //
868		
869				 			//--------------------------------------------------//
870		
871				 			$.each( $object_options, function( _option, _value ) {
872		
873				 				$options[ _option ] = _value;
874		
875				 			});
876		
877			
878		
879				 			// Personnalisation du paramètre 'moveSlides' spécifique
880		
881				 			if( $_options['moveSlides'] != undefined && $_options['moveSlides'] == 'full' ) {
882		
883				 				$options['moveSlides'] = slides_number;
884		
885				 			}
886		
887			
888		
889			
890		
891				 			return $options;
892		
893				 		} 			
894		
895			
896		
897			
898		
899				 		function config() {
900		
901				 			var config = build();
902		
903			
904		
905				 			// Si le Carrousel a déjà été initialisé, on le recharge
906		
907				 			if( $object_BXS && $object_BXS.reloadSlider ) {
908		
909				 				$object_BXS.reloadSlider( config );
910		
911				 			}
912		
913			
914		
915				 			// Sinon, on l'initialise
916		
917				 			else {
918		
919				 				$object_BXS = $('#' + codename + '-carrousel > ul').bxSlider( config );
920		
921				 			}
922		
923				 		}
924		
925			
926		
927			
928		
929				 		// Boutons PRÉCÉDENT
930		
931				 		$('#' + codename).on( 'click', '#' + codename + '-prev', function() {
932		
933							var current = $object_BXS.getCurrentSlide();
934		
935							$object_BXS.goToPrevSlide(current) - 1;
936		
937						});
938		
939			
940		
941			
942		
943				 		// Boutons SUIVANT
944		
945						$('#' + codename).on( 'click', '#' + codename + '-next', function() {
946		
947							var current = $object_BXS.getCurrentSlide();
948		
949							$object_BXS.goToNextSlide(current) + 1;
950		
951						});
952		
953			
954		
955			
956		
957				 		// Configurer le Carrousel à chaque fois que la taille de l'écran change
958		
959						$(window).on( "orientationchange resize", config);
960		
961			
962		
963			
964		
965						// Configure the slider once on page load.
966		
967						config();
968		
969			
970		
971			 		}
972		
973			
974		
975			 	}
976			/**
977			 * Traitement des commentaires via AJAX
978			 */
979			
980				 
981				//-------------------------------------------------//
982				// Test(s) et soumission du formulaire COMMENTAIRE //
983				//-------------------------------------------------//
984				if( $('#form-comment').length ) {
985			
986					// Traitement AJAX
987					$('#comments').on(
988						'submit',
989						'#form-comment',
990						 function(e) {
991			
992							//------------------------------------------------------------------------//
993							// Variables du formulaire utiles pour le retour du "nouveau" commentaire //
994							//------------------------------------------------------------------------//
995							var comment,
996								form 	= $('#form-comment-wrapper'),
997								list 	= $('.CT-comments-list'),
998							    respond = $('#form-respond');
999			
1000			
1001				    		// Valeur "cookie-consent" en fonction de l'état connecté/déconnecté du $user
1002							var cookie_consent;
1003			
1004							if( $('input[name="form_comment_cookie_consent"][type="hidden"]').length ) {
1005								cookie_consent = 1;
1006							}
1007							else if( $('input[name="form_comment_cookie_consent"][type="checkbox"]').length ) {
1008								cookie_consent = $('input[name="form_comment_cookie_consent"]').is(':checked') ? 1 : 0;
1009							}
1010			
1011			
1012				    		// Construction du tableau des datas
1013				    		var formdata = false;
1014				    		if (window.FormData) { formdata = new FormData(); }
1015			
1016				    		formdata.append( 'action', 						'ajaxcomments');
1017				    		formdata.append( 'majax',  						$('input[name="form_comment_majax"]').val());
1018				        	formdata.append( 'bilis',  						$('input[name="form_comment_bilis"]').val());
1019			
1020				        	formdata.append( 'author',  					$('input[name="form_comment_author"]').val() );
1021				        	formdata.append( 'comment',  					$('textarea[name="form_comment_comment"]').val() );
1022				        	formdata.append( 'comment_parent',  			$('input[name="form_comment_parent_id"]').val() );
1023				        	formdata.append( 'comment_post_ID',				$('input[name="form_comment_post_id"]').val() );
1024				        	formdata.append( 'comment_depth',				$('input[name="form_comment_depth"]').val() );
1025				        	formdata.append( 'email',  						$('input[name="form_comment_email"]').val() );
1026				        	//formdata.append( 'url',  						$('input[name="url"]').val() );
1027			
1028				        	formdata.append( 'wp_comment_cookies_consent', 	cookie_consent );
1029			
1030			
1031				        	//-----------------------------------------------------------------------//
1032							// Si le formulaire de commentaire n'est pas déjà en cours d'utilisation //
1033							//-----------------------------------------------------------------------//
1034							if ( form.attr('data-statut') != 'progress' ) {
1035					 
1036								// On traite la requête ajax
1037								$.ajax({
1038									url : CT.ajax_url,
1039									type : 'POST',
1040									data: formdata,
1041									dataType: 'json',
1042						            processData: false,
1043					            	contentType: false,
1044			
1045			
1046					            	//---------------------//
1047					            	// Avant le traitement //
1048					            	//---------------------//
1049									beforeSend : function( xhr ) {
1050			
1051										// A la soumission on indique à l'utilisateur que le traitement de sa requête est en cours
1052							    		$('#form-comment-wrapper').attr('data-statut', 'progress');
1053			
1054							    		// Réinitialisation de l'affichage des champs erronés
1055							    		$('#form-comment .CT-form-field-wrapper').attr('data-statut', '');
1056			
1057							    		// Réinitialisation de l'affichage du/des messages de notification
1058							    		$('#form-comment-notification') .attr('data-statut','progress')
1059							    							  		 	.children('#form-comment-notification-inner')
1060							    							   			.children('ul')
1061							    							   			.empty()
1062							    							   			.html('<li>' + CT_translations['form_comment_progress'] + '</li>');
1063			
1064									},
1065			
1066			
1067									//----------------------------------------//
1068									// Si la requête n'a pas abouti => ERREUR //
1069									//----------------------------------------//
1070									error : function ( XMLHttpRequest, textstatut, errorThrown ) {
1071			
1072										// Message
1073						                $('#form-comment-notification') .attr('data-statut','error')
1074						                						   		.children('#form-comment-notification-inner')
1075						                						   		.children('ul')
1076					        									   		.empty()
1077						                						   		.html('<li>' + CT_translations['form_comment_error'] + '</li>');
1078						                // Actions
1079						                setTimeout(
1080						                	function(){
1081						                		$('#form-comment-wrapper').attr('data-statut','');
1082						                	},
1083						                	0
1084						                );
1085			
1086									},
1087			
1088			
1089									//---------------------------------//
1090									// Si la requête aboutie => SUCCES //
1091									//---------------------------------//
1092									success : function ( datas ) {
1093					 
1094										// Si le commentaire a bien été traité et retourné
1095										if (datas.posted == true) {
1096			
1097											// Si il existe déjà des commentaires
1098											if( list.length > 0 ) {
1099					 
1100												// Si le commentaire est une réponse
1101												if( respond.parent().hasClass('CT-comment') ) {
1102					 
1103													// Si il existe déjà d'autres réponses
1104													if( respond.parent().children('.children').length ) {
1105														respond.parent().children( '.children' ).append( datas.comment );
1106													}
1107			
1108													// Sinon le commentaire est la première réponse et on ajoute la balise <ul class="children">
1109													else {
1110														comment = '<ul class="children">' + datas.comment + '</ul>';
1111														respond.parent().append( comment ); 
1112													}
1113			
1114												}
1115			
1116												// Sinon c'est un commentaire "simple"
1117												else {
1118													list.append( datas.comment );
1119												}
1120											}
1121			
1122											// Si c'est le tout premier commentaire
1123											else {
1124			
1125												comment = '<div class="CT-comments-list-wrapper"><ul class="CT-comments-list">' + datas.comment + '</ul></div>';
1126												respond.before( $(comment) );
1127											}
1128			
1129											// Réinitialisation du formulaire de réponse
1130											CT_init_form_comment(true);
1131			
1132										}
1133			
1134										// Sinon on affiche l'erreur
1135						                else { 
1136			
1137											// Message
1138					    					$('#form-comment-notification') .attr('data-statut', datas.message_class)
1139					                						   		   		.children('#form-comment-notification-inner')
1140					                						   		   		.children('ul')
1141															   		   		.empty()
1142					                						   		   		.html('<li>' + datas.message + '</li>');
1143			
1144											// On affiche les champs erronés
1145											if( datas.fields && datas.fields.length > 0 ) {
1146												for (var i = 0; i < datas.fields.length; i++) {
1147													$('#form-comment-' + datas.fields[i] + '-wrapper').attr('data-statut', 'mandatory');
1148												}
1149											}
1150			
1151											// Puis on enlève le filtre de chargement
1152											setTimeout(
1153							                	function(){
1154							                		$('#form-comment-wrapper').attr('data-statut','');
1155							                	},
1156							                	0
1157							                );
1158										}
1159			
1160									},
1161			
1162			
1163									//---------------------------------//
1164									// Une fois le traitement effectué //
1165									//---------------------------------//
1166									complete: function() {
1167			
1168										// On indique à l'utilisateur que le traitement de sa requête est finalisé
1169										$('#form-comment-wrapper').attr('data-statut','');
1170			
1171										// On réinitialise le(s) message(s) d'erreurs
1172				    					$('#form-comment-notification') .attr('data-statut', '')
1173				                						   		   		.children('#form-comment-notification-inner')
1174				                						   		   		.children('ul')
1175														   		   		.empty();
1176			
1177									} 
1178								});
1179							}
1180			
1181							return false;
1182			
1183						});
1184			
1185				};
1186			
1187			
1188				//------------------------------------------------------------//
1189				// Déplacement du formulaire form-respond vers un commentaire //
1190				//------------------------------------------------------------//
1191				function CT_move_form_comment( comment_id, post_id, depth ) {
1192			
1193					// On déplace le form-respond
1194					$('.CT-comment[data-id="' + comment_id + '"]').append( $('#form-respond') );
1195			
1196					// On actualise la meta 'comment_id'
1197					$('#form-comment-parent-id').val( comment_id );
1198			
1199					// On actualise la meta 'depth'
1200					depth = parseInt(depth);
1201					depth++;
1202					$('#form-comment-depth').val( depth );
1203			
1204					// On affiche le bouton d'annulation de la réponse
1205					$('#form-respond-cancel').addClass('active');
1206				}
1207			
1208			
1209				//----------------------------------//
1210				// Réinitialisation du form-respond //
1211				//----------------------------------//
1212				function CT_init_form_comment( reset ) {
1213			
1214					// On déplace le form-respond
1215					$('#comments').append( $('#form-respond') );
1216			
1217					// On réinitialise les metas 'comment_id' et 'depth'
1218					$('#form-comment-parent-id').val(0);
1219					$('#form-comment-depth').val(1);
1220			
1221					// si reset == true on réinitialise tous les champs
1222					if( reset ) {
1223						$('input[name="form_comment_author"][type="text"]').val('');
1224						$('input[name="form_comment_email"][type="email"]').val('');
1225						$('textarea[name="form_comment_comment"]').val('');
1226					}
1227			
1228					// On masque le bouton d'annulation de la réponse
1229					if( $('#form-respond-cancel').hasClass('active') ) {
1230						$('#form-respond-cancel').removeClass('active');
1231					}
1232				}
1233			
1234			
1235				// Action sur les boutons "répondre"
1236				if( $('.CT-comment-reply').length ) {
1237			
1238					$('#comments').on( 'click', '.CT-comment-reply', function(e) {
1239			
1240							// Fonction de déplacement du formulaire et de la mise à jour des champs 'ID du post' et 'ID du commentaire parent'
1241							CT_move_form_comment( $(this).attr('data-id'), $(this).attr('data-post-id'), $(this).attr('data-depth') );
1242			
1243							e.preventDefault();
1244					});
1245				}
1246			
1247			
1248				//-------------------------------------------------------------//
1249				// Annulation d'une réponse et remise en place du form-respond //
1250				//-------------------------------------------------------------//
1251				if( $('#form-respond-cancel').length ) {
1252			
1253					$('#comments').on( 'click', '#form-respond-cancel', function(e) {
1254						CT_init_form_comment(false);
1255					});
1256				}
1257			/**
1258			 * Traitement d'un formulaire avec popup
1259			 */
1260			
1261			
1262			 	function CT_form( codename, $object_MFP, $fields, $options ) {
1263			
1264			 		//---------------------------------------------------------//
1265			 		// Définition des options si elles ne sont pas renseignées //
1266			 		//---------------------------------------------------------//
1267			 		if( typeof $options == 'undefined' ) {
1268			 			$options = {
1269			 				'on_success' 		: '', 	// hide | reset
1270			 				'on_success_custom' : ''	// function name
1271			 			}
1272			 		}
1273			
1274			
1275			 		//-----------------------//
1276					// Ouverture de la POPUP //
1277					//-----------------------//
1278					if( $( 'a[href="#form-' + codename + '-popup"]' ).length ) {
1279			
1280						$('a[href="#form-' + codename + '-popup"]').on('click', function(e){ 
1281								e.preventDefault();
1282							}
1283						);
1284			
1285						// Si le formulaire se trouve dans une fenêtre popup MFP
1286						if( $object_MFP != '' ) {
1287			
1288							// Création de l'objet MFP
1289							$object_MFP = 	$('a[href="#form-' + codename + '-popup"]').magnificPopup({
1290												type:'inline',
1291												midClick: true,
1292												alignTop: true
1293											});
1294			
1295							// Bouton de fermeture de la fenêtre popup MFP
1296							if( $('#form-' + codename + '-notification-close').length ) {
1297								$('#form-' + codename + '-popup').on(
1298									'click',
1299									'#form-' + codename + '-notification-close',
1300									function(){
1301										$object_MFP.magnificPopup('close');
1302									}
1303								);
1304							}
1305			
1306							// Autres boutons de fermeture de la popup optionnels
1307							if( $( '[data-role="form-' + codename + '-popup-close"]' ).length ) {
1308								$('[data-role="form-' + codename + '-popup-close"]').on('click', function() { 
1309									$object_MFP.magnificPopup('close');
1310								});
1311							}
1312			
1313						}
1314					}
1315					
1316			
1317				 	//-------------------------------------//
1318					// Test(s) et soumission du formulaire //
1319					//-------------------------------------//
1320			 		if( $('#form-' + codename).length ) {
1321			
1322				 		// Traitement AJAX
1323			    		$( '#form-' + codename ).on(
1324			    			'submit',
1325			    			function(e) {
1326			
1327			        			// Construction du tableau des datas
1328			        			var formdata = false;
1329			        			if (window.FormData) { formdata = new FormData(); }
1330			
1331			        			// Variables
1332			        			formdata.append( 'action', 'form' + codename.replace(/\-/g,'') + 'ajax');
1333			        			formdata.append( 'majax',  $('input[name="form_' + codename.replace(/\-/g,'_') + '_majax"]').val());
1334				        		formdata.append( 'bilis',  $('input[name="form_' + codename.replace(/\-/g,'_') + '_bilis"]').val());
1335			
1336			        			for( var i in $fields ) {
1337			        			
1338			        				// champs de type TEXT / NUMBER / EMAIL / PASSWORD
1339				        			if( $fields[i] == 'text' ||
1340				        				$fields[i] == 'number' ||
1341				        				$fields[i] == 'email' ||
1342				        				$fields[i] == 'password' ||
1343				        				$fields[i] == 'hidden'
1344				        			) {
1345				        				formdata.append(
1346				        					i,
1347				        					CT_string_escape_html(
1348				        						$('input[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]').val(),
1349				        						true
1350				        					)
1351				        				);
1352				        			}
1353			
1354				        			// champs de type CHECKBOX
1355				        			if( $fields[i] == 'checkbox' ) {
1356				        				formdata.append(
1357				        					i,
1358				        					CT_string_escape_html(
1359				        						$('input[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]').is(':checked') ? $('input[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]').val() : '',
1360				        						true
1361				        					)
1362				        				);
1363				        			}
1364			
1365				        			// champs de type RADIO(BOX)
1366				        			if( $fields[i] == 'radio' ) {
1367				        				formdata.append(
1368				        					i,
1369				        					CT_string_escape_html(
1370				        						$('input[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]:checked').val(),
1371				        						true
1372				        					)
1373				        				);
1374				        			}
1375			
1376				        			// champs de type SELECT
1377				        			if( $fields[i] == 'select' ) {
1378				        				formdata.append(
1379				        					i,
1380				        					CT_string_escape_html(
1381				        						$('select[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"] option:selected').val(),
1382				        						true
1383				        					)
1384				        				);
1385				        			}
1386			
1387				        			// champs de type FILE
1388				        			if( $fields[i] == 'file' ) {
1389			
1390				        				var form_file_files = document.getElementsByName( 'form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') );
1391			
1392				        				// Le champ est forcément unique, par contre il peut contenir de multiples fichiers
1393				        				form_file_files = form_file_files[0].files;
1394			
1395				        				// On boucle sur tous les fichiers et on construit le tableau des fichiers si nécessaire
1396				        				if( form_file_files.length > 0 ) {
1397			
1398				        					var files_count = 0;
1399			
1400				        					$.each( form_file_files, function( key, value ) {
1401			
1402					        					formdata.append(
1403					        						i + '-' + files_count,
1404					        						value
1405					        					);
1406			
1407					        					files_count++;
1408			
1409					        				});
1410			
1411				        					formdata.append(
1412				        						i,
1413				        						files_count
1414				        					);
1415			
1416				        				}
1417			
1418				        			}
1419			
1420				        			// champs de type TEXTAREA
1421				        			if( $fields[i] == 'textarea' ) {
1422				        				formdata.append(
1423				        					i,
1424				        					CT_string_escape_html(
1425				        						$('textarea[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]').val(),
1426				        						true
1427				        					)
1428				        				);
1429				        			}
1430			
1431				        			// champs de type RECAPTCHA
1432				        			if( $fields[i] == 'captcha' ) {
1433				        				formdata.append(
1434				        					i,
1435				        					$('textarea[name="g-recaptcha-response"]').val()
1436				        				);
1437				        			}
1438			
1439			        			}
1440			
1441						        // On traite la requête ajax
1442						        $.ajax({
1443						            url: CT.ajax_url,
1444						            type: 'POST',
1445						            data: formdata,
1446						            dataType: 'json',
1447						            processData: false,
1448					            	contentType: false,
1449			
1450			
1451					            	//---------------------//
1452									// Avant le traitement //	            	
1453									//---------------------//
1454					            	beforeSend: function(xhr) {
1455			
1456					            		// A la soumission on indique à l'utilisateur que le traitement de sa requête est en cours
1457						        		$('#form-' + codename + '-wrapper').attr('data-statut', 'progress');
1458			
1459						        		// Réinitialisation de l'affichage des champs erronés
1460						        		$('#form-' + codename + ' .CT-form-field-wrapper').attr('data-statut', '');
1461			
1462						        		// Réinitialisation de l'affichage du/des messages de notification
1463						        		$('#form-' + codename + '-notification')
1464						        			.attr('data-statut','progress')
1465						        			.children('#form-' + codename + '-notification-inner')
1466						        			.children('ul')
1467						        			.empty()
1468						        			.html('<li>' + CT_translations['form_' + codename.replace(/\-/g,'_')   + '_progress'] + '</li>');
1469					            	},
1470			
1471			
1472					            	//----------------------------------------//
1473						            // Si la requête n'a pas abouti => ERREUR //
1474						            //----------------------------------------//
1475						            error: function(XMLHttpRequest, textstatut, errorThrown) {
1476			
1477										// Message
1478						                $('#form-' + codename + '-notification')
1479						                	.attr('data-statut','error')
1480						                	.children('#form-' + codename + '-notification-inner')
1481						                	.children('ul')
1482					        				.empty()
1483						                	.html('<li>' + CT_translations['form_' + codename.replace(/\-/g,'_')   + '_error'] + '</li>');
1484			
1485						                // Actions
1486						                setTimeout(
1487						                	function(){
1488						                		$('#form-' + codename + '-wrapper').attr('data-statut','');
1489						                	},
1490						                	0
1491						                );
1492						            },
1493			
1494			
1495						            //---------------------------------//
1496						            // Si la requête aboutie => SUCCES //
1497						            //---------------------------------//
1498						            success: function( datas ) {
1499			
1500										// Si le formulaire a été envoyé
1501										if( datas.posted == true ) {
1502			
1503											// Si il existe une redirection
1504											if( datas.redirection ) {
1505			
1506												// Message
1507												$('#form-' + codename + '-notification')
1508													.attr('data-statut',datas.message_class)
1509													.children('#form-' + codename + '-notification-inner')
1510													.children('ul')
1511													.empty()
1512													.html('<li>' + datas.message + '</li>');
1513			
1514												// Actions
1515												setTimeout(
1516													function(){
1517														document.location.href = datas.redirection;
1518													},
1519													2000
1520												);
1521											}
1522											else {
1523												// Doit-on ajouter le bouton de fermeture de la fenêtre popup MFP
1524												var notification_close_btn = '';
1525												if( $object_MFP != '' ) {
1526													notification_close_btn = '<li id="form-' + codename + '-notification-close" class="CT-form-notification-close"><button id="form-' + codename + '-notification-close-btn" class="CT-form-notification-close-btn">' + CT_translations['form_' + codename.replace(/\-/g,'_')   + '_success_button_close'] + '</button></li>';
1527												}
1528			
1529												// Message
1530												$('#form-' + codename + '-notification')
1531													.attr('data-statut',datas.message_class)
1532													.children('#form-' + codename + '-notification-inner')
1533													.children('ul')
1534													.empty()
1535													.html('<li>' + datas.message + '</li>' + notification_close_btn);
1536			
1537												//-------------------------//							
1538												// Action après soumission //
1539												//-------------------------//
1540			
1541												// action 1 : Masquage du formulaire
1542												if( $options['on_success'] == 'hide' ) {
1543			
1544													var form_height = $('#form-' + codename).height();
1545			
1546													$('#form-' + codename + '-wrapper')
1547														.attr('data-statut','hide')
1548														.css({'height':form_height});
1549			
1550													$('#form-' + codename)
1551														.css({'opacity':'0'})
1552														.wait(1000)
1553														.remove();
1554												}
1555			
1556												// action 2 : Réinitialisation du formulaire
1557												else if( $options['on_success'] == 'reset' ) {
1558													
1559													// Réinitialisation de tous les champs
1560													for( var i in $fields ) {
1561			
1562														// champs de type TEXT / NUMBER / EMAIL / PASSWORD
1563														if( $fields[i] == 'text' ||
1564															$fields[i] == 'number' ||
1565															$fields[i] == 'email' ||
1566															$fields[i] == 'password' ||
1567															$fields[i] == 'hidden'
1568														) {
1569															$('input[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]').val('');
1570														}
1571			
1572														// champs de type RADIO(BOX)
1573														if( $fields[i] == 'radio' ||
1574															$fields[i] == 'checkbox'
1575														) {
1576															$('input[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]').prop('checked', false);
1577														}
1578			
1579														// champs de type FILE
1580														if( $fields[i] == 'file' ) {
1581															$('input[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]').val('');
1582			
1583															// Si le champ est stylisé, on modifie l'affichage du/des libellés de fichiers
1584															if( $('input[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]').hasClass( 'stylized' ) ) {
1585																$('input[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"] + label > span').html( $('input[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]').attr( 'data-placeholder' ) );
1586															}
1587														}
1588														
1589														// champs de type TEXTAREA
1590														if( $fields[i] == 'textarea' ) {
1591															$('textarea[name="form_' + codename.replace(/\-/g,'_') + '_' + i.replace(/\-/g,'_') + '"]').val('');
1592														}
1593			
1594														// champs de type RECAPTCHA
1595									        			if( $fields[i] == 'captcha' ) {
1596								        					grecaptcha.reset();
1597									        			}
1598			
1599													}
1600			
1601													// On indique à l'utilisateur que le traitement de sa requête est finalisé
1602													$('#form-' + codename + '-wrapper').attr('data-statut','');
1603												}
1604			
1605												// sinon on indique à l'utilisateur que le traitement de sa requête est finalisé
1606												else {
1607													$('#form-' + codename + '-wrapper').attr('data-statut','');
1608												}
1609			
1610												//---------------------------------------//	
1611												// Action supplémentaire personnalisée ? //
1612												//---------------------------------------//
1613												if( typeof $options[ 'on_success_custom'] != 'undefined' ) {
1614			
1615													var on_success_custom_function = $options[ 'on_success_custom' ];
1616			
1617													eval( on_success_custom_function )();
1618													
1619												}
1620											}
1621										}
1622										else { 
1623			
1624											// Message
1625											$('#form-' + codename + '-notification')
1626												.attr('data-statut', datas.message_class)
1627												.children('#form-' + codename + '-notification-inner')
1628												.children('ul')
1629												.empty()
1630												.html('<li>' + datas.message + '</li>');
1631			
1632											// On affiche les champs erronés
1633											if( datas.fields && datas.fields.length > 0 ) {
1634												for (var i = 0; i < datas.fields.length; i++) {
1635													$('#form-' + codename + '-' + datas.fields[i] + '-wrapper').attr('data-statut', 'mandatory');
1636												}
1637											}
1638			
1639											// Puis on enlève le filtre de chargement
1640											setTimeout(
1641												function(){
1642													$('#form-' + codename + '-wrapper').attr('data-statut','');
1643												},
1644												0
1645											);
1646										}
1647			
1648										// Puis on remonte le scroll vers le message NOTIFICATION
1649										var notification_position = $( '#form-' + codename + '-notification' ).offset().top;
1650			 							var header_height  = $( '#main' ).offset().top;
1651			
1652			 							var range = notification_position - header_height - 20;
1653			
1654			 							$( 'html, body' ).animate(
1655						 					{
1656						 						scrollTop: range
1657						 					},
1658						 					600
1659						 				);
1660			
1661									}
1662			
1663			
1664						            //---------------------------------//
1665						            // Une fois le traitement effectué //
1666						            //---------------------------------//
1667						            // complete: function() { }
1668			
1669						        });
1670			
1671			    				e.preventDefault();
1672			
1673					        }
1674					    );
1675				
1676				 		return false;
1677			 		}
1678			
1679			 	}
1680			/**
1681			 * Traitement d'une carte basée sur OPENSTREETMAP ( + LEAFLET )
1682			**/
1683			
1684				/**
1685				 *	CT_map_OSM (
1686				 *		'#conteneur-carte-ID', 			// ID de l'objet du DOM dans lequel sera déployée la carte
1687				 *		'.liste-marqueurs-class'		// CLASS communes aux éléments "markers" à ajouter sur la carte
1688				 * 	);
1689				 */
1690			
1691			
1692			 	// Attributs
1693			 	class CT_map_OSM_leafletMap {
1694			
1695			 		constructor () {
1696			 			this.map = null;
1697			 			this.bounds = [];
1698			 		}
1699			
1700			 		async load ( element ) {
1701			
1702			 			return new Promise( ( resolve, reject ) => {
1703			
1704				 			// Chargement de la Carte
1705				 			this.map = L.map( element, { scrollWheelZoom: false } );
1706			
1707				 			this.map.attributionControl.addAttribution(
1708				 				'<a href="https://www.jawg.io" target="_blank">&copy; Jawg</a> - <a href="https://www.openstreetmap.org" target="_blank">&copy; OpenStreetMap</a>&nbsp;contributors'
1709			 				);
1710				 	
1711					 		// Ajout du Layer OSM
1712					 		L.tileLayer(
1713					 			// 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', 		// Mapbox
1714					 			'https://tile.jawg.io/jawg-sunny/{z}/{x}/{y}.png?access-token={accessToken}',				// Jawg
1715					 			{
1716									// attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
1717									// maxZoom: 18,
1718									// id: 'mapbox.streets',
1719									// accessToken: 'pk.eyJ1IjoiZ2lnYWxpcyIsImEiOiJjanJhemNvb3gwbWptNDRsaGRsNjByNDZ3In0.b_gn1nlkfFZu3czqQBgaBg' 	// Mapbox
1720									accessToken: 'wWiHvFP5KhxGQYYH2rMyqHSPm39auWjzYvluXUngenSGI4x4ykNoB7orG0XjsCLl' 								// Jawg
1721								}
1722							).addTo( this.map );
1723			
1724							resolve();
1725			
1726					 	});
1727				 	}
1728			
1729				 	addMarker ( lat, lng, text ) {
1730				 		var point = [lat, lng];
1731				 		this.bounds.push( point );
1732			
1733				 		return new CT_map_OSM_leafletMarker( point, text, this.map );
1734				 	}
1735			
1736				 	center () {
1737				 		this.map.fitBounds( this.bounds );
1738				 	}
1739			 	}
1740			
1741			 	// Marqueurs
1742			 	class CT_map_OSM_leafletMarker {
1743			
1744			 		constructor ( point, text, map ) {
1745			 			this.text = text;
1746			
1747			 			this.popup = L.popup({
1748				 			autoClose 			: false,
1749				 			closeOnEscapeKey 	: false,
1750				 			closeOnClick 		: false,
1751				 			closeButton 		: false,
1752				 			className 			: 'marker',
1753				 			maxWidth 			: 400
1754				 		})
1755				 		.setLatLng( point )
1756				 		.setContent( text )
1757				 		.openOn( map );
1758			 		}
1759			
1760			 		setActive () {
1761			 			this.popup.getElement().classList.add( 'active' );
1762			 		}
1763			
1764			 		unsetActive () {
1765			 			this.popup.getElement().classList.remove( 'active' );
1766			 		}
1767			
1768			 		addEventListener ( event, cb ) {
1769			 			this.popup.addEventListener( 'add', () => {
1770			 				this.popup.getElement().addEventListener( event, cb );
1771			 			});
1772			 		}
1773			
1774			 		setContent ( text ) {
1775			 			this.popup.setContent( text );
1776			 			this.popup.getElement().classList.add( 'expanded' );
1777			 			this.popup.update();
1778			 		}
1779			
1780			 		resetContent () {
1781			 			this.popup.getElement().classList.remove( 'expanded' );
1782			 			this.popup.update();
1783			 			this.popup.setContent( this.text );
1784			 		}
1785			 	}
1786			
1787			 	// Initialisation
1788			 	const CT_map_OSM_initMap = async function ( _map, _markers ) {
1789			 		
1790			 		var map = new CT_map_OSM_leafletMap();
1791			 		var hoverMarker = null;
1792			 		var activeMarker = null;
1793			
1794			 		await map.load( _map );
1795			
1796			 		Array.from( $( _markers ) ).forEach( ( item ) => {
1797			 			var marker = map.addMarker( item.dataset.lat, item.dataset.lng, item.dataset.price + ' €' );
1798			
1799			 			item.addEventListener( 'mouseover', function () {
1800			 				if( hoverMarker !== null ) {
1801			 					hoverMarker.unsetActive();
1802			 				}
1803			
1804			 				marker.setActive();
1805			 				hoverMarker = marker;
1806			 			});
1807			
1808			 			item.addEventListener( 'mouseleave', function () {
1809			 				if( hoverMarker !== null ) {
1810			 					hoverMarker.unsetActive();
1811			 				}
1812			 			});
1813			
1814			 			marker.addEventListener( 'click', function () {
1815			 				if( activeMarker !== null ) {
1816			 					activeMarker.resetContent();
1817			 				}
1818			
1819			 				marker.setContent( item.innerHTML );
1820			 				activeMarker = marker;
1821			 			});
1822			
1823			
1824			 		});
1825			
1826			 		map.center();
1827			 	}
1828			
1829			 	// Création de la carte
1830			 	function CT_map_OSM( map_ID, markers_CLASS ) {
1831			
1832			 		// Objet CARTE dans le DOM
1833			 		var $map = document.querySelector( map_ID );
1834			
1835			 		// Initialisation de la CARTE OSM
1836			 		if( $map != null ) {
1837				 		CT_map_OSM_initMap( $map, markers_CLASS );
1838				 	}
1839			 	}
1840			/**
1841			 * Traitement d'un Carrousel avec la librairie SLICK.JS
1842			**/
1843			
1844			 	function CT_slick( codename, _element, $object_SLICK, $_options ) {
1845			
1846			 		if( $( _element + codename + '-carrousel').length ) {
1847			
1848			 			//----------------------------------------------------------//
1849			 			// cas n°1 : un seul dîaporama à traiter <=> _element = "#" // 
1850			 			//----------------------------------------------------------//
1851			 			if( _element == '#' ) {
1852			
1853				 			// Variables
1854				 			var $slider = $( _element + codename + '-carrousel');
1855			
1856				 			var _slider_width;
1857				 			var _slidesToShow;	
1858				 			var _slide_width_old;
1859							var _slide_width_new;
1860			
1861				 			var $object_options = $_options;
1862			
1863				 			var $options = {
1864					 			//	accessibility	: true,
1865								//	adaptiveHeight	: false,
1866								//	appendArrows 	: $(element),
1867								//	appendDots 		: $(element),
1868								//	arrows 			: true,
1869								//	asNavFor 		: null,
1870								//	autoplay 		: false,
1871								//	autoplaySpeed 	: 3000,
1872								//	centerMode 		: false,
1873								//	centerPadding 	: '50px',
1874								//	cssEase 		: 'ease',
1875								//	customPaging 	: n/a,
1876								//	dots 			: false,
1877								//	dotsClass 		: 'slick-dots',
1878								//	draggable 		: true,
1879								//	easing 			: 'linear',
1880								//	edgeFriction 	: 0.15,
1881								//	fade 			: false,
1882								//	focusOnSelect 	: false,
1883								//	infinite 		: true,
1884								//	initialSlide 	: 0,
1885								//	lazyLoad 		: 'ondemand' 		// 'ondemand' | 'progressive'
1886								//	mobileFirst 	: false,
1887								//	nextArrow 		: <button type="button" class="slick-next">Next</button>,
1888								//	pauseOnFocus 	: true,
1889								//	pauseOnHover 	: true,
1890								//	pauseOnDotsHover: false,
1891								//	prevArrow 		: <button type="button" class="slick-prev">Previous</button>,
1892								//	respondTo 		: 'window',
1893								//	responsive 		: 'none',
1894								//	rtl 			: false,
1895								//	rows 			: 1,
1896								//	slide 			: '',
1897								//	slidesPerRow 	: 1,
1898								//	slidesToScroll 	: 1,
1899								//	speed 			: 300,
1900								//	swipe 			: true,
1901								//	swipeToSlide 	: false,
1902								//	touchMove 		: true,
1903								//	touchThreshold 	: 5,
1904								//	useCSS 			: true,
1905								//	useTransform 	: true,
1906								//	variableWidth 	: false,
1907								//	vertical 		: false,
1908								//	verticalSwiping : false,
1909								//	waitForAnimate 	: true,
1910								//	zIndex 			: 1000
1911				 			};
1912			
1913				 			// Retour des options de configuration du Carrousel
1914				 			$.each( $object_options, function( _option, _value ) {
1915				 				$options[ _option ] = _value;
1916				 			});
1917			
1918			
1919				 			//--------------------------//
1920				 			// Initialisation du SLIDER //
1921				 			//--------------------------//
1922				 			$object_SLICK = $slider.slick( $options );
1923			
1924				 			// console.log( $object_SLICK );
1925				 			// console.log( $object_SLICK.get(0).slick.options.slidesToShow );
1926			
1927			
1928				 			//---------------------------------------------------------------------------------------------------------//
1929				 			// Hack pour définir dynamiquement les largeurs des Slides pour éviter que la dernière slide soit "coupée" //
1930				 			//---------------------------------------------------------------------------------------------------------//
1931			
1932					 		// Valeurs à l'initialisation
1933				 			_slider_width		 	= $slider.width();
1934				 			_slide_width_default 	= 0;
1935				 			_slide_width_old	 	= $slider.children('.slick-list').children('.slick-track').children('.' + codename.slice(0,-1) ).first().width();
1936				 			_slide_width_new	 	= 0;
1937				 			_slidesToShow_default	= $options['slidesToShow'];		
1938				 			_slidesToShow		 	= $object_SLICK.get(0).slick.options.slidesToShow;	
1939			
1940			
1941				 			// Calcul de la nouvelle largeur de chaque élément Slide
1942				 			function CT_slick_refresh( _width, _slides ) {
1943			
1944				 				// On garde en "mémoire" l'ancienne largeur de chaque Slide
1945				 				_slide_width_old = _width;
1946			
1947				 				// Nouvelle largeur de chaque Slide
1948				 				_slide_width_new = $slider.width() / _slides;
1949			
1950				 				// On évite les boucles de récursion infinies :-))
1951				 				if( _slide_width_new != _width ) {
1952			
1953				 					// On rafraichit la largeur de chaque Slide
1954				 					$( '.' + codename.slice(0,-1) ).css({ 'width': _slide_width_new });
1955			
1956				 					// Puis on rafraîchit le positionnement en fonction de la nouvelle largeur de Slide
1957				 					$slider.slick('setPosition');
1958			
1959				 				}
1960			
1961				 			}
1962			
1963			
1964				 			// Au rafraichissement du Slider
1965				 			$slider.on('setPosition', function(slick) {
1966			
1967				 				CT_slick_refresh( _slide_width_new, _slidesToShow );
1968			
1969				 			});
1970			
1971			
1972				 			// Au passage d'un BREAKPOINT
1973				 			$slider.on('breakpoint', function(event, slick, breakpoint) {
1974			
1975				 				// On boucle sur les différents "breakpoint"
1976				 				// Et on récupère  les valeurs "_slider_width" et "_slidesToShow" en fonction du breakpoint courant
1977				 				if( breakpoint != null ) {
1978			
1979				 					$.each( $object_SLICK.get(0).slick.options.responsive, function( _item, _values ) {
1980			
1981				 						if( breakpoint == _values.breakpoint ) {
1982			
1983				 							// Nouvelle quantité de Slides à afficher
1984				 							_slidesToShow = _values.settings.slidesToShow;
1985			
1986				 							CT_slick_refresh( _slide_width_new, _slidesToShow );
1987				 						}
1988			
1989						 			});
1990			
1991				 				}
1992			
1993				 				// Sinon on rerpend les paramètres par défaut
1994				 				else {
1995			
1996				 					// Nouvelle quantité de Slides à afficher
1997				 					_slidesToShow = $object_SLICK.get(0).slick.originalSettings.slidesToShow;
1998			
1999				 					CT_slick_refresh( 0, _slidesToShow );
2000			
2001				 				}
2002				 			});
2003			
2004						}
2005			
2006						//-------------------------------------------------------------//
2007			 			// cas n°2 : multiples dîaporamas à traiter <=> _element = "." // 
2008			 			//-------------------------------------------------------------//
2009			 			else if( _element == '.' ) {
2010			
2011			 				// Variables
2012				 			var $object_options = $_options;
2013			
2014				 			var $options = {
2015					 			//	accessibility	: true,
2016								//	adaptiveHeight	: false,
2017								//	appendArrows 	: $(element),
2018								//	appendDots 		: $(element),
2019								//	arrows 			: true,
2020								//	asNavFor 		: null,
2021								//	autoplay 		: false,
2022								//	autoplaySpeed 	: 3000,
2023								//	centerMode 		: false,
2024								//	centerPadding 	: '50px',
2025								//	cssEase 		: 'ease',
2026								//	customPaging 	: n/a,
2027								//	dots 			: false,
2028								//	dotsClass 		: 'slick-dots',
2029								//	draggable 		: true,
2030								//	easing 			: 'linear',
2031								//	edgeFriction 	: 0.15,
2032								//	fade 			: false,
2033								//	focusOnSelect 	: false,
2034								//	infinite 		: true,
2035								//	initialSlide 	: 0,
2036								//	lazyLoad 		: 'ondemand' 		// 'ondemand' | 'progressive'
2037								//	mobileFirst 	: false,
2038								//	nextArrow 		: <button type="button" class="slick-next">Next</button>,
2039								//	pauseOnFocus 	: true,
2040								//	pauseOnHover 	: true,
2041								//	pauseOnDotsHover: false,
2042								//	prevArrow 		: <button type="button" class="slick-prev">Previous</button>,
2043								//	respondTo 		: 'window',
2044								//	responsive 		: 'none',
2045								//	rtl 			: false,
2046								//	rows 			: 1,
2047								//	slide 			: '',
2048								//	slidesPerRow 	: 1,
2049								//	slidesToScroll 	: 1,
2050								//	speed 			: 300,
2051								//	swipe 			: true,
2052								//	swipeToSlide 	: false,
2053								//	touchMove 		: true,
2054								//	touchThreshold 	: 5,
2055								//	useCSS 			: true,
2056								//	useTransform 	: true,
2057								//	variableWidth 	: false,
2058								//	vertical 		: false,
2059								//	verticalSwiping : false,
2060								//	waitForAnimate 	: true,
2061								//	zIndex 			: 1000
2062				 			};
2063			
2064				 			// Retour des options globales de configuration du Carrousel
2065				 			$.each( $object_options, function( _option, _value ) {
2066				 				$options[ _option ] = _value;
2067				 			});
2068			
2069			 				// On charge chaque Diaporama
2070			 				$( _element + codename + '-carrousel' ).each( function() {
2071			
2072			 					var _this = $(this);
2073			
2074			 					// On définit les boutons PREV / NEXT personnalisé
2075				 				if( $options[ 'arrows' ] ) {
2076				 					$options[ 'prevArrow' ] = _this.prev( '.carrousel-prev' );
2077				 					$options[ 'nextArrow' ] = _this.next( '.carrousel-next' );
2078				 				}
2079			
2080				 				_this.slick( $options );
2081			
2082				 			});
2083			
2084			 			}
2085			
2086			 		}
2087			 	}
2088
2089		// NICESCROLL
2090		/*
2091		$('#page').niceScroll({ horizrailenabled:false });
2092
2093		$(window).on('resize',function() {
2094			$('#page').getNiceScroll().resize();
2095		});
2096		*/
2097
2098
2099		// FIXED FOOTER si hauteur de fenêtre > hauteur du contenu
2100		// (premier chargement après que toutes les images aient été chargées => en bas de ce script)
2101		if( $( '#mastfoot' ).length ) {
2102
2103			fixed_footer( '#mastfoot' );
2104		
2105			$( window ).on( 'orientationchange resize', function() {
2106				fixed_footer( '#mastfoot' );
2107			});
2108		}
2109	
2110
2111		// STICKY navigation
2112		//	header_sticky();
2113
2114			
2115		// BACK TO TOP (retour haut de page)
2116		if( $( '#totop' ).length ) {
2117			back_to_top( '#totop', 200 );
2118		}
2119
2120
2121		// MAGNIFIC POPUP sur le site
2122		if( $( '.open-popup' ).length ) {
2123			$( '.open-popup' ).magnificPopup({
2124				type : 'image',
2125				image : {
2126					titleSrc : 'data-title'
2127				}
2128			});
2129		}
2130 
2131
2132		// CHAMPS DE FORMULAIRE personnalisés + rechargement si AJAX
2133		// $('input[type="number"]').spinner({min: 0}).removeAttr("type");
2134
2135		// Chargement des COMPOSANTS ou ÉLÉMENTS szpécifiques de ce thème
2136		/**
2137		 * Chargement des composants
2138		**/
2139		
2140			//	require bx-sliders.js
2141			//	require dotdotdot.js
2142			/*
2143			 * Formulaires divers
2144			 */
2145			
2146			 	//--------------------------------------------------------------//
2147			 	// Désactivation des boutons "RESET CAPTCHA" 					//
2148			 	//--------------------------------------------------------------//
2149			 	if( $( '.g-captcha-reset > button' ).length ) {
2150			
2151			 		$( document ).on( 'click', '.g-recaptcha-reset > button', function (e) {
2152			
2153			 			e.stopPropagation();
2154			 			e.preventDefault();
2155			
2156			 		});
2157			
2158			 	}
2159			/**
2160			 * Les slider de type SLICK.JS
2161			**/
2162			
2163				// Liste des options disponibles
2164				/*
2165					accessibility	: true,
2166					adaptiveHeight	: false,
2167					appendArrows 	: $(element),
2168					appendDots 		: $(element),
2169					arrows 			: true,
2170					asNavFor 		: null,
2171					autoplay 		: false,
2172					autoplaySpeed 	: 3000,
2173					centerMode 		: false,
2174					centerPadding 	: '50px',
2175					cssEase 		: 'ease',
2176					customPaging 	: n/a,
2177					dots 			: false,
2178					dotsClass 		: 'slick-dots',
2179					draggable 		: true,
2180					easing 			: 'linear',
2181					edgeFriction 	: 0.15,
2182					fade 			: false,
2183					focusOnSelect 	: false,
2184					infinite 		: true,
2185					initialSlide 	: 0,
2186					lazyLoad 		: 'ondemand' 		// 'ondemand' | 'progressive'
2187					mobileFirst 	: false,
2188					nextArrow 		: <button type="button" class="slick-next">Next</button>,
2189					pauseOnFocus 	: true,
2190					pauseOnHover 	: true,
2191					pauseOnDotsHover: false,
2192					prevArrow 		: <button type="button" class="slick-prev">Previous</button>,
2193					respondTo 		: 'window',
2194					responsive 		: 'none',
2195					rtl 			: false,
2196					rows 			: 1,
2197					slide 			: '',
2198					slidesPerRow 	: 1,
2199					slidesToScroll 	: 1,
2200					speed 			: 300,
2201					swipe 			: true,
2202					swipeToSlide 	: false,
2203					touchMove 		: true,
2204					touchThreshold 	: 5,
2205					useCSS 			: true,
2206					useTransform 	: true,
2207					variableWidth 	: false,
2208					vertical 		: false,
2209					verticalSwiping : false,
2210					waitForAnimate 	: true,
2211					zIndex 			: 1000
2212			 	*/
2213			
2214				//--------------------//
2215			 	// Actualités ARCHIVE //
2216			 	//--------------------//
2217			
2218				 	// Variable spécifique de l'objet SLICK
2219				 	var post_type_ct_news_archive_featured;
2220			
2221				 	CT_slick (
2222			
2223				 		// codename du conteneur du Carrousel
2224				 		'featured-news-items',
2225			
2226				 		// Un élément DIV ou plusieurs éléments CLASS
2227				 		'#',
2228			
2229				 		// Objet SLICK dynamique
2230				 		post_type_ct_news_archive_featured,
2231			
2232				 		// Options
2233				 		{
2234				 			infinite 		: true,
2235							slidesToShow	: 3,
2236							slidesToScroll 	: 1,
2237							prevArrow 		: '#featured-news-items-prev',
2238							nextArrow 		: '#featured-news-items-next',
2239							variableWidth 	: true,
2240							responsive		: [
2241								{
2242									breakpoint : 1080,
2243									settings   : {
2244										slidesToShow	: 2,
2245										slidesToScroll 	: 1
2246									}
2247								},
2248								{
2249									breakpoint : 720,
2250									settings   : {
2251										slidesToShow	: 1,
2252										slidesToScroll 	: 1
2253									}
2254								}
2255							]
2256				 		}
2257				 	);
2258			
2259			
2260				//--------------------//
2261			 	// Evénements ARCHIVE //
2262			 	//--------------------//
2263			
2264				 	// Variable spécifique de l'objet SLICK
2265				 	var post_type_ct_events_archive_featured;
2266			
2267				 	CT_slick (
2268			
2269				 		// codename du conteneur du Carrousel
2270				 		'featured-events-items',
2271			
2272				 		// Un élément DIV ou plusieurs éléments CLASS
2273				 		'#',
2274			
2275				 		// Objet SLICK dynamique
2276				 		post_type_ct_events_archive_featured,
2277			
2278				 		// Options
2279				 		{
2280				 			infinite 		: true,
2281							slidesToShow	: 3,
2282							slidesToScroll 	: 1,
2283							prevArrow 		: '#featured-events-items-prev',
2284							nextArrow 		: '#featured-events-items-next',
2285							variableWidth 	: true,
2286							responsive		: [
2287								{
2288									breakpoint : 1080,
2289									settings   : {
2290										slidesToShow	: 2,
2291										slidesToScroll 	: 1
2292									}
2293								},
2294								{
2295									breakpoint : 720,
2296									settings   : {
2297										slidesToShow	: 1,
2298										slidesToScroll 	: 1
2299									}
2300								}
2301							]
2302				 		}
2303				 	);
2304			
2305			
2306				//------------------------//
2307				// Détail d'une actualité //
2308				//------------------------//
2309			
2310					// Variable spécifique de l'objet SLICK
2311				 	var post_type_ct_news_single_slider;
2312			
2313				 	CT_slick (
2314			
2315				 		// codename du conteneur du Carrousel
2316				 		'news-single-slider',
2317			
2318				 		// Un élément DIV ou plusieurs éléments CLASS
2319				 		'#',
2320			
2321				 		// Objet SLICK dynamique
2322				 		post_type_ct_news_single_slider,
2323			
2324				 		// Options
2325				 		{
2326				 			infinite 		: true,
2327							slidesToShow	: 1,
2328							slidesToScroll 	: 1,
2329							prevArrow 		: '#news-single-slider-prev',
2330							nextArrow 		: '#news-single-slider-next',
2331							// variableWidth 	: true
2332				 		}
2333				 	);
2334			//	require nicescroll.js
2335			//	require stellar.js
2336			//	require navigation.js
2337			//	require prevent-scroll.js
2338			//	require select2.js
2339			//	require social.js
2340		/**
2341		 * Chargement des scripts des ELEMENTS spécifiques
2342		**/
2343		
2344			/**
2345		
2346			 * Formulaire de RECHERCHE MOBILE
2347		
2348			 */
2349		
2350			
2351		
2352			 	//----------------------------------//
2353		
2354				// OUVERTURE de la recherche MOBILE // 
2355		
2356				//----------------------------------//
2357		
2358				$( '#header-main' ).on( 'click', '#mobile-search-open', function(e) {
2359		
2360			
2361		
2362					e.preventDefault();
2363		
2364					e.stopPropagation();
2365		
2366			
2367		
2368					var btn    = $( this );
2369		
2370					var target = $( '#' + btn.children().attr( 'data-target' ) );
2371		
2372			
2373		
2374					target.addClass( 'active' );
2375		
2376			
2377		
2378				});
2379		
2380			
2381		
2382			
2383		
2384				//----------------------------------//
2385		
2386				// FERMETURE de la recherche MOBILE // 
2387		
2388				//----------------------------------//
2389		
2390				$( '#mobile-search' ).on( 'click', '#mobile-search-close', function(e) {
2391		
2392			
2393		
2394					e.preventDefault();
2395		
2396					e.stopPropagation();
2397		
2398			
2399		
2400					$( '#mobile-search' ).removeClass( 'active' );
2401		
2402			
2403		
2404				});
2405			/**
2406			 * Sélecteur de LANGUES MOBILE
2407			 */
2408			
2409			 	//-------------------------------//
2410				// OUVERTURE du sélecteur MOBILE // 
2411				//-------------------------------//
2412				$( '#header-main' ).on( 'click', '#mobile-languages-open', function(e) {
2413			
2414					e.preventDefault();
2415					e.stopPropagation();
2416			
2417					var btn    = $( this );
2418					var target = $( '#' + btn.children().attr( 'data-target' ) );
2419			
2420					target.addClass( 'active' );
2421			
2422				});
2423			
2424			
2425				//-------------------------------//
2426				// FERMETURE du sélecteur MOBILE // 
2427				//-------------------------------//
2428				$( '#mobile-languages' ).on( 'click', '#mobile-languages-close', function(e) {
2429			
2430					e.preventDefault();
2431					e.stopPropagation();
2432			
2433					$( '#mobile-languages' ).removeClass( 'active' );
2434			
2435				});
2436
2437
2438		// Traitements AJAX spécifiques
2439		/**
2440		 * Chargement des scripts spécifiques AJAX
2441		**/
2442		
2443			/**
2444		
2445			 * Ajout d'offres à la liste des archives
2446		
2447			 */
2448		
2449			
2450		
2451			 	// Initialisation de la variable globale CT.ajax_archive_careers
2452		
2453			 	if( $( '#ct-careers-archive-more-button' ).length ) {
2454		
2455			 		CT.ajax_archive_careers = $( '#ct-careers-archive-more-button' ).attr( 'data-ids' );
2456		
2457			 	}
2458		
2459			
2460		
2461			
2462		
2463				// Traitement AJAX
2464		
2465				$( document ).on(
2466		
2467					'click',
2468		
2469					'#ct-careers-archive-more-button',
2470		
2471					 function(e) {
2472		
2473			
2474		
2475						// IDs des actualités déjà listées
2476		
2477						var _this = $( this );
2478		
2479						var _ids = CT.ajax_archive_careers;
2480		
2481			
2482		
2483						console.log( _ids );
2484		
2485			
2486		
2487			    		// Construction du tableau des datas
2488		
2489			    		var formdata = false;
2490		
2491			    		if (window.FormData) { formdata = new FormData(); }
2492		
2493			
2494		
2495			    		formdata.append( 'action', 'archivecareersajax' );
2496		
2497			    		formdata.append( 'ids', _ids );
2498		
2499			
2500		
2501			
2502		
2503			        	//--------------------------------------------------------//
2504		
2505						// Si le formulaire n'est pas déjà en cours d'utilisation //
2506		
2507						//--------------------------------------------------------//
2508		
2509						if ( _this.parent().attr( 'data-statut' ) != 'progress' ) {
2510		
2511				 
2512		
2513							// On traite la requête ajax
2514		
2515							$.ajax({
2516		
2517								url : CT.ajax_url,
2518		
2519								type : 'POST',
2520		
2521								data: formdata,
2522		
2523								dataType: 'json',
2524		
2525					            processData: false,
2526		
2527				            	contentType: false,
2528		
2529			
2530		
2531			
2532		
2533				            	//---------------------//
2534		
2535				            	// Avant le traitement //
2536		
2537				            	//---------------------//
2538		
2539								beforeSend : function( xhr ) {
2540		
2541			
2542		
2543									// A la soumission on indique à l'utilisateur que le traitement de sa requête est en cours
2544		
2545						    		_this.parent().attr( 'data-statut' , 'progress' );
2546		
2547			
2548		
2549								},
2550		
2551			
2552		
2553			
2554		
2555								//----------------------------------------//
2556		
2557								// Si la requête n'a pas abouti => ERREUR //
2558		
2559								//----------------------------------------//
2560		
2561								error : function ( XMLHttpRequest, textstatut, errorThrown ) {
2562		
2563			
2564		
2565					              	_this.parent().attr( 'data-statut' , 'error' );
2566		
2567			
2568		
2569								},
2570		
2571			
2572		
2573			
2574		
2575								//---------------------------------//
2576		
2577								// Si la requête aboutie => SUCCES //
2578		
2579								//---------------------------------//
2580		
2581								success : function ( datas ) {
2582		
2583				 
2584		
2585									// Si le traitement retourne des actualités
2586		
2587									if( datas.posted == true ) {
2588		
2589			
2590		
2591										// Suppression de la class "last" de la dernière offre courante
2592		
2593										$( '.ct-careers-archive-all-item.last' ).removeClass( 'last' );
2594		
2595			
2596		
2597										// Ajout du contenu html des Offres ajoutées
2598		
2599										$( '#ct-careers-archive-all-list > ul' ).append( $( datas.content ) );
2600		
2601			
2602		
2603										// Actualisation de la variable globale listant les IDS des offres affichées
2604		
2605										CT.ajax_archive_careers = datas.ids;
2606		
2607			
2608		
2609										// Fin de l'affichage du traitement
2610		
2611										_this.parent().attr( 'data-statut' ,'' );
2612		
2613			
2614		
2615									}
2616		
2617			
2618		
2619									// Sinon on affiche l'erreur
2620		
2621					                else { 
2622		
2623			
2624		
2625						            	_this.html( datas.label ).parent().attr( 'data-statut' ,'none' );
2626		
2627			
2628		
2629									}
2630		
2631			
2632		
2633								},
2634		
2635			
2636		
2637			
2638		
2639								//---------------------------------//
2640		
2641								// Une fois le traitement effectué //
2642		
2643								//---------------------------------//
2644		
2645								complete: function() { } 
2646		
2647							});
2648		
2649						}
2650		
2651			
2652		
2653						return false;
2654		
2655			
2656		
2657					});
2658			/**
2659			 * Ajout d'actualités à la liste des archives
2660			 */
2661			
2662			 	// Initialisation de la variable globale CT.ajax_archive_news
2663			 	if( $( '#ct-news-archive-more-button' ).length ) {
2664			 		CT.ajax_archive_news = $( '#ct-news-archive-more-button' ).attr( 'data-ids' );
2665			 	}
2666			
2667			
2668				// Traitement AJAX
2669				$( document ).on(
2670					'click',
2671					'#ct-news-archive-more-button',
2672					 function(e) {
2673			
2674						// IDs des actualités déjà listées
2675						var _this = $( this );
2676						var _ids = CT.ajax_archive_news;
2677			
2678						// console.log( _ids );
2679			
2680						// Publications ou Actualités
2681						var _type = $( '#ct-news-archive-more-button' ).attr( 'data-type' );
2682			
2683			    		// Construction du tableau des datas
2684			    		var formdata = false;
2685			    		if (window.FormData) { formdata = new FormData(); }
2686			
2687			    		formdata.append( 'action', 'archivenewsajax' );
2688			    		formdata.append( 'ids', _ids );
2689			    		formdata.append( 'type', _type );
2690			
2691			
2692			        	//-----------------------------------------------------------------------//
2693						// Si le formulaire de commentaire n'est pas déjà en cours d'utilisation //
2694						//-----------------------------------------------------------------------//
2695						if ( _this.parent().attr( 'data-statut' ) != 'progress' ) {
2696				 
2697							// On traite la requête ajax
2698							$.ajax({
2699								url : CT.ajax_url,
2700								type : 'POST',
2701								data: formdata,
2702								dataType: 'json',
2703					            processData: false,
2704				            	contentType: false,
2705			
2706			
2707				            	//---------------------//
2708				            	// Avant le traitement //
2709				            	//---------------------//
2710								beforeSend : function( xhr ) {
2711			
2712									// A la soumission on indique à l'utilisateur que le traitement de sa requête est en cours
2713						    		_this.parent().attr( 'data-statut' , 'progress' );
2714			
2715								},
2716			
2717			
2718								//----------------------------------------//
2719								// Si la requête n'a pas abouti => ERREUR //
2720								//----------------------------------------//
2721								error : function ( XMLHttpRequest, textstatut, errorThrown ) {
2722			
2723					              	_this.parent().attr( 'data-statut' , 'error' );
2724			
2725								},
2726			
2727			
2728								//---------------------------------//
2729								// Si la requête aboutie => SUCCES //
2730								//---------------------------------//
2731								success : function ( datas ) {
2732				 
2733									// Si le traitement retourne des actualités
2734									if( datas.posted == true ) {
2735			
2736										// Suppression de la class "last" de la dernière actualité courante
2737										$( '.ct-news-grid-item.last' ).removeClass( 'last' );
2738			
2739										// Ajout du contenu html des Actualités ajoutées
2740										$( '#ct-news-archive-list ul' ).append( $( datas.content ) );
2741			
2742										// Actualisation de la variable globale listant les IDS des actualités affichées
2743										CT.ajax_archive_news = datas.ids;
2744			
2745										// Fin de l'affichage du traitement
2746										_this.parent().attr( 'data-statut' ,'' );
2747			
2748									}
2749			
2750									// Sinon on affiche l'erreur
2751					                else { 
2752			
2753						            	_this.html( datas.label ).parent().attr( 'data-statut' ,'none' );
2754			
2755									}
2756			
2757								},
2758			
2759			
2760								//---------------------------------//
2761								// Une fois le traitement effectué //
2762								//---------------------------------//
2763								complete: function() { } 
2764							});
2765						}
2766			
2767						return false;
2768			
2769					});
2770			
2771			
2772				// Filtre depuis le champ SELECT
2773				$( document ).on( 'change', '#ct-news-archive-filter-select > select', function(e) {
2774			
2775					window.location.href = $( '#ct-news-archive-filter-select > select > option:selected' ).val();
2776			
2777				});
2778			/**
2779			 * Ajout d'actualités à la liste des archives
2780			 */
2781			
2782			 	// Initialisation de la variable globale CT.ajax_taxonomy_news
2783			 	if( $( '#ct-news-taxonomy-more-button' ).length ) {
2784			 		CT.ajax_taxonomy_news 	   = $( '#ct-news-taxonomy-more-button' ).attr( 'data-ids' );
2785			 		CT.ajax_taxonomy_news_slug = $( '#ct-news-taxonomy-more-button' ).attr( 'data-slug' );
2786			 	}
2787			
2788			
2789				// Traitement AJAX
2790				$( document ).on(
2791					'click',
2792					'#ct-news-taxonomy-more-button',
2793					 function(e) {
2794			
2795						// IDs des actualités déjà listées
2796						var _this = $( this );
2797						var _ids = CT.ajax_taxonomy_news;
2798			
2799						// console.log( _ids );
2800			
2801						// Publications ou Actualités
2802						var _type = $( '#ct-news-taxonomy-more-button' ).attr( 'data-type' );
2803			
2804						// Taxonomie
2805						var _tax = $( '#ct-news-taxonomy-more-button' ).attr( 'data-slug' );
2806			
2807			    		// Construction du tableau des datas
2808			    		var formdata = false;
2809			    		if (window.FormData) { formdata = new FormData(); }
2810			
2811			    		formdata.append( 'action', 'taxonomynewsajax' );
2812			    		formdata.append( 'ids', _ids );
2813			    		formdata.append( 'type', _type );
2814			    		formdata.append( 'tax', _tax );
2815			
2816			
2817			        	//-----------------------------------------------------------------------//
2818						// Si le formulaire de commentaire n'est pas déjà en cours d'utilisation //
2819						//-----------------------------------------------------------------------//
2820						if ( _this.parent().attr( 'data-statut' ) != 'progress' ) {
2821				 
2822							// On traite la requête ajax
2823							$.ajax({
2824								url : CT.ajax_url,
2825								type : 'POST',
2826								data: formdata,
2827								dataType: 'json',
2828					            processData: false,
2829				            	contentType: false,
2830			
2831			
2832				            	//---------------------//
2833				            	// Avant le traitement //
2834				            	//---------------------//
2835								beforeSend : function( xhr ) {
2836			
2837									// A la soumission on indique à l'utilisateur que le traitement de sa requête est en cours
2838						    		_this.parent().attr( 'data-statut' , 'progress' );
2839			
2840								},
2841			
2842			
2843								//----------------------------------------//
2844								// Si la requête n'a pas abouti => ERREUR //
2845								//----------------------------------------//
2846								error : function ( XMLHttpRequest, textstatut, errorThrown ) {
2847			
2848					              	_this.parent().attr( 'data-statut' , 'error' );
2849			
2850								},
2851			
2852			
2853								//---------------------------------//
2854								// Si la requête aboutie => SUCCES //
2855								//---------------------------------//
2856								success : function ( datas ) {
2857				 
2858									// Si le traitement retourne des actualités
2859									if( datas.posted == true ) {
2860			
2861										// Suppression de la class "last" de la dernière actualité courante
2862										$( '.ct-news-grid-item.last' ).removeClass( 'last' );
2863			
2864										// Ajout du contenu html des Actualités ajoutées
2865										$( '#ct-news-taxonomy-list ul' ).append( $( datas.content ) );
2866			
2867										// Actualisation de la variable globale listant les IDS des actualités affichées
2868										CT.ajax_taxonomy_news = datas.ids;
2869			
2870										// Fin de l'affichage du traitement
2871										_this.parent().attr( 'data-statut' ,'' );
2872			
2873									}
2874			
2875									// Sinon on affiche l'erreur
2876					                else { 
2877			
2878						            	_this.html( datas.label ).parent().attr( 'data-statut' ,'none' );
2879			
2880									}
2881			
2882								},
2883			
2884			
2885								//---------------------------------//
2886								// Une fois le traitement effectué //
2887								//---------------------------------//
2888								complete: function() { } 
2889							});
2890						}
2891			
2892						return false;
2893			
2894					});
2895			
2896			
2897				// Filtre depuis le champ SELECT
2898				$( document ).on( 'change', '#ct-news-taxonomy-filter-select > select', function(e) {
2899			
2900					window.location.href = $( '#ct-news-taxonomy-filter-select > select > option:selected' ).val();
2901			
2902				});
2903			/**
2904			 * Ajout d'actualités à la liste existante
2905			 */
2906			
2907			 	// Initialisation de la variable globale CT.ajax_homepage_news
2908			 	if( $( '#homepage-news-all-button' ).length ) {
2909			 		CT.ajax_homepage_news = $( '#homepage-news-all-button' ).attr( 'data-ids' );
2910			 	}
2911			
2912				// Traitement AJAX
2913				$( document ).on(
2914					'click',
2915					'#homepage-news-all-button',
2916					 function(e) {
2917			
2918						// IDs des actualités déjà listées
2919						var _this = $( this );
2920						var _ids = CT.ajax_homepage_news;
2921			
2922						// console.log( _ids );
2923			
2924			
2925			    		// Construction du tableau des datas
2926			    		var formdata = false;
2927			    		if (window.FormData) { formdata = new FormData(); }
2928			
2929			    		formdata.append( 'action', 'homepagenewsajax' );
2930			    		formdata.append( 'ids',    _ids );
2931			
2932			
2933			        	//-----------------------------------------------------------------------//
2934						// Si le formulaire de commentaire n'est pas déjà en cours d'utilisation //
2935						//-----------------------------------------------------------------------//
2936						if ( _this.parent().attr( 'data-statut' ) != 'progress' ) {
2937				 
2938							// On traite la requête ajax
2939							$.ajax({
2940								url : CT.ajax_url,
2941								type : 'POST',
2942								data: formdata,
2943								dataType: 'json',
2944					            processData: false,
2945				            	contentType: false,
2946			
2947			
2948				            	//---------------------//
2949				            	// Avant le traitement //
2950				            	//---------------------//
2951								beforeSend : function( xhr ) {
2952			
2953									// A la soumission on indique à l'utilisateur que le traitement de sa requête est en cours
2954						    		_this.parent().attr( 'data-statut' , 'progress' );
2955			
2956								},
2957			
2958			
2959								//----------------------------------------//
2960								// Si la requête n'a pas abouti => ERREUR //
2961								//----------------------------------------//
2962								error : function ( XMLHttpRequest, textstatut, errorThrown ) {
2963			
2964					              	_this.parent().attr( 'data-statut' , 'error' );
2965			
2966								},
2967			
2968			
2969								//---------------------------------//
2970								// Si la requête aboutie => SUCCES //
2971								//---------------------------------//
2972								success : function ( datas ) {
2973				 
2974									// Si le traitement retourne des actualités
2975									if( datas.posted == true ) {
2976			
2977										// Suppression de la class "last" de la dernière actualité courante
2978										$( '.list-news-grid-item.last' ).removeClass( 'last' );
2979			
2980										// Ajout du contenu html des Actualités ajoutées
2981										$( '#homepage-news-list-inner .list-news-grid' ).append( $( datas.content ) );
2982			
2983										// Actualisation de la variable globale listant les IDS des actualités affichées
2984										CT.ajax_homepage_news = datas.ids;
2985			
2986										// Fin de l'affichage du traitement
2987										_this.parent().attr( 'data-statut' ,'' );
2988			
2989									}
2990			
2991									// Sinon on affiche l'erreur
2992					                else { 
2993			
2994						            	_this.html( datas.label ).parent().attr( 'data-statut' ,'none' );
2995			
2996									}
2997			
2998								},
2999			
3000			
3001								//---------------------------------//
3002								// Une fois le traitement effectué //
3003								//---------------------------------//
3004								complete: function() { } 
3005							});
3006						}
3007			
3008						return false;
3009			
3010					});
3011
3012
3013		// Formulaires
3014		/**
3015		 * Chargement des scripts de FORMULAIRES
3016		**/
3017		
3018			/**
3019		
3020			 * Formulaire CONTACT
3021		
3022			 */
3023		
3024			
3025		
3026			
3027		
3028			 	//-----------------------------------------------//
3029		
3030			 	// Variable spécifique de l'objet Magnific Popup //
3031		
3032			 	//-----------------------------------------------//
3033		
3034			 	var popup_form_contact;
3035		
3036			
3037		
3038				
3039		
3040				//--------------------------//
3041		
3042				// Traitement du formulaire //	
3043		
3044				//--------------------------//
3045		
3046			 	CT_form(
3047		
3048			
3049		
3050			 		// codename du formulaire
3051		
3052			 		'contact',
3053		
3054			
3055		
3056			 		// Objet MFP dynamique
3057		
3058			 		popup_form_contact,
3059		
3060			
3061		
3062			 		// Tableau des champs du formulaire
3063		
3064			 		{
3065		
3066			 			'lastname' 				: 'text',
3067		
3068			 			'firstname' 			: 'text',
3069		
3070			 			'email' 				: 'text',
3071		
3072			 			'subject' 				: 'select',
3073		
3074			 			'message' 				: 'textarea',
3075		
3076			 			'g-recaptcha-response'	: 'captcha',
3077		
3078			 			'rgpd' 					: 'checkbox'
3079		
3080			 		},
3081		
3082			
3083		
3084			 		// Options
3085		
3086			 		{
3087		
3088			 			'on_success' 		: 'reset'
3089		
3090			 		}
3091		
3092			 	);
3093			/**
3094			 * Formulaire NOUS REJOINDRE du Pied de page
3095			 */
3096			
3097			
3098			 	//-----------------------------------------------//
3099			 	// Variable spécifique de l'objet Magnific Popup //
3100			 	//-----------------------------------------------//
3101			 	var popup_form_footer_join_us;
3102			
3103				
3104				//--------------------------//
3105				// Traitement du formulaire //	
3106				//--------------------------//
3107			 	CT_form(
3108			
3109			 		// codename du formulaire
3110			 		'footer-join-us',
3111			
3112			 		// Objet MFP dynamique
3113			 		popup_form_footer_join_us,
3114			
3115			 		// Tableau des champs du formulaire
3116			 		{
3117			 			'file' : 'file'
3118			 		},
3119			
3120			 		// Options
3121			 		{
3122			 			'on_success' : 'reset'
3123			 		}
3124			
3125			 	);
3126			/**
3127			 * Formulaire OFFRE
3128			 */
3129			
3130			
3131			 	//-----------------------------------------------//
3132			 	// Variable spécifique de l'objet Magnific Popup //
3133			 	//-----------------------------------------------//
3134			 	var popup_form_work_with_us;
3135			
3136				
3137				//--------------------------//
3138				// Traitement du formulaire //	
3139				//--------------------------//
3140			 	CT_form(
3141			
3142			 		// codename du formulaire
3143			 		'work-with-us',
3144			
3145			 		// Objet MFP dynamique
3146			 		popup_form_work_with_us,
3147			
3148			 		// Tableau des champs du formulaire
3149			 		{
3150			 			'join' 					: 'hidden',
3151			 			'lastname' 				: 'text',
3152			 			'firstname' 			: 'text',
3153			 			'email' 				: 'text',
3154			 			'phone' 				: 'text',
3155			 			'department' 			: 'select',
3156			 			'offer' 				: 'text',
3157			 			'file' 					: 'file',
3158						'message' 				: 'textarea',
3159			 			'rgpd' 					: 'checkbox', 	
3160						'g-recaptcha-response'	: 'captcha'
3161			 		},
3162			
3163			 		// Options
3164			 		{
3165			 			'on_success' 		: 'reset',
3166			 			'on_success_custom' : 'form_work_with_us_join_reset_default_values'
3167			 		}
3168			 	);
3169			
3170			
3171			 	//------------------------------------------------------------------//
3172			 	// Rechargement de la valeur du paramètre "JOIN" si il existe ? 	//
3173			 	//------------------------------------------------------------------//
3174			  	function form_work_with_us_join_reset_default_values () {
3175			
3176			 		var join = document.URL.match( /join=1/ );
3177			
3178			 		if( join.length ) {
3179			
3180			 			$( '#form-work-with-us-join' ).val( '1' );
3181			
3182			 		} 		
3183			
3184			 	}
3185			
3186
3187
3188		// Comptes utilisateurs
3189		/**
3190		 * Scripts des pages COMPTES UTILISATEURS
3191		**/
3192		
3193			//--------------------------------------------------//
3194		    // Formulaires MEMBRE IDENTIFIE                     //
3195		    //--------------------------------------------------//
3196		    /**
3197		     * Formulaire DEMANDE DE SUPPREESION d'un COMPTE UTILISATEUR (DELETE)
3198		     */
3199		    
3200		    
3201		     	//-----------------------------------------------//
3202		     	// Variable spécifique de l'objet Magnific Popup //
3203		     	//-----------------------------------------------//
3204		     	// var popup_form_member_delete;
3205		    
3206		    	
3207		    	//--------------------------//
3208		    	// Traitement du formulaire //	
3209		    	//--------------------------//
3210		     	CT_form (
3211		    
3212		     		// codename du formulaire
3213		     		'member-delete',
3214		    
3215		     		// Objet MFP dynamique
3216		     		'',
3217		    
3218		     		// Tableau des champs du formulaire
3219		     		{
3220		     			'id' : 'hidden'
3221		     		},
3222		    
3223		     		// Options
3224		     		{
3225		     			'on_success' : 'hide'
3226		     		}
3227		     	);
3228			/**
3229			 * Formulaire EDITION DES INFORMATIONS D'UN COMPTE UTILISATEUR (EDIT)
3230			 */
3231			
3232			
3233			 	//-----------------------------------------------//
3234			 	// Variable spécifique de l'objet Magnific Popup //
3235			 	//-----------------------------------------------//
3236			 	// var popup_form_member_edit;
3237			
3238				
3239				//--------------------------//
3240				// Traitement du formulaire //	
3241				//--------------------------//
3242			 	CT_form (
3243			
3244			 		// codename du formulaire
3245			 		'member-edit',
3246			
3247			 		// Objet MFP dynamique
3248			 		'',
3249			
3250			 		// Tableau des champs du formulaire
3251			 		{
3252			 			'gender' 	: 'radio',
3253			 			'lastname'	: 'text',
3254			 			'firstname'	: 'text',
3255			 			'email' 	: 'email',
3256			 			'phone' 	: 'text',
3257			 			'old-pwd'	: 'password',
3258			 			'pwd'		: 'password',
3259			 			'pwd2' 		: 'password'
3260			 		}
3261			 	);
3262			
3263			
3264			 	//-----------------------------------//
3265			 	// Actions spécifiques du formulaire //
3266			 	//-----------------------------------//
3267			 	function member_edit_check_password_strength() {
3268			 		
3269			 		wp_check_password_strength (
3270			            $('input[name=form_member_edit_pwd]'),
3271			            $('input[name=form_member_edit_pwd2]'),
3272			            $('#form-member-edit-pwd-strength'),
3273			            $('#form-member-edit-submit'),
3274			            []
3275			        );
3276			 	}
3277			
3278			
3279			 	function member_edit_check_fields() {
3280			
3281			 		if( $('#form-member-edit').length ) {
3282			
3283			 			// Vérification de la force de sécurité du MOT DE PASSE
3284					    $('#form-member-edit').on('keyup', 'input[name="form_member_edit_pwd"], input[name="form_member_edit_pwd2"]', function(event) {
3285				        	$('#form-member-edit-pwd-strength').show();
3286				        	member_edit_check_password_strength();
3287				        });
3288			
3289				 		// Désactivation du changement de mot de passe
3290						$('#form-member-edit').on('keyup', '#form-member-edit-old-pwd',  function(event) {
3291							if( $('#form-member-edit-old-pwd').val() == '' ) {
3292								$('#form-member-edit-pwd-strength').hide();
3293				        		$('#form-member-edit-submit').prop('disabled', false);
3294				        	}
3295				        });
3296					}
3297			 	}
3298			
3299			
3300			 	//--------------------------------------------------------------------------------------//
3301			 	// Affichage du bouton SUBMIT si tous les champs MOTS DE PASSE sont vides au chargement //
3302			 	//--------------------------------------------------------------------------------------//
3303			 	if(
3304			 		$('input[name=form_member_edit_pwd]').length     && $('input[name=form_member_edit_pwd]').val() == ''  &&
3305			        $('input[name=form_member_edit_pwd2]').length    && $('input[name=form_member_edit_pwd2]').val() == '' &&
3306			        $('input[name=form_member_edit_old_pwd]').length && $('input[name=form_member_edit_old_pwd]').val() == ''
3307			    ){
3308			 		$('#form-member-edit-pwd-strength').hide();
3309				    $('#form-member-edit-submit').prop('disabled', false);
3310			 	}
3311			 	else if( $('#form-member-edit').length ) {
3312			 		member_edit_check_password_strength();
3313			 	}
3314			
3315			
3316				//------------------------------//
3317			 	// Initialisation au chargement //
3318			 	//------------------------------//
3319			 	member_edit_check_fields();
3320			/**
3321			 * Formulaire EDITION ADRESSE DE LIVRAISON D'UN COMPTE UTILISATEUR (EDIT-BILLING-ADDRESS)
3322			 */
3323			
3324			
3325			 	//-----------------------------------------------//
3326			 	// Variable spécifique de l'objet Magnific Popup //
3327			 	//-----------------------------------------------//
3328			 	// var popup_form_member_edit_billing_address;
3329			
3330				
3331				//--------------------------//
3332				// Traitement du formulaire //	
3333				//--------------------------//
3334			 	CT_form (
3335			
3336			 		// codename du formulaire
3337			 		'member-edit-billing-address',
3338			
3339			 		// Objet MFP dynamique
3340			 		'',
3341			
3342			 		// Tableau des champs du formulaire
3343			 		{
3344			 			'lastname'	: 'text',
3345			 			'firstname'	: 'text',
3346			 			'company'	: 'text',
3347			 			'address1'	: 'text',
3348			 			'address2'	: 'text',
3349			 			'zipcode'	: 'text',
3350			 			'city'		: 'text',
3351			 			'country'	: 'select',
3352			 			'state'		: 'text',
3353			 			'email' 	: 'email',
3354			 			'phone' 	: 'text'
3355			 		}
3356			 	);
3357			
3358			
3359			 	//--------------------------------------------------------------------------------//
3360			 	// Affichage du champs "Etats" de type SELECT ou INPUT en fonction du champs PAYS //
3361			 	//--------------------------------------------------------------------------------//
3362			 	if( $( '#form-member-edit-billing-address-country' ).length ) {
3363			
3364			 		$( '#form-member-edit-billing-address' ).on(
3365			 			'change',
3366			 			'#form-member-edit-billing-address-country',
3367			 			function(){
3368			
3369			 				CT_edit_billing_address_refresh_states_field();
3370			
3371			 			}
3372			 		);
3373			 	}
3374			
3375			
3376			 	//---------------------------------------------//
3377			 	// Affichage du champs "Etats" SELECT ou INPUT //
3378			 	//---------------------------------------------//
3379			 	function CT_edit_billing_address_refresh_states_field() {
3380			
3381			 		var country = $( '#form-member-edit-billing-address-country option:selected' ).val();
3382			
3383					var select_states = $( '#form-member-edit-billing-address-select-state-wrapper' );
3384					var input_states  = $( '#form-member-edit-billing-address-input-state-wrapper' );
3385			
3386					var state_val = $( '#form-member-edit-billing-address-state' ).val();
3387			
3388					// On teste la nouvelle valeur "Pays" et on récupère les "Etats" si nécessaire
3389					var has_states = Object.keys( CT_countries_states[ country ]).length > 0 ? true : false;
3390			
3391					// On modifie l'affichage SELECT ou INPUT du champs "Etats" en conséquence
3392					if( has_states ) {
3393			
3394						// On vide le SELECT "Etats" des anciennes valeurs existantes
3395						$( '#form-member-edit-billing-address-select-state' ).select2('destroy'); 
3396						$( '#form-member-edit-billing-address-select-state' ).empty();
3397			
3398						// On remplit le SELECT "Etats" avec les options correspondantes
3399						var list_options = '';
3400						$.each( CT_countries_states[ country ], function( code, label ) {
3401							list_options += '<option value="' + code + '">' + label + '</option>';
3402						});
3403						$( '#form-member-edit-billing-address-select-state' ).append( $( list_options ) );
3404			
3405						// Puis on réintialise le "nouveau" SELECT
3406						CT_select2_init( $( '#form-member-edit-billing-address-select-state' ) );
3407			
3408						// Affichage
3409						if( ! select_states.hasClass( 'active' ) ) { select_states.addClass( 'active' ); }
3410						if(    input_states.hasClass( 'active' ) ) { input_states.removeClass( 'active' ); }
3411			
3412						// Valeur de "Etat"
3413						state_val = $( '#form-member-edit-billing-address-select-state option:selected' ).val();
3414					}
3415					else {
3416						if(  select_states.hasClass( 'active' ) ) { select_states.removeClass( 'active' ); }
3417						if( ! input_states.hasClass( 'active' ) ) { input_states.addClass( 'active' ); }
3418			
3419						// Valeur de "Etat"
3420						state_val = $( '#form-member-edit-billing-address-input-state').val();
3421					}
3422			
3423					// Et on actualise la valeur du champ "Etats" HIDDEN
3424					$( '#form-member-edit-billing-address-state' ).val( state_val );
3425			 	}
3426			
3427			
3428			 	//---------------------------------------------------------//
3429			 	// Actualisation de l'Etats au changement du INPUT "Etats" //
3430			 	//---------------------------------------------------------//
3431			 	if( $( '#form-member-edit-billing-address-input-state' ).length ) {
3432			
3433			 		$( '#form-member-edit-billing-address' ).on(
3434			 			'keyup',
3435			 			'#form-member-edit-billing-address-input-state',
3436			 			function(){
3437			
3438			 				// on actualise la valeur du champ "Etats" HIDDEN
3439			 				$( '#form-member-edit-billing-address-state' ).val( $( '#form-member-edit-billing-address-input-state').val() );
3440			
3441			 			}
3442			 		);
3443			
3444			 	}
3445			
3446			
3447			 	//----------------------------------------------------------//
3448			 	// Actualisation de l'Etats au changement du SELECT "Etats" //
3449			 	//----------------------------------------------------------//
3450			 	if( $( '#form-member-edit-billing-address-select-state' ).length ) {
3451			
3452			 		$( '#form-member-edit-billing-address' ).on(
3453			 			'change',
3454			 			'#form-member-edit-billing-address-select-state',
3455			 			function(){
3456			
3457			 				// on actualise la valeur du champ "Etats" HIDDEN
3458			 				$( '#form-member-edit-billing-address-state' ).val( $( '#form-member-edit-billing-address-select-state option:selected').val() );
3459			
3460			 			}
3461			 		);
3462			
3463			 	}
3464			/**
3465			 * Formulaire EDITION ADRESSE DE FACTURATION D'UN COMPTE UTILISATEUR (EDIT-SHIPPING-ADDRESS)
3466			 */
3467			
3468			
3469			 	//-----------------------------------------------//
3470			 	// Variable spécifique de l'objet Magnific Popup //
3471			 	//-----------------------------------------------//
3472			 	// var popup_form_member_edit_shipping_address;
3473			
3474				
3475				//--------------------------//
3476				// Traitement du formulaire //	
3477				//--------------------------//
3478			 	CT_form (
3479			
3480			 		// codename du formulaire
3481			 		'member-edit-shipping-address',
3482			
3483			 		// Objet MFP dynamique
3484			 		'',
3485			
3486			 		// Tableau des champs du formulaire
3487			 		{
3488			 			'lastname'	: 'text',
3489			 			'firstname'	: 'text',
3490			 			'company'	: 'text',
3491			 			'address1'	: 'text',
3492			 			'address2'	: 'text',
3493			 			'zipcode'	: 'text',
3494			 			'city'		: 'text',
3495			 			'country'	: 'select',
3496			 			'state'		: 'text',
3497			 			'email' 	: 'email',
3498			 			'phone' 	: 'text'
3499			 		}
3500			 	);
3501			
3502			
3503			 	//--------------------------------------------------------------------------------//
3504			 	// Affichage du champs "Etats" de type SELECT ou INPUT en fonction du champs PAYS //
3505			 	//--------------------------------------------------------------------------------//
3506			 	if( $( '#form-member-edit-shipping-address-country' ).length ) {
3507			
3508			 		$( '#form-member-edit-shipping-address' ).on(
3509			 			'change',
3510			 			'#form-member-edit-shipping-address-country',
3511			 			function(){
3512			
3513			 				CT_edit_shipping_address_refresh_states_field();
3514			
3515			 			}
3516			 		);
3517			 	}
3518			
3519			
3520			 	//---------------------------------------------//
3521			 	// Affichage du champs "Etats" SELECT ou INPUT //
3522			 	//---------------------------------------------//
3523			 	function CT_edit_shipping_address_refresh_states_field() {
3524			
3525			 		var country = $( '#form-member-edit-shipping-address-country option:selected' ).val();
3526			
3527					var select_states = $( '#form-member-edit-shipping-address-select-state-wrapper' );
3528					var input_states  = $( '#form-member-edit-shipping-address-input-state-wrapper' );
3529			
3530					var state_val = $( '#form-member-edit-shipping-address-state' ).val();
3531			
3532					// On teste la nouvelle valeur "Pays" et on récupère les "Etats" si nécessaire
3533					var has_states = Object.keys( CT_countries_states[ country ]).length > 0 ? true : false;
3534			
3535					// On modifie l'affichage SELECT ou INPUT du champs "Etats" en conséquence
3536					if( has_states ) {
3537			
3538						// On vide le SELECT "Etats" des anciennes valeurs existantes
3539						$( '#form-member-edit-shipping-address-select-state' ).select2('destroy'); 
3540						$( '#form-member-edit-shipping-address-select-state' ).empty();
3541			
3542						// On remplit le SELECT "Etats" avec les options correspondantes
3543						var list_options = '';
3544						$.each( CT_countries_states[ country ], function( code, label ) {
3545							list_options += '<option value="' + code + '">' + label + '</option>';
3546						});
3547						$( '#form-member-edit-shipping-address-select-state' ).append( $( list_options ) );
3548			
3549						// Puis on réintialise le "nouveau" SELECT
3550						CT_select2_init( $( '#form-member-edit-shipping-address-select-state' ) );
3551			
3552						// Affichage
3553						if( ! select_states.hasClass( 'active' ) ) { select_states.addClass( 'active' ); }
3554						if(    input_states.hasClass( 'active' ) ) { input_states.removeClass( 'active' ); }
3555			
3556						// Valeur de "Etat"
3557						state_val = $( '#form-member-edit-shipping-address-select-state option:selected' ).val();
3558					}
3559					else {
3560						if(  select_states.hasClass( 'active' ) ) { select_states.removeClass( 'active' ); }
3561						if( ! input_states.hasClass( 'active' ) ) { input_states.addClass( 'active' ); }
3562			
3563						// Valeur de "Etat"
3564						state_val = $( '#form-member-edit-shipping-address-input-state').val();
3565					}
3566			
3567					// Et on actualise la valeur du champ "Etats" HIDDEN
3568					$( '#form-member-edit-shipping-address-state' ).val( state_val );
3569			 	}
3570			
3571			
3572			 	//---------------------------------------------------------//
3573			 	// Actualisation de l'Etats au changement du INPUT "Etats" //
3574			 	//---------------------------------------------------------//
3575			 	if( $( '#form-member-edit-shipping-address-input-state' ).length ) {
3576			
3577			 		$( '#form-member-edit-shipping-address' ).on(
3578			 			'keyup',
3579			 			'#form-member-edit-shipping-address-input-state',
3580			 			function(){
3581			
3582			 				// on actualise la valeur du champ "Etats" HIDDEN
3583			 				$( '#form-member-edit-shipping-address-state' ).val( $( '#form-member-edit-shipping-address-input-state').val() );
3584			
3585			 			}
3586			 		);
3587			
3588			 	}
3589			
3590			
3591			 	//----------------------------------------------------------//
3592			 	// Actualisation de l'Etats au changement du SELECT "Etats" //
3593			 	//----------------------------------------------------------//
3594			 	if( $( '#form-member-edit-shipping-address-select-state' ).length ) {
3595			
3596			 		$( '#form-member-edit-shipping-address' ).on(
3597			 			'change',
3598			 			'#form-member-edit-shipping-address-select-state',
3599			 			function(){
3600			
3601			 				// on actualise la valeur du champ "Etats" HIDDEN
3602			 				$( '#form-member-edit-shipping-address-state' ).val( $( '#form-member-edit-shipping-address-select-state option:selected').val() );
3603			
3604			 			}
3605			 		);
3606			
3607			 	}
3608		
3609		
3610			//--------------------------------------------------//
3611		    // Formulaires UTILISATEUR NON IDENTIFIE            //
3612		    //--------------------------------------------------//
3613			/**
3614			 * Formulaire CONNEXION (LOGIN)
3615			 */
3616			
3617			
3618			 	//-----------------------------------------------//
3619			 	// Variable spécifique de l'objet Magnific Popup //
3620			 	//-----------------------------------------------//
3621			 	// var popup_form_login;
3622			
3623				
3624				//--------------------------//
3625				// Traitement du formulaire //	
3626				//--------------------------//
3627			 	CT_form (
3628			
3629			 		// codename du formulaire
3630			 		'login',
3631			
3632			 		// Objet MFP dynamique
3633			 		'',
3634			
3635			 		// Tableau des champs du formulaire
3636			 		{
3637			 			'login'		: 'text',
3638			 			'pwd'		: 'password', 
3639			 			'remember'	: 'checkbox'
3640			 		}
3641			 	);
3642			/**
3643			 * Formulaire CONNEXION (LOGIN)
3644			 */
3645			
3646			
3647			 	//-----------------------------------------------//
3648			 	// Variable spécifique de l'objet Magnific Popup //
3649			 	//-----------------------------------------------//
3650			 	// var popup_form_login;
3651			
3652				
3653				//--------------------------//
3654				// Traitement du formulaire //	
3655				//--------------------------//
3656			 	CT_form (
3657			
3658			 		// codename du formulaire
3659			 		'footer-bottom-signin',
3660			
3661			 		// Objet MFP dynamique
3662			 		'',
3663			
3664			 		// Tableau des champs du formulaire
3665			 		{
3666			 			'login'		: 'text',
3667			 			'pwd'		: 'password'
3668			 		}
3669			 	);
3670			/**
3671			 * Formulaire MOT DE PASSE OUBLIÉ (LOST-PWD)
3672			 */
3673			
3674			
3675			 	//-----------------------------------------------//
3676			 	// Variable spécifique de l'objet Magnific Popup //
3677			 	//-----------------------------------------------//
3678			 	// var popup_form_lostpwd;
3679			
3680				
3681				//--------------------------//
3682				// Traitement du formulaire //	
3683				//--------------------------//
3684			 	CT_form (
3685			
3686			 		// codename du formulaire
3687			 		'lostpwd',
3688			
3689			 		// Objet MFP dynamique
3690			 		'',
3691			
3692			 		// Tableau des champs du formulaire
3693			 		{
3694			 			'login'		: 'text'
3695			 		},
3696			
3697			 		// Options
3698			 		{
3699			 			'on_success' : 'hide'
3700			 		}
3701			 	);
3702			/**
3703			 * Formulaire ENREGISTREMENT (REGISTER)
3704			 */
3705			
3706			
3707			 	//-----------------------------------------------//
3708			 	// Variable spécifique de l'objet Magnific Popup //
3709			 	//-----------------------------------------------//
3710			 	// var popup_form_register;
3711			
3712				
3713				//--------------------------//
3714				// Traitement du formulaire //	
3715				//--------------------------//
3716			 	CT_form (
3717			
3718			 		// codename du formulaire
3719			 		'register',
3720			
3721			 		// Objet MFP dynamique
3722			 		'',
3723			
3724			 		// Tableau des champs du formulaire
3725			 		{
3726			 			'gender' 	: 'radio',
3727			 			'login'		: 'text', 			
3728			 			'lastname'	: 'text',
3729			 			'firstname'	: 'text',
3730			 			'email' 	: 'email',
3731			 			'phone' 	: 'text',
3732			 			'pwd'		: 'password',
3733			 			'pwd2' 		: 'password'
3734			 		},
3735			 		
3736			 		// Options
3737			 		{
3738			 			'on_success' : 'hide'
3739			 		}
3740			 	);
3741			
3742			
3743			 	//-----------------------------------//
3744			 	// Actions spécifiques du formulaire //
3745			 	//-----------------------------------//
3746			 	function register_check_password_strength() {
3747			
3748			 		 wp_check_password_strength (
3749			            $('input[name=form_register_pwd]'),
3750			            $('input[name=form_register_pwd2]'),
3751			            $('#form-register-pwd-strength'),
3752			            $('#form-register-submit'),
3753			            []
3754			        );
3755			 	}
3756			
3757			
3758			 	function register_check_fields() {
3759			
3760			 		if( $('#form-register').length ) {
3761			
3762			 			// Initialisation
3763			 			register_check_password_strength();
3764			
3765				 		// Vérification de la force de sécurité du MOT DE PASSE
3766					    $('#form-register').on('keyup', 'input[name=form_register_pwd], input[name=form_register_pwd2]', function(event) {
3767				            register_check_password_strength();
3768				        });
3769			
3770					    // Initialisation du script validate.js pour pouvoir tester unitairement les champs tels que MAIL
3771				 		// var validator = $("#form-register").validate();
3772			
3773				 		// validator.element( "#form-register-email" );
3774			
3775				 		// if ( ! validator.element('input[name="' + val + '"]')) {
3776						// 	validation.push('form_register_mail_format');
3777						// }
3778			
3779					}
3780			 	}
3781			
3782			
3783			 	//------------------------------//
3784			 	// Initialisation au chargement //
3785			 	//------------------------------//
3786			 	register_check_fields();
3787			/**
3788			 * Formulaire REINITIALISATION MOT DE PASSE OUBLIÉ (RESET-PWD)
3789			 */
3790			
3791			
3792			 	//-----------------------------------------------//
3793			 	// Variable spécifique de l'objet Magnific Popup //
3794			 	//-----------------------------------------------//
3795			 	// var popup_form_resetpwd;
3796			
3797				
3798				//--------------------------//
3799				// Traitement du formulaire //	
3800				//--------------------------//
3801			 	CT_form (
3802			
3803			 		// codename du formulaire
3804			 		'resetpwd',
3805			
3806			 		// Objet MFP dynamique
3807			 		'',
3808			
3809			 		// Tableau des champs du formulaire
3810			 		{
3811			 			'login'	: 'hidden',
3812			 			'key' 	: 'hidden',
3813			 			'pwd' 	: 'password',
3814			 			'pwd2'	: 'password'
3815			 		},
3816			 		
3817			 		// Options
3818			 		{
3819			 			'on_success' : 'hide'
3820			 		}
3821			 	);
3822			
3823			
3824			 	//-----------------------------------//
3825			 	// Actions spécifiques du formulaire //
3826			 	//-----------------------------------//
3827			 	function resetpwd_check_password_strength() {
3828			
3829			 		 wp_check_password_strength (
3830			            $('input[name=form_resetpwd_pwd]'),
3831			            $('input[name=form_resetpwd_pwd2]'),
3832			            $('#form-resetpwd-pwd-strength'),
3833			            $('#form-resetpwd-submit'),
3834			            []
3835			        );
3836			 	}
3837			
3838			
3839			 	function resetpwd_check_fields() {
3840			
3841			 		if( $('#form-resetpwd').length ) {
3842			
3843			 			// Initialisation
3844			 			resetpwd_check_password_strength();
3845			
3846				 		// Vérification de la force de sécurité du MOT DE PASSE
3847					    $('#form-resetpwd').on('keyup', 'input[name=form_resetpwd_pwd], input[name=form_resetpwd_pwd2]', function(event) {
3848				            resetpwd_check_password_strength();
3849				        });
3850					}
3851			 	}
3852			
3853			 	
3854			 	//------------------------------//
3855			 	// Initialisation au chargement //
3856			 	//------------------------------//
3857			 	resetpwd_check_fields();
3858				
3859
3860		// Chargement des ELEMENTS SPECIFIQUES du site
3861		/**
3862		 * Chargement des scripts spécifiques du site
3863		**/
3864		
3865			/*
3866		
3867			 * Les scripts communs à une ou plusieurs pages du site
3868		
3869			 */
3870		
3871			
3872		
3873			 	//------------------------//
3874		
3875			 	// Boutons "En voir plus" //
3876		
3877			 	//------------------------//
3878		
3879			 	if( $( '#main-content-hidden-btn' ).length && $( '.main-content-hidden' ).length ) {
3880		
3881			
3882		
3883			 		$( document ).on( 'click', '#main-content-hidden-btn', function (e) {
3884		
3885			
3886		
3887			 			e.preventDefault();
3888		
3889			 			e.stopPropagation();
3890		
3891			
3892		
3893			 			$( '.main-content-hidden' ).addClass( 'active' );
3894		
3895			
3896		
3897			 			$( '#main-content-hidden-btn' ).addClass( 'inactive' );
3898		
3899			
3900		
3901			 		});
3902		
3903			 	}
3904		
3905			
3906		
3907			
3908		
3909			
3910		
3911			 	//------------------------//
3912		
3913			 	// Filtres des POST TYPES //
3914		
3915			 	//------------------------//
3916		
3917			 	if( $( '.CT-filter' ).length && $( '.CT-filter-list' ).length ) {
3918		
3919			
3920		
3921			 		$( document ).on( 'click', '.CT-filter-current', function(){
3922		
3923			
3924		
3925			 			var _this = $( this );
3926		
3927			
3928		
3929			 			_this.parent( '.CT-filter' ).toggleClass( 'active' );
3930		
3931			
3932		
3933			 		});
3934		
3935			
3936		
3937			 	}
3938		
3939			
3940			
3941			/*
3942			
3943			 * Les scripts spécifiques du HEADER
3944			
3945			 */
3946			
3947			
3948			
3949			 	//-------------//
3950			
3951			 	// Menu MOBILE //
3952			
3953			 	//-------------//
3954			
3955			 	var mobile_menu 			= '#mobile-nav',
3956			
3957			 		mobile_menu_class 		= 'mobile-nav-active',
3958			
3959			 		mobile_menu_btn 		= '#mobile-nav-open',
3960			
3961			 		mobile_menu_btn_close 	= '#mobile-nav-close',
3962			
3963			 		mobile_menu_overlay		= '#mobile-nav-overlay',
3964			
3965			 		mobile_eventtype 		= mobilecheck() ? 'touchstart' : 'click',
3966			
3967			 		close_mobile_menu 		= function( e ) { reset_mobile_menu(); $(document).off( mobile_eventtype, mobile_menu_overlay, close_mobile_menu ); };
3968			
3969			
3970			
3971			 	var reset_mobile_menu	= function() {
3972			
3973			
3974			
3975			 		// Désactivation du menu mobile
3976			
3977			 		$( 'body' ).removeClass( mobile_menu_class );
3978			
3979			
3980			
3981			 		// Réinitialisation des items actifs de niveau 2
3982			
3983			 		$( 'body' ).removeClass( 'mobile-nav-lvl2-active' );
3984			
3985			 		$( '.mobile-nav-lvl2' ).removeClass( 'active' );
3986			
3987			
3988			
3989			 		// Réinitialisation de tous les items actifs de niveau 3
3990			
3991			 		$( 'body' ).removeClass( 'mobile-nav-lvl3-active' );
3992			
3993			 		$( '.mobile-nav-lvl3' ).removeClass( 'active' );
3994			
3995			 	}
3996			
3997			
3998			
3999			 	// Ouverture Fermetre du menu mobile
4000			
4001			 	$( document ).on( mobile_eventtype, mobile_menu_btn, function(e) {
4002			
4003			
4004			
4005			 		e.stopPropagation();
4006			
4007			 		e.preventDefault();
4008			
4009			
4010			
4011			 		setTimeout(
4012			
4013						function(){
4014			
4015			
4016			
4017					 		// Si le menu mobile était ouvert => FERMETURE
4018			
4019					 		if( $( 'body' ).hasClass( mobile_menu_class ) ) {
4020			
4021					 			reset_mobile_menu();
4022			
4023					 		}
4024			
4025			
4026			
4027					 		// Sinon il était fermé => OUVERTURE
4028			
4029					 		else {
4030			
4031					 			$( 'body' ).addClass( mobile_menu_class );
4032			
4033					 			$( document ).on( mobile_eventtype, mobile_menu_overlay, close_mobile_menu );
4034			
4035					 		}
4036			
4037			
4038			
4039					 	},
4040			
4041					 	100
4042			
4043					);
4044			
4045			
4046			
4047			 	});
4048			
4049			
4050			
4051			 	// Fermetre du menu mobile
4052			
4053			 	$( document ).on( mobile_eventtype, mobile_menu_btn_close, function(e) {
4054			
4055			
4056			
4057			 		e.stopPropagation();
4058			
4059			 		e.preventDefault();
4060			
4061			
4062			
4063			 		// Si le menu mobile était ouvert => FERMETURE
4064			
4065			 		if( $( 'body' ).hasClass( mobile_menu_class ) ) {
4066			
4067			 			reset_mobile_menu();
4068			
4069			 		}
4070			
4071			 	});
4072			
4073			
4074			
4075			 	// Boutons TOGGLE
4076			
4077			 	if( $( '.mobile-nav-submenu-btn' ).length ) {
4078			
4079			 		$( '#mobile-nav' ).on( mobile_eventtype, '.mobile-nav-submenu-btn', function () {
4080			
4081			
4082			
4083			 			var _this 	  = $( this );
4084			
4085			 			var _lvl 	  = _this.attr( 'data-level' );
4086			
4087			 			var _cible 	  = $( _this.attr( 'data-cible' ) );
4088			
4089			 			var is_active = _cible.hasClass( 'active' );
4090			
4091			
4092			
4093			 			setTimeout(
4094			
4095							function(){
4096			
4097			
4098			
4099					 			// Fermeture de tous les sous-menu ouverts
4100			
4101					 			$( 'body' ).removeClass( 'mobile-nav-lvl' + _lvl + '-active' );
4102			
4103					 			_cible.removeClass( 'active' );
4104			
4105			
4106			
4107					 			// Activation du sous-menu courant si il était inactif
4108			
4109					 			if( ! is_active ) {
4110			
4111					 				$( 'body' ).addClass( 'mobile-nav-lvl' + _lvl + '-active' );
4112			
4113					 				_cible.addClass( 'active' );
4114			
4115					 			}
4116			
4117			
4118			
4119							},
4120			
4121							100
4122			
4123						);
4124			
4125			
4126			
4127			 		});
4128			
4129			 	}
4130			
4131			
4132			
4133			 	// Boutons BACK (to parent menu)
4134			
4135			 	if( $( '.mobile-nav-back' ).length ) {
4136			
4137			 		$( '#mobile-nav' ).on( mobile_eventtype, '.mobile-nav-back', function () {
4138			
4139			
4140			
4141			 			var _this 	  = $( this );
4142			
4143			 			var _lvl 	  = _this.attr( 'data-level' );
4144			
4145			 			var _cible 	  = _this.parent();
4146			
4147			
4148			
4149			 			// console.log( _lvl );
4150			
4151			 			// console.log( _cible );
4152			
4153			
4154			
4155			 			// Fermeture de tous les sous-menu ouverts
4156			
4157			 			$( 'body' ).removeClass( 'mobile-nav-lvl' + _lvl + '-active' );
4158			
4159			 			_cible.removeClass( 'active' );
4160			
4161			
4162			
4163			 		});
4164			
4165			 	}
4166			
4167			
4168			
4169			
4170			
4171			 	//---------------------//
4172			
4173			 	// HAUT DE PAGE STICKY //
4174			
4175			 	//---------------------//
4176			
4177			 	/*
4178			
4179			 	function CT_masthead_scroll_effect () {
4180			
4181			
4182			
4183			 		if( scrollTop > 218 ) {
4184			
4185			 			if( $( 'body' ).attr( 'data-header-status' ) != 'fixed' ) {
4186			
4187			 				$( 'body' ).attr( 'data-header-status', 'fixed' );
4188			
4189			 			}
4190			
4191			 		}
4192			
4193			 		else {
4194			
4195			 			if( $( 'body' ).attr( 'data-header-mobile' ) != 'active' ) {
4196			
4197			 				$('body').attr( 'data-header-status', 'default' );
4198			
4199			 			}
4200			
4201					}
4202			
4203			 	}
4204			
4205			
4206			
4207			 	// Au chargement de la page + Ecouteur d'événement SCROLL
4208			
4209			 	CT_masthead_scroll_effect();
4210			
4211			
4212			
4213			 	$( window ).on(
4214			
4215			 		'scroll',
4216			
4217			 		function() {
4218			
4219			 			CT_masthead_scroll_effect();
4220			
4221			 		}
4222			
4223			 	);
4224			
4225			 	*/
4226			
4227			
4228			
4229			
4230			
4231			 	//-------------------------------------------------------------------------------------------------//
4232			
4233			 	// HAUT DE PAGE si MOBILE => APRES CT_masthead_scroll_effect() pour Override du data-header-status //
4234			
4235			 	//-------------------------------------------------------------------------------------------------//
4236			
4237			 	/*
4238			
4239			 	function CT_masthead_mobile_display () {
4240			
4241			
4242			
4243			 		if( window.innerWidth < 1180 ) {
4244			
4245			 			if( $( 'body' ).attr( 'data-header-status' ) != 'fixed' ) {
4246			
4247			 				$( 'body' ).attr( 'data-header-status', 'fixed' );
4248			
4249			 			}
4250			
4251			 			if( $( 'body' ).attr( 'data-header-mobile' ) != 'active' ) {
4252			
4253			 				$( 'body' ).attr( 'data-header-mobile', 'active' );
4254			
4255			 			}
4256			
4257			 		}
4258			
4259			 		else {
4260			
4261			 			if( $( 'body' ).attr( 'data-header-status' ) != 'default' ) {
4262			
4263			 				$('body').attr( 'data-header-status', 'default' );
4264			
4265			 			}
4266			
4267			 			if( $( 'body' ).attr( 'data-header-mobile' ) == 'active' ) {
4268			
4269			 				$( 'body' ).attr( 'data-header-mobile', '' );
4270			
4271			 			}
4272			
4273			 		}
4274			
4275			 	}
4276			
4277			 	*/
4278			
4279			
4280			
4281			 	// Le header n'est plus FIXED, donc on simplifie le script
4282			
4283			 	function CT_masthead_mobile_display () {
4284			
4285			
4286			
4287			 		if( window.innerWidth < 1180 ) {
4288			
4289			 			if( $( 'body' ).attr( 'data-header-mobile' ) != 'active' ) {
4290			
4291			 				$( 'body' ).attr( 'data-header-mobile', 'active' );
4292			
4293			 			}
4294			
4295			 		}
4296			
4297			 		else {
4298			
4299			 			if( $( 'body' ).attr( 'data-header-mobile' ) == 'active' ) {
4300			
4301			 				$( 'body' ).attr( 'data-header-mobile', '' );
4302			
4303			 			}
4304			
4305			 		}
4306			
4307			
4308			
4309			 	}
4310			
4311			
4312			
4313			 	// Au chargement de la page + Ecouteur d'événement RESIZE / ORIENTATIONCHANGE
4314			
4315			 	CT_masthead_mobile_display();
4316			
4317			
4318			
4319			 	$( window ).on(
4320			
4321			 		'resize orientationchange',
4322			
4323			 		function() {
4324			
4325			 			CT_masthead_mobile_display();
4326			
4327			 		}
4328			
4329			 	);
4330		
4331			//	require page-contact.js
4332			/**
4333			 * Les scripts spécifiques des pages Archive CT_CAREERS
4334			**/
4335			
4336			
4337				//---------------------------------------------------//
4338				// Scrolling vertical au clic sur une offre featured //
4339				//---------------------------------------------------//
4340				function ct_careers_featured_offer_scroll( _btn ) {
4341			
4342					var _cible_id 	     = _btn.attr( 'href' ),
4343						_cible_offset    = $( _cible_id ).offset().top;
4344			
4345					// Action SCROLL
4346					$( 'html, body' ).animate(
4347						{
4348							scrollTop: _cible_offset
4349						},
4350						600
4351					);
4352			
4353				return false;
4354			
4355			
4356			
4357			
4358			
4359				}
4360			
4361			
4362				$( document ).on( 'click', '.ct-careers-archive-featured-item-button-inner > a', function(e) {
4363			
4364					e.preventDefault();
4365			
4366					ct_careers_featured_offer_scroll( $(this) );
4367			
4368				});
4369			// 	require page-evenements-single.js
4370			//	require page-governance-members.js
4371			/*
4372			 * Les scripts spécifiques de la PAGE D'ACCUEIL
4373			 */
4374			
4375			
4376			 	//------------------------------------------------------------//
4377			 	// Ajout du bouton SCROLLDOWN au dessus du Carrousel d'entête //
4378			 	//------------------------------------------------------------//
4379			 	/*
4380			 	if( $( '#homepage-carrousel' ).length ) {
4381			
4382			 		// Ajout du bouton SCROLL DOWN
4383			 		$( '#homepage-carrousel' ).append( '<div id="homepage-carrousel-scrolldown"><a href="#" rel=nofollow">Explorer</a></div>' );
4384			
4385			 		// Action au clic
4386			 		scroll_down( '#homepage-carrousel-scrolldown > a', '#hompage-grid-links', 0, 600, false );
4387			
4388			 	}
4389			 	*/
4390			
4391			
4392			 	CT_map_OSM( '#our-network-map-osm-1', '.js-marker' );
4393			 	CT_map_OSM( '#our-network-map-osm-2', '.js-marker' );
4394			//	require page-our-network.js
4395			//	require page-rgpd.js
4396
4397
4398		// Alerte COOKIES 
4399		/*
4400		var trad_fr = <?php echo CMS_i18n::getTranslation("COOKIE-messge-fr");  ?>;
4401		var trad_en = <?php echo CMS_i18n::getTranslation("COOKIE-messge-en");  ?>;
4402		*/
4403
4404		/*
4405		cookieWarn.init({
4406			styles: {
4407				"bg" : "#000000",
4408				"textColor": "#ffffff",
4409				"fontFamily": "worksans-r",
4410				"btnBg": "#ffffff",
4411				"btnTextColor": "#000000",
4412				"btnBorderRadius": "0px" 
4413		 	}
4414		});
4415		*/
4416
4417
4418		// Activation des hauteurs de iframe automatiques
4419		// iFrameResize({ log: true });
4420
4421
4422		// Scripts lancés SEULEMENT UNE FOIS QUE TOUTES LES IMAGES SONT CHARGEES
4423		$( 'body' ).imagesLoaded( function() {
4424
4425			// FIXED FOOTER si hauteur de fenêtre > hauteur du contenu
4426			//	fixed_footer('footer#footer');
4427
4428		});
4429
4430
4431		// On force AJAX ASYNC
4432        $.ajaxPrefilter( function( options, original_Options, jqXHR ) {
4433            options.async = true;
4434        });
4435
4436        // $('a').attr( 'href', '#' );
4437
4438	});
4439
4440
4441	// scripts spécifiques des PLUGINS
4442	/**
4443	 * Chargement des scripts des plugins
4444	**/
4445	 
4446	 
4447		//	require custom-theme-core/__custom-theme-core.js 			// plugin CUSTOM THEME CORE
4448	
4449		/**
4450	
4451		 * Scripts spécifiques du plugin WOO COMMERCE
4452	
4453		 */
4454	
4455		
4456	
4457			//	require utils.js
4458	
4459			//	require common.js
4460	
4461		
4462	
4463		
4464	
4465		//-------------------------------------------------------//
4466	
4467		// Surcharge des comportements par défaut de WooCommerce //
4468	
4469		//-------------------------------------------------------//
4470	
4471			//	require override/__override.js
4472	
4473		
4474	
4475		
4476	
4477		// Import des scripts spécifiques du PLUGIN SO-WIDGETS-BUNDLE-CUSTOM
4478	
4479			//	require widgets/header-cart.js
4480	
4481			//	require widgets/navigation.js
4482	
4483		//	require woocommerce-wishlists/__woocommerce-wishlists.js 	// plugin YITH WOOCOMMERCE WISHLIST

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.