123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- function Navigate(url){
- window.location=url;
- }
- function CreateCookie(name, value, days) {
- var expires;
- if (days) {
- var date = new Date();
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
- expires = "; expires=" + date.toGMTString();
- }
- else {
- expires = "";
- }
- document.cookie = name + "=" + value + expires + "; path=/";
- }
- $(function(){
- var panels=$("nav > dl > .sub-pages");
- var goIndicators=$("nav > dl > dt .go");
- var expandIndicators=$("nav > dl > dt .expand");
- panels.hide();
- expandIndicators.show();
-
- $("nav > dl > dt").click(function(e){
- var next=$(this).next();
- if (!next.hasClass("sub-pages") || next.is(":visible")){
- Navigate($(this).children("a").attr("href"));
- return;
- }
- panels.slideUp();
- goIndicators.hide();
- expandIndicators.show();
- next.slideDown();
- $(this).children(".go").show();
- $(this).children(".expand").hide();
- });
-
- $("nav > dl > dt").each(function(){
- if ($(this).next().hasClass("sub-pages"))
- $(this).attr("title", "Click once to expand, click again to go");
- });
- $("nav dd").click(function(e){
- Navigate($(this).children("a").attr("href"));
- });
-
- $("nav a").click(function(e){
- $(this).parent().click();
- return false;
- });
-
- $("#content").css("margin-bottom",window.innerHeight-$("#buttons").offset().top);
-
- $("#cookiePopup button").click(function(){
- $("#cookiePopup").fadeOut();
- CreateCookie("cookiePopupConfirmed",true,0);
- });
-
- $("#menu-button").click(function(e){
- $("#menu").show("slide", {direction: "left", easing:'easeOutCirc'});
- $("body>.backdrop").fadeIn();
- });
-
- $("body>.backdrop").click(function(e){
- $("#menu").hide("slide", {direction: "left", easing:'easeInCirc'});
- $("body>.backdrop").fadeOut();
- });
- });
- $(window).resize(function(e){
- if (window.innerWidth>1023){
- $("#menu").attr("style","");
- $("#menu-button").attr("style","");
- $("body>.backdrop").hide();
- }
- });
|