﻿
$('document').ready(function(){if($.support.opacity){$('#menu a').each(function(){var a=$(this);a.addClass('fade').append("<span class='menuImage'>"+this.textContent+"</span>").hover(function(){$('.menuImage',this).stop().animate({opacity:1.0},150);},function(){a.removeClass('mousedown');$('.menuImage',this).stop().animate({opacity:0.0},800);}).mousedown(function(){$(this).addClass('mousedown');$('.menuImage',this).stop().animate({opacity:0.0},50);}).mouseup(function(){$('.menuImage',this).stop().animate({opacity:1.0},300,null,function(){$(this).removeClass('mousedown');});});});}});$('document').ready(function(){var wnd=$(window);var menu=$('#menu');var menuPlace=$('#menuPlace');wnd.bind("resize scroll",function(){var scr=wnd.scrollTop();if(scr>menuPlace.offset().top){menu.addClass('menuFixed');}else{menu.removeClass('menuFixed');}});});function updateLinks(){if(!history.pushState)return;$('div#content a[href^="/Manual"]').addClass('internalLink');$('a.internalLink:not(.addedClick)').addClass('addedClick').click(function(){history.pushState({path:this.path},'',this.href);gotoURL(this.href);return false;});}function activeMenu(link){$('.activeOut').removeClass('activeOut');$('.menuImage',$('#menu .active').removeClass('active').addClass('activeOut')).stop().css({opacity:1}).animate({opacity:0.0},800,null,function(){$('.activeOut').removeClass('activeOut');});$('#menu #'+link).addClass('active');}function gotoURL(href){jQuery.ajax(href,{data:{_contentOnly:1},dataType:'text',success:function(data){var m=data.match(/<!-- begin:head -->((?:.|\r|\n)*)<!-- end:head -->(?:.|\r|\n)*<!-- begin:content -->((:?.|\r|\n)*)<!-- end:content -->/mi);var head=m[1];var content=m[2];$('div#content').empty().append(content);$('meta[name="head-begin"]').nextUntil('meta[name="head-end"]').remove();$('meta[name="head-begin"]').after(head);updateLinks();if($('#menu').is('.menuFixed')){var top=$('#header').height()-$('#menu').height()+1;window.scrollTo(0,top);}}});}$(document).ready(function(){if(!history.pushState)return;updateLinks();var first=true;$(window).bind('popstate',function(e){if(!first)gotoURL(location.pathname);first=false;});});

