$(document).ready(function() { $('[data-toggle=offcanvas]').click(function() { $('.row-offcanvas').toggleClass('active'); }); $("dl").addClass('dl-horizontal'); $('blockquote h2').click(function() { $( this ).toggleClass('activeTiroir'); }); $('select.redirect').change(function() { window.location = $(':selected',this).attr('value') }); $("hr + hr").each(function(i) { if(i % 2 == 0) { $(this).nextUntil('hr').wrapAll('
'); } $(this).prev().remove(); $(this).remove(); }) var resizeH = []; var timer_resizeH; $("[data-resizeh]").each(function() { if($.inArray($(this).attr("data-resizeh"), resizeH) == -1) resizeH.push($(this).attr("data-resizeh")); }); $(window).resize(function() { setTimeout(function() { for(var i = 0, length = resizeH.length; i < length; i++) { var height = 0; $("[data-resizeh='" + resizeH[i] + "']").css("height", "").each(function() { if($(this).innerHeight() > height) height = $(this).innerHeight(); }).css("height", height); } }, 200); }).trigger("resize"); });