Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function openAccordionHash() {
  2.     var a = window.location.hash,
  3.         t = $(".accordion"),
  4.         e = t.find(a);
  5.     if (!e.hasClass("in")) {
  6.         var n = e.parent().find("h2 a");
  7.         e.addClass("in"), n.removeClass("collapsed").addClass("expanded"), n.attr("aria-expanded", "true")
  8.     }
  9. }
  10. $(document).ready(function() {
  11.     function a(a) {
  12.         var t = a.attr("href"),
  13.             e = 100;
  14.         return $(t).offset().top - e
  15.     }
  16.     $("html").removeClass("no-js");
  17.     var t = window.location.href;
  18.     (window.location.href.indexOf("/aec.gov.au/") > -1 || window.location.href.indexOf("www.aec.gov.au/") > -1 || window.location.href.indexOf("www.dev.aec.local/") > -1) && ($("body:not(#homepage) #contentstart h1:first, body:not(#electionTemplate) #contentstart h1:first").after('<div id="readspeaker_button1" class="rs_skip rsbtn rs_preserve"></div>'), $("body#homepage").length ? $("#readspeaker_button1").append('<a rel="nofollow" class="rsbtn_play" accesskey="L" title="Listen to this page using ReadSpeaker" href="https://app-as.readspeaker.com/cgi-bin/rsent?customerid=8714&amp;lang=en_au&amp;readid=readContent&amp;url=' + t + '"><span class="rsbtn_left rsimg rspart"><span class="rsbtn_text"><span>Listen</span></span></span><span class="rsbtn_right rsimg rsplay rspart"></span></a>') : $("#readspeaker_button1").append('<a rel="nofollow" class="rsbtn_play" accesskey="L" title="Listen to this page using ReadSpeaker" href="https://app-as.readspeaker.com/cgi-bin/rsent?customerid=8714&amp;lang=en_au&amp;readid=contentstart&amp;url=' + t + '"><span class="rsbtn_left rsimg rspart"><span class="rsbtn_text"><span>Listen</span></span></span><span class="rsbtn_right rsimg rsplay rspart"></span></a>')), $(".back-top").hide(), $(window).scroll(function() {
  19.         $(this).scrollTop() > 170 ? $(".back-top").fadeIn() : $(".back-top").fadeOut()
  20.     }), $(".back-top a").click(function() {
  21.         return $("body,html").animate({
  22.             scrollTop: 0
  23.         }, 1200), !1
  24.     }), $(".back-top").mouseover(function() {
  25.         $(".back-top").animate({
  26.             height: "65px"
  27.         }, {
  28.             queue: !1,
  29.             duration: 500
  30.         })
  31.     }), $(".back-top").mouseout(function() {
  32.         $(".back-top").animate({
  33.             height: "50px"
  34.         }, {
  35.             queue: !1,
  36.             duration: 500
  37.         })
  38.     }), $('#bookmarks a[href^="#"], .seeAlsoBox a[href^="#"], .scrollTo').click(function(t) {
  39.         var e = a($(this));
  40.         $("html, body").animate({
  41.             scrollTop: e
  42.         }, 800), t.preventDefault()
  43.     }), $(".accordion__button a").click(function(a) {
  44.         a.preventDefault()
  45.     }), $('a[href^="#aechead"], a[href^="#homepage"]').click(function(a) {
  46.         var t = $(this).attr("href"),
  47.             e = $(t).offset().top;
  48.         $("html, body").animate({
  49.             scrollTop: e
  50.         }, 800), a.preventDefault()
  51.     }), $('#aechead a[href^="#contentstart"], header a[href^="#start"]').click(function() {
  52.         $("h1").attr("tabindex", -1).on("blur focusout", function() {
  53.             $(this).removeAttr("tabindex")
  54.         }).focus()
  55.     }), $("html").hasClass("archived") && ($("html.archived #contentstart h1").prepend("[ARCHIVED] "), $("html.archived #contentstart h1").after('<div class="alert alert-info" id="archived"></div>'), $.get("/_template/inc/inc-archived.htm", function(a) {
  56.         $("#archived").append(a)
  57.     }))
  58. }), $(window).keydown(function(a) {
  59.     var t;
  60.     window.event ? t = window.event.keyCode : a && (t = a.which);
  61.     var a = a || window.event;
  62.     97 == t && a.altKey && (location.href = "http://www.dev.aec.local" + window.location.pathname), 98 == t && a.altKey && (location.href = "http://www.test.aec.gov.au" + window.location.pathname), 99 == t && a.altKey && (location.href = "http://www.aec.gov.au" + window.location.pathname)
  63. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement