// var doTheScroll = true; function debugRow(y, height) { if(y === undefined) y = 0; if(height === undefined) height = 1; $('body').append('
'); } $(function() { // EU COOKIE MONSTER // var eupref = Cookies.get('eu-disable'); // if(eupref == undefined) { // var cmaside = $(''); // $('#top_banner').prepend(cmaside) // $('#cookie_monster button').click(function(e) { // t = $(e.target); // if(t.data('disable')) { // Cookies.set('eu-disable', true, { expires: 365 }); // } else { // Cookies.set('eu-disable', false, { expires: 365 }); // } // cmaside.fadeOut(); // }); // } else { // Cookies.set('eu-disable', Cookies.get('eu-disable'), {expires: 365}); // if(Cookies.get('eu-disable') == "true") { // window['ga-disable-UA-1176762-5'] = true; // } else { // window['ga-disable-UA-1176762-5'] = false; // } // } // EU COOKIE MONSTER if(screen.width > 1024 && screen.height > 768 && window.devicePixelRatio > 1) { $('[data-hq]').each(function() { t = $(this); if(t.is('img')) { t.attr('src', t.data('hq')); } else { t.css('background-image', 'url(' + t.data('hq') + ')'); } }); } baseline = 28;//parseFloat($('body').data('baseline')); $('figure').each(function(i, e) { figure = $(e); realTop = figure.offset().top; // debugRow(realTop); realBottom = realTop + figure.height() + parseFloat(figure.css('margin-bottom')); // debugRow(realBottom); gap = baseline - ((realBottom - $('article.body').offset().top) % baseline); figure.css('margin-top', '+=' + Math.floor(gap/2.0) + 'px'); figure.css('margin-bottom', '+=' + Math.floor(gap/2.0) + 'px'); }); /** h = $(document).height(); b = 28; c = $('#content_box').offset().top + b; $('body').append('
'); bs = $('#baseline_overlay'); cl = 0; while(cl < h) { bs.append('
'); cl += b; } /**/ });