'); // $('body,html').animate({ // scrollTop: 0 // }, 800); // // } } } $(window).on('hashchange', function () { hashchange_bind(); }); hashchange_bind(); $(document).ready(function () { $(document.body).on('click', '.category-video-player-box-close', function (e) { $('#single-video-iframe').empty().hide(); }); }); //marquee - news ticker $('marquee').marquee(); //Scroll Pane initialize var settings = {autoReinitialise: true}; var pane = $('.scroll-pane'); pane.jScrollPane(settings); // hide #back-top first $("#back-top").hide(); // fade in #back-top $(function () { $(window).scroll(function () { //to the top arrow if ($(this).scrollTop() > 200) { $('#back-top').fadeIn(); } else { $('#back-top').fadeOut(); } //anons block if ($(this).scrollTop() > 700) { $('#anons-toggle').fadeIn(); } else { $('#anons-toggle').fadeOut(); } }); // scroll body to 0px on click $('#back-top a').click(function () { $('body,html').animate({ scrollTop: 0 }, 800); return false; }); }); //video carousel tabs $('#video-carousel-playlists').find('li').eq(0).addClass('active'); $('#video-carousel-playlists').find('li a').on('click', function (e) { e.preventDefault(); $('#video-carousel-playlists').find('li').removeClass('active'); $(this).parent().addClass('active'); var chunks = $(this).attr('href').split("/"); var category_name = chunks[chunks.length - 1]; url = '/ajax-helper.php?action=loadstories&offset=20&cat_name=' + category_name + '&style=videocarousel'; ajaxloading = false; if (!ajaxloading) { ajaxloading = true; $.get(url, {}, function (data) { var fadeBg = '#FFFDE2'; $('#video-carousel').empty().append('