/*$(document).ready(function(){ $("#content1").children("div").each(function(){ $(this).hide(); }); $("#praxis").show(); $(".scrollNav").hide(); $("#praxis").children(".scrollNav").show(); $("ul.sub-nav2").children("li").each(function(){ $(this).children("a").click(function(){ $("#content1").children("div").each(function(){ $(this).hide(); }); $("#"+$(this).attr("menu_item")).show(); check_visibillity_of_scrollbars("#"+$(this).attr("menu_item")); }); $(".scrollNavUp").click(function(){ var scrollContent = $(this).parent().parent().children(".scrollWindow").children(".scrollContent"); var current_top = parseInt(scrollContent.css("top"))+50; if(current_top < 0){ scrollContent.animate({ top: '+=50' },"fast"); } return false; }); $(".scrollNavDown").click(function(){ var scrollContent = $(this).parent().parent().children(".scrollWindow").children(".scrollContent"); var current_top = parseInt(scrollContent.css("top")); var content_height = parseInt(scrollContent.height()); var out_height = parseInt($(this).parent().parent().children(".scrollWindow").height()); if(current_top >= ((content_height-out_height)*-1)){ $(this).parent().parent().children(".scrollWindow").children(".scrollContent").animate({ top: '-=50' },"fast"); } return false; }); }); }); function check_visibillity_of_scrollbars(idx){ var out_height = parseInt($(idx).children(".scrollWindow").height()); var inner_height = parseInt($(idx).children(".scrollWindow").children(".scrollContent").height()); if(inner_height >= out_height){ $(idx).children(".scrollNav").show(); } else{ $(idx).children(".scrollNav").hide(); } } */