// TODO: see why you can not seek soundcloud player // TODO: make all file i/o rest independent // TODO: ditch restheart completely??? // Userlist data array for filling in info box upcomingCount = 0 upcomingLoadedCount = 0; // DOM Ready ============================================================= $(document).ready(function() { if (window.location.href.split('/').pop().split('.').pop() != "pdf") { populatePieces('primary'); populatePieces('secondary'); populatePublications(); populateReleases(); populatePerformances(2022, 'composer', true); populateTalks(2022, true); populateAbout(); populateGallerySelector(); if (window.location.href.split('/').pop().substring(0,3) != "#lg") { window.history.replaceState("object or string", "Title", "/"); } } $( window ).resize(function() { resetDivHeights(); }); $(function() { $( document ).tooltip(); }); $(document).on('click','.scroll-to-div', function(event) { event.preventDefault(); var target = "#" + this.getAttribute('data-target'); $('html, body').animate({ scrollTop: $(target).offset().top - 210 }, 500); //window.history.pushState("object or string", "Title", this.getAttribute('data-target')); }); $(window).scroll(function(event) { $(".header").css("margin-left", 0 - $(document).scrollLeft()); }); $('ul#piecesmiscworkslist').hide(); $('#pieces .btn_less').hide(); $('#pieces .btn_more').click(function(){ $('ul#piecesmiscworkslist').show(); $('#pieces .btn_more').hide(); $('#pieces .btn_less').show(); resetDivHeights(); }); $('#pieces .btn_less').click(function(){ $('ul#piecesmiscworkslist').hide(); $('#pieces .btn_less').hide(); $('#pieces .btn_more').show(); resetDivHeights(); }); embedAudioGallery(false); for (i = new Date().getFullYear(); i > 2000; i--){ $('#yearpicker').append($('