1/* global a2a*/ 2(function (Drupal) { 3 'use strict'; 4 5 Drupal.behaviors.addToAny = { 6 attach: function (context, settings) { 7 // If not the full document (it's probably AJAX), and window.a2a exists 8 if (context !== document && window.a2a) { 9 a2a.init_all('page'); // Init all uninitiated AddToAny instances 10 } 11 } 12 }; 13 14})(Drupal); 15; 16/*! 17 * Bowser - a browser detector 18 * https://github.com/ded/bowser 19 * MIT License | (c) Dustin Diaz 2015 20 */ 21!function(e,t){typeof module!="undefined"&&module.exports?module.exports=t():typeof define=="function"&&define.amd?define(t):this[e]=t()}("bowser",function(){function t(t){function n(e){var n=t.match(e);return n&&n.length>1&&n[1]||""}function r(e){var n=t.match(e);return n&&n.length>1&&n[2]||""}var i=n(/(ipod|iphone|ipad)/i).toLowerCase(),s=/like android/i.test(t),o=!s&&/android/i.test(t),u=/CrOS/.test(t),a=n(/edge\/(\d+(\.\d+)?)/i),f=n(/version\/(\d+(\.\d+)?)/i),l=/tablet/i.test(t),c=!l&&/[^-]mobi/i.test(t),h;/opera|opr/i.test(t)?h={name:"Opera",opera:e,version:f||n(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(t)?h={name:"Yandex Browser",yandexbrowser:e,version:f||n(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/windows phone/i.test(t)?(h={name:"Windows Phone",windowsphone:e},a?(h.msedge=e,h.version=a):(h.msie=e,h.version=n(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?h={name:"Internet Explorer",msie:e,version:n(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:u?h={name:"Chrome",chromeBook:e,chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(t)?h={name:"Microsoft Edge",msedge:e,version:a}:/chrome|crios|crmo/i.test(t)?h={name:"Chrome",chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:i?(h={name:i=="iphone"?"iPhone":i=="ipad"?"iPad":"iPod"},f&&(h.version=f)):/sailfish/i.test(t)?h={name:"Sailfish",sailfish:e,version:n(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?h={name:"SeaMonkey",seamonkey:e,version:n(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(t)?(h={name:"Firefox",firefox:e,version:n(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(h.firefoxos=e)):/silk/i.test(t)?h={name:"Amazon Silk",silk:e,version:n(/silk\/(\d+(\.\d+)?)/i)}:o?h={name:"Android",version:f}:/phantom/i.test(t)?h={name:"PhantomJS",phantom:e,version:n(/phantomjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?h={name:"BlackBerry",blackberry:e,version:f||n(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:/(web|hpw)os/i.test(t)?(h={name:"WebOS",webos:e,version:f||n(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(h.touchpad=e)):/bada/i.test(t)?h={name:"Bada",bada:e,version:n(/dolfin\/(\d+(\.\d+)?)/i)}:/tizen/i.test(t)?h={name:"Tizen",tizen:e,version:n(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||f}:/safari/i.test(t)?h={name:"Safari",safari:e,version:f}:h={name:n(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!h.msedge&&/(apple)?webkit/i.test(t)?(h.name=h.name||"Webkit",h.webkit=e,!h.version&&f&&(h.version=f)):!h.opera&&/gecko\//i.test(t)&&(h.name=h.name||"Gecko",h.gecko=e,h.version=h.version||n(/gecko\/(\d+(\.\d+)?)/i)),!h.msedge&&(o||h.silk)?h.android=e:i&&(h[i]=e,h.ios=e);var p="";h.windowsphone?p=n(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i?(p=n(/os (\d+([_\s]\d+)*) like mac os x/i),p=p.replace(/[_\s]/g,".")):o?p=n(/android[ \/-](\d+(\.\d+)*)/i):h.webos?p=n(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):h.blackberry?p=n(/rim\stablet\sos\s(\d+(\.\d+)*)/i):h.bada?p=n(/bada\/(\d+(\.\d+)*)/i):h.tizen&&(p=n(/tizen[\/\s](\d+(\.\d+)*)/i)),p&&(h.osversion=p);var d=p.split(".")[0];if(l||i=="ipad"||o&&(d==3||d==4&&!c)||h.silk)h.tablet=e;else if(c||i=="iphone"||i=="ipod"||o||h.blackberry||h.webos||h.bada)h.mobile=e;return h.msedge||h.msie&&h.version>=10||h.yandexbrowser&&h.version>=15||h.chrome&&h.version>=20||h.firefox&&h.version>=20||h.safari&&h.version>=6||h.opera&&h.version>=10||h.ios&&h.osversion&&h.osversion.split(".")[0]>=6||h.blackberry&&h.version>=10.1?h.a=e:h.msie&&h.version<10||h.chrome&&h.version<20||h.firefox&&h.version<20||h.safari&&h.version<6||h.opera&&h.version<10||h.ios&&h.osversion&&h.osversion.split(".")[0]<6?h.c=e:h.x=e,h}var e=!0,n=t(typeof navigator!="undefined"?navigator.userAgent:"");return n.test=function(e){for(var t=0;t<e.length;++t){var r=e[t];if(typeof r=="string"&&r in n)return!0}return!1},n._detect=t,n}); 22(function($) { 23 24 function badBrowser(){ 25 if(bowser.msie && parseInt(bowser.version) < 11){ return true;} 26 if(bowser.mozilla && parseInt(bowser.version) < 5){ return true;} 27 28 return false;
29 } 30 31 function getBadBrowser(c_name) { 32 if (document.cookie.length>0) 33 { 34 c_start=document.cookie.indexOf(c_name + "="); 35 if (c_start!=-1) 36 { 37 c_start=c_start + c_name.length+1; 38 c_end=document.cookie.indexOf(";",c_start); 39 if (c_end==-1) c_end=document.cookie.length; 40 return unescape(document.cookie.substring(c_start,c_end)); 41 } 42 } 43 return ""; 44 } 45 46 function setBadBrowser(c_name,value,expiredays) { 47 var exdate=new Date(); 48 exdate.setDate(exdate.getDate()+expiredays); 49 document.cookie=c_name+ "=" +escape(value) + ";path=/" + ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); 50 } 51 52 if(badBrowser() && getBadBrowser('browserWarning') != 'seen' ) { 53 var currentLocation = window.location; 54 55 $(function(){ 56 $("<div id='old-browserWarning' style='background: rgba(70, 70, 70, 0.6); width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 99999998'><div style='background: #fff; width: 700px; height: 330px; text-align: center; padding: 30px 15px; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 99999999;'><h3 style='text-transform: uppercase; margin-top: 30px; color: #515151;'>Your browser is out of date!</h3> <p style='line-height: 20px; margin-bottom: 50px;'>Don't worry, there is an easy fix.<br>All you have to do is click one of the icons below and follow the instructions.</p><a style='margin: 0 19px;' href='http://getfirefox.com'><img src='/modules/_custom/bad-browser/images/firefox.png' alt='firefox' ></a><a style='margin: 0 19px;' href='https://www.google.com/intl/en/chrome/browser/'><img src='/modules/_custom/bad-browser/images/chrome.png' alt='chrome' ></a><a style='margin: 0 19px;' href='http://www.opera.com/download/'><img src='/modules/_custom/bad-browser/images/opera.png' alt='opera' ></a><a style='margin: 0 19px;' href='http://www.apple.com/safari/'><img src='/modules/_custom/bad-browser/images/safari.png' alt='safari' ></a><a style='margin: 0 19px;' href='http://www.microsoft.com/windows/downloads/ie/getitnow.mspx'><img src='/modules/_custom/bad-browser/images/ie.png' alt='ie' ></a><a style='position:absolute; top: 10px; right: 10px; display: inline-block; width: 16px; height: 16px; background: url(\"../modules/_custom/bad_browser/images/close.png\") no-repeat 0 0;' href='#' id='warningClose'></a></div></div>") 57 .prependTo("body"); 58 var close = $('#old-browserWarning #warningClose'); 59 close.hover(function() { 60 $(this).css({ 61 'text-decoration': 'none' 62 }) 63 }); 64 }); 65 } 66 67 if(getBadBrowser('useCookies') != 'seen' ){ 68 $(function(){ 69 $("<div id='browserWarning'>"+Drupal.t('We use cookies on this website to improve how it works and how itâs used.')+'<a href="https://en.wikipedia.org/wiki/HTTP_cookie" style="color: #b1bfff;" target="_blank" id="lin-learn-more">'+ Drupal.t('Learn more') +'</a> <a href="#" id="warningClose">'+ Drupal.t('Accept cookies') +'</a></div>') 70 .css({ 71 backgroundColor: '#666666', 72 'width': '100%', 73 'text-align': 'center', 74 'font-size': '13px', 75 'color': '#e8e8e8', 76 'position': 'fixed', 77 'z-index': '99999998', 78 'top': '0', 79 padding:'8px 15px 8px 15px' 80 }) 81 .prependTo("body"); 82 83 var close = $('#browserWarning #warningClose'); 84 close.css({ 85 'font-size': '13px', 86 'color': '#fff', 87 'background': '#475dc3', 88 'text-transform': 'uppercase', 89 'line-height': '35px', 90 'padding': '0 10px', 91 'display': 'inline-block', 92 'margin-left': '25px', 93 '-webkit-box-shadow': '0px 1px 1px 0 rgba(0, 0, 0, 0.20)', 94 'box-shadow': '0px 1px 1px 0 rgba(0, 0, 0, 0.20)', 95 '-moz-box-shadow': '0px 1px 1px 0 rgba(0, 0, 0, 0.20)' 96 }) 97 close.hover(function() { 98 $(this).css({ 99 'text-decoration': 'none' 100 }) 101 }); 102 }); 103 } 104 105 $(function(){ 106 $('#warningClose').click(function(){ 107 setBadBrowser('useCookies','seen',365); 108 $('#browserWarning').slideUp('slow'); 109 $('#old-browserWarning').fadeOut('fast'); 110 return false; 111 }); 112 }); 113})( jQuery );; 114/** 115 * @file 116 * Attaches several event listener to a web page. 117 */ 118 119(function ($, Drupal, drupalSettings) { 120 121 "use strict"; 122 123 Drupal.google_analytics = {}; 124 125 $(document).ready(function () { 126 127 // Attach mousedown, keyup, touchstart events to document only and catch 128 // clicks on all elements. 129 $(document.body).on("mousedown keyup touchstart", function (event) { 130 131 // Catch the closest surrounding link of a clicked element. 132 $(event.target).closest("a,area").each(function () { 133 134 // Is the clicked URL internal? 135 if (Drupal.google_analytics.isInternal(this.href)) { 136 // Skip 'click' tracking, if custom tracking events are bound. 137 if ($(this).is('.colorbox') && (drupalSettings.google_analytics.trackColorbox)) {
138 // Do nothing here. The custom event will handle all tracking. 139 // console.info("Click on .colorbox item has been detected."); 140 } 141 // Is download tracking activated and the file extension configured 142 // for download tracking? 143 else if (drupalSettings.google_analytics.trackDownload && Drupal.google_analytics.isDownload(this.href)) { 144 // Download link clicked. 145 ga("send", { 146 "hitType": "event", 147 "eventCategory": "Downloads", 148 "eventAction": Drupal.google_analytics.getDownloadExtension(this.href).toUpperCase(), 149 "eventLabel": Drupal.google_analytics.getPageUrl(this.href), 150 "transport": "beacon" 151 }); 152 } 153 else if (Drupal.google_analytics.isInternalSpecial(this.href)) { 154 // Keep the internal URL for Google Analytics website overlay intact. 155 ga("send", { 156 "hitType": "pageview", 157 "page": Drupal.google_analytics.getPageUrl(this.href), 158 "transport": "beacon" 159 }); 160 } 161 } 162 else { 163 if (drupalSettings.google_analytics.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) { 164 // Mailto link clicked. 165 ga("send", { 166 "hitType": "event", 167 "eventCategory": "Mails", 168 "eventAction": "Click", 169 "eventLabel": this.href.substring(7), 170 "transport": "beacon" 171 }); 172 } 173 else if (drupalSettings.google_analytics.trackOutbound && this.href.match(/^\w+:\/\//i)) { 174 if (drupalSettings.google_analytics.trackDomainMode !== 2 || (drupalSettings.google_analytics.trackDomainMode === 2 && !Drupal.google_analytics.isCrossDomain(this.hostname, drupalSettings.google_analytics.trackCrossDomains))) { 175 // External link clicked / No top-level cross domain clicked. 176 ga("send", { 177 "hitType": "event", 178 "eventCategory": "Outbound links", 179 "eventAction": "Click", 180 "eventLabel": this.href, 181 "transport": "beacon" 182 }); 183 } 184 } 185 } 186 }); 187 }); 188 189 // Track hash changes as unique pageviews, if this option has been enabled. 190 if (drupalSettings.google_analytics.trackUrlFragments) { 191 window.onhashchange = function () { 192 ga("send", { 193 "hitType": "pageview", 194 "page": location.pathname + location.search + location.hash 195 }); 196 }; 197 } 198 199 // Colorbox: This event triggers when the transition has completed and the 200 // newly loaded content has been revealed. 201 if (drupalSettings.google_analytics.trackColorbox) { 202 $(document).on("cbox_complete", function () { 203 var href = $.colorbox.element().attr("href"); 204 if (href) { 205 ga("send", { 206 "hitType": "pageview", 207 "page": Drupal.google_analytics.getPageUrl(href) 208 }); 209 } 210 }); 211 } 212 213 }); 214 215 /** 216 * Check whether the hostname is part of the cross domains or not. 217 * 218 * @param {string} hostname 219 * The hostname of the clicked URL. 220 * @param {array} crossDomains 221 * All cross domain hostnames as JS array. 222 * 223 * @return {boolean} isCrossDomain 224 */ 225 Drupal.google_analytics.isCrossDomain = function (hostname, crossDomains) { 226 return $.inArray(hostname, crossDomains) > -1 ? true : false; 227 }; 228 229 /** 230 * Check whether this is a download URL or not. 231 * 232 * @param {string} url 233 * The web url to check. 234 * 235 * @return {boolean} isDownload 236 */ 237 Drupal.google_analytics.isDownload = function (url) { 238 var isDownload = new RegExp("\\.(" + drupalSettings.google_analytics.trackDownloadExtensions + ")([\?#].*)?$", "i"); 239 return isDownload.test(url); 240 }; 241 242 /** 243 * Check whether this is an absolute internal URL or not. 244 * 245 * @param {string} url 246 * The web url to check. 247 * 248 * @return {boolean} isInternal 249 */ 250 Drupal.google_analytics.isInternal = function (url) { 251 var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i"); 252 return isInternal.test(url); 253 }; 254 255 /** 256 * Check whether this is a special URL or not. 257 * 258 * URL types: 259 * - gotwo.module /go/* links. 260 * 261 * @param {string} url 262 * The web url to check. 263 * 264 * @return {boolean} isInternalSpecial 265 */ 266 Drupal.google_analytics.isInternalSpecial = function (url) { 267 var isInternalSpecial = new RegExp("(\/go\/.*)$", "i"); 268 return isInternalSpecial.test(url); 269 }; 270 271 /** 272 * Extract the relative internal URL from an absolute internal URL. 273 * 274 * Examples: 275 * - http://mydomain.com/node/1 -> /node/1 276 * - http://example.com/foo/bar -> http://example.com/foo/bar 277 * 278 * @param {string} url 279 * The web url to check. 280 * 281 * @return {string} getPageUrl 282 * Internal website URL. 283 */ 284 Drupal.google_analytics.getPageUrl = function (url) { 285 var extractInternalUrl = new RegExp("^(https?):\/\/" + window.location.host, "i"); 286 return url.replace(extractInternalUrl, ''); 287 }; 288 289 /** 290 * Extract the download file extension from the URL. 291 * 292 * @param {string} url 293 * The web url to check. 294 * 295 * @return {string} getDownloadExtension 296 * The file extension of the passed url. e.g. "zip", "txt" 297 */ 298 Drupal.google_analytics.getDownloadExtension = function (url) { 299 var extractDownloadextension = new RegExp("\\.(" + drupalSettings.google_analytics.trackDownloadExtensions + ")([\?#].*)?$", "i"); 300 var extension = extractDownloadextension.exec(url); 301 return (extension === null) ? '' : extension[1]; 302 }; 303 304})(jQuery, Drupal, drupalSettings); 305; 306/*! modernizr 3.2.0 (Custom Build) | MIT * 307 * http://modernizr.com/download/?-applicationcache-audio-backgroundsize-borderimage-boxshadow-canvas-canvastext-cssanimations-csscolumns-cssreflections-csstransforms-csstransforms3d-csstransitions-flexbox-flexboxlegacy-fontface-generatedcontent-geolocation-hashchange-history-hsla-indexeddb-inlinesvg-input-inputtypes-localstorage-multiplebgs-opacity-postmessage-rgba-sessionstorage-smil-svg-svgclippaths-textshadow-vi
307deo-webgl-websockets-websqldatabase-webworkers-domprefixes-hasevent-mq-prefixes-shiv-testallprops-testprop-teststyles !*/ 308!function(e,t,n){function r(e,t){return typeof e===t}function a(){var e,t,n,a,o,i,s;for(var c in b)if(b.hasOwnProperty(c)){if(e=[],t=b[c],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(a=r(t.fn,"function")?t.fn():t.fn,o=0;o<e.length;o++)i=e[o],s=i.split("."),1===s.length?Modernizr[s[0]]=a:(!Modernizr[s[0]]||Modernizr[s[0]]instanceof Boolean||(Modernizr[s[0]]=new Boolean(Modernizr[s[0]])),Modernizr[s[0]][s[1]]=a),y.push((a?"":"no-")+s.join("-"))}}function o(e){var t=w.className,n=Modernizr._config.classPrefix||"";if(S&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),S?w.className.baseVal=t:w.className=t)}function i(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):S?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function s(e,t){return!!~(""+e).indexOf(t)}function c(){var e=t.body;return e||(e=i(S?"svg":"body"),e.fake=!0),e}function l(e,n,r,a){var o,s,l,d,u="modernizr",f=i("div"),p=c();if(parseInt(r,10))for(;r--;)l=i("div"),l.id=a?a[r]:u+(r+1),f.appendChild(l);return o=i("style"),o.type="text/css",o.id="s"+u,(p.fake?p:f).appendChild(o),p.appendChild(f),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(t.createTextNode(e)),f.id=u,p.fake&&(p.style.background="",p.style.overflow="hidden",d=w.style.overflow,w.style.overflow="hidden",w.appendChild(p)),s=n(f,e),p.fake?(p.parentNode.removeChild(p),w.style.overflow=d,w.offsetHeight):f.parentNode.removeChild(f),!!s}function d(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function u(e,t){return function(){return e.apply(t,arguments)}}function f(e,t,n){var a;for(var o in e)if(e[o]in t)return n===!1?e[o]:(a=t[e[o]],r(a,"function")?u(a,n||t):a);return!1}function p(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function m(t,r){var a=t.length;if("CSS"in e&&"supports"in e.CSS){for(;a--;)if(e.CSS.supports(p(t[a]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var o=[];a--;)o.push("("+p(t[a])+":"+r+")");return o=o.join(" or "),l("@supports ("+o+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return n}function g(e,t,a,o){function c(){u&&(delete I.style,delete I.modElem)}if(o=r(o,"undefined")?!1:o,!r(a,"undefined")){var l=m(e,a);if(!r(l,"undefined"))return l}for(var u,f,p,g,h,v=["modernizr","tspan"];!I.style;)u=!0,I.modElem=i(v.shift()),I.style=I.modElem.style;for(p=e.length,f=0;p>f;f++)if(g=e[f],h=I.style[g],s(g,"-")&&(g=d(g)),I.style[g]!==n){if(o||r(a,"undefined"))return c(),"pfx"==t?g:!0;try{I.style[g]=a}catch(y){}if(I.style[g]!=h)return c(),"pfx"==t?g:!0}return c(),!1}function h(e,t,n,a,o){var i=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+L.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?g(s,t,a,o):(s=(e+" "+E.join(i+" ")+i).split(" "),f(s,t,n))}function v(e,t,r){return h(e,n,n,t,r)}var y=[],b=[],x={_version:"3.2.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=x,Modernizr=new Modernizr,Modernizr.addTest("applicationcache","applicationCache"in e),Modernizr.addTest("geolocation","geolocation"in navigator),Modernizr.addTest("history",function(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")?e.history&&"pushState"in e.history:!1}),Modernizr.addTest("postmessage","postMessage"in e),Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),Modernizr.addTest("websockets","WebSocket"in e&&2===e.WebSocket.CLOSING),Modernizr.addTest("localstorage",function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("sessionstorage",function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("websqldatabase","openDatabase"in e),Modernizr.addTest("webworkers","Worker"
308in e);var T=x._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):[];x._prefixes=T;var w=t.documentElement,S="svg"===w.nodeName.toLowerCase();S||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=b.elements;return"string"==typeof e?e.split(" "):e}function a(e,t){var n=b.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),b.elements=n+" "+e,l(t)}function o(e){var t=y[e[h]];return t||(t={},v++,e[h]=v,y[v]=t),t}function i(e,n,r){if(n||(n=t),u)return n.createElement(e);r||(r=o(n));var a;return a=r.cache[e]?r.cache[e].cloneNode():g.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!a.canHaveChildren||m.test(e)||a.tagUrn?a:r.frag.appendChild(a)}function s(e,n){if(e||(e=t),u)return e.createDocumentFragment();n=n||o(e);for(var a=n.frag.cloneNode(),i=0,s=r(),c=s.length;c>i;i++)a.createElement(s[i]);return a}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return b.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(b,t.frag)}function l(e){e||(e=t);var r=o(e);return!b.shivCSS||d||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),u||c(e,r),e}var d,u,f="3.7.3",p=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,g=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",v=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",d="hidden"in e,u=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){d=!0,u=!0}}();var b={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:f,shivCSS:p.shivCSS!==!1,supportsUnknownElements:u,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:l,createElement:i,createDocumentFragment:s,addElements:a};e.html5=b,l(t),"object"==typeof module&&module.exports&&(module.exports=b)}("undefined"!=typeof e?e:this,t);var C="Moz O ms Webkit",E=x._config.usePrefixes?C.toLowerCase().split(" "):[];x._domPrefixes=E;var k=function(e){function n(t,n){var a;return t?(n&&"string"!=typeof n||(n=i(n||"div")),t="on"+t,a=t in n,!a&&r&&(n.setAttribute||(n=i("div")),n.setAttribute(t,""),a="function"==typeof n[t],n[t]!==e&&(n[t]=e),n.removeAttribute(t)),a):!1}var r=!("onblur"in t.documentElement);return n}();x.hasEvent=k,Modernizr.addTest("hashchange",function(){return k("hashchange",e)===!1?!1:t.documentMode===n||t.documentMode>7}),Modernizr.addTest("audio",function(){var e=i("audio"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),t.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,""),t.opus=e.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),t.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),t.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("canvas",function(){var e=i("canvas");return!(!e.getContext||!e.getContext("2d"))}),Modernizr.addTest("canvastext",function(){return Modernizr.canvas===!1?!1:"function"==typeof i("canvas").getContext("2d").fillText}),Modernizr.addTest("video",function(){var e=i("video"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),t.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("webgl",function(){var t=i("canvas"),n="probablySupportsContext"in t?"probablySupportsContext":"supportsContext";return n in t?t[n]("webgl")||t[n]("experimental-webgl"):"WebGLRenderingContext"in e}),Modernizr.addTest("multiplebgs",function(){var e=i("a").style;return e.cssText="background:url(https://),url(https://),red url(https://)",/(url\s*\(.*?){3}/.test(e.background)}),Modernizr.addTest("opacity",function(){var e=i("a").style;return e.cssText=T.join("opacity:.55;"),/^0.55$/.test(e.opacity)}),Modernizr.addTest("rgba",function(){var e=i("a").style;return e.cssText="background-color:rgba(150,255,150,.5)",(""+e.backgroundColor).indexOf("rgba")>-1}),Modernizr.addTest("inlinesvg",function(){var e=i("div");return e.innerHTML="<svg/>
308","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&e.firstChild&&e.firstChild.namespaceURI)});var P=i("input"),_="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),N={};Modernizr.input=function(t){for(var n=0,r=t.length;r>n;n++)N[t[n]]=!!(t[n]in P);return N.list&&(N.list=!(!i("datalist")||!e.HTMLDataListElement)),N}(_);var z="search tel url email datetime date month week time datetime-local number range color".split(" "),R={};Modernizr.inputtypes=function(e){for(var r,a,o,i=e.length,s=":)",c=0;i>c;c++)P.setAttribute("type",r=e[c]),o="text"!==P.type&&"style"in P,o&&(P.value=s,P.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&P.style.WebkitAppearance!==n?(w.appendChild(P),a=t.defaultView,o=a.getComputedStyle&&"textfield"!==a.getComputedStyle(P,null).WebkitAppearance&&0!==P.offsetHeight,w.removeChild(P)):/^(search|tel)$/.test(r)||(o=/^(url|email|number)$/.test(r)?P.checkValidity&&P.checkValidity()===!1:P.value!=s)),R[e[c]]=!!o;return R}(z),Modernizr.addTest("hsla",function(){var e=i("a").style;return e.cssText="background-color:hsla(120,40%,100%,.5)",s(e.backgroundColor,"rgba")||s(e.backgroundColor,"hsla")});var $="CSS"in e&&"supports"in e.CSS,A="supportsCSS"in e;Modernizr.addTest("supports",$||A);var M={}.toString;Modernizr.addTest("svgclippaths",function(){return!!t.createElementNS&&/SVGClipPath/.test(M.call(t.createElementNS("http://www.w3.org/2000/svg","clipPath")))}),Modernizr.addTest("smil",function(){return!!t.createElementNS&&/SVGAnimate/.test(M.call(t.createElementNS("http://www.w3.org/2000/svg","animate")))});var L=x._config.usePrefixes?C.split(" "):[];x._cssomPrefixes=L;var O=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return l("@media "+t+" { #modernizr { position: absolute; } }",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();x.mq=O;var B=x.testStyles=l,F=function(){var e=navigator.userAgent,t=e.match(/applewebkit\/([0-9]+)/gi)&&parseFloat(RegExp.$1),n=e.match(/w(eb)?osbrowser/gi),r=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,a=533>t&&e.match(/android/gi);return n||a||r}();F?Modernizr.addTest("fontface",!1):B('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),a=r.sheet||r.styleSheet,o=a?a.cssRules&&a.cssRules[0]?a.cssRules[0].cssText:a.cssText||"":"",i=/src/i.test(o)&&0===o.indexOf(n.split(" ")[0]);Modernizr.addTest("fontface",i)}),B('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}',function(e){Modernizr.addTest("generatedcontent",e.offsetHeight>=7)});var j=function(t){var r,a=T.length,o=e.CSSRule;if("undefined"==typeof o)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in o)return"@"+t;for(var i=0;a>i;i++){var s=T[i],c=s.toUpperCase()+"_"+r;if(c in o)return"@-"+s.toLowerCase()+"-"+t}return!1};x.atRule=j;var D={elem:i("modernizr")};Modernizr._q.push(function(){delete D.elem});var I={style:D.elem.style};Modernizr._q.unshift(function(){delete I.style});var W=x.testProp=function(e,t,r){return g([e],n,t,r)};Modernizr.addTest("textshadow",W("textShadow","1px 1px")),x.testAllProps=h,x.testAllProps=v,Modernizr.addTest("cssanimations",v("animationName","a",!0)),Modernizr.addTest("backgroundsize",v("backgroundSize","100%",!0)),Modernizr.addTest("borderimage",v("borderImage","url() 1",!0)),Modernizr.addTest("boxshadow",v("boxShadow","1px 1px",!0)),function(){Modernizr.addTest("csscolumns",function(){var e=!1,t=v("columnCount");try{(e=!!t)&&(e=new Boolean(e))}catch(n){}return e});for(var e,t,n=["Width","Span","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","BreakBefore","BreakAfter","BreakInside"],r=0;r<n.length;r++)e=n[r].toLowerCase(),t=v("column"+n[r]),("breakbefore"===e||"breakafter"===e||"breakinside"==e)&&(t=t||v(n[r])),Modernizr.addTest("csscolumns."+e,t)}(),Modernizr.addTest("flexbox",v("flexBasis","1px",!0)),Modernizr.addTest("flexboxlegacy",v("boxDirection","reverse",!0)),Modernizr.addTest("cssreflections",v("boxReflect","above",!0)),Modernizr.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&v("transform","scale(1)",!0)}),Modernizr.addTest("csstransforms3d",function(){var e=!!v("perspective","1px",!0),t=Modernizr._config.usePrefixes;if(e&&(!t||"webkitPerspective"in w.style)){var n,r="#modernizr{width:0;height:0}";Modernizr.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",B(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),Modernizr.addTest("csstransitions",v("transition","all",!0));var V=x.prefixed=function(e,t,n){return 0===e.indexOf("@")?j(e):(-1!=e.indexOf("-")&&(e=d(e)),t?h(e,t,n):h(e,"pfx"))},q=V("indexedDB",e);Modernizr.addTest("indexeddb",!!q),q&&Modernizr.addTest("indexeddb.deletedatabase","deleteDatabase"in q),a(),o(y),delete x.addTest,delete x.addAsyncTest;for(var H=0;H<Modernizr._q.length;H++)Modernizr._q[H]();e.Modernizr=Modernizr}(window,document); 309; 310/** 311 * @file 312 * A JavaScript file for the theme. 313 * 314 * In order for this JavaScript to be loaded on pages, see the instructions in 315 * the README.txt next to this file. 316 */ 317 318// JavaScript should be made compatible with libraries other than jQuery by 319// wrapping it with an "anonymous closure". See: 320// - https://drupal.org/node/1446420
321// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth 322(function (Drupal, $, window) { 323 324 Drupal.behaviors.ImgFix = { 325 attach: function (context, settings) { 326 var $imgs = $(context).find('.node_type .container.main #content #block-softikom-content .content p img'); 327 $(window).on('load', function(){ 328 if( $(window).width()>1023 ){ 329 $imgs.each(function(){ 330 var h = $(this).height(); 331 $(this).closest('p').height(h); 332 }); 333 } 334 }); 335 $(window).resize(function(){ 336 if( $(window).width()>1023 ){ 337 $imgs.each(function(){ 338 var h = $(this).height(); 339 $(this).closest('p').height(h); 340 }); 341 }else{ 342 $imgs.each(function(){ 343 $(this).closest('p').height('auto'); 344 }); 345 } 346 }); 347 } 348 }; 349 Drupal.behaviors.TabletMenu = { 350 attach: function (context, settings) { 351 $(context).find('.tablet-header .header-right .tablet-menu-btn').on('click',function(){ 352 var $tablet_header = $('body'); 353 if( $('body').hasClass('menu-active') ){ 354 $('body').removeClass('menu-active'); 355 }else{ 356 $('body').addClass('menu-active'); 357 $('html, body').animate({ scrollTop: 0 }, '300'); 358 } 359 }); 360 } 361 }; 362 Drupal.behaviors.TabletGallerySelect = { 363 attach: function (context, settings) { 364 $(window).resize(function(){ 365 var w = $(window).width(); 366 if(w<1024){ 367 var checkboxes = $(context).find('.gallery-view .views-exposed-form .fieldgroup.form-checkboxes div input:checked'); 368 if( checkboxes.length>0 ){ 369 checkboxes.prop('checked', false).change(); 370 } 371 } 372 if(w>1023){ 373 var select = $(context).find('.gallery-view .views-exposed-form .form-item-field-gallery-category-target-id-1 select'); 374 if( select.val() != 'All' ){ 375 select.val('All').change(); 376 } 377 } 378 }); 379 } 380 }; 381 Drupal.behaviors.StickyFooter = { 382 attach: function (context, settings) { 383 var h = $('#footer .container').outerHeight(); 384 var h2 = parseInt($('#footer').css('padding-top').split('p')[0]); 385 h = h +h2; 386 $(context).find('body').css('padding-bottom',h+'px'); 387 $(window).resize(function(){ 388 var h = $('#footer .container').outerHeight(); 389 var h2 = parseInt($('#footer').css('padding-top').split('p')[0]); 390 h = h +h2; 391 $(context).find('body').css('padding-bottom',h+'px'); 392 }); 393 } 394 }; 395 Drupal.behaviors.SmallerHeader = { 396 attach: function (context, settings) { 397 var scrollTop = $(window).scrollTop(); 398 if(scrollTop>120){ 399 $(context).find('#header').addClass('smaller'); 400 }else{ 401 $(context).find('#header').removeClass('smaller'); 402 } 403 $(window).on('touchmove' ,function(){ 404 var scrollTop = $(this).scrollTop(); 405 if(scrollTop>120){ 406 $(context).find('#header').addClass('smaller'); 407 }else{ 408 $(context).find('#header').removeClass('smaller'); 409 } 410 }); 411 $(window).on('scroll' ,function(){ 412 var scrollTop = $(this).scrollTop(); 413 if(scrollTop>120){ 414 $(context).find('#header').addClass('smaller'); 415 }else{ 416 $(context).find('#header').removeClass('smaller'); 417 } 418 }); 419 } 420 }; 421} (Drupal, jQuery, this)); 422; 423(function ($, Drupal) { 424 Drupal.behaviors.newsTabletCats = { 425 attach: function (context, settings) { 426 $(context).find('.tablet-views-cats select').on('change',function(){ 427 window.location.href = $(this).val() 428 }); 429 } 430 }; 431})(jQuery, Drupal); 432; 433/* 434 * Superfish v1.4.8 - jQuery menu widget 435 * Copyright (c) 2008 Joel Birch 436 * 437 * Dual licensed under the MIT and GPL licenses: 438 * http://www.opensource.org/licenses/mit-license.php 439 * http://www.gnu.org/licenses/gpl.html 440 * 441 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt 442 */ 443/* 444 * This is not the original jQuery Superfish plugin. 445 * Please refer to the README for more information. 446 */ 447 448(function($){ 449 $.fn.superfish = function(op){ 450 var sf = $.fn.superfish, 451 c = sf.c, 452 $arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')), 453 over = function(){ 454 var $$ = $(this), menu = getMenu($$); 455 clearTimeout(menu.sfTimer); 456 $$.showSuperfishUl().siblings().hideSuperfishUl(); 457 }, 458 out = function(){ 459 var $$ = $(this), menu = getMenu($$), o = sf.op; 460 clearTimeout(menu.sfTimer); 461 menu.sfTimer=setTimeout(function(){ 462 if ($$.children('.sf-clicked').length == 0){ 463 o.retainPath=($.inArray($$[0],o.$path)>-1);
464 $$.hideSuperfishUl(); 465 if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} 466 } 467 },o.delay); 468 }, 469 getMenu = function($menu){ 470 var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; 471 sf.op = sf.o[menu.serial]; 472 return menu; 473 }, 474 addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; 475 476 return this.each(function() { 477 var s = this.serial = sf.o.length; 478 var o = $.extend({},sf.defaults,op); 479 o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels), 480 p = o.$path; 481 for (var l = 0; l < p.length; l++){ 482 p.eq(l).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass); 483 } 484 sf.o[s] = sf.op = o; 485 486 $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { 487 if (o.autoArrows) addArrow( $(this).children('a:first-child, span.nolink:first-child') ); 488 }) 489 .not('.'+c.bcClass) 490 .hideSuperfishUl(); 491 492 var $a = $('a, span.nolink',this); 493 $a.each(function(i){ 494 var $li = $a.eq(i).parents('li'); 495 $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); 496 }); 497 o.onInit.call(this); 498 499 }).each(function() { 500 var menuClasses = [c.menuClass]; 501 if (sf.op.dropShadows){ 502 menuClasses.push(c.shadowClass); 503 } 504 $(this).addClass(menuClasses.join(' ')); 505 }); 506 }; 507 508 var sf = $.fn.superfish; 509 sf.o = []; 510 sf.op = {}; 511 512 sf.c = { 513 bcClass: 'sf-breadcrumb', 514 menuClass: 'sf-js-enabled', 515 anchorClass: 'sf-with-ul', 516 arrowClass: 'sf-sub-indicator', 517 shadowClass: 'sf-shadow' 518 }; 519 sf.defaults = { 520 hoverClass: 'sfHover', 521 pathClass: 'overideThisToUse', 522 pathLevels: 1, 523 delay: 800, 524 animation: {opacity:'show'}, 525 speed: 'fast', 526 autoArrows: true, 527 dropShadows: true, 528 disableHI: false, // true disables hoverIntent detection 529 onInit: function(){}, // callback functions 530 onBeforeShow: function(){}, 531 onShow: function(){}, 532 onHide: function(){} 533 }; 534 $.fn.extend({ 535 hideSuperfishUl : function(){ 536 var o = sf.op, 537 not = (o.retainPath===true) ? o.$path : ''; 538 o.retainPath = false; 539 var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) 540 .children('ul').addClass('sf-hidden'); 541 o.onHide.call($ul); 542 return this; 543 }, 544 showSuperfishUl : function(){ 545 var o = sf.op, 546 sh = sf.c.shadowClass+'-off', 547 $ul = this.addClass(o.hoverClass) 548 .children('ul.sf-hidden').hide().removeClass('sf-hidden'); 549 o.onBeforeShow.call($ul); 550 $ul.animate(o.animation,o.speed,function(){ o.onShow.call($ul); }); 551 return this; 552 } 553 }); 554})(jQuery);; 555/*! 556 * hoverIntent v1.8.0 // 2014.06.29 // jQuery v1.9.1+ 557 * http://cherne.net/brian/resources/jquery.hoverIntent.html 558 * 559 * You may use hoverIntent under the terms of the MIT license. Basically that 560 * means you are free to use hoverIntent as long as this header is left intact. 561 * Copyright 2007, 2014 Brian Cherne 562 */ 563(function($){$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var cfg={interval:100,sensitivity:6,timeout:0};if(typeof handlerIn==="object"){cfg=$.extend(cfg,handlerIn)}else{if($.isFunction(handlerOut)){cfg=$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector})}else{cfg=$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut})}}var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if(Math.sqrt((pX-cX)*(pX-cX)+(pY-cY)*(pY-cY))<cfg.sensitivity){$(ob).off("mousemove.hoverIntent",track);ob.hoverIntent_s=true;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=false;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=$.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type==="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).on("mousemove.hoverIntent",track);if(!ob.hoverIntent_s){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).off("mousemove.hoverIntent",track);if(ob.hoverIntent_s){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.on({"mouseenter.hoverIntent":handleHover,"mouseleave.hoverIntent":handleHover},cfg.selector)}})(jQuery);; 564/* 565 * sf-Smallscreen v1.3b - Provides small-screen compatibility for the jQuery Superfish plugin. 566 * 567 * Developer's note: 568 * Built as a part of the Superfish project for Drupal (http://drupal.org/project/superfish) 569 * Found any bug? have any cool ideas? contact me right away! http://drupal.org/user/619294/contact 570 * 571 * jQuery version: 1.3.x or higher. 572 * 573 * Dual licensed under the MIT and GPL licenses: 574 * http://www.opensource.org/licenses/mit-license.php 575 * http://www.gnu.org/licenses/gpl.html 576 */ 577 578(function($){ 579 $.fn.sfsmallscreen = function(options){ 580 options = $.extend({ 581 mode: 'inactive', 582 type: 'accordion', 583 breakpoint: 768, 584 breakpointUnit: 'px', 585 useragent: '', 586 title: '', 587 addSelected: false, 588 menuClasses: false, 589 hyperlinkClasses: false, 590 excludeClass_menu: '', 591 excludeClass_hyperlink: '', 592 includeClass_menu: '', 593 includeClass_hyperlink: '', 594 accordionButton: 1, 595 expandText: 'Expand', 596 collapseText: 'Collapse' 597 }, options); 598 599 // We need to clean up the menu from anything unnecessary. 600 function refine(menu){ 601 var
602 refined = menu.clone(), 603 // Things that should not be in the small-screen menus. 604 rm = refined.find('span.sf-sub-indicator'), 605 // This is a helper class for those who need to add extra markup that shouldn't exist 606 // in the small-screen versions. 607 rh = refined.find('.sf-smallscreen-remove'), 608 // Mega-menus has to be removed too. 609 mm = refined.find('ul.sf-multicolumn'); 610 for (var a = 0; a < rh.length; a++){ 611 rh.eq(a).replaceWith(rh.eq(a).html()); 612 } 613 if (options.accordionButton == 2 || options.type == 'select'){ 614 for (var b = 0; b < rm.length; b++){ 615 rm.eq(b).remove(); 616 } 617 } 618 if (mm.length > 0){ 619 mm.removeClass('sf-multicolumn'); 620 var ol = refined.find('div.sf-multicolumn-column > ol'); 621 for (var o = 0; o < ol.length; o++){ 622 ol.eq(o).replaceWith('<ul>' + ol.eq(o).html() + '</ul>'); 623 } 624 var elements = ['div.sf-multicolumn-column','.sf-multicolumn-wrapper > ol','li.sf-multicolumn-wrapper']; 625 for (var i = 0; i < elements.length; i++){ 626 obj = refined.find(elements[i]); 627 for (var t = 0; t < obj.length; t++){ 628 obj.eq(t).replaceWith(obj.eq(t).html()); 629 } 630 } 631 refined.find('.sf-multicolumn-column').removeClass('sf-multicolumn-column'); 632 } 633 refined.add(refined.find('*')).css({width:''}); 634 return refined; 635 } 636 637 // Creating <option> elements out of t 638 function toSelect(menu, level){ 639 var 640 items = '', 641 childLI = $(menu).children('li'); 642 for (var a = 0; a < childLI.length; a++){ 643 var list = childLI.eq(a), parent = list.children('a, span'); 644 for (var b = 0; b < parent.length; b++){ 645 var 646 item = parent.eq(b), 647 path = item.is('a') ? item.attr('href') : '', 648 // Class names modification. 649 itemClone = item.clone(), 650 classes = (options.hyperlinkClasses) ? ((options.excludeClass_hyperlink && itemClone.hasClass(options.excludeClass_hyperlink)) ? itemClone.removeClass(options.excludeClass_hyperlink).attr('class') : itemClone.attr('class')) : '', 651 classes = (options.includeClass_hyperlink && !itemClone.hasClass(options.includeClass_hyperlink)) ? ((options.hyperlinkClasses) ? itemClone.addClass(options.includeClass_hyperlink).attr('class') : options.includeClass_hyperlink) : classes; 652 // Retaining the active class if requested. 653 if (options.addSelected && item.hasClass('active')){ 654 classes += ' active'; 655 } 656 // <option> has to be disabled if the item is not a link. 657 disable = item.is('span') || item.attr('href')=='#' ? ' disabled="disabled"' : '', 658 // Crystal clear. 659 subIndicator = 1 < level ? Array(level).join('-') + ' ' : ''; 660 // Preparing the <option> element. 661 items += '<option value="' + path + '" class="' + classes + '"' + disable + '>' + subIndicator + $.trim(item.text()) +'</option>', 662 childUL = list.find('> ul'); 663 // Using the function for the sub-menu of this item. 664 for (var u = 0; u < childUL.length; u++){ 665 items += toSelect(childUL.eq(u), level + 1); 666 } 667 } 668 } 669 return items; 670 } 671 672 // Create the new version, hide the original. 673 function convert(menu){ 674 var menuID = menu.attr('id'), 675 // Creating a refined version of the menu. 676 refinedMenu = refine(menu); 677 // Currently the plugin provides two reactions to small screens. 678 // Converting the menu to a <select>
678 element, and converting to an accordion version of the menu. 679 if (options.type == 'accordion'){ 680 var 681 toggleID = menuID + '-toggle', 682 accordionID = menuID + '-accordion'; 683 // Making sure the accordion does not exist. 684 if ($('#' + accordionID).length == 0){ 685 var 686 // Getting the style class. 687 styleClass = menu.attr('class').split(' ').filter(function(item){ 688 return item.indexOf('sf-style-') > -1 ? item : ''; 689 }), 690 // Creating the accordion. 691 accordion = $(refinedMenu).attr('id', accordionID); 692 // Removing unnecessary classes. 693 accordion.removeClass('sf-horizontal sf-vertical sf-navbar sf-shadow sf-js-enabled'); 694 // Adding necessary classes. 695 accordion.addClass('sf-accordion sf-hidden'); 696 // Removing style attributes and any unnecessary class. 697 accordion.find('li').each(function(){ 698 $(this).removeAttr('style').removeClass('sfHover').attr('id', $(this).attr('id') + '-accordion'); 699 }); 700 // Doing the same and making sure all the sub-menus are off-screen (hidden). 701 accordion.find('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden'); 702 // Creating the accordion toggle switch. 703 var toggle = '<div class="sf-accordion-toggle ' + styleClass + '"><a href="#" id="' + toggleID + '"><span>' + options.title + '</span></a></div>'; 704 705 // Adding Expand\Collapse buttons if requested. 706 if (options.accordionButton == 2){ 707 accordion.addClass('sf-accordion-with-buttons'); 708 var parent = accordion.find('li.menuparent'); 709 for (var i = 0; i < parent.length; i++){ 710 parent.eq(i).prepend('<a href="#" class="sf-accordion-button">' + options.expandText + '</a>'); 711 } 712 } 713 // Inserting the according and hiding the original menu. 714 menu.before(toggle).before(accordion).hide(); 715 716 var 717 accordionElement = $('#' + accordionID), 718 // Deciding what should be used as accordion buttons. 719 buttonElement = (options.accordionButton < 2) ? 'a.menuparent,span.nolink.menuparent' : 'a.sf-accordion-button', 720 button = accordionElement.find(buttonElement); 721 722 // Attaching a click event to the toggle switch. 723 $('#' + toggleID).on('click', function(e){ 724 // Preventing the click. 725 e.preventDefault(); 726 // Adding the sf-expanded class. 727 $(this).toggleClass('sf-expanded'); 728 729 if (accordionElement.hasClass('sf-expanded')){ 730 // If the accordion is already expanded: 731 // Hiding its expanded sub-menus and then the accordion itself as well. 732 accordionElement.add(accordionElement.find('li.sf-expanded')).removeClass('sf-expanded') 733 .end().find('ul').hide() 734 // This is a bit tricky, it's the same trick that has been in use in the main plugin for some time. 735 // Basically we'll add a class that keeps the sub-menu off-screen and still visible, 736 // and make it invisible and removing the class one moment before showing or hiding it. 737 // This helps screen reader software access all the menu items. 738 .end().hide().addClass('sf-hidden').show(); 739 // Changing the caption of any existing accordion buttons to 'Expand'. 740 if (options.accordionButton == 2){ 741 accordionElement.find('a.sf-accordion-button').text(options.expandText); 742 } 743 } 744 else { 745 // But if it's collapsed, 746 accordionElement.addClass('sf-expanded').hide().removeClass('sf-hidden').show(); 747 } 748 }); 749 750 // Attaching a click event to the buttons. 751 button.on('click', function(e){ 752 // Making sure the buttons does not exist already. 753 if ($(this).closest('li').children('ul').length > 0){ 754 e.preventDefault(); 755 // Selecting the parent menu items. 756 var parent = $(this).closest('li'); 757 // Creating and inserting Expand\Collapse buttons to the parent menu items, 758 // of course only if not already happened.
759 if (options.accordionButton == 1 && parent.children('a.menuparent,span.nolink.menuparent').length > 0 && parent.children('ul').children('li.sf-clone-parent').length == 0){ 760 var 761 // Cloning the hyperlink of the parent menu item. 762 cloneLink = parent.children('a.menuparent,span.nolink.menuparent').clone(); 763 // Removing unnecessary classes and element(s). 764 cloneLink.removeClass('menuparent sf-with-ul').children('.sf-sub-indicator').remove(); 765 // Wrapping the hyerplinks in <li>. 766 cloneLink = $('<li class="sf-clone-parent" />').html(cloneLink); 767 // Adding a helper class and attaching them to the sub-menus. 768 parent.children('ul').addClass('sf-has-clone-parent').prepend(cloneLink); 769 } 770 // Once the button is clicked, collapse the sub-menu if it's expanded. 771 if (parent.hasClass('sf-expanded')){ 772 parent.children('ul').slideUp('fast', function(){ 773 // Doing the accessibility trick after hiding the sub-menu. 774 $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show(); 775 }); 776 // Changing the caption of the inserted Collapse link to 'Expand', if any is inserted. 777 if (options.accordionButton == 2 && parent.children('.sf-accordion-button').length > 0){ 778 parent.children('.sf-accordion-button').text(options.expandText); 779 } 780 } 781 // Otherwise, expand the sub-menu. 782 else { 783 // Doing the accessibility trick and then showing the sub-menu. 784 parent.children('ul').hide().removeClass('sf-hidden').slideDown('fast') 785 // Changing the caption of the inserted Expand link to 'Collape', if any is inserted. 786 .end().addClass('sf-expanded').children('a.sf-accordion-button').text(options.collapseText) 787 // Hiding any expanded sub-menu of the same level. 788 .end().siblings('li.sf-expanded').children('ul') 789 .slideUp('fast', function(){ 790 // Doing the accessibility trick after hiding it. 791 $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show(); 792 }) 793 // Assuming Expand\Collapse buttons do exist, resetting captions, in those hidden sub-menus. 794 .parent().children('a.sf-accordion-button').text(options.expandText); 795 } 796 } 797 }); 798 } 799 } 800 else { 801 var 802 // Class names modification. 803 menuClone = menu.clone(), classes = (options.menuClasses) ? ((options.excludeClass_menu && menuClone.hasClass(options.excludeClass_menu)) ? menuClone.removeClass(options.excludeClass_menu).attr('class') : menuClone.attr('class')) : '', 804 classes = (options.includeClass_menu && !menuClone.hasClass(options.includeClass_menu)) ? ((options.menuClasses) ? menuClone.addClass(options.includeClass_menu).attr('class') : options.includeClass_menu) : classes, 805 classes = (classes) ? ' class="' + classes + '"' : ''; 806 807 // Making sure the <select> element does not exist already. 808 if ($('#' + menuID + '-select').length == 0){ 809 // Creating the <option> elements. 810 var newMenu = toSelect(refinedMenu, 1), 811 // Creating the <select> element and assigning an ID and class name. 812 selectList = $('<select class="' + classes + '" id="' + menuID + '-select"/>') 813 // Attaching the title and the items to the <select> element. 814 .html('<option>' + options.title + '</option>' + newMenu) 815 // Attaching an event then. 816 .change(function(){ 817 // Except for the first option that is the menu title and not a real menu item. 818 if ($('option:selected', this).index()){ 819 window.location = selectList.val(); 820 } 821 }); 822 // Applying the addSelected option to it. 823 if (options.addSelected){ 824 selectList.find('.active').attr('selected', !0); 825 } 826 // Finally inserting the <select> element into the document then hiding the original menu. 827 menu.before(selectList).hide(); 828 } 829 } 830 } 831 832 // Turn everything back to normal. 833 function turnBack(menu){ 834 var 835 id = '#' + menu.attr('id'); 836 // Removing the small screen version. 837 $(id + '-' + options.type).remove(); 838 // Removing the accordion toggle switch as well. 839 if (options.type == 'accordion'){ 840 $(id + '-toggle').parent('div').remove(); 841 } 842 // Crystal clear! 843 $(id).show(); 844 } 845
846 // Return original object to support chaining. 847 // Although this is unnecessary because of the way the module uses these plugins. 848 for (var s = 0; s < this.length; s++){ 849 var 850 menu = $(this).eq(s), 851 mode = options.mode; 852 // The rest is crystal clear, isn't it? :) 853 if (mode == 'always_active'){ 854 convert(menu); 855 } 856 else if (mode == 'window_width'){ 857 var breakpoint = (options.breakpointUnit == 'em') ? (options.breakpoint * parseFloat($('body').css('font-size'))) : options.breakpoint, 858 windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, 859 timer; 860 if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){ 861 convert(menu); 862 } 863 else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) { 864 convert(menu); 865 } 866 $(window).resize(function(){ 867 clearTimeout(timer); 868 timer = setTimeout(function(){ 869 var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 870 if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){ 871 convert(menu); 872 } 873 else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) { 874 convert(menu); 875 } 876 else { 877 turnBack(menu); 878 } 879 }, 50); 880 }); 881 } 882 else if (mode == 'useragent_custom'){ 883 if (options.useragent != ''){ 884 var ua = RegExp(options.useragent, 'i'); 885 if (navigator.userAgent.match(ua)){ 886 convert(menu); 887 } 888 } 889 } 890 else if (mode == 'useragent_predefined' && navigator.userAgent.match(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i)){ 891 convert(menu); 892 } 893 } 894 return this; 895 } 896})(jQuery); 897; 898/* 899 * Supposition v0.2 - an optional enhancer for Superfish jQuery menu widget. 900 * 901 * Copyright (c) 2008 Joel Birch - based mostly on work by Jesse Klaasse and credit goes largely to him. 902 * Special thanks to Karl Swedberg for valuable input. 903 * 904 * Dual licensed under the MIT and GPL licenses: 905 * http://www.opensource.org/licenses/mit-license.php 906 * http://www.gnu.org/licenses/gpl.html 907 */ 908/* 909 * This is not the original jQuery Supposition plugin. 910 * Please refer to the README for more information. 911 */ 912 913(function($){ 914 $.fn.supposition = function(){ 915 var $w = $(window), /*do this once instead of every onBeforeShow call*/ 916 _offset = function(dir) { 917 return window[dir == 'y' ? 'pageYOffset' : 'pageXOffset'] 918 || document.documentElement && document.documentElement[dir=='y' ? 'scrollTop' : 'scrollLeft'] 919 || document.body[dir=='y' ? 'scrollTop' : 'scrollLeft']; 920 }, 921 onHide = function(){ 922 this.css({bottom:''}); 923 }, 924 onBeforeShow = function(){ 925 this.each(function(){ 926 var $u = $(this); 927 $u.css('display','block'); 928 var $mul = $u.closest('.sf-menu'), 929 level = $u.parents('ul').length, 930 menuWidth = $u.width(), 931 menuParentWidth = $u.closest('li').outerWidth(true), 932 menuParentLeft = $u.closest('li').offset().left, 933 totalRight = $w.width() + _offset('x'), 934 menuRight = $u.offset().left + menuWidth, 935 exactMenuWidth = (menuRight > (menuParentWidth + menuParentLeft)) ? menuWidth - (menuRight - (menuParentWidth + menuParentLeft)) : menuWidth; 936 if ($u.parents('.sf-js-enabled').hasClass('rtl')) { 937 if (menuParentLeft < exactMenuWidth) { 938 if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){ 939 $u.css({left:0,right:'auto'}); 940 } 941 else { 942 $u.css({left:menuParentWidth + 'px',right:'auto'}); 943 } 944 } 945 } 946 else { 947 if (menuRight > totalRight && menuParentLeft > menuWidth) { 948 if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){ 949 $u.css({right:0,left:'auto'}); 950 } 951 else { 952 $u.css({right:menuParentWidth + 'px',left:'auto'}); 953 } 954 } 955 } 956 var windowHeight = $w.height(), 957 offsetTop = $u.offset().top, 958 menuParentShadow = ($mul.hasClass('sf-shadow') && $u.css('padding-bottom').length > 0) ? parseInt($u.css('padding-bottom').slice(0,-2)) : 0, 959 menuParentHeight = ($mul.hasClass('sf-vertical')) ? '-' + menuParentShadow : $u.parent().outerHeight(true) - menuParentShadow, 960 menuHeight = $u.height(), 961 baseline = windowHeight + _offset('y'); 962 var expandUp = ((offsetTop + menuHeight > baseline) && (offsetTop > menuHeight)); 963 if (expandUp) { 964 $u.css({bottom:menuParentHeight + 'px',top:'auto'}); 965 } 966 $u.css('display','none'); 967 }); 968 }; 969 970 return this.each(function() { 971 var o = $.fn.superfish.o[this.serial]; /* get this menu's options */ 972 973 /* if callbacks already set, store them */ 974 var _onBeforeShow = o.onBeforeShow, 975 _onHide = o.onHide; 976 977 $.extend($.fn.superfish.o[this.serial],{ 978 onBeforeShow: function() { 979 onBeforeShow.call(this); /* fire our Supposition callback */ 980 _onBeforeShow.call(this); /* fire stored callbacks */ 981 }, 982 onHide: function() { 983 onHide.call(this); /* fire our Supposition callback */ 984 _onHide.call(this); /* fire stored callbacks */ 985 } 986 }); 987 }); 988 }; 989})(jQuery);; 990/* 991 * Supersubs v0.4b - jQuery plugin 992 * Copyright (c) 2013 Joel Birch 993 * 994 * Dual licensed under the MIT and GPL licenses: 995 * http://www.opensource.org/licenses/mit-license.php 996 * http://www.gnu.org/licenses/gpl.html 997 * 998 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of 999 * their longest list item children. If you use this, please expect bugs and report them 1000 * to the jQuery Google Group with the word 'Superfish' in the subject line. 1001 * 1002 */ 1003/* 1004 * This is not the original jQuery Supersubs plugin. 1005 * Please refer to the README for more information. 1006 */ 1007 1008(function($){ // $ will refer to jQuery within this closure 1009 $.fn.supersubs = function(options){ 1010 var opts = $.extend({}, $.fn.supersubs.defaults, options);
1011 // return original object to support chaining 1012 // Although this is unnecessary due to the way the module uses these plugins. 1013 for (var a = 0; a < this.length; a++) { 1014 // cache selections 1015 var $$ = $(this).eq(a), 1016 // support metadata 1017 o = $.meta ? $.extend({}, opts, $$.data()) : opts; 1018 // Jump one level if it's a "NavBar" 1019 if ($$.hasClass('sf-navbar')) { 1020 $$ = $$.children('li').children('ul'); 1021 } 1022 // cache all ul elements 1023 var $ULs = $$.find('ul'), 1024 // get the font size of menu. 1025 // .css('fontSize') returns various results cross-browser, so measure an em dash instead 1026 fontsize = $('<li id="menu-fontsize">—</li>'), 1027 size = fontsize.attr('style','padding:0;position:absolute;top:-99999em;width:auto;') 1028 .appendTo($$)[0].clientWidth; //clientWidth is faster than width() 1029 // remove em dash 1030 fontsize.remove(); 1031 1032 // loop through each ul in menu 1033 for (var b = 0; b < $ULs.length; b++) { 1034 var 1035 // cache this ul 1036 $ul = $ULs.eq(b); 1037 // If a multi-column sub-menu, and only if correctly configured. 1038 if (o.multicolumn && $ul.hasClass('sf-multicolumn') && $ul.find('.sf-multicolumn-column').length > 0){ 1039 // Look through each column. 1040 var $column = $ul.find('div.sf-multicolumn-column > ol'), 1041 // Overall width. 1042 mwWidth = 0; 1043 for (var d = 0; d < $column.length; d++){ 1044 resize($column.eq(d)); 1045 // New column width, in pixels. 1046 var colWidth = $column.width(); 1047 // Just a trick to convert em unit to px. 1048 $column.css({width:colWidth}) 1049 // Making column parents the same size. 1050 .parents('.sf-multicolumn-column').css({width:colWidth}); 1051 // Overall width. 1052 mwWidth += parseInt(colWidth); 1053 } 1054 // Resizing the columns container too. 1055 $ul.add($ul.find('li.sf-multicolumn-wrapper, li.sf-multicolumn-wrapper > ol')).css({width:mwWidth}); 1056 } 1057 else { 1058 resize($ul); 1059 } 1060 } 1061 } 1062 function resize($ul){ 1063 var 1064 // get all (li) children of this ul 1065 $LIs = $ul.children(), 1066 // get all anchor grand-children 1067 $As = $LIs.children('a'); 1068 // force content to one line and save current float property 1069 $LIs.css('white-space','nowrap'); 1070 // remove width restrictions and floats so elements remain vertically stacked 1071 $ul.add($LIs).add($As).css({float:'none',width:'auto'}); 1072 // this ul will now be shrink-wrapped to longest li due to position:absolute 1073 // so save its width as ems. 1074 var emWidth = $ul.get(0).clientWidth / size; 1075 // add more width to ensure lines don't turn over at certain sizes in various browsers 1076 emWidth += o.extraWidth; 1077 // restrict to at least minWidth and at most maxWidth 1078 if (emWidth > o.maxWidth) {emWidth = o.maxWidth;} 1079 else if (emWidth < o.minWidth) {emWidth = o.minWidth;} 1080 emWidth += 'em'; 1081 // set ul to width in ems 1082 $ul.css({width:emWidth}); 1083 // restore li floats to avoid IE bugs 1084 // set li width to full width of this ul 1085 // revert white-space to normal 1086 $LIs.add($As).css({float:'',width:'',whiteSpace:''}); 1087 // update offset position of descendant ul to reflect new width of parent. 1088 // set it to 100% in case it isn't already set to this in the CSS 1089 for (var c = 0; c < $LIs.length; c++) { 1090 var $childUl = $LIs.eq(c).children('ul'); 1091 var offsetDirection = $childUl.css('left') !== undefined ? 'left' : 'right'; 1092 $childUl.css(offsetDirection,'100%'); 1093 } 1094 } 1095 return this; 1096 }; 1097 // expose defaults 1098 $.fn.supersubs.defaults = { 1099 multicolumn: true, // define width for multi-column sub-menus and their columns. 1100 minWidth: 12, // requires em unit. 1101 maxWidth: 27, // requires em unit. 1102 extraWidth: 1 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values 1103 }; 1104})(jQuery); // plugin code ends 1105; 1106/** 1107 * @file 1108 * The Superfish Drupal Behavior to apply the Superfish jQuery plugin to lists. 1109 */ 1110 1111(function ($, Drupal, drupalSettings) { 1112 1113 'use strict'; 1114 1115 /** 1116 * jQuery Superfish plugin. 1117 * 1118 * @type {Drupal~behavior} 1119 * 1120 * @prop {Drupal~behaviorAttach} attach 1121 * Attaches the behavior to an applicable <ul> element. 1122 */ 1123 Drupal.behaviors.superfish = { 1124 attach: function (context, drupalSettings) { 1125 // Take a look at each menu to apply Superfish to. 1126 $.each(drupalSettings.superfish || {}, function (index, options) { 1127 var $menu = $('ul#' + options.id, context); 1128 1129 // Check if we are to apply the Supersubs plug-in to it. 1130 if (options.plugins || false) { 1131 if (options.plugins.supersubs || false) { 1132 $menu.supersubs(options.plugins.supersubs); 1133 } 1134 } 1135 1136 // Apply Superfish to the menu. 1137 $menu.superfish(options.sf); 1138 1139 // Check if we are to apply any other plug-in to it. 1140 if (options.plugins || false) { 1141 if (options.plugins.touchscreen || false) { 1142 $menu.sftouchscreen(options.plugins.touchscreen); 1143 } 1144 if (options.plugins.smallscreen || false) { 1145 $menu.sfsmallscreen(options.plugins.smallscreen); 1146 } 1147 if (options.plugins.supposition || false) { 1148 $menu.supposition(); 1149 } 1150 } 1151 }); 1152 } 1153 }; 1154})(jQuery, Drupal, drupalSettings); 1155; 1156/** 1157* DO NOT EDIT THIS FILE. 1158* See the following change record for more information, 1159* https://www.drupal.org/node/2815083 1160* @preserve 1161**/ 1162 1163(function ($, Drupal) { 1164 Drupal.behaviors.dropButton = { 1165 attach: function attach(context, settings) { 1166 var $dropbuttons = $(context).find('.dropbutton-wrapper').once('dropbutton'); 1167 if ($dropbuttons.length) { 1168 var $body = $('body').once('dropbutton-click'); 1169 if ($body.length) { 1170 $body.on('click', '.dropbutton-toggle', dropbuttonClickHandler); 1171 } 1172 1173 var il = $dropbuttons.length; 1174 for (var i = 0; i < il; i++) { 1175 DropButton.dropbuttons.push(new DropButton($dropbuttons[i], settings.dropbutton)); 1176 } 1177 } 1178 } 1179 }; 1180 1181 function dropbuttonClickHandler(e) { 1182 e.preventDefault(); 1183 $(e.target).closest('.dropbutton-wrapper').toggleClass('open'); 1184 } 1185 1186 function DropButton(dropbutton, settings) { 1187 var options = $.extend({ title: Drupal.t('List additional actions') }, settings); 1188 var $dropbutton = $(dropbutton); 1189 1190 this.$dropbutton = $dropbutton; 1191 1192 this.$list = $dropbutton.find('.dropbutton'); 1193 1194 this.$actions = this.$list.find('li').addClass('dropbutton-action'); 1195 1196 if (this.$actions.length > 1) { 1197 var $primary = this.$actions.slice(0, 1); 1198 1199 var $secondary = this.$actions.slice(1); 1200 $secondary.addClass('secondary-action'); 1201 1202 $primary.after(Drupal.theme('dropbuttonToggle', options)); 1203 1204 this.$dropbutton.addClass('dropbutton-multiple').on({ 1205 'mouseleave.dropbutton': $.proxy(this.hoverOut, this), 1206 1207 'mouseenter.dropbutton': $.proxy(this.hoverIn, this), 1208
1209 'focusout.dropbutton': $.proxy(this.focusOut, this), 1210 1211 'focusin.dropbutton': $.proxy(this.focusIn, this) 1212 }); 1213 } else { 1214 this.$dropbutton.addClass('dropbutton-single'); 1215 } 1216 } 1217 1218 $.extend(DropButton, { 1219 dropbuttons: [] 1220 }); 1221 1222 $.extend(DropButton.prototype, { 1223 toggle: function toggle(show) { 1224 var isBool = typeof show === 'boolean'; 1225 show = isBool ? show : !this.$dropbutton.hasClass('open'); 1226 this.$dropbutton.toggleClass('open', show); 1227 }, 1228 hoverIn: function hoverIn() { 1229 if (this.timerID) { 1230 window.clearTimeout(this.timerID); 1231 } 1232 }, 1233 hoverOut: function hoverOut() { 1234 this.timerID = window.setTimeout($.proxy(this, 'close'), 500); 1235 }, 1236 open: function open() { 1237 this.toggle(true); 1238 }, 1239 close: function close() { 1240 this.toggle(false); 1241 }, 1242 focusOut: function focusOut(e) { 1243 this.hoverOut.call(this, e); 1244 }, 1245 focusIn: function focusIn(e) { 1246 this.hoverIn.call(this, e); 1247 } 1248 }); 1249 1250 $.extend(Drupal.theme, { 1251 dropbuttonToggle: function dropbuttonToggle(options) { 1252 return '<li class="dropbutton-toggle"><button type="button"><span class="dropbutton-arrow"><span class="visually-hidden">' + options.title + '</span></span></button></li>'; 1253 } 1254 }); 1255 1256 Drupal.DropButton = DropButton; 1257})(jQuery, Drupal);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.