function divScrollTo(element,WhereTo) { $(element).animate({ scrollTop:element.childNodes[WhereTo].offsetTop-element.parentNode.offsetTop-20 }, 500); // HideAll(); } $(function() { $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top }, 500); return false; } } }); }); document.createElement('header'); document.createElement('section'); document.createElement('article'); document.createElement('aside'); document.createElement('nav'); document.createElement('footer'); function blockError(){return true;} function ShowHide(e) { e.style.display=e.style.display=="block" ? "none" : "block" } function HideAll() { }