Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function openAccordionHash() {
- var a = window.location.hash,
- t = $(".accordion"),
- e = t.find(a);
- if (!e.hasClass("in")) {
- var n = e.parent().find("h2 a");
- e.addClass("in"), n.removeClass("collapsed").addClass("expanded"), n.attr("aria-expanded", "true")
- }
- }
- $(document).ready(function() {
- function a(a) {
- var t = a.attr("href"),
- e = 100;
- return $(t).offset().top - e
- }
- $("html").removeClass("no-js");
- var t = window.location.href;
- (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&lang=en_au&readid=readContent&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&lang=en_au&readid=contentstart&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() {
- $(this).scrollTop() > 170 ? $(".back-top").fadeIn() : $(".back-top").fadeOut()
- }), $(".back-top a").click(function() {
- return $("body,html").animate({
- scrollTop: 0
- }, 1200), !1
- }), $(".back-top").mouseover(function() {
- $(".back-top").animate({
- height: "65px"
- }, {
- queue: !1,
- duration: 500
- })
- }), $(".back-top").mouseout(function() {
- $(".back-top").animate({
- height: "50px"
- }, {
- queue: !1,
- duration: 500
- })
- }), $('#bookmarks a[href^="#"], .seeAlsoBox a[href^="#"], .scrollTo').click(function(t) {
- var e = a($(this));
- $("html, body").animate({
- scrollTop: e
- }, 800), t.preventDefault()
- }), $(".accordion__button a").click(function(a) {
- a.preventDefault()
- }), $('a[href^="#aechead"], a[href^="#homepage"]').click(function(a) {
- var t = $(this).attr("href"),
- e = $(t).offset().top;
- $("html, body").animate({
- scrollTop: e
- }, 800), a.preventDefault()
- }), $('#aechead a[href^="#contentstart"], header a[href^="#start"]').click(function() {
- $("h1").attr("tabindex", -1).on("blur focusout", function() {
- $(this).removeAttr("tabindex")
- }).focus()
- }), $("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) {
- $("#archived").append(a)
- }))
- }), $(window).keydown(function(a) {
- var t;
- window.event ? t = window.event.keyCode : a && (t = a.which);
- var a = a || window.event;
- 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)
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement