1Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"":{"An AJAX HTTP error occurred.":"Si \u00e8 verificato un errore HTTP in AJAX.","HTTP Result Code: !status":"Codice HTTP di risposta: !status","An AJAX HTTP request terminated abnormally.":"Una richiesta AJAX HTTP \u00e8 terminata in modo anomalo.","Debugging information follows.":"Di seguito le informazioni di debug.","Path: !uri":"Percorso: !uri","StatusText: !statusText":"StatusText: !statusText","ResponseText: !responseText":"ResponseText: !responseText","ReadyState: !readyState":"ReadyState: !readyState","Please wait...":"Attendere prego...","Autocomplete popup":"Popup di autocompletamento","Searching for matches...":"Ricerca in corso...","Configure":"Configura","Select all rows in this table":"Seleziona tutte le righe in questa tabella","Deselect all rows in this table":"Deseleziona tutte le righe in questa tabella","This permission is inherited from the authenticated user role.":"Questo permesso viene ereditato dal ruolo utente autenticato.","Re-order rows by numerical weight instead of dragging.":"Riordina le righe utilizzando il peso numerico invece del trascinamento.","Show row weights":"Visualizza i pesi delle righe","Hide row weights":"Nascondi i pesi delle righe","Drag to re-order":"Trascina per riordinare","Changes made in this table will not be saved until the form is submitted.":"I cambiamenti fatti a questa tabella non saranno salvati finch\u00e8 il form non viene inviato.","Hide":"Nascondi","Show":"Mostra","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"Il file selezionato %filename non pu\u00f2 essere caricato. Sono consentiti solo file con le seguenti estensioni: %extensions.","Hide summary":"Nascondi sommario","Edit summary":"Modifica sommario","Not in menu":"Non nel menu","New revision":"Nuova revisione","No revision":"Nessuna revisione","By @name on @date":"Da @name il @date","By @name":"Da @name","Not published":"Non pubblicato","Alias: @alias":"Alias: @alias","No alias":"Nessun alias","@number comments per page":"@number commenti per pagina","(active tab)":"(scheda attiva)","Not in book":"Non nel libro","New book":"Nuovo libro","File browsing is disabled in directory %dir.":"La navigazione dei file \u00e8 disattivata per la cartella %dir.","Upload":"Carica","You can not perform this operation.":"Impossibile eseguire l\u0027operazione richiesta.","Do you want to refresh the current directory?":"Si desidera aggiornare la cartella corrente?","Only files with the following extensions are allowed: %files-allowed.":"Sono consentiti solo i file con le seguenti estensioni: %files-allowed.","Delete selected files?":"Eliminare i file selezionati?","Please select a thumbnail.":"Selezionare una miniatura.","Please specify dimensions within the allowed range that is from 1x1 to @dimensions.":"Le dimensioni specificate devono rientrare nell\u0027intervallo consentito, che va da 1x1 a @dimensions.","Please select a file.":"Selezionare un file.","Log messages":"Messaggi di log","%filename is not an image.":"%filename non \u00e8 un\u0027immagine.","You must select at least %num files.":"Devi selezionare almeno %num file.","You are not allowed to operate on more than %num files.":"L\u0027utente non \u00e8 autorizzato ad operare su pi\u00f9 di %num file.","Close":"Chiudi","Change view":"Cambia vista","Insert file":"Inserisci file","Edit":"Modifica","Not restricted":"Non limitato","Restricted to certain pages":"Limitato a certe pagine","Not customizable":"Non personalizzabile","The changes to these blocks will not be saved until the \u003Cem\u003ESave blocks\u003C\/em\u003E button is clicked.":"I cambiamenti a questi blocchi non saranno salvati finch\u00e9 il bottone \u003Cem\u003ESalva blocchi\u003C\/em\u003E \u00e8 cliccato.","The block cannot be placed in this region.":"Il blocco non pu\u00f2 essere posizionato in questa regione.","None":"Nessuno","Done":"Fatto","Add":"Aggiungi","Customize dashboard":"Personalizza la dashboard","Requires a title":"Richiede un titolo","Don\u0027t display post information":"Non mostrare le informazioni di pubblicazione","Insert this token into your form":"Inserisci questo token nel form","First click a text field to insert your tokens into.":"Prima occorre cliccare sul campo di testo dove inserire i token.","Select all":"Seleziona tutto","Remove group":"Rimuovi gruppo","Apply (all displays)":"Applica (tutte le visualizzazioni)","Apply (this display)":"Applica (solo questa visualizzazione)","Revert to default":"Ritorna al predefinito","Automatic alias":"Alias automatico","Translate Text":"Traduci testo","An HTTP error @status occured.":"Si \u00e8 verificato un errore HTTP @status.","The term \u0027@term\u0027 will be added.":"Questo termine non \u00e8 presente e verr\u00e0 aggiunto \u0027@term\u0027"}} };; 2 3(function ($) { 4 Drupal.Panels = Drupal.Panels || {}; 5 6 Drupal.Panels.autoAttach = function() { 7 if ($.browser.msie) { 8 // If IE, attach a hover event so we can see our admin links. 9 $("div.panel-pane").hover( 10 function() { 11 $('div.panel-hide', this).addClass("panel-hide-hover"); return true; 12 }, 13 function() { 14 $('div.panel-hide', this).removeClass("panel-hide-hover"); return true; 15 } 16 ); 17 $("div.admin-links").hover( 18 function() { 19 $(this).addClass("admin-links-hover"); return true; 20 }, 21 function(){ 22 $(this).removeClass("admin-links-hover"); return true; 23 } 24 ); 25 } 26 }; 27 28 $(Drupal.Panels.autoAttach); 29})(jQuery); 30; 31/** 32* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+ 33* <http://cherne.net/brian/resources/jquery.hoverIntent.html> 34* 35* @param f onMouseOver function || An object with configuration options 36* @param g onMouseOut function || Nothing (use configuration options object) 37* @author Brian Cherne brian(at)cherne(dot)net 38*/ 39(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);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.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;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=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.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).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);; 40/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) 41 * Licensed under the MIT License (LICENSE.txt). 42 * 43 * Version 2.1.2 44 */ 45(function(a){a.fn.bgiframe=(a.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(d){d=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},d);var c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+d.src+'"style="display:block;position:absolute;z-index:-1;'+(d.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(d.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":b(d.top))+";left:"+(d.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(d.left))+";width:"+(d.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":b(d.width))+";height:"+(d.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":b(d.height))+';"/>';return this.each(function(){if(a(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(c),this.firstChild)}})}:function(){return this});a.fn.bgIframe=a.fn.bgiframe;function b(c){return c&&c.constructor===Number?c+"px":c}})(jQuery);; 46/* 47 * Superfish v1.4.8 - jQuery menu widget 48 * Copyright (c) 2008 Joel Birch 49 * 50 * Dual licensed under the MIT and GPL licenses: 51 * http://www.opensource.org/licenses/mit-license.php 52 * http://www.gnu.org/licenses/gpl.html 53 * 54 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt 55 */ 56/* 57 * This is not the original jQuery Supersubs plugin. 58 * Please refer to the README for more information. 59 */ 60 61(function($){ 62 $.fn.superfish = function(op){ 63 var sf = $.fn.superfish, 64 c = sf.c, 65 $arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')), 66 over = function(){ 67 var $$ = $(this), menu = getMenu($$); 68 clearTimeout(menu.sfTimer); 69 $$.showSuperfishUl().siblings().hideSuperfishUl(); 70 }, 71 out = function(){ 72 var $$ = $(this), menu = getMenu($$), o = sf.op; 73 clearTimeout(menu.sfTimer); 74 menu.sfTimer=setTimeout(function(){ 75 o.retainPath=($.inArray($$[0],o.$path)>-1);
76 $$.hideSuperfishUl(); 77 if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} 78 },o.delay); 79 }, 80 getMenu = function($menu){ 81 var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; 82 sf.op = sf.o[menu.serial]; 83 return menu; 84 }, 85 addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; 86 87 return this.each(function() { 88 var s = this.serial = sf.o.length; 89 var o = $.extend({},sf.defaults,op); 90 o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ 91 $(this).addClass([o.hoverClass,c.bcClass].join(' ')) 92 .filter('li:has(ul)').removeClass(o.pathClass); 93 }); 94 sf.o[s] = sf.op = o; 95 96 $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { 97 if (o.autoArrows) addArrow( $('>a:first-child',this) ); 98 }) 99 .not('.'+c.bcClass) 100 .hideSuperfishUl(); 101 102 var $a = $('a',this); 103 $a.each(function(i){ 104 var $li = $a.eq(i).parents('li'); 105 $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); 106 }); 107 o.onInit.call(this); 108 109 }).each(function() { 110 var menuClasses = [c.menuClass]; 111 if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); 112 $(this).addClass(menuClasses.join(' ')); 113 }); 114 }; 115 116 var sf = $.fn.superfish; 117 sf.o = []; 118 sf.op = {}; 119 sf.IE7fix = function(){ 120 var o = sf.op; 121 if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined) 122 this.toggleClass(sf.c.shadowClass+'-off'); 123 }; 124 sf.c = { 125 bcClass: 'sf-breadcrumb', 126 menuClass: 'sf-js-enabled', 127 anchorClass: 'sf-with-ul', 128 arrowClass: 'sf-sub-indicator', 129 shadowClass: 'sf-shadow' 130 }; 131 sf.defaults = { 132 hoverClass: 'sfHover', 133 pathClass: 'overideThisToUse', 134 pathLevels: 1, 135 delay: 800, 136 animation: {opacity:'show'}, 137 speed: 'normal', 138 autoArrows: true, 139 dropShadows: true, 140 disableHI: false, // true disables hoverIntent detection 141 onInit: function(){}, // callback functions 142 onBeforeShow: function(){}, 143 onShow: function(){}, 144 onHide: function(){} 145 }; 146 $.fn.extend({ 147 hideSuperfishUl : function(){ 148 var o = sf.op, 149 not = (o.retainPath===true) ? o.$path : ''; 150 o.retainPath = false; 151 var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) 152 .find('>ul').css({top: '-99999em'}).addClass('sf-hidden'); 153 o.onHide.call($ul); 154 return this; 155 }, 156 showSuperfishUl : function(){ 157 var o = sf.op, 158 sh = sf.c.shadowClass+'-off', 159 $ul = this.addClass(o.hoverClass) 160 .find('>ul.sf-hidden').css({display: 'none', top: ''}).removeClass('sf-hidden'); 161 sf.IE7fix.call($ul); 162 o.onBeforeShow.call($ul); 163 $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); 164 return this; 165 } 166 }); 167})(jQuery);; 168/* 169 * Supersubs v0.2b - jQuery plugin 170 * Copyright (c) 2008 Joel Birch 171 * 172 * Dual licensed under the MIT and GPL licenses: 173 * http://www.opensource.org/licenses/mit-license.php 174 * http://www.gnu.org/licenses/gpl.html 175 * 176 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of 177 * their longest list item children. If you use this, please expect bugs and report them 178 * to the jQuery Google Group with the word 'Superfish' in the subject line. 179 * 180 */ 181/* 182 * This is not the original jQuery Supersubs plugin. 183 * Please refer to the README for more information. 184 */ 185 186(function($){ // $ will refer to jQuery within this closure 187 $.fn.supersubs = function(options){ 188 var opts = $.extend({}, $.fn.supersubs.defaults, options); 189 // return original object to support chaining 190 return this.each(function() { 191 // cache selections 192 var $$ = $(this); 193 // support metadata 194 var o = $.meta ? $.extend({}, opts, $$.data()) : opts; 195 // get the font size of menu. 196 // .css('fontSize') returns various results cross-browser, so measure an em dash instead 197 var fontsize = $('<li id="menu-fontsize">—</li>').css({ 198 'padding' : 0, 199 'position' : 'absolute', 200 'top' : '-99999em', 201 'width' : 'auto' 202 }).appendTo($$).width(); //clientWidth is faster, but was incorrect here 203 // remove em dash 204 $('#menu-fontsize').remove(); 205 206 // Jump on level if it's a "NavBar" 207 if ($$.hasClass('sf-navbar')) { 208 $$ = $('li > ul', $$); 209 } 210 // cache all ul elements
211 $ULs = $$.find('ul:not(.sf-megamenu)'); 212 // loop through each ul in menu 213 $ULs.each(function(i) { 214 // cache this ul 215 var $ul = $ULs.eq(i); 216 // get all (li) children of this ul 217 var $LIs = $ul.children(); 218 // get all anchor grand-children 219 var $As = $LIs.children('a'); 220 // force content to one line and save current float property 221 var liFloat = $LIs.css('white-space','nowrap').css('float'); 222 // remove width restrictions and floats so elements remain vertically stacked 223 var emWidth = $ul.add($LIs).add($As).css({ 224 'float' : 'none', 225 'width' : 'auto' 226 }) 227 // this ul will now be shrink-wrapped to longest li due to position:absolute 228 // so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer 229 .end().end()[0].clientWidth / fontsize; 230 // add more width to ensure lines don't turn over at certain sizes in various browsers 231 emWidth += o.extraWidth; 232 // restrict to at least minWidth and at most maxWidth 233 if (emWidth > o.maxWidth) { emWidth = o.maxWidth; } 234 else if (emWidth < o.minWidth) { emWidth = o.minWidth; } 235 emWidth += 'em'; 236 // set ul to width in ems 237 $ul.css('width',emWidth); 238 // restore li floats to avoid IE bugs 239 // set li width to full width of this ul 240 // revert white-space to normal 241 $LIs.css({ 242 'float' : liFloat, 243 'width' : '100%', 244 'white-space' : 'normal' 245 }) 246 // update offset position of descendant ul to reflect new width of parent 247 .each(function(){ 248 var $childUl = $('>ul',this); 249 var offsetDirection = $childUl.css('left')!==undefined ? 'left' : 'right'; 250 $childUl.css(offsetDirection,emWidth); 251 }); 252 }); 253 }); 254 }; 255 // expose defaults 256 $.fn.supersubs.defaults = { 257 minWidth: 9, // requires em unit. 258 maxWidth: 25, // requires em unit. 259 extraWidth: 0 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values 260 }; 261})(jQuery); // plugin code ends; 262/* 263 * Supposition v0.2 - an optional enhancer for Superfish jQuery menu widget. 264 * 265 * Copyright (c) 2008 Joel Birch - based mostly on work by Jesse Klaasse and credit goes largely to him. 266 * Special thanks to Karl Swedberg for valuable input. 267 * 268 * Dual licensed under the MIT and GPL licenses: 269 * http://www.opensource.org/licenses/mit-license.php 270 * http://www.gnu.org/licenses/gpl.html 271 */ 272/* 273 * This is not the original jQuery Supersubs plugin. 274 * Please refer to the README for more information. 275 */ 276 277(function($){ 278 $.fn.supposition = function(){ 279 var $w = $(window), /*do this once instead of every onBeforeShow call*/ 280 _offset = function(dir) { 281 return window[dir == 'y' ? 'pageYOffset' : 'pageXOffset'] 282 || document.documentElement && document.documentElement[dir=='y' ? 'scrollTop' : 'scrollLeft'] 283 || document.body[dir=='y' ? 'scrollTop' : 'scrollLeft']; 284 }, 285 onHide = function(){ 286 this.css({bottom:''}); 287 }, 288 onBeforeShow = function(){ 289 this.each(function(){ 290 var $u = $(this); 291 $u.css('display','block'); 292 var menuWidth = $u.width(), 293 menuParentWidth = $u.closest('li').outerWidth(true), 294 menuParentLeft = $u.closest('li').offset().left, 295 totalRight = $w.width() + _offset('x'), 296 menuRight = $u.offset().left + menuWidth, 297 exactMenuWidth = (menuRight > (menuParentWidth + menuParentLeft)) ? menuWidth - (menuRight - (menuParentWidth + menuParentLeft)) : menuWidth; 298 if ($u.parents('.sf-js-enabled').hasClass('rtl')) { 299 if (menuParentLeft < exactMenuWidth) { 300 $u.css('left', menuParentWidth + 'px'); 301 $u.css('right', 'auto'); 302 } 303 } 304 else { 305 if (menuRight > totalRight && menuParentLeft > menuWidth) { 306 $u.css('right', menuParentWidth + 'px'); 307 $u.css('left', 'auto'); 308 } 309 } 310 var windowHeight = $w.height(), 311 offsetTop = $u.offset().top, 312 menuParentShadow = ($u.closest('.sf-menu').hasClass('sf-shadow') && $u.css('padding-bottom').length > 0) ? parseInt($u.css('padding-bottom').slice(0,-2)) : 0, 313 menuParentHeight = ($u.closest('.sf-menu').hasClass('sf-vertical')) ? '-' + menuParentShadow : $u.parent().outerHeight(true) - menuParentShadow, 314 menuHeight = $u.height(), 315 baseline = windowHeight + _offset('y'); 316 var expandUp = ((offsetTop + menuHeight > baseline) && (offsetTop > menuHeight)); 317 if (expandUp) { 318 $u.css('bottom', menuParentHeight + 'px'); 319 $u.css('top', 'auto'); 320 } 321 $u.css('display','none'); 322 }); 323 }; 324 325 return this.each(function() { 326 var o = $.fn.superfish.o[this.serial]; /* get this menu's options */ 327 328 /* if callbacks already set, store them */ 329 var _onBeforeShow = o.onBeforeShow, 330 _onHide = o.onHide; 331 332 $.extend($.fn.superfish.o[this.serial],{ 333 onBeforeShow: function() { 334 onBeforeShow.call(this); /* fire our Supposition callback */ 335 _onBeforeShow.call(this); /* fire stored callbacks */ 336 }, 337 onHide: function() { 338 onHide.call(this); /* fire our Supposition callback */ 339 _onHide.call(this); /* fire stored callbacks */ 340 } 341 }); 342 }); 343 }; 344})(jQuery);; 345/* 346 * sf-Touchscreen v1.0b - Provides touchscreen compatibility for the jQuery Superfish plugin. 347 * 348 * Developer's note: 349 * Built as a part of the Superfish project for Drupal (http://drupal.org/project/superfish) 350 * Found any bug? have any cool ideas? contact me right away! http://drupal.org/user/619294/contact 351 * 352 * jQuery version: 1.3.x or higher. 353 * 354 * Dual licensed under the MIT and GPL licenses: 355 * http://www.opensource.org/licenses/mit-license.php 356 * http://www.gnu.org/licenses/gpl.html 357 */ 358 359(function($){ 360 $.fn.sftouchscreen = function() {
361 // Return original object to support chaining. 362 return this.each( function() { 363 // Select hyperlinks from parent menu items. 364 $(this).find('li > ul').closest('li').children('a').each( function() { 365 var $item = $(this); 366 // No .toggle() here as it's not possible to reset it. 367 $item.click( function(event){ 368 // Already clicked? proceed to the URI. 369 if ($item.hasClass('sf-clicked')) { 370 var $uri = $item.attr('href'); 371 window.location = $uri; 372 } 373 else { 374 event.preventDefault(); 375 $item.addClass('sf-clicked'); 376 } 377 }).closest('li').mouseleave( function(){ 378 // So, we reset everything. 379 $item.removeClass('sf-clicked'); 380 }); 381 }); 382 }); 383 }; 384})(jQuery);; 385(function ($) { 386 387Drupal.googleanalytics = {}; 388 389$(document).ready(function() { 390 391 // Attach mousedown, keyup, touchstart events to document only and catch 392 // clicks on all elements. 393 $(document.body).bind("mousedown keyup touchstart", function(event) { 394 395 // Catch the closest surrounding link of a clicked element. 396 $(event.target).closest("a,area").each(function() { 397 398 // Is the clicked URL internal? 399 if (Drupal.googleanalytics.isInternal(this.href)) { 400 // Skip 'click' tracking, if custom tracking events are bound. 401 if ($(this).is('.colorbox')) { 402 // Do nothing here. The custom event will handle all tracking. 403 //console.info("Click on .colorbox item has been detected."); 404 } 405 // Is download tracking activated and the file extension configured for download tracking? 406 else if (Drupal.settings.googleanalytics.trackDownload && Drupal.googleanalytics.isDownload(this.href)) { 407 // Download link clicked. 408 ga("send", "event", "Downloads", Drupal.googleanalytics.getDownloadExtension(this.href).toUpperCase(), Drupal.googleanalytics.getPageUrl(this.href)); 409 } 410 else if (Drupal.googleanalytics.isInternalSpecial(this.href)) { 411 // Keep the internal URL for Google Analytics website overlay intact. 412 ga("send", "pageview", { "page": Drupal.googleanalytics.getPageUrl(this.href) }); 413 } 414 } 415 else { 416 if (Drupal.settings.googleanalytics.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) { 417 // Mailto link clicked. 418 ga("send", "event", "Mails", "Click", this.href.substring(7)); 419 } 420 else if (Drupal.settings.googleanalytics.trackOutbound && this.href.match(/^\w+:\/\//i)) { 421 if (Drupal.settings.googleanalytics.trackDomainMode != 2 || (Drupal.settings.googleanalytics.trackDomainMode == 2 && !Drupal.googleanalytics.isCrossDomain(this.hostname, Drupal.settings.googleanalytics.trackCrossDomains))) { 422 // External link clicked / No top-level cross domain clicked. 423 ga("send", "event", "Outbound links", "Click", this.href); 424 } 425 } 426 } 427 }); 428 }); 429 430 // Track hash changes as unique pageviews, if this option has been enabled. 431 if (Drupal.settings.googleanalytics.trackUrlFragments) { 432 window.onhashchange = function() { 433 ga('send', 'pageview', location.pathname + location.search + location.hash); 434 } 435 } 436 437 // Colorbox: This event triggers when the transition has completed and the 438 // newly loaded content has been revealed. 439 $(document).bind("cbox_complete", function () { 440 var href = $.colorbox.element().attr("href"); 441 if (href) { 442 ga("send", "pageview", { "page": Drupal.googleanalytics.getPageUrl(href) }); 443 } 444 }); 445 446}); 447 448/** 449 * Check whether the hostname is part of the cross domains or not. 450 * 451 * @param string hostname 452 * The hostname of the clicked URL. 453 * @param array crossDomains 454 * All cross domain hostnames as JS array. 455 * 456 * @return boolean 457 */ 458Drupal.googleanalytics.isCrossDomain = function (hostname, crossDomains) { 459 /** 460 * jQuery < 1.6.3 bug: $.inArray crushes IE6 and Chrome if second argument is 461 * `null` or `undefined`, http://bugs.jquery.com/ticket/10076, 462 * https://github.com/jquery/jquery/commit/a839af034db2bd934e4d4fa6758a3fed8de74174 463 * 464 * @todo: Remove/Refactor in D8 465 */ 466 if (!crossDomains) { 467 return false;
468 } 469 else { 470 return $.inArray(hostname, crossDomains) > -1 ? true : false; 471 } 472}; 473 474/** 475 * Check whether this is a download URL or not. 476 * 477 * @param string url 478 * The web url to check. 479 * 480 * @return boolean 481 */ 482Drupal.googleanalytics.isDownload = function (url) { 483 var isDownload = new RegExp("\\.(" + Drupal.settings.googleanalytics.trackDownloadExtensions + ")([\?#].*)?$", "i"); 484 return isDownload.test(url); 485}; 486 487/** 488 * Check whether this is an absolute internal URL or not. 489 * 490 * @param string url 491 * The web url to check. 492 * 493 * @return boolean 494 */ 495Drupal.googleanalytics.isInternal = function (url) { 496 var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i"); 497 return isInternal.test(url); 498}; 499 500/** 501 * Check whether this is a special URL or not. 502 * 503 * URL types: 504 * - gotwo.module /go/* links. 505 * 506 * @param string url 507 * The web url to check. 508 * 509 * @return boolean 510 */ 511Drupal.googleanalytics.isInternalSpecial = function (url) { 512 var isInternalSpecial = new RegExp("(\/go\/.*)$", "i"); 513 return isInternalSpecial.test(url); 514}; 515 516/** 517 * Extract the relative internal URL from an absolute internal URL. 518 * 519 * Examples: 520 * - http://mydomain.com/node/1 -> /node/1 521 * - http://example.com/foo/bar -> http://example.com/foo/bar 522 * 523 * @param string url 524 * The web url to check. 525 * 526 * @return string 527 * Internal website URL 528 */ 529Drupal.googleanalytics.getPageUrl = function (url) { 530 var extractInternalUrl = new RegExp("^(https?):\/\/" + window.location.host, "i"); 531 return url.replace(extractInternalUrl, ''); 532}; 533 534/** 535 * Extract the download file extension from the URL. 536 * 537 * @param string url 538 * The web url to check. 539 * 540 * @return string 541 * The file extension of the passed url. e.g. "zip", "txt" 542 */ 543Drupal.googleanalytics.getDownloadExtension = function (url) { 544 var extractDownloadextension = new RegExp("\\.(" + Drupal.settings.googleanalytics.trackDownloadExtensions + ")([\?#].*)?$", "i"); 545 var extension = extractDownloadextension.exec(url); 546 return (extension === null) ? '' : extension[1]; 547}; 548 549})(jQuery); 550;
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.