|
@@ -1,11 +1,12 @@
|
|
|
(function (document, window, $) {
|
|
(function (document, window, $) {
|
|
|
- if ($("*").is('#dayitime')) {
|
|
|
|
|
|
|
+ if ($('#dayitime').lenght) {
|
|
|
function addZero(i) {
|
|
function addZero(i) {
|
|
|
if (i < 10) {
|
|
if (i < 10) {
|
|
|
i = "0" + i;
|
|
i = "0" + i;
|
|
|
}
|
|
}
|
|
|
return i;
|
|
return i;
|
|
|
- };
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
function getCurrentTime1() {
|
|
function getCurrentTime1() {
|
|
|
var today_time, h, m;
|
|
var today_time, h, m;
|
|
|
today_time = new Date(Date.now());
|
|
today_time = new Date(Date.now());
|
|
@@ -47,7 +48,7 @@
|
|
|
setTimeout(clock, 1000);
|
|
setTimeout(clock, 1000);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if ($("*").is('#filterservice')) {
|
|
|
|
|
|
|
+ if ($('#filterservice').length) {
|
|
|
function checktoggle() {
|
|
function checktoggle() {
|
|
|
if ($("#switch_old").is(':checked')) {
|
|
if ($("#switch_old").is(':checked')) {
|
|
|
$('#switch_old2').addClass("filterservice__labelbig--active");
|
|
$('#switch_old2').addClass("filterservice__labelbig--active");
|
|
@@ -77,7 +78,7 @@
|
|
|
$(".shortnews__description").dotdotdot();
|
|
$(".shortnews__description").dotdotdot();
|
|
|
}, 10);
|
|
}, 10);
|
|
|
|
|
|
|
|
- if ($("*").is('#filterservice')) {
|
|
|
|
|
|
|
+ if ($('#filterservice').length) {
|
|
|
checktoggle();
|
|
checktoggle();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -119,8 +120,7 @@
|
|
|
$('input, textarea').focus(function () {
|
|
$('input, textarea').focus(function () {
|
|
|
$(this).data('placeholder', $(this).attr('placeholder'))
|
|
$(this).data('placeholder', $(this).attr('placeholder'))
|
|
|
$(this).attr('placeholder', '');
|
|
$(this).attr('placeholder', '');
|
|
|
- });
|
|
|
|
|
- $('input, textarea').blur(function () {
|
|
|
|
|
|
|
+ }).blur(function () {
|
|
|
$(this).attr('placeholder', $(this).data('placeholder'));
|
|
$(this).attr('placeholder', $(this).data('placeholder'));
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -164,7 +164,7 @@
|
|
|
|
|
|
|
|
/*$('.centerbar input, .centerbar select').styler();*/
|
|
/*$('.centerbar input, .centerbar select').styler();*/
|
|
|
|
|
|
|
|
- if ($("*").is('#newsfilter')) {
|
|
|
|
|
|
|
+ if ($('#newsfilter').length) {
|
|
|
$("#newsfiltericon").click(function () {
|
|
$("#newsfiltericon").click(function () {
|
|
|
$(".newsfilter__open").toggleClass('newsfilter__open--show');
|
|
$(".newsfilter__open").toggleClass('newsfilter__open--show');
|
|
|
});
|
|
});
|
|
@@ -180,25 +180,82 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- new SpecFilter.SpecFilter($('.newsfilter__specializations .newsfilter__text'));
|
|
|
|
|
- new RegionFilter.RegionFilter($('.newsfilter__regions .newsfilter__text'), {
|
|
|
|
|
- itemsContainerClass: 'regionsfilter__container',
|
|
|
|
|
- itemContainerClass: 'regionsfilter__region',
|
|
|
|
|
- itemCheckboxClass: 'regionsfilter__checkbox',
|
|
|
|
|
- itemLabelClass: 'regionsfilter__label'
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // isolate scope for easier moving and extension
|
|
|
|
|
+ (function ($) {
|
|
|
|
|
+ new SpecFilter.SpecFilter($('.newsfilter__specializations .newsfilter__text'));
|
|
|
|
|
+ new RegionFilter.RegionFilter($('.newsfilter__regions .newsfilter__text'), {
|
|
|
|
|
+ itemsContainerClass: 'regionsfilter__container',
|
|
|
|
|
+ itemContainerClass: 'regionsfilter__region',
|
|
|
|
|
+ itemCheckboxClass: 'regionsfilter__checkbox',
|
|
|
|
|
+ itemLabelClass: 'regionsfilter__label'
|
|
|
|
|
+ });
|
|
|
|
|
+ })($);
|
|
|
|
|
+
|
|
|
|
|
+ // isolate scope for easier moving and extension
|
|
|
|
|
+ (function (w) {
|
|
|
|
|
+ w.showFotorama = function (jQuery, fotoramaObjectClass, fotoramaPrevClass, fotoramaNextClass) {
|
|
|
|
|
+ var $selector = jQuery(fotoramaObjectClass);
|
|
|
|
|
+ $selector.data('navwidth', ($selector.outerWidth() - 80) + 'px');
|
|
|
|
|
+ var $fotoramaDiv = $selector.fotorama();
|
|
|
|
|
+ var fotorama = $fotoramaDiv.data('fotorama');
|
|
|
|
|
+ jQuery(fotoramaPrevClass).click((function (e) {
|
|
|
|
|
+ fotorama.show('<');
|
|
|
|
|
+ }).bind(this));
|
|
|
|
|
+ jQuery(fotoramaNextClass).click((function (e) {
|
|
|
|
|
+ fotorama.show('>');
|
|
|
|
|
+ }).bind(this));
|
|
|
|
|
+ };
|
|
|
|
|
+ })(window);
|
|
|
|
|
+
|
|
|
|
|
+ // isolate scope for easier moving and extension
|
|
|
|
|
+ (function (assetsUrl, document, $) {
|
|
|
|
|
+ var n = document.getElementsByTagName('script')[0],
|
|
|
|
|
+ s = document.createElement('script'),
|
|
|
|
|
+ c = document.createElement('link');
|
|
|
|
|
+ c.setAttribute('rel', 'stylesheet');
|
|
|
|
|
+ c.href = assetsUrl.replace(/\/+$/, '') + '/css/slick.css';
|
|
|
|
|
+ c.setAttribute('type', 'text/css');
|
|
|
|
|
+ n.parentNode.insertBefore(c, n);
|
|
|
|
|
|
|
|
- window.showFotorama = function(jQuery, fotoramaObjectClass, fotoramaPrevClass, fotoramaNextClass) {
|
|
|
|
|
- var $selector = jQuery(fotoramaObjectClass);
|
|
|
|
|
- $selector.data('navwidth', ($selector.outerWidth() - 80) + 'px');
|
|
|
|
|
- var $fotoramaDiv = $selector.fotorama();
|
|
|
|
|
- var fotorama = $fotoramaDiv.data('fotorama');
|
|
|
|
|
- jQuery(fotoramaPrevClass).click((function (e) {
|
|
|
|
|
- fotorama.show('<');
|
|
|
|
|
- }).bind(this));
|
|
|
|
|
- jQuery(fotoramaNextClass).click((function (e) {
|
|
|
|
|
- fotorama.show('>');
|
|
|
|
|
- }).bind(this));
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ s.async = true;
|
|
|
|
|
+ s.onload = function () {
|
|
|
|
|
+ $('.organization-media__slider').slick({
|
|
|
|
|
+ infinite: true,
|
|
|
|
|
+ dots: false,
|
|
|
|
|
+ slidesToShow: 3,
|
|
|
|
|
+ slidesToScroll: 1,
|
|
|
|
|
+ prevArrow: '<div class="slick-prev"></div>',
|
|
|
|
|
+ nextArrow: '<div class="slick-next"></div>'
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+ s.src = assetsUrl.replace(/\/+$/, '') + '/js/slick.min.js';
|
|
|
|
|
+ n.parentNode.insertBefore(s, n);
|
|
|
|
|
+ })(window.assetsUrl || '/', document, $);
|
|
|
|
|
+
|
|
|
|
|
+ // isolate scope for easier moving and extension
|
|
|
|
|
+ (function ($) {
|
|
|
|
|
+ $('.organization-info__slidedown-handler').click(function (e) {
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
+ var $content = $(this)
|
|
|
|
|
+ .parents('.organization-info__slidedown')
|
|
|
|
|
+ .find('.organization-info__slidedown-content');
|
|
|
|
|
+ $content.slideToggle();
|
|
|
|
|
+ });
|
|
|
|
|
+ })($);
|
|
|
|
|
+
|
|
|
|
|
+ // isolate scope for easier moving and extension
|
|
|
|
|
+ (function ($) {
|
|
|
|
|
+ $('.organization-info__description-read-more').click(function (e) {
|
|
|
|
|
+ var $button;
|
|
|
|
|
+ var $container;
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
+ $button = $(this);
|
|
|
|
|
+ $container = $button.parent().find('.organization-info__description');
|
|
|
|
|
+ $container.animate({'max-height': $container.find('.organization-info__description-content').outerHeight() + 100}, 100, function () {
|
|
|
|
|
+ $container.removeClass('organization-info__description--short').css('maxHeight', 'none');
|
|
|
|
|
+ $button.remove();
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ })($);
|
|
|
|
|
|
|
|
})(window.document, window, window.jQuery);
|
|
})(window.document, window, window.jQuery);
|