https://ptpubliclibrary.org/sites/default/files/js/js_FLZ5nky80IqlqlT0GqixNJRqhdaKdrkeXaHw9-YwTbQ.js
1// ****************************************** 2// onReady() 3// ****************************************** 4jQuery(function() { // onReady() 5 var gcal,href; 6 gcal = jQuery('a.ical-icon').clone(true); 7 8 jQuery(gcal).addClass('gcal-icon'); 9 href = 'http://www.google.com/calendar/render?cid=' + jQuery(gcal).attr('href'); 10 jQuery(gcal).attr('href',href); 11 12 jQuery('a.ical-icon img').attr('src','/sites/all/modules/aha_google_ical/images/outlook.gif'); 13 jQuery('a.ical-icon img').removeAttr('height'); 14 jQuery('a.ical-icon img').removeAttr('width'); 15 jQuery('a.ical-icon').after(gcal); 16 jQuery('a.gcal-icon img').attr('src','/sites/all/modules/aha_google_ical/images/google.gif'); 17 jQuery('a.gcal-icon img').removeAttr('height'); 18 jQuery('a.gcal-icon img').removeAttr('width'); 19 20 21} ); // end onReady() 22// ****************************************** 23// End onReady() 24// ****************************************** 25; 26(function ($) { 27 28Drupal.behaviors.jquerymenu = { 29 attach:function(context) { 30 31 32 jqm_showit = function() { 33 $(this).children('.jqm_link_edit').fadeIn(); 34 } 35 jqm_hideit = function() { 36 $(this).children('.jqm_link_edit').fadeOut(); 37 } 38 $('ul.jquerymenu li').hover(jqm_showit, jqm_hideit); 39 40 jqm_mouseenter = function() { 41 momma = $(this); 42 if ($(momma).hasClass('closed')){ 43 if (Drupal.settings.jquerymenu.animate === 1) { 44 $($(this).siblings('ul').children()).hide().fadeIn('3000'); 45 $(momma).children('ul').slideDown('700'); 46 } 47 $(momma).removeClass('closed').addClass('open'); 48 $(this).removeClass('closed').addClass('open'); 49 } 50 } 51 52 jqm_mouseleave = function(){ 53 momma = $(this); 54 if ($(momma).hasClass('open')){ 55 if (Drupal.settings.jquerymenu.animate === 1) { 56 $(momma).children('ul').slideUp('700'); 57 $($(this).siblings('ul').children()).fadeOut('3000'); 58 } 59 $(momma).removeClass('open').addClass('closed'); 60 $(this).removeClass('open').addClass('closed'); 61 } 62 } 63 64$('ul.jquerymenu .active').parents('li').removeClass('closed').addClass('open'); 65$('ul.jquerymenu .active').parents('li').children('span.parent').removeClass('closed').addClass('open'); 66 67 if (Drupal.settings.jquerymenu.hover === 1) { 68 $('ul.jquerymenu:not(.jquerymenu-processed)', context).addClass('jquerymenu-processed').each(function(){ 69 $(this).find('li.parent').hover(jqm_mouseenter, jqm_mouseleave); 70 }); 71 $('ul.jquerymenu-processed span.parent').remove(); 72 } 73 74 else if (Drupal.settings.jquerymenu.hover === 0) { 75 $('ul.jquerymenu:not(.jquerymenu-processed)', context).addClass('jquerymenu-processed').each(function(){ 76 $(this).find("li.parent span.parent").click(function(){ 77 momma = $(this).parent(); 78 if ($(momma).hasClass('closed')){ 79 if (Drupal.settings.jquerymenu.animate === 1) { 80 $($(this).siblings('ul').children()).hide().fadeIn('3000'); 81 $(momma).children('ul').slideDown('700'); 82 } 83 $(momma).removeClass('closed').addClass('open'); 84 $(this).removeClass('closed').addClass('open'); 85 } 86 else{ 87 if (Drupal.settings.jquerymenu.animate === 1) { 88 $(momma).children('ul').slideUp('700'); 89 $($(this).siblings('ul').children()).fadeOut('3000'); 90 } 91 $(momma).removeClass('open').addClass('closed'); 92 $(this).removeClass('open').addClass('closed'); 93 } 94 }); 95 }); 96 } 97} 98}})(jQuery);; 99/* $Id: lightbox.js,v 1.5.2.6.2.136 2010/09/24 08:39:40 snpower Exp $ */ 100 101/** 102 * jQuery Lightbox 103 * @author 104 * Stella Power, <http://drupal.org/user/66894> 105 * 106 * Based on Lightbox v2.03.3 by Lokesh Dhakar 107 * <http://www.huddletogether.com/projects/lightbox2/> 108 * Also partially based on the jQuery Lightbox by Warren Krewenki 109 * <http://warren.mesozen.com> 110 * 111 * Permission has been granted to Mark Ashmead & other Drupal Lightbox2 module 112 * maintainers to distribute this file via Drupal.org 113 * Under GPL license. 114 * 115 * Slideshow, iframe and video functionality added by Stella Power. 116 */ 117 118var Lightbox; 119(function($) { 120Lightbox = { 121 auto_modal : false, 122 overlayOpacity : 0.8, // Controls transparency of shadow overlay. 123 overlayColor : '000', // Controls colour of shadow overlay. 124 disableCloseClick : true, 125 // Controls the order of the lightbox resizing animation sequence. 126 resizeSequence: 0, // 0: simultaneous, 1: width then height, 2: height then width. 127 resizeSpeed: 'normal', // Controls the speed of the lightbox resizing animation. 128 fadeInSpeed: 'normal', // Controls the speed of the image appearance. 129 slideDownSpeed: 'slow', // Controls the speed of the image details appearance. 130 minWidth: 240, 131 borderSize : 10, 132 boxColor : 'fff', 133 fontColor : '000', 134 topPosition : '', 135 infoHeight: 20, 136 alternative_layout : false, 137 imageArray : [], 138 imageNum : null, 139 total : 0, 140 activeImage : null, 141 inprogress : false, 142 disableResize : false, 143 disableZoom : false, 144 isZoomedIn : false, 145 rtl : false, 146 loopItems : false, 147 keysClose : ['c', 'x', 27], 148 keysPrevious : ['p', 37], 149 keysNext : ['n', 39], 150 keysZoom : ['z'], 151 keysPlayPause : [32], 152 153 // Slideshow options. 154 slideInterval : 5000, // In milliseconds. 155 showPlayPause : true, 156 autoStart : true, 157 autoExit : true, 158 pauseOnNextClick : false, // True to pause the slideshow when the "Next" button is clicked. 159 pauseOnPrevClick : true, // True to pause the slideshow when the "Prev" button is clicked. 160 slideIdArray : [], 161 slideIdCount : 0, 162 isSlideshow : false, 163 isPaused : false, 164 loopSlides : false, 165 166 // Iframe options. 167 isLightframe : false, 168 iframe_width : 600, 169 iframe_height : 400, 170 iframe_border : 1, 171 172 // Video and modal options. 173 enableVideo : false, 174 flvPlayer : '/flvplayer.swf', 175 flvFlashvars : '', 176 isModal : false, 177 isVideo : false, 178 videoId : false, 179 modalWidth : 400,
180 modalHeight : 400, 181 modalHTML : null, 182 183 184 // initialize() 185 // Constructor runs on completion of the DOM loading. 186 // The function inserts html at the bottom of the page which is used 187 // to display the shadow overlay and the image container. 188 initialize: function() { 189 190 var s = Drupal.settings.lightbox2; 191 Lightbox.overlayOpacity = s.overlay_opacity; 192 Lightbox.overlayColor = s.overlay_color; 193 Lightbox.disableCloseClick = s.disable_close_click; 194 Lightbox.resizeSequence = s.resize_sequence; 195 Lightbox.resizeSpeed = s.resize_speed; 196 Lightbox.fadeInSpeed = s.fade_in_speed; 197 Lightbox.slideDownSpeed = s.slide_down_speed; 198 Lightbox.borderSize = s.border_size; 199 Lightbox.boxColor = s.box_color; 200 Lightbox.fontColor = s.font_color; 201 Lightbox.topPosition = s.top_position; 202 Lightbox.rtl = s.rtl; 203 Lightbox.loopItems = s.loop_items; 204 Lightbox.keysClose = s.keys_close.split(" "); 205 Lightbox.keysPrevious = s.keys_previous.split(" "); 206 Lightbox.keysNext = s.keys_next.split(" "); 207 Lightbox.keysZoom = s.keys_zoom.split(" "); 208 Lightbox.keysPlayPause = s.keys_play_pause.split(" "); 209 Lightbox.disableResize = s.disable_resize; 210 Lightbox.disableZoom = s.disable_zoom; 211 Lightbox.slideInterval = s.slideshow_interval; 212 Lightbox.showPlayPause = s.show_play_pause; 213 Lightbox.showCaption = s.show_caption; 214 Lightbox.autoStart = s.slideshow_automatic_start; 215 Lightbox.autoExit = s.slideshow_automatic_exit; 216 Lightbox.pauseOnNextClick = s.pause_on_next_click; 217 Lightbox.pauseOnPrevClick = s.pause_on_previous_click; 218 Lightbox.loopSlides = s.loop_slides; 219 Lightbox.alternative_layout = s.use_alt_layout; 220 Lightbox.iframe_width = s.iframe_width; 221 Lightbox.iframe_height = s.iframe_height; 222 Lightbox.iframe_border = s.iframe_border; 223 Lightbox.enableVideo = s.enable_video; 224 if (s.enable_video) { 225 Lightbox.flvPlayer = s.flvPlayer; 226 Lightbox.flvFlashvars = s.flvFlashvars; 227 } 228 229 // Make the lightbox divs. 230 var layout_class = (s.use_alt_layout ? 'lightbox2-alt-layout' : 'lightbox2-orig-layout'); 231 var output = '<div id="lightbox2-overlay" style="display: none;"></div>\ 232 <div id="lightbox" style="display: none;" class="' + layout_class + '">\ 233 <div id="outerImageContainer"></div>\ 234 <div id="imageDataContainer" class="clearfix">\ 235 <div id="imageData"></div>\ 236 </div>\ 237 </div>'; 238 var loading = '<div id="loading"><a href="#" id="loadingLink"></a></div>'; 239 var modal = '<div id="modalContainer" style="display: none;"></div>'; 240 var frame = '<div id="frameContainer" style="display: none;"></div>'; 241 var imageContainer = '<div id="imageContainer" style="display: none;"></div>'; 242 var details = '<div id="imageDetails"></div>'; 243 var bottomNav = '<div id="bottomNav"></div>'; 244 var image = '<img id="lightboxImage" alt="" />'; 245 var hoverNav = '<div id="hoverNav"><a id="prevLink" href="#"></a><a id="nextLink" href="#"></a></div>'; 246 var frameNav = '<div id="frameHoverNav"><a id="framePrevLink" href="#"></a><a id="frameNextLink" href="#"></a></div>'; 247 var hoverNav = '<div id="hoverNav"><a id="prevLink" title="' + Drupal.t('Previous') + '" href="#"></a><a id="nextLink" title="' + Drupal.t('Next') + '" href="#"></a></div>'; 248 var frameNav = '<div id="frameHoverNav"><a id="framePrevLink" title="' + Drupal.t('Previous') + '" href="#"></a><a id="frameNextLink" title="' + Drupal.t('Next') + '" href="#"></a></div>'; 249 var caption = '<span id="caption"></span>'; 250 var numberDisplay = '<span id="numberDisplay"></span>'; 251 var close = '<a id="bottomNavClose" title="' + Drupal.t('Close') + '" href="#"></a>'; 252 var zoom = '<a id="bottomNavZoom" href="#"></a>'; 253 var zoomOut = '<a id="bottomNavZoomOut" href="#"></a>'; 254 var pause = '<a id="lightshowPause" title="' + Drupal.t('Pause Slideshow') + '" href="#" style="display: none;"></a>'; 255 var play = '<a id="lightshowPlay" title="' + Drupal.t('Play Slideshow') + '" href="#" style="display: none;"></a>'; 256 257 $("body").append(output); 258 $('#outerImageContainer').append(modal + frame + imageContainer + loading); 259 if (!s.use_alt_layout) { 260 $('#imageContainer').append(image + hoverNav);
261 $('#imageData').append(details + bottomNav); 262 $('#imageDetails').append(caption + numberDisplay); 263 $('#bottomNav').append(frameNav + close + zoom + zoomOut + pause + play); 264 } 265 else { 266 $('#outerImageContainer').append(bottomNav); 267 $('#imageContainer').append(image); 268 $('#bottomNav').append(close + zoom + zoomOut); 269 $('#imageData').append(hoverNav + details); 270 $('#imageDetails').append(caption + numberDisplay + pause + play); 271 } 272 273 // Setup onclick handlers. 274 if (Lightbox.disableCloseClick) { 275 $('#lightbox2-overlay').click(function() { Lightbox.end(); return false; } ).hide(); 276 } 277 $('#loadingLink, #bottomNavClose').click(function() { Lightbox.end('forceClose'); return false; } ); 278 $('#prevLink, #framePrevLink').click(function() { Lightbox.changeData(Lightbox.activeImage - 1); return false; } ); 279 $('#nextLink, #frameNextLink').click(function() { Lightbox.changeData(Lightbox.activeImage + 1); return false; } ); 280 $('#bottomNavZoom').click(function() { Lightbox.changeData(Lightbox.activeImage, true); return false; } ); 281 $('#bottomNavZoomOut').click(function() { Lightbox.changeData(Lightbox.activeImage, false); return false; } ); 282 $('#lightshowPause').click(function() { Lightbox.togglePlayPause("lightshowPause", "lightshowPlay"); return false; } ); 283 $('#lightshowPlay').click(function() { Lightbox.togglePlayPause("lightshowPlay", "lightshowPause"); return false; } ); 284 285 // Fix positioning. 286 $('#prevLink, #nextLink, #framePrevLink, #frameNextLink').css({ 'paddingTop': Lightbox.borderSize + 'px'}); 287 $('#imageContainer, #frameContainer, #modalContainer').css({ 'padding': Lightbox.borderSize + 'px'}); 288 $('#outerImageContainer, #imageDataContainer, #bottomNavClose').css({'backgroundColor': '#' + Lightbox.boxColor, 'color': '#'+Lightbox.fontColor}); 289 if (Lightbox.alternative_layout) { 290 $('#bottomNavZoom, #bottomNavZoomOut').css({'bottom': Lightbox.borderSize + 'px', 'right': Lightbox.borderSize + 'px'}); 291 } 292 else if (Lightbox.rtl == 1 && Drupal.settings.lightbox2.useragent.search('MSIE') !== -1) { 293 $('#bottomNavZoom, #bottomNavZoomOut').css({'left': '0px'}); 294 } 295 296 // Force navigation links to always be displayed 297 if (s.force_show_nav) { 298 $('#prevLink, #nextLink').addClass("force_show_nav"); 299 } 300 301 }, 302 303 // initList() 304 // Loops through anchor tags looking for 'lightbox', 'lightshow' and 305 // 'lightframe', etc, references and applies onclick events to appropriate 306 // links. You can rerun after dynamically adding images w/ajax. 307 initList : function(context) { 308 309 if (context == undefined || context == null) { 310 context = document; 311 } 312 313 // Attach lightbox to any links with rel 'lightbox', 'lightshow' or 314 // 'lightframe', etc. 315 $("a[rel^='lightbox']:not(.lightbox-processed), area[rel^='lightbox']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) { 316 if (Lightbox.disableCloseClick) { 317 $('#lightbox').unbind('click'); 318 $('#lightbox').click(function() { Lightbox.end('forceClose'); } ); 319 } 320 Lightbox.start(this, false, false, false, false); 321 if (e.preventDefault) { e.preventDefault(); } 322 return false; 323 }); 324 $("a[rel^='lightshow']:not(.lightbox-processed), area[rel^='lightshow']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) { 325 if (Lightbox.disableCloseClick) { 326 $('#lightbox').unbind('click'); 327 $('#lightbox').click(function() { Lightbox.end('forceClose'); } ); 328 } 329 Lightbox.start(this, true, false, false, false); 330 if (e.preventDefault) { e.preventDefault(); } 331 return false; 332 }); 333 $("a[rel^='lightframe']:not(.lightbox-processed), area[rel^='lightframe']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) { 334 if (Lightbox.disableCloseClick) { 335 $('#lightbox').unbind('click'); 336 $('#lightbox').click(function() { Lightbox.end('forceClose'); } ); 337 } 338 Lightbox.start(this, false, true, false, false); 339 if (e.preventDefault) { e.preventDefault(); } 340 return false;
341 }); 342 if (Lightbox.enableVideo) { 343 $("a[rel^='lightvideo']:not(.lightbox-processed), area[rel^='lightvideo']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) { 344 if (Lightbox.disableCloseClick) { 345 $('#lightbox').unbind('click'); 346 $('#lightbox').click(function() { Lightbox.end('forceClose'); } ); 347 } 348 Lightbox.start(this, false, false, true, false); 349 if (e.preventDefault) { e.preventDefault(); } 350 return false; 351 }); 352 } 353 $("a[rel^='lightmodal']:not(.lightbox-processed), area[rel^='lightmodal']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) { 354 $('#lightbox').unbind('click'); 355 // Add classes from the link to the lightbox div - don't include lightbox-processed 356 $('#lightbox').addClass($(this).attr('class')); 357 $('#lightbox').removeClass('lightbox-processed'); 358 Lightbox.start(this, false, false, false, true); 359 if (e.preventDefault) { e.preventDefault(); } 360 return false; 361 }); 362 $("#lightboxAutoModal:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) { 363 Lightbox.auto_modal = true; 364 $('#lightbox').unbind('click'); 365 Lightbox.start(this, false, false, false, true); 366 if (e.preventDefault) { e.preventDefault(); } 367 return false; 368 }); 369 }, 370 371 // start() 372 // Display overlay and lightbox. If image is part of a set, add siblings to 373 // imageArray. 374 start: function(imageLink, slideshow, lightframe, lightvideo, lightmodal) { 375 376 Lightbox.isPaused = !Lightbox.autoStart; 377 378 // Replaces hideSelectBoxes() and hideFlash() calls in original lightbox2. 379 Lightbox.toggleSelectsFlash('hide'); 380 381 // Stretch overlay to fill page and fade in. 382 var arrayPageSize = Lightbox.getPageSize(); 383 $("#lightbox2-overlay").hide().css({ 384 'width': '100%', 385 'zIndex': '10090', 386 'height': arrayPageSize[1] + 'px', 387 'backgroundColor' : '#' + Lightbox.overlayColor 388 }); 389 // Detect OS X FF2 opacity + flash issue. 390 if (lightvideo && this.detectMacFF2()) { 391 $("#lightbox2-overlay").removeClass("overlay_default"); 392 $("#lightbox2-overlay").addClass("overlay_macff2"); 393 $("#lightbox2-overlay").css({'opacity' : null}); 394 } 395 else { 396 $("#lightbox2-overlay").removeClass("overlay_macff2"); 397 $("#lightbox2-overlay").addClass("overlay_default"); 398 $("#lightbox2-overlay").css({'opacity' : Lightbox.overlayOpacity}); 399 } 400 $("#lightbox2-overlay").fadeIn(Lightbox.fadeInSpeed); 401 402 403 Lightbox.isSlideshow = slideshow; 404 Lightbox.isLightframe = lightframe; 405 Lightbox.isVideo = lightvideo; 406 Lightbox.isModal = lightmodal; 407 Lightbox.imageArray = []; 408 Lightbox.imageNum = 0; 409 410 var anchors = $(imageLink.tagName); 411 var anchor = null; 412 var rel_parts = Lightbox.parseRel(imageLink); 413 var rel = rel_parts["rel"]; 414 var rel_group = rel_parts["group"]; 415 var title = (rel_parts["title"] ? rel_parts["title"] : imageLink.title); 416 var rel_style = null; 417 var i = 0; 418 419 if (rel_parts["flashvars"]) { 420 Lightbox.flvFlashvars = Lightbox.flvFlashvars + '&' + rel_parts["flashvars"]; 421 } 422 423 // Set the title for image alternative text. 424 var alt = imageLink.title; 425 if (!alt) { 426 var img = $(imageLink).find("img"); 427 if (img && $(img).attr("alt")) { 428 alt = $(img).attr("alt"); 429 } 430 else { 431 alt = title; 432 } 433 } 434 435 if ($(imageLink).attr('id') == 'lightboxAutoModal') { 436 rel_style = rel_parts["style"]; 437 Lightbox.imageArray.push(['#lightboxAutoModal > *', title, alt, rel_style, 1]); 438 } 439 else { 440 // Handle lightbox images with no grouping. 441 if ((rel == 'lightbox' || rel == 'lightshow') && !rel_group) { 442 Lightbox.imageArray.push([imageLink.href, title, alt]); 443 } 444 445 // Handle other items with no grouping. 446 else if (!rel_group) { 447 rel_style = rel_parts["style"]; 448 Lightbox.imageArray.push([imageLink.href, title, alt, rel_style]); 449 } 450 451 // Handle grouped items. 452 else { 453 454 // Loop through anchors and add them to imageArray. 455 for (i = 0; i < anchors.length; i++) { 456 anchor = anchors[i]; 457 if (anchor.href && typeof(anchor.href) == "string" && $(anchor).attr('rel')) { 458 var rel_data = Lightbox.parseRel(anchor); 459 var anchor_title = (rel_data["title"] ? rel_data["title"] : anchor.title); 460 img_alt = anchor.title; 461 if (!img_alt) { 462 var anchor_img = $(anchor).find("img"); 463 if (anchor_img && $(anchor_img).attr("alt")) { 464 img_alt = $(anchor_img).attr("alt"); 465 } 466 else { 467 img_alt = title; 468 } 469 } 470 if (rel_data["rel"] == rel) { 471 if (rel_data["group"] == rel_group) { 472 if (Lightbox.isLightframe || Lightbox.isModal || Lightbox.isVideo) { 473 rel_style = rel_data["style"]; 474 } 475 Lightbox.imageArray.push([anchor.href, anchor_title, img_alt, rel_style]); 476 } 477 } 478 } 479 } 480 481 // Remove duplicates. 482 for (i = 0; i < Lightbox.imageArray.length; i++) { 483 for (j = Lightbox.imageArray.length-1; j > i; j--) { 484 if (Lightbox.imageArray[i][0] == Lightbox.imageArray[j][0]) { 485 Lightbox.imageArray.splice(j,1); 486 } 487 } 488 } 489 while (Lightbox.imageArray[Lightbox.imageNum][0] != imageLink.href) { 490 Lightbox.imageNum++; 491 } 492 } 493 } 494 495 if (Lightbox.isSlideshow && Lightbox.showPlayPause && Lightbox.isPaused) { 496 $('#lightshowPlay').show(); 497 $('#lightshowPause').hide(); 498 } 499 500 // Calculate top and left offset for the lightbox. 501 var arrayPageScroll = Lightbox.getPageScroll(); 502 var lightboxTop = arrayPageScroll[1] + (Lightbox.topPosition == '' ? (arrayPageSize[3] / 10) : Lightbox.topPosition) * 1; 503 var lightboxLeft = arrayPageScroll[0]; 504 $('#frameContainer, #modalContainer, #lightboxImage').hide();
505 $('#hoverNav, #prevLink, #nextLink, #frameHoverNav, #framePrevLink, #frameNextLink').hide(); 506 $('#imageDataContainer, #numberDisplay, #bottomNavZoom, #bottomNavZoomOut').hide(); 507 $('#outerImageContainer').css({'width': '250px', 'height': '250px'}); 508 $('#lightbox').css({ 509 'zIndex': '10500', 510 'top': lightboxTop + 'px', 511 'left': lightboxLeft + 'px' 512 }).show(); 513 514 Lightbox.total = Lightbox.imageArray.length; 515 Lightbox.changeData(Lightbox.imageNum); 516 }, 517 518 // changeData() 519 // Hide most elements and preload image in preparation for resizing image 520 // container. 521 changeData: function(imageNum, zoomIn) { 522 523 if (Lightbox.inprogress === false) { 524 if (Lightbox.total > 1 && ((Lightbox.isSlideshow && Lightbox.loopSlides) || (!Lightbox.isSlideshow && Lightbox.loopItems))) { 525 if (imageNum >= Lightbox.total) imageNum = 0; 526 if (imageNum < 0) imageNum = Lightbox.total - 1; 527 } 528 529 if (Lightbox.isSlideshow) { 530 for (var i = 0; i < Lightbox.slideIdCount; i++) { 531 window.clearTimeout(Lightbox.slideIdArray[i]); 532 } 533 } 534 Lightbox.inprogress = true; 535 Lightbox.activeImage = imageNum; 536 537 if (Lightbox.disableResize && !Lightbox.isSlideshow) { 538 zoomIn = true; 539 } 540 Lightbox.isZoomedIn = zoomIn; 541 542 543 // Hide elements during transition. 544 $('#loading').css({'zIndex': '10500'}).show(); 545 if (!Lightbox.alternative_layout) { 546 $('#imageContainer').hide(); 547 } 548 $('#frameContainer, #modalContainer, #lightboxImage').hide(); 549 $('#hoverNav, #prevLink, #nextLink, #frameHoverNav, #framePrevLink, #frameNextLink').hide(); 550 $('#imageDataContainer, #numberDisplay, #bottomNavZoom, #bottomNavZoomOut').hide(); 551 552 // Preload image content, but not iframe pages. 553 if (!Lightbox.isLightframe && !Lightbox.isVideo && !Lightbox.isModal) { 554 $("#lightbox #imageDataContainer").removeClass('lightbox2-alt-layout-data'); 555 imgPreloader = new Image(); 556 imgPreloader.onerror = function() { Lightbox.imgNodeLoadingError(this); }; 557 558 imgPreloader.onload = function() { 559 var photo = document.getElementById('lightboxImage'); 560 photo.src = Lightbox.imageArray[Lightbox.activeImage][0]; 561 photo.alt = Lightbox.imageArray[Lightbox.activeImage][2]; 562 563 var imageWidth = imgPreloader.width; 564 var imageHeight = imgPreloader.height; 565 566 // Resize code. 567 var arrayPageSize = Lightbox.getPageSize(); 568 var targ = { w:arrayPageSize[2] - (Lightbox.borderSize * 2), h:arrayPageSize[3] - (Lightbox.borderSize * 6) - (Lightbox.infoHeight * 4) - (arrayPageSize[3] / 10) }; 569 var orig = { w:imgPreloader.width, h:imgPreloader.height }; 570 571 // Image is very large, so show a smaller version of the larger image 572 // with zoom button. 573 if (zoomIn !== true) { 574 var ratio = 1.0; // Shrink image with the same aspect. 575 $('#bottomNavZoomOut, #bottomNavZoom').hide(); 576 if ((orig.w >= targ.w || orig.h >= targ.h) && orig.h && orig.w) { 577 ratio = ((targ.w / orig.w) < (targ.h / orig.h)) ? targ.w / orig.w : targ.h / orig.h; 578 if (!Lightbox.disableZoom && !Lightbox.isSlideshow) { 579 $('#bottomNavZoom').css({'zIndex': '10500'}).show(); 580 } 581 } 582 583 imageWidth = Math.floor(orig.w * ratio); 584 imageHeight = Math.floor(orig.h * ratio); 585 } 586 587 else { 588 $('#bottomNavZoom').hide();
589 // Only display zoom out button if the image is zoomed in already. 590 if ((orig.w >= targ.w || orig.h >= targ.h) && orig.h && orig.w) { 591 // Only display zoom out button if not a slideshow and if the 592 // buttons aren't disabled. 593 if (!Lightbox.disableResize && Lightbox.isSlideshow === false && !Lightbox.disableZoom) { 594 $('#bottomNavZoomOut').css({'zIndex': '10500'}).show(); 595 } 596 } 597 } 598 599 photo.style.width = (imageWidth) + 'px'; 600 photo.style.height = (imageHeight) + 'px'; 601 Lightbox.resizeContainer(imageWidth, imageHeight); 602 603 // Clear onLoad, IE behaves irratically with animated gifs otherwise. 604 imgPreloader.onload = function() {}; 605 }; 606 607 imgPreloader.src = Lightbox.imageArray[Lightbox.activeImage][0]; 608 imgPreloader.alt = Lightbox.imageArray[Lightbox.activeImage][2]; 609 } 610 611 // Set up frame size, etc. 612 else if (Lightbox.isLightframe) { 613 $("#lightbox #imageDataContainer").addClass('lightbox2-alt-layout-data'); 614 var src = Lightbox.imageArray[Lightbox.activeImage][0]; 615 $('#frameContainer').html('<iframe id="lightboxFrame" style="display: none;" src="'+src+'"></iframe>'); 616 617 // Enable swf support in Gecko browsers. 618 if (Drupal.settings.lightbox2.useragent.search('Mozilla') !== -1 && src.indexOf('.swf') != -1) { 619 setTimeout(function () { 620 document.getElementById("lightboxFrame").src = Lightbox.imageArray[Lightbox.activeImage][0]; 621 }, 1000); 622 } 623 624 if (!Lightbox.iframe_border) { 625 $('#lightboxFrame').css({'border': 'none'}); 626 $('#lightboxFrame').attr('frameborder', '0'); 627 } 628 var iframe = document.getElementById('lightboxFrame'); 629 var iframeStyles = Lightbox.imageArray[Lightbox.activeImage][3]; 630 iframe = Lightbox.setStyles(iframe, iframeStyles); 631 Lightbox.resizeContainer(parseInt(iframe.width, 10), parseInt(iframe.height, 10)); 632 } 633 else if (Lightbox.isVideo || Lightbox.isModal) { 634 $("#lightbox #imageDataContainer").addClass('lightbox2-alt-layout-data'); 635 var container = document.getElementById('modalContainer'); 636 var modalStyles = Lightbox.imageArray[Lightbox.activeImage][3]; 637 container = Lightbox.setStyles(container, modalStyles); 638 if (Lightbox.isVideo) { 639 Lightbox.modalHeight = parseInt(container.height, 10) - 10; 640 Lightbox.modalWidth = parseInt(container.width, 10) - 10; 641 Lightvideo.startVideo(Lightbox.imageArray[Lightbox.activeImage][0]); 642 } 643 Lightbox.resizeContainer(parseInt(container.width, 10), parseInt(container.height, 10)); 644 } 645 } 646 }, 647 648 // imgNodeLoadingError() 649 imgNodeLoadingError: function(image) { 650 var s = Drupal.settings.lightbox2; 651 var original_image = Lightbox.imageArray[Lightbox.activeImage][0]; 652 if (s.display_image_size !== "") { 653 original_image = original_image.replace(new RegExp("."+s.display_image_size), ""); 654 } 655 Lightbox.imageArray[Lightbox.activeImage][0] = original_image; 656 image.onerror = function() { Lightbox.imgLoadingError(image); }; 657 image.src = original_image; 658 }, 659 660 // imgLoadingError() 661 imgLoadingError: function(image) { 662 var s = Drupal.settings.lightbox2; 663 Lightbox.imageArray[Lightbox.activeImage][0] = s.default_image; 664 image.src = s.default_image; 665 }, 666 667 // resizeContainer() 668 resizeContainer: function(imgWidth, imgHeight) { 669 670 imgWidth = (imgWidth < Lightbox.minWidth ? Lightbox.minWidth : imgWidth); 671 672 this.widthCurrent = $('#outerImageContainer').width(); 673 this.heightCurrent = $('#outerImageContainer').height(); 674 675 var widthNew = (imgWidth + (Lightbox.borderSize * 2)); 676 var heightNew = (imgHeight + (Lightbox.borderSize * 2)); 677 678 // Scalars based on change from old to new. 679 this.xScale = ( widthNew / this.widthCurrent) * 100; 680 this.yScale = ( heightNew / this.heightCurrent) * 100; 681 682 // Calculate size difference between new and old image, and resize if 683 // necessary. 684 wDiff = this.widthCurrent - widthNew; 685 hDiff = this.heightCurrent - heightNew; 686 687 $('#modalContainer').css({'width': imgWidth, 'height': imgHeight}); 688 // Detect animation sequence. 689 if (Lightbox.resizeSequence) { 690 var animate1 = {width: widthNew}; 691 var animate2 = {height: heightNew}; 692 if (Lightbox.resizeSequence == 2) { 693 animate1 = {height: heightNew}; 694 animate2 = {width: widthNew}; 695 } 696 $('#outerImageContainer').animate(animate1, Lightbox.resizeSpeed).animate(animate2, Lightbox.resizeSpeed, 'linear', function() { Lightbox.showData(); }); 697 } 698 // Simultaneous. 699 else { 700 $('#outerImageContainer').animate({'width': widthNew, 'height': heightNew}, Lightbox.resizeSpeed, 'linear', function() { Lightbox.showData(); }); 701 } 702 703 // If new and old image are same size and no scaling transition is necessary 704 // do a quick pause to prevent image flicker. 705 if ((hDiff === 0) && (wDiff === 0)) { 706 if (Drupal.settings.lightbox2.useragent.search('MSIE') !== -1) { 707 Lightbox.pause(250); 708 } 709 else { 710 Lightbox.pause(100); 711 } 712 } 713 714 var s = Drupal.settings.lightbox2; 715 if (!s.use_alt_layout) { 716 $('#prevLink, #nextLink').css({'height': imgHeight + 'px'}); 717 } 718 $('#imageDataContainer').css({'width': widthNew + 'px'}); 719 }, 720 721 // showData() 722 // Display image and begin preloading neighbors. 723 showData: function() { 724 $('#loading').hide(); 725 726 if (Lightbox.isLightframe || Lightbox.isVideo || Lightbox.isModal) { 727 Lightbox.updateDetails(); 728 if (Lightbox.isLightframe) { 729 $('#frameContainer').show(); 730 if (Drupal.settings.lightbox2.useragent.search('Safari') !== -1 || Lightbox.fadeInSpeed === 0) { 731 $('#lightboxFrame').css({'zIndex': '10500'}).show(); 732 } 733 else { 734 $('#lightboxFrame').css({'zIndex': '10500'}).fadeIn(Lightbox.fadeInSpeed); 735 } 736 } 737 else { 738 if (Lightbox.isVideo) { 739 $("#modalContainer").html(Lightbox.modalHTML).click(function(){return false;}).css('zIndex', '10500').show(); 740 } 741 else { 742 var src = unescape(Lightbox.imageArray[Lightbox.activeImage][0]); 743 if (Lightbox.imageArray[Lightbox.activeImage][4]) { 744 $(src).appendTo("#modalContainer"); 745 $('#modalContainer').css({'zIndex': '10500'}).show(); 746 } 747 else { 748 // Use a callback to show the new image, otherwise you get flicker. 749 $("#modalContainer").hide().load(src, function () {$('#modalContainer').css({'zIndex': '10500'}).show();}); 750 } 751 $('#modalContainer').unbind('click'); 752 } 753 // This might be needed in the Lightframe section above. 754 //$('#modalContainer').css({'zIndex': '10500'}).show(); 755 } 756 } 757 758 // Handle display of image content. 759 else { 760 $('#imageContainer').show(); 761 if (Drupal.settings.lightbox2.useragent.search('Safari') !== -1 || Lightbox.fadeInSpeed === 0) { 762 $('#lightboxImage').css({'zIndex': '10500'}).show(); 763 } 764 else { 765 $('#lightboxImage').css({'zIndex': '10500'}).fadeIn(Lightbox.fadeInSpeed); 766 } 767 Lightbox.updateDetails(); 768 this.preloadNeighborImages(); 769 } 770 Lightbox.inprogress = false;
771 772 // Slideshow specific stuff. 773 if (Lightbox.isSlideshow) { 774 if (!Lightbox.loopSlides && Lightbox.activeImage == (Lightbox.total - 1)) { 775 if (Lightbox.autoExit) { 776 Lightbox.slideIdArray[Lightbox.slideIdCount++] = setTimeout(function () {Lightbox.end('slideshow');}, Lightbox.slideInterval); 777 } 778 } 779 else { 780 if (!Lightbox.isPaused && Lightbox.total > 1) { 781 Lightbox.slideIdArray[Lightbox.slideIdCount++] = setTimeout(function () {Lightbox.changeData(Lightbox.activeImage + 1);}, Lightbox.slideInterval); 782 } 783 } 784 if (Lightbox.showPlayPause && Lightbox.total > 1 && !Lightbox.isPaused) { 785 $('#lightshowPause').show(); 786 $('#lightshowPlay').hide(); 787 } 788 else if (Lightbox.showPlayPause && Lightbox.total > 1) { 789 $('#lightshowPause').hide(); 790 $('#lightshowPlay').show(); 791 } 792 } 793 794 // Adjust the page overlay size. 795 var arrayPageSize = Lightbox.getPageSize(); 796 var arrayPageScroll = Lightbox.getPageScroll(); 797 var pageHeight = arrayPageSize[1]; 798 if (Lightbox.isZoomedIn && arrayPageSize[1] > arrayPageSize[3]) { 799 var lightboxTop = (Lightbox.topPosition == '' ? (arrayPageSize[3] / 10) : Lightbox.topPosition) * 1; 800 pageHeight = pageHeight + arrayPageScroll[1] + lightboxTop; 801 } 802 $('#lightbox2-overlay').css({'height': pageHeight + 'px', 'width': arrayPageSize[0] + 'px'}); 803 804 // Gecko browsers (e.g. Firefox, SeaMonkey, etc) don't handle pdfs as 805 // expected. 806 if (Drupal.settings.lightbox2.useragent.search('Mozilla') !== -1) { 807 if (Lightbox.imageArray[Lightbox.activeImage][0].indexOf(".pdf") != -1) { 808 setTimeout(function () { 809 document.getElementById("lightboxFrame").src = Lightbox.imageArray[Lightbox.activeImage][0]; 810 }, 1000); 811 } 812 } 813 }, 814 815 // updateDetails() 816 // Display caption, image number, and bottom nav. 817 updateDetails: function() { 818 819 $("#imageDataContainer").hide(); 820 821 var s = Drupal.settings.lightbox2; 822 823 if (s.show_caption) { 824 var caption = Lightbox.filterXSS(Lightbox.imageArray[Lightbox.activeImage][1]); 825 if (!caption) caption = ''; 826 $('#caption').html(caption).css({'zIndex': '10500'}).show(); 827 } 828 829 // If image is part of set display 'Image x of x'. 830 var numberDisplay = null; 831 if (s.image_count && Lightbox.total > 1) { 832 var currentImage = Lightbox.activeImage + 1; 833 if (!Lightbox.isLightframe && !Lightbox.isModal && !Lightbox.isVideo) { 834 numberDisplay = s.image_count.replace(/\!current/, currentImage).replace(/\!total/, Lightbox.total); 835 } 836 else if (Lightbox.isVideo) { 837 numberDisplay = s.video_count.replace(/\!current/, currentImage).replace(/\!total/, Lightbox.total); 838 } 839 else { 840 numberDisplay = s.page_count.replace(/\!current/, currentImage).replace(/\!total/, Lightbox.total); 841 }
842 $('#numberDisplay').html(numberDisplay).css({'zIndex': '10500'}).show(); 843 } 844 else { 845 $('#numberDisplay').hide(); 846 } 847 848 $("#imageDataContainer").hide().slideDown(Lightbox.slideDownSpeed, function() { 849 $("#bottomNav").show(); 850 }); 851 if (Lightbox.rtl == 1) { 852 $("#bottomNav").css({'float': 'left'}); 853 } 854 Lightbox.updateNav(); 855 }, 856 857 // updateNav() 858 // Display appropriate previous and next hover navigation. 859 updateNav: function() { 860 861 $('#hoverNav').css({'zIndex': '10500'}).show(); 862 var prevLink = '#prevLink'; 863 var nextLink = '#nextLink'; 864 865 // Slideshow is separated as we need to show play / pause button. 866 if (Lightbox.isSlideshow) { 867 if ((Lightbox.total > 1 && Lightbox.loopSlides) || Lightbox.activeImage !== 0) { 868 $(prevLink).css({'zIndex': '10500'}).show().click(function() { 869 if (Lightbox.pauseOnPrevClick) { 870 Lightbox.togglePlayPause("lightshowPause", "lightshowPlay"); 871 } 872 Lightbox.changeData(Lightbox.activeImage - 1); return false; 873 }); 874 } 875 else { 876 $(prevLink).hide(); 877 } 878 879 // If not last image in set, display next image button. 880 if ((Lightbox.total > 1 && Lightbox.loopSlides) || Lightbox.activeImage != (Lightbox.total - 1)) { 881 $(nextLink).css({'zIndex': '10500'}).show().click(function() { 882 if (Lightbox.pauseOnNextClick) { 883 Lightbox.togglePlayPause("lightshowPause", "lightshowPlay"); 884 } 885 Lightbox.changeData(Lightbox.activeImage + 1); return false; 886 }); 887 } 888 // Safari browsers need to have hide() called again. 889 else { 890 $(nextLink).hide(); 891 } 892 } 893 894 // All other types of content. 895 else { 896 897 if ((Lightbox.isLightframe || Lightbox.isModal || Lightbox.isVideo) && !Lightbox.alternative_layout) { 898 $('#frameHoverNav').css({'zIndex': '10500'}).show(); 899 $('#hoverNav').css({'zIndex': '10500'}).hide(); 900 prevLink = '#framePrevLink'; 901 nextLink = '#frameNextLink'; 902 } 903 904 // If not first image in set, display prev image button. 905 if ((Lightbox.total > 1 && Lightbox.loopItems) || Lightbox.activeImage !== 0) { 906 // Unbind any other click handlers, otherwise this adds a new click handler 907 // each time the arrow is clicked. 908 $(prevLink).css({'zIndex': '10500'}).show().unbind().click(function() { 909 Lightbox.changeData(Lightbox.activeImage - 1); return false; 910 }); 911 } 912 // Safari browsers need to have hide() called again. 913 else { 914 $(prevLink).hide(); 915 } 916 917 // If not last image in set, display next image button. 918 if ((Lightbox.total > 1 && Lightbox.loopItems) || Lightbox.activeImage != (Lightbox.total - 1)) { 919 // Unbind any other click handlers, otherwise this adds a new click handler 920 // each time the arrow is clicked. 921 $(nextLink).css({'zIndex': '10500'}).show().unbind().click(function() { 922 Lightbox.changeData(Lightbox.activeImage + 1); return false; 923 }); 924 } 925 // Safari browsers need to have hide() called again. 926 else { 927 $(nextLink).hide(); 928 } 929 } 930 931 // Don't enable keyboard shortcuts so forms will work. 932 if (!Lightbox.isModal) { 933 this.enableKeyboardNav(); 934 } 935 }, 936 937 938 // enableKeyboardNav() 939 enableKeyboardNav: function() { 940 $(document).bind("keydown", this.keyboardAction); 941 }, 942 943 // disableKeyboardNav() 944 disableKeyboardNav: function() { 945 $(document).unbind("keydown", this.keyboardAction); 946 }, 947 948 // keyboardAction() 949 keyboardAction: function(e) { 950 if (e === null) { // IE. 951 keycode = event.keyCode; 952 escapeKey = 27; 953 } 954 else { // Mozilla. 955 keycode = e.keyCode; 956 escapeKey = e.DOM_VK_ESCAPE; 957 } 958 959 key = String.fromCharCode(keycode).toLowerCase(); 960 961 // Close lightbox. 962 if (Lightbox.checkKey(Lightbox.keysClose, key, keycode)) { 963 Lightbox.end('forceClose'); 964 } 965 // Display previous image (p, <-). 966 else if (Lightbox.checkKey(Lightbox.keysPrevious, key, keycode)) { 967 if ((Lightbox.total > 1 && ((Lightbox.isSlideshow && Lightbox.loopSlides) || (!Lightbox.isSlideshow && Lightbox.loopItems))) || Lightbox.activeImage !== 0) { 968 Lightbox.changeData(Lightbox.activeImage - 1); 969 } 970 971 } 972 // Display next image (n, ->). 973 else if (Lightbox.checkKey(Lightbox.keysNext, key, keycode)) { 974 if ((Lightbox.total > 1 && ((Lightbox.isSlideshow && Lightbox.loopSlides) || (!Lightbox.isSlideshow && Lightbox.loopItems))) || Lightbox.activeImage != (Lightbox.total - 1)) { 975 Lightbox.changeData(Lightbox.activeImage + 1); 976 } 977 } 978 // Zoom in. 979 else if (Lightbox.checkKey(Lightbox.keysZoom, key, keycode) && !Lightbox.disableResize && !Lightbox.disableZoom && !Lightbox.isSlideshow && !Lightbox.isLightframe) { 980 if (Lightbox.isZoomedIn) { 981 Lightbox.changeData(Lightbox.activeImage, false); 982 } 983 else if (!Lightbox.isZoomedIn) { 984 Lightbox.changeData(Lightbox.activeImage, true); 985 } 986 return false;
987 } 988 // Toggle play / pause (space). 989 else if (Lightbox.checkKey(Lightbox.keysPlayPause, key, keycode) && Lightbox.isSlideshow) { 990 991 if (Lightbox.isPaused) { 992 Lightbox.togglePlayPause("lightshowPlay", "lightshowPause"); 993 } 994 else { 995 Lightbox.togglePlayPause("lightshowPause", "lightshowPlay"); 996 } 997 return false; 998 } 999 }, 1000 1001 preloadNeighborImages: function() { 1002 1003 if ((Lightbox.total - 1) > Lightbox.activeImage) { 1004 preloadNextImage = new Image(); 1005 preloadNextImage.src = Lightbox.imageArray[Lightbox.activeImage + 1][0]; 1006 } 1007 if (Lightbox.activeImage > 0) { 1008 preloadPrevImage = new Image(); 1009 preloadPrevImage.src = Lightbox.imageArray[Lightbox.activeImage - 1][0]; 1010 } 1011 1012 }, 1013 1014 end: function(caller) { 1015 var closeClick = (caller == 'slideshow' ? false : true); 1016 if (Lightbox.isSlideshow && Lightbox.isPaused && !closeClick) { 1017 return; 1018 } 1019 // To prevent double clicks on navigation links. 1020 if (Lightbox.inprogress === true && caller != 'forceClose') { 1021 return; 1022 } 1023 Lightbox.disableKeyboardNav(); 1024 $('#lightbox').hide(); 1025 $("#lightbox2-overlay").fadeOut(); 1026 Lightbox.isPaused = true; 1027 Lightbox.inprogress = false; 1028 Lightbox.imageArray = []; 1029 Lightbox.imageNum = 0; 1030 // Replaces calls to showSelectBoxes() and showFlash() in original 1031 // lightbox2. 1032 Lightbox.toggleSelectsFlash('visible'); 1033 if (Lightbox.isSlideshow) { 1034 for (var i = 0; i < Lightbox.slideIdCount; i++) { 1035 window.clearTimeout(Lightbox.slideIdArray[i]); 1036 } 1037 $('#lightshowPause, #lightshowPlay').hide(); 1038 } 1039 else if (Lightbox.isLightframe) { 1040 $('#frameContainer').empty().hide(); 1041 } 1042 else if (Lightbox.isVideo || Lightbox.isModal) { 1043 if (!Lightbox.auto_modal) { 1044 $('#modalContainer').hide().html(""); 1045 } 1046 Lightbox.auto_modal = false; 1047 } 1048 }, 1049 1050 1051 // getPageScroll() 1052 // Returns array with x,y page scroll values. 1053 // Core code from - quirksmode.com. 1054 getPageScroll : function() { 1055 1056 var xScroll, yScroll; 1057 1058 if (self.pageYOffset || self.pageXOffset) { 1059 yScroll = self.pageYOffset; 1060 xScroll = self.pageXOffset; 1061 } 1062 else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) { // Explorer 6 Strict. 1063 yScroll = document.documentElement.scrollTop; 1064 xScroll = document.documentElement.scrollLeft; 1065 } 1066 else if (document.body) {// All other Explorers. 1067 yScroll = document.body.scrollTop; 1068 xScroll = document.body.scrollLeft; 1069 } 1070 1071 arrayPageScroll = [xScroll,yScroll]; 1072 return arrayPageScroll; 1073 }, 1074 1075 // getPageSize() 1076 // Returns array with page width, height and window width, height. 1077 // Core code from - quirksmode.com. 1078 // Edit for Firefox by pHaez. 1079 1080 getPageSize : function() { 1081 1082 var xScroll, yScroll; 1083 1084 if (window.innerHeight && window.scrollMaxY) { 1085 xScroll = window.innerWidth + window.scrollMaxX; 1086 yScroll = window.innerHeight + window.scrollMaxY; 1087 } 1088 else if (document.body.scrollHeight > document.body.offsetHeight) { // All but Explorer Mac. 1089 xScroll = document.body.scrollWidth; 1090 yScroll = document.body.scrollHeight; 1091 } 1092 else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari. 1093 xScroll = document.body.offsetWidth; 1094 yScroll = document.body.offsetHeight; 1095 } 1096 1097 var windowWidth, windowHeight; 1098 1099 if (self.innerHeight) { // All except Explorer. 1100 if (document.documentElement.clientWidth) { 1101 windowWidth = document.documentElement.clientWidth; 1102 } 1103 else { 1104 windowWidth = self.innerWidth; 1105 } 1106 windowHeight = self.innerHeight; 1107 } 1108 else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode. 1109 windowWidth = document.documentElement.clientWidth; 1110 windowHeight = document.documentElement.clientHeight; 1111 } 1112 else if (document.body) { // Other Explorers. 1113 windowWidth = document.body.clientWidth; 1114 windowHeight = document.body.clientHeight; 1115 } 1116 // For small pages with total height less than height of the viewport. 1117 if (yScroll < windowHeight) { 1118 pageHeight = windowHeight; 1119 } 1120 else { 1121 pageHeight = yScroll; 1122 } 1123 // For small pages with total width less than width of the viewport. 1124 if (xScroll < windowWidth) { 1125 pageWidth = xScroll; 1126 } 1127 else { 1128 pageWidth = windowWidth; 1129 } 1130 arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight); 1131 return arrayPageSize; 1132 }, 1133 1134 1135 // pause(numberMillis) 1136 pause : function(ms) { 1137 var date = new Date(); 1138 var curDate = null; 1139 do { curDate = new Date(); } 1140 while (curDate - date < ms); 1141 }, 1142 1143 1144 // toggleSelectsFlash() 1145 // Hide / unhide select lists and flash objects as they appear above the 1146 // lightbox in some browsers. 1147 toggleSelectsFlash: function (state) { 1148 if (state == 'visible') { 1149 $("select.lightbox_hidden, embed.lightbox_hidden, object.lightbox_hidden").show(); 1150 } 1151 else if (state == 'hide') { 1152 $("select:visible, embed:visible, object:visible").not('#lightboxAutoModal select, #lightboxAutoModal embed, #lightboxAutoModal object').addClass("lightbox_hidden"); 1153 $("select.lightbox_hidden, embed.lightbox_hidden, object.lightbox_hidden").hide(); 1154 } 1155 }, 1156 1157 1158 // parseRel() 1159 parseRel: function (link) { 1160 var parts = []; 1161 parts["rel"] = parts["title"] = parts["group"] = parts["style"] = parts["flashvars"] = null; 1162 if (!$(link).attr('rel')) return parts; 1163 parts["rel"] = $(link).attr('rel').match(/\w+/)[0]; 1164 1165 if ($(link).attr('rel').match(/\[(.*)\]/)) { 1166 var info = $(link).attr('rel').match(/\[(.*?)\]/)[1].split('|'); 1167 parts["group"] = info[0]; 1168 parts["style"] = info[1]; 1169 if (parts["style"] != undefined && parts["style"].match(/flashvars:\s?(.*?);/)) { 1170 parts["flashvars"] = parts["style"].match(/flashvars:\s?(.*?);/)[1]; 1171 } 1172 } 1173 if ($(link).attr('rel').match(/\[.*\]\[([\s\S]*)\]/)) { 1174 var title = $(link).attr('rel').match(/\[.*\]\[([\s\S]*)\]/)[1]; 1175 parts["title"] = title.replace(/\n/g, '<br />'); 1176 } 1177 return parts; 1178 }, 1179 1180 // setStyles() 1181 setStyles: function(item, styles) { 1182 item.width = Lightbox.iframe_width; 1183 item.height = Lightbox.iframe_height; 1184 item.scrolling = "auto"; 1185 1186 if (!styles) return item; 1187 var stylesArray = styles.split(';'); 1188 for (var i = 0; i< stylesArray.length; i++) { 1189 if (stylesArray[i].indexOf('width:') >= 0) { 1190 var w = stylesArray[i].replace('width:', ''); 1191 item.width = jQuery.trim(w); 1192 } 1193 else if (stylesArray[i].indexOf('height:') >= 0) { 1194 var h = stylesArray[i].replace('height:', ''); 1195 item.height = jQuery.trim(h); 1196 } 1197 else if (stylesArray[i].indexOf('scrolling:') >= 0) { 1198 var scrolling = stylesArray[i].replace('scrolling:', ''); 1199 item.scrolling = jQuery.trim(scrolling); 1200 } 1201 else if (stylesArray[i].indexOf('overflow:') >= 0) { 1202 var overflow = stylesArray[i].replace('overflow:', ''); 1203 item.overflow = jQuery.trim(overflow); 1204 } 1205 } 1206 return item; 1207 }, 1208 1209 1210 // togglePlayPause() 1211 // Hide the pause / play button as appropriate. If pausing the slideshow also 1212 // clear the timers, otherwise move onto the next image. 1213 togglePlayPause: function(hideId, showId) { 1214 if (Lightbox.isSlideshow && hideId == "lightshowPause") { 1215 for (var i = 0; i < Lightbox.slideIdCount; i++) { 1216 window.clearTimeout(Lightbox.slideIdArray[i]); 1217 } 1218 } 1219 $('#' + hideId).hide(); 1220 $('#' + showId).show(); 1221 1222 if (hideId == "lightshowPlay") { 1223 Lightbox.isPaused = false;
1224 if (!Lightbox.loopSlides && Lightbox.activeImage == (Lightbox.total - 1)) { 1225 Lightbox.end(); 1226 } 1227 else if (Lightbox.total > 1) { 1228 Lightbox.changeData(Lightbox.activeImage + 1); 1229 } 1230 } 1231 else { 1232 Lightbox.isPaused = true; 1233 } 1234 }, 1235 1236 triggerLightbox: function (rel_type, rel_group) { 1237 if (rel_type.length) { 1238 if (rel_group && rel_group.length) { 1239 $("a[rel^='" + rel_type +"\[" + rel_group + "\]'], area[rel^='" + rel_type +"\[" + rel_group + "\]']").eq(0).trigger("click"); 1240 } 1241 else { 1242 $("a[rel^='" + rel_type +"'], area[rel^='" + rel_type +"']").eq(0).trigger("click"); 1243 } 1244 } 1245 }, 1246 1247 detectMacFF2: function() { 1248 var ua = navigator.userAgent.toLowerCase(); 1249 if (/firefox[\/\s](\d+\.\d+)/.test(ua)) { 1250 var ffversion = new Number(RegExp.$1); 1251 if (ffversion < 3 && ua.indexOf('mac') != -1) { 1252 return true; 1253 } 1254 } 1255 return false; 1256 }, 1257 1258 checkKey: function(keys, key, code) { 1259 return (jQuery.inArray(key, keys) != -1 || jQuery.inArray(String(code), keys) != -1); 1260 }, 1261 1262 filterXSS: function(str, allowed_tags) { 1263 var output = ""; 1264 var prefix = Drupal.settings.pathPrefix; 1265 if (!prefix) prefix = ''; 1266 $.ajax({ 1267 url: Drupal.settings.basePath + prefix + '?q=system/lightbox2/filter-xss', 1268 data: { 1269 'string' : str, 1270 'allowed_tags' : allowed_tags 1271 }, 1272 type: "POST", 1273 async: false, 1274 dataType: "json", 1275 success: function(data) { 1276 output = data; 1277 } 1278 }); 1279 return output; 1280 } 1281 1282}; 1283 1284// Initialize the lightbox. 1285Drupal.behaviors.initLightbox = { 1286 attach: function(context) { 1287 1288 $('body:not(.lightbox-processed)', context).addClass('lightbox-processed').each(function() { 1289 Lightbox.initialize(); 1290 return false; // Break the each loop. 1291 }); 1292 1293 // Attach lightbox to any links with lightbox rels. 1294 Lightbox.initList(context); 1295 $('#lightboxAutoModal', context).triggerHandler('click'); 1296 } 1297}; 1298})(jQuery); 1299; 1300/* 1301 * jQuery FlexSlider v2.6.4 1302 * Copyright 2012 WooThemes 1303 * Contributing Author: Tyler Smith 1304 */!function($){var e=!0;$.flexslider=function(t,a){var n=$(t);n.vars=$.extend({},$.flexslider.defaults,a);var i=n.vars.namespace,r=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,s=("ontouchstart"in window||r||window.DocumentTouch&&document instanceof DocumentTouch)&&n.vars.touch,o="click touchend MSPointerUp keyup",l="",c,d="vertical"===n.vars.direction,u=n.vars.reverse,v=n.vars.itemWidth>0,p="fade"===n.vars.animation,m=""!==n.vars.asNavFor,f={};$.data(t,"flexslider",n),f={init:function(){n.animating=!1,n.currentSlide=parseInt(n.vars.startAt?n.vars.startAt:0,10),isNaN(n.currentSlide)&&(n.currentSlide=0),n.animatingTo=n.currentSlide,n.atEnd=0===n.currentSlide||n.currentSlide===n.last,n.containerSelector=n.vars.selector.substr(0,n.vars.selector.search(" ")),n.slides=$(n.vars.selector,n),n.container=$(n.containerSelector,n),n.count=n.slides.length,n.syncExists=$(n.vars.sync).length>0,"slide"===n.vars.animation&&(n.vars.animation="swing"),n.prop=d?"top":"marginLeft",n.args={},n.manualPause=!1,n.stopped=!1,n.started=!1,n.startTimeout=null,n.transitions=!n.vars.video&&!p&&n.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var a in t)if(void 0!==e.style[t[a]])return n.pfx=t[a].replace("Perspective","").toLowerCase(),n.prop="-"+n.pfx+"-transform",!0;return!1}(),n.ensureAnimationEnd="",""!==n.vars.controlsContainer&&(n.controlsContainer=$(n.vars.c
1304ontrolsContainer).length>0&&$(n.vars.controlsContainer)),""!==n.vars.manualControls&&(n.manualControls=$(n.vars.manualControls).length>0&&$(n.vars.manualControls)),""!==n.vars.customDirectionNav&&(n.customDirectionNav=2===$(n.vars.customDirectionNav).length&&$(n.vars.customDirectionNav)),n.vars.randomize&&(n.slides.sort(function(){return Math.round(Math.random())-.5}),n.container.empty().append(n.slides)),n.doMath(),n.setup("init"),n.vars.controlNav&&f.controlNav.setup(),n.vars.directionNav&&f.directionNav.setup(),n.vars.keyboard&&(1===$(n.containerSelector).length||n.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!n.animating&&(39===t||37===t)){var a=39===t?n.getTarget("next"):37===t&&n.getTarget("prev");n.flexAnimate(a,n.vars.pauseOnAction)}}),n.vars.mousewheel&&n.bind("mousewheel",function(e,t,a,i){e.preventDefault();var r=t<0?n.getTarget("next"):n.getTarget("prev");n.flexAnimate(r,n.vars.pauseOnAction)}),n.vars.pausePlay&&f.pausePlay.setup(),n.vars.slideshow&&n.vars.pauseInvisible&&f.pauseInvisible.init(),n.vars.slideshow&&(n.vars.pauseOnHover&&n.hover(function(){n.manualPlay||n.manualPause||n.pause()},function(){n.manualPause||n.manualPlay||n.stopped||n.play()}),n.vars.pauseInvisible&&f.pauseInvisible.isHidden()||(n.vars.initDelay>0?n.startTimeout=setTimeout(n.play,n.vars.initDelay):n.play())),m&&f.asNav.setup(),s&&n.vars.touch&&f.touch(),(!p||p&&n.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",f.resize()),n.find("img").attr("draggable","false"),setTimeout(function(){n.vars.start(n)},200)},asNav:{setup:function(){n.asNav=!0,n.animatingTo=Math.floor(n.currentSlide/n.move),n.currentItem=n.currentSlide,n.slides.removeClass(i+"active-slide").eq(n.currentItem).addClass(i+"active-slide"),r?(t._slider=n,n.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),a=t.index();$(n.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(n.direction=n.currentItem<a?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction,!1,!0,!0))})})):n.slides.on(o,function(e){e.preventDefault();var t=$(this),a=t.index();t.offset().left-$(n).scrollLeft()<=0&&t.hasClass(i+"active-slide")?n.flexAnimate(n.getTarget("prev"),!0):$(n.vars.asNavFor).data("flexslider").animating||t.hasClass(i+"active-slide")||(n.direction=n.currentItem<a?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){n.manualControls?f.controlNav.setupManual():f.controlNav.setupPaging()},setupPaging:function(){var e="thumbnails"===n.vars.controlNav?"control-thumbs":"control-paging",t=1,a,r;if(n.controlNavScaffold=$('<ol class="'+i+"control-nav "+i+e+'"></ol>'),n.pagingCount>1)for(var s=0;s<n.pagingCount;s++){r=n.slides.eq(s),void 0===r.attr("data-thumb-alt")&&r.attr("data-thumb-alt","");var c=""!==r.attr("data-thumb-alt")?c=' alt="'+r.attr("data-thumb-alt")+'"':"";if(a="thumbnails"===n.vars.controlNav?'<img src="'+r.attr("data-thumb")+'"'+c+"/>":'<a href="#">'+t+"</a>","thumbnails"===n.vars.controlNav&&!0===n.vars.thumbCaptions){var d=r.attr("data-thumbcaption");""!==d&&void 0!==d&&(a+='<span class="'+i+'caption">'+d+"</span>")}n.controlNavScaffold.append("<li>"+a+"</li>"
vendor: 3,413 bytes, line 1304
1304),t++}n.controlsContainer?$(n.controlsContainer).append(n.controlNavScaffold):n.append(n.controlNavScaffold),f.controlNav.set(),f.controlNav.active(),n.controlNavScaffold.delegate("a, img",o,function(e){if(e.preventDefault(),""===l||l===e.type){var t=$(this),a=n.controlNav.index(t);t.hasClass(i+"active")||(n.direction=a>n.currentSlide?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction))}""===l&&(l=e.type),f.setToClearWatchedEvent()})},setupManual:function(){n.controlNav=n.manualControls,f.controlNav.active(),n.controlNav.bind(o,function(e){if(e.preventDefault(),""===l||l===e.type){var t=$(this),a=n.controlNav.index(t);t.hasClass(i+"active")||(a>n.currentSlide?n.direction="next":n.direction="prev",n.flexAnimate(a,n.vars.pauseOnAction))}""===l&&(l=e.type),f.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===n.vars.controlNav?"img":"a";n.controlNav=$("."+i+"control-nav li "+e,n.controlsContainer?n.controlsContainer:n)},active:function(){n.controlNav.removeClass(i+"active").eq(n.animatingTo).addClass(i+"active")},update:function(e,t){n.pagingCount>1&&"add"===e?n.controlNavScaffold.append($('<li><a href="#">'+n.count+"</a></li>")):1===n.pagingCount?n.controlNavScaffold.find("li").remove():n.controlNav.eq(t).closest("li").remove(),f.controlNav.set(),n.pagingCount>1&&n.pagingCount!==n.controlNav.length?n.update(t,e):f.controlNav.active()}},directionNav:{setup:function(){var e=$('<ul class="'+i+'direction-nav"><li class="'+i+'nav-prev"><a class="'+i+'prev" href="#">'+n.vars.prevText+'</a></li><li class="'+i+'nav-next"><a class="'+i+'next" href="#">'+n.vars.nextText+"</a></li></ul>");n.customDirectionNav?n.directionNav=n.customDirectionNav:n.controlsContainer?($(n.controlsContainer).append(e),n.directionNav=$("."+i+"direction-nav li a",n.controlsContainer)):(n.append(e),n.directionNav=$("."+i+"direction-nav li a",n)),f.directionNav.update(),n.directionNav.bind(o,function(e){e.preventDefault();var t;""!==l&&l!==e.type||(t=$(this).hasClass(i+"next")?n.getTarget("next"):n.getTarget("prev"),n.flexAnimate(t,n.vars.pauseOnAction)),""===l&&(l=e.type),f.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";1===n.pagingCount?n.directionNav.addClass(e).attr("tabindex","-1"):n.vars.animationLoop?n.directionNav.removeClass(e).removeAttr("tabindex"):0===n.animatingTo?n.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):n.animatingTo===n.last?n.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):n.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('<div class="'+i+'pauseplay"><a href="#"></a></div>');n.controlsContainer?(n.controlsContainer.append(e),n.pausePlay=$("."+i+"pauseplay a",n.controlsContainer)):(n.append(e),n.pausePlay=$("."+i+"pauseplay a",n)),f.pausePlay.update(n.vars.slideshow?i+"pause":i+"play"),n.pausePlay.bind(o,function(e){e.preventDefault(),""!==l&&l!==e.type||($(this).hasClass(i+"pause")?(n.manualPause=!0,n.manualPlay=!1,n.pause()):(n.manualPause=!1,n.manualPlay=!0,n.play())),""===l&&(l=e.type),f.setToClearWatchedEvent()})},update:function(e){"play"===e?n.pausePlay.removeClass(i+"pause").addClass(i+"play").html(n.vars.playText):n.pausePlay.removeClass(i+"play").addClass(i+"pause").html(n.vars.pauseText)}},touch:function(){function e(e){e.stopPropagation(),n.animating?e.preventDefault():(n.pause(),t._gesture.addPointer(e.pointerId),
vendor: 2,348 bytes, line 1304
1304T=0,c=d?n.h:n.w,f=Number(new Date),l=v&&u&&n.animatingTo===n.last?0:v&&u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:v&&n.currentSlide===n.last?n.limit:v?(n.itemW+n.vars.itemMargin)*n.move*n.currentSlide:u?(n.last-n.currentSlide+n.cloneOffset)*c:(n.currentSlide+n.cloneOffset)*c)}function a(e){e.stopPropagation();var a=e.target._slider;if(a){var n=-e.translationX,i=-e.translationY;if(T+=d?i:n,m=T,y=d?Math.abs(T)<Math.abs(-n):Math.abs(T)<Math.abs(-i),e.detail===e.MSGESTURE_FLAG_INERTIA)return void setImmediate(function(){t._gesture.stop()});(!y||Number(new Date)-f>500)&&(e.preventDefault(),!p&&a.transitions&&(a.vars.animationLoop||(m=T/(0===a.currentSlide&&T<0||a.currentSlide===a.last&&T>0?Math.abs(T)/c+2:1)),a.setProps(l+m,"setTouch")))}}function i(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!y&&null!==m){var a=u?-m:m,n=a>0?t.getTarget("next"):t.getTarget("prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?t.flexAnimate(n,t.vars.pauseOnAction):p||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}s=null,o=null,m=null,l=null,T=0}}var s,o,l,c,m,f,g,h,S,y=!1,x=0,b=0,T=0;r?(t.style.msTouchAction="none",t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener("MSPointerDown",e,!1),t._slider=n,t.addEventListener("MSGestureChange",a,!1),t.addEventListener("MSGestureEnd",i,!1)):(g=function(e){n.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(n.pause(),c=d?n.h:n.w,f=Number(new Date),x=e.touches[0].pageX,b=e.touches[0].pageY,l=v&&u&&n.animatingTo===n.last?0:v&&u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:v&&n.currentSlide===n.last?n.limit:v?(n.itemW+n.vars.itemMargin)*n.move*n.currentSlide:u?(n.last-n.currentSlide+n.cloneOffset)*c:(n.currentSlide+n.cloneOffset)*c,s=d?b:x,o=d?x:b,t.addEventListener("touchmove",h,!1),t.addEventListener("touchend",S,!1))},h=function(e){x=e.touches[0].pageX,b=e.touches[0].pageY,m=d?s-b:s-x,y=d?Math.abs(m)<Math.abs(x-o):Math.abs(m)<Math.abs(b-o);var t=500;(!y||Number(new Date)-f>500)&&(e.preventDefault(),!p&&n.transitions&&(n.vars.animationLoop||(m/=0===n.currentSlide&&m<0||n.currentSlide===n.last&&m>0?Math.abs(m)/c+2:1),n.setProps(l+m,"setTouch")))},S=function(e){if(t.removeEventListener("touchmove",h,!1),n.animatingTo===n.currentSlide&&!y
vendor: 5,672 bytes, line 1304
1304&&null!==m){var a=u?-m:m,i=a>0?n.getTarget("next"):n.getTarget("prev");n.canAdvance(i)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?n.flexAnimate(i,n.vars.pauseOnAction):p||n.flexAnimate(n.currentSlide,n.vars.pauseOnAction,!0)}t.removeEventListener("touchend",S,!1),s=null,o=null,m=null,l=null},t.addEventListener("touchstart",g,!1))},resize:function(){!n.animating&&n.is(":visible")&&(v||n.doMath(),p?f.smoothHeight():v?(n.slides.width(n.computedW),n.update(n.pagingCount),n.setProps()):d?(n.viewport.height(n.h),n.setProps(n.h,"setTotal")):(n.vars.smoothHeight&&f.smoothHeight(),n.newSlides.width(n.computedW),n.setProps(n.computedW,"setTotal")))},smoothHeight:function(e){if(!d||p){var t=p?n:n.viewport;e?t.animate({height:n.slides.eq(n.animatingTo).innerHeight()},e):t.innerHeight(n.slides.eq(n.animatingTo).innerHeight())}},sync:function(e){var t=$(n.vars.sync).data("flexslider"),a=n.animatingTo;switch(e){case"animate":t.flexAnimate(a,n.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause();break}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=f.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){f.pauseInvisible.isHidden()?n.startTimeout?clearTimeout(n.startTimeout):n.pause():n.started?n.play():n.vars.initDelay>0?setTimeout(n.play,n.vars.initDelay):n.play()})}},isHidden:function(){var e=f.pauseInvisible.getHiddenProp();return!!e&&document[e]},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}},setToClearWatchedEvent:function(){clearTimeout(c),c=setTimeout(function(){l=""},3e3)}},n.flexAnimate=function(e,t,a,r,o){if(n.vars.animationLoop||e===n.currentSlide||(n.direction=e>n.currentSlide?"next":"prev"),m&&1===n.pagingCount&&(n.direction=n.currentItem<e?"next":"prev"),!n.animating&&(n.canAdvance(e,o)||a)&&n.is(":visible")){if(m&&r){var l=$(n.vars.asNavFor).data("flexslider");if(n.atEnd=0===e||e===n.count-1,l.flexAnimate(e,!0,!1,!0,o),n.direction=n.currentItem<e?"next":"prev",l.direction=n.direction,Math.ceil((e+1)/n.visible)-1===n.currentSlide||0===e)return n.currentItem=e,n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),!1;n.currentItem=e,n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),e=Math.floor(e/n.visible)}if(n.animating=!0,n.animatingTo=e,t&&n.pause(),n.vars.before(n),n.syncExists&&!o&&f.sync("animate"),n.vars.controlNav&&f.controlNav.active(),v||n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),n.atEnd=0===e||e===n.last,n.vars.directionNav&&f.directionNav.update(),e===n.last&&(n.vars.end(n),n.vars.animationLoop||n.pause()),p)s?(n.slides.eq(n.currentSlide).css({opacity:0,zIndex:1}),n.slides.eq(e).css({opacity:1,zIndex:2}),n.wrapup(c)):(n.slides.eq(n.currentSlide).css({zIndex:1}).animate({opacity:0},n.vars.animationSpeed,n.vars.easing),n.slides.eq(e).css({zIndex:2}).animate({opacity:1},n.vars.animationSpeed,n.vars.easing,n.wrapup));else{var c=d?n.slides.filter(":first").height():n.computedW,g,h,S;v?(g=n.vars.itemMargin,S=(n.itemW+g)*n.move*n.animatingTo,h=S>n.limit&&1!==n.visible?n.limit:S):h=0===n.currentSlide&&e===n.count-1&&n.vars.animationLoop&&"next"!==n.direction?u?(n.count+n.cloneOffset)*c:0:n.currentSlide===n.last&&0===e&&n.vars.animationLoop&&"prev"!==n.direction?u?0:(n.count+1)*c:u?(n.count-1-e+n.cloneOffset)*c:(e+n.cloneOffset)*c,n.setProps(h,"",n.vars.animationSpeed),n.transitions?(n.vars.animationLoop&&n.atEnd||(n.animating=!1,n.currentSlide=n.animatingTo),n.container.unbind("webkitTransitionEnd transitionend"),n.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(n.ensureAnimationEnd),n.wrapup(c)}),clearTimeout(n.ensureAnimationEnd),n.ensureAnimationEnd=setTimeout(function(){n.wrapup(c)},n.vars.animationSpeed+100)):n.container.animate(n.args,n.vars.animationSpeed,n.vars.easing,function(){n.wrapup(c)})}n.vars.smoothHeight&&f.smoothHeight(n.vars.animationSpeed)}},n.wrapup=function(e){p||v||(0===n.currentSlide&&n.animatingTo===n.last&&n.vars.animationLoop?n.setProps(e,"jumpEnd"):n.currentSlide===n.last&&0===n.animatingTo&&n.vars.animationLoop&&n.setProps(e,"jumpStart")),n.animating=!1,n.currentSlide=n.animatingTo,n.vars.after(n)},n.animateSlides=function(){!n.animating&&e&&n.flexAnimate(n.getTarget("next"))},n.pause=function(){clearInterval(n.animatedSlides),n.animatedSlides=null,n.playing=!1,n.vars.pausePlay&&f.pausePlay.update("play"),n.syncExists&&f.sync("pause")},n.play=function(){n.playing&&clearInterval(n.animatedSlides),n.animatedSlides=n.animatedSlides||setInterval(n.animateSlides,n.vars.slideshowSpeed),n.started=n.playing=!0,n.vars.pausePlay&&f.pausePlay.update("pause"),n.syncExists&&f.sync("play")},n.stop=function(){n.pause(),n.stopped=!0},n.canAdvance=function(e,t){var a=m?n.pagingCount-1:n.last;return!!t||(!(!m||n.currentItem!==n.count-1||0!==e||"prev"!==n.direction)||(!m||0!==n.currentItem||e!==n.pagingCount-1||"next"===n.direction)&&(!(e===n.currentSlide&&!m)&&(!!n.vars.animationLoop||(!n.atEnd||0!==n.currentSlide||e!==a||"next"===n.direction)&&(!n.atEnd||n.currentSlide!==a||0!==e||"next"!==n.direction))))},n.getTarget=function(e){return n.direction=e,"next"===e?n.currentSlide===n.last?0:n.currentSlide+1:0===n.currentSlide?n.last:n.currentSlide-1},n.setProps=function(e,t,a){var i=function(){var a=e||(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo;return
vendor: 2,176 bytes, line 1304
1304-1*function(){if(v)return"setTouch"===t?e:u&&n.animatingTo===n.last?0:u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:n.animatingTo===n.last?n.limit:a;switch(t){case"setTotal":return u?(n.count-1-n.currentSlide+n.cloneOffset)*e:(n.currentSlide+n.cloneOffset)*e;case"setTouch":return e;case"jumpEnd":return u?e:n.count*e;case"jumpStart":return u?n.count*e:e;default:return e}}()+"px"}();n.transitions&&(i=d?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)",a=void 0!==a?a/1e3+"s":"0s",n.container.css("-"+n.pfx+"-transition-duration",a),n.container.css("transition-duration",a)),n.args[n.prop]=i,(n.transitions||void 0===a)&&n.container.css(n.args),n.container.css("transform",i)},n.setup=function(e){if(p)n.slides.css({width:"100%",float:"left",marginRight:"-100%",position:"relative"}),"init"===e&&(s?n.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+n.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(n.currentSlide).css({opacity:1,zIndex:2}):0==n.vars.fadeFirstSlide?n.slides.css({opacity:0,display:"block",zIndex:1}).eq(n.currentSlide).css({zIndex:2}).css({opacity:1}):n.slides.css({opacity:0,display:"block",zIndex:1}).eq(n.currentSlide).css({zIndex:2}).animate({opacity:1},n.vars.animationSpeed,n.vars.easing)),n.vars.smoothHeight&&f.smoothHeight();else{var t,a;"init"===e&&(n.viewport=$('<div class="'+i+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(n).append(n.container),n.cloneCount=0,n.cloneOffset=0,u&&(a=$.makeArray(n.slides).reverse(),n.slides=$(a),n.container.empty().append(n.slides))),n.vars.animationLoop&&!v&&(n.cloneCount=2,n.cloneOffset=1,"init"!==e&&n.container.find(".clone").remove(),n.container.append(f.uniqueID(n.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(f.uniqueID(n.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),n.newSlides=$(n.vars.selector,n),t=u?n.count-1-n.currentSlide+n.cloneOffset:n.currentSlide+n.cloneOffset,d&&!v?(n.container.height(200*(n.count+n.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){n.newSlides.css({display:"block"}),n.doMath(),n.viewport.height(n.h),n.setProps(t*n.h,"init")}
1304,"init"===e?100:0)):(n.container.width(200*(n.count+n.cloneCount)+"%"),n.setProps(t*n.computedW,"init"),setTimeout(function(){n.doMath(),n.newSlides.css({width:n.computedW,marginRight:n.computedM,float:"left",display:"block"}),n.vars.smoothHeight&&f.smoothHeight()},"init"===e?100:0))}v||n.slides.removeClass(i+"active-slide").eq(n.currentSlide).addClass(i+"active-slide"),n.vars.init(n)},n.doMath=function(){var e=n.slides.first(),t=n.vars.itemMargin,a=n.vars.minItems,i=n.vars.maxItems;n.w=void 0===n.viewport?n.width():n.viewport.width(),n.h=e.height(),n.boxPadding=e.outerWidth()-e.width(),v?(n.itemT=n.vars.itemWidth+t,n.itemM=t,n.minW=a?a*n.itemT:n.w,n.maxW=i?i*n.itemT-t:n.w,n.itemW=n.minW>n.w?(n.w-t*(a-1))/a:n.maxW<n.w?(n.w-t*(i-1))/i:n.vars.itemWidth>n.w?n.w:n.vars.itemWidth,n.visible=Math.floor(n.w/n.itemW),n.move=n.vars.move>0&&n.vars.move<n.visible?n.vars.move:n.visible,n.pagingCount=Math.ceil((n.count-n.visible)/n.move+1),n.last=n.pagingCount-1,n.limit=1===n.pagingCount?0:n.vars.itemWidth>n.w?n.itemW*(n.count-1)+t*(n.count-1):(n.itemW+t)*n.count-n.w-t):(n.itemW=n.w,n.itemM=t,n.pagingCount=n.count,n.last=n.count-1),n.computedW=n.itemW-n.boxPadding,n.computedM=n.itemM},n.update=function(e,t){n.doMath(),v||(e<n.currentSlide?n.currentSlide+=1:e<=n.currentSlide&&0!==e&&(n.currentSlide-=1),n.animatingTo=n.currentSlide),n.vars.controlNav&&!n.manualControls&&("add"===t&&!v||n.pagingCount>n.controlNav.length?f.controlNav.update("add"):("remove"===t&&!v||n.pagingCount<n.controlNav.length)&&(v&&n.currentSlide>n.last&&(n.currentSlide-=1,n.animatingTo-=1),f.controlNav.update("remove",n.last))),n.vars.directionNav&&f.directionNav.update()},n.addSlide=function(e,t){var a=$(e);n.count+=1,n.last=n.count-1,d&&u?void 0!==t?n.slides.eq(n.count-t).after(a):n.container.prepend(a):void 0!==t?n.slides.eq(t).before(a):n.container.append(a),n.update(t,"add"),n.slides=$(n.vars.selector+":not(.clone)",n),n.setup(),n.vars.added(n)},n.removeSlide=function(e){var t=isNaN(e)?n.slides.index($(e)):e;n.count-=1,n.last=n.count-1,isNaN(e)?$(e,n.slides).remove():d&&u?n.slides.eq(n.last).remove():n.slides.eq(e).remove(),n.doMath(),n.update(t,"remove"),n.slides=$(n.vars.selector+":not(.clone)",n),n.setup(),n.vars.removed(n)},f.init()},$(window).blur(function(t){e=!1}).focus(function(t){e=!0}),$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&!1===e.allowOneSlide||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery);; 1305(function ($) { 1306 // @todo convert to use Drupal.behaviors 1307 // @todo add configuration options 1308 1309 // Register callback to save references to flexslider instances. Allows 1310 // Views Slideshow controls to affect the slider 1311 function flexslider_views_slideshow_register(fullId, slider) { 1312 Drupal.flexsliderViewsSlideshow.active = Drupal.flexsliderViewsSlideshow.active || {}; 1313 Drupal.flexsliderViewsSlideshow.active[fullId] = slider; 1314 } 1315 1316 Drupal.behaviors.flexsliderViewsSlideshow = { 1317 attach: function (context) { 1318 $('.flexslider_views_slideshow_main:not(.flexslider_views_slideshow-processed)', context).addClass('flexslider_views_slideshow-processed').each(function() { 1319 // Get the ID of the slideshow 1320 var fullId = '#' + $(this).attr('id'); 1321 1322 // Create settings container 1323 var settings = Drupal.settings.flexslider_views_slideshow[fullId]; 1324 1325 //console.log(settings); 1326 1327 if ($(settings.selector, this).length < 2) { 1328 // Remove pause button if slides are less then two. 1329 settings.pausePlay = false;
1330 } 1331 1332 // @todo map the settings from the form to their javascript equivalents 1333 settings.targetId = fullId; 1334 1335 settings.loaded = false; 1336 1337 // Assign default settings 1338 settings.opts = { 1339 animation:settings.animation, 1340 slideDirection:settings.slideDirection, 1341 slideshow:settings.slideshow, 1342 slideshowSpeed:settings.slideshowSpeed, 1343 animationDuration:settings.animationDuration, 1344 directionNav:settings.directionNav, 1345 controlNav:settings.controlNav, 1346 keyboardNav:settings.keyboardNav, 1347 mousewheel:settings.mousewheel, 1348 prevText:settings.prevText, 1349 nextText:settings.nextText, 1350 pausePlay:settings.pausePlay, 1351 pauseText:settings.pauseText, 1352 playText:settings.playText, 1353 randomize:settings.randomize, 1354 slideToStart:settings.slideToStart, 1355 animationLoop:settings.animationLoop, 1356 pauseOnAction:settings.pauseOnAction, 1357 pauseOnHover:settings.pauseOnHover, 1358 controlsContainer:settings.controlsContainer, 1359 manualControls:settings.manualControls, 1360 start: function(slider) { 1361 flexslider_views_slideshow_register(fullId, slider); 1362 } 1363 }; 1364 1365 Drupal.flexsliderViewsSlideshow.load(fullId); 1366 }); 1367 } 1368 }; 1369 1370 1371 // Initialize the flexslider object 1372 Drupal.flexsliderViewsSlideshow = Drupal.flexsliderViewsSlideshow || {}; 1373 1374 // Load mapping from Views Slideshow to FlexSlider 1375 Drupal.flexsliderViewsSlideshow.load = function(fullId) { 1376 var settings = Drupal.settings.flexslider_views_slideshow[fullId]; 1377 1378 // Ensure the slider isn't already loaded 1379 if (!settings.loaded) { 1380 $(settings.targetId + " .flexslider").flexslider(settings.opts); 1381 settings.loaded = true; 1382 } 1383 } 1384 1385 // Pause mapping from Views Slideshow to FlexSlider 1386 Drupal.flexsliderViewsSlideshow.pause = function (options) { 1387 if($('#flexslider_views_slideshow_main_' + options.slideshowID).length > 0){ 1388 Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].pause(); 1389 Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].manualPause = true; 1390 } 1391 } 1392 1393 // Play mapping from Views Slideshow to FlexSlider 1394 Drupal.flexsliderViewsSlideshow.play = function (options) { 1395 if($('#flexslider_views_slideshow_main_' + options.slideshowID).length > 0){ 1396 console.log(Drupal.flexsliderViewsSlideshow); 1397 Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].resume(); 1398 Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].manualPause = false; 1399 } 1400 } 1401 1402 Drupal.flexsliderViewsSlideshow.nextSlide = function (options) { 1403 if($('#flexslider_views_slideshow_main_' + options.slideshowID).length > 0){ 1404 var target = Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].getTarget('next'); 1405 1406 if (Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].canAdvance(target)) { 1407 Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].flexAnimate(target, Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].vars.pauseOnAction); 1408 } 1409 } 1410 } 1411 Drupal.flexsliderViewsSlideshow.previousSlide = function (options) { 1412 if($('#flexslider_views_slideshow_main_' + options.slideshowID).length > 0){ 1413 var target = Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].getTarget('prev'); 1414 1415 if (Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].canAdvance(target)) { 1416 Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].flexAnimate(target, Drupal.flexsliderViewsSlideshow.active['#flexslider_views_slideshow_main_' + options.slideshowID].vars.pauseOnAction); 1417 } 1418 } 1419 } 1420 // @todo add support for jquery mobile page init 1421})(jQuery);; 1422(function ($) { 1423 1424Drupal.googleanalytics = {}; 1425 1426$(document).ready(function() { 1427 1428 // Attach mousedown, keyup, touchstart events to document only and catch 1429 // clicks on all elements. 1430 $(document.body).bind("mousedown keyup touchstart", function(event) { 1431 1432 // Catch the closest surrounding link of a clicked element. 1433 $(event.target).closest("a,area").each(function() { 1434 1435 // Is the clicked URL internal? 1436 if (Drupal.googleanalytics.isInternal(this.href)) { 1437 // Skip 'click' tracking, if custom tracking events are bound. 1438 if ($(this).is('.colorbox') && (Drupal.settings.googleanalytics.trackColorbox)) {
1439 // Do nothing here. The custom event will handle all tracking. 1440 //console.info("Click on .colorbox item has been detected."); 1441 } 1442 // Is download tracking activated and the file extension configured for download tracking? 1443 else if (Drupal.settings.googleanalytics.trackDownload && Drupal.googleanalytics.isDownload(this.href)) { 1444 // Download link clicked. 1445 gtag('event', Drupal.googleanalytics.getDownloadExtension(this.href).toUpperCase(), { 1446 event_category: 'Downloads', 1447 event_label: Drupal.googleanalytics.getPageUrl(this.href), 1448 transport_type: 'beacon' 1449 }); 1450 } 1451 else if (Drupal.googleanalytics.isInternalSpecial(this.href)) { 1452 // Keep the internal URL for Google Analytics website overlay intact. 1453 // @todo: May require tracking ID 1454 gtag('config', drupalSettings.google_analytics.account, { 1455 page_path: Drupal.googleanalytics.getPageUrl(this.href), 1456 transport_type: 'beacon' 1457 }); 1458 } 1459 } 1460 else { 1461 if (Drupal.settings.googleanalytics.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) { 1462 // Mailto link clicked. 1463 gtag('event', 'Click', { 1464 event_category: 'Mails', 1465 event_label: this.href.substring(7), 1466 transport_type: 'beacon' 1467 }); 1468 } 1469 else if (Drupal.settings.googleanalytics.trackOutbound && this.href.match(/^\w+:\/\//i)) { 1470 if (Drupal.settings.googleanalytics.trackDomainMode !== 2 || (Drupal.settings.googleanalytics.trackDomainMode === 2 && !Drupal.googleanalytics.isCrossDomain(this.hostname, Drupal.settings.googleanalytics.trackCrossDomains))) { 1471 // External link clicked / No top-level cross domain clicked. 1472 gtag('event', 'Click', { 1473 event_category: 'Outbound links', 1474 event_label: this.href, 1475 transport_type: 'beacon' 1476 }); 1477 } 1478 } 1479 } 1480 }); 1481 }); 1482 1483 // Track hash changes as unique pageviews, if this option has been enabled. 1484 if (Drupal.settings.googleanalytics.trackUrlFragments) { 1485 window.onhashchange = function() { 1486 gtag('config', drupalSettings.google_analytics.account, { 1487 page_path: location.pathname + location.search + location.hash 1488 }); 1489 }; 1490 } 1491 1492 // Colorbox: This event triggers when the transition has completed and the 1493 // newly loaded content has been revealed. 1494 if (Drupal.settings.googleanalytics.trackColorbox) { 1495 $(document).bind("cbox_complete", function () { 1496 var href = $.colorbox.element().attr("href"); 1497 if (href) { 1498 gtag('config', drupalSettings.google_analytics.account, { 1499 page_path: Drupal.googleanalytics.getPageUrl(href) 1500 }); 1501 } 1502 }); 1503 } 1504 1505}); 1506 1507/** 1508 * Check whether the hostname is part of the cross domains or not. 1509 * 1510 * @param string hostname 1511 * The hostname of the clicked URL. 1512 * @param array crossDomains 1513 * All cross domain hostnames as JS array. 1514 * 1515 * @return boolean 1516 */ 1517Drupal.googleanalytics.isCrossDomain = function (hostname, crossDomains) { 1518 /** 1519 * jQuery < 1.6.3 bug: $.inArray crushes IE6 and Chrome if second argument is 1520 * `null` or `undefined`, https://bugs.jquery.com/ticket/10076, 1521 * https://github.com/jquery/jquery/commit/a839af034db2bd934e4d4fa6758a3fed8de74174 1522 * 1523 * @todo: Remove/Refactor in D8 1524 */ 1525 if (!crossDomains) { 1526 return false; 1527 } 1528 else { 1529 return $.inArray(hostname, crossDomains) > -1 ? true : false; 1530 } 1531}; 1532 1533/** 1534 * Check whether this is a download URL or not. 1535 * 1536 * @param string url 1537 * The web url to check. 1538 * 1539 * @return boolean 1540 */ 1541Drupal.googleanalytics.isDownload = function (url) { 1542 var isDownload = new RegExp("\\.(" + Drupal.settings.googleanalytics.trackDownloadExtensions + ")([\?#].*)?$", "i"); 1543 return isDownload.test(url); 1544}; 1545 1546/** 1547 * Check whether this is an absolute internal URL or not. 1548 * 1549 * @param string url 1550 * The web url to check. 1551 * 1552 * @return boolean 1553 */ 1554Drupal.googleanalytics.isInternal = function (url) { 1555 var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i"); 1556 return isInternal.test(url); 1557}; 1558 1559/** 1560 * Check whether this is a special URL or not. 1561 * 1562 * URL types: 1563 * - gotwo.module /go/* links. 1564 * 1565 * @param string url 1566 * The web url to check. 1567 * 1568 * @return boolean 1569 */ 1570Drupal.googleanalytics.isInternalSpecial = function (url) { 1571 var isInternalSpecial = new RegExp("(\/go\/.*)$", "i"); 1572 return isInternalSpecial.test(url); 1573}; 1574 1575/** 1576 * Extract the relative internal URL from an absolute internal URL. 1577 * 1578 * Examples: 1579 * - https://mydomain.com/node/1 -> /node/1 1580 * - https://example.com/foo/bar -> https://example.com/foo/bar 1581 * 1582 * @param string url 1583 * The web url to check. 1584 * 1585 * @return string 1586 * Internal website URL 1587 */ 1588Drupal.googleanalytics.getPageUrl = function (url) { 1589 var extractInternalUrl = new RegExp("^(https?):\/\/" + window.location.host, "i"); 1590 return url.replace(extractInternalUrl, ''); 1591}; 1592 1593/** 1594 * Extract the download file extension from the URL. 1595 * 1596 * @param string url 1597 * The web url to check. 1598 * 1599 * @return string 1600 * The file extension of the passed url. e.g. "zip", "txt" 1601 */ 1602Drupal.googleanalytics.getDownloadExtension = function (url) { 1603 var extractDownloadextension = new RegExp("\\.(" + Drupal.settings.googleanalytics.trackDownloadExtensions + ")([\?#].*)?$", "i"); 1604 var extension = extractDownloadextension.exec(url); 1605 return (extension === null) ? '' : extension[1]; 1606}; 1607 1608})(jQuery); 1609;
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.