';
}
this.wnd.html(html);
if (with_scroll) {
this.wndScroll = new infoBubbleScroll(this.wnd);
}
switch (this.mode) {
case 'project':
element.click(function (e) {
e.preventDefault();
e.stopPropagation();
if (typeof window.projects_list !== 'undefined') {
window.projects_list.focus_project(self.pin.alias);
}
});
break;
case 'contact':
element.bind('click', function (e) {
e.preventDefault();
e.stopPropagation();
self.close();
});
break;
}
if (with_close) {
this.closeBtn = $('
').addClass('infoBubbleClose').appendTo(this.content);
this.closeBtn.bind('click', function (e) {
e.preventDefault();
e.stopPropagation();
self.close();
});
}
this.element = element;
var panes = this.getPanes();
panes.floatPane.appendChild(this.element[0]);
}
var new_map_center = this.pos;
if (typeof this.pin !== 'undefined' && typeof this.pin.map_center === 'function') {
new_map_center = this.pin.map_center();
}
if (!this.no_pan) {
this.map.panTo(new_map_center);
}
};
InfoBubble.prototype.draw = function () {
this.repos();
};
InfoBubble.prototype.repos = function () {
var overlayProjection = this.getProjection(),
position = overlayProjection.fromLatLngToDivPixel(this.pos);
// var containerPosition = overlayProjection.fromLatLngToContainerPixel(this.pos);
switch (this.mode) {
case 'contact':
this.element.css({
left: Math.round(position.x),
top: Math.round(position.y - 14),
zIndex: 1000
});
break;
default:
this.element.css({
left: Math.round(position.x + (this.mode === 'cluster' ? 10 : 20)),
top: Math.round(position.y + (this.mode === 'cluster' ? -10 : 8)),
zIndex: 1000
});
break;
}
if (this.wndScroll) {
this.wndScroll.resize();
}
switch (this.mode) {
case 'contact':
this.content.css({
top: -Math.round(this.content.height()),
left: -Math.round(this.content.width() / 2)
});
break;
default:
this.content.css({ top: -Math.round(this.content.outerHeight(true) / 2) - 8 });
break;
}
};
InfoBubble.prototype.open = function (cb) {
this.setMap(this.refMap);
if (this.hidePinOnOpen) {
if (this.pin) {
this.pin.setMap(null);
} else if (this.cluster) {
this.cluster.clusterIcon_.hide();
}
}
this.open_(cb);
return true;
};
InfoBubble.prototype.open_ = function (cb) {
var self = this,
interval = setInterval(function () {
if (self.element) {
clearInterval(interval);
interval = null;
self.element.css({ display: 'block' });
self.wnd.css({ position: 'absolute' });
self.content.css({ width: Math.min(350, self.wnd.outerWidth(true)) });
self.wnd.css({ position: 'relative' });
if (self.cancelDraggingOnOpen) {
self.refMap.setOptions({ draggable: false });
}
self.opened = true;
if (typeof cb === 'function') {
cb();
}
}
}, 50);
};
InfoBubble.prototype.close = function (cb) {
var self = this,
interval = setInterval(function () {
if (self.element) {
clearInterval(interval);
self.element.css({ display: 'none' });
if (self.hidePinOnOpen) {
if (self.pin) {
self.pin.setMap(self.refMap);
} else if (self.cluster) {
self.cluster.clusterIcon_.show();
}
}
if (self.cancelDraggingOnOpen) {
self.refMap.setOptions({ draggable: true });
}
self.opened = false;
self.close_(cb);
}
}, 50);
return true;
};
InfoBubble.prototype.getPosition = function () {
return this.pos;
};
InfoBubble.prototype.close_ = function (cb) {
this.setMap(null);
if (typeof cb === 'function') {
cb();
}
return true;
};
function infoBubbleScroll(element) {
this.element = element;
this.maxHeight = 450;
this.scrolling = false;
this.scrollerHeight = 0;
this.height = 0;
this.contentHeight = 0;
this.ypos = 0;
this.maxScroll = 0;
this.init();
}
infoBubbleScroll.prototype.init = function () {
this.scroller = this.element.find('.scroller');
this.content = this.element.find('.content');
// this.resize();
};
infoBubbleScroll.prototype.resize = function () {
this.element.css({ height: 'auto' });
this.contentHeight = this.content.outerHeight(true);
if (this.contentHeight > this.maxHeight) {
this.element.addClass('scrolling');
this.element.css({ height: this.maxHeight });
this.height = this.maxHeight;
this.maxScroll = -(this.contentHeight - this.height);
if (!this.scrolling) {
this.scrolling = true;
this.scrollerHeight = Math.round(this.height / this.contentHeight * 100);
this.scroller.css({ height: this.scrollerHeight + '%' });
var self = this;
this.element.mousewheel(function (e) {
e.preventDefault();
e.stopPropagation();
self.ypos += e.deltaY * 30;
self.ypos = Math.max(Math.min(0, self.ypos), self.maxScroll);
self.content.css({ top: self.ypos });
var scrollerTop = self.ypos / self.maxScroll * ((100 - self.scrollerHeight) / 100) * 100;
self.scroller.css({ top: scrollerTop + '%' });
});
}
}
};
module.exports = InfoBubble;
/***/ }),
/***/ 205:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = [{ stylers: [{ invert_lightness: true }] }, {
featureType: "landscape.man_made",
stylers: [{ saturation: -100 }, { lightness: 18 }, { visibility: "simplified" }, { gamma: 0.8 }]
}, {
featureType: "landscape.natural",
stylers: [{ visibility: "simplified" }, { saturation: -100 }, { lightness: 18 }, { gamma: 0.8 }] }, {
featureType: "road",
stylers: [{ hue: "#009a67" }, { invert_lightness: false }, { lightness: -15 }] }, {
featureType: "poi",
stylers: [{ visibility: "off" }] }, { featureType: "transit.station", stylers: [{ invert_lightness: true }]
}, {
featureType: "water",
stylers: [{ lightness: 15 }, { hue: "#0077ff" }, { saturation: -35 }, { gamma: 1.25 }]
}];
/***/ }),
/***/ 206:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'TextsSwitcher',
pre: function pre() {
this.duration = 600;
},
create: function create() {
var self = this;
this.is_switching = false;
this.duration = parseInt(this.element.data('duration') || this.duration);
this.pos = 0;
this.item = [];
this.element.find('.js-item').each(function (i, elm) {
var obj = $(elm),
active = obj.hasClass('active'),
item = {
id: i,
obj: obj,
active: active,
activate: function activate(dir) {
if (this.active == dir) return;
var item = this;
if (dir) {
this.obj.addClass('active');
} else {
this.obj.addClass('inactive');
setTimeout(function () {
item.obj.removeClass('active inactive');
}, self.duration);
}
this.active = dir;
}
};
if (item.active) {
self.pos = item.id;
}
self.item.push(item);
});
},
next: function next(quick, from_user) {
var pos = this.pos + 1;
if (pos > this.item.length - 1) {
pos = 0;
}
this.switchto(pos, true, quick, from_user);
},
prev: function prev(quick, from_user) {
var pos = this.pos - 1;
if (pos < 0) {
pos = this.item.length - 1;
}
this.switchto(pos, false, quick, from_user);
},
switchto: function switchto(pos, dir, quick, from_user) {
if (this.pos == pos) return;
if (this.is_switching) return;
this.is_switching = true;
from_user && this.delegate && this.delegate.element.trigger('switching_to', [this, pos, dir]);
var self = this,
cur = this.item[this.pos],
nxt = this.item[pos];
cur.activate(false);
setTimeout(function () {
nxt.activate(true);
setTimeout(function () {
self.is_switching = false;
}, self.duration);
}, self.duration);
this.pos = pos;
}
});
/***/ }),
/***/ 239:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
Slider = __webpack_require__(162),
TextsSwitcher = __webpack_require__(206),
StaticSliceSlider = __webpack_require__(252),
MapsController = __webpack_require__(197);
var DialNumber = __webpack_require__(250);
__webpack_require__(247);
module.exports = function () {
var about_dial_number = null,
index_main_slider = null,
numbers_slider = null;
window.app.map_modules({
'#news-box': __webpack_require__(200),
'.js-history': __webpack_require__(256),
'#park-svg': __webpack_require__(254),
'.js-projects-list': __webpack_require__(260),
'.js-leaderships': __webpack_require__(207),
'.js-projects-photos-slider': {
module: Slider,
options: {
load_on_demand: true
}
},
'.js-about-dial-number': {
module: DialNumber,
callback: function callback(i) {
about_dial_number = i;
}
},
'.js-number-slider': {
module: Slider,
callback: function callback(i) {
numbers_slider = i;
}
},
'#interactive-map': __webpack_require__(201),
'.js-cars': __webpack_require__(248),
// '.js-stories-slider': {
// module: require('../../lib/slider/Slider'),
// callback: function(i){ window.stories_slider = i; }
// },
// '.js-faces-slider': {
// module: require('../FacesSlider'),
// callback: function(i){ window.faces_slider = i; }
// },
'.js-index-main-slider': {
module: Slider,
callback: function callback(i) {
index_main_slider = i;
}
},
'.js-static-slice-stories-slider': {
module: StaticSliceSlider,
callback: function callback(i) {
window.index_static_slice_stories_slider = i;
window.app.sas.addElement(i.element, function () {
i.show(true);
});
}
},
'.js-index-services-map': __webpack_require__(255),
'.js-flipbook': __webpack_require__(249),
'.js-index-main-texts-switcher': {
module: TextsSwitcher,
options: {
duration: 400
},
callback: function callback(i) {
window.index_main_texts_switcher = i;
}
},
'.js-calendar': __webpack_require__(259),
'#news-box': __webpack_require__(200),
'.js-contacts': __webpack_require__(208),
'.js-floating-menu': __webpack_require__(251),
'.js-vacancies': __webpack_require__(195),
'.js-career-main-slider': {
module: Slider,
options: {
load_on_demand: true
},
callback: function callback(i) {
window.career_main_slider = i;
}
}
});
if (about_dial_number) {
window.app.sas.addElement(about_dial_number.element, function (obj) {
about_dial_number.dial(obj.data('number'));
}, .25);
if (numbers_slider) {
numbers_slider.element.bind('items_switching', function (e, slider, pos, nxt, prev_pos, cur) {
about_dial_number.dial(nxt.element.data('number'));
});
var captions = numbers_slider.element.find('.stage2').find('.slide');
if (captions.length) {
numbers_slider.element.bind('items_switching', function (e, slider, pos, nxt, prev_pos, cur) {
captions.removeClass('active');
setTimeout(function () {
$(captions[pos]).addClass('active');
}, 500);
});
}
}
}
$('.js-to-vacancy-list').unbind('click').click(function () {
window.app.scrollTo($('section.vacancies'), 750, null, -88);
});
if (index_main_slider) {
index_main_slider.element.bind('items_switching', function (e, slider, pos, nxt, prev_pos, cur) {
window.index_main_texts_switcher.switchto(pos, true);
});
$('.js-company_video-trigger').click(function () {
typeof index_main_slider != 'undefined' && index_main_slider.set_user_interacted();
});
}
// window.stories_slider.element.bind('items_switching',function(e,slider,pos,nxt,prev_pos,cur){
// var moved, dir;
// if( pos > prev_pos ){
// if( prev_pos == 0 && pos == slider.item.length - 1 ){
// dir = false;
// moved = 1;
// }else{
// dir = true;
// moved = pos - prev_pos;
// }
// }else{
// if( pos == 0 && prev_pos == slider.item.length - 1 ){
// dir = true;
// moved = 1;
// }else{
// dir = false;
// moved = prev_pos - pos;
// }
// }
// window.faces_slider.switchto(dir,moved);
// window.index_static_slice_stories_slider.switchto(pos,true);
// });
// window.faces_slider.element.bind('switchto',function(e,slider,pos){
// window.stories_slider.switch_item(pos);
// });
(function () {
var index_map_box = $('.js-index-map-box'),
box = index_map_box.find('.js-box'),
box_width = 0,
opened = false,
index_map_box_timer = null,
close_maps = function close_maps() {
index_map_box.removeClass('active').css({ width: 0 });
window.maps_controller.yandex_maps['index-yandex-map'].element.removeClass('active');
window.maps_controller.google_maps['index-google-map'].element.removeClass('active');
index_map_box_timer = setTimeout(function () {
index_map_box.addClass('hidden');
}, 600);
},
clearTimer = function clearTimer() {
if (index_map_box_timer) {
clearTimeout(index_map_box_timer);
index_map_box_timer = null;
}
},
close_map_btn = $('.js-close-map').click(close_maps);
window.app.add_resize({
resize: function resize() {
box_width = window.container_width / 2;
box.css({ width: box_width });
if (opened) {
index_map_box.css({ width: box_width });
}
}
});
$('.js-trigger-index-yandex-map').click(function () {
if (typeof window.maps_controller.yandex_maps['index-yandex-map'] !== 'undefined') {
close_maps();
clearTimer();
index_map_box.addClass('active').css({ width: box_width });
opened = true;
window.maps_controller.yandex_maps['index-yandex-map'].create_map();
window.maps_controller.yandex_maps['index-yandex-map'].element.addClass('active');
}
});
$('.js-trigger-index-google-map').click(function () {
if (typeof window.maps_controller.google_maps['index-google-map'] != 'undefined') {
close_maps();
clearTimer();
index_map_box.addClass('active').css({ width: box_width });
opened = true;
window.maps_controller.google_maps['index-google-map'].create_map();
window.maps_controller.google_maps['index-google-map'].element.addClass('active');
}
});
})();
$('.js-index-service').each(function (i, elm) {
var obj = $(elm),
tmr = false,
mo = false,
busy = false;
obj.bind('mouseenter mouseleave', function (e) {
switch (e.type) {
case 'mouseenter':
mo = true;
if (busy) return;
busy = true;
obj.addClass('mouseenter');
setTimeout(function () {
obj.removeClass('mouseleave');
busy = false;
if (!mo) {
obj.trigger('mouseleave');
}
}, 800);
break;
case 'mouseleave':
mo = false;
if (busy) return;
obj.addClass('mouseleave').removeClass('mouseenter');
setTimeout(function () {
obj.removeClass('mouseleave');
busy = false;
if (mo) {
obj.trigger('mouseenter');
}
}, 800);
break;
}
});
});
new MapsController();
$(window).trigger('scroll');
};
/***/ }),
/***/ 247:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/* turn.js 4.1.0 | Copyright (c) 2012 Emmanuel Garcia | turnjs.com | turnjs.com/license.txt */
(function (f) {
function J(a, b, c) {
if (!c[0] || "object" == _typeof(c[0])) return b.init.apply(a, c);if (b[c[0]]) return b[c[0]].apply(a, Array.prototype.slice.call(c, 1));throw q(c[0] + " is not a method or property");
}function l(a, b, c, d) {
return { css: { position: "absolute", top: a, left: b, overflow: d || "hidden", zIndex: c || "auto" } };
}function S(a, b, c, d, e) {
var h = 1 - e,
f = h * h * h,
g = e * e * e;return j(Math.round(f * a.x + 3 * e * h * h * b.x + 3 * e * e * h * c.x + g * d.x), Math.round(f * a.y + 3 * e * h * h * b.y + 3 * e * e * h * c.y + g * d.y));
}function j(a, b) {
return { x: a, y: b };
}function F(a, b, c) {
return z && c ? " translate3d(" + a + "px," + b + "px, 0px) " : " translate(" + a + "px, " + b + "px) ";
}function G(a) {
return " rotate(" + a + "deg) ";
}function n(a, b) {
return Object.prototype.hasOwnProperty.call(b, a);
}function T() {
for (var a = ["Moz", "Webkit", "Khtml", "O", "ms"], b = a.length, c = ""; b--;) {
a[b] + "Transform" in document.body.style && (c = "-" + a[b].toLowerCase() + "-");
}return c;
}function P(a, b, c, d, e) {
var h,
f = [];if ("-webkit-" == w) {
for (h = 0; h < e; h++) {
f.push("color-stop(" + d[h][0] + ", " + d[h][1] + ")");
}a.css({ "background-image": "-webkit-gradient(linear, " + b.x + "% " + b.y + "%," + c.x + "% " + c.y + "%, " + f.join(",") + " )" });
} else {
var b = { x: b.x / 100 * a.width(), y: b.y / 100 * a.height() },
c = { x: c.x / 100 * a.width(), y: c.y / 100 * a.height() },
g = c.x - b.x;h = c.y - b.y;var i = Math.atan2(h, g),
x = i - Math.PI / 2,
x = Math.abs(a.width() * Math.sin(x)) + Math.abs(a.height() * Math.cos(x)),
g = Math.sqrt(h * h + g * g),
c = j(c.x < b.x ? a.width() : 0, c.y < b.y ? a.height() : 0),
k = Math.tan(i);h = -1 / k;k = (h * c.x - c.y - k * b.x + b.y) / (h - k);c = h * k - h * c.x + c.y;b = Math.sqrt(Math.pow(k - b.x, 2) + Math.pow(c - b.y, 2));for (h = 0; h < e; h++) {
f.push(" " + d[h][1] + " " + 100 * (b + g * d[h][0]) / x + "%");
}a.css({ "background-image": w + "linear-gradient(" + -i + "rad," + f.join(",") + ")" });
}
}function t(a, b, c) {
a = f.Event(a);b.trigger(a, c);return a.isDefaultPrevented() ? "prevented" : a.isPropagationStopped() ? "stopped" : "";
}function q(a) {
function b(a) {
this.name = "TurnJsError";this.message = a;
}b.prototype = Error();b.prototype.constructor = b;return new b(a);
}function D(a) {
var b = { top: 0, left: 0 };do {
b.left += a.offsetLeft, b.top += a.offsetTop;
} while (a = a.offsetParent);return b;
}var z,
U,
w = "",
K = Math.PI,
L = K / 2,
u = "ontouchstart" in window,
r = u ? { down: "touchstart", move: "touchmove", up: "touchend", over: "touchstart", out: "touchend" } : { down: "mousedown", move: "mousemove", up: "mouseup", over: "mouseover", out: "mouseout" },
p = { backward: ["bl", "tl"], forward: ["br", "tr"], all: "tl bl tr br l r".split(" ") },
V = ["single", "double"],
W = ["ltr", "rtl"],
X = { acceleration: !0, display: "double", duration: 600, page: 1, gradients: !0, turnCorners: "bl,br", when: null },
Y = { cornerSize: 100 },
g = { init: function init(a) {
z = "WebKitCSSMatrix" in window || "MozPerspective" in document.body.style;var b;
U = (b = /AppleWebkit\/([0-9\.]+)/i.exec(navigator.userAgent)) ? 534.3 < parseFloat(b[1]) : !0;w = T();var c;b = 0;var d = this.data(),
e = this.children(),
a = f.extend({ width: this.width(), height: this.height(), direction: this.attr("dir") || this.css("direction") || "ltr" }, X, a);d.opts = a;d.pageObjs = {};d.pages = {};d.pageWrap = {};d.pageZoom = {};d.pagePlace = {};d.pageMv = [];d.zoom = 1;d.totalPages = a.pages || 0;d.eventHandlers = { touchStart: f.proxy(g._touchStart, this), touchMove: f.proxy(g._touchMove, this), touchEnd: f.proxy(g._touchEnd, this),
start: f.proxy(g._eventStart, this) };if (a.when) for (c in a.when) {
n(c, a.when) && this.bind(c, a.when[c]);
}this.css({ position: "relative", width: a.width, height: a.height });this.turn("display", a.display);"" !== a.direction && this.turn("direction", a.direction);z && !u && a.acceleration && this.transform(F(0, 0, !0));for (c = 0; c < e.length; c++) {
"1" != f(e[c]).attr("ignore") && this.turn("addPage", e[c], ++b);
}f(this).bind(r.down, d.eventHandlers.touchStart).bind("end", g._eventEnd).bind("pressed", g._eventPressed).bind("released", g._eventReleased).bind("flip", g._flip);f(this).parent().bind("start", d.eventHandlers.start);f(document).bind(r.move, d.eventHandlers.touchMove).bind(r.up, d.eventHandlers.touchEnd);this.turn("page", a.page);d.done = !0;return this;
}, addPage: function addPage(a, b) {
var c,
d = !1,
e = this.data(),
h = e.totalPages + 1;if (e.destroying) return !1;if (c = /\bp([0-9]+)\b/.exec(f(a).attr("class"))) b = parseInt(c[1], 10);if (b) {
if (b == h) d = !0;else {
if (b > h) throw q('Page "' + b + '" cannot be inserted');
}
} else b = h, d = !0;1 <= b && b <= h && (c = "double" == e.display ? b % 2 ? " odd" : " even" : "", e.done && this.turn("stop"), b in e.pageObjs && g._movePages.call(this, b, 1), d && (e.totalPages = h), e.pageObjs[b] = f(a).css({ "float": "left" }).addClass("page p" + b + c), -1 != navigator.userAgent.indexOf("MSIE 9.0") && e.pageObjs[b].hasClass("hard") && e.pageObjs[b].removeClass("hard"), g._addPage.call(this, b), g._removeFromDOM.call(this));return this;
}, _addPage: function _addPage(a) {
var b = this.data(),
c = b.pageObjs[a];if (c) if (g._necessPage.call(this, a)) {
if (!b.pageWrap[a]) {
b.pageWrap[a] = f("
", { "class": "page-wrapper", page: a, css: { position: "absolute",
overflow: "hidden" } });this.append(b.pageWrap[a]);b.pagePlace[a] || (b.pagePlace[a] = a, b.pageObjs[a].appendTo(b.pageWrap[a]));var d = g._pageSize.call(this, a, !0);c.css({ width: d.width, height: d.height });b.pageWrap[a].css(d);
}b.pagePlace[a] == a && g._makeFlip.call(this, a);
} else b.pagePlace[a] = 0, b.pageObjs[a] && b.pageObjs[a].remove();
}, hasPage: function hasPage(a) {
return n(a, this.data().pageObjs);
}, center: function center(a) {
var b = this.data(),
c = f(this).turn("size"),
d = 0;b.noCenter || ("double" == b.display && (a = this.turn("view", a || b.tpage || b.page), "ltr" == b.direction ? a[0] ? a[1] || (d += c.width / 4) : d -= c.width / 4 : a[0] ? a[1] || (d -= c.width / 4) : d += c.width / 4), f(this).css({ marginLeft: d }));return this;
}, destroy: function destroy() {
var a = this,
b = this.data(),
c = "end first flip last pressed released start turning turned zooming missing".split(" ");if ("prevented" != t("destroying", this)) {
b.destroying = !0;f.each(c, function (b, c) {
a.unbind(c);
});this.parent().unbind("start", b.eventHandlers.start);for (f(document).unbind(r.move, b.eventHandlers.touchMove).unbind(r.up, b.eventHandlers.touchEnd); 0 !== b.totalPages;) {
this.turn("removePage", b.totalPages);
}b.fparent && b.fparent.remove();b.shadow && b.shadow.remove();this.removeData();b = null;return this;
}
}, is: function is() {
return "object" == _typeof(this.data().pages);
}, zoom: function zoom(a) {
var b = this.data();if ("number" == typeof a) {
if (0.0010 > a || 100 < a) throw q(a + " is not a value for zoom");if ("prevented" == t("zooming", this, [a, b.zoom])) return this;var c = this.turn("size"),
d = this.turn("view"),
e = 1 / b.zoom,
h = Math.round(c.width * e * a),
c = Math.round(c.height * e * a);b.zoom = a;f(this).turn("stop").turn("size", h, c);b.opts.autoCenter && this.turn("center");g._updateShadow.call(this);for (a = 0; a < d.length; a++) {
d[a] && b.pageZoom[d[a]] != b.zoom && (this.trigger("zoomed", [d[a], d, b.pageZoom[d[a]], b.zoom]), b.pageZoom[d[a]] = b.zoom);
}return this;
}return b.zoom;
}, _pageSize: function _pageSize(a, b) {
var c = this.data(),
d = {};if ("single" == c.display) d.width = this.width(), d.height = this.height(), b && (d.top = 0, d.left = 0, d.right = "auto");else {
var e = this.width() / 2,
h = this.height();c.pageObjs[a].hasClass("own-size") ? (d.width = c.pageObjs[a].width(), d.height = c.pageObjs[a].height()) : (d.width = e, d.height = h);if (b) {
var f = a % 2;d.top = (h - d.height) / 2;"ltr" == c.direction ? (d[f ? "right" : "left"] = e - d.width, d[f ? "left" : "right"] = "auto") : (d[f ? "left" : "right"] = e - d.width, d[f ? "right" : "left"] = "auto");
}
}return d;
}, _makeFlip: function _makeFlip(a) {
var b = this.data();if (!b.pages[a] && b.pagePlace[a] == a) {
var c = "single" == b.display,
d = a % 2;b.pages[a] = b.pageObjs[a].css(g._pageSize.call(this, a)).flip({ page: a, next: d || c ? a + 1 : a - 1, turn: this }).flip("disable", b.disabled);g._setPageLoc.call(this, a);b.pageZoom[a] = b.zoom;
}return b.pages[a];
}, _makeRange: function _makeRange() {
var a, b;if (!(1 > this.data().totalPages)) {
b = this.turn("range");for (a = b[0]; a <= b[1]; a++) {
g._addPage.call(this, a);
}
}
}, range: function range(a) {
var b,
c,
d,
e = this.data(),
a = a || e.tpage || e.page || 1;d = g._view.call(this, a);if (1 > a || a > e.totalPages) throw q('"' + a + '" is not a valid page');d[1] = d[1] || d[0];1 <= d[0] && d[1] <= e.totalPages ? (a = Math.floor(2), e.totalPages - d[1] > d[0] ? (b = Math.min(d[0] - 1, a), c = 2 * a - b) : (c = Math.min(e.totalPages - d[1], a), b = 2 * a - c)) : c = b = 5;return [Math.max(1, d[0] - b), Math.min(e.totalPages, d[1] + c)];
}, _necessPage: function _necessPage(a) {
if (0 === a) return !0;var b = this.turn("range");return this.data().pageObjs[a].hasClass("fixed") || a >= b[0] && a <= b[1];
}, _removeFromDOM: function _removeFromDOM() {
var a,
b = this.data();for (a in b.pageWrap) {
n(a, b.pageWrap) && !g._necessPage.call(this, a) && g._removePageFromDOM.call(this, a);
}
}, _removePageFromDOM: function _removePageFromDOM(a) {
var b = this.data();if (b.pages[a]) {
var c = b.pages[a].data();i._moveFoldingPage.call(b.pages[a], !1);c.f && c.f.fwrapper && c.f.fwrapper.remove();b.pages[a].removeData();b.pages[a].remove();
delete b.pages[a];
}b.pageObjs[a] && b.pageObjs[a].remove();b.pageWrap[a] && (b.pageWrap[a].remove(), delete b.pageWrap[a]);g._removeMv.call(this, a);delete b.pagePlace[a];delete b.pageZoom[a];
}, removePage: function removePage(a) {
var b = this.data();if ("*" == a) for (; 0 !== b.totalPages;) {
this.turn("removePage", b.totalPages);
} else {
if (1 > a || a > b.totalPages) throw q("The page " + a + " doesn't exist");b.pageObjs[a] && (this.turn("stop"), g._removePageFromDOM.call(this, a), delete b.pageObjs[a]);g._movePages.call(this, a, -1);b.totalPages -= 1;b.page > b.totalPages ? (b.page = null, g._fitPage.call(this, b.totalPages)) : (g._makeRange.call(this), this.turn("update"));
}return this;
}, _movePages: function _movePages(a, b) {
var c,
d = this,
e = this.data(),
h = "single" == e.display,
f = function f(a) {
var c = a + b,
f = c % 2,
i = f ? " odd " : " even ";e.pageObjs[a] && (e.pageObjs[c] = e.pageObjs[a].removeClass("p" + a + " odd even").addClass("p" + c + i));e.pagePlace[a] && e.pageWrap[a] && (e.pagePlace[c] = c, e.pageWrap[c] = e.pageObjs[c].hasClass("fixed") ? e.pageWrap[a].attr("page", c) : e.pageWrap[a].css(g._pageSize.call(d, c, !0)).attr("page", c), e.pages[a] && (e.pages[c] = e.pages[a].flip("options", { page: c, next: h || f ? c + 1 : c - 1 })), b && (delete e.pages[a], delete e.pagePlace[a], delete e.pageZoom[a], delete e.pageObjs[a], delete e.pageWrap[a]));
};if (0 < b) for (c = e.totalPages; c >= a; c--) {
f(c);
} else for (c = a; c <= e.totalPages; c++) {
f(c);
}
}, display: function display(a) {
var b = this.data(),
c = b.display;if (void 0 === a) return c;if (-1 == f.inArray(a, V)) throw q('"' + a + '" is not a value for display');switch (a) {case "single":
b.pageObjs[0] || (this.turn("stop").css({ overflow: "hidden" }), b.pageObjs[0] = f("
", { "class": "page p-temporal" }).css({ width: this.width(), height: this.height() }).appendTo(this));this.addClass("shadow");break;case "double":
b.pageObjs[0] && (this.turn("stop").css({ overflow: "" }), b.pageObjs[0].remove(), delete b.pageObjs[0]), this.removeClass("shadow");}b.display = a;c && (a = this.turn("size"), g._movePages.call(this, 1, 0), this.turn("size", a.width, a.height).turn("update"));return this;
}, direction: function direction(a) {
var b = this.data();if (void 0 === a) return b.direction;a = a.toLowerCase();
if (-1 == f.inArray(a, W)) throw q('"' + a + '" is not a value for direction');"rtl" == a && f(this).attr("dir", "ltr").css({ direction: "ltr" });b.direction = a;b.done && this.turn("size", f(this).width(), f(this).height());return this;
}, animating: function animating() {
return 0 < this.data().pageMv.length;
}, corner: function corner() {
var a,
b,
c = this.data();for (b in c.pages) {
if (n(b, c.pages) && (a = c.pages[b].flip("corner"))) return a;
}return !1;
}, data: function data() {
return this.data();
}, disable: function disable(a) {
var b,
c = this.data(),
d = this.turn("view");c.disabled = void 0 === a || !0 === a;for (b in c.pages) {
n(b, c.pages) && c.pages[b].flip("disable", c.disabled ? !0 : -1 == f.inArray(parseInt(b, 10), d));
}return this;
}, disabled: function disabled(a) {
return void 0 === a ? !0 === this.data().disabled : this.turn("disable", a);
}, size: function size(a, b) {
if (void 0 === a || void 0 === b) return { width: this.width(), height: this.height() };this.turn("stop");var c,
d,
e = this.data();d = "double" == e.display ? a / 2 : a;this.css({ width: a, height: b });e.pageObjs[0] && e.pageObjs[0].css({ width: d, height: b });for (c in e.pageWrap) {
n(c, e.pageWrap) && (d = g._pageSize.call(this, c, !0), e.pageObjs[c].css({ width: d.width, height: d.height }), e.pageWrap[c].css(d), e.pages[c] && e.pages[c].css({ width: d.width, height: d.height }));
}this.turn("resize");return this;
}, resize: function resize() {
var a,
b = this.data();b.pages[0] && (b.pageWrap[0].css({ left: -this.width() }), b.pages[0].flip("resize", !0));for (a = 1; a <= b.totalPages; a++) {
b.pages[a] && b.pages[a].flip("resize", !0);
}g._updateShadow.call(this);b.opts.autoCenter && this.turn("center");
}, _removeMv: function _removeMv(a) {
var b,
c = this.data();for (b = 0; b < c.pageMv.length; b++) {
if (c.pageMv[b] == a) return c.pageMv.splice(b, 1), !0;
}return !1;
}, _addMv: function _addMv(a) {
var b = this.data();g._removeMv.call(this, a);b.pageMv.push(a);
}, _view: function _view(a) {
var b = this.data(),
a = a || b.page;return "double" == b.display ? a % 2 ? [a - 1, a] : [a, a + 1] : [a];
}, view: function view(a) {
var b = this.data(),
a = g._view.call(this, a);return "double" == b.display ? [0 < a[0] ? a[0] : 0, a[1] <= b.totalPages ? a[1] : 0] : [0 < a[0] && a[0] <= b.totalPages ? a[0] : 0];
}, stop: function stop(a, b) {
if (this.turn("animating")) {
var c,
d,
e,
h = this.data();h.tpage && (h.page = h.tpage, delete h.tpage);for (c = 0; c < h.pageMv.length; c++) {
h.pageMv[c] && h.pageMv[c] !== a && (e = h.pages[h.pageMv[c]], d = e.data().f.opts, e.flip("hideFoldedPage", b), b || i._moveFoldingPage.call(e, !1), d.force && (d.next = 0 === d.page % 2 ? d.page - 1 : d.page + 1, delete d.force));
}
}this.turn("update");return this;
}, pages: function pages(a) {
var b = this.data();if (a) {
if (a < b.totalPages) for (var c = b.totalPages; c > a; c--) {
this.turn("removePage", c);
}b.totalPages = a;g._fitPage.call(this, b.page);return this;
}return b.totalPages;
}, _missing: function _missing(a) {
var b = this.data();if (!(1 > b.totalPages)) {
for (var c = this.turn("range", a), d = [], a = c[0]; a <= c[1]; a++) {
b.pageObjs[a] || d.push(a);
}0 < d.length && this.trigger("missing", [d]);
}
}, _fitPage: function _fitPage(a) {
var b = this.data(),
c = this.turn("view", a);g._missing.call(this, a);if (b.pageObjs[a]) {
b.page = a;this.turn("stop");for (var d = 0; d < c.length; d++) {
c[d] && b.pageZoom[c[d]] != b.zoom && (this.trigger("zoomed", [c[d], c, b.pageZoom[c[d]], b.zoom]), b.pageZoom[c[d]] = b.zoom);
}g._removeFromDOM.call(this);g._makeRange.call(this);g._updateShadow.call(this);
this.trigger("turned", [a, c]);this.turn("update");b.opts.autoCenter && this.turn("center");
}
}, _turnPage: function _turnPage(a) {
var b,
c,
d = this.data(),
e = d.pagePlace[a],
h = this.turn("view"),
i = this.turn("view", a);if (d.page != a) {
var j = d.page;if ("prevented" == t("turning", this, [a, i])) {
j == d.page && -1 != f.inArray(e, d.pageMv) && d.pages[e].flip("hideFoldedPage", !0);return;
}-1 != f.inArray(1, i) && this.trigger("first");-1 != f.inArray(d.totalPages, i) && this.trigger("last");
}"single" == d.display ? (b = h[0], c = i[0]) : h[1] && a > h[1] ? (b = h[1], c = i[0]) : h[0] && a < h[0] && (b = h[0], c = i[1]);e = d.opts.turnCorners.split(",");h = d.pages[b].data().f;i = h.opts;j = h.point;g._missing.call(this, a);d.pageObjs[a] && (this.turn("stop"), d.page = a, g._makeRange.call(this), d.tpage = c, i.next != c && (i.next = c, i.force = !0), this.turn("update"), h.point = j, "hard" == h.effect ? "ltr" == d.direction ? d.pages[b].flip("turnPage", a > b ? "r" : "l") : d.pages[b].flip("turnPage", a > b ? "l" : "r") : "ltr" == d.direction ? d.pages[b].flip("turnPage", e[a > b ? 1 : 0]) : d.pages[b].flip("turnPage", e[a > b ? 0 : 1]));
}, page: function page(a) {
var b = this.data();if (void 0 === a) return b.page;if (!b.disabled && !b.destroying) {
a = parseInt(a, 10);if (0 < a && a <= b.totalPages) return a != b.page && (!b.done || -1 != f.inArray(a, this.turn("view")) ? g._fitPage.call(this, a) : g._turnPage.call(this, a)), this;throw q("The page " + a + " does not exist");
}
}, next: function next() {
return this.turn("page", Math.min(this.data().totalPages, g._view.call(this, this.data().page).pop() + 1));
}, previous: function previous() {
return this.turn("page", Math.max(1, g._view.call(this, this.data().page).shift() - 1));
}, peel: function peel(a, b) {
var c = this.data(),
d = this.turn("view"),
b = void 0 === b ? !0 : !0 === b;!1 === a ? this.turn("stop", null, b) : "single" == c.display ? c.pages[c.page].flip("peel", a, b) : (d = "ltr" == c.direction ? -1 != a.indexOf("l") ? d[0] : d[1] : -1 != a.indexOf("l") ? d[1] : d[0], c.pages[d] && c.pages[d].flip("peel", a, b));return this;
}, _addMotionPage: function _addMotionPage() {
var a = f(this).data().f.opts,
b = a.turn;b.data();g._addMv.call(b, a.page);
}, _eventStart: function _eventStart(a, b, c) {
var d = b.turn.data(),
e = d.pageZoom[b.page];a.isDefaultPrevented() || (e && e != d.zoom && (b.turn.trigger("zoomed", [b.page, b.turn.turn("view", b.page), e, d.zoom]), d.pageZoom[b.page] = d.zoom), "single" == d.display && c && ("l" == c.charAt(1) && "ltr" == d.direction || "r" == c.charAt(1) && "rtl" == d.direction ? (b.next = b.next < b.page ? b.next : b.page - 1, b.force = !0) : b.next = b.next > b.page ? b.next : b.page + 1), g._addMotionPage.call(a.target));g._updateShadow.call(b.turn);
}, _eventEnd: function _eventEnd(a, b, c) {
f(a.target).data();var a = b.turn,
d = a.data();if (c) {
if (c = d.tpage || d.page, c == b.next || c == b.page) delete d.tpage, g._fitPage.call(a, c || b.next, !0);
} else g._removeMv.call(a, b.page), g._updateShadow.call(a), a.turn("update");
}, _eventPressed: function _eventPressed(a) {
var a = f(a.target).data().f,
b = a.opts.turn;b.data().mouseAction = !0;b.turn("update");return a.time = new Date().getTime();
}, _eventReleased: function _eventReleased(a, b) {
var c;c = f(a.target);var d = c.data().f,
e = d.opts.turn,
h = e.data();c = "single" == h.display ? "br" == b.corner || "tr" == b.corner ? b.x < c.width() / 2 : b.x > c.width() / 2 : 0 > b.x || b.x > c.width();if (200 > new Date().getTime() - d.time || c) a.preventDefault(), g._turnPage.call(e, d.opts.next);h.mouseAction = !1;
}, _flip: function _flip(a) {
a.stopPropagation();
a = f(a.target).data().f.opts;a.turn.trigger("turn", [a.next]);a.turn.data().opts.autoCenter && a.turn.turn("center", a.next);
}, _touchStart: function _touchStart() {
var a = this.data(),
b;for (b in a.pages) {
if (n(b, a.pages) && !1 === i._eventStart.apply(a.pages[b], arguments)) return !1;
}
}, _touchMove: function _touchMove() {
var a = this.data(),
b;for (b in a.pages) {
n(b, a.pages) && i._eventMove.apply(a.pages[b], arguments);
}
}, _touchEnd: function _touchEnd() {
var a = this.data(),
b;for (b in a.pages) {
n(b, a.pages) && i._eventEnd.apply(a.pages[b], arguments);
}
}, calculateZ: function calculateZ(a) {
var b,
c,
d,
e,
h = this,
f = this.data();b = this.turn("view");var i = b[0] || b[1],
g = a.length - 1,
j = { pageZ: {}, partZ: {}, pageV: {} },
k = function k(a) {
a = h.turn("view", a);a[0] && (j.pageV[a[0]] = !0);a[1] && (j.pageV[a[1]] = !0);
};for (b = 0; b <= g; b++) {
c = a[b], d = f.pages[c].data().f.opts.next, e = f.pagePlace[c], k(c), k(d), c = f.pagePlace[d] == d ? d : c, j.pageZ[c] = f.totalPages - Math.abs(i - c), j.partZ[e] = 2 * f.totalPages - g + b;
}return j;
}, update: function update() {
var a,
b = this.data();if (this.turn("animating") && 0 !== b.pageMv[0]) {
var c,
d = this.turn("calculateZ", b.pageMv),
e = this.turn("corner"),
h = this.turn("view"),
i = this.turn("view", b.tpage);for (a in b.pageWrap) {
if (n(a, b.pageWrap) && (c = b.pageObjs[a].hasClass("fixed"), b.pageWrap[a].css({ display: d.pageV[a] || c ? "" : "none", zIndex: (b.pageObjs[a].hasClass("hard") ? d.partZ[a] : d.pageZ[a]) || (c ? -1 : 0) }), c = b.pages[a])) c.flip("z", d.partZ[a] || null), d.pageV[a] && c.flip("resize"), b.tpage ? c.flip("hover", !1).flip("disable", -1 == f.inArray(parseInt(a, 10), b.pageMv) && a != i[0] && a != i[1]) : c.flip("hover", !1 === e).flip("disable", a != h[0] && a != h[1]);
}
} else for (a in b.pageWrap) {
n(a, b.pageWrap) && (d = g._setPageLoc.call(this, a), b.pages[a] && b.pages[a].flip("disable", b.disabled || 1 != d).flip("hover", !0).flip("z", null));
}return this;
}, _updateShadow: function _updateShadow() {
var a,
b,
c = this.data(),
d = this.width(),
e = this.height(),
h = "single" == c.display ? d : d / 2;a = this.turn("view");c.shadow || (c.shadow = f("
", { "class": "shadow", css: l(0, 0, 0).css }).appendTo(this));for (var i = 0; i < c.pageMv.length && a[0] && a[1]; i++) {
a = this.turn("view", c.pages[c.pageMv[i]].data().f.opts.next), b = this.turn("view", c.pageMv[i]), a[0] = a[0] && b[0], a[1] = a[1] && b[1];
}switch (a[0] ? a[1] ? 3 : "ltr" == c.direction ? 2 : 1 : "ltr" == c.direction ? 1 : 2) {case 1:
c.shadow.css({ width: h, height: e, top: 0, left: h });break;case 2:
c.shadow.css({ width: h, height: e, top: 0, left: 0 });break;case 3:
c.shadow.css({ width: d, height: e, top: 0, left: 0 });}
}, _setPageLoc: function _setPageLoc(a) {
var b = this.data(),
c = this.turn("view"),
d = 0;if (a == c[0] || a == c[1]) d = 1;else if ("single" == b.display && a == c[0] + 1 || "double" == b.display && a == c[0] - 2 || a == c[1] + 2) d = 2;if (!this.turn("animating")) switch (d) {case 1:
b.pageWrap[a].css({ zIndex: b.totalPages,
display: "" });break;case 2:
b.pageWrap[a].css({ zIndex: b.totalPages - 1, display: "" });break;case 0:
b.pageWrap[a].css({ zIndex: 0, display: b.pageObjs[a].hasClass("fixed") ? "" : "none" });}return d;
}, options: function options(a) {
if (void 0 === a) return this.data().opts;var b = this.data();f.extend(b.opts, a);a.pages && this.turn("pages", a.pages);a.page && this.turn("page", a.page);a.display && this.turn("display", a.display);a.direction && this.turn("direction", a.direction);a.width && a.height && this.turn("size", a.width, a.height);if (a.when) for (var c in a.when) {
n(c, a.when) && this.unbind(c).bind(c, a.when[c]);
}return this;
}, version: function version() {
return "4.1.0";
} },
i = { init: function init(a) {
this.data({ f: { disabled: !1, hover: !1, effect: this.hasClass("hard") ? "hard" : "sheet" } });this.flip("options", a);i._addPageWrapper.call(this);return this;
}, setData: function setData(a) {
var b = this.data();b.f = f.extend(b.f, a);return this;
}, options: function options(a) {
var b = this.data().f;return a ? (i.setData.call(this, { opts: f.extend({}, b.opts || Y, a) }), this) : b.opts;
}, z: function z(a) {
var b = this.data().f;b.opts["z-index"] = a;b.fwrapper && b.fwrapper.css({ zIndex: a || parseInt(b.parent.css("z-index"), 10) || 0 });return this;
}, _cAllowed: function _cAllowed() {
var a = this.data().f,
b = a.opts.page,
c = a.opts.turn.data(),
d = b % 2;return "hard" == a.effect ? "ltr" == c.direction ? [d ? "r" : "l"] : [d ? "l" : "r"] : "single" == c.display ? 1 == b ? "ltr" == c.direction ? p.forward : p.backward : b == c.totalPages ? "ltr" == c.direction ? p.backward : p.forward : p.all : "ltr" == c.direction ? p[d ? "forward" : "backward"] : p[d ? "backward" : "forward"];
}, _cornerActivated: function _cornerActivated(a) {
var b = this.data().f,
c = this.width(),
d = this.height(),
a = { x: a.x, y: a.y, corner: "" },
e = b.opts.cornerSize;if (0 >= a.x || 0 >= a.y || a.x >= c || a.y >= d) return !1;var h = i._cAllowed.call(this);switch (b.effect) {case "hard":
if (a.x > c - e) a.corner = "r";else if (a.x < e) a.corner = "l";else return !1;break;case "sheet":
if (a.y < e) a.corner += "t";else if (a.y >= d - e) a.corner += "b";else return !1;if (a.x <= e) a.corner += "l";else if (a.x >= c - e) a.corner += "r";else return !1;}return !a.corner || -1 == f.inArray(a.corner, h) ? !1 : a;
}, _isIArea: function _isIArea(a) {
var b = this.data().f.parent.offset(),
a = u && a.originalEvent ? a.originalEvent.touches[0] : a;return i._cornerActivated.call(this, { x: a.pageX - b.left, y: a.pageY - b.top });
}, _c: function _c(a, b) {
b = b || 0;switch (a) {case "tl":
return j(b, b);case "tr":
return j(this.width() - b, b);case "bl":
return j(b, this.height() - b);case "br":
return j(this.width() - b, this.height() - b);case "l":
return j(b, 0);case "r":
return j(this.width() - b, 0);}
}, _c2: function _c2(a) {
switch (a) {case "tl":
return j(2 * this.width(), 0);case "tr":
return j(-this.width(), 0);case "bl":
return j(2 * this.width(), this.height());case "br":
return j(-this.width(), this.height());case "l":
return j(2 * this.width(), 0);case "r":
return j(-this.width(), 0);}
}, _foldingPage: function _foldingPage() {
var a = this.data().f;if (a) {
var b = a.opts;if (b.turn) return a = b.turn.data(), "single" == a.display ? 1 < b.next || 1 < b.page ? a.pageObjs[0] : null : a.pageObjs[b.next];
}
}, _backGradient: function _backGradient() {
var a = this.data().f,
b = a.opts.turn.data();if ((b = b.opts.gradients && ("single" == b.display || 2 != a.opts.page && a.opts.page != b.totalPages - 1)) && !a.bshadow) a.bshadow = f("
", l(0, 0, 1)).css({ position: "", width: this.width(), height: this.height() }).appendTo(a.parent);
return b;
}, type: function type() {
return this.data().f.effect;
}, resize: function resize(a) {
var b = this.data().f,
c = b.opts.turn.data(),
d = this.width(),
e = this.height();switch (b.effect) {case "hard":
a && (b.wrapper.css({ width: d, height: e }), b.fpage.css({ width: d, height: e }), c.opts.gradients && (b.ashadow.css({ width: d, height: e }), b.bshadow.css({ width: d, height: e })));break;case "sheet":
a && (a = Math.round(Math.sqrt(Math.pow(d, 2) + Math.pow(e, 2))), b.wrapper.css({ width: a, height: a }), b.fwrapper.css({ width: a, height: a }).children(":first-child").css({ width: d,
height: e }), b.fpage.css({ width: d, height: e }), c.opts.gradients && b.ashadow.css({ width: d, height: e }), i._backGradient.call(this) && b.bshadow.css({ width: d, height: e })), b.parent.is(":visible") && (c = D(b.parent[0]), b.fwrapper.css({ top: c.top, left: c.left }), c = D(b.opts.turn[0]), b.fparent.css({ top: -c.top, left: -c.left })), this.flip("z", b.opts["z-index"]);}
}, _addPageWrapper: function _addPageWrapper() {
var a = this.data().f,
b = a.opts.turn.data(),
c = this.parent();a.parent = c;if (!a.wrapper) switch (a.effect) {case "hard":
var d = {};d[w + "transform-style"] = "preserve-3d";d[w + "backface-visibility"] = "hidden";a.wrapper = f("
", l(0, 0, 2)).css(d).appendTo(c).prepend(this);a.fpage = f("
", l(0, 0, 1)).css(d).appendTo(c);b.opts.gradients && (a.ashadow = f("
", l(0, 0, 0)).hide().appendTo(c), a.bshadow = f("
", l(0, 0, 0)));break;case "sheet":
var d = this.width(),
e = this.height();Math.round(Math.sqrt(Math.pow(d, 2) + Math.pow(e, 2)));a.fparent = a.opts.turn.data().fparent;a.fparent || (d = f("
", { css: { "pointer-events": "none" } }).hide(), d.data().flips = 0, d.css(l(0, 0, "auto", "visible").css).appendTo(a.opts.turn), a.opts.turn.data().fparent = d, a.fparent = d);this.css({ position: "absolute", top: 0, left: 0, bottom: "auto", right: "auto" });a.wrapper = f("
", l(0, 0, this.css("z-index"))).appendTo(c).prepend(this);a.fwrapper = f("
", l(c.offset().top, c.offset().left)).hide().appendTo(a.fparent);a.fpage = f("
", l(0, 0, 0, "visible")).css({ cursor: "default" }).appendTo(a.fwrapper);b.opts.gradients && (a.ashadow = f("
", l(0, 0, 1)).appendTo(a.fpage));i.setData.call(this, a);}i.resize.call(this, !0);
}, _fold: function _fold(a) {
var b = this.data().f,
c = b.opts.turn.data(),
d = i._c.call(this, a.corner),
e = this.width(),
h = this.height();switch (b.effect) {case "hard":
a.x = "l" == a.corner ? Math.min(Math.max(a.x, 0), 2 * e) : Math.max(Math.min(a.x, e), -e);var f,
g,
s,
x,
k,
n = c.totalPages,
l = b.opts["z-index"] || n,
q = { overflow: "visible" },
p = d.x ? (d.x - a.x) / e : a.x / e,
r = 90 * p,
t = 90 > r;switch (a.corner) {case "l":
x = "0% 50%";k = "100% 50%";t ? (f = 0, g = 0 < b.opts.next - 1, s = 1) : (f = "100%", g = b.opts.page + 1 < n, s = 0);break;case "r":
x = "100% 50%", k = "0% 50%", r = -r, e = -e, t ? (f = 0, g = b.opts.next + 1 < n, s = 0) : (f = "-100%", g = 1 != b.opts.page, s = 1);}q[w + "perspective-origin"] = k;b.wrapper.transform("rotateY(" + r + "deg)translate3d(0px, 0px, " + (this.attr("depth") || 0) + "px)", k);b.fpage.transform("translateX(" + e + "px) rotateY(" + (180 + r) + "deg)", x);b.parent.css(q);t ? (p = -p + 1, b.wrapper.css({ zIndex: l + 1 }), b.fpage.css({ zIndex: l })) : (p -= 1, b.wrapper.css({ zIndex: l }), b.fpage.css({ zIndex: l + 1 }));c.opts.gradients && (g ? b.ashadow.css({ display: "", left: f, backgroundColor: "rgba(0,0,0," + 0.5 * p + ")" }).transform("rotateY(0deg)") : b.ashadow.hide(), b.bshadow.css({ opacity: -p + 1 }), t ? b.bshadow.parent()[0] != b.wrapper[0] && b.bshadow.appendTo(b.wrapper) : b.bshadow.parent()[0] != b.fpage[0] && b.bshadow.appendTo(b.fpage), P(b.bshadow, j(100 * s, 0), j(100 * (-s + 1), 0), [[0, "rgba(0,0,0,0.3)"], [1, "rgba(0,0,0,0)"]], 2));break;case "sheet":
var u = this,
H = 0,
z,
A,
B,
M,
y,
N,
D,
v = j(0, 0),
Q = j(0, 0),
m = j(0, 0),
J = i._foldingPage.call(this);Math.tan(0);var O = c.opts.acceleration,
R = b.wrapper.height(),
E = "t" == a.corner.substr(0, 1),
C = "l" == a.corner.substr(1, 1),
I = function I() {
var b = j(0, 0),
f = j(0, 0);b.x = d.x ? d.x - a.x : a.x;b.y = U ? d.y ? d.y - a.y : a.y : 0;f.x = C ? e - b.x / 2 : a.x + b.x / 2;f.y = b.y / 2;var g = L - Math.atan2(b.y, b.x),
k = g - Math.atan2(f.y, f.x),
k = Math.max(0, Math.sin(k) * Math.sqrt(Math.pow(f.x, 2) + Math.pow(f.y, 2)));H = 180 * (g / K);m = j(k * Math.sin(g), k * Math.cos(g));if (g > L && (m.x += Math.abs(m.y * b.y / b.x), m.y = 0, Math.round(m.x * Math.tan(K - g)) < h)) return a.y = Math.sqrt(Math.pow(h, 2) + 2 * f.x * b.x), E && (a.y = h - a.y), I();g > L && (b = K - g, f = R - h / Math.sin(b), v = j(Math.round(f * Math.cos(b)), Math.round(f * Math.sin(b))), C && (v.x = -v.x), E && (v.y = -v.y));z = Math.round(m.y / Math.tan(g) + m.x);b = e - z;f = b * Math.cos(2 * g);k = b * Math.sin(2 * g);Q = j(Math.round(C ? b - f : z + f), Math.round(E ? k : h - k));c.opts.gradients && (y = b * Math.sin(g), b = i._c2.call(u, a.corner), b = Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2)) / e, D = Math.sin(L * (1 < b ? 2 - b : b)), N = Math.min(b, 1), M = 100 < y ? (y - 100) / y : 0, A = j(100 * (y * Math.sin(g) / e), 100 * (y * Math.cos(g) / h)), i._backGradient.call(u) && (B = j(100 * (1.2 * y * Math.sin(g) / e), 100 * (1.2 * y * Math.cos(g) / h)), C || (B.x = 100 - B.x), E || (B.y = 100 - B.y)));m.x = Math.round(m.x);
m.y = Math.round(m.y);return !0;
};f = function f(a, d, _f, g) {
var k = ["0", "auto"],
m = (e - R) * _f[0] / 100,
l = (h - R) * _f[1] / 100,
d = { left: k[d[0]], top: k[d[1]], right: k[d[2]], bottom: k[d[3]] },
k = {},
n = 90 != g && -90 != g ? C ? -1 : 1 : 0,
s = _f[0] + "% " + _f[1] + "%";u.css(d).transform(G(g) + F(a.x + n, a.y, O), s);b.fpage.css(d).transform(G(g) + F(a.x + Q.x - v.x - e * _f[0] / 100, a.y + Q.y - v.y - h * _f[1] / 100, O) + G((180 / g - 2) * g), s);b.wrapper.transform(F(-a.x + m - n, -a.y + l, O) + G(-g), s);b.fwrapper.transform(F(-a.x + v.x + m, -a.y + v.y + l, O) + G(-g), s);c.opts.gradients && (_f[0] && (A.x = 100 - A.x), _f[1] && (A.y = 100 - A.y), k["box-shadow"] = "0 0 20px rgba(0,0,0," + 0.5 * D + ")", J.css(k), P(b.ashadow, j(C ? 100 : 0, E ? 0 : 100), j(A.x, A.y), [[M, "rgba(0,0,0,0)"], [0.8 * (1 - M) + M, "rgba(0,0,0," + 0.2 * N + ")"], [1, "rgba(255,255,255," + 0.2 * N + ")"]], 3, 0), i._backGradient.call(u) && P(b.bshadow, j(C ? 0 : 100, E ? 0 : 100), j(B.x, B.y), [[0.6, "rgba(0,0,0,0)"], [0.8, "rgba(0,0,0," + 0.3 * N + ")"], [1, "rgba(0,0,0,0)"]], 3));
};switch (a.corner) {case "tl":
a.x = Math.max(a.x, 1);I();f(m, [1, 0, 0, 1], [100, 0], H);break;case "tr":
a.x = Math.min(a.x, e - 1);I();f(j(-m.x, m.y), [0, 0, 0, 1], [0, 0], -H);break;case "bl":
a.x = Math.max(a.x, 1);I();f(j(m.x, -m.y), [1, 1, 0, 0], [100, 100], -H);break;case "br":
a.x = Math.min(a.x, e - 1), I(), f(j(-m.x, -m.y), [0, 1, 1, 0], [0, 100], H);}}b.point = a;
}, _moveFoldingPage: function _moveFoldingPage(a) {
var b = this.data().f;if (b) {
var c = b.opts.turn,
d = c.data(),
e = d.pagePlace;a ? (d = b.opts.next, e[d] != b.opts.page && (b.folding && i._moveFoldingPage.call(this, !1), i._foldingPage.call(this).appendTo(b.fpage), e[d] = b.opts.page, b.folding = d), c.turn("update")) : b.folding && (d.pages[b.folding] ? (c = d.pages[b.folding].data().f, d.pageObjs[b.folding].appendTo(c.wrapper)) : d.pageWrap[b.folding] && d.pageObjs[b.folding].appendTo(d.pageWrap[b.folding]), b.folding in e && (e[b.folding] = b.folding), delete b.folding);
}
}, _showFoldedPage: function _showFoldedPage(a, b) {
var c = i._foldingPage.call(this),
d = this.data(),
e = d.f,
f = e.visible;if (c) {
if (!f || !e.point || e.point.corner != a.corner) if (c = "hover" == e.status || "peel" == e.status || e.opts.turn.data().mouseAction ? a.corner : null, f = !1, "prevented" == t("start", this, [e.opts, c])) return !1;if (b) {
var g = this,
d = e.point && e.point.corner == a.corner ? e.point : i._c.call(this, a.corner, 1);this.animatef({ from: [d.x, d.y], to: [a.x, a.y], duration: 500, frame: function frame(b) {
a.x = Math.round(b[0]);a.y = Math.round(b[1]);i._fold.call(g, a);
} });
} else i._fold.call(this, a), d.effect && !d.effect.turning && this.animatef(!1);if (!f) switch (e.effect) {case "hard":
e.visible = !0;i._moveFoldingPage.call(this, !0);e.fpage.show();e.opts.shadows && e.bshadow.show();break;case "sheet":
e.visible = !0, e.fparent.show().data().flips++, i._moveFoldingPage.call(this, !0), e.fwrapper.show(), e.bshadow && e.bshadow.show();}return !0;
}return !1;
}, hide: function hide() {
var a = this.data().f,
b = a.opts.turn.data(),
c = i._foldingPage.call(this);switch (a.effect) {case "hard":
b.opts.gradients && (a.bshadowLoc = 0, a.bshadow.remove(), a.ashadow.hide());a.wrapper.transform("");a.fpage.hide();break;case "sheet":
0 === --a.fparent.data().flips && a.fparent.hide(), this.css({ left: 0, top: 0, right: "auto", bottom: "auto" }).transform(""), a.wrapper.transform(""), a.fwrapper.hide(), a.bshadow && a.bshadow.hide(), c.transform("");}a.visible = !1;return this;
},
hideFoldedPage: function hideFoldedPage(a) {
var b = this.data().f;if (b.point) {
var c = this,
d = b.point,
e = function e() {
b.point = null;b.status = "";c.flip("hide");c.trigger("end", [b.opts, !1]);
};if (a) {
var f = i._c.call(this, d.corner),
a = "t" == d.corner.substr(0, 1) ? Math.min(0, d.y - f.y) / 2 : Math.max(0, d.y - f.y) / 2,
g = j(d.x, d.y + a),
l = j(f.x, f.y - a);this.animatef({ from: 0, to: 1, frame: function frame(a) {
a = S(d, g, l, f, a);d.x = a.x;d.y = a.y;i._fold.call(c, d);
}, complete: e, duration: 800, hiding: !0 });
} else this.animatef(!1), e();
}
}, turnPage: function turnPage(a) {
var b = this,
c = this.data().f,
d = c.opts.turn.data(),
a = { corner: c.corner ? c.corner.corner : a || i._cAllowed.call(this)[0] },
e = c.point || i._c.call(this, a.corner, c.opts.turn ? d.opts.elevation : 0),
f = i._c2.call(this, a.corner);this.trigger("flip").animatef({ from: 0, to: 1, frame: function frame(c) {
c = S(e, e, f, f, c);a.x = c.x;a.y = c.y;i._showFoldedPage.call(b, a);
}, complete: function complete() {
b.trigger("end", [c.opts, !0]);
}, duration: d.opts.duration, turning: !0 });c.corner = null;
}, moving: function moving() {
return "effect" in this.data();
}, isTurning: function isTurning() {
return this.flip("moving") && this.data().effect.turning;
}, corner: function corner() {
return this.data().f.corner;
}, _eventStart: function _eventStart(a) {
var b = this.data().f,
c = b.opts.turn;if (!b.corner && !b.disabled && !this.flip("isTurning") && b.opts.page == c.data().pagePlace[b.opts.page]) {
b.corner = i._isIArea.call(this, a);if (b.corner && i._foldingPage.call(this)) return this.trigger("pressed", [b.point]), i._showFoldedPage.call(this, b.corner), !1;b.corner = null;
}
}, _eventMove: function _eventMove(a) {
var b = this.data().f;if (!b.disabled) if (a = u ? a.originalEvent.touches : [a], b.corner) {
var c = b.parent.offset();b.corner.x = a[0].pageX - c.left;b.corner.y = a[0].pageY - c.top;i._showFoldedPage.call(this, b.corner);
} else if (b.hover && !this.data().effect && this.is(":visible")) if (a = i._isIArea.call(this, a[0])) {
if ("sheet" == b.effect && 2 == a.corner.length || "hard" == b.effect) b.status = "hover", b = i._c.call(this, a.corner, b.opts.cornerSize / 2), a.x = b.x, a.y = b.y, i._showFoldedPage.call(this, a, !0);
} else "hover" == b.status && (b.status = "", i.hideFoldedPage.call(this, !0));
}, _eventEnd: function _eventEnd() {
var a = this.data().f,
b = a.corner;!a.disabled && b && "prevented" != t("released", this, [a.point || b]) && i.hideFoldedPage.call(this, !0);a.corner = null;
}, disable: function disable(a) {
i.setData.call(this, { disabled: a });return this;
}, hover: function hover(a) {
i.setData.call(this, { hover: a });return this;
}, peel: function peel(a, b) {
var c = this.data().f;if (a) {
if (-1 == f.inArray(a, p.all)) throw q("Corner " + a + " is not permitted");if (-1 != f.inArray(a, i._cAllowed.call(this))) {
var d = i._c.call(this, a, c.opts.cornerSize / 2);c.status = "peel";i._showFoldedPage.call(this, { corner: a, x: d.x, y: d.y }, b);
}
} else c.status = "", i.hideFoldedPage.call(this, b);return this;
} };window.requestAnim = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (a) {
window.setTimeout(a, 1E3 / 60);
};f.extend(f.fn, { flip: function flip() {
return J(f(this[0]), i, arguments);
}, turn: function turn() {
return J(f(this[0]), g, arguments);
}, transform: function transform(a, b) {
var c = {};b && (c[w + "transform-origin"] = b);c[w + "transform"] = a;return this.css(c);
}, animatef: function animatef(a) {
var b = this.data();b.effect && b.effect.stop();if (a) {
a.to.length || (a.to = [a.to]);a.from.length || (a.from = [a.from]);for (var c = [], d = a.to.length, e = !0, g = this, i = new Date().getTime(), j = function j() {
if (b.effect && e) {
for (var f = [], k = Math.min(a.duration, new Date().getTime() - i), l = 0; l < d; l++) {
f.push(b.effect.easing(1, k, a.from[l], c[l], a.duration));
}a.frame(1 == d ? f[0] : f);k == a.duration ? (delete b.effect, g.data(b), a.complete && a.complete()) : window.requestAnim(j);
}
}, l = 0; l < d; l++) {
c.push(a.to[l] - a.from[l]);
}b.effect = f.extend({ stop: function stop() {
e = !1;
}, easing: function easing(a, b, c, d, e) {
return d * Math.sqrt(1 - (b = b / e - 1) * b) + c;
} }, a);this.data(b);j();
} else delete b.effect;
} });f.isTouch = u;f.mouseEvents = r;f.cssPrefix = T;f.cssTransitionEnd = function () {
var a,
b = document.createElement("fakeelement"),
c = { transition: "transitionend", OTransition: "oTransitionEnd", MSTransition: "transitionend", MozTransition: "transitionend", WebkitTransition: "webkitTransitionEnd" };for (a in c) {
if (void 0 !== b.style[a]) return c[a];
}
};f.findPos = D;
})(jQuery);
/***/ }),
/***/ 248:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'Cars',
create: function create() {
var self = this;
this.mode = this.element.data('mode');
this.loading = false;
this.loaded = false;
this.autoload = this.element.data('autoload');
this.data = [];
this.cars = [];
this.params = [{ width: 274, height: 224, p1: { x: 40.95, y: 186.16 }, p2: { x: 235.07, y: 74.09 } }, { width: 227, height: 214, p1: { x: 42.3, y: 177.46 }, p2: { x: 158.05, y: 110.64 } }, { width: 293, height: 282, p1: { x: 57.6, y: 260.09 }, p2: { x: 246.4, y: 151.08 } }, { width: 275, height: 220, p1: { x: 52.61, y: 183.15 }, p2: { x: 221.95, y: 85.39 } }, { width: 283, height: 179, p1: { x: 59.85, y: 169.46 }, p2: { x: 246.61, y: 61.64 } }, { width: 417, height: 291, p1: { x: 142.78, y: 266.38 }, p2: { x: 417.23, y: 107.93 } }, { width: 294, height: 259, p1: { x: 48.25, y: 221.1 }, p2: { x: 255.2, y: 101.61 } }, { width: 213, height: 388, p1: { x: 39.54, y: 353.37 }, p2: { x: 187.99, y: 267.67 } }, { width: 369, height: 174, p1: { x: 96.86, y: 173.54 }, p2: { x: 321.09, y: 44.08 } }, { width: 270, height: 247, p1: { x: 21.8, y: 202.62 }, p2: { x: 247.07, y: 72.57 } }, { width: 334, height: 212, p1: { x: 70.09, y: 184.87 }, p2: { x: 283.33, y: 61.75 } }, { width: 270, height: 201, p1: { x: 41.47, y: 174.11 }, p2: { x: 234.17, y: 62.86 } }];
this.revealed_lines = [];
switch (this.mode) {
case 'index':
this.matrix = [{
list: [6]
}, {
list: [9, 10, 7],
correction: {
mode: ['shift-1-column', 'y-pop']
}
}, {
list: [4, 2, 1, 0],
correction: {
mode: ['shift-1-column', 'y-pop']
}
}, {
list: [8, 11, 3],
correction: {
mode: ['shift-1-column', 'y-pop']
}
}, {
correction: {
mode: ['x-shift', 'shift-1-column', 'y-pop']
},
list: [5]
}];
break;
default:
this.matrix = [{
list: [6]
}, {
list: [7, 3, 4, 10, 7],
correction: {
mode: ['x-minus']
}
}, {
list: [10, 9, 2, 1, 3],
correction: {
mode: ['x-minus']
}
}, {
list: [8, 11, 0],
correction: {
mode: ['x-minus', 'x-shift']
}
}, {
correction: {
mode: ['x-minus', 'x-shift', 'x-shift']
},
list: [5]
}];
break;
}
this.scale = 1;
if (this.autoload) {
this.preload();
} else {
this.element.bind('load', function () {
if (self.preload()) self.element.trigger('lazy_triggered');
});
}
},
preload: function preload() {
if (this.loading || this.loaded) return false;
this.loading = true;
var self = this;
window.app.load_svg_sprite('/assets/common/svg/cars-' + window.app.lang + '.svg?v=9');
this.init_interval = setInterval(function () {
if ($('#sprite-car-1').length) {
self.loaded = true;
self.loading = false;
clearInterval(self.init_interval);
self.init_interval = null;
self.create_cars();
}
}, 100);
return true;
},
create_cars: function create_cars() {
var i, j;
for (i = 0; i < this.matrix.length; i++) {
for (j = 0; j < this.matrix[i].list.length; j++) {
this.matrix[i].list[j] = new Car({
id: this.matrix[i].list[j],
delegate: this
});
}
}
window.app.add_resize(this);
},
resize: function resize() {
this.scale = window.container_width / 1132;
var self = this,
linesDistance = 300 * this.scale,
endpoint,
firstCarParams = this.params[this.matrix[0].list[0].id];
var topOffset = window.container_width / 8,
leftOffset = (window.container_width / 4 * 1.5 - firstCarParams.width * this.scale) / 2,
lineStartX = leftOffset,
lineStartY = topOffset,
containerHeight = 0;
for (var i = 0; i < this.matrix.length; i++) {
endpoint = {
x: leftOffset,
y: topOffset + linesDistance * i
};
for (var j = 0; j < this.matrix[i].list.length; j++) {
var last_car_in_line = j == this.matrix[i].list.length - 1,
car = this.matrix[i].list[j],
params = this.params[car.id],
x = endpoint.x,
y = endpoint.y;
if (typeof this.revealed_lines[i] == 'undefined') {
this.revealed_lines[i] = false;
}
if (!this.revealed_lines[i] && last_car_in_line) {
(function (last_car, line_number) {
window.app.sas.addElement(last_car.element, function () {
self.revealed_lines[line_number] = true;
self.matrix[line_number].list.map(function (car_item, i) {
setTimeout(function () {
car_item.element.removeClass('sa-remove-1');
}, i * 150);
});
}, .1);
})(car, i);
}
if (j) {
x += Math.cos(-30 * Math.PI / 180) * 100 - params.p1.x * this.scale;
y += Math.sin(-30 * Math.PI / 180) * 100 - params.p1.y * this.scale;
} else {
if (typeof this.matrix[i].correction != 'undefined') {
var correction = this.matrix[i].correction;
for (var mode_id in correction.mode) {
switch (correction.mode[mode_id]) {
case 'x-minus':
var x_minus_shift = Math.round((window.app.ww - window.container_width) / 2) - (window.app.ww > 1550 ? Math.round((window.app.ww - 1550) / 2) : 0);
x -= x_minus_shift;
y += x_minus_shift * Math.sin(30 * Math.PI / 180);
break;
case 'x-shift':
y = y - linesDistance;
x += linesDistance * Math.cos(30 * Math.PI / 180) / Math.cos(60 * Math.PI / 180);
break;
case 'shift-1-column':
x += window.container_width / 4;
break;
case 'y-pop':
y -= window.app.ww / 8;
break;
}
}
}
y -= params.p1.y * this.scale + params.p1.x * this.scale * Math.tan(30 * Math.PI / 180);
}
car.element.css({
width: params.width * this.scale,
height: params.height * this.scale,
left: x,
top: y
});
if (!this.revealed_lines[i]) {
car.element.addClass('sa-remove-1').removeClass('hidden');
}
endpoint = {
x: x + params.p2.x * this.scale,
y: y + params.p2.y * this.scale
};
containerHeight = Math.max(containerHeight, endpoint.y + params.height * this.scale);
}
}
$('.js-equipment-container').css({ height: Math.round(containerHeight) });
}
});
var Car = MinimalClass.extend({
create: function create() {
this.element = $('
').addClass('car hidden').append(this.xlink('sprite-car-' + (this.id + 1))).appendTo(this.delegate.element);
}
});
/***/ }),
/***/ 249:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'Flipbook',
create: function create() {
var self = this;
this.element.turn({
elevation: 50,
gradients: true,
autoCenter: false
});
this.element.turn('page', 2);
$('.js-flipbook-prev').click(function () {
self.prev();
});
$('.js-flipbook-next').click(function () {
self.next();
});
window.app.add_resize(this);
},
prev: function prev() {
this.element.turn("previous");
},
next: function next() {
this.element.turn("next");
},
resize: function resize(ww, wh) {
this.width = this.element[0].parentNode.getBoundingClientRect().width;
this.height = Math.round(this.width / 2);
this.element.css({ height: this.height });
this.element.turn("size", this.width, this.height);
}
});
/***/ }),
/***/ 252:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
StaticSlice = __webpack_require__(253),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'StaticSliceSlider',
create: function create() {
var self = this;
this.repos_mode = this.element.data('repos-mode');
this.exclude_from_events = !!parseInt(this.element.data('exclude-from-events'));
this.pos = 0;
this.item = [];
this.element.find('.slide').each(function (i, elm) {
self.item.push(new StaticSliceSliderItem({ element: elm, repos_mode: self.repos_mode, delegate: self }));
});
window.app.add_resize(this);
},
resize: function resize() {
var offset = this.delegate.element.offset().top;
this.item.forEach(function (slide) {
slide.resize(offset);
});
},
next: function next(quick, from_user) {
var pos = this.pos + 1;
if (pos > this.item.length - 1) {
pos = 0;
}
this.switchto(pos, true, quick, from_user);
},
prev: function prev(quick, from_user) {
var pos = this.pos - 1;
if (pos < 0) {
pos = this.item.length - 1;
}
this.switchto(pos, false, quick, from_user);
},
show: function show() {
this.item[this.pos].show(false);
},
hide: function hide() {
this.item[this.pos].hide(false);
},
switchto: function switchto(pos, dir, quick, from_user) {
if (this.pos == pos) return;
if (this.is_switching) return;
this.is_switching = true;
from_user && this.delegate && this.delegate.element.trigger('switching_to', [this, pos, dir]);
var self = this,
cur = this.item[this.pos],
nxt = this.item[pos];
nxt.show(true);
cur.hide();
setTimeout(function () {
self.is_switching = false;
}, 600);
this.pos = pos;
}
});
var StaticSliceSliderItem = MinimalClass.extend({
__className: 'StaticSliceSliderItem',
pre: function pre() {
this.repos_mode = null;
},
create: function create() {
var self = this;
this.ww = 0;
this.wh = 0;
this.slice = [];
this.element.find('.js-static-slice').each(function (i, elm) {
self.slice.push(new StaticSlice({ element: elm, repos_mode: self.repos_mode, delegate: self }));
});
},
resize: function resize(offset) {
var rect = this.element[0].getBoundingClientRect();
this.ww = rect.width;
this.wh = rect.height;
this.slice.forEach(function (slice) {
slice.resize(rect.width, rect.height, offset);
});
},
show: function show(quick) {
var self = this;
this.element.addClass('visible');
this.slice.forEach(function (slice) {
slice.toggle(true, quick);
});
setTimeout(function () {
self.element.removeClass('visible').addClass('active');
}, 600);
},
hide: function hide(quick) {
var self = this;
this.element.addClass('visible');
this.slice.forEach(function (slice) {
slice.toggle(false, quick);
});
setTimeout(function () {
self.element.removeClass('visible active');
}, 600);
}
});
/***/ }),
/***/ 253:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'StaticSlice',
create: function create() {
var self = this;
this.mode = this.element.data('mode') || 'wh';
this.is_loaded = false;
this.aspect = 1;
this.src = this.element.data('src');
this.load();
this.debug = parseInt(this.element.data('debug') || 0);
this.state = true;
this.bgw = 0;
this.bgh = 0;
this.opened = false;
this.current_rect = null;
},
load: function load() {
if (this.is_loaded) {
return this.setup();
}
var self = this;
if (this.src) {
this.img = $('
');
this.img.appendTo(window.LZ).bind('load error', function (e) {
self.loaded(e.type);
}).attr('src', this.src);
}
},
loaded: function loaded(type) {
this.is_loaded = true;
switch (type) {
case 'load':
this.image_width = this.img ? this.img[0].width || 0 : 0;
this.image_height = this.img ? this.img[0].height || 0 : 0;
this.aspect = this.image_width / this.image_height;
this.setup();
break;
default:
this.setup();
break;
}
},
setup: function setup() {
this.element.css({ backgroundImage: 'url(' + this.src + ')' });
this.resize();
this.toggle(this.opened, true);
},
toggle: function toggle(dir, quick) {
var self = this,
pos,
rect = {
top: 0,
left: 0,
width: this.off_width,
height: this.off_height
};
if (dir) {} else {
switch (this.mode) {
case 'w':
rect.width = 0;
break;
case '-w':
rect.left = rect.width;
rect.width = 0;
break;
case 'h':
rect.height = 0;
break;
case '-h':
rect.top = rect.height;
rect.height = 0;
break;
case 'wh':
case 'hw':
default:
rect.width = 0;
rect.height = 0;
break;
}
}
pos = this.calcPositionForRect(rect);
quick ? this.element.removeClass('animated') : this.element.addClass('animated');
this.current_rect = rect;
this.element.css({
top: rect.top,
left: rect.left,
width: rect.width,
height: rect.height,
backgroundPosition: pos.left + 'px ' + pos.top + 'px'
});
if (dir) {
var onComplete = function onComplete() {
self.element.css({ width: '', height: '' });
self.element.unbind(self.transitionEndEventName());
};
if (quick) {
onComplete();
} else {
self.element.bind(self.transitionEndEventName(), onComplete);
}
}
this.opened = dir;
},
calcPositionForRect: function calcPositionForRect(rect, ww, wh, offset) {
if (typeof offset == 'undefined') offset = 0;
ww = ww || this.delegate.ww;
wh = wh || this.delegate.wh;
var left = Math.round((ww - this.bgw) / 2),
top = Math.round((wh - this.bgh) / 2);
switch (this.repos_mode) {
case 'self':
top -= rect.top;
left -= rect.left;
break;
default:
left -= rect.left;
top -= rect.top - offset;
break;
}
return {
top: top,
left: left
};
},
resize: function resize(ww, wh, offset) {
if (typeof offset == 'undefined') offset = 0;
this.element.removeClass('animated').css({ width: '', height: '' });
ww = ww || this.delegate.ww;
wh = wh || this.delegate.wh;
var rect = this.element[0].getBoundingClientRect();
this.bgw = ww;
this.bgh = this.bgw / this.aspect;
if (this.bgh < wh) {
this.bgh = wh;
this.bgw = this.bgh * this.aspect;
}
this.off_width = this.element.width();
this.off_height = this.element.height();
var pos = this.calcPositionForRect(rect, ww, wh, offset);
this.element.css({
backgroundSize: this.bgw + 'px ' + this.bgh + 'px',
backgroundPosition: pos.left + 'px ' + pos.top + 'px'
});
}
});
/***/ }),
/***/ 254:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
SVG = __webpack_require__(173),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'ParkSVG',
create: function create() {
this.draw = SVG(this.element[0]);
this.height = 0;
this.line1 = null;
this.line1_points = null;
this.line2 = null;
this.line2_points = null;
this.line3 = null;
this.line3_points = null;
this.line4 = null;
this.line4_points = null;
this.polyline = null;
window.app.add_resize(this);
},
resize: function resize() {
if (this.polyline) {
this.polyline.remove();
}
if (this.line1) {
this.line1.remove();
}
if (this.line2) {
this.line2.remove();
}
if (this.line3) {
this.line3.remove();
}
if (this.line4) {
this.line4.remove();
}
var container_width = this.element.parent().find('.container').width(),
column_width = container_width / 4,
padding = (window.app.ww - container_width) / 2;
var first_column_y = padding * Math.sin(36 * Math.PI / 180),
first_peak_y = (padding + column_width) * Math.sin(36 * Math.PI / 180);
this.points = [];
var i,
x = 0,
y = 0,
miny = 0,
maxy = 0;
this.points.push([x, y]);
x = padding + column_width;
y -= first_peak_y;
miny = Math.min(miny, y);
maxy = Math.max(maxy, y);
this.points.push([x, y]);
x += column_width;
y -= column_width * Math.sin(-30 * Math.PI / 180);
miny = Math.min(miny, y);
maxy = Math.max(maxy, y);
this.points.push([x, y]);
x += column_width * 2;
y -= column_width * 2 * Math.sin(36 * Math.PI / 180);
miny = Math.min(miny, y);
maxy = Math.max(maxy, y);
this.points.push([x, y]);
x = window.app.ww;
y -= padding * Math.sin(-48 * Math.PI / 180);
miny = Math.min(miny, y);
maxy = Math.max(maxy, y);
this.points.push([x, y]);
y = maxy;
this.points.push([x, y]);
this.points.push([x, y + 5]);
maxy += 5;
x = 0;
this.points.push([x, y + 5]);
this.points.push([x, y]);
if (maxy < 0) {
y = 0;
this.points.push([x, y]);
}
x = this.points[1][0];
y = this.points[1][1];
this.line1_points = [[x, y]];
x += column_width * 3;
y -= column_width * 3 * Math.sin(36 * Math.PI / 180);
this.line1_points.push([x, y]);
miny = Math.min(miny, y);
var offset = this.points[1][1];
this.height = maxy - miny;
for (i = 0; i < this.points.length; i++) {
this.points[i][1] += this.height - maxy;
}
for (i = 0; i < this.line1_points.length; i++) {
this.line1_points[i][1] += this.height - maxy;
}
x = this.points[3][0];
y = this.points[3][1];
this.line2_points = [[x, y]];
x = window.app.ww;
y -= padding * Math.sin(36 * Math.PI / 180);
this.line2_points.push([x, y]);
this.element.parent().find('.section-title').css({ paddingTop: 0, paddingBottom: 0 });
var padding_length = this.height - 5 - this.element.parent().find('.section-title').outerHeight(true),
padding_top = Math.round((padding_length - first_peak_y) / 2),
padding_bottom = padding_length - padding_top;
this.element.parent().find('.section-title').css({ paddingTop: padding_top, paddingBottom: padding_bottom });
this.element.css({ height: this.height });
var stats_numbers = this.element.parent().find('.js-park-numbers');
stats_numbers.css({
top: this.points[1][1] - stats_numbers.height() / 2,
left: Math.round(padding + column_width * 2 - 60)
});
this.polyline = this.draw.polyline(this.points).fill('#009a67');
this.line1 = this.draw.polyline(this.line1_points).stroke({ width: 1, color: '#333333', opacity: 0.08 }).fill('none');
this.line2 = this.draw.polyline(this.line2_points).stroke({ width: 1, color: '#333333', opacity: 0.08 }).fill('none');
this.line3 = this.draw.line(padding, this.height, padding, this.height - first_column_y).stroke({ width: 1, color: '#333333', opacity: 0.08 });
this.line4 = this.draw.line(padding + column_width, this.height, padding + column_width, this.height - first_peak_y).stroke({ width: 1, color: '#333333', opacity: 0.08 });
}
});
/***/ }),
/***/ 255:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'IndexServicesMap',
create: function create() {
var self = this;
// this.map_width = 2881;
// this.map_height = 2691;
this.is_mobile = window.app.mobile_detect.mobile();
this.map_width = 1440;
this.map_height = 1067;
this.loading = false;
this.loaded = false;
this.container = this.element.find('.js-container');
this.map = this.element.find('.js-services-map');
this.src = '/assets/desktop/images/map-2.png';
this.opened_marker = false;
this.markers = [];
this.element.find('.js-service-map-marker').each(function (i, elm) {
var obj = $(elm),
id = obj.data('id'),
item = {
id: id,
obj: obj,
opened: false,
popup: self.element.find('.js-services-map-popup[data-id=' + id + ']'),
toggle: function toggle(dir) {
if (typeof dir == 'undefined') dir = !this.opened;
if (dir) {
if (self.opened_marker) {
self.opened_marker.toggle(false);
self.opened_marker = null;
}
this.set_optimal_position();
this.popup.fadeIn(500);
obj.removeClass('pulse').addClass('opened');
self.opened_marker = this;
} else {
if (self.opened_marker == this) {
self.opened_marker = null;
}
this.popup.fadeOut(500);
obj.removeClass('opened').addClass('pulse');
}
this.opened = dir;
},
set_optimal_position: function set_optimal_position() {
this.popup.css({ display: 'block' }).removeClass('pinned-bottom pinned-top pinned-left pinned-right');
var width = this.popup.outerWidth(true),
height = this.popup.outerHeight(true),
marker_rect = this.obj[0].getBoundingClientRect(),
ss_top = marker_rect.top - 110 < height,
ss_left = marker_rect.left + marker_rect.width / 2 - width / 2 < 20;
if (ss_top) {
this.popup.addClass('pinned-top');
} else {
this.popup.addClass('pinned-bottom');
}
this.popup.css({ display: '' });
}
};
if (self.is_mobile) {
obj.bind('touchstart', function (e) {
item.toggle();
});
} else {
obj.bind('mouseenter mouseleave', function (e) {
switch (e.type) {
case 'mouseenter':
item.toggle(true);
break;
case 'mouseleave':
item.toggle(false);
break;
}
});
}
self.markers[id] = item;
});
if (this.is_mobile) {
this.element.find('img.map-image').bind('touchstart', function (e) {
if (self.opened_marker) {
self.opened_marker.toggle();
}
});
}
this.element.bind('load', function () {
if (self.preload()) self.element.trigger('lazy_triggered');
});
window.app.add_resize(this);
this.start_pulse();
},
start_pulse: function start_pulse() {
for (var i = 0; i < this.markers.length; i++) {
(function (marker, index) {
setTimeout(function () {
marker.obj.addClass('pulse');
}, 200 * index);
})(this.markers[i], i);
}
},
preload: function preload() {
if (this.loading || this.loaded) return false;
this.loading = true;
var self = this;
this.img = this.element.find('img.map-image');
this.img.bind('load error', function (e) {
self.map_loaded(e);
}).attr('src', this.src);
return true;
},
map_loaded: function map_loaded(e) {
this.loaded = true;
this.loading = false;
},
resize: function resize(ww, wh) {
var map_height = Math.round(ww / this.map_width * this.map_height),
map_top = ww >= 1920 ? 0 : Math.round(Math.min(1, Math.abs(1 - (ww - 1000) / 920)) * 200),
container_height = map_height + map_top;
this.map.css({ top: map_top, height: map_height });
this.element.css({ height: container_height });
this.container.css({ height: container_height });
}
});
/***/ }),
/***/ 207:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
Overlay = __webpack_require__(78),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'Leaderhips',
create: function create() {
var self = this;
this.url = this.element.data('url');
this.busy = false;
this.items = {};
this.element.find('.js-leadership').each(function (i, elm) {
var obj = $(elm),
id = obj.data('id'),
item = {
id: id,
obj: obj,
overlay: null,
loaded: false,
open: function open() {
if (this.loaded) {
return this.overlay.open();
}
self.load(id);
}
};
obj.click(function () {
item.open();
});
self.items[id] = item;
});
},
load: function load(id) {
var self = this;
if (this.busy) return;
var item = this.items[id];
$.ajax({
url: this.url,
type: 'GET',
dataType: 'json',
content: this,
data: {
id: id
},
beforeSend: function beforeSend() {
self.busy = true;
}
}).done(function (resp) {
if (resp.error) {
self.log(resp.message);
return;
}
var element = $(resp.html).appendTo(document.body);
item.overlay = new Overlay({ element: element });
item.loaded = true;
item.open();
}).fail(function () {}).always(function () {
self.busy = false;
});
}
});
/***/ }),
/***/ 240:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DialNumber = __webpack_require__(250);
var Slider = __webpack_require__(162);
__webpack_require__(247);
module.exports = function () {
var about_dial_number = null,
numbers_slider = null;
window.app.map_modules({
'.js-history': __webpack_require__(256),
'.js-flipbook': __webpack_require__(249),
'.js-leaderships': __webpack_require__(207),
'.js-structure': __webpack_require__(258),
'.js-about-dial-number': {
module: DialNumber,
callback: function callback(i) {
about_dial_number = i;
}
},
'.js-number-slider': {
module: Slider,
callback: function callback(i) {
numbers_slider = i;
}
}
});
if (about_dial_number) {
window.app.sas.addElement(about_dial_number.element, function (obj) {
about_dial_number.dial(obj.data('number'));
}, .25);
if (numbers_slider) {
numbers_slider.element.bind('items_switching', function (e, slider, pos, nxt, prev_pos, cur) {
about_dial_number.dial(nxt.element.data('number'));
});
var captions = numbers_slider.element.find('.stage2').find('.slide');
if (captions.length) {
numbers_slider.element.bind('items_switching', function (e, slider, pos, nxt, prev_pos, cur) {
captions.removeClass('active');
setTimeout(function () {
$(captions[pos]).addClass('active');
}, 500);
});
}
}
}
$(window).trigger('scroll');
};
/***/ }),
/***/ 250:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
window.dialnumbers = {};
module.exports = MinimalClass.extend({
__className: 'DialNumber',
create: function create() {
var self = this;
this.tid = this.element.data('tid');
if (this.tid) {
window.dialnumbers[this.tid] = this;
}
this.cell = [];
this.element.find('.cell').each(function (i, elm) {
var obj = $(elm),
box = obj.find('ul'),
cell = {
obj: obj,
box: box,
pos: 0,
current_num: 0,
char_height: 0,
init: function init() {
this.box.find('li').remove();
this.box.append($('
').html(this.current_num));
},
resize: function resize() {
this.char_height = this.box.outerHeight(true) / 11;
this.box.stop().css({ top: -(this.pos * this.char_height) });
},
regenerate: function regenerate(start, finish) {
this.box.find('li').remove();
this.box.append($('
').html(start));
var i,
num,
nums = [];
nums.push(start);
nums.push(finish);
for (var i = 0; i < 9; i++) {
do {
num = Math.ceil(Math.random() * 9);
} while (num == start || num == finish);
this.box.append($('
').html(num));
nums.push(num);
}
this.box.append($('
').html(finish));
this.resize();
for (i = 0; i < 10; i++) {
if (!self.in_array(i, nums)) {
this.box.append($('
').html(i));
}
}
},
dial: function dial(num) {
this.regenerate(this.current_num, num);
this.box.stop().animate({ top: -(this.char_height * 10) }, 1500);
this.current_num = num;
}
};
cell.init();
self.cell.push(cell);
});
},
dial: function dial(number) {
var self = this;
number.toString().split('').forEach(function (number, i) {
self.cell[i].dial(parseInt(number));
});
}
});
/***/ }),
/***/ 256:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
SVG = __webpack_require__(173),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'History',
create: function create() {
var self = this;
this.path = false;
this.map_modules({
'.js-history-path-svg': {
module: __webpack_require__(257),
callback: function callback(i) {
self.path = i;
}
}
});
this.rows = $('.js-history-row');
this.icon_boxes = this.rows.find('.js-icon-box');
window.app.add_resize(this);
},
resize: function resize(ww, wh) {
var row_max_height = 0;
this.rows.css({ height: 'auto' });
this.rows.each(function (i, elm) {
row_max_height = Math.max(row_max_height, $(elm).outerHeight(true));
});
this.rows.css({ height: Math.round(row_max_height) });
var icon_box_max_height = 0;
this.icon_boxes.css({ height: 'auto' });
this.icon_boxes.each(function (i, elm) {
icon_box_max_height = Math.max(icon_box_max_height, $(elm).outerHeight(true));
});
this.icon_boxes.css({ height: Math.round(icon_box_max_height) });
if (this.path) {
this.path.element.css({ top: icon_box_max_height + 12 });
this.path.lines = this.rows.length - 1;
this.path.line_height = row_max_height;
this.path.resize(ww, wh);
}
}
});
/***/ }),
/***/ 257:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
SVG = __webpack_require__(173),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'HistoryPathSVG',
pre: function pre() {
this.lines = 4;
this.line_height = 100;
this.line1 = null;
this.line2 = null;
this.line3 = null;
this.line4 = null;
},
create: function create() {
this.draw = SVG(this.element[0]);
this.animated = false;
this.animating = false;
this.path = null;
this.path_white = null;
this.arrow = null;
this.should_resize = false;
var self = this;
window.app.add_scroll(this);
},
dist: function dist(x1, x2, y1, y2) {
return Math.sqrt((x2 -= x1) * x2 + (y2 -= y1) * y2);
},
scroll: function scroll() {
if (this.animated) return;
if (!this.path_white) return;
var rect = this.element[0].getBoundingClientRect();
var prc = 0,
total = window.innerHeight + rect.height;
if (rect.top > window.innerHeight) prc = 0;else if (rect.top < -rect.height) prc = 1;else prc = 1 - (rect.top + rect.height) / total;
if (prc > 0.1) {
this.animate();
}
},
animate: function animate() {
var self = this;
this.animated = true;
this.animating = true;
this.path_white.animate(3000).stroke({ 'dashoffset': -this.path_length }).queue(function () {
self.arrow.animate(300).attr({ opacity: 1 });
self.animating = false;
if (self.should_resize) {
self.should_resize = false;
self.resize();
}
});
},
resize: function resize() {
if (this.animating) return;
if (this.path) {
this.path.remove();
}
if (this.path_white) {
this.path_white.remove();
}
if (this.arrow) {
this.arrow.remove();
}
if (this.line1) {
this.line1.remove();
}
if (this.line2) {
this.line2.remove();
}
if (this.line3) {
this.line3.remove();
}
if (this.line4) {
this.line4.remove();
}
var width = this.element.width(),
height = this.element.height();
var stroke_width = 2,
xpad = stroke_width / 2,
ypad = stroke_width / 2,
radius = this.line_height / 2,
left = this.line_height / 2 + xpad * 2,
right = width - this.line_height / 2 - xpad * 2;
this.commands = ['M' + xpad + ',' + ypad];
for (var i = 0; i < this.lines; i++) {
if (i % 2) {
this.commands.push('H' + left);
this.commands.push('A' + radius + ' ' + radius + ' 0 0 0 ' + left + ' ' + (this.line_height * (i + 1) + ypad));
} else {
this.commands.push('H' + right);
this.commands.push('A' + radius + ' ' + radius + ' 0 0 1 ' + right + ' ' + (this.line_height * (i + 1) + ypad));
}
}
if (this.lines % 2) {
this.commands.push('H' + xpad);
} else {
this.commands.push('H' + (width - xpad));
}
var lines_height = this.line_height * this.lines;
var lines_offset = radius - Math.sqrt(Math.pow(radius, 2) - Math.pow(left - width / 8, 2));
this.line1 = this.draw.line(width / 8, 0, width / 8, lines_height - lines_offset).stroke({ width: 1, color: '#333333', opacity: 0.08 });
this.line2 = this.draw.line(width / 8 * 3, 0, width / 8 * 3, lines_height).stroke({ width: 1, color: '#333333', opacity: 0.08 });
this.line3 = this.draw.line(width / 8 * 5, 0, width / 8 * 5, lines_height).stroke({ width: 1, color: '#333333', opacity: 0.08 });
this.line4 = this.draw.line(width / 8 * 7, lines_offset, width / 8 * 7, lines_height).stroke({ width: 1, color: '#333333', opacity: 0.08 });
this.path = this.draw.path(this.commands.join('')).stroke({
width: stroke_width,
color: '#02a56f',
dasharray: '20 10',
opacity: 1
}).fill('none');
if (!this.animated) {
this.path_white = this.draw.path(this.commands.join('')).stroke({
width: stroke_width + 1,
color: '#ffffff'
}).fill('none');
}
this.path_length = this.path_white.length();
this.path_white.stroke({
'dasharray': this.path_length + ' ' + this.path_length,
'dashoffset': 0
});
var arrow_height = this.line_height * this.lines + stroke_width / 2;
this.arrow = this.draw.polyline([[width - 20, arrow_height - 6], [width, arrow_height], [width - 20, arrow_height + 6]]).attr({ opacity: this.animated ? 1 : 0 }).fill('#02a56f');
}
});
/***/ }),
/***/ 258:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'Structure',
create: function create() {
var self = this;
this.box = this.element.find('.js-structure-box');
this.rect = null;
this.logos = {};
this.map_modules({
'div.detra': {
module: StructureBox1,
callback: function callback(i) {
self.logos.detra = i;
}
},
'div.agrp': {
module: StructureBox1,
options: { flip: 1 },
callback: function callback(i) {
self.logos.agrp = i;
}
},
'div.hgrp': {
module: StructureBox2,
callback: function callback(i) {
self.logos.hgrp = i;
}
},
'div.bgrp': {
module: StructureBox2,
options: { hflip: 1 },
callback: function callback(i) {
self.logos.bgrp = i;
}
},
'div.logistic': {
module: StructureBox2,
options: { vflip: 1 },
callback: function callback(i) {
self.logos.logistic = i;
}
},
'div.bvr': {
module: StructureBox2,
options: { hflip: 1, vflip: 1 },
callback: function callback(i) {
self.logos.bvr = i;
}
}
});
this.box.bind('mousemove', function (e) {
self.onMouse(e);
});
window.app.add_resize(this);
},
onMouse: function onMouse(e) {
switch (e.type) {
case 'mousemove':
var x = e.pageX - this.rect.left,
y = e.pageY - this.rect.top,
col_width = window.container_width / 4,
col_height = this.rect.height / 3,
on_left = x < col_width,
on_right = x > col_width * 3,
on_top = y < col_height,
on_bottom = y > col_height * 2,
aspect = col_width / col_height,
on_side = false;
if (on_left || on_right) {
if (on_left) {
x = col_width - x;
if (on_top) {
y = col_height - y;
on_side = x / aspect > y;
} else if (on_bottom) {
y = y - col_height * 2;
on_side = x / aspect > y;
} else {
on_side = true;
}
} else {
x = x - col_width * 3;
if (on_top) {
y = col_height - y;
on_side = x / aspect > y;
} else if (on_bottom) {
y = y - col_height * 2;
on_side = x / aspect > y;
} else {
on_side = true;
}
}
}
if (on_left && on_side) {
this.logos.detra.element.addClass('ztop');
this.logos.hgrp.element.removeClass('ztop');
this.logos.logistic.element.removeClass('ztop');
} else {
this.logos.detra.element.removeClass('ztop');
this.logos.hgrp.element.addClass('ztop');
this.logos.logistic.element.addClass('ztop');
}
if (on_right && on_side) {
this.logos.agrp.element.addClass('ztop');
this.logos.bgrp.element.removeClass('ztop');
this.logos.bvr.element.removeClass('ztop');
} else {
this.logos.agrp.element.removeClass('ztop');
this.logos.bgrp.element.addClass('ztop');
this.logos.bvr.element.addClass('ztop');
}
break;
}
},
resize: function resize() {
for (var k in this.logos) {
this.logos[k].resize();
}
var rect = this.box[0].getBoundingClientRect();
this.rect = {
top: rect.top + window.app.scrollTop,
left: rect.left,
width: rect.width,
height: rect.height
};
}
});
var StructureBox1 = MinimalClass.extend({
__className: 'StructureBox1',
create: function create() {
var self = this;
this.draw = SVG(this.element[0]);
this.polyline = false;
this.points = false;
},
resize: function resize() {
if (this.polyline) {
this.polyline.remove();
}
var rect = this.element[0].getBoundingClientRect();
if (this.flip) {
this.points = [[rect.width, 1], [0, rect.height / 3 + 1], [0, rect.height / 3 * 2 - 1], [rect.width, rect.height - 1]];
} else {
this.points = [[0, 1], [rect.width, rect.height / 3 + 1], [rect.width, rect.height / 3 * 2 - 1], [0, rect.height - 1]];
}
this.polyline = this.draw.polyline(this.points);
}
});
var StructureBox2 = MinimalClass.extend({
__className: 'StructureBox2',
create: function create() {
var self = this;
this.draw = SVG(this.element[0]);
this.polyline = false;
this.points = false;
},
resize: function resize() {
if (this.polyline) {
this.polyline.remove();
}
var rect = this.element[0].getBoundingClientRect();
if (this.hflip) {
this.points = [[rect.width, 0], [0, 0], [0, rect.height], [rect.width / 2, rect.height]];
if (this.vflip) {
this.points = [[rect.width, rect.height], [0, rect.height], [0, 0], [rect.width / 2, 0]];
}
} else {
if (this.vflip) {
this.points = [[0, rect.height], [rect.width / 2, 0], [rect.width, 0], [rect.width, rect.height]];
} else {
this.points = [[1, 0], [rect.width, 0], [rect.width, rect.height], [rect.width / 2 + 1, rect.height]];
}
}
this.polyline = this.draw.polyline(this.points);
}
});
/***/ }),
/***/ 195:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
SVG = __webpack_require__(173),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'Vacancies',
create: function create() {
var self = this;
this.map_modules({
'.js-vacancy': Vacancy
});
}
});
var Vacancy = MinimalClass.extend({
__className: 'Vacancy',
create: function create() {
var self = this;
this.opened = false;
this.title = this.element.find('.js-title');
this.header = this.element.find('.js-toggle-vacancy').click(function () {
self.toggle();
});
this.body_box = this.element.find('.vacancy-body-box');
this.body = this.body_box.find('.vacancy-body');
this.element.find('.js-trigger-resume-overlay').click(function (e) {
$('.js-overlay-vacancy-title').html(self.title.html());
window.overlays.resume.open();
});
},
toggle: function toggle() {
if (this.opened) {
this.element.removeClass('opened');
this.body_box.animate({ height: 0 });
} else {
this.element.addClass('opened');
this.body_box.animate({ height: this.body.outerHeight(true) });
}
this.opened = !this.opened;
}
});
/***/ }),
/***/ 244:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var Slider = __webpack_require__(162);
module.exports = function () {
window.app.map_modules({
'.js-vacancies': __webpack_require__(195),
'.js-career-main-slider': {
module: Slider,
options: {
load_on_demand: true
},
callback: function callback(i) {
window.career_main_slider = i;
}
}
});
$('.js-to-vacancy-list').unbind('click').click(function () {
window.app.scrollTo($('section.vacancies'), 750, null, -88);
});
$(window).trigger('scroll');
};
/***/ }),
/***/ 208:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'Contacts',
create: function create() {
var self = this;
this.times = [];
this.start_time = new Date();
$('.js-office-time').each(function (i, elm) {
var obj = $(elm),
item = {
id: i,
obj: obj,
time: new Date(obj.data('time'))
};
self.times.push(item);
});
this.interval = setInterval(function () {
self.updateTime();
}, 1000);
this.contact = {};
this.element.find('.js-contact-box').each(function (i, elm) {
var obj = $(elm),
tid = obj.data('menu-anchor'),
item = {
id: i,
obj: obj,
tid: tid,
google_map: null,
yandex_map: null,
show_google_map_btn: i ? obj.find('.js-trigger-google-map') : $('.js-trigger-google-map-big'),
show_yandex_map_btn: i ? obj.find('.js-trigger-yandex-map') : $('.js-trigger-yandex-map-big'),
close_map_btn: obj.find('.js-close-map'),
show_google_map: function show_google_map() {
this.close_maps();
this.google_map.create_map();
this.show_google_map_btn.addClass('active');
this.google_map.element.addClass('active');
this.close_map_btn.addClass('active');
},
show_yandex_map: function show_yandex_map() {
this.close_maps();
this.yandex_map.create_map();
this.show_yandex_map_btn.addClass('active');
this.yandex_map.element.addClass('active');
this.close_map_btn.addClass('active');
},
close_maps: function close_maps() {
this.show_google_map_btn.removeClass('active');
this.show_yandex_map_btn.removeClass('active');
this.google_map.element.removeClass('active');
this.yandex_map.element.removeClass('active');
this.close_map_btn.removeClass('active');
}
};
item.show_google_map_btn.click(function () {
item.show_google_map();
});
item.show_yandex_map_btn.click(function () {
item.show_yandex_map();
});
item.close_map_btn.click(function () {
item.close_maps();
});
self.contact[tid] = item;
});
if (typeof window.maps_controller != 'undefined') {
this.create_maps();
} else {
$(window).bind('maps_controller_ready', function () {
self.create_maps();
});
}
$('.js-contact-form-trigger').click(function () {
window.app.scrollTo($('section.contact-form'), 750, false, -140);
});
},
updateTime: function updateTime() {
var self = this,
current_time = new Date(),
diff = current_time.getTime() - this.start_time.getTime();
this.times.forEach(function (item) {
var date = new Date(item.time.getTime() + diff);
item.obj.html(self.za(date.getHours()) + ':' + self.za(date.getMinutes()) + ':' + self.za(date.getSeconds()));
});
},
create_maps: function create_maps() {
var self = this;
for (var tid in this.contact) {
// console.log(tid);
(function (contact) {
contact.obj.find('.js-google-map').each(function (i, elm) {
window.maps_controller.createSimpleGoogleMap($(elm), { autocreate: false }, function (instance) {
contact.google_map = instance;
});
});
contact.obj.find('.js-yandex-map').each(function (i, elm) {
window.maps_controller.createSimpleYandexMap($(elm), { autocreate: false }, function (instance) {
contact.yandex_map = instance;
});
});
})(this.contact[tid]);
}
}
});
/***/ }),
/***/ 246:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var MapsController = __webpack_require__(197);
module.exports = function () {
window.app.map_modules({
'.js-contacts': __webpack_require__(208),
'.js-floating-menu': __webpack_require__(251)
});
$('.js-scroll-to-trigger').each(function (i, elm) {
var obj = $(elm),
anchor = obj.data('anchor'),
object = $('[data-menu-anchor=' + anchor + ']');
obj.click(function () {
if (anchor == 'moscow') {
window.app.scrollTo($(document.body), 750, null, 0);
} else {
window.app.scrollTo(object, 750, null, -110);
}
});
});
new MapsController();
$(window).trigger('scroll');
};
/***/ }),
/***/ 251:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'FloatingMenu',
create: function create() {
var self = this;
this.box_top = 0;
this.box_height = 0;
this.height = 0;
this.fixed = false;
this.box = this.element.parent();
this.active_item = null;
this.items = [];
this.element.find('li').each(function (i, elm) {
var obj = $(elm),
anchor = obj.data('anchor'),
item = {
id: i,
obj: obj,
start: 0,
finish: 0,
anchor: anchor,
object: $('[data-menu-anchor=' + anchor + ']'),
active: false,
activate: function activate(dir) {
dir ? this.obj.addClass('active') : this.obj.removeClass('active');
this.active = dir;
}
};
item.obj.click(function (e) {
if (anchor == 'moscow') {
window.app.scrollTo($(document.body), 750, null, 0);
} else {
window.app.scrollTo(item.object, 750, null, -110);
}
});
self.items.push(item);
});
window.app.add_resize(this);
window.app.add_scroll(this);
},
resize: function resize(ww, wh) {
this.box_top = this.box.offset().top;
this.box_height = this.box.outerHeight(true);
if (this.fixed) {
this.element.removeClass('fixed');
}
this.element.css({ width: '' });
this.width = this.element.outerWidth(true);
this.height = this.element.outerHeight(true);
if (this.fixed) {
this.element.addClass('fixed');
}
this.element.css({ width: this.width });
for (var i = 0, count = this.items.length; i < count; i++) {
this.items[i].start = this.items[i].object.offset().top;
this.items[i].finish = this.items[i].start + this.items[i].object.outerHeight(true);
}
this.fix_start = this.box_top - 110;
this.fix_stop = Math.min(this.fix_start + (this.box_height - this.height), this.items[this.items.length - 1].start - 110);
this.scroll(window.app.scrollTop);
},
scroll: function scroll(scrollTop) {
if (window.contentFixed) return;
var fixed = scrollTop > this.fix_start && scrollTop < this.fix_stop;
if (this.fixed != fixed) {
if (fixed) {
this.element.addClass('fixed').css({ transform: '' });
} else {
this.element.removeClass('fixed');
if (scrollTop <= this.fix_start) {
this.element.css({ transform: '' });
} else {
this.element.css({ transform: 'translateY(' + (this.fix_stop - this.fix_start) + 'px)' });
}
}
this.fixed = fixed;
}
// var top = Math.min(Math.max(0,scrollTop - this.box_top),this.box_height - this.height);
// this.element.css({ transform: 'translate3d(0,' + top + 'px,0)' })
this.update_active_item(scrollTop);
},
update_active_item: function update_active_item(scrollTop) {
var item,
active_item = false;
scrollTop += window.app.wh / 2;
for (var i = 0, count = this.items.length; i < count; i++) {
if (scrollTop > this.items[i].start) {
active_item = this.items[i];
} else {
break;
}
}
if (active_item) {
if (this.active_item && this.active_item != active_item) {
this.active_item.activate(false);
this.active_item = null;
}
active_item.activate(true);
this.active_item = active_item;
} else if (this.active_item) {
this.active_item.activate(false);
this.active_item = null;
}
}
});
/***/ }),
/***/ 245:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DialNumber = __webpack_require__(250);
module.exports = function () {
var evolution_dial_number = null;
window.app.map_modules({
'#equipment-svg': __webpack_require__(262),
'.js-cars': __webpack_require__(248),
'.js-equipment-dial-number': {
module: DialNumber,
callback: function callback(i) {
evolution_dial_number = i;
}
}
});
window.app.sas.addElement(evolution_dial_number.element, function (obj) {
evolution_dial_number.dial(obj.data('number'));
}, .25);
$(window).trigger('scroll');
};
/***/ }),
/***/ 262:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
SVG = __webpack_require__(173),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'ParkSVG',
create: function create() {
this.draw = SVG(this.element[0]);
this.height = 0;
this.line1 = null;
this.line1_points = null;
this.line2 = null;
this.line2_points = null;
this.line3 = null;
this.line3_points = null;
this.line4 = null;
this.line4_points = null;
this.polyline = null;
window.app.add_resize(this);
},
resize: function resize() {
if (this.polyline) {
this.polyline.remove();
}
if (this.line1) {
this.line1.remove();
}
if (this.line2) {
this.line2.remove();
}
if (this.line3) {
this.line3.remove();
}
if (this.line4) {
this.line4.remove();
}
var container_width = this.element.parent().find('.container').width(),
column_width = container_width / 4,
padding = (window.app.ww - container_width) / 2;
this.points = [];
var i,
x = 0,
y = 0,
miny = 0,
maxy = 0;
this.points.push([x, y]);
x = padding + column_width + 1;
y -= (padding + column_width) * Math.sin(36 * Math.PI / 180);
miny = Math.min(miny, y);
maxy = Math.max(maxy, y);
this.points.push([x, y]);
x += column_width;
y -= column_width * Math.sin(-30 * Math.PI / 180);
miny = Math.min(miny, y);
maxy = Math.max(maxy, y);
this.points.push([x, y]);
x += column_width * 2;
y -= column_width * 2 * Math.sin(36 * Math.PI / 180);
miny = Math.min(miny, y);
maxy = Math.max(maxy, y);
this.points.push([x, y]);
x = window.app.ww;
y -= padding * Math.sin(-48 * Math.PI / 180);
miny = Math.min(miny, y);
maxy = Math.max(maxy, y);
this.points.push([x, y]);
y = maxy;
this.points.push([x, y]);
x = 0;
this.points.push([x, y]);
if (maxy < 0) {
y = 0;
this.points.push([x, y]);
}
x = this.points[1][0];
y = this.points[1][1];
miny = Math.min(miny, y);
this.height = maxy - miny;
for (i = 0; i < this.points.length; i++) {
this.points[i][1] += this.height - maxy + padding * Math.sin(36 * Math.PI / 180);
}
this.line1_points = [this.points[1], [this.points[1][0], this.height]];
this.line2_points = [this.points[2], [this.points[2][0], this.height]];
this.line3_points = [[this.points[2][0] + column_width, this.points[2][1] - column_width * Math.sin(36 * Math.PI / 180)], [this.points[2][0] + column_width, this.height]];
this.line4_points = [this.points[3], [this.points[3][0], this.height]];
this.element.css({ height: this.height });
this.polyline = this.draw.polyline(this.points).fill('#ffffff');
this.line1 = this.draw.polyline(this.line1_points).stroke({ width: 1, color: '#333333', opacity: 0.08 }).fill('none');
this.line2 = this.draw.polyline(this.line2_points).stroke({ width: 1, color: '#333333', opacity: 0.08 }).fill('none');
this.line3 = this.draw.polyline(this.line3_points).stroke({ width: 1, color: '#333333', opacity: 0.08 }).fill('none');
this.line4 = this.draw.polyline(this.line4_points).stroke({ width: 1, color: '#333333', opacity: 0.08 }).fill('none');
}
});
/***/ }),
/***/ 242:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function () {
window.app.map_modules({
'.js-calendar': __webpack_require__(259),
'#news-box': __webpack_require__(200)
});
$(window).trigger('scroll');
};
/***/ }),
/***/ 259:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'Calendar',
create: function create() {
var self = this;
this.current_year = new Date().getFullYear();
this.min_year = 2011;
this.max_year = parseInt(this.current_year);
this.first_date = 0;
this.last_date = 0;
this.calendar = this.element.find('.calendar');
this.year_span = this.element.find('.js-year');
this.toggler = this.element.find('.js-toggle').click(function () {
self.toggle();
});
this.calendar_span = this.element.find('.js-calendar-span');
this.calendar_span_default = this.calendar_span.html();
this.clear_filter = this.element.find('.js-clear-calendar');
this.fill_calendar = this.element.find('.js-fill-calendar');
this.opened = false;
this.inited = false;
this.mouse_over = false;
this.element.bind('mouseenter mouseleave', function (e) {
self.mouse_over = e.type == 'mouseenter';
});
$(window).click(function () {
if (!self.mouse_over) {
self.toggle(false);
}
});
this.prev = this.element.find('.js-prev').click(function () {
if (self.current_year - 1 >= self.min_year) {
self.current_year--;
self.update_year();
}
});
this.next = this.element.find('.js-next').click(function () {
if (self.current_year + 1 <= self.max_year) {
self.current_year++;
self.update_year();
}
});
this.months_text = [];
this.months = this.element.find('.month');
this.months.each(function (i, elm) {
elm = $(elm);
self.months_text.push(elm.text());
elm.click(function () {
self.month_click(elm);
});
});
this.update_disabled = false;
this.clear_filter.click(function (e) {
e.preventDefault();
e.stopPropagation();
self.last_date = self.first_date = 0;
self.update_month_classes();
self.update(true);
self.toggle(false);
});
this.fill_calendar.click(function (e) {
e.preventDefault();
e.stopPropagation();
self.toggle();
});
this.update_year();
},
toggle: function toggle(dir) {
var self = this;
if (typeof dir == 'undefined') {
dir = !this.opened;
} else if (this.opened == dir) {
return;
}
if (dir) {
this.element.addClass('open');
this.calendar.slideDown();
this.opened = dir;
} else {
this.calendar.slideUp();
setTimeout(function () {
self.element.removeClass('open');
}, 300);
this.opened = dir;
}
},
month_click: function month_click(month_element) {
var date = parseInt(this.current_year + '' + month_element.data('num'));
if (!month_element.hasClass('selected')) {
if (this.first_date && date < this.first_date) {
this.first_date = date;
} else if (this.first_date && this.last_date && date > this.last_date) {
this.last_date = date;
} else if (this.last_date && date < this.last_date) {
this.last_date = date;
} else if (!this.first_date) {
this.first_date = date;
} else if (!this.last_date) {
this.last_date = date;
}
} else {
if (date == this.last_date) {
this.last_date = 0;
} else if (date == this.first_date) {
this.first_date = this.last_date;
this.last_date = 0;
}
}
this.update_month_classes();
},
update_month_classes: function update_month_classes() {
var self = this,
start_year = 0,
start_month = 0,
finish_year = 0,
finish_month = 0,
string = '';
this.months.each(function (i, element) {
var num = i + 1,
cur_date = parseInt(self.current_year + (num < 10 ? '0' + num : num).toString()),
element = $(element).removeClass('selected period');
if (cur_date == self.first_date || cur_date == self.last_date) {
element.addClass('selected');
} else if (self.last_date && cur_date > self.first_date && cur_date < self.last_date) {
element.addClass('period');
}
});
if (this.first_date) {
start_year = this.first_date.toString().substr(0, 4);
start_month = this.first_date.toString().substr(4, 2);
// start_month = parseInt(this.first_date.toString().substr(4,2));
// start_month = this.months_text[start_month-1];
string = start_month + '.' + start_year;
}
if (this.last_date) {
finish_year = this.last_date.toString().substr(0, 4);
finish_month = this.last_date.toString().substr(4, 2);
// finish_month = parseInt(this.last_date.toString().substr(4,2));
// finish_month = this.months_text[finish_month-1];
string += ' – ' + finish_month + '.' + finish_year;
}
this.first_date || this.last_date ? this.element.addClass('could-clear') : this.element.removeClass('could-clear');
if (this.first_date) {
// this.update_disabled = false;
this.update();
} else {
// this.update_disabled = true;
if (this.inited) {
this.update();
} else {
this.inited = true;
}
}
this.calendar_span.empty().append(string.length ? string : this.calendar_span_default);
},
update_year: function update_year() {
this.current_year + 1 > this.max_year ? this.next.addClass('disabled') : this.next.removeClass('disabled');
this.current_year - 1 < this.min_year ? this.prev.addClass('disabled') : this.prev.removeClass('disabled');
this.year_span.text(this.current_year);
this.update_month_classes();
},
update: function update(force) {
if (force || !this.update_disabled) {
// this.toggle(false);
$(window).trigger('update_calendar', [this, this.first_date, this.last_date]);
}
}
});
/***/ }),
/***/ 260:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
ForceSelect = __webpack_require__(174),
ProjectsListItem = __webpack_require__(261),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'ProjectsList',
create: function create() {
var self = this;
this.items = [];
this.element.find('.js-project-item').each(function (i, elm) {
self.items.push(new ProjectsListItem({ element: elm }));
});
this.clear_filter_btn = $('.js-clear-projects-filter').click(function () {
self.clear_filters();
});
this.select_client = null;
$('.js-select-client').each(function (i, elm) {
self.select_client = new ForceSelect({ element: elm, delegate: self, onChange: function onChange() {
self.filter();
} });
});
this.select_work_type = null;
$('.js-select-work-type').each(function (i, elm) {
self.select_work_type = new ForceSelect({ element: elm, delegate: self, onChange: function onChange() {
self.filter();
} });
});
},
filter: function filter() {
var client = parseInt(this.select_client.value),
work_type = parseInt(this.select_work_type.value);
if (client || work_type) {
this.element.addClass('filtered');
this.clear_filter_btn.addClass('visible');
} else {
this.element.removeClass('filtered');
this.clear_filter_btn.removeClass('visible');
}
this.items.forEach(function (project) {
project.filter(client, work_type);
});
$(window).trigger('scroll');
},
clear_filters: function clear_filters() {
this.select_client.set_value(0);
this.select_work_type.set_value(0);
this.filter();
},
focus_project: function focus_project(alias) {
var item = false;
for (var i = 0; i < this.items.length; i++) {
if (this.items[i].alias === alias) {
item = this.items[i];
break;
}
}
if (!item || this.focused_item === item) {
return;
}
this.filter_by_status(0);
if (this.focused_item) {
this.focused_item.focus(false);
}
this.focused_item = item.focus(true);
$('html, body').animate({ scrollTop: item.element.offset().top - 100 });
}
});
/***/ }),
/***/ 261:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(0),
MinimalClass = __webpack_require__(1);
module.exports = MinimalClass.extend({
__className: 'ProjectsListItem',
create: function create() {
var self = this;
this.id = parseInt(this.element.data('id'));
this.slug = this.element.data('slug');
this.status = this.element.data('status') || 0;
this.active = true;
this.number = this.element.find('.js-num');
this.clients = this.element.data('clients').toString().split(',');
this.work_types = this.element.data('work-types').toString().split(',');
this.focused = false;
this.mouseover = false;
this.onMouse = function (e) {
self.mouseover = e.type == 'mouseenter';
};
},
filter: function filter(client, work_type) {
var show = (!client || this.in_array(client, this.clients)) && (!work_type || this.in_array(work_type, this.work_types));
show ? this.show() : this.hide();
},
show: function show(number) {
number = parseInt(number);
this.number.html(number < 10 ? '0' + number : number);
if (!this.active) {
this.element.removeClass('hidden');
this.active = true;
}
return this;
},
hide: function hide() {
if (this.active) {
this.element.addClass('hidden');
this.active = false;
}
return this;
},
focus: function focus(dir) {
if (this.focused == dir) {
return;
}
dir ? this.element.addClass('focused') : this.element.removeClass('focused');
if (dir) {
this.element.bind('mouseenter mouseleave', this.onMouse);
} else {
this.element.unbind('mouseenter mouseleave', this.onMouse);
}
this.focused = dir;
return this;
}
});
/***/ }),
/***/ 241:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function () {
window.app.map_modules({
'.js-floating-menu': __webpack_require__(251)
});
$(window).trigger('scroll');
};
/***/ })
});