function twoDigits(value) { if(value < 10) { return '0' + value; } return value; } $(document).ready(function() { // Scroll to top $(window).scroll(function() { if ($(this).scrollTop() > 100) { $('.scrollup').fadeIn(); } else { $('.scrollup').fadeOut(); } }); $('.scrollup').click(function() { $("html, body").animate({ scrollTop: 0 }, 600); return false; }); $('#historyback').click(function() { parent.history.back(); return false; }); // Load Newsfeed var ajax_load = "
Loading newsfeed...
"; $("#newsfeeditems").html(ajax_load).load("lib/ajax.php?action=newsfeed", function() { if ($("#newsfeeditems").html() != "") { $(window).trigger('resize'); $("#newsfeed").slideDown(); } }); // Height of divs fix var snheight = $('#sidenavigation').height(); var mainheight = $('#maincontent').height(); if (snheight > mainheight) { $('#maincontent').height(snheight - 60); } // this is necessary for the special setting feature (ref #1010) $.getQueryVariable = function(key) { var urlParams = decodeURI( window.location.search.substring(1) ); if(urlParams == false | urlParams == '') return null; var vars = urlParams.split("&"); for (var i=0;i