
PK 
$(document).foundation();
// $(document).ready(function(){$.cookieBar();});
$(document).ready(function() {
// $('nav ul li.large a').click(function(e) {
//
// e.preventDefault();
//
// // Set target
// var rel = $(this).attr('rel');
// var subNav = rel + '-menu';
//
// // Hide all sub-navs except chosen one.
//
// $('.sub-nav').each(function(){
//
// if ( ! $(this).hasClass(subNav) ) {
// $(this).slideUp(500);
// }
//
// });
//
// // Toggle chosen sub-nav
// $("#" + subNav).slideToggle('slow');
//
// });
// $('nav ul li.large a').mouseenter(function() {
// var rel = $(this).attr('rel');
// var subNav = rel + '-menu';
// $("#" + subNav).addClass('show-sub-menu');
// }).mouseleave(function() {
// var rel = $(this).attr('rel');
// var subNav = rel + '-menu';
// $("#" + subNav).removeClass('show-sub-menu');
//
// });
//
// $('.sub-nav').mouseenter(function() {
// $(this).addClass('show-sub-menu');
// }).mouseleave(function() {
// $(this).removeClass('show-sub-menu');
// });
$(".hamburger").click(function() {
$(this).toggleClass("is-active");
$("nav").toggleClass("open");
});
// var $container = $('.large'),
// $trigger = $('.large a');
//
// $trigger.on('click',function(){
//
// var $this = $(this).siblings('.sub-nav');
//
//
// // Hide all dropdowns
// $container.find('.sub-nav').slideUp('slow');
// $('.wrapper').removeClass('shift')
//
// // Check if dropdown is visible
// // true - hide dropdown
// // false - show dropdown
// if($this.is(':visible')) {
// $this.slideUp();
//
// }
//
// else {
// $this.delay(400).slideDown();
// $('.wrapper').toggleClass('shift');
// }
// });
//
//
// $('#RU-btn').click(function(e){
//
// e.preventDefault();
//
// $('.langEN').hide();
// $('.langRU').show();
// setCookie('mode', 'RU');
// });
//
// $('#EN-btn').click(function(e){
//
// e.preventDefault();
//
// $('.langEN').show();
// $('.langRU').hide();
// setCookie('mode', 'EN');
// });
// function getCookie(cname) {
// var name = cname + "=";
// var ca = document.cookie.split(';');
// for (var i = 0; i < ca.length; i++) {
// var c = ca[i];
// while (c.charAt(0) == ' ') {
// c = c.substring(1);
// }
// if (c.indexOf(name) == 0) {
// return c.substring(name.length, c.length);
// }
// }
// return "";
// }
//
// function setCookie(cname, cvalue) {
// var d = new Date();
// d.setTime(d.getTime() + (365 * 24 * 60 * 60 * 1000));
// var expires = "expires=" + d.toUTCString();
// document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
// }
//
// var mode = getCookie('mode');
//
// if(mode == 'EN') {
// console.log('EN MODE ACTIVE');
// $('.langEN').show();
// $('.langRU').hide();
// } else {
// // RU mode code here
// console.log(mode);
// $('.langEN').hide();
// $('.langRU').show();
// }
$('.news-homeslide').slick({
centerMode: true,
centerPadding: '60px',
slidesToShow: 3,
autoplay: true,
autoplaySpeed: 7000,
infinite: true,
responsive: [
{
breakpoint: 768,
settings: {
arrows: false,
centerMode: true,
centerPadding: '40px',
slidesToShow: 2
}
},
{
breakpoint: 480,
settings: {
arrows: false,
centerMode: true,
centerPadding: '40px',
slidesToShow: 1
}
}
]
});
if ($('.news-grid')[0]) {
var $grid = $('.news-grid').isotope({
// options
itemSelector: '.grid-item',
layoutMode: 'fitRows',
});
$('.all').on('click', function() {
$('.filter').removeClass('filter-active');
$(this).toggleClass('filter-active');
$grid.isotope({ filter: '.grid-item' });
});
$('.news-option').on('click', function() {
$('.filter').removeClass('filter-active');
$(this).toggleClass('filter-active');
$grid.isotope({ filter: '.news' });
});
$('.awards-option').on('click', function() {
$('.filter').removeClass('filter-active');
$(this).toggleClass('filter-active');
$grid.isotope({ filter: '.awards' });
});
$('.insights-option').on('click', function() {
$('.filter').removeClass('filter-active');
$(this).toggleClass('filter-active');
$grid.isotope({ filter: '.articles' });
});
}
//****************************
// Isotope Load more button
//****************************
var initShow = 12; //number of items loaded on init & onclick load more button
var counter = initShow; //counter for load more button
var iso = $grid.data('isotope'); // get Isotope instance
loadMore(initShow); //execute function onload
function loadMore(toShow) {
$grid.find(".hidden").removeClass("hidden");
var hiddenElems = iso.filteredItems.slice(toShow, iso.filteredItems.length).map(function(item) {
return item.element;
});
$(hiddenElems).addClass('hidden');
$grid.isotope('layout');
//when no more to load, hide show more button
if (hiddenElems.length == 0) {
jQuery("#loadMore").hide();
} else {
jQuery("#loadMore").show();
};
}
//append load more button
$grid.after('<div class="grid-x grid-padding-x grid-padding-y" style="margin-top:30px"><div class="medium-12 cell"><a href="#" id="loadMore">Load More</a></div></div></div>');
//when load more button clicked
$("#loadMore").click(function() {
if ($('#filters').data('clicked')) {
//when filter button clicked, set initial value for counter
counter = initShow;
$('#filters').data('clicked', false);
} else {
counter = counter;
};
counter = counter + initShow;
loadMore(counter);
});
//when filter button clicked
$("#filters").click(function() {
$(this).data('clicked', true);
loadMore(initShow);
});
$(function () {
$('.news-item').matchHeight();
$('.people-block img').matchHeight();
$('.content.show').matchHeight();
// // $('.news-item.langEN .intro-text').matchHeight();
// // $('.news-item.langRU .intro-text').matchHeight();
// $('#news-page .langEN .intro-text').matchHeight();
// $('#news-page .langRU .intro-text').matchHeight();
$('#news-section .news-item').matchHeight();
$('.services-related .intro-text').matchHeight();
$('.services-related img').matchHeight();
// $('.grid-item img').matchHeight();
});
})


PK 99