'); excellist();}
if ($('.page-node-type-escp-edito.page-type.faculty-page').length > 0) { loadFeed(); }
if ($('.js-remove-time').length > 0) {
jsRemove();
}
// On resize
$(window).on("resize", function(e) {
cardWidth();
});
// On ajax complete
$(document).ajaxComplete(function(event, request, settings) {
config_dot();
cardWidth();
formBoxit();
formYears();
dataTimer();
formFinder();
$('.item-result:contains("Venture Formation and Performance: A Capability Configurational Approach")').remove();
});
// Coporate brochure in mega menu
function CorPdf() {
var link = $('.megamenu-inner a[href="http://www.escpeurope.eu/sites/default/files/PDF/Corporate-Brochure/Corporate-Brochure-ESCP-Europe-July-2018.pdf"]'),
url = link.attr('href');
link.click(function() {
window.open(url, '_blank');
return false;
});
}
// Config dot.dot.dot
function config_dot() {
$('.wrap-item .title-item').not('.main-title-1.h-color-white').dotdotdot({watch: true,heigth: null,});
$('.wrap-item .subtitle-item').dotdotdot({watch: true,heigth: null,});
$('.wrap-item .main-item .title-item-event').dotdotdot({watch: true,heigth: null,});
$('.conversation .wrap-item .text-item').dotdotdot({watch: true,heigth: null,});
$('.popup-toolkit.h-bg-blue-cello .text-item').dotdotdot({watch: true,heigth: null,});
}
// Form news, events
function formFinder() {
var params_parts,button=" .main-cours-finder input.btn",btnForm=$(".path-news.list-actu-page"+button+", .path-events.list-event-page"+button+" , .path-press-releases"+button);btnForm.on("click",function(t){t.preventDefault();var n=[];$(".form-cours-finder select, .publication-listing select").each(function(){n.push($(this).attr("name"))});var a={};n.forEach(function(t){a[t]=function(t){var n=$("select[name="+t+"]").first();if(n){var a=n.val();return Array.isArray(a)?a.join("-"):a}}(t)});var e=[];Object.keys(a).forEach(function(t,n){a[t]&&e.push(t+"="+encodeURIComponent(a[t]))});var r=$(this).closest("form").attr("action"),o=($(this).closest("form").attr("data-page-url"),r+"?"+e.join("&"));if(!$("body").hasClass("page-node-type-technical-publication-listing")&&btnForm.hasClass("btn-fullwidth"))return faculty_parameters=e.join("&");window.location.href=o});
}
// Border card-story News Events
function cardWidth() {
var CC = $('.card.card-stories .content-card, .conversation .card.card-slider .content-card').width();
var CCA = Math.ceil(CC);
//setTimeout( function() { $('.card.card-stories .slick-list.draggable, .conversation .card.card-slider .slick-list.draggable').width(CCA); },1000);
}
//Custom form field
function csFormfield() {
$('.cs-formfield label.option').html('');
}
// Form field year
function formYears() {
var $formYears = $('span[name="year"] .selectboxit-text').html();
if ($formYears === '' || $formYears === null) {
$('span[name="year"] .selectboxit-text').text('All years');
}
}
// Select Box it
function formBoxit() {
$('.form-card select, .loadlist select').selectBoxIt({
autoWidth: false
});
}
// js remove
function jsRemove(){var m=new Date;$(".js-remove-time").each(function(){var t=$(this),a=t.attr("data-time-remove"),e=t.attr("data-time-start"),i=t.attr("data-time-class");if(void 0!==a&&!1!==a){var s,r=(a=t.attr("data-time-remove").split(" "))[1];a=(s=(s=a[0].split("/"))[1]+"/"+s[0]+"/"+s[2])+" "+r,a=new Date(a)}if(void 0!==e&&!1!==e){var d,v=(e=t.attr("dats-time-start").split(" "))[1];e=(d=(d=e[0].split("/"))[1]+"/"+d[0]+"/"+d[2])+" "+v,e=new Date(e)}(a<=m||m<=e)&&(void 0!==i&&!1!==i?t.addClass(i):t.css("display","none"))})}
// View more
function viewMore() {
$(".view-more").each(function(){var t=$(".cta-listing",this),i=$(this),s=$(".cssload-thecube",this),e=$(this).attr("vm-show"),h=$(this).attr("vm-slice"),a=$(this).attr("vm-display"),c=$("> [class*=item]",i).length;e=void 0!==e&&!1!==e?$(this).attr("vm-show"):5,h=void 0!==h&&!1!==h?$(this).attr("vm-slice"):5,a=void 0!==a&&!1!==a?$(this).attr("vm-display"):"block",$("> [class*=item]",i).slice(0,e).show().css("display",a),c<=e&&t.parent().hide(),t.on("click",function(e){e.preventDefault(),$(this).parent().hide(),s.show(),setTimeout(function(){$("> [class*=item]:hidden",i).slice(0,h).fadeIn().css("display",a),s.hide(),0===$("> [class*=item]:hidden",i).length?t.hide():t.parent().show()},2080)})});
}
// Load custom content
/* Helper */
function loadList() {
var $pushlist=$(".loadlist");$pushlist.each(function(){$(this).addClass("is-loading");var t,a,i,s,n,o,e,l,d,r,c,f,u,h=$(this),m=($("form",h),h.attr("data-load")),p=jQuery.parseJSON(m),g=window.location.pathname.split("/")[1];if(-1!==jQuery.inArray(g,["fr","pl","it","es","de"]))var v="/"+g;else v="";if($.each(p,function(t,d){return"url"==t?a=d:"type"===t?i="/"+d:"cat"===t?s="category="+d:"catsearch"===t?n="categoryresearch="+d:"campus"==t?o="campus="+d:"lang"===t?e="language="+d:"targetid"===t?r="#"+d:"targetclass"===t?c="."+d.split(" ").join(", ."):"search"===t?l="q="+d.split(" ").join("+"):"col"===t?f=d:void 0}),void 0!==r&&(d=" "+r,void 0!==c&&(d+=" "+c)),void 0!==i){var b=[s,o,e,n,l].filter(Boolean);u=b.length>0?"?":"",t=v+i+u+b.join("&")}else t=v+a;function C(t,a){var i=$(".cta-listing",a),s=$(".cssload-thecube",a),n=$(".main-listing .grid",a);a.hasClass("slick")&&slideContent(a,t,f),i.on("click",function(o){o.preventDefault(),$(s).show(),$(i).hide();var e=$(this).attr("data-pager"),l=$(this).attr("data-items");$.ajax({url:t+"&page="+e,type:"GET",success:function(t){$(s).hide(),$(n).append($(t).find(".main-listing .grid").html()).ready(function(){void 0!==f&&$(".col-4_md-6_sm-12",a).each(function(){$(this).removeClass("col-4_md-6_sm-12").addClass(f)})}),e=parseInt(e)+1,$(i).attr("data-pager",e),$(".item-simple",a).length
');
$this.after('