PageSourceSearch

https://www.bestinver.es/wp-content/themes/bstnvr/js/style.js?ver=1.0

js bestinver.es collected 2026-09-24 17:17:32 UTC 268,860 bytes, 6,213 lines download raw bytes

1(function e(t, n, r) { function s(o, u) { if (!n[o]) { if (!t[o]) { var a = typeof require == "function" && require; if (!u && a) return a(o, !0); if (i) return i(o, !0); var f = new Error("Cannot find module '" + o + "'"); throw f.code = "MODULE_NOT_FOUND", f } var l = n[o] = { exports: {} }; t[o][0].call(l.exports, function (e) { var n = t[o][1][e]; return s(n ? n : e) }, l, l.exports, e, t, n, r) } return n[o].exports } var i = typeof require == "function" && require; for (var o = 0; o < r.length; o++)s(r[o]); return s })({
2    1: [function (require, module, exports) {
3        (function (a) { if (typeof define === "function" && define.amd && define.amd.jQuery) { define(["jquery"], a) } else { a(jQuery) } }(function (f) { var p = "left", o = "right", e = "up", x = "down", c = "in", z = "out", m = "none", s = "auto", l = "swipe", t = "pinch", A = "tap", j = "doubletap", b = "longtap", y = "hold", D = "horizontal", u = "vertical", i = "all", r = 10, g = "start", k = "move", h = "end", q = "cancel", a = "ontouchstart" in window, v = window.navigator.msPointerEnabled && !window.navigator.pointerEnabled, d = window.navigator.pointerEnabled || window.navigator.msPointerEnabled, B = "TouchSwipe"; var n = { fingers: 1, threshold: 75, cancelThreshold: null, pinchThreshold: 20, maxTimeThreshold: null, fingerReleaseThreshold: 250, longTapThreshold: 500, doubleTapThreshold: 200, swipe: null, swipeLeft: null, swipeRight: null, swipeUp: null, swipeDown: null, swipeStatus: null, pinchIn: null, pinchOut: null, pinchStatus: null, click: null, tap: null, doubleTap: null, longTap: null, hold: null, triggerOnTouchEnd: true, triggerOnTouchLeave: false, allowPageScroll: "auto", fallbackToMouseEvents: true, excludedElements: "label, button, input, select, textarea, a, .noSwipe", preventDefaultEvents: true }; f.fn.swipe = function (G) { var F = f(this), E = F.data(B); if (E && typeof G === "string") { if (E[G]) { return E[G].apply(this, Array.prototype.slice.call(arguments, 1)) } else { f.error("Method " + G + " does not exist on jQuery.swipe") } } else { if (!E && (typeof G === "object" || !G)) { return w.apply(this, arguments) } } return F }; f.fn.swipe.defaults = n; f.fn.swipe.phases = { PHASE_START: g, PHASE_MOVE: k, PHASE_END: h, PHASE_CANCEL: q }; f.fn.swipe.directions = { LEFT: p, RIGHT: o, UP: e, DOWN: x, IN: c, OUT: z }; f.fn.swipe.pageScroll = { NONE: m, HORIZONTAL: D, VERTICAL: u, AUTO: s }; f.fn.swipe.fingers = { ONE: 1, TWO: 2, THREE: 3, ALL: i }; function w(E) { if (E && (E.allowPageScroll === undefined && (E.swipe !== undefined || E.swipeStatus !== undefined))) { E.allowPageScroll = m } if (E.click !== undefined && E.tap === undefined) { E.tap = E.click } if (!E) { E = {} } E = f.extend({}, f.fn.swipe.defaults, E); return this.each(function () { var G = f(this); var F = G.data(B); if (!F) { F = new C(this, E); G.data(B, F) } }) } function C(a4, av) { var az = (a || d || !av.fallbackToMouseEvents), J = az ? (d ? (v ? "MSPointerDown" : "pointerdown") : "touchstart") : "mousedown", ay = az ? (d ? (v ? "MSPointerMove" : "pointermove") : "touchmove") : "mousemove", U = az ? (d ? (v ? "MSPointerUp" : "pointerup") : "touchend") : "mouseup", S = az ? null : "mouseleave", aD = (d ? (v ? "MSPointerCancel" : "pointercancel") : "touchcancel"); var ag = 0, aP = null, ab = 0, a1 = 0, aZ = 0, G = 1, aq = 0, aJ = 0, M = null; var aR = f(a4); var Z = "start"; var W = 0; var aQ = null; var T = 0, a2 = 0, a5 = 0, ad = 0, N = 0; var aW = null, af = null; try { aR.bind(J, aN); aR.bind(aD, a9) } catch (ak) { f.error("events not supported " + J + "," + aD + " on jQuery.swipe") } this.enable = function () { aR.bind(J, aN); aR.bind(aD, a9); return aR }; this.disable = function () { aK(); return aR }; this.destroy = function () { aK(); aR.data(B, null); aR = null }; this.option = function (bc, bb) { if (av[bc] !== undefined) { if (bb === undefined) { return av[bc] } else { av[bc] = bb } } else { f.error("Option " + bc + " does not exist on jQuery.swipe.options") } return null }; function aN(bd) { if (aB()) { return } if (f(bd.target).closest(av.excludedElements, aR).length > 0) { return } var be = bd.originalEvent ? bd.originalEvent : bd; var bc, bb = a ? be.touches[0] : be; Z = g; if (a) { W = be.touches.length } else { bd.preventDefault() } ag = 0; aP = null; aJ = null; ab = 0; a1 = 0; aZ = 0; G = 1; aq = 0; aQ = aj(); M = aa(); R(); if (!a || (W === av.fingers || av.fingers === i) || aX()) { ai(0, bb); T = at(); if (W == 2) { ai(1, be.touches[1]); a1 = aZ = au(aQ[0].start, aQ[1].start) } if (av.swipeStatus || av.pinchStatus) { bc = O(be, Z) } } else { bc = false } if (bc === false) { Z = q; O(be, Z); return bc } else { if (av.hold) { af = setTimeout(f.proxy(function () { aR.trigger("hold", [be.target]); if (av.hold) { bc = av.hold.call(aR, be, be.target) } }, this), av.longTapThreshold) } ao(true) } return null } function a3(be) { var bh = be.originalEvent ? be.originalEvent : be;
3 if (Z === h || Z === q || am()) { return } var bd, bc = a ? bh.touches[0] : bh; var bf = aH(bc); a2 = at(); if (a) { W = bh.touches.length } if (av.hold) { clearTimeout(af) } Z = k; if (W == 2) { if (a1 == 0) { ai(1, bh.touches[1]); a1 = aZ = au(aQ[0].start, aQ[1].start) } else { aH(bh.touches[1]); aZ = au(aQ[0].end, aQ[1].end); aJ = ar(aQ[0].end, aQ[1].end) } G = a7(a1, aZ); aq = Math.abs(a1 - aZ) } if ((W === av.fingers || av.fingers === i) || !a || aX()) { aP = aL(bf.start, bf.end); al(be, aP); ag = aS(bf.start, bf.end); ab = aM(); aI(aP, ag); if (av.swipeStatus || av.pinchStatus) { bd = O(bh, Z) } if (!av.triggerOnTouchEnd || av.triggerOnTouchLeave) { var bb = true; if (av.triggerOnTouchLeave) { var bg = aY(this); bb = E(bf.end, bg) } if (!av.triggerOnTouchEnd && bb) { Z = aC(k) } else { if (av.triggerOnTouchLeave && !bb) { Z = aC(h) } } if (Z == q || Z == h) { O(bh, Z) } } } else { Z = q; O(bh, Z) } if (bd === false) { Z = q; O(bh, Z) } } function L(bb) { var bc = bb.originalEvent; if (a) { if (bc.touches.length > 0) { F(); return true } } if (am()) { W = ad } a2 = at(); ab = aM(); if (ba() || !an()) { Z = q; O(bc, Z) } else { if (av.triggerOnTouchEnd || (av.triggerOnTouchEnd == false && Z === k)) { bb.preventDefault(); Z = h; O(bc, Z) } else { if (!av.triggerOnTouchEnd && a6()) { Z = h; aF(bc, Z, A) } else { if (Z === k) { Z = q; O(bc, Z) } } } } ao(false); return null } function a9() { W = 0; a2 = 0; T = 0; a1 = 0; aZ = 0; G = 1; R(); ao(false) } function K(bb) { var bc = bb.originalEvent; if (av.triggerOnTouchLeave) { Z = aC(h); O(bc, Z) } } function aK() { aR.unbind(J, aN); aR.unbind(aD, a9); aR.unbind(ay, a3); aR.unbind(U, L); if (S) { aR.unbind(S, K) } ao(false) } function aC(bf) { var be = bf; var bd = aA(); var bc = an(); var bb = ba(); if (!bd || bb) { be = q } else { if (bc && bf == k && (!av.triggerOnTouchEnd || av.triggerOnTouchLeave)) { be = h } else { if (!bc && bf == h && av.triggerOnTouchLeave) { be = q } } } return be } function O(bd, bb) { var bc = undefined; if ((I() || V()) || (P() || aX())) { if (I() || V()) { bc = aF(bd, bb, l) } if ((P() || aX()) && bc !== false) { bc = aF(bd, bb, t) } } else { if (aG() && bc !== false) { bc = aF(bd, bb, j) } else { if (ap() && bc !== false) { bc = aF(bd, bb, b) } else { if (ah() && bc !== false) { bc = aF(bd, bb, A) } } } } if (bb === q) { a9(bd) } if (bb === h) { if (a) { if (bd.touches.length == 0) { a9(bd) } } else { a9(bd) } } return bc } function aF(be, bb, bd) { var bc = undefined; if (bd == l) { aR.trigger("swipeStatus", [bb, aP || null, ag || 0, ab || 0, W, aQ]); if (av.swipeStatus) { bc = av.swipeStatus.call(aR, be, bb, aP || null, ag || 0, ab || 0, W, aQ); if (bc === false) { return false } } if (bb == h && aV()) { aR.trigger("swipe", [aP, ag, ab, W, aQ]); if (av.swipe) { bc = av.swipe.call(aR, be, aP, ag, ab, W, aQ); if (bc === false) { return false } } switch (aP) { case p: aR.trigger("swipeLeft", [aP, ag, ab, W, aQ]); if (av.swipeLeft) { bc = av.swipeLeft.call(aR, be, aP, ag, ab, W, aQ) } break; case o: aR.trigger("swipeRight", [aP, ag, ab, W, aQ]); if (av.swipeRight) { bc = av.swipeRight.call(aR, be, aP, ag, ab, W, aQ) } break; case e: aR.trigger("swipeUp", [aP, ag, ab, W, aQ]); if (av.swipeUp) { bc = av.swipeUp.call(aR, be, aP, ag, ab, W, aQ) } break; case x: aR.trigger("swipeDown", [aP, ag, ab, W, aQ]); if (av.swipeDown) { bc = av.swipeDown.call(aR, be, aP, ag, ab, W, aQ) } break } } } if (bd == t) { aR.trigger("pinchStatus", [bb, aJ || null, aq || 0, ab || 0, W, G, aQ]); if (av.pinchStatus) { bc = av.pinchStatus.call(aR, be, bb, aJ || null, aq || 0, ab || 0, W, G, aQ); if (bc === false) { return false } } if (bb == h && a8()) { switch (aJ) { case c: aR.trigger("pinchIn", [aJ || null, aq || 0, ab || 0, W, G, aQ]); if (av.pinchIn) { bc = av.pinchIn.call(aR, be, aJ || null, aq || 0, ab || 0, W, G, aQ) } break; case z: aR.trigger("pinchOut", [aJ || null, aq || 0, ab || 0, W, G, aQ]); if (av.pinchOut) { bc = av.pinchOut.call(aR, be, aJ || null, aq || 0, ab || 0, W, G, aQ) } break } } } if (bd == A) { if (bb === q || bb === h) { clearTimeout(aW); clearTimeout(af); if (Y() && !H()) { N = at(); aW = setTimeout(f.proxy(function () { N = null; aR.trigger("tap", [be.target]); if (av.tap) { bc = av.tap.call(aR, be, be.target) } }, this), av.doubleTapThreshold) } else { N = null; aR.trigger("tap", [be.target]); if (av.tap) { bc = av.tap.call(aR, be, be.target) } } } } else { if (bd == j) { if (bb === q || bb === h) { clearTimeout(aW); N = null; aR.trigger("doubletap", [be.target]); if (av.doubleTap) { bc = av.doubleTap.call(aR, be, be.target) } } } else { if (bd == b) { if (bb === q || bb === h) { clearTimeout(aW); N = null; aR.trigger("longtap", [be.target]); if (av.longTap) { bc = av.longTap.call(aR, be, be.target) } } } } } return bc } function an() { var bb = true; if (av.threshold !== null) { bb = ag >= av.threshold } return bb } function ba() { var bb = false;
3 if (av.cancelThreshold !== null && aP !== null) { bb = (aT(aP) - ag) >= av.cancelThreshold } return bb } function ae() { if (av.pinchThreshold !== null) { return aq >= av.pinchThreshold } return true } function aA() { var bb; if (av.maxTimeThreshold) { if (ab >= av.maxTimeThreshold) { bb = false } else { bb = true } } else { bb = true } return bb } function al(bb, bc) { if (av.preventDefaultEvents === false) { return } if (av.allowPageScroll === m) { bb.preventDefault() } else { var bd = av.allowPageScroll === s; switch (bc) { case p: if ((av.swipeLeft && bd) || (!bd && av.allowPageScroll != D)) { bb.preventDefault() } break; case o: if ((av.swipeRight && bd) || (!bd && av.allowPageScroll != D)) { bb.preventDefault() } break; case e: if ((av.swipeUp && bd) || (!bd && av.allowPageScroll != u)) { bb.preventDefault() } break; case x: if ((av.swipeDown && bd) || (!bd && av.allowPageScroll != u)) { bb.preventDefault() } break } } } function a8() { var bc = aO(); var bb = X(); var bd = ae(); return bc && bb && bd } function aX() { return !!(av.pinchStatus || av.pinchIn || av.pinchOut) } function P() { return !!(a8() && aX()) } function aV() { var be = aA(); var bg = an(); var bd = aO(); var bb = X(); var bc = ba(); var bf = !bc && bb && bd && bg && be; return bf } function V() { return !!(av.swipe || av.swipeStatus || av.swipeLeft || av.swipeRight || av.swipeUp || av.swipeDown) } function I() { return !!(aV() && V()) } function aO() { return ((W === av.fingers || av.fingers === i) || !a) } function X() { return aQ[0].end.x !== 0 } function a6() { return !!(av.tap) } function Y() { return !!(av.doubleTap) } function aU() { return !!(av.longTap) } function Q() { if (N == null) { return false } var bb = at(); return (Y() && ((bb - N) <= av.doubleTapThreshold)) } function H() { return Q() } function ax() { return ((W === 1 || !a) && (isNaN(ag) || ag < av.threshold)) } function a0() { return ((ab > av.longTapThreshold) && (ag < r)) } function ah() { return !!(ax() && a6()) } function aG() { return !!(Q() && Y()) } function ap() { return !!(a0() && aU()) } function F() { a5 = at(); ad = event.touches.length + 1 } function R() { a5 = 0; ad = 0 } function am() { var bb = false; if (a5) { var bc = at() - a5; if (bc <= av.fingerReleaseThreshold) { bb = true } } return bb } function aB() { return !!(aR.data(B + "_intouch") === true) } function ao(bb) { if (bb === true) { aR.bind(ay, a3); aR.bind(U, L); if (S) { aR.bind(S, K) } } else { aR.unbind(ay, a3, false); aR.unbind(U, L, false); if (S) { aR.unbind(S, K, false) } } aR.data(B + "_intouch", bb === true) } function ai(bc, bb) { var bd = bb.identifier !== undefined ? bb.identifier : 0; aQ[bc].identifier = bd; aQ[bc].start.x = aQ[bc].end.x = bb.pageX || bb.clientX; aQ[bc].start.y = aQ[bc].end.y = bb.pageY || bb.clientY; return aQ[bc] } function aH(bb) { var bd = bb.identifier !== undefined ? bb.identifier : 0; var bc = ac(bd); bc.end.x = bb.pageX || bb.clientX; bc.end.y = bb.pageY || bb.clientY; return bc } function ac(bc) { for (var bb = 0; bb < aQ.length; bb++) { if (aQ[bb].identifier == bc) { return aQ[bb] } } } function aj() { var bb = []; for (var bc = 0; bc <= 5; bc++) { bb.push({ start: { x: 0, y: 0 }, end: { x: 0, y: 0 }, identifier: 0 }) } return bb } function aI(bb, bc) { bc = Math.max(bc, aT(bb)); M[bb].distance = bc } function aT(bb) { if (M[bb]) { return M[bb].distance } return undefined } function aa() { var bb = {}; bb[p] = aw(p); bb[o] = aw(o); bb[e] = aw(e); bb[x] = aw(x); return bb } function aw(bb) { return { direction: bb, distance: 0 } } function aM() { return a2 - T } function au(be, bd) { var bc = Math.abs(be.x - bd.x); var bb = Math.abs(be.y - bd.y); return Math.round(Math.sqrt(bc * bc + bb * bb)) } function a7(bb, bc) { var bd = (bc / bb) * 1; return bd.toFixed(2) } function ar() { if (G < 1) { return z } else { return c } } function aS(bc, bb) { return Math.round(Math.sqrt(Math.pow(bb.x - bc.x, 2) + Math.pow(bb.y - bc.y, 2))) } function aE(be, bc) { var bb = be.x - bc.x; var bg = bc.y - be.y; var bd = Math.atan2(bg, bb); var bf = Math.round(bd * 180 / Math.PI); if (bf < 0) { bf = 360 - Math.abs(bf) } return bf } function aL(bc, bb) { var bd = aE(bc, bb); if ((bd <= 45) && (bd >= 0)) { return p } else { if ((bd <= 360) && (bd >= 315)) { return p } else { if ((bd >= 135) && (bd <= 225)) { return o } else { if ((bd > 45) && (bd < 135)) { return x } else { return e } } } } } function at() { var bb = new Date(); return bb.getTime() } function aY(bb) { bb = f(bb); var bd = bb.offset(); var bc = { left: bd.left, right: bd.left + bb.outerWidth(), top: bd.top, bottom: bd.top + bb.outerHeight() }; return bc } function E(bb, bc) { return (bb.x > bc.left && bb.x < bc.right && bb.y > bc.top && bb.y < bc.bottom) } } }));
4    }, {}
4], 2: [function (require, module, exports) {
5        /*======================================================================*/
6        /* DEPENDENCIAS                                                         */
7        /*======================================================================*/
8        var onResize = require('./partials/onResize'),
9            onReady = require('./partials/onReady'),
10            onLoad = require('./partials/onLoad'),
11            onScroll = require('./partials/onScroll'),
12            grid = require('./modules/grid'),
13            detectBrowser = require('./modules/detectBrowser'),
14            detectBreakpoint = require('./modules/detectBreakpoint'),
15            detectTouchDevice = require('./modules/detectTouchDevice'),
16            lightbox = require('./modules/lightbox'),
17            slider = require('./modules/slider'),
18            header = require('./modules/header'),
19            footer = require('./modules/footer'),
20            tooltips = require('./modules/tooltips'),
21            forms = require('./modules/forms'),
22            moduleRegistrationHeader = require('./modules/module-registration-header'),
23            popupGeneralCtaAccess = require('./modules/popup-general-cta-access'),
24            commons = require('./modules/commons'),
25            moduleGraphics = require('./modules/module-graphics'),
26            moduleProductDistributor = require('./modules/module-product-distributor'),
27            moduleArticlesDistributor = require('./modules/module-articlesDistributor'),
28            moduleHomeHeader = require('./modules/module-home-header'),
29            moduleHeader = require('./modules/module-header'),
30            moduleMediaDistributor = require('./modules/module-mediaDistributor'),
31            moduleTeamDistributor = require('./modules/module-team-distributor'),
32            moduleHightlightedAdvantagesDistributor = require('./modules/module-highlighted-advantages-distributor'),
33            moduleTable = require('./modules/module-table'),
34            moduleProductMenu = require('./modules/module-product-menu'),
35            moduleListDistributor = require('./modules/module-list-distributor'),
36            modulePagination = require('./modules/module-pagination'),
37            moduleProductResume = require('./modules/module-product-resume'),
38            moduleAccordion = require('./modules/module-accordion');
39        moduleTeam = require('./modules/module-team'),
40            moduleHistoryPagination = require('./modules/module-history-pagination'),
41            moduleContactMap = require('./modules/module-contact-map'),
42            moduleGlossaryTerms = require('./modules/module-glossary-terms'),
43            moduleSearch = require('./modules/module-search'),
44            moduleContactForm = require('./modules/module-contact-form'),
45            moduleTeamDetail = require('./modules/module-team-detail'),
46            popupHelp = require('./modules/popup-help');
47
48        /*======================================================================*/
49        /* ON READY                                                             */
50        /*======================================================================*/
51        function onReadyFunctions() {
52
53            // Basics
54            grid.paintGrid();
55            detectBrowser.detect();
56            detectTouchDevice.detect();
57
58            // Lightbox
59            lightbox.init();
60            lightbox.ajax('.ajaxLightbox');
61            lightbox.iframe('.iframeLightbox');
62            lightbox.image('.imageLightbox');
63            lightbox.team('.teamLightbox');
64
65            // Common
66            header.init();
67            footer.init();
68            tooltips.init();
69            forms.init();
70            commons.init();
71
72            // Modules
73            moduleRegistrationHeader.init();
74            moduleProductDistributor.init();
75            moduleArticlesDistributor.init();
76            moduleMediaDistributor.init();
77            moduleGraphics.init();
78            moduleHomeHeader.init();
79            moduleHeader.init();
80            moduleTeamDistributor.init();
81            moduleHightlightedAdvantagesDistributor.init();
82            moduleTable.init();
83            moduleProductMenu.init();
84            moduleListDistributor.init();
85            modulePagination.init();
86            moduleProductResume.init();
87            moduleAccordion.init();
88            moduleTeam.init();
89            moduleHistoryPagination.init();
90            moduleContactMap.init();
91            moduleGlossaryTerms.init();
92            moduleSearch.init();
93            moduleContactForm.init();
94            moduleTeamDetail.init();
95
96            // Popups
97            popupGeneralCtaAccess.init();
98            popupHelp.init();
99
100        }
101        onReady(onReadyFunctions);
102
103        /*======================================================================*/
104        /* ON LOAD                                                              */
105        /*======================================================================*/
106
107        /*======================================================================*/
108        /* ON RESIZE                                                            */
109        /*======================================================================*/
110        function onResizeFunctions() {
111
112            // Common
113            header.resize();
114            forms.resize();
115            commons.resizePath();
116
117            // Lightbox
118
119            // Modules
120            moduleProductDistributor.resize();
121            moduleArticlesDistributor.resize();
122            moduleHomeHeader.resize();
123            moduleHeader.resize();
124            moduleMediaDistributor.resize();
125            moduleListDistributor.resize();
126            moduleAccordion.resize();
127            moduleProductResume.resize();
128            moduleTeamDistributor.resize();
129
130            // Popups
131
132        }
133        onResize(onResizeFunctions);
134
135
136        /*======================================================================*/
137        /* ON SCROLL                                                            */
138        /*======================================================================*/
139        function onScrollFunctions() {
140
141            // Common
142            header.scroll();
143            commons.scroller();
144
145            // Modules
146            moduleRegistrationHeader.scroller();
147            moduleHomeHeader.scroller();
148            moduleHeader.scroller();
149            moduleProductMenu.scroller();
150            moduleGlossaryTerms.scroller();
151
152            // Animations
153
154        }
155        onScroll(onScrollFunctions);
156
157    }, { "./modules/commons": 3, "./modules/detectBreakpoint": 4, "./modules/detectBrowser": 5, "./modules/detectTouchDevice": 6, "./modules/footer": 7, "./modules/forms": 8, "./modules/grid": 9, "./modules/header": 10, "./modules/lightbox": 11, "./modules/module-accordion": 12, "./modules/module-articlesDistributor": 13, "./modules/module-contact-form": 14, "./modules/module-contact-map": 15, "./modules/module-glossary-terms": 16, "./modules/module-graphics": 17, "./modules/module-header": 18, "./modules/module-highlighted-advantages-distributor": 19, "./modules/module-history-pagination": 20, "./modules/module-home-header": 21, "./modules/module-list-distributor": 22, "./modules/module-mediaDistributor": 23, "./modules/module-pagination": 24, "./modules/module-product-distributor": 25, "./modules/module-product-menu": 26, "./modules/module-product-resume": 27, "./modules/module-registration-header": 28, "./modules/module-search": 29, "./modules/module-table": 30, "./modules/module-team": 33, "./modules/module-team-detail": 31, "./modules/module-team-distributor": 32, "./modules/popup-general-cta-access": 34, "./modules/popup-help": 35, "./modules/slider": 36, "./modules/tooltips": 37, "./partials/onLoad": 38, "./partials/onReady": 39, "./partials/onResize": 40, "./partials/onScroll": 41 }], 3: [function (require, module, exports) {
158        /* ---------------------------------------------------------------------------
159        
160        Commons
161        
162        --------------------------------------------------------------------------- */
163        var $button,
164            $close,
165            $sendContact,
166            $headerModules,
167            timer;
168
169        var commons = new function () {
170
171            return {
172
173                init: function () {
174                    $headerModules = jQuery('.module-home-header, .module-header');
175
176                    commons.setMainButtons();
177                },
178
179                // get max height elements
180                getMaxHeight: function (obj) {
181                    var heights = obj.map(function () {
182                        return jQuery(this).outerHeight(true);
183                    }).get(),
184                        maxHeight = Math.max.apply(null, heights);
185                    return maxHeight
186                },
187
188                // destroy carousel
189                deleteCarousel: function (obj) {
190                    var $objCarousel = obj
191                    if ($objCarousel.length) {
192                        $objCarousel.slick('unslick');
193                    }
194                },
195
196                // get current grid data
197                getGrid: function (contentWidth, cols) {
198                    var column = document.querySelector('.grid .grid_wrapper > span:nth-child(2)');
199                    var columnStyle = window.getComputedStyle(column);
200
201                    return {
202                        width: column.clientWidth,
203                        margin: parseFloat(columnStyle.getPropertyValue('margin-left'))
204                    }
205                },
206
207                setCarouselGrid: function (module) {
208                    var modules = document.querySelectorAll(module);
209
210                    [].forEach.call(modules, function (object) {
211                        var list = object.querySelector('.slick-list');
212                        var carousel = object.querySelector('.module_carousel');
213
214                        if (modules != null) {
215                            var items = carousel.querySelectorAll('.module_carousel_item');
216
217                            [].forEach.call(items, function (item) {
218                                item.style.marginRight = commons.getGrid().margin / 2 + 'px';
219                                item.style.marginLeft = commons.getGrid().margin / 2 + 'px';
220                            });
221
222                            list.style.marginRight = -commons.getGrid().margin / 2 + 'px';
223                            list.style.marginLeft = -commons.getGrid().margin / 2 + 'px';
224
225                            jQuery(carousel).slick('setPosition');
226                        }
227                    });
228                },
229                resizePath: function () {
230
231                    clearTimeout(timer);
232
233                    // Para los módulos cabecera y cabecera home, calculamos la altura y margen del path y lo aplicamos como margen negativo al módulo
234                    if ($headerModules.length > 0) {
235
236                        timer = setTimeout(function () {
237
238                            var $path = jQuery('.page_head'),
239                                margin = -($path.outerHeight() + parseInt($path.css('margin-top')));
240
241                            $path
242                                .next('.module-home-header, .module-header')
243                                .css('margin-top', margin);
244
245                        }, 200);
246
247                    }
248
249                },
250                setMainButtons: function () {
251
252                    // Gestionamos el comportamiento de los botones que aparecen fijos de la web de c2c y chat
253                    $button = jQuery('#click_to_call_button');
254                    $sendContact = jQuery('.sendContact');
255                    $close = $button
256                        .siblings('.button-list')
257                        .find('.button-close_main');
258                    if($button){
259                        $button.on('click', function () {
260
261                            $button.toggleClass('open');
262    
263                        });
264    
265                    }
266                    if($close){
267                        $close.on('click', function () {
268
269                            $button.removeClass('open');
270    
271                        });
272
273                    }
274                    
275                    jQuery('body').on('click', '.sendContact', function () {
276                        jQuery('.popup-contact').addClass('popup-success');
277                    });
278
279                    jQuery('body').on('click', function (e) {
280
281                        var $target = jQuery(e.target),
282                            $buttons = $target.closest('.main-buttons');
283
284                        if ($buttons.length <= 0) {
285
286                            $button.removeClass('open');
287
288                        }
289
290                    });
291
292                },
293                scroller: function () {
294
295                    // Al hacer scroll cerramos los botones fijos
296                    if ($button === undefined || $button.length <= 0) {
297                        return false;
298                    }
299
300                    $button.removeClass('open');
301
302
303                }
304            };
305        }
306
307        module.exports = commons;
308
309    }, {}
309], 4: [function (require, module, exports) {
310        /* -------------------------------------------------------
311        
312        Este módulo se encarga de detectar el ancho de la pantalla 
313        y añadir ciertas clases en los breakpoint que definamos
314        
315        ------------------------------------------------------- */
316
317        var detectBreakpoint = new function () {
318            /*------------------ RWD Breakpoints ------------------*/
319
320            var phone_max_width = 580;
321            var tablet_max_width = 768;
322
323            /*------------------ Constants ------------------*/
324
325            var isPhoneDevice = false;
326            var isTabletDevice = false;
327            var isDesktopDevice = false;
328
329            return {
330                detect: function () {
331                    /*------------------ Window dimensions ------------------*/
332
333                    var window_width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
334
335                    if (window_width <= phone_max_width) {
336                        if (jQuery('body').hasClass('tabletDevice')) {
337                            jQuery('body').removeClass('tabletDevice');
338                        }
339                        jQuery('body').addClass('phoneDevice');
340                        isPhoneDevice = true;
341                        isTabletDevice = false;
342                        isDesktopDevice = false;
343                    } else {
344                        if (window_width <= tablet_max_width) {
345                            if (jQuery('body').hasClass('desktopDevice') || jQuery('body').hasClass('phoneDevice')) {
346                                jQuery('body').removeClass('desktopDevice phoneDevice');
347                            }
348                            jQuery('body').addClass('tabletDevice');
349                            isPhoneDevice = false;
350                            isTabletDevice = true;
351                            isDesktopDevice = false;
352                        } else {
353                            if (jQuery('body').hasClass('tabletDevice')) {
354                                jQuery('body').removeClass('tabletDevice');
355                            }
356                            jQuery('body').addClass('desktopDevice');
357                            isPhoneDevice = false;
358                            isTabletDevice = false;
359                            isDesktopDevice = true;
360                        }
361                    }
362                }
363            };
364        }
365
366        module.exports = detectBreakpoint;
367    }, {}], 5: [function (require, module, exports) {
368        /* -------------------------------------------------------
369        
370        Este módulo se encarga de detectar con que explorador se
371        está visualizando y se añaden clases específicas:
372        
373        - "ie8" para Internet explorer 8
374        - "ie9" para Internet explorer 9
375        - "ff" para Firefox
376        - "iOS" para safari de iOS
377        - "criOS" para chrome de iOS
378        
379        ------------------------------------------------------- */
380
381        var detectBrowser = new function () {
382            return {
383                detect: function () {
384                    // IE11
385                    if (navigator.appVersion.indexOf('Trident/') > 0) {
386                        jQuery('body').addClass('ie11');
387                    }
388
389                    // Microsoft surface
390                    if (navigator.userAgent.indexOf('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586') > -1) {
391                        jQuery('body').addClass('ms');
392                    }
393
394                    // Microsoft surface
395                    if (window.navigator.userAgent.indexOf("Edge") > -1) {
396                        jQuery('body').addClass('edge');
397                    }
398
399                    // Firefox
400                    if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
401                        jQuery('body').addClass('ff');
402                    }
403
404                    // Android
405                    var android = navigator.userAgent.toLowerCase().match(/android\s([1-4\.]*)/);
406                    if (android) {
407                        jQuery('body').addClass('android');
408                    }
409
410                    // Windows phone
411                    var iePhone = navigator.userAgent.match(/Windows Phone/i) || navigator.userAgent.match(/iemobile/i);
412                    if (iePhone) {
413                        jQuery('body').addClass('iePhone');
414                    }
415
416                    // Safari
417                    var safari = navigator.userAgent.toLowerCase().indexOf('safari/') > -1;
418                    if (safari) {
419                        if (navigator.userAgent.toLowerCase().indexOf('chrome') <= -1) {
420                            jQuery('body').addClass('safari');
421                        }
422                    }
423
424                    // Remove min-height on iOS after slideshow initialization
425                    var iOS = (navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false);
426                    if (iOS) {
427                        jQuery('body').addClass('iOS');
428                    }
429
430                    // Chrome iOS
431                    var criOS = (navigator.userAgent.match('CriOS') ? true : false);
432                    if (criOS) {
433                        jQuery('body').addClass('criOS');
434                    }
435                }
436            };
437        }
438
439        module.exports = detectBrowser;
440    }, {}], 6: [function (require, module, exports) {
441        /* -------------------------------------------------------
442        
443        Este módulo se encarga de detectar si el dispositivo en el
444        que estamos cargando la web dispone de una pantalla tátil
445        
446        ------------------------------------------------------- */
447        var body,
448            is_touch_device;
449
450        var detectTouchDevice = new function () {
451            return {
452                detect: function () {
453
454                    body = jQuery('body');
455
456                    is_touch_device = 'ontouchstart' in document.documentElement;
457
458                    if (is_touch_device === true) {
459
460                        body.addClass('touchDevice');
461
462                    } else {
463
464                        body.addClass('noTouchDevice');
465
466                    }
467
468                    detectTouchDevice.mouseStart();
469                    detectTouchDevice.touchStart();
470
471                },
472                removeTouchClass: function () {
473
474                    if (body.hasClass('noTouchDevice') === false) {
475                        body.addClass('noTouchDevice');
476                        body.removeClass('touchDevice');
477                    }
478
479                },
480                addTouchClass: function () {
481
482                    if (body.hasClass('touchDevice') === false) {
483                        body.addClass('touchDevice');
484                        body.removeClass('noTouchDevice');
485                    }
486
487                },
488                mouseStart: function () {
489
490                    body.preventMouseMove = false;
491
492                    body.on('touchstart', function (e) {
493                        return body.preventMouseMove = true;
494                    });
495
496                    body.on('mousemove', function (e) {
497                        if (body.preventMouseMove === false) {
498                            detectTouchDevice.removeTouchClass();
499                        }
500                    });
501
502                    body.on('click', function (e) {
503                        body.preventMouseMove = false;
504                    });
505
506                },
507                touchStart: function () {
508
509                    body.on('touchstart', function () {
510                        detectTouchDevice.addTouchClass();
511                    });
512
513                }
514            };
515        }
516
517        module.exports = detectTouchDevice;
518    }, {}], 7: [function (require, module, exports) {
519        /* ---------------------------------------------------------------------------
520        
521        Footer
522        
523        --------------------------------------------------------------------------- */
524        var $footer,
525            $help,
526            $offices,
527            timer,
528            $subcontent,
529            subcontentHeight;
530
531        var footer = new function () {
532
533            return {
534                init: function () {
535
536                    $footer = jQuery('#footer');
537                    $help = $footer.find('.help');
538                    $offices = $footer.find('.footer_offices .footer_inner');
539
540                    footer.cloneElements();
541
542                },
543                cloneElements: function () {
544
545                    // Clonamos la lista de links de oficinas y la pegamos en las columnas de enlaces de encima
546                    var $newOffices = $offices
547                        .clone()
548                        .attr('class', 'footer_links-column cloned')
549                        .insertBefore($help)
550                        .find('.footer_offices-title')
551                        .attr('class', 'footer_links-title')
552                        .next('.footer_offices-list')
553                        .attr('class', 'footer_links-list')
554                        .find('.footer_offices-list_element')
555                        .attr('class', 'footer_links-list_element');
556
557                    // Asignamos las funcionalidades de cada botón
558                    footer.setElements();
559
560                },
561                setElements: function () {
562
563                    var $dropdown_buttons = $footer.find('.footer_links-title');
564
565                    $dropdown_buttons.on('click', function () {
566
567                        if (window.window_width > 1023) {
568                            return false;
569                        }
570
571                        clearTimeout(timer);
572
573                        var $button = jQuery(this),
574                            $el = $button.closest('.footer_links-column');
575
576                        if ($el.hasClass('open') === true) {
577                            footer.closeDropdown($el);
578                        } else {
579                            footer.openDropdown($el);
580                        }
581
582                    });
583
584                },
585                openDropdown: function ($el) {
586
587                    $el.addClass('open');
588
589                    $subcontent = $el.find('.footer_links-list'),
590                        subcontentHeight = $subcontent[0].scrollHeight;
591
592                    $subcontent.css('height', subcontentHeight);
593
594                    timer = setTimeout(function () {
595
596                        $subcontent.css('height', 'auto');
597
598                    }, 550);
599
600                },
601                closeDropdown: function ($el) {
602
603                    $el.removeClass('open');
604
605                    $subcontent = $el.find('.footer_links-list'),
606                        subcontentHeight = $subcontent[0].scrollHeight;
607
608                    $subcontent.css('height', subcontentHeight);
609
610                    timer = setTimeout(function () {
611
612                        $subcontent.css('height', 0);
613
614                    }, 10);
615
616                },
617            };
618        }
619
620        module.exports = footer;
621    }, {}
621], 8: [function (require, module, exports) {
622        /* ---------------------------------------------------------------------------
623        
624        Forms
625        
626        --------------------------------------------------------------------------- */
627        var $header,
628            $footer,
629            $form,
630            $login,
631            $resume,
632            $boxes,
633            $checkRadio,
634            $buttons,
635            $selects,
636            $files,
637            $removeFiles,
638            $steps,
639            timeoutDNI;
640
641        var forms = new function () {
642
643            return {
644                init: function () {
645
646                    $header = jQuery('#header'),
647                        $footer = jQuery('#footer'),
648                        $form = jQuery('.registration_form');
649                    $login = jQuery('.module-login-cri');
650                    $resume = jQuery('.registration_resume');
651                    $boxes = $form.find('.form_block.boxes');
652                    $checkRadio = $form.find('input[type="checkbox"], input[type="radio"]');
653                    $buttons = $form.find('button');
654                    $selects = $form.find('select');
655                    $files = $form.find('input[type="file"]');
656                    $removeFiles = $form.find('.remove_upload');
657                    $steps = jQuery('.module-registration-header');
658                    $epsvButton = jQuery('.showEpsvCustomResult')
659
660                    // Radios y checkbuttons
661                    forms.setChecksRadios();
662
663                    // Botones
664                    forms.setButtons();
665
666                    // Select
667                    forms.setSelects();
668
669                    // FILES
670                    forms.setFiles();
671
672                    // Cajas de formularios
673                    forms.setBoxes();
674
675                    // open epsv content
676                    $epsvButton.on('click', function () {
677                        forms.getRelativeContent($(this))
678                    })
679
680                    // Creamos función para forzar resize del formulario
681                    window.resizeResume = function () {
682                        forms.resizeForm();
683                    }
684
685                    // Creamos función para hacer scroll a la ID recibida
686                    window.scrollWindow = function (id) {
687
688                        var $element = jQuery('#' + id),
689                            $header = jQuery('.module-registration-header.fixed'),
690                            headerHeight = 0;
691
692                        if ($header !== undefined && $header.length > 0) {
693                            headerHeight = $header.height();
694                        }
695
696                        var posY = $element.offset().top - headerHeight - 50;
697
698                        jQuery('html, body').animate({
699                            scrollTop: posY
700                        }, 400);
701                    }
702
703                    // Creamos función para hacer scroll al primer error que se muestra en elementos la clase 'error_message' y que esté en display: block
704                    window.scrollError = function () {
705
706                        var $elements = jQuery('.error_message'),
707                            $header = jQuery('.module-registration-header.fixed'),
708                            headerHeight = 0,
709                            $element = undefined;
710
711                        if ($elements === undefined || $elements.length <= 0) {
712                            return false;
713                        }
714
715                        $elements.each(function (key, val) {
716
717                            var $el = jQuery(val);
718
719                            if ($el.css('display') === 'block' && $element === undefined) {
720                                $element = $el;
721
722                                return false;
723                            }
724
725                        });
726
727                        if ($header !== undefined && $header.length > 0) {
728                            headerHeight = $header.height();
729                        }
730
731                        var $parent = $element.closest('.form_block-content'),
732                            posY = $parent.offset().top - headerHeight - 20;
733
734                        jQuery('html, body').animate({
735                            scrollTop: posY
736                        }, 400);
737                    }
738
739                    // Esta función aplica el hide de jquery todos los elementos con clase 'error_message'
740                    window.clearScrollError = function () {
741
742                        var $elements = jQuery("span[class='error_message']"),
743                            $element = undefined;
744
745                        if ($elements === undefined || $elements.length <= 0) {
746                            return false;
747                        }
748
749                        $elements.each(function (key, val) {
750                            var $el = jQuery(val);
751                            $el.hide();
752                        });
753                    }
754
755                    // Esta función realiza un scroll automático de la página a la ID recibida en el tiempo que se recibe
756                    // Se utiliza para la funcionalidad de scan del DNI, en ocasiones tarda demasiado y desde el cliente quieren
757                    // poder mover al usuario a otras opciones si el tiempo que estimen se prolonga demasiado
758                    window.timerDNI = function (time, id) {
759                        timeoutDNI = setTimeout(function () {
760                            window.scrollWindow(id);
761                        }, time);
762                    }
763
764                    // Función para limpiar el timer anterior
765                    window.clearTimerDNI = function () {
766                        clearInterval(timeoutDNI);
767                    }
768
769                    function onElementHeightChange(elm, callback) {
770                        var lastHeight = elm.innerHeight(),
771                            newHeight;
772
773                        (function run() {
774                            newHeight = elm.innerHeight();
775
776                            if (lastHeight != newHeight) {
777                                callback();
778                                lastHeight = newHeight;
779                            }
780
781                            if (elm.onElementHeightChangeTimer) {
782                                clearTimeout(elm.onElementHeightChangeTimer);
783                            }
784
785                            elm.onElementHeightChangeTimer = setTimeout(run, 200);
786                        })();
787                    }
788
789                    // Cuando se modifica el tamaño del formulario de registro (porque se añadan nuevos elementos por ejemplo), se llama a la función resize del reusmen de formulario
790                    onElementHeightChange(jQuery('.registration_form'), function () {
791                        window.resizeResume();
792                    });
793
794                },
795                resize: function () {
796
797                    // Capa global del formulario
798                    forms.resizeForm();
799
800                    // Formularios con cajas
801                    forms.resizeBoxes();
802
803                },
804                setChecksRadios: function () {
805
806                    // Para cada chechbox/radio comprobamos si tienen el atributo data-relative
807                    // $checkRadio.each(function() {
808
809                    // 	var $input 		= jQuery(this),
810                    // 		relative 	= $input.attr('data-relative');
811
812                    // 	// Si no lo tiene, lo igualamos a un campo vacío
813                    // 	if (relative === undefined) {
814                    // 		relative = '';
815                    // 	}
816
817                    // 	// Al ser seleccionado mostramos el relativo y hacemos scroll a su posición si existe, ocultamos los demás
818                    // 	$input.on('change', function() {
819
820                    // 		forms.checkRelatives($input, relative);
821
822                    // 	});
823
824                    // });
825
826                    // Para cada chechbox/radio comprobamos si tienen el atributo data-relative
827                    jQuery('html').on('change', 'input[type="checkbox"], input[type="radio"]', function () {
828
829                        var $input = jQuery(this),
830                            relative = $input.attr('data-relative');
831
832                        // Si no lo tiene, lo igualamos a un campo vacío
833                        if (relative === undefined) {
834                            relative = '';
835                        }
836
837                        forms.checkRelatives($input, relative);
838
839                    });
840
841                },
842                setButtons: function () {
843
844                    // Para cada botón comprobamos si tienen el atributo data-relative y data-hide
845                    $buttons.each(function () {
846
847                        var $button = jQuery(this),
848                            relative = $button.attr('data-relative'),
849                            hide = $button.attr('data-hide');
850
851                        if (relative !== undefined) {
852
853                            $button.on('click', function () {
854                                // Si lo tiene, al ser seleccionado mostramos el relativo y hacemos scroll a su posición
855                                forms.checkRelatives($button, relative, hide);
856
857                            });
858
859                        }
860
861                    });
862
863                },
864                setSelects: function () {
865
866                    // Para cada select comprobamos si la opción seleccionada tiene el atributo data-relative
867                    $selects.each(function () {
868
869                        var $select = jQuery(this);
870
871                        $select.on('change', function () {
872
873                            var $option = jQuery('option:selected', this),
874                                relative = $option.attr('data-relative');
875
876                            // Si no lo tiene, lo igualamos a un campo vacío
877                            if (relative === undefined) {
878                                relative = '';
879                            }
880
881                            // Al ser seleccionado mostramos el relativo y hacemos scroll a su posición
882                            forms.checkRelatives($select, relative);
883
884                        });
885
886                    });
887
888                },
889                setFiles: function () {
890
891                    // Gestionamos los input file para mostrar los archivos subidos
892                    jQuery('html').on('change', 'input[type="file"]', function () {
893
894                        var $input = jQuery(this),
895                            relative = $input.attr('data-relative'),
896                            length = this.files.length,
897                            id = $input.attr('id'),
898                            $label = jQuery('label[for="' + id + '"]'),
899                            $block = $input.closest('.form_block-content'),
900                            $list = $block.find('.upload_list'),
901                            inputsIds = $block.attr('data-extrainputs'),
902                            inputsLength;
903
904                        // Si no hay contenido en el input ocultamos la información del mismo
905                        if (length === 0) {
906
907                            return false;
908
909                        }
910
911                        if (inputsIds !== undefined) {
912
913                            // Dividimos las id de los demás inputs que se generan dinámicamente
914                            inputsIds = inputsIds.split(',');
915                            inputsLength = inputsIds.length;
916
917                            jQuery.each(inputsIds, function (key, val) {
918
919                                // buscamos el input dinámico con esta ID
920                                var $dynamicInput = jQuery('#' + val);
921
922                                // Si el campo existe pero está vacío, salimos del bucle
923                                if ($dynamicInput.length !== 0 && $dynamicInput.val() === '') {
924
925                                    $label.attr('for', val);
926
927                                    return false;
928                                }
929
930                                // Si no existe, lo creamos, y le damos la id como parámetro for al label
931                                if ($dynamicInput.length <= 0) {
932
933                                    var $fileInput = "<input type='file' id='" + val + "' name='" + val + "' accept='image/*' />";
934
935                                    $block.append($fileInput);
936
937                                    $label.attr('for', val);
938
939                                    return false;
940
941                                } else {
942                                    if (inputsLength === (key + 1)) {
943                                        $label.addClass('hidden');
944                                    }
945                                }
946
947                            });
948
949                        } else {
950
951                            $label.addClass('hidden');
952
953                        }
954
955                        // En caso contrario añadimos un li con el nombre correspondiente por cada archivo
956                        var name = this.files[0].name,
957                            $li = '<li><span>' + name + '</span><button class="remove_file" data-id="' + id + '""></button></li>';
958
959                        $list.append($li);
960
961                    });
962
963                    // Para borrar los archivos subidos
964                    jQuery('html').on('click', '.remove_file', function () { 
965
966                        var $button = jQuery(this),
967                            $li = $button.closest('li'),
968                            $block = $button.closest('.form_block-content'),
969                            id = $button.attr('data-id'),
970                            $input = $block.find('#' + id),
971                            $label = $block.find('.upload_label');
972
973                        // Eliminamos el elemento de la lista
974                        $li.remove();
975
976                        // Vaciamos el input
977                        $input.val('');
978
979                        // Quitamos la clase hidden al label ya que siempre se va a volver a mostrar pues queda un hueco libre y le asignamos la id que ha quedado al atributo for del label
980                        $label.removeClass('hidden');
981                        $label.attr('for', id);
982
983                    });
984
985                },
986                checkRelatives: function ($element, relative, hide) {
987           
988                    if(relative ==""){return null;}  
989
990        
991                    var relatives = relative.split(' '),
992                        name = $element.attr('name');
993              
994                    // Realizamos un split de un espacio a relative por si existen varios parámetros a mostrar en este atributo
995                    if (name !== undefined && name !== null) {
996
997                        if ($element.is('input[type="checkbox"]') !== true) {
998
999                            // Recorremos todos los input correspondientes al modificado, buscamos su contenido relativo y lo ocultamos
1000                            jQuery('input[name="' + name + '"]').each(function () {
1001
1002                                var $el = jQuery(this),
1003                                    relatives = $el.attr('data-relative');
1004              
1005                                if (relatives !== undefined) {
1006
1007                                    relatives = relatives.split(' ');
1008
1009                                    $.each(relatives, function (key, val) {
1010
1011                                        var $relative = jQuery('#' + val);
1012
1013                                        $relative.css('display', 'none');
1014
1015                                    });
1016
1017                                }
1018
1019                            });
1020
1021                        }
1022
1023                    }
1024
1025                    $.each(relatives, function (key, val) {
1026                        
1027                        // Buscamos el elemento relativo mediante la ID ('#' + nombre relativo)
1028                        var $relative = jQuery('#' + val);
1029
1030                        if (hide === 'true') {
1031                            hide = true;
1032                        }
1033
1034                        // En caso que sea un select, buscamos el relativo de la o
1034ption
1035                        if ($element.is('select') === true) {
1036
1037                            var $options = $element.find('option');
1038
1039                            $options.each(function (key, val) {
1040
1041                                var $option = jQuery(val),
1042                                    relative = $option.attr('data-relative');
1043
1044                                if (relative !== undefined && relative !== null) {
1045
1046                                    var $relative = jQuery('#' + relative);
1047
1048                                    $relative.css('display', 'none');
1049
1050                                }
1051
1052                            });
1053
1054                        }
1055
1056                        // Si el input es el activo y existe su relacionado, mostramos su contenido por fadeIn y hacemos scroll del site a la posición del contenido relacionado
1057                        if (($element.is(':checked') === true || $element.is('button') === true || $element.is('select') === true) && $relative.length > 0) {
1058                         $relative.fadeIn(500); 
1059                            $relative.removeClass('hidden');
1060
1061                            var fixedHeader = jQuery('.module-registration-header.fixed'),
1062                                fixedHeaderHeight = fixedHeader.height();
1063
1064                            setTimeout(function () {
1065
1066                                var actualPosition = $element.offset().top,
1067                                    position = $relative.offset().top - fixedHeaderHeight - 149;
1068
1069                                // Si la posición del elemento relacionado respecto a la actual es mayor a 80 píxeles, movemos la pantalla a dicho punto. Si no lo mantenemos en el actual
1070                                if ((position - actualPosition) > 0 && key === 0) {
1071
1072                                    jQuery('html, body').animate({
1073                                        scrollTop: position
1074                                    });
1075
1076                                }
1077
1078                                // Si recibimos el atributo hide del elemento, lo ocultamos
1079                                if (hide === true) {
1080
1081                                    var $content = $element.closest('.form_block-content');
1082
1083                                    $content.addClass('hidden');
1084
1085                                }
1086
1087                                // Redimensionamos para que los elementos cojan la altura correcta
1088                                forms.resizeForm();
1089                                forms.resizeBoxes();
1090
1091                            }, 20);
1092
1093                            // Si el elemento es un checkbox, pero no esta seleccionado, ocultamos su relacionado
1094                        } else if ($element.is('input[type="checkbox"]') && $element.is(':checked') === false) {
1095                          
1096                            $relative.fadeOut(0);
1097                            $relative.addClass('hidden');
1098
1099                        }
1100
1101                    });
1102
1103                },
1104
1105                // open relative by button
1106                getRelativeContent: function (obj) {
1107                    var relative = obj.data('relative')
1108                    var fixedHeader = jQuery('.module-registration-header.fixed'),
1109                        fixedHeaderHeight = fixedHeader.height();
1110
1111                    $('#' + relative)
1112                        .fadeIn(500)
1113                        .removeClass('hidden');
1114
1115
1116                    setTimeout(function () {
1117
1118                        var position = $('#' + relative).offset().top - fixedHeaderHeight - 149;
1119
1120                        // Si la posición del elemento relacionado respecto a la actual es mayor a 80 píxeles, movemos la pantalla a dicho punto. Si no lo mantenemos en el actual
1121                        jQuery('html, body').animate({
1122                            scrollTop: position
1123                        });
1124
1125                    }, 20);
1126                },
1127
1128                setBoxes: function () {
1129
1130                    $boxes.each(function () {
1131
1132                        var $box = jQuery(this),
1133                            $inputs = $box.find('input[type="radio"]'),
1134                            $labels = $box.find('.radio_box-label'),
1135                            timer;
1136
1137                        // Comprobamos cada label para ver si tiene footer y modificar el padding inferior
1138                        $labels.each(function () {
1139
1140                            var $label = jQuery(this),
1141                                $footer = $label.find('.footer');
1142
1143                            if ($footer.length > 0) {
1144
1145                                clearTimeout(timer);
1146
1147                                $label.addClass('hasFooter');
1148
1149                                timer = setTimeout(function () {
1150                                    forms.resizeBoxes();
1151                                }, 200);
1152
1153                            }
1154
1155                        });
1156
1157                        // Comprobamos si ha de convertirse en select en smartphone
1158                        if ($box.hasClass('toSelect') === true) {
1159
1160                            var $select = $('<select class="boxes_select" />'),
1161                                selectInit,
1162                                name;
1163
1164                            seletTitle = $box.attr('data-selecttitle');
1165
1166                            // Creamos la primera opción con el título del atributo data-selecttitle
1167                            $('<option />', { text: seletTitle })
1168                                .appendTo($select);
1169
1170                            // Por cada input creamos un option con valor el índice+1 y texto el título
1171                            $inputs.each(function (key, val) {
1172
1173                                var $input = jQuery(this),
1174                                    title = $input
1175                                        .next('label')
1176                                        .find('.title')
1177                                        .text();
1178
1179                                name = $input.attr('name');
1180
1181                                $('<option />', { value: key, text: title })
1182                                    .appendTo($select);
1183
1184                            });
1185
1186                            // Damos de atributo nombre al selet el mismo que los radio con el sufijo -select
1187                            $select.attr('name', name + '-select');
1188                            $select
1189                                .find('option:not([value])')
1190                                .attr('disabled', 'disabled');
1191                            $select.appendTo($box);
1192
1193                            // Al cambiar de input seleccionado, cambiamos el select al valor correspondiente
1194                            $inputs.on('change', function () {
1195
1196                                var $input = jQuery(this);
1197
1198                                $select
1199                                    .find('option')
1200                                    .removeAttr('selected')
1201                                    .prop('selected', false);
1202
1203                                if ($input.is(':checked') === true) {
1204
1205                                    var $block = $input.closest('.form_block-content'),
1206                                        index = $block.index();
1207
1208                                    $select
1209                                        .find('option[value="' + index + '"]')
1210                                        .attr('selected', 'selected')
1211                                        .prop('selected', true);
1212
1213                                }
1214
1215                            });
1216
1217                            // Al cambiar el valor del select, marcamos el input seleccionado
1218                            $select.on('change', function () {
1219
1220                                var $el = jQuery(this),
1221                                    value = parseInt($el.val());
1222
1223                                $inputs.each(function () {
1224
1225                                    var $input = jQuery(this),
1226                                        $block = $input.closest('.form_block-content'),
1227                                        index = $block.index();
1228
1229                                    if (index === value) {
1230
1231                                        $input
1232                                            .attr('checked', 'checked')
1233                                            .prop('checked', true);
1234
1235                                        $input.trigger('change');
1236
1237                                    } else {
1238
1239                                        $input
1240                                            .removeAttr('checked')
1241                                            .prop('checked', false);
1242
1243                                    }
1244
1245                                });
1246
1247                            });
1248
1249                        }
1250
1251                        // Cuando seleccionamos una input, damos la clase selected al contenedor de todos para quitar opacidad a los no seleccionados
1252                        $inputs.on('change', function () {
1253
1254                            var $input = jQuery(this),
1255                                $box = $input.closest('.boxes');
1256
1257                            $box.addClass('selected');
1258
1259                        });
1260
1261                    });
1262
1263                },
1264                resizeForm: function () {
1265
1266                    var stepsHeight;
1267
1268                    // Si existe la cabecera de pasos, calculamos su altura, sino la valoramos como 0
1269                    if ($steps){
1270                        if ($steps.length > 0) {
1271                            stepsHeight = $steps.outerHeight();
1272                        } else {
1273                            stepsHeight = 0;
1274                        }
1275                    }else {
1276                        stepsHeight = 0;
1277                    }
1278
1279                    var headerHeight = $header.outerHeight(),
1280                        footerHeight = $footer.outerHeight(),
1281                        formPadding = parseInt($form.css('padding-top')) + parseInt($form.css('padding-bottom')),
1282                        loginPadding = parseInt($login.css('padding-top')) + parseInt($login.css('padding-bottom')),
1283                        minHeight = window.window_height - headerHeight - footerHeight - stepsHeight - formPadding;
1284                    loginMinHeight = window.window_height - headerHeight - footerHeight - loginPadding;
1285
1286                    $form.css('min-height', minHeight);
1287
1288                    $login.css('min-height', loginMinHeight);
1289
1290                    setTimeout(function () {
1291
1292                        var formHeight = $form.outerHeight();
1293
1294                        $resume.css('height', formHeight);
1295
1296                    }, 10);
1297
1298                },
1299                resizeBoxes: function () {
1300
1301                    // $boxes.each(function() {
1302
1303                    // 	var $box 		= jQuery(this),
1304                    // 		$labels 	= $box.find('.radio_box-label'),
1305                    // 		minHeight 	= 0;
1306
1307                    // 	// Reseteamos las alturas a automáticas para que todos tengan el tamaño de su contenido
1308                    // 	$labels.css('min-height', 'auto');
1309
1310                    // 	$labels.each(function() {
1311
1312                    // 		var $label 		= jQuery(this),
1313                    // 			labelHeight = $label[0].scrollHeight,
1314                    // 			borderWidth = parseInt($label.css('border-top-width'));
1315
1316                    // 		// El tamaño mínimo de cada elemento es el alto de su contenido mas su borde superior e inferior
1317                    // 		minHeight = Math.max(minHeight, labelHeight + (borderWidth * 2));
1318
1319                    // 	});
1320
1321                    // 	// Damos la altura definitivamente a todos los label
1322                    // 	$labels.css('min-height', minHeight);
1323
1324                    // });
1325
1326                }
1327            };
1328        }
1329
1330        module.exports = forms;
1331
1332    }, {}], 9: [function (require, module, exports) {
1333        /* -------------------------------------------------------
1334        
1335        Este módulo se encarga de pintar la retícula con barras de
1336        color.
1337        
1338        ------------------------------------------------------- */
1339
1340        var grid = new function () {
1341            return {
1342                paintGrid: function () {
1343                    var gridHTML = jQuery('\n\
1344									<div class="grid">\n\
1345										<div class="grid_wrapper">\n\
1346											<span class="col1-xd col1-ld col1-md col1-sd col1-lt col1-st col1-sm"></span>\n\
1347											<span class="col1-xd col1-ld col1-md col1-sd col1-lt col1-st col1-sm"></span>\n\
1348											<span class="col1-xd col1-ld col1-md col1-sd col1-lt col1-st col1-sm"></span>\n\
1349											<span class="col1-xd col1-ld col1-md col1-sd col1-lt col1-st col1-sm"></span>\n\
1350											<span class="col1-xd col1-ld col1-md col1-sd col1-lt col1-st col1-sm"></span>\n\
1351											<span class="col1-xd col1-ld col1-md col1-sd col1-lt col1-st col1-sm"></span>\n\
1352											<span class="col1-xd col1-ld col1-md col1-sd col1-lt col1-st col1-sm"></span>\n\
1353											<span class="col1-xd col1-ld col1-md col1-sd col1-lt col1-st col1-sm"></span>\n\
1354										</div>\n\
1355									</div>\n\
1356									');
1357                    jQuery('#general').append(gridHTML);
1358                }
1359            };
1360        }
1361
1362        module.exports = grid;
1363    }, {}
1363], 10: [function (require, module, exports) {
1364        /* ---------------------------------------------------------------------------
1365        
1366        Header
1367        
1368        --------------------------------------------------------------------------- */
1369        var $html,
1370            $header,
1371            $headerBar,
1372            $headerTop,
1373            $headerBottom,
1374            $logo,
1375            $linksList,
1376            $phone,
1377            $featuredLink,
1378            $buttonsList,
1379            $button,
1380            $buttonArea,
1381            $menuButton,
1382            $list,
1383            $subcontentLink,
1384            $dropdownButton,
1385            $search_button,
1386            $searchContent,
1387            $search_submit,
1388            $search_input,
1389            $close_search,
1390            $language_link,
1391            $close_menu,
1392            $subcontentContainer,
1393            timer,
1394            resizeTimer,
1395            lastPos = 0,
1396            scrollPos = 0,
1397            lastScroll,
1398            navPosition,
1399            scrollTop,
1400            counterMouse = 0,
1401            lastWidth = 0;
1402
1403        var header = new function () {
1404
1405            return {
1406                init: function () {
1407
1408                    $html = jQuery('html'),
1409                        $header = jQuery('#header'),
1410                        $headerBK_BAI = jQuery('#header_bk_bai'),
1411                        $headerBar = $header.find('.header_bar .header_inner'),
1412                        $headerTop = $header.find('.header_top .header_inner'),
1413                        $headerBottom = $header.find('.header_bottom .header_inner'),
1414                        $logo = $headerTop.find('.header_top-logo'),
1415                        $logoSmart = $headerTop.find('.header_top-logo-smart'),
1416                        $linksList = $headerTop.find('.header_top-links_list'),
1417                        $phone = $headerTop.find('.phone'),
1418                        $featuredLink = $headerTop.find('.featured_link .link'),
1419                        $buttonsList = $headerTop.find('.header_top-buttons_list'),
1420                        $button = $headerTop.find('.header_top-call_to_action'),
1421                        $buttonArea = $headerTop.find('.header_top-private_area'),
1422                        $menuButton = $headerTop.find('.header_top-menu_button'),
1423                        $list = $headerBottom.find('.header_bottom-dropdown_list'),
1424                        $dropdownButton = $headerBottom.find('.header_bottom-dropdown_list-button'),
1425                        $search_button = $headerTop.find('.search_button'),
1426                        $searchContent = $headerBar.find('.header_bar-searcher'),
1427                        $search_submit = $headerBar.find('.header_searcher-button'),
1428                        $search_input = $headerBar.find('.header_searcher-input'),
1429                        $close_search = $headerBar.find('#header_searcher-close_button'),
1430                        $language_link = $headerTop.find('.language_link'),
1431                        $close_menu = $header.find('.header_bottom-close_button'),
1432                        lastScroll = jQuery(window).scrollTop();
1433
1434                    header.cloneElements();
1435
1436                },
1437                cloneElements: function () {
1438
1439                    // Clonamos la lista de links de la cabecera superior y la pegamos en la barra de tablet/smartphone
1440                    $linksList
1441                        .clone()
1442                        .appendTo($headerBar);
1443
1444                    // Clonamos la lista de botones de la cabecera superior y la pegamos en la barra inferior
1445                    $buttonsList
1446                        .clone()
1447                        .prependTo($headerBottom);
1448
1449                    // Clonamos la lista de botones de la cabecera superior y la pegamos en la barra de tablet/smartphone
1450                    $buttonsList
1451                        .clone()
1452                        .prependTo($headerBar);
1453
1454                    // Clonamos el link destacado de la cabecera superior y la pegamos en la barra inferior
1455                    $featuredLink
1456                        .clone()
1457                        .prependTo($headerBottom);
1458
1459                    // Clonamos el link del teléfono de la cabecera superior y la pegamos en la barra inferior
1460                    $phone
1461                        .clone()
1462                        .prependTo($headerBottom);
1463
1464                    // Clonamos el logo y el botón de hazte inversor para pegarlo en la barra inferior y que aparezca al hacer scroll
1465                    $logo
1466                        .clone()
1467                        .attr('class', 'header_bottom-logo')
1468                        .prependTo($headerBottom);
1469                    // Clonamos el logo de smart y el botón de hazte inversor para pegarlo en la barra inferior y que aparezca al hacer scroll   
1470                    $logoSmart
1471                    // Clonamos el botón de área privada y lo pegamos en la barra inferior
1472                        .clone()
1473                        .attr('class', 'header_bottom-logo-smart')
1474                        .prependTo($headerBottom);
1475                    $buttonArea
1476                        .clone()
1477                        .removeClass('header_top-button header_top-private_area')
1478                        .addClass('header_bottom-button header_bottom-private_area')
1479                        .appendTo($headerBottom);
1480
1481                    // Clonamos el botón de cta y lo pegamos en la barra inferior
1482                    $button
1483                        .clone()
1484                        .removeClass('header_top-button header_top-call_to_action')
1485                        .addClass('header_bottom-button header_bottom-call_to_action')
1486                        .appendTo($headerBottom);
1487
1488                    // Clonamos la lista de enlaces de la cabecera inferior para pegarla en la superior
1489                    $list
1490                        .clone()
1491                        .attr('class', 'header_top-dropdown_list')
1492                        .insertAfter($logo)
1493                        .find('.header_bottom-dropdown_list-element')
1494                        .removeClass('header_bottom-dropdown_list-element')
1495                        .addClass('header_top-dropdown_list-element')
1496                        .find('.header_bottom-link')
1497                        .removeClass('header_bottom-link')
1498                        .addClass('header_top-dropdown_list-link');
1499
1500                    // En la versión inglesa incialmente no tienen buscador, por lo que tenemos que comprobar si existe o no para crear una capa vacía con las clases del buscador
1501                    if ($searchContent.length > 0) {
1502
1503                        // Duplicamos el buscado y lo pegamos en la inferior
1504                        $clonedSearch = $searchContent
1505                            .clone()
1506                            .appendTo($headerBottom);
1507
1508                        // Eliminamos el botón de cerrar del buscador clonado
1509                        $clonedSearch
1510                            .find('#header_searcher-close_button')
1511                            .remove();
1512
1513                        $language_link
1514                            .clone()
1515                            .appendTo($clonedSearch);
1516
1517                    } else {
1518
1519                        var $container = '<div class="header_bar-searcher"></div>',
1520                            $clonedLang = $language_link.clone();
1521
1522                        $headerBottom.append($container);
1523
1524                        // Duplicamos el enlace de idioma y lo pegamos en el buscador clonado
1525                        $headerBottom
1526                            .find('.header_bar-searcher')
1527                            .append($clonedLang);
1528
1529                    }
1530
1531                    // Asignamos las funcionalidades de cada botón
1532                    header.setElements();
1533
1534                },
1535                setElements: function () {
1536
1537                    $subcontents = $header.find('.subcontent-container');
1538
1539                    $subcontents.on('click', function (e) {
1540
1541                        e.stopPropagation();
1542
1543                    });
1544
1545                    var menu_timeout = ''
1546
1547                    $subcontentLink = $header.find('.dropdown_subcontent-link');
1548
1549                    $subcontentLink.on('click', function (e) {
1550
1551                        if (window.window_width > 1023) {
1552
1553                            clearTimeout(timer);
1554
1555                            var $el = jQuery(this);
1556
1557                            if (jQuery('body').hasClass('touchDevice') === true) {
1558                                e.preventDefault();
1559                            }
1560
1561                            if ($el.hasClass('open') === true) {
1562                                header.closeLayer($el);
1563                            } else {
1564                                header.openLayer($el);
1565                            }
1566
1567                        } else {
1568
1569                            var $el = jQuery(this)
1570                            $link = $el.find('.header_bottom-link'),
1571                                url = $link.attr('href');
1572
1573                            window.location.href = url;
1574
1575                        }
1576
1577                    }).on('mouseover', function (e) {
1578                        if (jQuery('body').hasClass('touchDevice') === true) {
1579                            return false;
1580                        }
1581
1582                        if (window.window_width <= 1023) {
1583                            return false;
1584                        }
1585
1586                        clearTimeout(timer);
1587
1588                        var $el = jQuery(this);
1589
1590                        menu_timeout = setTimeout(function () {
1591                            header.openLayer($el);
1592                        }, 200);
1593
1594
1595
1596                    }).on('mouseout', function () {
1597                        if (jQuery('body').hasClass('touchDevice') === true) {
1598                            return false;
1599                        }
1600
1601                        if (window.window_width <= 1023) {
1602                            return false;
1603                        }
1604
1605
1606
1607                        clearTimeout(timer);
1608                        clearTimeout(menu_timeout)
1609
1610                        var $el = jQuery(this);
1611
1612                        header.closeLayer($el);
1613
1614                    });
1615                    $header.on('mouseout', function () {
1616                    });
1617                    $dropdownButton.on('click', function (e) {
1618                        e.preventDefault();
1619                        clearTimeout(timer);
1620
1621                        var $button = jQuery(this),
1622                            $el = $button.closest('.dropdown_subcontent-link');
1623
1624                        if ($el.hasClass('open') === true) {
1625                            header.closeLayer($el);
1626                        } else {
1627                            header.openLayer($el);
1628                        }
1629
1630                        return false;
1631                    });
1632
1633                    $menuButton.on('click', function () {
1634
1635                        scrollTop = jQuery(window).scrollTop();
1636                        jQuery('#general > .content').css({
1637                            'overflow': 'hidden',
1638                            'margin-top': -scrollTop + 'px'
1639                        });
1640                        $header.addClass('open');
1641                        $headerBK_BAI.addClass('open');
1642                        $html.addClass('lock');
1643
1644                    });
1645
1646                    $search_button = $header.find('.search_button')
1647
1648                    $search_button.on('click', function () {
1649
1650                        $header.toggleClass('search');
1651                        $search_input.focus();
1652
1653                    });
1654
1655                    $search_input.on('keyup', function () {
1656
1657                        if ($search_input.val().length > 0) {
1658
1659                            $search_submit.addClass('active');
1660
1661                        } else {
1662
1663                            $search_submit.removeClass('active');
1664
1665                        }
1666
1667                    });
1668
1669                    $close_search.on('click', function () {
1670
1671                        $header.removeClass('search');
1672
1673                    });
1674
1675                    $close_menu.on('click', function () {
1676
1677                        $header.addClass('lock');
1678                        $header.removeClass('open');
1679                        $headerBK_BAI.removeClass('open');
1680
1681                        setTimeout(function () {
1682
1683                            $html.removeClass('lock');
1684
1685                            jQuery('#general > .content').css('margin-top', '0px');
1686                            jQuery('body, html').scrollTop(scrollTop);
1687
1688                            setTimeout(function () {
1689
1690                                $header.removeClass('lock');
1691                                navPosition = 0;
1692
1693                            }, 500);
1694
1695                        }, 500);
1696
1697
1698                    });
1699
1700                    header.setHeader();
1701
1702                },
1703                setHeader: function () {
1704
1705                    $headerBottom
1706                        .find('.dropdown_subcontent-link')
1707                        .each(function () {
1708
1709                            var $el = jQuery(this);
1710
1711                            if ($el.hasClass('active') === true && window.window_width <= 1023) {
1712
1713                                header.openLayer($el, true);
1714
1715                            }
1716
1717                        });
1718
1719                    $subcontentLink.each(function () {
1720
1721                        var $el = jQuery(this),
1722                            $subsection = $el.find('.active');
1723
1724                        if ($el.hasClass('active') === true) {
1725
1726                            var total_subsection = $subsection.length;
1727
1728                            if (total_subsection <= 0) {
1729
1730                                $el.addClass('disabled');
1731
1732                            }
1733
1734                        }
1735
1736                    });
1737
1738                },
1739                openLayer: function ($el, initial) {
1740
1741                    if ($el.hasClass('open') === true) {
1742                        return false;
1743                    }
1744
1745                    $subcontentContainer = $header.find('.subcontent-container');
1746                    $subcontentContainer.css('height', 0);
1747                    $subcontentContainer
1748                        .closest('.dropdown_subcontent-link')
1749                        .removeClass('open');
1750
1751                    $el.addClass('open');
1752
1753                    $subcontent = $el.find('.subcontent-container'),
1754                        subcontentHeight = $subcontent.find('.subcontent').outerHeight();
1755
1756                    $subcontent.css('height', 'auto');
1757
1758                    if (window.window_width <= 930 && initial !== true) {
1759
1760                        var $bottom = $header.find('.header_bottom'),
1761                            top = $el.position().top;
1762
1763                        $bottom.animate({
1764                            scrollTop: top
1765                        }, 0);
1766
1767                    }
1768
1769                },
1770                closeLayer: function ($el) {
1771
1772                    timer = setTimeout(function () {
1773                        $el.removeClass('open');
1774
1775                        $subcontent = $el.find('.subcontent-container'),
1776                            subcontentHeight = $subcontent.find('.subcontent').outerHeight();
1777
1778                        $subcontent.css('height', subcontentHeight);
1779
1780                        $subcontent.css('height', 0);
1781
1782                    }, 50);
1783
1784                },
1785                resize: function () {
1786
1787                    clearTimeout(resizeTimer);
1788
1789                    resizeTimer = setTimeout(function () {
1790
1791                        if (lastWidth < 1023 && window.window_width >= 1023) {
1792
1793                            // Cambiamos de escritorio a tablet o viceversa
1794                            var $subcontentContainer = $header.find('.subcontent-container');�
1794
1795                            $subcontentContainer.css({
1796                                'height': 0,
1797                                '-webkit-transition': 'none',
1798                                'transition': 'none'
1799                            });
1800                            $subcontentContainer
1801                                .closest('.dropdown_subcontent-link')
1802                                .removeClass('open');
1803
1804                            $html.removeClass('lock');
1805                            $header.removeClass('open');
1806
1807                            setTimeout(function () {
1808                                $subcontentContainer.css({
1809                                    '-webkit-transition': '',
1810                                    'transition': ''
1811                                });
1812                            }, 10);
1813
1814                        }
1815
1816                        lastWidth = window.window_width;
1817
1818                    }, 10);
1819                },
1820                scroll: function () {
1821
1822                    if (jQuery('html').hasClass('lock') === true) {
1823                        return false;
1824                    }
1825
1826                    var scrollPos = jQuery(window).scrollTop(),
1827                        $header = jQuery('#header:not(.top)'),
1828                        $headerTop = $header.find('.header_top'),
1829                        headerTopHeight = $headerTop.outerHeight(),
1830                        $headerBottom = $header.find('.header_bottom'),
1831                        headerHeight = $header.outerHeight(),
1832                        translate = 0;
1833
1834                    // Comprobamos si la cabecera página está arriba del todo
1835                    if (scrollPos <= headerTopHeight) {
1836
1837                        // Eliminamos la clase scrolled de la cabecera
1838                        $header.removeClass('scrolled');
1839
1840                        translate = 0;
1841                        navPosition = 0;
1842
1843                    } else {
1844
1845                        // Añadimos la clase scrolled a la cabecera
1846                        if (!$header.hasClass('tl-no-menu') || ($header.hasClass('tl-no-menu')&&window.window_width < 1000)) $header.addClass('scrolled');
1847
1848                        // $header.addClass('scrolled');
1849
1850                        //Calculamos la posición actual de la cabecera
1851                        navPosition += lastScroll - scrollPos;
1852                        navPosition = Math.max(-headerHeight, navPosition);
1853                        navPosition = Math.min(0, navPosition);
1854
1855                        translate = navPosition.toFixed(0);
1856                    }
1857
1858                    if ($header.hasClass('lock') === false) {
1859
1860                        $header.css({
1861                            '-webkit-transform': 'translateY(' + translate + 'px) translateZ(0)',
1862                            'transform': 'translateY(' + translate + 'px) translateZ(0)'
1863                        });
1864
1865                    }
1866
1867                    ///Si no tiene menu hago que salte en scroll up
1868                    if ($header.hasClass('tl-no-menu') && window.window_width >= 1000) {
1869                        if ((lastScroll > scrollPos)) $header.removeClass('scrolled');
1870
1871                    }
1872
1873                    lastScroll = scrollPos;
1874                }
1875            };
1876        }
1877
1878        module.exports = header;
1879
1880    }, {}], 11: [function (require, module, exports) {
1881        /* ---------------------------------------------------------------------------
1882        
1883        Lightboxes
1884        
1885        --------------------------------------------------------------------------- */
1886        var popupGeneralCtaAccess = require('../modules/popup-general-cta-access');
1887
1888        var lightbox = new function () {
1889            return {
1890                init: function (popupUrl) {
1891
1892                    window.launchAjax = function (url, element) {
1893
1894                        $.magnificPopup.open({
1895                            items: {
1896                                src: url,
1897                                type: 'ajax'
1898                            },
1899                            removalDelay: 700,
1900                            closeOnContentClick: false,
1901                            closeMarkup: '<button title="%title%" class="mfp-close"><span></span></button>',
1902                            fixedContentPos: true,
1903                            closeOnBgClick: false,
1904                            callbacks: {
1905                                beforeOpen: function () {
1906
1907                                    scrollTop = jQuery(window).scrollTop();
1908                                    var content = this.contentContainer;
1909
1910                                    var registration = false;
1911
1912                                    if (jQuery('#header').hasClass('registration') === true) {
1913                                        registration = true;
1914                                    }
1915
1916                                    if (registration === true) {
1917                                        jQuery('#header').addClass('lightbox');
1918                                        jQuery('#header').css({
1919                                            '-webkit-transform': 'translateY(-' + scrollTop + 'px)',
1920                                            'transform': 'translateY(-' + scrollTop + 'px)'
1921                                        });
1922                                    }
1923
1924                                    jQuery('html').addClass('lock');
1925                                    // jQuery('#general').css({ 'overflow' : 'hidden' }).scrollTop(scrollTop);
1926                                    jQuery('#general').css({
1927                                        'overflow': 'hidden'
1928                                    });
1929
1930                                    if (registration === true) {
1931
1932                                        jQuery('.content').css({
1933                                            'margin-top': '-' + scrollTop + 'px'
1934                                        });
1935
1936                                    } else {
1937
1938                                        jQuery('.content').css({
1939                                            '-webkit-transform': 'translateY(-' + scrollTop + 'px)',
1940                                            'transform': 'translateY(-' + scrollTop + 'px)'
1941                                        });
1942
1943                                    }
1944
1945                                    setTimeout(function () {
1946                                        jQuery(window).trigger('resize');
1947                                        content.css('overflow', 'hidden');
1948                                    }, 720);
1949
1950                                },
1951                                ajaxContentAdded: function () {
1952
1953                                    // Comprobamos si lanzamos el popup de acceso al alta y llamamos las funciones necesarias de dicho popup
1954                                    if (jQuery(element) !== undefined && jQuery(element).attr('data-registerFormCta') === 'true') {
1955
1956                                        popupGeneralCtaAccess.setButtons();
1957
1958                                    }
1959
1960                                },
1961                                afterClose: function () {
1962
1963                                    var registration = false;
1964
1965                                    if (jQuery('#header').hasClass('registration') === true) {
1966                                        registration = true;
1967                                    }
1968
1969                                    if (registration === true) {
1970                                        jQuery('#header').removeClass('lightbox');
1971                                        jQuery('#header').css({
1972                                            '-webkit-transform': 'none',
1973                                            'transform': 'none'
1974                                        });
1975                                    }
1976
1977                                    this.contentContainer.css('overflow', '');
1978                                    // jQuery('#general').css({ 'overflow' : '' });
1979                                    jQuery('#general').css({
1980                                        'overflow': ''
1981                                    });
1982
1983                                    if (registration === true) {
1984
1985                                        jQuery('.content').css({
1986                                            'margin-top': '0px'
1987                                        });
1988
1989                                    } else {
1990                                        jQuery('.content').css({
1991                                            '-webkit-transform': 'none',
1992                                            'transform': 'none'
1993                                        });
1994                                    }
1995
1996                                    jQuery('html').removeClass('lock');
1997                                    jQuery('body, html').scrollTop(scrollTop);
1998
1999                                }
2000                            },
2001                        });
2002
2003                    }
2004
2005                    window.launchIframe = function (url) {
2006
2007                        $.magnificPopup.open({
2008                            items: {
2009                                src: url,
2010                                type: 'iframe'
2011                            },
2012                            removalDelay: 700,
2013                            closeOnContentClick: false,
2014                            closeMarkup: '<button title="%title%" class="mfp-close"><span></span></button>',
2015                            fixedContentPos: true,
2016                            callbacks: {
2017                                beforeOpen: function () {
2018
2019                                    scrollTop = jQuery(window).scrollTop();
2020                                    var content = this.contentContainer;
2021
2022                                    jQuery('html').addClass('lock');
2023                                    // jQuery('#general').css({ 'overflow' : 'hidden' }).scrollTop(scrollTop);
2024                                    jQuery('#general').css({
2025                                        'overflow': 'hidden'
2026                                    });
2027                                    jQuery('.content').css({
2028                                        '-webkit-transform': 'translateY(-' + scrollTop + 'px)',
2029                                        'transform': 'translateY(-' + scrollTop + 'px)'
2030                                    });
2031
2032                                    setTimeout(function () {
2033                                        jQuery(window).trigger('resize');
2034                                        content.css('overflow', 'hidden');
2035
2036                                    }, 720);
2037
2038                                },
2039                                open: function () {
2040
2041                                    var videoitem=$('.mfp-iframe')[0];
2042
2043                                    var isYouTubeVideo = window.checkIfYouTubeVideo(videoitem);
2044                                    if (isYouTubeVideo) {
2045                                        var normalizedYouTubeIframe = window.normalizeYouTubeIframe(videoitem);
2046                                        setTimeout(function() { window.addYouTubeEvents(normalizedYouTubeIframe) }, 500);
2047                                    }
2048
2049
2050                                },
2051                                afterClose: function () {
2052
2053                                    this.contentContainer.css('overflow', '');
2054                                    // jQuery('#general').css({ 'overflow' : '' });
2055                                    jQuery('#general').css({
2056                                        'overflow': ''
2057                                    });
2058                                    jQuery('.content').css({
2059                                        '-webkit-transform': 'none',
2060                                        'transform': 'none'
2061                                    });
2062                                    jQuery('html').removeClass('lock');
2063                                    jQuery('body, html').scrollTop(scrollTop);
2064
2065                                }
2066                            }
2067                        });
2068
2069                    }
2070
2071                    window.launchAlert = function (url) {
2072
2073                        $.magnificPopup.open({
2074                            items: {
2075                                src: url,
2076                                type: 'ajax'
2077                            },
2078                            modal: true,
2079                            mainClass: 'alert',
2080                            removalDelay: 700,
2081                            closeOnContentClick: false,
2082                            closeMarkup: '<button title="%title%" class="mfp-close"><span></span></button>',
2083                            fixedContentPos: true,
2084                            callbacks: {
2085                                beforeOpen: function () {
2086
2087                                    scrollTop = jQuery(window).scrollTop();
2088                                    var content = this.contentContainer;
2089
2090                                    jQuery('html').addClass('lock');
2091                                    // jQuery('#general').css({ 'overflow' : 'hidden' }).scrollTop(scrollTop);
2092                                    jQuery('#general').css({
2093                                        'overflow': 'hidden'
2094                                    });
2095                                    jQuery('.content').css({
2096                                        '-webkit-transform': 'translateY(-' + scrollTop + 'px)',
2097                                        'transform': 'translateY(-' + scrollTop + 'px)'
2098                                    });
2099
2100                                    setTimeout(function () {
2101                                        jQuery(window).trigger('resize');
2102                                        content.css('overflow', 'hidden');
2103                                    }, 720);
2104
2105                                },
2106                                afterClose: function () {
2107
2108                                    this.contentContainer.css('overflow', '');
2109                                    // jQuery('#general').css({ 'overflow' : '' });
2110                                    jQuery('#general').css({
2111                                        'overflow': ''
2112                                    });
2113                                    jQuery('.content').css({
2114                                        '-webkit-transform': 'none',
2115                                        'transform': 'none'
2116                                    });
2117                                    jQuery('html').removeClass('lock');
2118                                    jQuery('body, html').scrollTop(scrollTop);
2119
2120                                }
2121                            }
2122                        });
2123
2124                    }
2125
2126                    window.launchTeam = function (url, element, $link) {
2127
2128                        var itemsArray = [],
2129                            itemIndex;
2130
2131                        jQuery('.module-list_image').each(function (key, val) {
2132
2133                            var obj = {},
2134                                $el = jQuery(val);
2135
2136                            if ($el[0] == $link[0]) {
2137                                itemIndex = key;
2138                            }
2139
2140                            obj.src = $el.attr('href');
2141                            obj.type = 'ajax';
2142
2143                            itemsArray.push(obj);
2144
2145                        });
2146
2147                        $.magnificPopup.open({
2148                            gallery: {
2149                                enabled: true,
2150                            },
2151                            items: itemsArray,
2152                            mainClass: 'team',
2153                            removalDelay: 700,
2154                            closeOnContentClick: false,
2155                            closeMarkup: '<button title="%title%" class="mfp-close"><span></span></button>',
2156                            fixedContentPos: true,
2157                            callbacks: {
2158                                beforeOpen: function () {
2159
2160                                    scrollTop = jQuery(window).scrollTop();
2161                                    var content = this.contentContainer;
2162
2163                                    jQuery('html').addClass('lock');
2164                                    jQuery('body').css({
2165                                        'transform': 'translate3d(0,0,0)'
2166                                    });
2167                                    jQuery('#general').css({ 'overflow': 'hidden' }).scrollTop(scrollTop);
2168
2169                                    setTimeout(function () {
2170                                        jQuery(window).trigger('resize');
2171                                        content.css('overflow', 'hidden');
2172                                    }, 720);
2173
2174                                },
2175                                ajaxContentAdded: function () {
2176
2177                                    // Comprobamos si lanzamos el popup de acceso al alta y llamamos las funciones necesarias de dicho popup
2178                                    if (jQuery($link) !== undefined && jQuery($link).attr('data-registerFormCta') === 'true') {
2179
2180                                        popupGeneralCtaAccess.setButtons();
2181
2182                                    }
2183
2184                                    $('.popup-team_prev').on('click', function () {
2185                                        $('.popup-gallery').magnificPopup('prev');
2186                                    });
2187                                    $('.popup-team_next').on('click', function () {
2188                                        $('.popup-gallery').magnificPopup('next');
2189                                    });
2190                                    $('.popup-team_close').on('click', function () {
2191                                        $('.popup-gallery').magnificPopup('close');
2192                                    });
2193
2194
2195                                },
2196                                afterClose: function () {
2197
2198                                    this.contentContainer.css('overflow', '');
2199                                    jQuery('#general').css({ 'overflow': '' });
2200                                    jQuery('html').removeClass('lock');
2201                                    jQuery('body, html').scrollTop(scrollTop);
2202                                    jQuery('body').css({
2203                                        'transform': ''
2204                                    });
2205
2206                                }
2207                            }
2208                        }, itemIndex);
2209
2210                    }
2211
2212                    window.launchImage = function (url) {
2213
2214                        $.magnificPopup.open({
2215                            items: {
2216                                src: url,
2217                                type: 'image'
2218                            },
2219                            removalDelay: 700,
2220                            closeOnContentClick: false,
2221                            closeMarkup: '<button title="%title%" class="mfp-close"><span></span></button>',
2222                            fixedContentPos: true,
2223                            closeOnBgClick: false,
2224                            callbacks: {
2225                                beforeOpen: function () {
2226
2227                                    scrollTop = jQuery(window).scrollTop();
2228                                    var content = this.contentContainer;
2229
2230                                    jQuery('html').addClass('lock');
2231                                    jQuery('#general').css({ 'overflow': 'hidden' }).scrollTop(scrollTop);
2232
2233                                    setTimeout(function () {
2234                                        jQuery(window).trigger('resize');
2235                                        content.css('overflow', 'hidden');
2236                                    }, 720);
2237
2238                                },
2239                                afterClose: function () {
2240
2241                                    this.contentContainer.css('overflow', '');
2242                                    jQuery('#general').css({ 'overflow': '' });
2243                                    jQuery('html').removeClass('lock');
2244                                    jQuery('body, html').scrollTop(scrollTop);
2245
2246                                },
2247                                open: function () {
2248
2249                                    // Definimos la functión para activar el plugin de zoom
2250                                    var reloadZoomFuncionality = function () {
2251
2252                                        var $figure = jQuery('.mfp-figure figure'),
2253                                            $parent = $figure.parent(),
2254                                            $bar = jQuery('.mfp-bottom-bar');
2255
2256                                        if (!$parent.hasClass('onPan')) {
2257
2258                                            // Ocultamos el título de imagen cuando se realiza zoom en dispositivos móviles
2259                                            if (!jQuery('body').hasClass('noTouchDevice')) {
2260
2261                                                $bar.addClass('hidden');
2262
2263                                            }
2264
2265                                            if (!$parent.hasClass('onZoom')) {
2266
2267                                                $parent.addClass('onZoom');
2268                                                $figure.panzoom('enable');
2269                                                $figure.panzoom('zoom', 3);
2270                                                $bar.addClass('hidden');
2271
2272                                            } else {
2273
2274                                                $parent.removeClass('onZoom');
2275                                                $figure.panzoom('zoom', 
22751);
2276                                                $figure.panzoom('pan', 0, 0);
2277                                                $figure.panzoom('disable');
2278                                                $bar.removeClass('hidden');
2279
2280                                            }
2281
2282                                        }
2283
2284                                    };
2285
2286                                    // Funcionalidad que aplica el zoom a aquellas imágenes
2287                                    // que el usuario ha decidido que lo tengan
2288                                    var hasZoom = function () {
2289
2290                                        jQuery('body').off('click').on('click', '.mfp-content img', function (e) {
2291
2292                                            e.stopImmediatePropagation();
2293
2294                                            reloadZoomFuncionality();
2295
2296                                        });
2297
2298                                    };
2299
2300                                    hasZoom();
2301
2302                                },
2303                                imageLoadComplete: function () {
2304
2305                                    var $img = jQuery('.mfp-content img'),
2306                                        maxScale = $img[0].naturalWidth / $img.width();
2307                                    _w = $img.width(),
2308                                        $figure = jQuery('.mfp-figure figure'),
2309                                        $parent = $figure.parent();
2310
2311
2312                                    $figure.panzoom({
2313                                        increment: 0.4,
2314                                        duration: 500,
2315                                        disablePan: true,
2316                                        contain: 'invert',
2317                                        minScale: 1,
2318                                        maxScale: maxScale,
2319                                        cursor: '',
2320                                        onPan: function () {
2321
2322                                            $parent.addClass('onPan');
2323
2324                                        },
2325                                        onEnd: function () {
2326
2327                                            setTimeout(function () {
2328
2329                                                $parent.removeClass('onPan');
2330
2331                                            }, 100);
2332
2333                                            if ($figure.panzoom("getMatrix")[0] <= 1) {
2334
2335                                                $figure.panzoom('zoom', 
23351);
2336                                                $figure.panzoom('pan', 0, 0);
2337                                                $figure.panzoom('option', {
2338                                                    disablePan: true,
2339                                                });
2340                                            }
2341
2342                                        },
2343                                        onZoom: function () {
2344
2345                                            $figure.panzoom('option', {
2346                                                disablePan: false,
2347                                            });
2348
2349                                            jQuery('.mfp-figure').css({
2350                                                'overflow': 'visible !important'
2351                                            });
2352
2353                                        }
2354                                    });
2355
2356                                    if (jQuery('body').hasClass('noTouchDevice')) {
2357
2358                                        jQuery('.mfp-img').panzoom('disable');
2359
2360                                    }
2361
2362                                }
2363                            }
2364                        });
2365
2366                    }
2367
2368                },
2369                ajax: function (element) {
2370
2371                    jQuery('html').on('click', element, function (e) {
2372
2373                        // Evitamos el enlace
2374                        e.preventDefault();
2375
2376                        // Cogemos la url del enlace y lanzamos el popup
2377                        var url = jQuery(e.currentTarget).attr('href');
2378
2379                        window.launchAjax(url, element);
2380
2381                    });
2382
2383                },
2384                iframe: function (element) {
2385
2386                    jQuery('html').on('click', element, function (e) {
2387
2388                        var $element = jQuery(this),
2389                            url = $element.attr('href');
2390
2391                        if ($element.hasClass('pdf') === true) {
2392
2393                            // Si es un pdf, comprobamos si es dispositivo móvil o no
2394                            var $body = jQuery('body');
2395
2396                            // Si es móvil salimos de la comprobación y dejamos lanzar el enlace
2397                            if ($body.hasClass('android') === true || $body.hasClass('iePhone') === true || $body.hasClass('iOS') === true || $body.hasClass('criOS') === true) {
2398
2399                                window.open(url);
2400
2401                                return false;
2402
2403                            } else {
2404
2405                                // Si no lo es, prevenimos el enlace
2406                                e.preventDefault();
2407
2408                            }
2409
2410                        } else {
2411
2412                            // Si no es un pdf evitamos siempre el enlace
2413                            e.preventDefault();
2414
2415                        }
2416
2417                        window.launchIframe(url);
2418
2419                    });
2420
2421                },
2422                image: function (element) {
2423
2424                    jQuery('html').on('click', element, function (e) {
2425
2426                        // Evitamos el enlace
2427                        e.preventDefault();
2428
2429                        // Cogemos la url del enlace y lanzamos el popup
2430                        var url = jQuery(element).attr('href');
2431
2432                        window.launchImage(url, element);
2433
2434                    });
2435
2436                },
2437
2438                team: function (element) {
2439
2440                    jQuery('html').on('click', element, function (e) {
2441
2442                        // Evitamos el enlace
2443                        e.preventDefault();
2444
2445                        // Cogemos la url del enlace y lanzamos el popup
2446                        var $link = jQuery(this),
2447                            url = $link.attr('href');
2448
2449                        window.launchTeam(url, element, $link);
2450
2451                    });
2452
2453                }
2454            };
2455        }
2456
2457        module.exports = lightbox;
2458
2459    }, { "../modules/popup-general-cta-access": 34 }
2459], 12: [function (require, module, exports) {
2460        /* ---------------------------------------------------------------------------
2461        
2462        Module Pagination
2463        
2464        --------------------------------------------------------------------------- */
2465
2466        var moduleAccordion = new function () {
2467            return {
2468                init: function () {
2469                    moduleAccordion.accordionBuild();
2470                },
2471
2472                resize: function () {
2473                    var modules = document.querySelectorAll('.module-accordion');
2474
2475                    [].forEach.call(modules, function (module) {
2476                        var layers = module.querySelectorAll('.accordion_list dd');
2477
2478                        [].forEach.call(layers, function (layer) {
2479                            if (layer.classList.contains('open')) {
2480                                layer.style.height = '';
2481                                layer.style.transition = 'none';
2482                                layer.style.height = layer.scrollHeight + 'px';
2483                                setTimeout(function () {
2484                                    layer.style.transition = '';
2485                                }, 100);
2486                            }
2487                        });
2488                    });
2489                },
2490
2491                accordionBuild: function () {
2492                    var modules = document.querySelectorAll('.module-accordion');
2493
2494                    [].forEach.call(modules, function (module) {
2495                        var buttons = module.querySelectorAll('.accordion_list dt');
2496
2497                        [].forEach.call(buttons, function (button) {
2498                            var layer = button.nextElementSibling;
2499                            var icon = button.querySelector('.icon');
2500
2501                            button.addEventListener('click', function () {
2502                                if (!layer.classList.contains('open')) {
2503                                    icon.classList.add('open');
2504                                    layer.classList.add('open');
2505                                    layer.style.height = layer.scrollHeight + 'px';
2506                                } else {
2507                                    icon.classList.remove('open');
2508                                    layer.classList.remove('open');
2509                                    layer.style.height = '';
2510                                }
2511                            });
2512                        });
2513                    });
2514                }
2515            };
2516        }
2517
2518        module.exports = moduleAccordion;
2519
2520    }, {}], 13: [function (require, module, exports) {
2521        /* ---------------------------------------------------------------------------
2522        
2523        Module Article distributor
2524        
2525        --------------------------------------------------------------------------- */
2526
2527        var $html,
2528            $module,
2529            $circles,
2530            $button,
2531            $layerButton,
2532            resizeInterval,
2533            commons = require('./commons');
2534
2535        var moduleArticlesDistributor = new function () {
2536            return {
2537                init: function () {
2538                    moduleArticlesDistributor.createCarousel();
2539                    commons.setCarouselGrid('.module-articlesDistributor');
2540                },
2541
2542                resize: function () {
2543                    clearTimeout(resizeInterval);
2544
2545                    commons.setCarouselGrid('.module-articlesDistributor');
2546
2547                    resizeInterval = setTimeout(function () {
2548                        commons.setCarouselGrid('.module-articlesDistributor');
2549                    }, 100);
2550                },
2551
2552                createCarousel: function () {
2553                    var $module = jQuery('.module-articlesDistributor');
2554                    var $carousel = $module.find('.module_carousel');
2555
2556                    $module.on('init', function (slick) {
2557                        $module.removeClass('hidden');
2558                    });
2559
2560                    var autoplay = false;
2561
2562                    if ($module.attr('data-autoplay') === 'true') {
2563                        autoplay = true;
2564                    }
2565
2566                    $carouselOptions = {
2567                        dots: true,
2568                        speed: 400,
2569                        slidesToShow: 2,
2570                        infinite: true,
2571                        // arrows: false,
2572                        responsive: [
2573                            {
2574                                breakpoint: 680,
2575                                settings: {
2576                                    slidesToShow: 1
2577                                }
2578                            }
2579                        ],
2580                        autoplay: autoplay,
2581                        slidesToScroll: 1,
2582                        autoplaySpeed: 3500
2583                    };
2584
2585                    $carousel.slick($carouselOptions);
2586                }
2587            };
2588        }
2589
2590        module.exports = moduleArticlesDistributor;
2591
2592    }, { "./commons": 3 }], 14: [function (require, module, exports) {
2593        /* ---------------------------------------------------------------------------
2594        
2595        Footer
2596        
2597        --------------------------------------------------------------------------- */
2598        var $module,
2599            $inner,
2600            $form,
2601            $confirmation;
2602
2603        var moduleContactForm = new function () {
2604
2605            return {
2606                init: function () {
2607
2608                    $module = jQuery('.module-contact-form');
2609                    $inner = $module.find('.module_inner');
2610                    $form = $module.find('.module-form');
2611                    $confirmation = $module.find('.module-confirmation');
2612
2613                    window.contactFormConfirmation = function () {
2614
2615                        var initHeight = $form[0].scrollHeight,
2616                            lastHeight = $confirmation[0].scrollHeight;
2617
2618                        $inner.css('height', initHeight);
2619
2620                        $module.addClass('confirmation');
2621
2622                        setTimeout(function () {
2623                            $inner.css('height', lastHeight);
2624                        }, 5);
2625
2626                        setTimeout(function () {
2627                            $inner.css('height', '');
2628                        }, 1505);
2629
2630                    }
2631
2632                }
2633            };
2634        }
2635
2636        module.exports = moduleContactForm;
2637    }, {}], 15: [function (require, module, exports) {
2638        /* ---------------------------------------------------------------------------
2639        
2640        Module Contact Map
2641        
2642        --------------------------------------------------------------------------- */
2643
2644        var $module,
2645            $images,
2646            api_key,
2647            url_init = '//maps.googleapis.com/maps/api/staticmap?zoom=16&size=640x640&scale=1&center=',
2648            url_marker = '&markers=color:0xb6996f|',
2649            url_style = '&style=feature%3Awater%7Celement%3Ageometry.fill%7Ccolor%3A0xd3d3d3%7C&style=feature%3Atransit%7Celement%3Aall%7Ccolor%3A0x808080%7Cvisibility%3Aoff%7C&style=feature%3Aroad.highway%7Celement%3Ageometry.stroke%7Cvisibility%3Aon%7Ccolor%3A0xb3b3b3%7C&style=feature%3Aroad.highway%7Celement%3Ageometry.fill%7Ccolor%3A0xffffff%7C&style=feature%3Aroad.local%7Celement%3Ageometry.fill%7Cvisibility%3Aon%7Ccolor%3A0xffffff%7Cweight%3A1.8%7C&style=feature%3Aroad.local%7Celement%3Ageometry.stroke%7Ccolor%3A0xd7d7d7%7C&style=feature%3Apoi%7Celement%3Ageometry.fill%7Cvisibility%3Aon%7Ccolor%3A0xebebeb%7C&style=feature%3Aadministrative%7Celement%3Ageometry%7Ccolor%3A0xa7a7a7%7C&style=feature%3Aroad.arterial%7Celement%3Ageometry.fill%7Ccolor%3A0xffffff%7C&style=feature%3Aroad.arterial%7Celement%3Ageometry.fill%7Ccolor%3A0xffffff%7C&style=feature%3Alandscape%7Celement%3Ageometry.fill%7Cvisibility%3Aon%7Ccolor%3A0xefefef%7C&style=feature%3Aroad%7Celement%3Alabels.text.fill%7Ccolor%3A0x696969%7C&style=feature%3Aadministrative%7Celement%3Alabels.text.fill%7Cvisibility%3Aon%7Ccolor%3A0x737373%7C&style=feature%3Apoi%7Celement%3Alabels.icon%7Cvisibility%3Aoff%7C&style=feature%3Apoi%7Celement%3Alabels%7Cvisibility%3Aoff%7C&style=feature%3Aroad.arterial%7Celement%3Ageometry.stroke%7Ccolor%3A0xd6d6d6%7C&style=feature%3Aroad%7Celement%3Alabels.icon%7Cvisibility%3Aoff%7C&style=&style=feature%3Apoi%7Celement%3Ageometry.fill%7Ccolor%3A0xdadada%7C',
2650            url_key = '&key=';
2651
2652        var moduleContactMap = new function () {
2653            return {
2654                init: function () {
2655
2656                    // Para cada elemento, cargamos una imagen desde el api de google con la latitud y longitud de cada uno
2657                    $module = jQuery('.module-contact-maps');
2658                    $images = $module.find('.module-image');
2659                    api_key = $module.attr('data-key');
2660
2661                    $images.each(function (key, val) {
2662
2663                        var $image = jQuery(val),
2664                            lat = $image.attr('data-lat'),
2665                            length = $image.attr('data-length'),
2666                            image_url;
2667
2668                        image_url = url_init + lat + ',' + length;
2669                        image_url += url_marker + lat + ',' + length;
2670                        image_url += url_style;
2671
2672                        if (api_key !== '' && api_key !== undefined) {
2673                            image_url += url_key + api_key;
2674                        }
2675
2676                        $image.attr('src', image_url);
2677
2678                    });
2679
2680                }
2681            };
2682        }
2683
2684        module.exports = moduleContactMap;
2685
2686    }, {}], 16: [function (require, module, exports) {
2687        /* ---------------------------------------------------------------------------
2688        
2689        Module Glossary Terms
2690        
2691        --------------------------------------------------------------------------- */
2692        var $body,
2693            $general,
2694            $module,
2695            $selects,
2696            $moduleFixed;
2697
2698        var moduleGlossaryTerms = new function () {
2699
2700            return {
2701                init: function () {
2702
2703                    $body = jQuery('body');
2704                    $general = jQuery('#general');
2705                    $module = jQuery('.module-glossary-terms-alphabet');
2706
2707                    moduleGlossaryTerms.cloneElements();
2708
2709                },
2710                cloneElements: function () {
2711
2712                    $moduleFixed = $module
2713                        .clone()
2714                        .addClass('cloned')
2715                        .appendTo($general);
2716
2717                    moduleGlossaryTerms.setLinks();
2718
2719                },
2720                setLinks: function () {
2721
2722                    jQuery('html').on('click', '.module-glossary-terms-alphabet .module-link', function (e) {
2723
2724                        e.preventDefault();
2725
2726                        var $el = jQuery(this),
2727                            id = $el.attr('href');
2728
2729                        moduleGlossaryTerms.scrollLetter(id);
2730
2731                    });
2732
2733                    jQuery('html').on('change', '.module-glossary-terms-alphabet .module-select', function (e) {
2734
2735                        e.preventDefault();
2736
2737                        var $el = jQuery(this),
2738                            id = $el.val();
2739
2740                        moduleGlossaryTerms.scrollLetter(id);
2741
2742                    });
2743
2744                },
2745                scrollLetter: function (id) {
2746
2747                    var $letter = jQuery(id);
2748                    posY = $letter.offset().top - 20,
2749                        index = 1;
2750
2751                    // Si lanza el evento en el módulo inicial no clonado aplciamos el doble del tamaño de la capa clonada para el correcto posicionamiento
2752                    if ($moduleFixed.hasClass('visible') === false) {
2753
2754                        index = 2;
2755
2756                    }
2757
2758                    posY -= ($moduleFixed.outerHeight() * index);
2759
2760                    jQuery('html, body').animate({
2761                        scrollTop: posY
2762                    }, 300);
2763
2764                },
2765                scroller: function () {
2766
2767                    if ($module === undefined || $module.length <= 0) {
2768                        return false;
2769                    }
2770
2771                    var posY = $body.scrollTop() || document.documentElement.scrollTop,
2772                        modulePos = $module.offset().top,
2773                        moduleHei = $module.outerHeight();
2774
2775                    if (posY > (modulePos + moduleHei)) {
2776
2777                        $moduleFixed.addClass('visible');
2778
2779                    } else {
2780
2781                        $moduleFixed.removeClass('visible');
2782
2783                    }
2784
2785                }
2786            };
2787        }
2788
2789        module.exports = moduleGlossaryTerms;
2790    }, {}
2790], 17: [function (require, module, exports) {
2791        /* ---------------------------------------------------------------------------
2792        
2793        Module graphics
2794        
2795        --------------------------------------------------------------------------- */
2796        var $modules,
2797            $container,
2798            $selects,
2799            containersArray = [],
2800            chartsArray = [],
2801            colors = ['#b59971', '#575757', '#a3a1a1', '#a27d5c', '#785d47', '#cecfd4'];
2802
2803        var moduleGraphics = new function () {
2804
2805            return {
2806                init: function () {
2807
2808                    $modules = jQuery('.module-graphics, .module-product-resume');
2809                    $container = $modules.find('.chart-container');
2810                    $selects = $modules.find('.module-graphic_select');
2811
2812                    $container.each(function (key, val) {
2813
2814                        var $container = jQuery(val),
2815                            url = $container.attr('data-info'),
2816                            type = $container.attr('data-type');
2817
2818                        moduleGraphics.readData(url, type, $container);
2819
2820                    });
2821
2822                    moduleGraphics.setSelects();
2823
2824                },
2825                setSelects: function () {
2826
2827                    // Función para gestionar el comportamiento de los select para seleccionar el rango de las gráficas
2828                    $selects.each(function (key, val) {
2829
2830                        var $select = jQuery(val),
2831                            $parent = $select.closest('.chart-block_container'),
2832                            $wrapper = $parent.find('.chart-container_wrapper'),
2833                            $container = $wrapper.find('.chart-container'),
2834                            type = $container.attr('data-type');
2835
2836                        $select.on('change', function () {
2837
2838                            var $option = jQuery('option:selected', this),
2839                                url = $option.attr('data-info'),
2840                                index = containersArray.indexOf($container[0]),
2841                                $chart = chartsArray[index];
2842
2843                            $chart.destroy();
2844                            $wrapper.addClass('loading');
2845
2846                            setTimeout(function () {
2847                                moduleGraphics.readData(url, type, $container);
2848                            }, 200);
2849
2850                        });
2851
2852                    });
2853
2854                },
2855                readData: function (url, type, $container) {
2856
2857                    // Función que lee el JSON y discrimina el tipo de gráfica
2858                    $.getJSON(url, function (obj) {
2859
2860                        switch (type) {
2861                            case 'line':
2862                                moduleGraphics.setLineGraph(obj, $container);
2863                                break;
2864                            case 'pie':
2865                                moduleGraphics.setPieGraph(obj, $container);
2866                                break;
2867                            case 'bars':
2868                                var objParse = obj;
2869                                var productResume = jQuery('.module-product-resume');
2870                                if (productResume.length) objParse = moduleGraphics.parseYear(obj);
2871                                moduleGraphics.setBarsGraph(objParse, $container);
2872                                break;
2873                            case 'product line':
2874                                moduleGraphics.setLineGraph(obj, $container, false);
2875                                break;
2876                        }
2877
2878                    });
2879
2880                },
2881                parseYear: function (obj) {
2882
2883
2884                    return obj;
2885                    /**** NO COMPATIBLE IE
2886                        //console.log(obj);
2887                        var array=Object.values(obj[0])[0];
2888                        if(array.length==7) array.splice(1,1);
2889                        else array.splice(0,1);
2890                        return obj;
2891                    */
2892                    /*VERSION COMPATIBLE*/
2893
2894
2895                    /*
2896                                            var values = Object.keys(obj[0]);
2897                                            values=obj[0][values[0]];
2898                    
2899                                           // console.log(values);
2900                    
2901                                            var pos=false;
2902                    
2903                                            values.forEach( function(valor, indice, array) {
2904                                                if(valor.x=='2018') pos=indice;
2905                                            });
2906                    
2907                                            if(pos!==false) values.splice(pos,1);
2908                    
2909                                          //  console.log(values);
2910                    
2911                                          return obj;
2912                    
2913                    
2914                    */
2915
2916                    // Eliminamos ulrimo elemento array "INICIO" solo para la pagina "bestinver-patrimonio"
2917                    // var idPage=jQuery('.page-id-566');
2918                    // if(idPage.length) values.splice(-1,1);
2919
2920
2921
2922                },
2923                setLineGraph: function (obj, $container, showYAxis) {
2924
2925                    var labels = [],
2926                        valuesX = [],
2927                        valuesY = [],
2928                        labelsX,
2929                        data,
2930                        options,
2931                        chart,
2932                        myChart,
2933                        yAxis = true,
2934                        xLines = false,
2935                        tooltipUnit = $container.attr('data-unit'),
2936                        maxTicks = 10,
2937                        scaleLabelDisplay = false,
2938                        scaleLabelTitle = '',
2939                        scaleLabelXDisplay = false,
2940                        scaleLabelXTitle = '',
2941                        scaleLabelSeparator = '.',
2942                        ticksOptions = {},
2943                        showTooltip = true;
2944
2945                    // Si no existe el parámetro data-unit las unidades del tooltip quedan como una cadena vacía
2946                    if (tooltipUnit === undefined) {
2947                        tooltipUnit = '';
2948                    }
2949
2950                    // En las gráficas de producto, recibimos showYAxis como false y no lo mostramos. En caso contrario se muestra dicho eje
2951                    if (showYAxis !== undefined) {
2952                        yAxis = showYAxis;
2953                        xLines = true;
2954                    }
2955
2956                    // El parámetro data-maxticks define el número máximo de valores que se muestran en el eje X si existe dicho atributo
2957                    if ($container.attr('data-maxticks') !== undefined && $container.attr('data-maxticks') !== null && $container.attr('data-maxticks') !== '') {
2958                        maxTicks = parseInt($container.attr('data-maxticks'));
2959                    }
2960
2961                    // El parámetro data-axistitle define el título del eje Y si existe dicho atributo
2962                    if ($container.attr('data-axistitle') !== undefined && $container.attr('data-axistitle') !== null && $container.attr('data-axistitle') !== '') {
2963                        scaleLabelDisplay = true,
2964                            scaleLabelTitle = $container.attr('data-axistitle');
2965                    }
2966
2967                    // El parámetro data-axisXtitle define el título del eje 
2967X si existe dicho atributo
2968                    if ($container.attr('data-axisXtitle') !== undefined && $container.attr('data-axisXtitle') !== null && $container.attr('data-axisXtitle') !== '') {
2969                        scaleLabelXDisplay = true,
2970                            scaleLabelXTitle = $container.attr('data-axisXtitle');
2971                    }
2972
2973                    // El parámetro data-decimalseparator define el tipo de separador para los decimales (normalmente , o . que depende de cada país)
2974                    if ($container.attr('data-decimalseparator') !== undefined && $container.attr('data-decimalseparator') !== null && $container.attr('data-decimalseparator') !== '') {
2975                        scaleLabelSeparator = $container.attr('data-decimalseparator');
2976                    }
2977
2978                    // El parámetro data-axisYrange sirve para definir el valor por el que se separaran los elementos del eje Y
2979                    if ($container.attr('data-axisYrange') !== undefined && $container.attr('data-axisYrange') !== null && $container.attr('data-axisYrange') !== '') {
2980                        ticksOptions = { stepSize: parseInt($container.attr('data-axisYrange')) };
2981                    }
2982
2983                    // El parámetro data-tooltip sirve para definir si se muestra o no el tooltip en una gráfica ('true' / 'false' respectivamente)
2984                    if ($container.attr('data-tooltip') !== undefined && $container.attr('data-tooltip') !== null && $container.attr('data-tooltip') !== '') {
2985                        if ($container.attr('data-tooltip') === 'false') {
2986                            showTooltip = false;
2987                        }
2988                    }
2989
2990                    // Recorremos el objeto para dar los valores X e Y
2991                    jQuery.each(obj, function (key, val) {
2992
2993                        var value = val;
2994
2995                        jQuery.each(value, function (key, val) {
2996
2997                            var value = val,
2998                                axisX = [],
2999                                axisY = [];
3000
3001                            // Guardamos cada label en el array de labels
3002                            labels.push(key);
3003
3004                            jQuery.each(val, function (key, val) {
3005
3006                                axisX.push(val.x);
3007
3008                                var valY = val.y.replace(',', '.');
3009
3010                                axisY.push(valY);
3011
3012                            });
3013
3014                            valuesX.push(axisX);
3015                            valuesY.push(axisY);
3016
3017                        });
3018
3019                    });
3020
3021                    var dataSets = [];
3022
3023                    // Gestionamos los datos que recibimos en el json independientemente si los decimales vienen marcados con . o ,
3024                    jQuery.each(valuesX, function (key, val) {
3025
3026                        var obj = {},
3027                            value = val,
3028                            dataArray = [],
3029                            arrayY = valuesY[key];
3030
3031                        obj.label = labels[key];
3032                        obj.backgroundColor = colors[key];
3033                        obj.borderColor = colors[key];
3034                        obj.pointBorderColor = colors[key];
3035
3036                        jQuery.each(value, function (key, val) {
3037
3038                            var obj = {};
3039
3040                            obj.x = val;
3041                            obj.y = parseFloat(arrayY[key].replace(',', '.').replace(' ', ''));
3042
3043                            dataArray.push(obj);
3044
3045                        });
3046
3047                        obj.data = dataArray;
3048                        dataSets.push(obj);
3049
3050                    });
3051
3052                    var totalLabels = valuesX[0].length,
3053                        isPrimeLabels = false,
3054                        initialMaxTicks = maxTicks,
3055                        index = 1,
3056                        indexSign = 'positive',
3057                        labelsIndex,
3058                        ticksXOptions;
3059
3060
3061                    // En esta función comprobamos si el número de elementos es primo. Si es así, aplicamos la división original del plugin
3062                    // En caso contrario, buscamos el número más cercano al valor recibido en data-maxticks por el que es divisible el total de elementos
3063                    // En último caso, si dicho valor es mayor por más de 15 o menor por menos de 15 del valor data-maxticks, utilizamos la división original del plugin
3064                    if (moduleGraphics.isPrime(totalLabels) === false) {
3065
3066                        maxTicks -= 2;
3067
3068                        if (totalLabels > maxTicks) {
3069
3070                            while (totalLabels % (maxTicks - 1) !== 0) {
3071
3072                                if (indexSign === 'positive') {
3073
3074                                    maxTicks += index;
3075                                    indexSign = 'negative';
3076
3077                                } else {
3078
3079                                    maxTicks -= index;
3080                                    indexSign = 'positive';
3081
3082                                }
3083
3084                                index++;
3085
3086                            }
3087
3088                        }
3089
3090                        if (maxTicks > initialMaxTicks + 15 || maxTicks < initialMaxTicks - 15) {
3091
3092                            maxTicks = initialMaxTicks;
3093
3094                            isPrimeLabels = true;
3095
3096                            ticksXOptions = {
3097                                autoSkip: true,
3098                                maxTicksLimit: maxTicks
3099                            };
3100
3101                        } else {
3102
3103                            labelsIndex = totalLabels / (maxTicks - 1);
3104
3105                            ticksXOptions = {
3106                                autoSkip: false
3107                            };
3108
3109                        }
3110
3111                    } else {
3112
3113                        isPrimeLabels = true;
3114
3115                        ticksXOptions = {
3116                            autoSkip: true,
3117                            maxTicksLimit: maxTicks
3118                        };
3119
3120                    }
3121
3122                    data = {
3123                        labels: valuesX[0],
3124                        datasets: dataSets
3125                    }
3126
3127                    options = {
3128                        responsive: true,
3129                        maintainAspectRatio: false,
3130                        scales: {
3131                            xAxes: [{
3132                                lineColor: '#e7e7e7',
3133                                ticks: ticksXOptions,
3134                                gridLines: {
3135                                    display: xLines,
3136                                    zeroLineColor: '#e7e7e7',
3137                                    color: '#e7e7e7'
3138                                },
3139                                scaleLabel: {
3140                                    display: scaleLabelXDisplay,
3141                                    labelString: scaleLabelXTitle
3142                                },
3143                                afterTickToLabelConversion: function (data) {
3144
3145                                    if (isPrimeLabels === true) {
3146                                        return false;
3147                                    }
3148
3149                                    var xLabels = data.ticks;
3150
3151                                    xLabels.forEach(function (labels, i) {
3152                                        // El módulo de i y el máximo de ticks es distinto de 0
3153                                        // El total de elementos es mayor que maxTicks
3154                                        // No se trata del primer elemento
3155                                        // No se trata del último elemento
3156                                        // Si se cumplen estas condiciones "ocultamos" el label
3157
3158                                        if (((i + 1) % labelsIndex) !== 0 && totalLabels > maxTicks && i !== 0 && i !== (totalLabels - 1)) {
3159                                            xLabels[i] = '';
3160                                        }
3161
3162                                    });
3163                                },
3164                                type: 'category'
3165                            }],
3166                            yAxes: [{
3167                                lineColor: '#e7e7e7',
3168                                display: yAxis,
3169                                gridLines: {
3170                                    drawBorder: false,
3171                                    zeroLineColor: '#e7e7e7',
3172                                    color: '#e7e7e7'
3173                                },
3174                                scaleLabel: {
3175                                    display: scaleLabelDisplay,
3176                                    labelString: scaleLabelTitle
3177                                },
3178                                ticks: ticksOptions
3179                            }]
3180                        },
3181                        elements: {
3182                            point: {
3183                                radius: 1,
3184                                hitRadius: 10
3185                            },
3186                            line: {
3187                                fill: false,
3188                                tension: 0,
3189                                borderWidth: 2
3190                            }
3191                        },
3192                        legend: {
3193                            display: false
3194                        },
3195                        tooltips: {
3196                            enabled: showTooltip,
3197                            xPadding: 15,
3198                            yPadding: 15,
3199                            cornerRadius: 0,
3200                            titleMarginBottom: 15,
3201                            callbacks: {
3202                                label: function (tooltipItems, data) {
3203
3204                                    var yVal = tooltipItems.yLabel.toString();
3205
3206                                    var value = Number(yVal),
3207                                        res = yVal.split('.');
3208
3209                                    if (yVal.indexOf('.') === -1) {
3210
3211                                        value = value.toFixed(2);
3212                                        yVal = value.toString();
3213
3214                                    } else if (res[1].length < 3) {
3215
3216                                        value = value.toFixed(2);
3217                                        yVal = value.toString();
3218
3219                                    }
3220
3221                                    yVal = yVal.replace('.', scaleLabelSeparator);
3222
3223                                    return yVal + tooltipUnit;
3224
3225                                }
3226                            }
3227                        },
3228                        animation: {
3229                            onProgress: function (e) {
3230
3231                                var $wrapper = $container.closest('.chart-container_wrapper');
3232
3233                                $wrapper.removeClass('loading');
3234
3235                            }
3236                        }
3237                    }
3238
3239                    chart = {
3240                        type: 'line',
3241                        data: data,
3242                        options: options
3243                    }
3244
3245                    myChart = new Chart($container, chart);
3246
3247                    if (containersArray.indexOf($container[0]) === -1) {
3248
3249                        containersArray.push($container[0]);
3250                        chartsArray.push(myChart);
3251
3252                    } else {
3253
3254                        var index = containersArray.indexOf($container[0]);
3255
3256                        chartsArray[index] = myChart;
3257
3258                    }
3259
3260                    moduleGraphics.setLegend(labels, $container);
3261
3262                },
3263                setPieGraph: function (obj, $container) {
3264
3265                    var labels = [],
3266                        dataArray = [],
3267                        dataSets = [],
3268                        object = {},
3269                        tooltipUnit = $container.attr('data-unit'),
3270                        scaleLabelSeparator = '.',
3271                        showTooltip = true;
3272
3273                    // Si no existe el parámetro data-unit las unidades del tooltip quedan como una cadena vacía
3274                    if (tooltipUnit === undefined) {
3275                        tooltipUnit = '';
3276                    }
3277
3278                    // El parámetro data-axistitle define el título del eje Y si existe dicho atributo
3279                    if ($container.attr('data-axistitle') !== undefined && $container.attr('data-axistitle') !== null && $container.attr('data-axistitle') !== '') {
3280                        scaleLabelDisplay = true,
3281                            scaleLabelTitle = $container.attr('data-axistitle');
3282                    }
3283
3284                    // El parámetro data-decimalseparator define el tipo de separador para los decimales (normalmente , o . que depende de ca
3284da país)
3285                    if ($container.attr('data-decimalseparator') !== undefined && $container.attr('data-decimalseparator') !== null && $container.attr('data-decimalseparator') !== '') {
3286                        scaleLabelSeparator = $container.attr('data-decimalseparator');
3287                    }
3288
3289                    // El parámetro data-tooltip sirve para definir si se muestra o no el tooltip en una gráfica ('true' / 'false' respectivamente)
3290                    if ($container.attr('data-tooltip') !== undefined && $container.attr('data-tooltip') !== null && $container.attr('data-tooltip') !== '') {
3291                        if ($container.attr('data-tooltip') === 'false') {
3292                            showTooltip = false;
3293                        }
3294                    }
3295
3296                    // Gestionamos los datos que recibimos en el json independientemente si los decimales vienen marcados con . o ,
3297                    jQuery.each(obj, function (key, val) {
3298
3299                        var value = val;
3300
3301                        jQuery.each(value, function (key, val) {
3302
3303                            labels.push(key);
3304
3305                            var val = val.replace(',', '.');
3306
3307                            dataArray.push(val);
3308
3309                        });
3310
3311                    });
3312
3313                    // Valores para los estilos de la gráfica
3314                    object.data = dataArray;
3315                    object.backgroundColor = colors;
3316                    object.borderWidth = 2;
3317                    object.borderColor = '#ffffff';
3318                    object.hoverBorderWidth = 0;
3319                    object.hoverBorderColor = 'rgba(255 ,255 ,255 , .1)';
3320
3321                    dataSets.push(object);
3322
3323                    data = {
3324                        labels: labels,
3325                        datasets: dataSets
3326                    }
3327
3328                    options = {
3329                        responsive: true,
3330                        maintainAspectRatio: false,
3331                        legend: {
3332                            display: false
3333                        },
3334                        cutoutPercentage: 85,
3335                        tooltips: {
3336                            enabled: showTooltip,
3337                            xPadding: 15,
3338                            yPadding: 15,
3339                            cornerRadius: 0,
3340                            titleMarginBottom: 15,
3341                            callbacks: {
3342                                label: function (tooltipItem, data) {
3343                                    var allData = data.datasets[tooltipItem.datasetIndex].data;
3344                                    var tooltipLabel = data.labels[tooltipItem.index];
3345                                    var tooltipData = allData[tooltipItem.index];
3346                                    var total = 0;
3347                                    for (var i in allData) {
3348                                        total += parseFloat(allData[i]);
3349                                    }
3350                                    var tooltipPercentage = Math.round((tooltipData / total) * 100).toString();
3351                                    return tooltipLabel + ': ' + tooltipPercentage.replace('.', scaleLabelSeparator) + '%';
3352                                }
3353                            }
3354                        },
3355                        animation: {
3356                            onProgress: function (e) {
3357
3358                                var $wrapper = $container.closest('.chart-container_wrapper');
3359
3360                                $wrapper.removeClass('loading');
3361
3362                            }
3363                        }
3364                    }
3365
3366                    chart = {
3367                        type: 'doughnut',
3368                        data: data,
3369                        options: options
3370                    }
3371
3372                    myChart = new Chart($container, chart);
3373
3374                    if (containersArray.indexOf($container[0]) === -1) {
3375
3376                        containersArray.push($container[0]);
3377                        chartsArray.push(myChart);
3378
3379                    } else {
3380
3381                        var index = containersArray.indexOf($container[0]);
3382
3383                        chartsArray[index] = myChart;
3384
3385                    }
3386
3387                    moduleGraphics.setLegend(labels, $container);
3388
3389                },
3390                setBarsGraph: function (obj, $container) {
3391
3392                    var labels = [],
3393                        valuesY = [],
3394                        labelsX = [],
3395                        data,
3396                        options,
3397                        chart,
3398                        myChart,
3399                        tooltipUnit = $container.attr('data-unit'),
3400                        maxTicks,
3401                        scaleLabelDisplay = false,
3402                        scaleLabelTitle = '',
3403                        scaleLabelXDisplay = false,
3404                        scaleLabelXTitle = '',
3405                        scaleLabelSeparator = '.',
3406                        ticksOptions = { beginAtZero: true },
3407                        showTooltip = true,
3408                        chartType = 'bar',
3409                        stackedYAxis = false;
3410
3411                    // Si no existe el parámetro data-unit las unidades del tooltip quedan como una cadena vacía
3412                    if (tooltipUnit === undefined) {
3413                        tooltipUnit = '';
3414                    }
3415
3416                    // El parámetro data-axistitle define el título del eje Y si existe dicho atributo
3417                    if ($container.attr('data-axistitle') !== undefined && $container.attr('data-axistitle') !== null && $container.attr('data-axistitle') !== '') {
3418                        scaleLabelDisplay = true,
3419                            scaleLabelTitle = $container.attr('data-axistitle');
3420                    }
3421
3422                    // El parámetro data-axisXtitle define el título del eje 
3422X si existe dicho atributo
3423                    if ($container.attr('data-axisXtitle') !== undefined && $container.attr('data-axisXtitle') !== null && $container.attr('data-axisXtitle') !== '') {
3424                        scaleLabelXDisplay = true,
3425                            scaleLabelXTitle = $container.attr('data-axisXtitle');
3426                    }
3427
3428                    // El parámetro data-decimalseparator define el tipo de separador para los decimales (normalmente , o . que depende de cada país)
3429                    if ($container.attr('data-decimalseparator') !== undefined && $container.attr('data-decimalseparator') !== null && $container.attr('data-decimalseparator') !== '') {
3430                        scaleLabelSeparator = $container.attr('data-decimalseparator');
3431                    }
3432
3433                    // El parámetro data-axisYrange sirve para definir el valor por el que se separaran los elementos del eje Y
3434                    if ($container.attr('data-axisYrange') !== undefined && $container.attr('data-axisYrange') !== null && $container.attr('data-axisYrange') !== '') {
3435                        ticksOptions = { beginAtZero: true, stepSize: parseInt($container.attr('data-axisYrange')) };
3436                    }
3437
3438                    // El parámetro data-tooltip sirve para definir si se muestra o no el tooltip en una gráfica ('true' / 'false' respectivamente)
3439                    if ($container.attr('data-tooltip') !== undefined && $container.attr('data-tooltip') !== null && $container.attr('data-tooltip') !== '') {
3440                        if ($container.attr('data-tooltip') === 'false') {
3441                            showTooltip = false;
3442                        }
3443                    }
3444
3445                    // El parámetro data-tooltip sirve para definir la orientación de las barras. Horizontal si recibe 'horizontalBar' horizontales, cualquier otro caso verticales
3446                    if ($container.attr('data-orientation') !== undefined && $container.attr('data-orientation') !== null && $container.attr('data-orientation') === 'horizontal') {
3447                        chartType = 'horizontalBar';
3448                        stackedYAxis = true;
3449                    }
3450
3451                    // Recorremos el objeto para dar los valores X e Y
3452                    jQuery.each(obj, function (key, val) {
3453
3454                        var value = val,
3455                            barNumber = key;
3456
3457                        jQuery.each(value, function (key, val) {
3458
3459                            var value = val,
3460                                axisY = [];
3461
3462                            // Guardamos cada labels en el array de labels si no está ya en el mismo
3463                            if (labelsX.indexOf(key) === -1) {
3464                                labelsX.push(key);
3465                            }
3466
3467                            jQuery.each(val, function (key, val) {
3468
3469                                // Guardamos cada labels en el array de labels si no está ya en el mismo
3470                                if (labels.indexOf(val.x) === -1) {
3471                                    labels.push(val.x);
3472                                }
3473
3474                                var valY = val.y.replace(',', '.');
3475
3476                                if (chartType === 'horizontalBar' && barNumber === 0) {
3477                                    valY = -Number(valY);
3478                                }
3479
3480                                axisY.push(valY);
3481
3482                            });
3483
3484                            valuesY.push(axisY);
3485
3486                        });
3487
3488                    });
3489
3490                    var dataSets = [];
3491
3492                    jQuery.each(valuesY, function (key, val) {
3493
3494                        var obj = {};
3495
3496                        obj.label = labelsX[key];
3497                        obj.backgroundColor = colors[key];
3498                        obj.data = valuesY[key];
3499                        dataSets.push(obj);
3500
3501                    });
3502
3503
3504                    var totalLabels = labels.length,
3505                        labelsIndex;
3506
3507                    // El parámetro data-maxticks define el número máximo de valores que se muestran en el eje X si existe dicho atributo
3508                    if ($container.attr('data-maxticks') !== undefined && $container.attr('data-maxticks') !== null && $container.attr('data-maxticks') !== '') {
3509                        maxTicks = parseInt($container.attr('data-maxticks'));
3510                    } else {
3511                        maxTicks = totalLabels;
3512                    }
3513
3514                    while (totalLabels % maxTicks !== 0) {
3515                        maxTicks--;
3516                    }
3517
3518                    labelsIndex = totalLabels / maxTicks - 1;
3519
3520                    data = {
3521                        labels: labels,
3522                        datasets: dataSets
3523                    }
3524
3525                    if ($container.attr('data-ajustey') == 1) {
3526                        var valuesData=[];
3527                        valuesData= dataSets[0].data.slice();
3528                        function sortNumber(a, b) {return b - a;}
3529                        valuesData.sort(sortNumber);
3530                        var maxNumber=valuesData[0];
3531                        ticksOptions.max=Math.ceil(maxNumber);
3532
3533                    }
3534
3535
3536                    options = {
3537                        responsive: true,
3538                        maintainAspectRatio: false,
3539                        scales: {
3540                            xAxes: [{
3541                                ticks: {
3542                                    autoSkip: false,
3543                                    // maxTicksLimit: maxTicks
3544                                },
3545                                afterTickToLabelConversion: function (data) {
3546                                    var xLabels = data.ticks;
3547
3548
3549                                    xLabels.forEach(function (labels, i) {
3550                                        // El módulo de i y el máximo de ticks es distinto de 0
3551                                        // El total de elementos es mayor que maxTicks
3552                                        // No se trata del primer elemento
3553                                        // No se trata del último elemento
3554
3555                                        if (((i + 1) % labelsIndex) !== 0 && totalLabels > maxTicks && i !== 0 && i !== (totalLabels - 1)) {
3556                                            xLabels[i] = '';
3557                                        }
3558
3559                                        // Si las barras son horizontales, el valor del label siempre es positivo
3560                                        if (chartType === 'horizontalBar') {
3561                                            xLabels[i] = Math.abs(Number(labels));
3562                                        }
3563
3564                                    });
3565                                },
3566                                barPercentage: .6,
3567                                categorySpacing: .4,
3568                                categoryPercentage: .85,
3569                                lineColor: '#e7e7e7',
3570                                gridLines: {
3571                                    drawBorder: false,
3572                                    display: false,
3573                                    zeroLineColor: '#e7e7e7',
3574                                    color: '#e7e7e7'
3575                                },
3576                                scaleLabel: {
3577                                    display: scaleLabelXDisplay,
3578                                    labelString: scaleLabelXTitle
3579                                }
3580                            }],
3581                            yAxes: [{
3582                                lineColor: '#e7e7e7',
3583                                ticks: ticksOptions,
3584                                gridLines: {
3585                                    drawBorder: false,
3586                                    zeroLineColor: '#e7e7e7',
3587                                    color: '#e7e7e7',
3588                                },
3589                                barPercentage: .3,
3590                                categorySpacing: .4,
3591                                categoryPercentage: .7,
3592                                stacked: stackedYAxis,
3593                                scaleLabel: {
3594                                    display: scaleLabelDisplay,
3595                                    labelString: scaleLabelTitle
3596                                }
3597                            }]
3598                        },
3599                        elements: {
3600                            point: {
3601                                radius: 1
3602                            }
3603                        },
3604                        legend: {
3605                            display: false
3606                        },
3607                        tooltips: {
3608                            enabled: showTooltip,
3609                            xPadding: 15,
3610                            yPadding: 15,
3611                            cornerRadius: 0,
3612                            titleMarginBottom: 15,
3613                            callbacks: {
3614                                label: function (tooltipItems, data) {
3615
3616                                    var yVal;
3617
3618                                    if (chartType === 'horizontalBar') {
3619
3620                                        yVal = (Math.abs(tooltipItems.xLabel)).toString();
3621
3622                                    } else {
3623
3624                                        yVal = tooltipItems.yLabel.toString();
3625
3626                                    }
3627
3628                                    var value = Number(yVal),
3629                                        res = yVal.split('.');
3630
3631                                    if (yVal.indexOf('.') === -1) {
3632
3633                                        value = value.toFixed(2);
3634                                        yVal = value.toString();
3635
3636                                    } else if (res[1].length < 3) {
3637
3638                                        value = value.toFixed(2);
3639                                        yVal = value.toString();
3640
3641                                    }
3642
3643                                    yVal = yVal.replace('.', scaleLabelSeparator);
3644
3645                                    return yVal + tooltipUnit;
3646
3647                                }
3648                            }
3649                        },
3650                        animation: {
3651                            onProgress: function (e) {
3652
3653                                var $wrapper = $container.closest('.chart-container_wrapper');
3654
3655                                $wrapper.removeClass('loading');
3656
3657                            }
3658                        }
3659                    }
3660
3661                    chart = {
3662                        type: chartType,
3663                        data: data,
3664                        options: options
3665                    }
3666
3667                    myChart = new Chart($container, chart);
3668
3669                    if (containersArray.indexOf($container[0]) === -1) {
3670
3671                        containersArray.push($container[0]);
3672                        chartsArray.push(myChart);
3673
3674                    } else {
3675
3676                        var index = containersArray.indexOf($container[0]);
3677
3678                        chartsArray[index] = myChart;
3679
3680                    }
3681
3682                    moduleGraphics.setLegend(labelsX, $container);
3683
3684                },
3685                setLegend: function (labels, $container) {
3686
3687                    // Esta función genera una leyenda para las gráficas y lo añade a la capa con clase 'chart-legend'
3688                    var $wrapper = $container.closest('.chart-container_wrapper'),
3689                        $legend = $wrapper.siblings('.chart-legend');
3690
3691                    if ($legend.length <= 0) {
3692                        return false;
3693                    }
3694
3695                    $legend.empty();
3696
3697                    jQuery.each(labels, function (key, val) {
3698
3699                        var $li = '<li class="chart-legend_element"><span class="chart-legend_color" style="background-color: ' + colors[key] + '"></span><span class="chart-legend_name">' + val + '</span></li>';
3700
3701                        $legend.append($li);
3702
3703                    });
3704
3705                    $legend.removeClass('hidden');
3706
3707                },
3708                isPrime: function (num) {
3709
3710                    for (var i = 2; i < num; i++) {
3711                        if (num % i === 0) {
3712                            return false;
3713                        }
3714                    }
3715
3716                    return num !== 1;
3717
3718                }
3719            };
3720        }
3721
3722        module.exports = moduleGraphics;
3723
3724    }, {}], 18: [function (require, module, exports) {
3725        /* ---------------------------------------------------------------------------
3726        
3727        Module header
3728        
3729        --------------------------------------------------------------------------- */
3730        var $module,
3731            $veils,
3732            $header;
3733
3734        var moduleHeader = new function () {
3735
3736            return {
3737                init: function () {
3738
3739                    $module = jQuery('.module-header');
3740                    $veils = $module.find('.module-veil');
3741                    $header = jQuery('#header');
3742
3743                },
3744                resize: function () {
3745
3746                    var header_h = $header.outerHeight(),
3747                        index = 1;
3748
3749                    if ($module.hasClass('interior') === true) {
3750
3751                        index = .6;
3752
3753                    }
3754
3755                    $module.css('min-height', (window.window_height - header_h) * index);
3756
3757                },
3758                scroller: function () {
3759
3760                    if ($module === undefined) {
3761                        return false;
3762                    }
3763
3764                    if ($module.length <= 0 || $module.hasClass('product') === true) {
3765                        return false;
3766                    }
3767
3768                    var $body = jQuery('body'),
3769                        posY = $body.scrollTop() || document.documentElement.scrollTop,
3770                        minY = $module.outerHeight() * .12,
3771                        maxY = $module.outerHeight() - minY,
3772                        opacity;
3773
3774                    // Empezamos a mostrar el velo blanco progresivamente a partir de la mitad de altura del módulo
3775                    opacity = (posY * 100 / maxY) / 100;
3776
3777                    $veils.css('opacity', opacity);
3778
3779                }
3780            };
3781        }
3782
3783        module.exports = moduleHeader;
3784    }, {}], 19: [function (require, module, exports) {
3785        /* ---------------------------------------------------------------------------
3786        
3787        Module Hightlighted Advantages Distributor
3788        
3789        --------------------------------------------------------------------------- */
3790        var $modules;
3791
3792        var moduleHightlightedAdvantagesDistributor = new function () {
3793
3794            return {
3795                init: function () {
3796
3797                    $modules = jQuery('.module-highlighted-advantages-distributor');
3798
3799                    $modules.each(function (key, val) {
3800
3801                        var $module = jQuery(val),
3802                            $list = $module.find('.module-slider');
3803                        $container = $module.find('.module-container');
3804                        $image = $module.find('.module-image_container:first-child');
3805
3806                        var autoplay = false;
3807
3808                        if ($module.attr('data-autoplay') === 'true') {
3809                            autoplay = true;
3810                        }
3811
3812                        // Creamos el slider
3813                        $list.slick({
3814                            dots: true,
3815                            speed: 400,
3816                            slidesToShow: 1,
3817                            infinite: true,
3818                            // arrows: false,
3819                            autoplay: autoplay,
3820                            slidesToScroll: 1,
3821                            autoplaySpeed: 3500
3822                        });
3823
3824                        // Si la imagen esta al principio, la duplicamos y la colocamos al final
3825                        if ($image.length > 0) {
3826
3827                            var $newImage = $image
3828                                .clone()
3829                                .addClass('cloned');
3830
3831                            $container.append($newImage);
3832
3833                        }
3834
3835                    });
3836
3837                }
3838            };
3839        }
3840
3841        module.exports = moduleHightlightedAdvantagesDistributor;
3842    }, {}], 20: [function (require, module, exports) {
3843        /* ---------------------------------------------------------------------------
3844        
3845        Module history pagination
3846        
3847        --------------------------------------------------------------------------- */
3848
3849        var moduleHistoryPagination = new function () {
3850
3851            return {
3852                init: function () {
3853                    moduleHistoryPagination.clickHandle();
3854                },
3855
3856                clickHandle: function () {
3857                    var modules = document.querySelectorAll('.module-history-pagination');
3858
3859                    [].forEach.call(modules, function (module) {
3860                        var buttons = module.querySelectorAll('.history-pagination_list li button');
3861                        var select = module.querySelector('.history-pagination_select select');
3862
3863                        [].forEach.call(buttons, function (button, index) {
3864                            option = module.querySelector('.history-pagination_select option:nth-child(' + (index + 1) + ')');
3865
3866                            button.addEventListener('click', function () {
3867                                $('html, body').animate({
3868                                    scrollTop: $(document.getElementById(this.getAttribute('data-ref'))).offset().top
3869                                }, 800);
3870                            });
3871                        });
3872
3873                        select.addEventListener('change', function () {
3874                            module.querySelector('button[data-ref="' + this.value + '"]').click();
3875                        });
3876                    });
3877                },
3878            };
3879        }
3880
3881        module.exports = moduleHistoryPagination;
3882    }, {}], 21: [function (require, module, exports) {
3883        /* ---------------------------------------------------------------------------
3884        
3885        Module Home Header
3886        
3887        --------------------------------------------------------------------------- */
3888        var slider = require('../modules/slider'),
3889            $module,
3890            $controls,
3891            $pagination,
3892            $veils,
3893            $images,
3894            $titles,
3895            initialOpacity,
3896            timeDuration = 10000;
3897
3898        var moduleHomeHeader = new function () {
3899
3900            return {
3901                init: function () {
3902
3903                    $module = jQuery('.module-home-header');
3904                    $headerTop = jQuery('.header_top');
3905                    $controls = $module.find('.module-controls');
3906                    $paginationWrap = $module.find('.module-pagination_wrap')
3907                    $pagination = $module.find('.module-pagination');
3908                    $veils = $module.find('.module-veil, .image-veil');
3909                    $images = $module.find('.module-list_image');
3910                    $titles = $module.find('.module-title_container');
3911
3912                    // Si recibimos el parámetro data-duration lo tomamos como la duración del slider en lugar de los 10000 por defecto
3913                    if ($module.attr('data-duration') !== undefined && $module.attr('data-duration') !== null) {
3914                        timeDuration = parseInt($module.attr('data-duration'));
3915                    }
3916
3917                    // check slider type
3918                    let auto_Play = false;
3919                    if ($module.attr('data-sliderType') !== undefined && $module.attr('data-sliderType') !== null && $module.attr('data-sliderType')=="Modo fijo auto") {
3920                        auto_Play = true;
3921                    }
3922
3923                    // Creamos el slider principal
3924                    slider.slider({
3925                        element: $module,
3926                        controls: false,
3927                        controlsContent: $controls,
3928                        pagination: true,
3929                        paginationContent: $pagination,
3930                        autoPlay: auto_Play,
3931                        animation: 'fxCustom',
3932                        loop: true,
3933                        overlay: true,
3934                        interval: timeDuration
3935                    });
3936
3937                    // Recorremos todas las imágenes del módulo y se las asignamos como imagen de fondo a los contenedores de los títulos para smartphone
3938                    $images.each(function (key, val) {
3939
3940                        var $image = jQuery(val),
3941                            $parent = $image.closest('.module-list_element'),
3942                            $title = $parent.find('.module-title_container'),
3943                            src;
3944
3945                        src = $image.css('background-image');
3946
3947                        $title.css('background-image', src);
3948                    });
3949
3950                },
3951                resize: function () {
3952
3953                    var _minH = 0;
3954                    var headerHeight = $headerTop.outerHeight();
3955                    var winWidth = window.innerWidth;
3956
3957                    // Hacemos que todos los títulos tengan como mínimo el alto de los demás títulos para smartphone
3958                    $titles.each(function (key, val) {
3959
3960                        var $title = jQuery(this);
3961
3962                        _minH = Math.max(_minH, $title.outerHeight());
3963
3964                    });
3965
3966                    //$titles.css('min-height', _minH);
3967
3968                    // if(winWidth <= 930) {
3969                    // 	$paginationWrap
3970                    // 			.delay(500)
3971                    // 			.queue(function (next) {
3972                    // 				$(this).css('top', ((_minH - headerHeight)))
3973                    // 			})
3974                    // }else{
3975                    // 	$paginationWrap.removeAttr('style')
3976                    // }
3977
3978                    moduleHomeHeader.cutTitle()
3979
3980                },
3981
3982                cutTitle: function () {
3983                    var winWidth = window.innerWidth;
3984
3985                    if (winWidth <= 930) {
3986                        $(".module-list_element").each(function () {
3987                            var title = $(this).find('.module-title')
3988                            var content = $(this).find('.module-list_container .module-content')
3989
3990                            if (!($(this).find('.module-list_container .module-content .module-title').length)) {
3991                                title.clone().prependTo(content)
3992                            }
3993
3994                        })
3995                    } else {
3996                        $('.module-list_container .module-content .module-title').remove()
3997                    }
3998                },
3999
4000                scroller: function () {
4001
4002                    if ($module === undefined || $module.length <= 0) {
4003                        return false;
4004                    }
4005
4006                    var $body = jQuery('body'),
4007                        posY = $body.scrollTop() || document.documentElement.scrollTop,
4008                        minY = $module.outerHeight() * .3,
4009                        maxY = $module.outerHeight() - minY,
4010                        opacity;
4011
4012                    // Empezamos a mostrar el velo blanco progresivamente a partir de la mitad de altura del módulo
4013                    opacity = Math.min((posY * 100 / maxY) / 100, 1);
4014
4015                    $veils.css('opacity', opacity);
4016
4017                }
4018            };
4019        }
4020
4021        module.exports = moduleHomeHeader;
4022
4023    }, { "../modules/slider": 36 }
4023], 22: [function (require, module, exports) {
4024        /* ---------------------------------------------------------------------------
4025        
4026        Module header
4027        
4028        --------------------------------------------------------------------------- */
4029        var $module,
4030            $list;
4031
4032        var moduleListDistributor = new function () {
4033
4034            return {
4035                init: function () {
4036
4037                    $module = jQuery('.module-list-distributor');
4038                    $list = $module.find('.module-list');
4039
4040                },
4041                resize: function () {
4042                    //disabled slider in numer list on resize
4043                    return;
4044
4045                    if ($list === undefined || $list.length <= 0) {
4046                        return false;
4047                    }
4048
4049                    if (window.window_width <= 680) {
4050
4051                        if ($list.hasClass('slick-initialized') === false) {
4052
4053                            var autoplay = false;
4054
4055                            if ($module.attr('data-autoplay') === 'true') {
4056                                autoplay = true;
4057                            }
4058
4059                            $list.slick({
4060                                dots: true,
4061                                speed: 400,
4062                                slidesToShow: 1,
4063                                infinite: true,
4064                                autoplay: autoplay,
4065                                slidesToScroll: 1,
4066                                autoplaySpeed: 3500
4067                            });
4068
4069                        }
4070
4071
4072                    } else {
4073
4074                        if ($list.hasClass('slick-initialized') === true) {
4075
4076                            $list.slick('unslick');
4077
4078                        }
4079
4080                    }
4081
4082                }
4083            };
4084        }
4085
4086        module.exports = moduleListDistributor;
4087    }, {}], 23: [function (require, module, exports) {
4088        /* ---------------------------------------------------------------------------
4089        
4090        Module Registration Header
4091        
4092        --------------------------------------------------------------------------- */
4093        var $html,
4094            $module,
4095            $circles,
4096            $button,
4097            $layerButton,
4098            resizeInterval,
4099            autoplay = false,
4100            commons = require('./commons');
4101
4102        var moduleMediaDistributor = new function () {
4103            return {
4104                init: function () {
4105
4106                    var $module = jQuery('.module-mediaDistributor');
4107
4108                    if ($module.attr('data-autoplay') === 'true') {
4109                        autoplay = true;
4110                    }
4111
4112                    $carouselOptions = {
4113                        dots: true,
4114                        speed: 400,
4115                        slidesToShow: 3,
4116                        infinite: true,
4117                        // arrows: false,
4118                        responsive: [
4119                            {
4120                                breakpoint: 680,
4121                                settings: {
4122                                    slidesToShow: 1
4123                                }
4124                            },
4125                            {
4126                                breakpoint: 930,
4127                                settings: {
4128                                    slidesToShow: 2
4129                                }
4130                            }
4131                        ],
4132                        autoplay: autoplay,
4133                        slidesToScroll: 1,
4134                        autoplaySpeed: 3500
4135                    }
4136
4137                    moduleMediaDistributor.createCarousel();
4138                },
4139
4140                resize: function () {
4141                    setTimeout(function () {
4142                        moduleMediaDistributor.setDescriptionHeight();
4143                    }, 200);
4144                },
4145
4146                createCarousel: function () {
4147                    var $module = jQuery('.module-mediaDistributor');
4148                    var $carousel = $module.find('.mediaDistributor_carousel:not(.disabled)');
4149
4150                    $module.on('init', function (slick) {
4151                        $module.removeClass('hidden');
4152                    });
4153
4154                    if ($module.find('.mediaDistributor_carousel').hasClass('disabled')) {
4155                        $module.removeClass('hidden');
4156                    }
4157
4158                    $module.on('setPosition', function (slick) {
4159                        setTimeout(function () {
4160                            moduleMediaDistributor.setDescriptionHeight();
4161                        }, 200);
4162                    });
4163
4164                    $carousel.slick($carouselOptions);
4165                },
4166
4167                setDescriptionHeight: function () {
4168                    var modules = document.querySelectorAll('.module-mediaDistributor');
4169                    var itemPrev;
4170                    var itemsRows = {};
4171
4172                    [].forEach.call(modules, function (module) {
4173                        var moduleItems = module.querySelectorAll('.mediaDistributor_item');
4174
4175                        [].forEach.call(moduleItems, function (item) {
4176                            if (item.style.height != null) {
4177                                item.style.height = '';
4178                            }
4179
4180                            var itemTop = item.getBoundingClientRect().top;
4181                            var itemHeight = item.getBoundingClientRect().height;
4182
4183                            if (itemPrev !== undefined) {
4184                                var itemPrevTop = itemPrev.getBoundingClientRect().top;
4185                                var itemPrevHeight = itemPrev.getBoundingClientRect().height;
4186
4187                                if (itemPrevTop === itemTop) {
4188
4189                                    if (itemPrevHeight > itemHeight) {
4190                                        item.style.height = itemPrevHeight + 'px';
4191                                    } else if (itemPrevHeight < itemHeight) {
4192                                        itemPrev.style.height = itemHeight + 'px';
4193                                    }
4194                                }
4195                            }
4196
4197                            itemPrev = item;
4198                        });
4199                    });
4200                },
4201
4202                getGrid: function (contentWidth, cols) {
4203                    var column = document.querySelector('.grid .grid_wrapper > span:nth-child(2)');
4204                    columnStyle = window.getComputedStyle(column);
4205
4206                    return {
4207                        width: column.clientWidth,
4208                        margin: parseFloat(columnStyle.getPropertyValue('margin-left'))
4209                    }
4210                }
4211            };
4212        }
4213
4214        module.exports = moduleMediaDistributor;
4215    }, { "./commons": 3 }
4215], 24: [function (require, module, exports) {
4216        /* ---------------------------------------------------------------------------
4217        
4218        Module Pagination
4219        
4220        --------------------------------------------------------------------------- */
4221
4222        var modulePagination = new function () {
4223            return {
4224                init: function () {
4225                    modulePagination.setClasses();
4226                },
4227
4228                setClasses: function () {
4229                    var modules = document.querySelectorAll('.module-pagination');
4230
4231                    if (modules.length == 0)
4232                        return false;
4233
4234                    [].forEach.call(modules, function (module) {
4235                        var list = module.querySelector('.module-pagination_list');
4236
4237                        if (list != undefined) {
4238                            var firstButton = list.querySelector('li:nth-child(1)');
4239                            var secondButton = list.querySelector('li:nth-child(2)');
4240                            var thirdButton = list.querySelector('li:nth-child(3)');
4241                            var fourthButton = list.querySelector('li:nth-child(4)');
4242                            var fifthButton = list.querySelector('li:nth-child(5)');
4243                            var sixthButton = list.querySelector('li:nth-child(6)');
4244                            var secondEndButton = list.querySelector('li:nth-last-child(2)');
4245
4246                            // Si la página actual está entre las 3 primeras
4247                            if (secondEndButton != undefined) {
4248                                if (secondEndButton.classList.contains('module-pagination_list_dots') && list.querySelectorAll('.module-pagination_list_dots').length == 1) {
4249                                    module.classList.add('first-pages');
4250
4251                                    // Si la página actual es la primera
4252                                    if (firstButton != undefined) {
4253                                        if (firstButton.classList.contains('currentItem')) {
4254                                            if (thirdButton != undefined)
4255                                                thirdButton.classList.add('onlyDesktop');
4256                                            if (fourthButton != undefined)
4257                                                fourthButton.classList.add('onlyDesktop');
4258                                        }
4259                                    }
4260                                    // Si la página actual es la segunda
4261                                    if (secondButton != undefined) {
4262                                        if (secondButton.classList.contains('currentItem')) {
4263                                            if (thirdButton != undefined)
4264                                                thirdButton.classList.add('onlyDesktop');
4265                                            if (fourthButton != undefined)
4266                                                fourthButton.classList.add('onlyDesktop');
4267                                        }
4268                                    }
4269                                    // Si la página actual es la tercera
4270                                    if (thirdButton != undefined) {
4271                                        if (thirdButton.classList.contains('currentItem')) {
4272                                            if (firstButton != undefined)
4273                                                firstButton.classList.add('onlyDesktop');
4274                                            if (fourthButton != undefined)
4275                                                fourthButton.classList.add('onlyDesktop');
4276                                        }
4277                                    }
4278                                }
4279                            }
4280
4281                            // Si la página actual está entre las 3 últimas
4282                            if (secondButton != undefined) {
4283                                if (secondButton.classList.contains('module-pagination_list_dots') && list.querySelectorAll('.module-pagination_list_dots').length == 1) {
4284                                    module.classList.add('last-pages');
4285
4286                                    // Si la página actual es el tercer item
4287                                    if (thirdButton != undefined) {
4288                                        if (thirdButton.classList.contains('currentItem')) {
4289                                            if (fifthButton != undefined)
4290                                                fifthButton.classList.add('onlyDesktop');
4291                                            if (sixthButton != undefined)
4292                                                sixthButton.classList.add('onlyDesktop');
4293                                        }
4294                                    }
4295                                    // Si la página actual es el cuarto item
4296                                    if (fourthButton != undefined) {
4297                                        if (fourthButton.classList.contains('currentItem')) {
4298                                            if (list.querySelectorAll('li').length > 4) {
4299                                                if (thirdButton != undefined)
4300                                                    thirdButton.classList.add('onlyDesktop');
4301                                                if (sixthButton != undefined)
4302                                                    sixthButton.classList.add('onlyDesktop');
4303                                            }
4304                                        }
4305                                    }
4306                                    // Si la página actual es el quinto item
4307                                    if (fifthButton != undefined) {
4308                                        if (fifthButton.classList.contains('currentItem')) {
4309                                            if (list.querySelectorAll('li').length > 5) {
4310                                                if (thirdButton != undefined)
4311                                                    thirdButton.classList.add('onlyDesktop');
4312                                                if (fourthButton != undefined)
4313                                                    fourthButton.classList.add('onlyDesktop');
4314                                            }
4315                                            if (list.querySelectorAll('li').length == 5) {
4316                                                if (thirdButton != undefined)
4317                                                    thirdButton.classList.add('onlyDesktop');
4318                                            }
4319                                        }
4320                                    }
4321                                }
4322                            }
4323
4324                            // Si la página actual está en las páginas centrales
4325                            if (list.querySelectorAll('.module-pagination_list_dots').length === 2) {
4326                                module.classList.add('middle-pages');
4327
4328                                if (thirdButton != undefined)
4329                                    thirdButton.classList.add('onlyDesktop');
4330                                if (fifthButton != undefined)
4331                                    fifthButton.classList.add('onlyDesktop');
4332                            }
4333
4334                            // Si la páginas totales son menores a 6
4335                            if (list.querySelectorAll('.module-pagination_list_dots').length === 0) {
4336                                module.classList.add('few-pages');
4337
4338                                // Si la página actual es la primera, segunda o tercera
4339                                if (firstButton != undefined) {
4340                                    if (firstButton.classList.contains('currentItem')) {
4341                                        if (fifthButton != undefined)
4342                                            fifthButton.classList.add('onlyDesktop');
4343                                    }
4344                                }
4345                                if (secondButton != undefined) {
4346                                    if (secondButton.classList.contains('currentItem')) {
4347                                        if (fifthButton != undefined)
4348                                            fifthButton.classList.add('onlyDesktop');
4349                                    }
4350                                }
4351                                if (thirdButton != undefined) {
4352                                    if (thirdButton.classList.contains('currentItem')) {
4353                                        if (fifthButton != undefined)
4354                                            fifthButton.classList.add('onlyDesktop');
4355                                    }
4356                                }
4357                            }
4358                        }
4359
4360                        module.style.display = 'block';
4361                    });
4362                }
4363            };
4364        }
4365
4366        module.exports = modulePagination;
4367
4368    }, {}
4368], 25: [function (require, module, exports) {
4369        /* ---------------------------------------------------------------------------
4370        
4371        Module Product Distributor
4372        
4373        --------------------------------------------------------------------------- */
4374        var commons = require('../modules/commons'),
4375            resizeInterval,
4376            timer;
4377
4378        var moduleProductDistributor = new function () {
4379
4380            return {
4381                init: function () {
4382                    moduleProductDistributor.createCarousel($('.module-product-distributor-slider .module-product-distributor_items'));
4383                    commons.setCarouselGrid('.module-product-distributor-slider');
4384                },
4385
4386                resize: function () {
4387                    clearTimeout(resizeInterval);
4388
4389                    moduleProductDistributor.setItemHeight();
4390                    commons.setCarouselGrid('.module-product-distributor-slider');
4391
4392                    resizeInterval = setTimeout(function () {
4393                        commons.setCarouselGrid('.module-product-distributor-slider');
4394                    }, 100);
4395                },
4396
4397                setItemHeight: function () {
4398                    var $module = jQuery('.module-product-distributor');
4399
4400                    clearTimeout(timer);
4401
4402                    $module.each(function (index, el) {
4403                        $this = jQuery(el).find('.module-content');
4404
4405                        // case normal layout
4406                        if ($this.hasClass('style01')) {
4407                            var $itemRow = $this.find('.module-product-distributor_items_row');
4408                            $itemRow.each(function (index, el) {
4409                                $this = jQuery(el)
4410                                $child = $this.find('.module-product-distributor_item')
4411
4412                                if (window.window_width >= 675) {
4413                                    $child.removeAttr('style');
4414                                    $child.css({ 'height': commons.getMaxHeight($child) })
4415                                } else {
4416                                    $child.removeAttr('style')
4417                                }
4418                            });
4419                        } else {
4420                            // case slider layout
4421                            $child = $this.find('.module-product-distributor_item');
4422
4423                            var $contents = $child.find('.module_carousel_item_list_content'),
4424                                _h = 0;
4425
4426                            timer = setTimeout(function () {
4427
4428                                $contents.css('height', 'auto');
4429
4430                                $contents.each(function (key, val) {
4431
4432                                    var $content = jQuery(this),
4433                                        contentH = $content.height();
4434
4435                                    _h = Math.max(_h, contentH);
4436
4437                                });
4438
4439                                $contents.css('height', _h);
4440
4441                            }, 100);
4442                        }
4443                    });
4444                },
4445
4446                createCarousel: function (o) {
4447                    var obj = o
4448                    if (obj.length) {
4449                        if (!(obj.hasClass('slick-slider'))) {
4450                            obj.on('init', function (event, slick) {
4451                                setTimeout(function () {
4452                                    moduleProductDistributor.setItemHeight();
4453                                }, 100);
4454                            })
4455
4456                            obj.slick({
4457                                dots: true,
4458                                infinite: true,
4459                                speed: 400,
4460                                // arrows: false,
4461                                slidesToShow: 2,
4462                                slidesToScroll: 1,
4463                                responsive: [
4464                                    {
4465                                        breakpoint: 675,
4466                                        settings: {
4467                                            slidesToShow: 1
4468                                        }
4469                                    }
4470                                ]
4471                            });
4472                        }
4473                    }
4474                },
4475
4476                // TEMP Fn
4477                wrapItems: function (o) {
4478                    var obj = o,
4479                        article = obj.find('.module-product-distributor_item'),
4480                        size = article.size()
4481
4482                    for (var i = 0; i < size; i += 2) {
4483                        article.slice(i, i + 2)
4484                            .wrapAll("<div class='module-product-distributor_custom_wrap'></div>");
4485                    }
4486
4487                    moduleProductDistributor.createCarousel(o)
4488                },
4489
4490                unwrapItems: function (o) {
4491                    o
4492                        .find('.module-product-distributor_custom_wrap')
4493                        .contents()
4494                        .unwrap()
4495                        .siblings('.module-product-distributor_custom_wrap')
4496                        .remove();
4497
4498                    moduleProductDistributor.createCarousel(o)
4499                }
4500            };
4501        }
4502
4503        module.exports = moduleProductDistributor;
4504    }, { "../modules/commons": 3 }
4504], 26: [function (require, module, exports) {
4505        /* ---------------------------------------------------------------------------
4506        
4507        Module product menu
4508        
4509        --------------------------------------------------------------------------- */
4510        var $general,
4511            $module,
4512            $moduleFixed,
4513            $buttons,
4514            timer,
4515            lastScroll = 0,
4516            navPosition = 0;
4517
4518        var moduleProductMenu = new function () {
4519
4520            return {
4521                init: function () {
4522
4523                    $general = jQuery('#general');
4524                    $module = jQuery('.module-product-menu');
4525
4526                    // Clonamos el módulo para la versión fija que aparece al hacer scroll
4527                    $moduleFixed = $module
4528                        .clone()
4529                        .addClass('fixed')
4530                        .appendTo($general);
4531
4532
4533                    moduleProductMenu.setButtons();
4534
4535                },
4536                setButtons: function () {
4537
4538                    $buttons = jQuery('.module-product-menu .module-button');
4539
4540                    $buttons.on('click', function () {
4541
4542                        var $button = jQuery(this),
4543                            $list = $button.siblings('.module-list'),
4544                            listHei = $list[0].scrollHeight;
4545
4546                        clearTimeout(timer);
4547
4548                        $button.toggleClass('open');
4549
4550                        if ($button.hasClass('open') === true) {
4551
4552                            $list.css('height', listHei);
4553
4554                            timer = setTimeout(function () {
4555
4556                                $list.css('height', 'auto');
4557
4558                            }, 8520);
4559
4560                        } else {
4561
4562                            $list.css('height', listHei);
4563
4564                            timer = setTimeout(function () {
4565
4566                                $list.css('height', 0);
4567
4568                            }, 10);
4569
4570                        }
4571
4572                    });
4573
4574                },
4575                scroller: function () {
4576
4577                    if ($module === undefined || $module.length <= 0) {
4578                        return false;
4579                    }
4580
4581                    var $body = jQuery('body'),
4582                        posY = $body.scrollTop() || document.documentElement.scrollTop,
4583                        modulePos = $module.offset().top,
4584                        moduleHei = $module.outerHeight(),
4585                        translate;
4586
4587                    if (posY > (modulePos + moduleHei)) {
4588
4589                        $moduleFixed.addClass('visible');
4590
4591                    } else {
4592
4593                        $moduleFixed.removeClass('visible');
4594
4595                    }
4596
4597                    navPosition += lastScroll - posY;
4598                    navPosition = Math.max(-$moduleFixed.find('.module-button').outerHeight(), navPosition);
4599                    navPosition = Math.min(0, navPosition);
4600                    translate = navPosition.toFixed(0);
4601
4602                    $moduleFixed.css({
4603                        '-webkit-transform': 'translateY(' + translate + 'px) translateZ(0)',
4604                        'transform': 'translateY(' + translate + 'px) translateZ(0)'
4605                    });
4606
4607                    lastScroll = posY;
4608
4609                }
4610            };
4611        }
4612
4613        module.exports = moduleProductMenu;
4614    }, {}], 27: [function (require, module, exports) {
4615        /* ---------------------------------------------------------------------------
4616        
4617        Module product resume
4618        
4619        --------------------------------------------------------------------------- */
4620        var $module,
4621            $info,
4622            $button,
4623            $documentationLink,
4624            initHeight,
4625            timer;
4626
4627        var moduleProductResume = new function () {
4628
4629            return {
4630                init: function () {
4631
4632                    $module = jQuery('.module-product-resume');
4633                    $info = $module.find('.module-documentation-list');
4634                    $button = $module.find('.button-toggle-text');
4635                    $documentationLink = $module.find('.module-documentation-link');
4636                    initHeight = $info.height();
4637
4638                    $button.on('click', function () {
4639
4640                        $info.toggleClass('open');
4641
4642                        if ($info.hasClass('open') === true) {
4643
4644                            // Abrimos el contenido
4645                            var _h = $info[0].scrollHeight;
4646
4647                            $info.css('height', _h);
4648
4649                            timer = setTimeout(function () {
4650
4651                                $info.css('height', 'auto');
4652
4653                            }, 720);
4654
4655                        } else {
4656
4657                            // Cerramos el contenido
4658                            var _h = $info[0].scrollHeight;
4659
4660                            $info.css('height', _h);
4661
4662                            timer = setTimeout(function () {
4663
4664                                $info.css('height', initHeight);
4665
4666                            }, 20);
4667
4668                        }
4669
4670                    });
4671
4672                    // Función para animar el ancla de ver toda la documentación a la capa correspondiente
4673                    $documentationLink.on('click', function (e) {
4674
4675                        e.preventDefault();
4676
4677                        var $link = jQuery(this),
4678                            dest = $link.attr('href'),
4679                            dest = dest.replace('#', ''),
4680                            $element = jQuery('a[name="' + dest + '"]'),
4681                            $header = jQuery('#header'),
4682                            headerHeight = 0;
4683
4684                        if ($header !== undefined && $header.length > 0) {
4685                            headerHeight = $header.height();
4686                        }
4687
4688                        var posY = $element.offset().top - headerHeight - 20;
4689
4690                        jQuery('html, body').animate({
4691                            scrollTop: posY
4692                        }, 400);
4693
4694                    });
4695
4696                },
4697                resize: function () {
4698                    /*Disabled bottom "ver mas" */
4699                   // return false;
4700
4701                    if ($module === undefined || $module.length <= 0) {
4702                        return false;
4703                    }
4704
4705                    var contentHeight = $info[0].scrollHeight;
4706
4707                    if (contentHeight > 200) {
4708
4709                        $info.removeClass('visible');
4710
4711                        var height = $info.height();
4712
4713                        // Si es mayor a 200px de altura, aplicamos la funcionalidad del ver más. En caso contrario la eliminamos
4714                        if (contentHeight > height + 30) {
4715
4716                            $info.addClass('overflow');
4717
4718                        } else {
4719
4720                            $info.removeClass('overflow');
4721
4722                        }
4723
4724                    } else {
4725
4726                        // En caso de ser inferior a 200, lo mostramos directamente
4727                        $info
4728                            .addClass('visible')
4729                            .removeClass('overflow');
4730
4731                    }
4732
4733
4734                }
4735            };
4736        }
4737
4738        module.exports = moduleProductResume;
4739    }, {}
4739], 28: [function (require, module, exports) {
4740        /* ---------------------------------------------------------------------------
4741        
4742        Module Registration Header
4743        
4744        --------------------------------------------------------------------------- */
4745        var $html,
4746            $body,
4747            $content,
4748            $module,
4749            $circles,
4750            $button,
4751            $layerButton,
4752            $fixedBar,
4753            $resume,
4754            $layerResume,
4755            $layerResumeContent,
4756            $resumeContent,
4757            scrollTop;
4758
4759        var moduleRegistrationHeader = new function () {
4760
4761            return {
4762                init: function () {
4763
4764                    $html = jQuery('html');
4765                    $body = jQuery('body');
4766                    $content = jQuery('.content');
4767                    $module = jQuery('.module-registration-header');
4768                    $circles = $module.find('.circle_complete');
4769                    $button = $module.find('.module_button');
4770                    $layerButton = jQuery('.registration_resume-close_button');
4771                    $resume = jQuery('.registration_resume');
4772                    $resumeContent = jQuery('.registration_resume-content');
4773
4774                    window.updateSteps = function (step) {
4775
4776                        var $modules = jQuery('.module-registration-header'),
4777                            actualStep = step;
4778
4779                        jQuery.each($modules, function (key, val) {
4780
4781                            var $module = jQuery(val),
4782                                $li = $module.find('.module_list-element');
4783
4784                            // Eliminamos las clases complete y active de todos los elementos
4785                            $li.removeClass('complete active inactive');
4786
4787                            jQuery.each($li, function (key, val) {
4788
4789                                var $el = jQuery(val),
4790                                    step = actualStep - 1;
4791
4792                                if (key < step) {
4793
4794                                    // Si el paso es mayor que el índice está completado
4795                                    $el.addClass('complete');
4796
4797                                } else if (key === step) {
4798
4799                                    // Si el paso es igual que el índice está activo
4800                                    $el.addClass('active');
4801
4802                                } else {
4803
4804                                    // Si el paso es mayor que el índice está inactivo
4805                                    $el.addClass('inactive');
4806
4807                                }
4808
4809                            });
4810
4811                        });
4812                    }
4813
4814                    window.updatePercentages = function () {
4815
4816                        var $circles = jQuery('.circle_complete');
4817
4818                        $circles.each(function () {
4819
4820                            var $circle = jQuery(this),
4821                                radius = $circle.attr('r'),
4822                                $li = $circle.closest('.module_list-element'),
4823                                perc = $li.attr('data-perc'),
4824                                $number = $li.find('.number-data'),
4825                                zero,
4826                                newOffset,
4827                                opacity;
4828
4829                            zero = Math.PI * radius * 2;
4830                            newOffset = zero - (zero * (perc / 100));
4831
4832                            opacity = (.3 + (.7 * (Number(perc) / 100)));
4833
4834                            $circle.css('stroke-dashoffset', newOffset);
4835                            $number.css('opacity', opacity);
4836
4837                        });
4838
4839                    }
4840
4841                    $circles.each(function () {
4842
4843                        var $circle = jQuery(this),
4844                            radius = $circle.attr('r'),
4845                            $li = $circle.closest('.module_list-element'),
4846                            initOffset;
4847
4848                        initOffset = Math.PI * radius * 2;
4849
4850                        $circle.css({
4851                            'stroke-dasharray': initOffset,
4852                            'stroke-dashoffset': initOffset
4853                        });
4854
4855                    });
4856
4857                    $button.on('click', function () {
4858
4859                        if (window.window_width > 1279) {
4860
4861                            $module.toggleClass('no_resume');
4862
4863                        } else {
4864
4865                            $module.toggleClass('tablet_resume');
4866
4867                            if ($module.hasClass('tablet_resume') === true) {
4868
4869                                $html.addClass('lock');
4870
4871                            } else {
4872
4873                                $html.removeClass('lock');
4874
4875                            }
4876
4877                        }
4878
4879                    });
4880
4881                    $layerButton.on('click', function (e) {
4882
4883                        if (window.window_width > 1279) {
4884                            return false;
4885                        }
4886
4887                        $html.removeClass('lock');
4888                        $('.module-registration-header').removeClass('tablet_resume');
4889
4890                    });
4891
4892                    $('.registration_resume').on('click', function (e) {
4893
4894                        if (window.window_width > 1279) {
4895                            return false;
4896                        }
4897
4898                        $html.removeClass('lock');
4899                        $('.module-registration-header').removeClass('tablet_resume');
4900
4901                    });
4902
4903                    $resumeContent.on('click', function (e) {
4904
4905                        e.stopPropagation();
4906
4907                    });
4908
4909                    $fixedBar = $module
4910                        .clone()
4911                        .addClass('fixed')
4912                        .appendTo($content);
4913
4914                    $body
4915                        .append('<div class="registration_resume-layer"><div class="registration_resume-layer_container"><div class="registration_resume-layer_content"></div></div></div>');
4916
4917                    $layerResume = jQuery('.registration_resume-layer');
4918                    $layerResumeContent = jQuery('.registration_resume-layer_content');
4919
4920                    $html.on('click', '.module-registration-header.fixed .module_button', function () {
4921
4922                        var $button = jQuery(this);
4923
4924                        if ($layerResume.hasClass('open') === false) {
4925
4926                            $button.addClass('layerOpen');
4927
4928                            $layerResumeContent
4929                                .empty()
4930                                .append($resumeContent.html());
4931
4932                            $layerResume
4933                                .addClass('open');
4934
4935                            if (window.window_width < 1280) {
4936
4937                                scrollTop = jQuery(window).scrollTop();
4938
4939                                $html.addClass('lock');
4940
4941                                jQuery('#general').css({
4942                                    'height': 'auto',
4943                                    'overflow': 'visible'
4944                                });
4945                                jQuery('#header').css({
4946                                    'margin-top': '-' + scrollTop + 'px'
4947                                });
4948                                // jQuery('.content').css({
4949                                // 	'-webkit-transform' : 'translateY(-' + scrollTop + 'px)',
4950                                // 	'transform' 		: 'translateY(-' + scrollTop + 'px)'
4951                                // });
4952
4953                                setTimeout(function () {
4954                                    jQuery(window).trigger('resize');
4955                                }, 720);
4956
4957                            }
4958
4959                        } else {
4960
4961                            $button.removeClass('layerOpen');
4962
4963                            $layerResume
4964                                .removeClass('open');
4965
4966                            if (window.window_width < 1280) {
4967
4968                                jQuery('#general').css({
4969                                    'height': '',
4970                                    'overflow': ''
4971                                });
4972                                jQuery('#header').css({
4973                                    'margin-top': 0
4974                                });
4975                                jQuery('.content').css({
4976                                    '-webkit-transform': '',
4977                                    'transform': ''
4978                                });
4979                                $html.removeClass('lock');
4980                                jQuery('body, html').scrollTop(scrollTop);
4981
4982                            }
4983
4984                        }
4985
4986                    });
4987
4988                    $html.on('click', '.registration_resume-layer .registration_resume-layer_content', function () {
4989
4990                        var $button = jQuery('.module-registration-header.fixed .module_button');
4991
4992                        $button.removeClass('layerOpen');
4993
4994                        $layerResume
4995                            .removeClass('open');
4996
4997                        if (window.window_width < 1280) {
4998
4999                            jQuery('#general').css({
5000                                'overflow': ''
5001                            });
5002                            jQuery('#header').css({
5003                                'margin-top': 0
5004                            });
5005                            jQuery('.content').css({
5006                                '-webkit-transform': '',
5007                                'transform': ''
5008                            });
5009                            $html.removeClass('lock');
5010                            jQuery('body, html').scrollTop(scrollTop);
5011
5012                        }
5013
5014                    });
5015
5016                    setTimeout(function () {
5017                        window.updatePercentages();
5018                    }, 1000);
5019
5020                },
5021                scroller: function () {
5022
5023                    if ($module === undefined || $fixedBar === undefined) {
5024                        return false;
5025                    }
5026
5027                    if ($module.length === 0 || $fixedBar.length === 0) {
5028                        return false;
5029                    }
5030
5031                    if (jQuery('#header').hasClass('lightbox') === true) {
5032                        return false;
5033                    }
5034
5035                    var moduleY = $module.offset().top + $module.height(),
5036                        scrollY = (window.pageYOffset || document.documentElement.scrollTop) - (document.documentElement.clientTop || 0);
5037
5038                    if (scrollY > moduleY) {
5039
5040                        $fixedBar.addClass('visible');
5041
5042                    } else {
5043
5044                        if (($layerResume.hasClass('open') === false && window.window_width < 1280) || window.window_width >= 1280) {
5045
5046                            $fixedBar.removeClass('visible');
5047                            $layerResume.removeClass('open');
5048                            jQuery('.module-registration-header.fixed .module_button').removeClass('layerOpen');
5049
5050                        }
5051
5052                    }
5053
5054                }
5055            };
5056        }
5057
5058        module.exports = moduleRegistrationHeader;
5059    }, {}], 29: [function (require, module, exports) {
5060        /* ---------------------------------------------------------------------------
5061        
5062        Module Search
5063        
5064        --------------------------------------------------------------------------- */
5065        var $module,
5066            $button,
5067            $input;
5068
5069        var moduleSearch = new function () {
5070            return {
5071                init: function () {
5072
5073                    $module = jQuery('.module-search');
5074                    $button = $module.find('.module-button');
5075                    $input = $module.find('.module-input');
5076
5077                    $input.on('keyup', function () {
5078
5079                        if ($input.val().length > 0) {
5080
5081                            $button.addClass('active');
5082
5083                        } else {
5084
5085                            $button.removeClass('active');
5086
5087                        }
5088
5089                    });
5090
5091                }
5092            };
5093        }
5094
5095        module.exports = moduleSearch;
5096
5097    }, {}], 30: [function (require, module, exports) {
5098        /* ---------------------------------------------------------------------------
5099        
5100        Module header
5101        
5102        --------------------------------------------------------------------------- */
5103        var $modules,
5104            cellWidth = 190;
5105
5106        var moduleTable = new function () {
5107
5108            return {
5109                init: function () {
5110
5111                    $modules = jQuery('.module-table');
5112
5113                    $modules.each(function (key, val) {
5114
5115                        var $module = jQuery(val),
5116                            $tables = $module.find('.table');
5117
5118                        $tables.each(function (key, val) {
5119
5120                            var $table = jQuery(val),
5121                                $tr = $table.find('tr'),
5122                                total = 0;
5123
5124                            // Las celdas tienen como mínimo 190px de ancho a no ser que la tabla tenga la clase wysiwyg, que sube a 250
5125                            if ($table.hasClass('wysiwyg') === true) {
5126                                cellWidth = 250;
5127                            } else if ($table.hasClass('alwaysVisible') === true) {
5128                                if (window.innerWidth <= 930) {
5129                                    cellWidth = 150
5130                                }
5131                            }
5132
5133                            $tr.each(function () {
5134                                var $row = jQuery(this),
5135                                    $cells = $row.find('th, td');
5136
5137                                if ($cells.length > total) {
5138                                    total = $cells.length;
5139                                }
5140                            });
5141
5142                            $table.css('min-width', (cellWidth * total) + 'px');
5143
5144                        });
5145
5146                    });
5147
5148                }
5149            };
5150        }
5151
5152        module.exports = moduleTable;
5153    }, {}
5153], 31: [function (require, module, exports) {
5154        /* ---------------------------------------------------------------------------
5155        
5156        Module team detail
5157        
5158        --------------------------------------------------------------------------- */
5159        var touchStartCoords = { 'x': -1, 'y': -1 },
5160            touchEndCoords = { 'x': -1, 'y': -1 },
5161            direction = 'undefined',
5162            minDistanceXAxis = 30,
5163            maxDistanceYAxis = 30,
5164            maxAllowedTime = 1000,
5165            startTime = 0,
5166            elapsedTime = 0;
5167
5168
5169        var moduleTeamDetail = new function () {
5170
5171            return {
5172                init: function () {
5173                    targetElement = document.querySelector('.imageWrapper');
5174
5175                    if ((typeof targetElement != 'undefined') && (targetElement != null)) {
5176                        moduleTeamDetail.addMultipleListeners(targetElement, 'mousedown touchstart', moduleTeamDetail.swipeStart);
5177                        moduleTeamDetail.addMultipleListeners(targetElement, 'mousemove touchmove', moduleTeamDetail.swipeMove);
5178                        moduleTeamDetail.addMultipleListeners(targetElement, 'mouseup touchend', moduleTeamDetail.swipeEnd);
5179                    }
5180
5181                },
5182
5183                swipeStart: function (e) {
5184                    e = e ? e : window.event;
5185                    e = ('changedTouches' in e) ? e.changedTouches[0] : e;
5186                    touchStartCoords = { 'x': e.pageX, 'y': e.pageY };
5187                    startTime = new Date().getTime();
5188                },
5189
5190                swipeMove: function (e) {
5191                    e = e ? e : window.event;
5192                },
5193
5194                swipeEnd: function (e) {
5195                    e = e ? e : window.event;
5196                    e = ('changedTouches' in e) ? e.changedTouches[0] : e;
5197                    touchEndCoords = { 'x': e.pageX - touchStartCoords.x, 'y': e.pageY - touchStartCoords.y };
5198                    elapsedTime = new Date().getTime() - startTime;
5199
5200                    if (elapsedTime <= maxAllowedTime) {
5201                        if (Math.abs(touchEndCoords.x) >= minDistanceXAxis && Math.abs(touchEndCoords.y) <= maxDistanceYAxis) {
5202                            direction = (touchEndCoords.x < 0) ? 'left' : 'right';
5203                            switch (direction) {
5204                                case 'left':
5205                                    arrow = targetElement.querySelector('.next_link')
5206                                    href = arrow.getAttribute('href')
5207                                    hasClass = arrow.classList.contains('disabled')
5208
5209                                    if (!hasClass) {
5210                                        window.open(href, '_self')
5211                                    }
5212
5213                                    break;
5214                                case 'right':
5215                                    arrow = targetElement.querySelector('.prev_link')
5216                                    href = arrow.getAttribute('href')
5217                                    hasClass = arrow.classList.contains('disabled')
5218
5219                                    if (!hasClass) {
5220                                        window.open(href, '_self')
5221                                    }
5222                                    break;
5223                            }
5224                        }
5225                    }
5226                },
5227
5228                addMultipleListeners: function (el, s, fn) {
5229                    var evts = s.split(' ');
5230                    for (var i = 0, iLen = evts.length; i < iLen; i++) {
5231                        el.addEventListener(evts[i], fn, false);
5232                    }
5233                }
5234            }
5235        }
5236
5237        module.exports = moduleTeamDetail
5238    }, {}], 32: [function (require, module, exports) {
5239        /* ---------------------------------------------------------------------------
5240        
5241        Module team distributor
5242        
5243        --------------------------------------------------------------------------- */
5244        var commons = require('../modules/commons');
5245
5246        var $module,
5247            $list,
5248            $blocks,
5249            $topBlocks,
5250            $newList,
5251            $prevButton,
5252            $nextButton,
5253            _minH,
5254            timer;
5255
5256        var moduleTeamDistributor = new function () {
5257
5258            return {
5259                init: function () {
5260
5261                    $module = jQuery('.module-team-distributor');
5262                    $list = $module.find('.module-list');
5263
5264                    $list.each(function (key, val) {
5265
5266                        $blocks = $(this).find('.module-list_block');
5267                        $total=$blocks.length;
5268
5269                        $newList = "<div class='module-list-cloned'></div>";
5270                        $(this).after($newList);
5271                        $parent=$(this);
5272
5273                        $blocks.each(function (k, v) {
5274                            $newList = $parent.parent().find('.module-list-cloned');
5275                            var $block = $(this),
5276                                $cloned = $block
5277                                    .clone()
5278                                    .attr('class', 'content_block');
5279
5280                            $newList.append($cloned);
5281
5282                        });
5283
5284                        // Creamos el slider para smartphone
5285                        $newList.slick({
5286                            dots: false,
5287                            arrows:true,
5288                            speed: 400,
5289                            slidesToShow: 1,
5290                            infinite: true,
5291                            autoplay: autoplay,
5292                            slidesToScroll: 1,
5293                            autoplaySpeed: 3500
5294                        });
5295
5296                    });
5297
5298
5299                    var autoplay = false;
5300
5301                    if ($module.attr('data-autoplay') === 'true') {
5302                        autoplay = true;
5303                    }
5304
5305                    // Creamos el slider
5306                    $list.slick({
5307                        dots: true,
5308                        speed: 400,
5309                        slidesToShow: 4,
5310                        infinite: false,
5311                        responsive: [
5312                            {
5313                                breakpoint: 930,
5314                                settings: {
5315                                    slidesToShow: 3
5316                                }
5317                            }
5318                        ],
5319                        autoplay: autoplay,
5320                        slidesToScroll: 1,
5321                        autoplaySpeed: 3500
5322                    });
5323
5324                    $list.on('afterChange', function (event, slick, currentSlide, nextSlide) {
5325
5326                        moduleTeamDistributor.resize();
5327
5328                    });
5329
5330
5331
5332
5333                },
5334                resize: function () {
5335
5336                    clearTimeout(timer);
5337
5338                    $topBlocks = $module.find('.module-list_block:first-child');
5339
5340                    // Los bloques superiores se igualan en tamaño para que no se generen "saltos" entre elementos del slider
5341                    timer = setTimeout(function () {
5342
5343                        $topBlocks.css('height', 'auto');
5344
5345                        _minH = commons.getMaxHeight($topBlocks);
5346
5347                        $topBlocks.css('height', _minH + 'px');
5348
5349                    }, 100);
5350
5351                }
5352            };
5353        }
5354
5355        module.exports = moduleTeamDistributor;
5356    }, { "../modules/commons": 3 }
5356], 33: [function (require, module, exports) {
5357        /* ---------------------------------------------------------------------------
5358        
5359        Module team distributor
5360        
5361        --------------------------------------------------------------------------- */
5362        var commons = require('../modules/commons');
5363
5364        var $module,
5365            $list,
5366            $blocks,
5367            $topBlocks,
5368            $newList,
5369            _minH;
5370
5371        var moduleTeam = new function () {
5372
5373            return {
5374                init: function () {
5375                    moduleTeam.linkRedirection();
5376                },
5377
5378                linkRedirection: function () {
5379                    var links = document.querySelectorAll('.module-team button.module_list-name');
5380
5381                    [].forEach.call(links, function (link) {
5382                        link.addEventListener('click', function () {
5383                            link.parentNode.querySelector('.module-list_image').click();
5384                        });
5385                    });
5386                }
5387            };
5388        }
5389
5390        module.exports = moduleTeam;
5391    }, { "../modules/commons": 3 }], 34: [function (require, module, exports) {
5392        /* ---------------------------------------------------------------------------
5393        
5394        Popup General CTA Access
5395        
5396        --------------------------------------------------------------------------- */
5397
5398        var $html;
5399
5400        var popupGeneralCtaAccess = new function () {
5401
5402            return {
5403
5404                init: function () {
5405
5406                    $html = jQuery('html');
5407
5408                    $html.on('click', '.popup-general-cta-access .popup_button', function () {
5409
5410                        var $popup = jQuery('.popup-general-cta-access'),
5411                            $video = $popup.find('.popup_video'),
5412                            src = $video.attr('data-src'),
5413                            $iframe = '<div class="popup_content__iframe"><iframe width="100%" height="100%" src="https://www.youtube.com/embed/' + src + '?autoplay=1&showinfo=0" frameborder="0" allowfullscreen></iframe></div>',
5414                            $wrap = jQuery('.mfp-wrap'),
5415                            $content = $wrap.find('.mfp-content'),
5416                            contentHeight = $content.outerHeight();
5417
5418                        $popup
5419                            .addClass('video')
5420                            .css({
5421                                'height': $(window).outerHeight()
5422                            });
5423
5424                        $video.append($iframe);
5425
5426                        //$wrap.scrollTop((contentHeight / 2) - (window.window_height / 2));
5427
5428                    });
5429
5430                    $html.on('click', '.popup-general-cta-access .button_close_video', function () {
5431
5432                        var $popup = jQuery('.popup-general-cta-access'),
5433                            $iframe = $popup.find('iframe');
5434
5435                        $iframe.remove();
5436                        $popup
5437                            .removeClass('video')
5438                            .removeAttr('style');
5439
5440                    });
5441
5442                },
5443                setButtons: function () {
5444
5445                    var $popup = jQuery('.popup-general-cta-access'),
5446                        $text = $popup.find('.popup_text'),
5447                        $buttons = $popup.find('.popup_buttons_list'),
5448                        $bottom = $popup.find('.popup_bottom');
5449
5450                    $text
5451                        .clone()
5452                        .addClass('cloned')
5453                        .insertBefore($bottom);
5454
5455                    $buttons
5456                        .clone()
5457                        .addClass('cloned')
5458                        .insertBefore($bottom);
5459
5460                }
5461            };
5462        }
5463
5464        module.exports = popupGeneralCtaAccess;
5465    }, {}], 35: [function (require, module, exports) {
5466        /* ---------------------------------------------------------------------------
5467        
5468        Popup Help
5469        
5470        --------------------------------------------------------------------------- */
5471
5472        var popupHelp = new function () {
5473
5474            return {
5475
5476                init: function () {
5477
5478                    jQuery('html').on('click', '.popup-help .close_popup-button', function () {
5479
5480                        var $popup = $.magnificPopup.instance;
5481
5482                        $popup.close();
5483
5484                    });
5485
5486                }
5487            };
5488        }
5489
5490        module.exports = popupHelp;
5491    }, {}
5491], 36: [function (require, module, exports) {
5492        var swipe = require('../lib/touchSwipe'),
5493            items = [],
5494            target;
5495
5496        var slider = new function () {
5497            return {
5498
5499                /* ---------------------------------------------------------------------------
5500        
5501                Este módulo inicializa un slider.
5502        
5503                Parámetros:
5504                    element: string,       ---> clase o id del slider ('.element'/'#element')
5505                    controls: boolean,     ---> mostrar o no las flechas de control (true/false)
5506                    pagination: boolean,   ---> mostrar o no la paginación (true/false)
5507                    paginationContent: string,   ---> clase o id del destino de la paginación
5508                    autoPlay: boolean,     ---> autoplay (true/false)
5509                    animation: string      ---> nombre de la animación.
5510                    loop                   ---> el carrusel va en bucle (true/false)
5511        
5512                --------------------------------------------------------------------------- */
5513
5514                slider: function (config) {
5515
5516                    target = jQuery(config.element);
5517
5518                    //Variables por defecto
5519                    var control_right,
5520                        control_left,
5521                        currentItem;
5522                    var stopIsPlaying = true;
5523                    var isTouch = 'ontouchstart' in document.documentElement;
5524                    var isLoop = false;
5525                    var autoPlayInterval
5526                    var slides = jQuery(config.element).find('li').length;
5527
5528                    if (config.controls === undefined) {
5529                        config.controls = true;
5530                    }
5531                    if (config.liveControls === undefined) {
5532                        config.liveControls = false;
5533                    }
5534                    if (config.pagination === undefined) {
5535                        config.pagination = false;
5536                    }
5537                    if (config.lazyLoad === undefined) {
5538                        config.lazyLoad = false;
5539                    }
5540                    if (config.imageControls === undefined) {
5541                        config.imageControls = false;
5542                    }
5543                    if (config.loop === undefined) {
5544                        config.loop = false;
5545                    }
5546                    if (config.autoPlay === undefined) {
5547                        config.autoPlay = false;
5548                    }
5549                    if (config.animation === undefined) {
5550                        config.animation = false;
5551                    }
5552                    if (config.overlay === undefined) {
5553                        config.overlay = true;
5554                    }
5555
5556                    if (slides <= 1) {
5557                        config.controls = false;
5558                        config.liveControls = false;
5559                        config.pagination = false;
5560                    }
5561
5562                    if (config.overlay === true) {
5563                        target
5564                            .find('.slider li')
5565                            .prepend("<div class='slider-overlay'></div>");
5566                    }
5567
5568                    //Guardamos la lista de elementos en un array
5569                    target.children('ul').children('li').each(function () {
5570                        var elem = jQuery(this);
5571                        items.push(elem);
5572                    });
5573
5574                    // Damos a la lista el tamaño de 100% * número de elementos del array
5575                    target.children('ul').css({
5576                        'width': (items.length * 100) + '%'
5577                    });
5578
5579                    //Establecemos la imagen como background para que se adapte correctamente
5580                    jQuery.each(items, function (key, val) {
5581                        var _w = 100 / items.length,
5582                            _t = -100 * key;
5583
5584                        val.closest('li').css({
5585                            'width': _w + '%'
5586                        });
5587
5588                        jQuery(val).find('.module-list_container').css({
5589                            '-webkit-transform': 'translateX(' + _t + '%)',
5590                            'transform': 'translateX(' + _t + '%)'
5591                        });
5592                    });
5593
5594                    //Añadimos el estilo de la animación
5595                    if (config.animation) {
5596                        target.addClass(config.animation);
5597                    }
5598
5599                    //Controles
5600                    if (config.controls) {
5601                        var controlsTarget = config.controlsContent;
5602                        controlsWrapper = jQuery('<div class="slider_controls"></div>'),
5603                            controlPrev = jQuery('<button class="slider_control prev_control" />'),
5604                            controlNext = jQuery('<button class="slider_control next_control" />');
5605
5606                        controlsWrapper.append(controlPrev);
5607                        controlsWrapper.append(controlNext);
5608                        controlsTarget.append(controlsWrapper);
5609
5610                        controlPrev.on('click', function () {
5611                            clearInterval(autoPlayInterval);
5612                            target.trigger('goToPrev');
5613                        });
5614
5615                        controlNext.on('click', function () {
5616                            clearInterval(autoPlayInterval);
5617                            target.trigger('goToNext');
5618                        });
5619                    }
5620
5621                    //Paginación
5622                    if (config.pagination) {
5623                        if (config.paginationContent === undefined) {
5624
5625                            var paginationWrapper = jQuery('<div class="slider_pagination"></div>');
5626                            target.append(paginationWrapper);
5627                            jQuery.each(items, function (key, val) {
5628                                var title = $(val).data('title')
5629                                var pageNumber = key + 1;
5630                                var pageLink = jQuery('<a href="#slider_page_' + pageNumber + '" id="slider_page_' + pageNumber + '" class="slider_page_' + pageNumber + '"><span class="slider_page_number">0' + pageNumber + '</span><span class="slider_page_title"><span>' + title + '</span></span></a>');
5631                                paginationWrapper.append(pageLink);
5632                                if (pageNumber === 1) {
5633                                    jQuery('.slider_page_' + pageNumber).addClass('active');
5634                                }
5635
5636                                //Evento click de la paginación
5637                                pageLink
5638                                    .on('click touchstart', function (e) {
5639                                        e.preventDefault();
5640
5641                                        if (stopIsPlaying) {
5642                                            currentItem = (key + 1);
5643                                            target.trigger('goTo');
5644                                        }
5645
5646                                        //Detención del autoplay
5647                                        clearInterval(autoPlayInterval);
5648                                    })
5649                            });
5650
5651                        } else {
5652
5653                            jQuery.each(items, function (key, val) {
5654                                var title = $(val).data('title')
5655                                var pageNumber = key + 1;
5656                                var pageLink = jQuery('<a href="#slider_page_' + pageNumber + '" id="slider_page_' + pageNumber + '" class="slider_page_' + pageNumber + ' slider_page"><span class="slider_page_number">0' + pageNumber + '</span><span class="slider_page_title"><span class="slider_page_title-inner">' + title + '<i class="slider_arrow-title slider_arrow-title--right"></span></span></a>');
5657                                config.paginationContent.append(pageLink);
5658                                if (pageNumber === 1) {
5659                                    jQuery('.slider_page_' + pageNumber).addClass('active');
5660                                }
5661
5662                                //Evento click de la paginación
5663                                pageLink
5664                                    .on('click touchstart', function (e) {
5665                                        e.preventDefault();
5666
5667                                        if (stopIsPlaying) {
5668                                            currentItem = (key + 1);
5669                                            target.trigger('goTo');
5670                                        }
5671
5672                                        //Detención del autoplay
5673                                        clearInterval(autoPlayInterval);
5674                                    }).on('mouseover', function (e) {
5675                                        if (window.innerWidth >= 1280) {
5676                                            setMenuNavWidth(jQuery(this))
5677                                        }
5678                                    }).on('mouseout', function (e) {
5679                                        resetMenuNavWidth(jQuery(this))
5680                                    });
5681                            });
5682
5683                        }
5684                    }
5685
5686                    // Set menu nav width
5687                    function setMenuNavWidth(el) {
5688                        var el_width = el.outerWidth(true)
5689                        var title = el.find('.slider_page_title')
5690                        var inner = title.find('.slider_page_title-inner')
5691                        var title_width = inner.outerWidth(true) + 20
5692
5693                        if (title_width > el_width) {
5694                            el.css({ 'width': title_width + 'px' })
5695                        }
5696                        title.css({ 'width': title_width + 'px' })
5697                    }
5698
5699                    // Reset menu nav width
5700                    function resetMenuNavWidth(el) {
5701                        var title = el.find('.slider_page_title')
5702                        title.css({ 'width': '0px' })
5703                        el.css({ 'width': 40 + 'px' })
5704                        //title.removeAttr('style')
5705                    }
5706
5707                    //Autoplay
5708
5709                    function setAutoPlay() {
5710
5711                        clearInterval(autoPlayInterval);
5712
5713                        autoPlayInterval = setInterval(function () {
5714                            if (currentItem < items.length) {
5715                                currentItem++;
5716                            } else {
5717                                currentItem = 1;
5718                            }
5719                            target.trigger('goTo');
5720                        }, config.interval);
5721
5722                    }
5723
5724                    if (config.autoPlay) {
5725                        setAutoPlay();
5726                    }
5727
5728                    //Eventos táctiles
5729                    if (isTouch) {
5730                        target.find('.module-list').swipe({
5731                            swipeLeft: function () {
5732                                target.trigger('goToNext');
5733                            },
5734                            swipeRight: function () {
5735                                target.trigger('goToPrev');
5736                            },
5737                            threshold: 50
5738                        });
5739                    }
5740
5741                    //Inicialización
5742
5743                    //Definición de valores iniciales
5744                    jQuery.each(items, function (key, val) {
5745                        if (key === 0) {
5746                            val.addClass('active');
5747                            currentItem = 1;
5748                            if (config.controls && !config.loop) {
5749                                control_left.addClass('disabled');
5750                            }
5751
5752                            if (config.controls === true) {
5753                                slider.updateButtons(target);
5754                            }
5755                        }
5756                    });
5757
5758                    //Evento saltar entre los elementos del slider
5759                    target.on('goTo', function () {
5760
5761                        if (target.hasClass('change') === false) {
5762
5763                            target.addClass('change');
5764
5765                            if (stopIsPlaying) {
5766                                jQuery(config.element).find('li').removeClass('outRight outLeft inRight inLeft');
5767                                //Añadimos las clases necesarias para realizar las animaciones CSS
5768                                jQuery.each(items, function (key, val) {
5769                                    if (val.hasClass('active')) {
5770                                        if (currentItem < (key + 1)) {
5771                                            if (!isLoop) {
5772                                                jQuery(config.element).find('li.active').addClass('outRight');
5773                                                jQuery(config.element).find('li.active').removeClass('active');
5774                                                items[(currentItem - 1)].addClass('active inRight');
5775                                            } else {
5776                                                isLoop = false;
5777                                                jQuery(config.element).find('li.active').addClass('outLeft');
5778                                                jQuery(config.element).find('li.active').removeClass('active');
5779                                                items[(currentItem - 1)].addClass('active inLeft');
5780                                            }
5781                                            stopIsPlaying = false;
5782                                        }
5783                                        if (currentItem > (key + 1)) {
5784                                            if (!isLoop) {
5785                                                jQuery(config.element).find('li.active').addClass('outLeft');
5786                                                jQuery(config.element).find('li.active').removeClass('active');
5787                                                items[(currentItem - 1)].addClass('active inLeft');
5788                                            } else {
5789                                                isLoop = false;
5790                                                jQuery(config.element).find('li.active').addClass('outRight');
5791                                                jQuery(config.element).find('li.active').removeClass('active');
5792                                                items[(currentItem - 1)].addClass('active inRight');
5793                                            }
5794                                            stopIsPlaying = false;
5795                                        }
5796                                    }
5797                                });
5798
5799                                if (config.controls === true) {
5800                                    slider.updateButtons(target);
5801                                }
5802
5803                                //Clases para deshabilitar los controles
5804                                if (config.controls && !config.loop) {
5805                                    if (currentItem === items.length) {
5806                                        control_right.addClass('disabled');
5807                                    } else if (control_right.hasClass('disabled')) {
5808                                        control_right.removeClass('disabled');
5809                                    }
5810                                    if (currentItem === 1) {
5811                                        control_left.addClass('disabled');
5812                                    } else if (control_left.hasClass('disabled')) {
5813                                        control_left.removeClass('disabled');
5814                                    }
5815                                }
5816                            }
5817                            jQuery(config.element).find('li.active').on('webkitAnimationEnd oAnimationEnd animationend', function () {
5818                                target.removeClass('change');
5819                                stopIsPlaying = true;
5820                                jQuery(config.element).find('li.outLeft').removeClass('outLeft');
5821                                jQuery(config.element).find('li.inLeft').removeClass('inLeft');
5822                                jQuery(config.element).find('li.outRight').removeClass('outRight');
5823                                jQuery(config.element).find('li.inRight').removeClass('inRight');
5824                            });
5825
5826                            //desactivamos/activamos los bullets en función del activo
5827                            jQuery(config.element).find('.slider_page').removeClass('active');
5828                            jQuery(config.element).find('.slider_page_' + currentItem).addClass('active');
5829
5830                        }
5831
5832                        if (config.autoPlay) {
5833                            setAutoPlay();
5834                        }
5835
5836                    });
5837
5838                    //Avanzar
5839                    target.on('goToNext', function () {
5840
5841                        if (target.hasClass('change') === true) {
5842                            return false;
5843                        }
5844
5845                        if (!config.loop) {
5846                            if (currentItem < items.length) {
5847                                currentItem++;
5848                            }
5849                        } else {
5850                            if (currentItem < items.length) {
5851                                currentItem++;
5852                            } else {
5853                                currentItem = 1;
5854                                isLoop = true;
5855                            }
5856                        }
5857                        target.trigger('goTo');
5858
5859                        //Detención del autoplay
5860                        clearInterval(autoPlayInterval);
5861                    });
5862
5863                    //Retroceder
5864                    target.on('goToPrev', function () {
5865
5866                        if (target.hasClass('change') === true) {
5867                            return false;
5868                        }
5869
5870                        if (!config.loop) {
5871                            if (currentItem > 1) {
5872                                currentItem--;
5873                            }
5874                        } else {
5875                            if (currentItem > 1) {
5876                                currentItem--;
5877                            } else {
5878                                currentItem = items.length;
5879                                isLoop = true;
5880                            }
5881                        }
5882                        target.trigger('goTo');
5883
5884                        //Detención del autoplay
5885                        clearInterval(autoPlayInterval);
5886                    });
5887
5888                },
5889                updateButtons: function (slider) {
5890                    var jQueryslider = slider,
5891                        jQuerycontrols = jQueryslider.find('.slider_controls'),
5892                        jQueryprevBtn = jQueryslider.find('#slider_control_left'),
5893                        jQuerynextBtn = jQueryslider.find('#slider_control_right'),
5894                        jQueryactive = jQueryslider.find('li.active'),
5895                        jQueryprev = jQueryactive.prev(),
5896                        jQuerynext = jQueryactive.next();
5897
5898                    if (jQueryactive.is(':first-child') === true) {
5899                        jQueryprev = jQueryslider.find('li:last-child');
5900                    } else if (jQueryactive.is(':last-child') === true) {
5901                        jQuerynext = jQueryslider.find('li:first-child');
5902                    }
5903
5904                    jQueryprevBtn.find('span').html(jQueryprev.attr('data-title'));
5905                    jQuerynextBtn.find('span').html(jQuerynext.attr('data-title'));
5906
5907                    jQuerycontrols.addClass('change');
5908
5909                    setTimeout(function () {
5910                        jQuerycontrols.removeClass('change');
5911                    }, 820);
5912                }
5913            };
5914        }
5915
5916        module.exports = slider;
5917    }, { "../lib/touchSwipe": 1 }], 37: [function (require, module, exports) {
5918        /* ---------------------------------------------------------------------------
5919        
5920        Tooltips
5921        
5922        --------------------------------------------------------------------------- */
5923        var $html,
5924            $body,
5925            $tooltips,
5926            $tooltipsContent;
5927
5928        var tooltip = new function () {
5929
5930            return {
5931                init: function () {
5932
5933                    $html = jQuery('html');
5934                    $body = jQuery('body');
5935                    $tooltips = jQuery('.tooltip_button');
5936                    $tooltipsContent = jQuery('.tooltip_content');
5937
5938                    // Para abrir o cerrar los tooltips
5939                    $body.on('click', '.tooltip_button', function (e) {
5940
5941                        e.stopPropagation();
5942
5943                        if (jQuery(e.target).is('a') === false) {
5944
5945                            e.preventDefault();
5946
5947                        }
5948
5949                        var $tooltip = jQuery(this);
5950
5951                        $tooltip.toggleClass('visible');
5952
5953                        if ($tooltip.hasClass('visible') === true) {
5954
5955                            tooltip.resize();
5956
5957                            scrollTop = jQuery(window).scrollTop();
5958
5959                            setTimeout(function () {
5960                                $html.addClass('hidden');
5961                            }, 10);
5962
5963                            // Comprobamos si está dentro de una caja para gestionar la opacidad
5964                            tooltip.checkBoxTooltip($tooltip, 'open');
5965
5966                            // Comprobamos si está dentro de una tabla para gestionar el comportamiento de la misma
5967                            tooltip.checkTableTooltip($tooltip, 'open');
5968
5969                            // Esta función global es creada por Kabel para gestionar las llamadas al api de analytics
5970                            window.googleTagManagerCall($tooltip);
5971
5972                        } else {
5973
5974                            $html.removeClass('hidden');
5975
5976                            // Comprobamos si está dentro de una caja para gestionar la opacidad
5977                            tooltip.checkBoxTooltip($tooltip, 'close');
5978
5979                            // Comprobamos si está dentro de una tabla para gestionar el comportamiento de la misma
5980                            tooltip.checkTableTooltip($tooltip, 'close');
5981
5982                        }
5983
5984                    });
5985
5986                    // Para cerrar los tooltips al clicar fuera de los mismos
5987                    $body.on('click', function () {
5988
5989                        if ($html.hasClass('hidden') === true) {
5990
5991                            $html.removeClass('hidden lock');
5992
5993                            jQuery('#general').css({
5994                                'overflow': 'overflow',
5995                                'top': 0
5996                            });
5997                            jQuery('body, html').scrollTop(scrollTop);
5998
5999                            var $tooltip = jQuery('.tooltip_button.visible'),
6000                                $tooltips = jQuery('.tooltip_button');;
6001
6002                            $tooltips.removeClass('visible');
6003
6004                            // Comprobamos si está dentro de una tabla para gestionar el comportamiento de la misma
6005                            tooltip.checkTableTooltip($tooltip, 'close');
6006
6007                        }
6008
6009                    });
6010
6011                },
6012                checkBoxTooltip: function ($tooltip, action) {
6013
6014                    // Gestión del tooltip en un chebkox tipo box
6015
6016                    var $label = $tooltip.closest('.radio_box-label'),
6017                        $input = $label.siblings('input[type="radio"]'),
6018                        name = $input.attr('name'),
6019                        $inputs = jQuery('input[name="' + name + '"]'),
6020                        selected = false;
6021
6022                    if ($input.is(':checked') === true) {
6023
6024                        // Si está seleccionado este input, salimos de la función
6025                        return false;
6026
6027                    } else {
6028
6029                        // Si no lo está, comprobamos si alguno de los demás está seleccionado
6030                        $inputs.each(function () {
6031
6032                            var $el = jQuery(this);
6033
6034                            if ($el.is(':checked') === true) {
6035
6036                                selected = true;
6037
6038                            }
6039
6040                        });
6041
6042                        if (selected === false) {
6043
6044                            // Si no hay seleccionado ningún, salimos de la función
6045                            return false;
6046
6047                        }
6048
6049                        // En caso contrario - hay seleccionado algún input que no sea del que desplegamos el tooltip -, en función de la acción mostramos o quitamos su opacidad
6050                        if (action === 'open') {
6051
6052                            $label.css('opacity', 1);
6053
6054                        } else {
6055
6056                            $label.css('opacity', '');
6057
6058                        }
6059
6060                    }
6061
6062                },
6063                checkTableTooltip: function ($tooltip, action) {
6064
6065                    // Gestión del tooltip en una tabla
6066
6067                    var $tableContainer = $tooltip.closest('.module-table_container');
6068
6069                    // Si el tooltip está en una tabla
6070                    if ($tableContainer.length > 0) {
6071
6072                        var _margin = 0,
6073                            table = $tableContainer.find('table');
6074
6075                        if (action === 'open') {
6076
6077                            _margin = $tableContainer.scrollLeft();
6078
6079                            $tableContainer.addClass('tooltip');
6080
6081                        } else {
6082
6083                            $tableContainer.removeClass('tooltip');
6084
6085                        }
6086
6087                        table.css('margin-left', -_margin);
6088
6089                    }
6090
6091                },
6092                resize: function () {
6093
6094                    $tooltipsContent.each(function () {
6095
6096                        var $content = jQuery(this);
6097
6098                        // Posicionamos el contenido en 100% para hacer el cálculo
6099                        $content.css('left', '100%');
6100
6101                        // Hacemos los cálculos para ver si está pegado a la izquierda o derecha y lo colocamos correctamente
6102                        var left = $content.offset().left,
6103                            right = window.window_width - $content.offset().left - $content.outerWidth(),
6104                            leftCss;
6105
6106                        if (left < 20) {
6107
6108                            left = Math.abs(left);
6109                            leftCss = 'calc(100% + 20px + ' + left + 'px)';
6110
6111                        } else if (right < 20) {
6112
6113                            right = Math.abs($content.outerWidth() - (window.window_width - $content.offset().left));
6114                            leftCss = 'calc(100% - 30px - ' + right + 'px)';
6115
6116                        } else {
6117                            leftCss = '100%';
6118                        }
6119
6120                        $content.css('left', leftCss);
6121
6122                    });
6123
6124                }
6125            };
6126        }
6127
6128        module.exports = tooltip;
6129    }, {}], 38: [function (require, module, exports) {
6130        var onLoad = function (functions) {
6131            $(window).on('load',function(){
6132                functions();
6133            });
6134        };
6135
6136        module.exports = onLoad;
6137
6138    }, {}], 39: [function (require, module, exports) {
6139        var onReady = function (functions) {
6140            jQuery(document).ready(function () {
6141                functions();
6142            });
6143        };
6144
6145        module.exports = onReady;
6146
6147    }, {}
6147], 40: [function (require, module, exports) {
6148        var onResize = function (functions) {
6149
6150            /*------------------ Window dimensions ------------------*/
6151
6152            window.window_width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
6153            window.window_height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
6154
6155            /*------------------- On resize event -------------------*/
6156            jQuery(window).on('resize newResize', function (e) {
6157                // Comprobamos que ha habido resize en x, para evitar lanzarlo cuando las barras del navegador desaparecen (Chrome mobile).
6158                var nww = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
6159
6160                if (nww !== window.window_width || e.type === 'newResize') {
6161                    jQuery('body').addClass('resizing');
6162                    functions();
6163
6164                    clearTimeout(window.resizeTimer);
6165                    window.resizeTimer = setTimeout(function () {
6166                        jQuery('body').removeClass('resizing');
6167                    }, 500);
6168
6169                    window.window_width = nww;
6170                    window.window_height = window.innerHeight;
6171                }
6172            });
6173            jQuery(document).ready(function () {
6174                functions();
6175            });
6176        };
6177
6178        module.exports = onResize;
6179
6180    }, {}], 41: [function (require, module, exports) {
6181        var onScroll = function (functions) {
6182            var scrolling = false;
6183            var timeOut,
6184                interval;
6185
6186            if (!jQuery('body').hasClass('ie9') && !jQuery('body').hasClass('ie8')) {
6187                jQuery(window).on('scroll newScroll', function () {
6188                    clearTimeout(timeOut);
6189
6190                    timeOut = setTimeout(function () {
6191                        cancelAnimationFrame(interval);
6192                        scrolling = false;
6193                    }, 250);
6194
6195                    if (scrolling === false) {
6196                        function animationFrame() {
6197                            functions();
6198                            interval = requestAnimationFrame(animationFrame);
6199                        }
6200                        animationFrame();
6201                        scrolling = true;
6202                    }
6203                });
6204            }
6205            jQuery(document).ready(function () {
6206                functions();
6207            });
6208        };
6209
6210        module.exports = onScroll;
6211
6212    }, {}]
6213}, {}, [2]);

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.