$(document).ready(function() { $('.gallery').justifiedGallery({ rowHeight: 150, margins: 15 }); //[ScrollProgress]-------------------------------------- $('body').prepend('
'); $(function() {function scroll_fn(){document_height = $(document).height();scroll_so_far = $(window).scrollTop();window_height = $(window).height();max_scroll = document_height-window_height;scroll_percentage = scroll_so_far/(max_scroll/100);$('.ScrollProgress').width(scroll_percentage + '%');}$(window).scroll(function() {scroll_fn();});$(window).resize(function() {scroll_fn();});}); //[ScrollTop]-------------------------------------- $('body').append('