;(function($, window, document, undefined) { 'use strict'; $('.hover span').on('click', function() { var $t = $(this); $t.siblings('.list').slideToggle(300); $t.toggleClass('active'); }); var lastClass = ''; $('.hover .list li').on('click', function() { var tx = $(this).text(); var hoverClass = $(this).attr('data-hover'); if($('.portfolio.simple').length){ $('.portfolio.simple').each(function(index){ $(this).find('.item-link').removeClass(lastClass); lastClass = hoverClass; $(this).find('.item-link').addClass(hoverClass); }) } $('.hover span').text(tx); $(this).parents('.list').toggle(); $('.hover span').toggleClass('active'); }); })(jQuery, window, document); // (function(d, w, c) { // w.ChatraID = 'Yrq4ndhHdisgZLu8R'; // var s = d.createElement('script'); // w[c] = w[c] || function() { // (w[c].q = w[c].q || []).push(arguments); // }; // s.async = true; // s.src = (d.location.protocol === 'https:' ? 'https:': 'http:') // + '//call.chatra.io/chatra.js'; // if (d.head) d.head.appendChild(s); // })(document, window, 'Chatra');