PageSourceSearch

https://1000x1000.at/sites/default/files/js/js_YsfupOSC_P3toJSRA5p2a0j3td3p2iDVLBX8YPGzMJY.js

js 1000x1000.at collected 2026-09-28 11:06:17 UTC 86,211 bytes, 1,487 lines download raw bytes

1Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"":{"An AJAX HTTP error occurred.":"Ein AJAX-HTTP-Fehler ist aufgetreten","HTTP Result Code: !status":"HTTP-R\u00fcckgabe-Code: !status","An AJAX HTTP request terminated abnormally.":"Eine AJAX-Anfrage ist abnormal beendet worden.","Debugging information follows.":"Im Folgenden finden Sie Debugging-Informationen.","Path: !uri":"Pfad: !uri","StatusText: !statusText":"Statustext: !statusText","ResponseText: !responseText":"Antworttext: !responseText","ReadyState: !readyState":"ReadyState: !readyState","Title":"Titel","Next":"Weiter","Cancel":"Abbrechen","Disabled":"Deaktiviert","Enabled":"Aktiviert","Edit":"Bearbeiten","None":"Keine","none":"keine","Sunday":"Sonntag","Monday":"Montag","Tuesday":"Dienstag","Wednesday":"Mittwoch","Thursday":"Donnerstag","Friday":"Freitag","Saturday":"Samstag","Add":"Hinzuf\u00fcgen","Upload":"Hochladen","Configure":"Konfigurieren","All":"Alles","Done":"Fertig","1 hour":"1 Stunde","@count hours":"@count Stunden","OK":"OK","This field is required.":"Diese Angabe wird ben\u00f6tigt.","Prev":"Vor","Mon":"Mo","Tue":"Di","Wed":"Mi","Thu":"Do","Fri":"Fr","Sat":"Sa","Sun":"So","January":"Januar","February":"Februar","March":"M\u00e4rz","April":"April","May":"Mai","June":"Juni","July":"Juli","August":"August","September":"September","October":"Oktober","November":"November","December":"Dezember","Show":"Anzeigen","Select all rows in this table":"Alle Zeilen dieser Tabelle ausw\u00e4hlen","Deselect all rows in this table":"Alle Zeilen dieser Tabelle abw\u00e4hlen","Today":"Heute","Jan":"Jan","Feb":"Feb","Mar":"M\u00e4r","Apr":"Apr","Jun":"Jun","Jul":"Jul","Aug":"Aug","Sep":"Sep","Oct":"Okt","Nov":"Nov","Dec":"Dez","Su":"So","Mo":"Mo","Tu":"Di","We":"Mi","Th":"Do","Fr":"Fr","Sa":"Sa","Not published":"Nicht ver\u00f6ffentlicht","!name field is required.":"Das Feld !name ist erforderlich.","Please wait...":"Bitte warten...","Hide":"Ausblenden","Loading":"Laden","mm\/dd\/yy":"mm\/tt\/jj","Only files with the following extensions are allowed: %files-allowed.":"Nur Dateien mit folgenden Erweiterungen sind zul\u00e4ssig: %files-allowed.","By @name on @date":"Von @name am @date","By @name":"Von @name","Not in menu":"Nicht im Men\u00fc","Alias: @alias":"Alias: @alias","No alias":"Kein Alias","New revision":"Neue Version","Drag to re-order":"Ziehen um die Reihenfolge zu \u00e4ndern","Changes made in this table will not be saved until the form is submitted.":"\u00c4nderungen in dieser Tabelle werden nicht gespeichert, bis dieses Formular abgesendet wurde.","The changes to these blocks will not be saved until the \u003Cem\u003ESave blocks\u003C\/em\u003E button is clicked.":"Die \u00c4nderungen an diesen Bl\u00f6cken werden nicht gespeichert, bis auf dem \u003Cem\u003EBl\u00f6cke speichern\u003C\/em\u003E-Button geklickt wurde.","Flag translations as outdated":"\u00dcbersetzung als veraltet markieren","This permission is inherited from the authenticated user role.":"Diese Berechtigung wird von der Rolle \u201aAuthentifizierte Benutzer\u2018 ererbt.","No revision":"Keine Version","@number comments per page":"@number Kommentare pro Seite","Requires a title":"Ben\u00f6tigt einen Titel","Not restricted":"Uneingeschr\u00e4nkt","(active tab)":"(aktiver Reiter)","Not customizable":"Nicht anpassbar","Restricted to certain pages":"Auf bestimmte Seiten eingeschr\u00e4nkt","The block cannot be placed in this region.":"Der Block kann nicht in dieser Region abgelegt werden.","Customize dashboard":"Dashboard anpassen","Hide summary":"Zusammenfassung verbergen","Edit summary":"Zusammenfassung bearbeiten","Don\u0027t display post information":"Beitragsinformationen nicht anzeigen","@title dialog":"@title Dialog","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"Die ausgew\u00e4hlte Datei %filename konnte nicht gespeichert werden. Nur Dateien mit den folgenden Erweiterungen sind zul\u00e4ssig: %extensions.","Re-order rows by numerical weight instead of dragging.":"Zeilen mittels numerischer Gewichtung ordnen statt mit Drag-and-Drop","Show row weights":"Zeilenreihenfolge anzeigen","Hide row weights":"Zeilenreihenfolge ausblenden","Autocomplete popup":"Popup zur automatischen Vervollst\u00e4ndigung","Searching for matches...":"Suche \u2026","Other":"Sonstige","Submit":"Zustimmen","unlimited":"Unbegrenzt","New":"Neu","Previous":"Zur\u00fcck","Next page":"N\u00e4chste Seite","all":"Alle","Select all":"Alle au
1sw\u00e4hlen","No title":"Kein Titel","No name":"Kein Name","Remove group":"Gruppe entfernen","Saving...":"Speichern...","File browsing is disabled in directory %dir.":"Das Durchsuchen des Verzeichnisses %dir ist deaktiviert.","You can not perform this operation.":"Sie k\u00f6nnen diesen Vorgang nicht durchf\u00fchren.","Do you want to refresh the current directory?":"Soll das aktuelle Verzeichnis aktualisiert werden?","Delete selected files?":"Ausgew\u00e4hlte Dateien l\u00f6schen?","Please select a thumbnail.":"Bitte w\u00e4hlen Sie ein Miniaturbild aus.","Please specify dimensions within the allowed range that is from 1x1 to @dimensions.":"Die Abmessungen der Bilder sind nur in dem Bereich von 1x1 bis @dimensions zul\u00e4ssig.","Please select a file.":"Bitte eine Datei w\u00e4hlen.","Log messages":"Logmitteilungen","%filename is not an image.":"Die Datei %filename ist kein Bild.","You must select at least %num files.":"Sie m\u00fcssen mindestens %num Dateien ausw\u00e4hlen.","You are not allowed to operate on more than %num files.":"Sie d\u00fcrfen nicht mehr als %num Dateien gleichzeitig bearbeiten.","Close":"Schlie\u00dfen","Insert file":"Datei einf\u00fcgen","Change view":"Ansicht \u00e4ndern","1 minute":"1 Minute","@count year from now":"@count Jahr von heute an","@count years from now":"@count Jahre von heute an","Apply (all displays)":"Anwenden (alle Anzeigen)","Apply (this display)":"Anwenden (diese Anzeige)","Select":"Auswahl","Revert to default":"Auf Standardwert zur\u00fccksetzen","Insert this token into your form":"Dieses Token in Ihr Formular einf\u00fcgen","First click a text field to insert your tokens into.":"Klicken Sie zun\u00e4chst auf ein Textfeld, um Ihr Token einzuf\u00fcgen.","One domain with multiple subdomains":"Eine Domain mit mehreren Sub-Domains","Multiple top-level domains":"Mehrere Domains der obersten Ebene","All pages with exceptions":"Alle Seiten mit Ausnahmen","Excepted: @roles":"Ausgenommen: @roles","On by default with opt out":"Standardm\u00e4\u00dfig aktiv mit Opt-out","Off by default with opt in":"Standardm\u00e4\u00dfig deaktiviert mit Opt-out","Not tracked":"nicht \u00fcberwacht","@items tracked":"@items verfolgt","A single domain":"Eine einzelne Dom\u00e4ne","No privacy":"Keine Privatsph\u00e4re","@items enabled":"@items aktiviert","Inclusion: @value":"Einbeziehen: @value","Priority: @value":"Priorit\u00e4t: @value","+@count":"+@count","-@count":"-@count","Select None":"Nichts ausw\u00e4hlen","Select All":"Alles ersetzen","@count minutes":"@count Minuten","Content limited to @limit characters, remaining: \u003Cstrong\u003E@remaining\u003C\/strong\u003E":"Maximal @limit Zeichen, \u003Cstrong\u003E@remaining\u003C\/strong\u003E verbleibend","Browse file":"Datei w\u00e4hlen","Select an Option":"Option w\u00e4hlen"},"Project Facts":{"day":"Tag"}} };;
2/* $Id: lightbox.js,v 1.5.2.6.2.136 2010/09/24 08:39:40 snpower Exp $ */
3
4/**
5 * jQuery Lightbox
6 * @author
7 *   Stella Power, <http://drupal.org/user/66894>
8 *
9 * Based on Lightbox v2.03.3 by Lokesh Dhakar
10 * <http://www.huddletogether.com/projects/lightbox2/>
11 * Also partially based on the jQuery Lightbox by Warren Krewenki
12 *   <http://warren.mesozen.com>
13 *
14 * Permission has been granted to Mark Ashmead & other Drupal Lightbox2 module
15 * maintainers to distribute this file via Drupal.org
16 * Under GPL license.
17 *
18 * Slideshow, iframe and video functionality added by Stella Power.
19 */
20
21var Lightbox;
22(function($) {
23Lightbox = {
24  auto_modal : false,
25  overlayOpacity : 0.8, // Controls transparency of shadow overlay.
26  overlayColor : '000', // Controls colour of shadow overlay.
27  disableCloseClick : true,
28  // Controls the order of the lightbox resizing animation sequence.
29  resizeSequence: 0, // 0: simultaneous, 1: width then height, 2: height then width.
30  resizeSpeed: 'normal', // Controls the speed of the lightbox resizing animation.
31  fadeInSpeed: 'normal', // Controls the speed of the image appearance.
32  slideDownSpeed: 'slow', // Controls the speed of the image details appearance.
33  minWidth: 240,
34  borderSize : 10,
35  boxColor : 'fff',
36  fontColor : '000',
37  topPosition : '',
38  infoHeight: 20,
39  alternative_layout : false,
40  imageArray : [],
41  imageNum : null,
42  total : 0,
43  activeImage : null,
44  inprogress : false,
45  disableResize : false,
46  disableZoom : false,
47  isZoomedIn : false,
48  rtl : false,
49  loopItems : false,
50  keysClose : ['c', 'x', 27],
51  keysPrevious : ['p', 37],
52  keysNext : ['n', 39],
53  keysZoom : ['z'],
54  keysPlayPause : [32],
55
56  // Slideshow options.
57  slideInterval : 5000, // In milliseconds.
58  showPlayPause : true,
59  autoStart : true,
60  autoExit : true,
61  pauseOnNextClick : false, // True to pause the slideshow when the "Next" button is clicked.
62  pauseOnPrevClick : true, // True to pause the slideshow when the "Prev" button is clicked.
63  slideIdArray : [],
64  slideIdCount : 0,
65  isSlideshow : false,
66  isPaused : false,
67  loopSlides : false,
68
69  // Iframe options.
70  isLightframe : false,
71  iframe_width : 600,
72  iframe_height : 400,
73  iframe_border : 1,
74
75  // Video and modal options.
76  enableVideo : false,
77  flvPlayer : '/flvplayer.swf',
78  flvFlashvars : '',
79  isModal : false,
80  isVideo : false,
81  videoId : false,
82  modalWidth : 400,
83  modalHeight : 400,
84  modalHTML : null,
85
86
87  // initialize()
88  // Constructor runs on completion of the DOM loading.
89  // The function inserts html at the bottom of the page which is used
90  // to display the shadow overlay and the image container.
91  initialize: function() {
92
93    var s = Drupal.settings.lightbox2;
94    Lightbox.overlayOpacity = s.overlay_opacity;
95    Lightbox.overlayColor = s.overlay_color;
96    Lightbox.disableCloseClick = s.disable_close_click;
97    Lightbox.resizeSequence = s.resize_sequence;
98    Lightbox.resizeSpeed = s.resize_speed;
99    Lightbox.fadeInSpeed = s.fade_in_speed;
100    Lightbox.slideDownSpeed = s.slide_down_speed;
101    Lightbox.borderSize = s.border_size;
102    Lightbox.boxColor = s.box_color;
103    Lightbox.fontColor = s.font_color;
104    Lightbox.topPosition = s.top_position;
105    Lightbox.rtl = s.rtl;
106    Lightbox.loopItems = s.loop_items;
107    Lightbox.keysClose = s.keys_close.split(" ");
108    Lightbox.keysPrevious = s.keys_previous.split(" ");
109    Lightbox.keysNext = s.keys_next.split(" ");
110    Lightbox.keysZoom = s.keys_zoom.split(" ");
111    Lightbox.keysPlayPause = s.keys_play_pause.split(" ");
112    Lightbox.disableResize = s.disable_resize;
113    Lightbox.disableZoom = s.disable_zoom;
114    Lightbox.slideInterval = s.slideshow_interval;
115    Lightbox.showPlayPause = s.show_play_pause;
116    Lightbox.showCaption = s.show_caption;
117    Lightbox.autoStart = s.slideshow_automatic_start;
118    Lightbox.autoExit = s.slideshow_automatic_exit;
119    Lightbox.pauseOnNextClick = s.pause_on_next_click;
120    Lightbox.pauseOnPrevClick = s.pause_on_previous_click;
121    Lightbox.loopSlides = s.loop_slides;
122    Lightbox.alternative_layout = s.use_alt_layout;
123    Lightbox.iframe_width = s.iframe_width;
124    Lightbox.iframe_height = s.iframe_height;
125    Lightbox.iframe_border = s.iframe_border;
126    Lightbox.enableVideo = s.enable_video;
127    if (s.enable_video) {
128      Lightbox.flvPlayer = s.flvPlayer;
129      Lightbox.flvFlashvars = s.flvFlashvars;
130    }
131
132    // Make the lightbox divs.
133    var layout_class = (s.use_alt_layout ? 'lightbox2-alt-layout' : 'lightbox2-orig-layout');
134    var output = '<div id="lightbox2-overlay" style="display: none;"></div>\
135      <div id="lightbox" style="display: none;" class="' + layout_class + '">\
136        <div id="outerImageContainer"></div>\
137        <div id="imageDataContainer" class="clearfix">\
138          <div id="imageData"></div>\
139        </div>\
140      </div>';
141    var loading = '<div id="loading"><a href="#" id="loadingLink"></a></div>';
142    var modal = '<div id="modalContainer" style="display: none;"></div>';
143    var frame = '<div id="frameContainer" style="display: none;"></div>';
144    var imageContainer = '<div id="imageContainer" style="display: none;"></div>';
145    var details = '<div id="imageDetails"></div>';
146    var bottomNav = '<div id="bottomNav"></div>';
147    var image = '<img id="lightboxImage" alt="" />';
148    var hoverNav = '<div id="hoverNav"><a id="prevLink" href="#"></a><a id="nextLink" href="#"></a></div>';
149    var frameNav = '<div id="frameHoverNav"><a id="framePrevLink" href="#"></a><a id="frameNextLink" href="#"></a></div>';
150    var hoverNav = '<div id="hoverNav"><a id="prevLink" title="' + Drupal.t('Previous') + '" href="#"></a><a id="nextLink" title="' + Drupal.t('Next') + '" href="#"></a></div>';
151    var frameNav = '<div id="frameHoverNav"><a id="framePrevLink" title="' + Drupal.t('Previous') + '" href="#"></a><a id="frameNextLink" title="' + Drupal.t('Next') + '" href="#"></a></div>';
152    var caption = '<span id="caption"></span>';
153    var numberDisplay = '<span id="numberDisplay"></span>';
154    var close = '<a id="bottomNavClose" title="' + Drupal.t('Close') + '" href="#"></a>';
155    var zoom = '<a id="bottomNavZoom" href="#"></a>';
156    var zoomOut = '<a id="bottomNavZoomOut" href="#"></a>';
157    var pause = '<a id="lightshowPause" title="' + Drupal.t('Pause Slideshow') + '" href="#" style="display: none;"></a>';
158    var play = '<a id="lightshowPlay" title="' + Drupal.t('Play Slideshow') + '" href="#" style="display: none;"></a>';
159
160    $("body").append(output);
161    $('#outerImageContainer').append(modal + frame + imageContainer + loading);
162    if (!s.use_alt_layout) {
163      $('#imageContainer').append(image + hoverNav);
164      $('#imageData').append(details + bottomNav);
165      $('#imageDetails').append(caption + numberDisplay);
166      $('#bottomNav').append(frameNav + close + zoom + zoomOut + pause + play);
167    }
168    else {
169      $('#outerImageContainer').append(bottomNav);
170      $('#imageContainer').append(image);
171      $('#bottomNav').append(close + zoom + zoomOut);
172      $('#imageData').append(hoverNav + details);
173      $('#imageDetails').append(caption + numberDisplay + pause + play);
174    }
175
176    // Setup onclick handlers.
177    if (Lightbox.disableCloseClick) {
178      $('#lightbox2-overlay').click(function() { Lightbox.end(); return false; } ).hide();
179    }
180    $('#loadingLink, #bottomNavClose').click(function() { Lightbox.end('forceClose'); return false; } );
181    $('#prevLink, #framePrevLink').click(function() { Lightbox.changeData(Lightbox.activeImage - 1); return false; } );
182    $('#nextLink, #frameNextLink').click(function() { Lightbox.changeData(Lightbox.activeImage + 1); return false; } );
183    $('#bottomNavZoom').click(function() { Lightbox.changeData(Lightbox.activeImage, true); return false; } );
184    $('#bottomNavZoomOut').click(function() { Lightbox.changeData(Lightbox.activeImage, false); return false; } );
185    $('#lightshowPause').click(function() { Lightbox.togglePlayPause("lightshowPause", "lightshowPlay"); return false; } );
186    $('#lightshowPlay').click(function() { Lightbox.togglePlayPause("lightshowPlay", "lightshowPause"); return false; } );
187
188    // Fix positioning.
189    $('#prevLink, #nextLink, #framePrevLink, #frameNextLink').css({ 'paddingTop': Lightbox.borderSize + 'px'});
190    $('#imageContainer, #frameContainer, #modalContainer').css({ 'padding': Lightbox.borderSize + 'px'});
191    $('#outerImageContainer, #imageDataContainer, #bottomNavClose').css({'backgroundColor': '#' + Lightbox.boxColor, 'color': '#'+Lightbox.fontColor});
192    if (Lightbox.alternative_layout) {
193      $('#bottomNavZoom, #bottomNavZoomOut').css({'bottom': Lightbox.borderSize + 'px', 'right': Lightbox.borderSize + 'px'});
194    }
195    else if (Lightbox.rtl == 1 && Drupal.settings.lightbox2.useragent.search('MSIE') !== -1) {
196      $('#bottomNavZoom, #bottomNavZoomOut').css({'left': '0px'});
197    }
198
199    // Force navigation links to always be displayed
200    if (s.force_show_nav) {
201      $('#prevLink, #nextLink').addClass("force_show_nav");
202    }
203
204  },
205
206  // initList()
207  // Loops through anchor tags looking for 'lightbox', 'lightshow' and
208  // 'lightframe', etc, references and applies onclick events to appropriate
209  // links. You can rerun after dynamically adding images w/ajax.
210  initList : function(context) {
211
212    if (context == undefined || context == null) {
213      context = document;
214    }
215
216    // Attach lightbox to any links with rel 'lightbox', 'lightshow' or
217    // 'lightframe', etc.
218    $("a[rel^='lightbox']:not(.lightbox-processed), area[rel^='lightbox']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
219      if (Lightbox.disableCloseClick) {
220        $('#lightbox').unbind('click');
221        $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
222      }
223      Lightbox.start(this, false, false, false, false);
224      if (e.preventDefault) { e.preventDefault(); }
225      return false;
226    });
227    $("a[rel^='lightshow']:not(.lightbox-processed), area[rel^='lightshow']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
228      if (Lightbox.disableCloseClick) {
229        $('#lightbox').unbind('click');
230        $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
231      }
232      Lightbox.start(this, true, false, false, false);
233      if (e.preventDefault) { e.preventDefault(); }
234      return false;
235    });
236    $("a[rel^='lightframe']:not(.lightbox-processed), area[rel^='lightframe']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
237      if (Lightbox.disableCloseClick) {
238        $('#lightbox').unbind('click');
239        $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
240      }
241      Lightbox.start(this, false, true, false, false);
242      if (e.preventDefault) { e.preventDefault(); }
243      return false;
244    });
245    if (Lightbox.enableVideo) {
246      $("a[rel^='lightvideo']:not(.lightbox-processed), area[rel^='lightvideo']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
247        if (Lightbox.disableCloseClick) {
248          $('#lightbox').unbind('click');
249          $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
250        }
251        Lightbox.start(this, false, false, true, false);
252        if (e.preventDefault) { e.preventDefault(); }
253        return false;
254      });
255    }
256    $("a[rel^='lightmodal']:not(.lightbox-processed), area[rel^='lightmodal']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
257      $('#lightbox').unbind('click');
258      // Add classes from the link to the lightbox div - don't include lightbox-processed
259      $('#lightbox').addClass($(this).attr('class'));
260      $('#lightbox').removeClass('lightbox-processed');
261      Lightbox.start(this, false, false, false, true);
262      if (e.preventDefault) { e.preventDefault(); }
263      return false;
264    });
265    $("#lightboxAutoModal:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
266      Lightbox.auto_modal = true;
267      $('#lightbox').unbind('click');
268      Lightbox.start(this, false, false, false, true);
269      if (e.preventDefault) { e.preventDefault(); }
270      return false;
271    });
272  },
273
274  // start()
275  // Display overlay and lightbox. If image is part of a set, add siblings to
276  // imageArray.
277  start: function(imageLink, slideshow, lightframe, lightvideo, lightmodal) {
278
279    Lightbox.isPaused = !Lightbox.autoStart;
280
281    // Replaces hideSelectBoxes() and hideFlash() calls in original lightbox2.
282    Lightbox.toggleSelectsFlash('hide');
283
284    // Stretch overlay to fill page and fade in.
285    var arrayPageSize = Lightbox.getPageSize();
286    $("#lightbox2-overlay").hide().css({
287      'width': '100%',
288      'zIndex': '10090',
289      'height': arrayPageSize[1] + 'px',
290      'backgroundColor' : '#' + Lightbox.overlayColor
291    });
292    // Detect OS X FF2 opacity + flash issue.
293    if (lightvideo && this.detectMacFF2()) {
294      $("#lightbox2-overlay").removeClass("overlay_default");
295      $("#lightbox2-overlay").addClass("overlay_macff2");
296      $("#lightbox2-overlay").css({'opacity' : null});
297    }
298    else {
299      $("#lightbox2-overlay").removeClass("overlay_macff2");
300      $("#lightbox2-overlay").addClass("overlay_default");
301      $("#lightbox2-overlay").css({'opacity' : Lightbox.overlayOpacity});
302    }
303    $("#lightbox2-overlay").fadeIn(Lightbox.fadeInSpeed);
304
305
306    Lightbox.isSlideshow = slideshow;
307    Lightbox.isLightframe = lightframe;
308    Lightbox.isVideo = lightvideo;
309    Lightbox.isModal = lightmodal;
310    Lightbox.imageArray = [];
311    Lightbox.imageNum = 0;
312
313    var anchors = $(imageLink.tagName);
314    var anchor = null;
315    var rel_parts = Lightbox.parseRel(imageLink);
316    var rel = rel_parts["rel"];
317    var rel_group = rel_parts["group"];
318    var title = (rel_parts["title"] ? rel_parts["title"] : imageLink.title);
319    var rel_style = null;
320    var i = 0;
321
322    if (rel_parts["flashvars"]) {
323      Lightbox.flvFlashvars = Lightbox.flvFlashvars + '&' + rel_parts["flashvars"];
324    }
325
326    // Set the title for image alternative text.
327    var alt = imageLink.title;
328    if (!alt) {
329      var img = $(imageLink).find("img");
330      if (img && $(img).attr("alt")) {
331        alt = $(img).attr("alt");
332      }
333      else {
334        alt = title;
335      }
336    }
337
338    if ($(imageLink).attr('id') == 'lightboxAutoModal') {
339      rel_style = rel_parts["style"];
340      Lightbox.imageArray.push(['#lightboxAutoModal > *', title, alt, rel_style, 1]);
341    }
342    else {
343      // Handle lightbox images with no grouping.
344      if ((rel == 'lightbox' || rel == 'lightshow') && !rel_group) {
345        Lightbox.imageArray.push([imageLink.href, title, alt]);
346      }
347
348      // Handle other items with no grouping.
349      else if (!rel_group) {
350        rel_style = rel_parts["style"];
351        Lightbox.imageArray.push([imageLink.href, title, alt, rel_style]);
352      }
353
354      // Handle grouped items.
355      else {
356
357        // Loop through anchors and add them to imageArray.
358        for (i = 0; i < anchors.length; i++) {
359          anchor = anchors[i];
360          if (anchor.href && typeof(anchor.href) == "string" && $(anchor).attr('rel')) {
361            var rel_data = Lightbox.parseRel(anchor);
362            var anchor_title = (rel_data["title"] ? rel_data["title"] : anchor.title);
363            img_alt = anchor.title;
364            if (!img_alt) {
365              var anchor_img = $(anchor).find("img");
366              if (anchor_img && $(anchor_img).attr("alt")) {
367                img_alt = $(anchor_img).attr("alt");
368              }
369              else {
370                img_alt = title;
371              }
372            }
373            if (rel_data["rel"] == rel) {
374              if (rel_data["group"] == rel_group) {
375                if (Lightbox.isLightframe || Lightbox.isModal || Lightbox.isVideo) {
376                  rel_style = rel_data["style"];
377                }
378                Lightbox.imageArray.push([anchor.href, anchor_title, img_alt, rel_style]);
379              }
380            }
381          }
382        }
383
384        // Remove duplicates.
385        for (i = 0; i < Lightbox.imageArray.length; i++) {
386          for (j = Lightbox.imageArray.length-1; j > i; j--) {
387            if (Lightbox.imageArray[i][0] == Lightbox.imageArray[j][0]) {
388              Lightbox.imageArray.splice(j,1);
389            }
390          }
391        }
392        while (Lightbox.imageArray[Lightbox.imageNum][0] != imageLink.href) {
393          Lightbox.imageNum++;
394        }
395      }
396    }
397
398    if (Lightbox.isSlideshow && Lightbox.showPlayPause && Lightbox.isPaused) {
399      $('#lightshowPlay').show();
400      $('#lightshowPause').hide();
401    }
402
403    // Calculate top and left offset for the lightbox.
404    var arrayPageScroll = Lightbox.getPageScroll();
405    var lightboxTop = arrayPageScroll[1] + (Lightbox.topPosition == '' ? (arrayPageSize[3] / 10) : Lightbox.topPosition) * 1;
406    var lightboxLeft = arrayPageScroll[0];
407    $('#frameContainer, #modalContainer, #lightboxImage').hide();
408    $('#hoverNav, #prevLink, #nextLink, #frameHoverNav, #framePrevLink, #frameNextLink').hide();
409    $('#imageDataContainer, #numberDisplay, #bottomNavZoom, #bottomNavZoomOut').hide();
410    $('#outerImageContainer').css({'width': '250px', 'height': '250px'});
411    $('#lightbox').css({
412      'zIndex': '10500',
413      'top': lightboxTop + 'px',
414      'left': lightboxLeft + 'px'
415    }).show();
416
417    Lightbox.total = Lightbox.imageArray.length;
418    Lightbox.changeData(Lightbox.imageNum);
419  },
420
421  // changeData()
422  // Hide most elements and preload image in preparation for resizing image
423  // container.
424  changeData: function(imageNum, zoomIn) {
425
426    if (Lightbox.inprogress === false) {
427      if (Lightbox.total > 1 && ((Lightbox.isSlideshow && Lightbox.loopSlides) || (!Lightbox.isSlideshow && Lightbox.loopItems))) {
428        if (imageNum >= Lightbox.total) imageNum = 0;
429        if (imageNum < 0) imageNum = Lightbox.total - 1;
430      }
431
432      if (Lightbox.isSlideshow) {
433        for (var i = 0; i < Lightbox.slideIdCount; i++) {
434          window.clearTimeout(Lightbox.slideIdArray[i]);
435        }
436      }
437      Lightbox.inprogress = true;
438      Lightbox.activeImage = imageNum;
439
440      if (Lightbox.disableResize && !Lightbox.isSlideshow) {
441        zoomIn = true;
442      }
443      Lightbox.isZoomedIn = zoomIn;
444
445
446      // Hide elements during transition.
447      $('#loading').css({'zIndex': '10500'}).show();
448      if (!Lightbox.alternative_layout) {
449        $('#imageContainer').hide();
450      }
451      $('#frameContainer, #modalContainer, #lightboxImage').hide();
452      $('#hoverNav, #prevLink, #nextLink, #frameHoverNav, #framePrevLink, #frameNextLink').hide();
453      $('#imageDataContainer, #numberDisplay, #bottomNavZoom, #bottomNavZoomOut').hide();
454
455      // Preload image content, but not iframe pages.
456      if (!Lightbox.isLightframe && !Lightbox.isVideo && !Lightbox.isModal) {
457        $("#lightbox #imageDataContainer").removeClass('lightbox2-alt-layout-data');
458        imgPreloader = new Image();
459        imgPreloader.onerror = function() { Lightbox.imgNodeLoadingError(this); };
460
461        imgPreloader.onload = function() {
462          var photo = document.getElementById('lightboxImage');
463          photo.src = Lightbox.imageArray[Lightbox.activeImage][0];
464          photo.alt = Lightbox.imageArray[Lightbox.activeImage][2];
465
466          var imageWidth = imgPreloader.width;
467          var imageHeight = imgPreloader.height;
468
469          // Resize code.
470          var arrayPageSize = Lightbox.getPageSize();
471          var targ = { w:arrayPageSize[2] - (Lightbox.borderSize * 2), h:arrayPageSize[3] - (Lightbox.borderSize * 6) - (Lightbox.infoHeight * 4) - (arrayPageSize[3] / 10) };
472          var orig = { w:imgPreloader.width, h:imgPreloader.height };
473
474          // Image is very large, so show a smaller version of the larger image
475          // with zoom button.
476          if (zoomIn !== true) {
477            var ratio = 1.0; // Shrink image with the same aspect.
478            $('#bottomNavZoomOut, #bottomNavZoom').hide();
479            if ((orig.w >= targ.w || orig.h >= targ.h) && orig.h && orig.w) {
480              ratio = ((targ.w / orig.w) < (targ.h / orig.h)) ? targ.w / orig.w : targ.h / orig.h;
481              if (!Lightbox.disableZoom && !Lightbox.isSlideshow) {
482                $('#bottomNavZoom').css({'zIndex': '10500'}).show();
483              }
484            }
485
486            imageWidth  = Math.floor(orig.w * ratio);
487            imageHeight = Math.floor(orig.h * ratio);
488          }
489
490          else {
491            $('#bottomNavZoom').hide();
492            // Only display zoom out button if the image is zoomed in already.
493            if ((orig.w >= targ.w || orig.h >= targ.h) && orig.h && orig.w) {
494              // Only display zoom out button if not a slideshow and if the
495              // buttons aren't disabled.
496              if (!Lightbox.disableResize && Lightbox.isSlideshow === false && !Lightbox.disableZoom) {
497                $('#bottomNavZoomOut').css({'zIndex': '10500'}).show();
498              }
499            }
500          }
501
502          photo.style.width = (imageWidth) + 'px';
503          photo.style.height = (imageHeight) + 'px';
504          Lightbox.resizeContainer(imageWidth, imageHeight);
505
506          // Clear onLoad, IE behaves irratically with animated gifs otherwise.
507          imgPreloader.onload = function() {};
508        };
509
510        imgPreloader.src = Lightbox.imageArray[Lightbox.activeImage][0];
511        imgPreloader.alt = Lightbox.imageArray[Lightbox.activeImage][2];
512      }
513
514      // Set up frame size, etc.
515      else if (Lightbox.isLightframe) {
516        $("#lightbox #imageDataContainer").addClass('lightbox2-alt-layout-data');
517        var src = Lightbox.imageArray[Lightbox.activeImage][0];
518        $('#frameContainer').html('<iframe id="lightboxFrame" style="display: none;" src="'+src+'"></iframe>');
519
520        // Enable swf support in Gecko browsers.
521        if (Drupal.settings.lightbox2.useragent.search('Mozilla') !== -1 && src.indexOf('.swf') != -1) {
522          setTimeout(function () {
523            document.getElementById("lightboxFrame").src = Lightbox.imageArray[Lightbox.activeImage][0];
524          }, 1000);
525        }
526
527        if (!Lightbox.iframe_border) {
528          $('#lightboxFrame').css({'border': 'none'});
529          $('#lightboxFrame').attr('frameborder', '0');
530        }
531        var iframe = document.getElementById('lightboxFrame');
532        var iframeStyles = Lightbox.imageArray[Lightbox.activeImage][3];
533        iframe = Lightbox.setStyles(iframe, iframeStyles);
534        Lightbox.resizeContainer(parseInt(iframe.width, 10), parseInt(iframe.height, 10));
535      }
536      else if (Lightbox.isVideo || Lightbox.isModal) {
537        $("#lightbox #imageDataContainer").addClass('lightbox2-alt-layout-data');
538        var container = document.getElementById('modalContainer');
539        var modalStyles = Lightbox.imageArray[Lightbox.activeImage][3];
540        container = Lightbox.setStyles(container, modalStyles);
541        if (Lightbox.isVideo) {
542          Lightbox.modalHeight =  parseInt(container.height, 10) - 10;
543          Lightbox.modalWidth =  parseInt(container.width, 10) - 10;
544          Lightvideo.startVideo(Lightbox.imageArray[Lightbox.activeImage][0]);
545        }
546        Lightbox.resizeContainer(parseInt(container.width, 10), parseInt(container.height, 10));
547      }
548    }
549  },
550
551  // imgNodeLoadingError()
552  imgNodeLoadingError: function(image) {
553    var s = Drupal.settings.lightbox2;
554    var original_image = Lightbox.imageArray[Lightbox.activeImage][0];
555    if (s.display_image_size !== "") {
556      original_image = original_image.replace(new RegExp("."+s.display_image_size), "");
557    }
558    Lightbox.imageArray[Lightbox.activeImage][0] = original_image;
559    image.onerror = function() { Lightbox.imgLoadingError(image); };
560    image.src = original_image;
561  },
562
563  // imgLoadingError()
564  imgLoadingError: function(image) {
565    var s = Drupal.settings.lightbox2;
566    Lightbox.imageArray[Lightbox.activeImage][0] = s.default_image;
567    image.src = s.default_image;
568  },
569
570  // resizeContainer()
571  resizeContainer: function(imgWidth, imgHeight) {
572
573    imgWidth = (imgWidth < Lightbox.minWidth ? Lightbox.minWidth : imgWidth);
574
575    this.widthCurrent = $('#outerImageContainer').width();
576    this.heightCurrent = $('#outerImageContainer').height();
577
578    var widthNew = (imgWidth  + (Lightbox.borderSize * 2));
579    var heightNew = (imgHeight  + (Lightbox.borderSize * 2));
580
581    // Scalars based on change from old to new.
582    this.xScale = ( widthNew / this.widthCurrent) * 100;
583    this.yScale = ( heightNew / this.heightCurrent) * 100;
584
585    // Calculate size difference between new and old image, and resize if
586    // necessary.
587    wDiff = this.widthCurrent - widthNew;
588    hDiff = this.heightCurrent - heightNew;
589
590    $('#modalContainer').css({'width': imgWidth, 'height': imgHeight});
591    // Detect animation sequence.
592    if (Lightbox.resizeSequence) {
593      var animate1 = {width: widthNew};
594      var animate2 = {height: heightNew};
595      if (Lightbox.resizeSequence == 2) {
596        animate1 = {height: heightNew};
597        animate2 = {width: widthNew};
598      }
599      $('#outerImageContainer').animate(animate1, Lightbox.resizeSpeed).animate(animate2, Lightbox.resizeSpeed, 'linear', function() { Lightbox.showData(); });
600    }
601    // Simultaneous.
602    else {
603      $('#outerImageContainer').animate({'width': widthNew, 'height': heightNew}, Lightbox.resizeSpeed, 'linear', function() { Lightbox.showData(); });
604    }
605
606    // If new and old image are same size and no scaling transition is necessary
607    // do a quick pause to prevent image flicker.
608    if ((hDiff === 0) && (wDiff === 0)) {
609      if (Drupal.settings.lightbox2.useragent.search('MSIE') !== -1) {
610        Lightbox.pause(250);
611      }
612      else {
613        Lightbox.pause(100);
614      }
615    }
616
617    var s = Drupal.settings.lightbox2;
618    if (!s.use_alt_layout) {
619      $('#prevLink, #nextLink').css({'height': imgHeight + 'px'});
620    }
621    $('#imageDataContainer').css({'width': widthNew + 'px'});
622  },
623
624  // showData()
625  // Display image and begin preloading neighbors.
626  showData: function() {
627    $('#loading').hide();
628
629    if (Lightbox.isLightframe || Lightbox.isVideo || Lightbox.isModal) {
630      Lightbox.updateDetails();
631      if (Lightbox.isLightframe) {
632        $('#frameContainer').show();
633        if (Drupal.settings.lightbox2.useragent.search('Safari') !== -1 || Lightbox.fadeInSpeed === 0) {
634          $('#lightboxFrame').css({'zIndex': '10500'}).show();
635        }
636        else {
637          $('#lightboxFrame').css({'zIndex': '10500'}).fadeIn(Lightbox.fadeInSpeed);
638        }
639      }
640      else {
641        if (Lightbox.isVideo) {
642          $("#modalContainer").html(Lightbox.modalHTML).click(function(){return false;}).css('zIndex', '10500').show();
643        }
644        else {
645          var src = unescape(Lightbox.imageArray[Lightbox.activeImage][0]);
646          if (Lightbox.imageArray[Lightbox.activeImage][4]) {
647            $(src).appendTo("#modalContainer");
648            $('#modalContainer').css({'zIndex': '10500'}).show();
649          }
650          else {
651            // Use a callback to show the new image, otherwise you get flicker.
652            $("#modalContainer").hide().load(src, function () {$('#modalContainer').css({'zIndex': '10500'}).show();});
653          }
654          $('#modalContainer').unbind('click');
655        }
656        // This might be needed in the Lightframe section above.
657        //$('#modalContainer').css({'zIndex': '10500'}).show();
658      }
659    }
660
661    // Handle display of image content.
662    else {
663      $('#imageContainer').show();
664      if (Drupal.settings.lightbox2.useragent.search('Safari') !== -1 || Lightbox.fadeInSpeed === 0) {
665        $('#lightboxImage').css({'zIndex': '10500'}).show();
666      }
667      else {
668        $('#lightboxImage').css({'zIndex': '10500'}).fadeIn(Lightbox.fadeInSpeed);
669      }
670      Lightbox.updateDetails();
671      this.preloadNeighborImages();
672    }
673    Lightbox.inprogress = false;
674
675    // Slideshow specific stuff.
676    if (Lightbox.isSlideshow) {
677      if (!Lightbox.loopSlides && Lightbox.activeImage == (Lightbox.total - 1)) {
678        if (Lightbox.autoExit) {
679          Lightbox.slideIdArray[Lightbox.slideIdCount++] = setTimeout(function () {Lightbox.end('slideshow');}, Lightbox.slideInterval);
680        }
681      }
682      else {
683        if (!Lightbox.isPaused && Lightbox.total > 1) {
684          Lightbox.slideIdArray[Lightbox.slideIdCount++] = setTimeout(function () {Lightbox.changeData(Lightbox.activeImage + 1);}, Lightbox.slideInterval);
685        }
686      }
687      if (Lightbox.showPlayPause && Lightbox.total > 1 && !Lightbox.isPaused) {
688        $('#lightshowPause').show();
689        $('#lightshowPlay').hide();
690      }
691      else if (Lightbox.showPlayPause && Lightbox.total > 1) {
692        $('#lightshowPause').hide();
693        $('#lightshowPlay').show();
694      }
695    }
696
697    // Adjust the page overlay size.
698    var arrayPageSize = Lightbox.getPageSize();
699    var arrayPageScroll = Lightbox.getPageScroll();
700    var pageHeight = arrayPageSize[1];
701    if (Lightbox.isZoomedIn && arrayPageSize[1] > arrayPageSize[3]) {
702      var lightboxTop = (Lightbox.topPosition == '' ? (arrayPageSize[3] / 10) : Lightbox.topPosition) * 1;
703      pageHeight = pageHeight + arrayPageScroll[1] + lightboxTop;
704    }
705    $('#lightbox2-overlay').css({'height': pageHeight + 'px', 'width': arrayPageSize[0] + 'px'});
706
707    // Gecko browsers (e.g. Firefox, SeaMonkey, etc) don't handle pdfs as
708    // expected.
709    if (Drupal.settings.lightbox2.useragent.search('Mozilla') !== -1) {
710      if (Lightbox.imageArray[Lightbox.activeImage][0].indexOf(".pdf") != -1) {
711        setTimeout(function () {
712          document.getElementById("lightboxFrame").src = Lightbox.imageArray[Lightbox.activeImage][0];
713        }, 1000);
714      }
715    }
716  },
717
718  // updateDetails()
719  // Display caption, image number, and bottom nav.
720  updateDetails: function() {
721
722    $("#imageDataContainer").hide();
723
724    var s = Drupal.settings.lightbox2;
725
726    if (s.show_caption) {
727      var caption = Lightbox.filterXSS(Lightbox.imageArray[Lightbox.activeImage][1]);
728      if (!caption) caption = '';
729      $('#caption').html(caption).css({'zIndex': '10500'}).show();
730    }
731
732    // If image is part of set display 'Image x of x'.
733    var numberDisplay = null;
734    if (s.image_count && Lightbox.total > 1) {
735      var currentImage = Lightbox.activeImage + 1;
736      if (!Lightbox.isLightframe && !Lightbox.isModal && !Lightbox.isVideo) {
737        numberDisplay = s.image_count.replace(/\!current/, currentImage).replace(/\!total/, Lightbox.total);
738      }
739      else if (Lightbox.isVideo) {
740        numberDisplay = s.video_count.replace(/\!current/, currentImage).replace(/\!total/, Lightbox.total);
741      }
742      else {
743        numberDisplay = s.page_count.replace(/\!current/, currentImage).replace(/\!total/, Lightbox.total);
744      }
745      $('#numberDisplay').html(numberDisplay).css({'zIndex': '10500'}).show();
746    }
747    else {
748      $('#numberDisplay').hide();
749    }
750
751    $("#imageDataContainer").hide().slideDown(Lightbox.slideDownSpeed, function() {
752      $("#bottomNav").show();
753    });
754    if (Lightbox.rtl == 1) {
755      $("#bottomNav").css({'float': 'left'});
756    }
757    Lightbox.updateNav();
758  },
759
760  // updateNav()
761  // Display appropriate previous and next hover navigation.
762  updateNav: function() {
763
764    $('#hoverNav').css({'zIndex': '10500'}).show();
765    var prevLink = '#prevLink';
766    var nextLink = '#nextLink';
767
768    // Slideshow is separated as we need to show play / pause button.
769    if (Lightbox.isSlideshow) {
770      if ((Lightbox.total > 1 && Lightbox.loopSlides) || Lightbox.activeImage !== 0) {
771        $(prevLink).css({'zIndex': '10500'}).show().click(function() {
772          if (Lightbox.pauseOnPrevClick) {
773            Lightbox.togglePlayPause("lightshowPause", "lightshowPlay");
774          }
775          Lightbox.changeData(Lightbox.activeImage - 1); return false;
776        });
777      }
778      else {
779        $(prevLink).hide();
780      }
781
782      // If not last image in set, display next image button.
783      if ((Lightbox.total > 1 && Lightbox.loopSlides) || Lightbox.activeImage != (Lightbox.total - 1)) {
784        $(nextLink).css({'zIndex': '10500'}).show().click(function() {
785          if (Lightbox.pauseOnNextClick) {
786            Lightbox.togglePlayPause("lightshowPause", "lightshowPlay");
787          }
788          Lightbox.changeData(Lightbox.activeImage + 1); return false;
789        });
790      }
791      // Safari browsers need to have hide() called again.
792      else {
793        $(nextLink).hide();
794      }
795    }
796
797    // All other types of content.
798    else {
799
800      if ((Lightbox.isLightframe || Lightbox.isModal || Lightbox.isVideo) && !Lightbox.alternative_layout) {
801        $('#frameHoverNav').css({'zIndex': '10500'}).show();
802        $('#hoverNav').css({'zIndex': '10500'}).hide();
803        prevLink = '#framePrevLink';
804        nextLink = '#frameNextLink';
805      }
806
807      // If not first image in set, display prev image button.
808      if ((Lightbox.total > 1 && Lightbox.loopItems) || Lightbox.activeImage !== 0) {
809        // Unbind any other click handlers, otherwise this adds a new click handler
810        // each time the arrow is clicked.
811        $(prevLink).css({'zIndex': '10500'}).show().unbind().click(function() {
812          Lightbox.changeData(Lightbox.activeImage - 1); return false;
813        });
814      }
815      // Safari browsers need to have hide() called again.
816      else {
817        $(prevLink).hide();
818      }
819
820      // If not last image in set, display next image button.
821      if ((Lightbox.total > 1 && Lightbox.loopItems) || Lightbox.activeImage != (Lightbox.total - 1)) {
822        // Unbind any other click handlers, otherwise this adds a new click handler
823        // each time the arrow is clicked.
824        $(nextLink).css({'zIndex': '10500'}).show().unbind().click(function() {
825          Lightbox.changeData(Lightbox.activeImage + 1); return false;
826        });
827      }
828      // Safari browsers need to have hide() called again.
829      else {
830        $(nextLink).hide();
831      }
832    }
833
834    // Don't enable keyboard shortcuts so forms will work.
835    if (!Lightbox.isModal) {
836      this.enableKeyboardNav();
837    }
838  },
839
840
841  // enableKeyboardNav()
842  enableKeyboardNav: function() {
843    $(document).bind("keydown", this.keyboardAction);
844  },
845
846  // disableKeyboardNav()
847  disableKeyboardNav: function() {
848    $(document).unbind("keydown", this.keyboardAction);
849  },
850
851  // keyboardAction()
852  keyboardAction: function(e) {
853    if (e === null) { // IE.
854      keycode = event.keyCode;
855      escapeKey = 27;
856    }
857    else { // Mozilla.
858      keycode = e.keyCode;
859      escapeKey = e.DOM_VK_ESCAPE;
860    }
861
862    key = String.fromCharCode(keycode).toLowerCase();
863
864    // Close lightbox.
865    if (Lightbox.checkKey(Lightbox.keysClose, key, keycode)) {
866      Lightbox.end('forceClose');
867    }
868    // Display previous image (p, <-).
869    else if (Lightbox.checkKey(Lightbox.keysPrevious, key, keycode)) {
870      if ((Lightbox.total > 1 && ((Lightbox.isSlideshow && Lightbox.loopSlides) || (!Lightbox.isSlideshow && Lightbox.loopItems))) || Lightbox.activeImage !== 0) {
871        Lightbox.changeData(Lightbox.activeImage - 1);
872      }
873
874    }
875    // Display next image (n, ->).
876    else if (Lightbox.checkKey(Lightbox.keysNext, key, keycode)) {
877      if ((Lightbox.total > 1 && ((Lightbox.isSlideshow && Lightbox.loopSlides) || (!Lightbox.isSlideshow && Lightbox.loopItems))) || Lightbox.activeImage != (Lightbox.total - 1)) {
878        Lightbox.changeData(Lightbox.activeImage + 1);
879      }
880    }
881    // Zoom in.
882    else if (Lightbox.checkKey(Lightbox.keysZoom, key, keycode) && !Lightbox.disableResize && !Lightbox.disableZoom && !Lightbox.isSlideshow && !Lightbox.isLightframe) {
883      if (Lightbox.isZoomedIn) {
884        Lightbox.changeData(Lightbox.activeImage, false);
885      }
886      else if (!Lightbox.isZoomedIn) {
887        Lightbox.changeData(Lightbox.activeImage, true);
888      }
889      return false;
890    }
891    // Toggle play / pause (space).
892    else if (Lightbox.checkKey(Lightbox.keysPlayPause, key, keycode) && Lightbox.isSlideshow) {
893
894      if (Lightbox.isPaused) {
895        Lightbox.togglePlayPause("lightshowPlay", "lightshowPause");
896      }
897      else {
898        Lightbox.togglePlayPause("lightshowPause", "lightshowPlay");
899      }
900      return false;
901    }
902  },
903
904  preloadNeighborImages: function() {
905
906    if ((Lightbox.total - 1) > Lightbox.activeImage) {
907      preloadNextImage = new Image();
908      preloadNextImage.src = Lightbox.imageArray[Lightbox.activeImage + 1][0];
909    }
910    if (Lightbox.activeImage > 0) {
911      preloadPrevImage = new Image();
912      preloadPrevImage.src = Lightbox.imageArray[Lightbox.activeImage - 1][0];
913    }
914
915  },
916
917  end: function(caller) {
918    var closeClick = (caller == 'slideshow' ? false : true);
919    if (Lightbox.isSlideshow && Lightbox.isPaused && !closeClick) {
920      return;
921    }
922    // To prevent double clicks on navigation links.
923    if (Lightbox.inprogress === true && caller != 'forceClose') {
924      return;
925    }
926    Lightbox.disableKeyboardNav();
927    $('#lightbox').hide();
928    $("#lightbox2-overlay").fadeOut();
929    Lightbox.isPaused = true;
930    Lightbox.inprogress = false;
931    Lightbox.imageArray = [];
932    Lightbox.imageNum = 0;
933    // Replaces calls to showSelectBoxes() and showFlash() in original
934    // lightbox2.
935    Lightbox.toggleSelectsFlash('visible');
936    if (Lightbox.isSlideshow) {
937      for (var i = 0; i < Lightbox.slideIdCount; i++) {
938        window.clearTimeout(Lightbox.slideIdArray[i]);
939      }
940      $('#lightshowPause, #lightshowPlay').hide();
941    }
942    else if (Lightbox.isLightframe) {
943      $('#frameContainer').empty().hide();
944    }
945    else if (Lightbox.isVideo || Lightbox.isModal) {
946      if (!Lightbox.auto_modal) {
947        $('#modalContainer').hide().html("");
948      }
949      Lightbox.auto_modal = false;
950    }
951  },
952
953
954  // getPageScroll()
955  // Returns array with x,y page scroll values.
956  // Core code from - quirksmode.com.
957  getPageScroll : function() {
958
959    var xScroll, yScroll;
960
961    if (self.pageYOffset || self.pageXOffset) {
962      yScroll = self.pageYOffset;
963      xScroll = self.pageXOffset;
964    }
965    else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {  // Explorer 6 Strict.
966      yScroll = document.documentElement.scrollTop;
967      xScroll = document.documentElement.scrollLeft;
968    }
969    else if (document.body) {// All other Explorers.
970      yScroll = document.body.scrollTop;
971      xScroll = document.body.scrollLeft;
972    }
973
974    arrayPageScroll = [xScroll,yScroll];
975    return arrayPageScroll;
976  },
977
978  // getPageSize()
979  // Returns array with page width, height and window width, height.
980  // Core code from - quirksmode.com.
981  // Edit for Firefox by pHaez.
982
983  getPageSize : function() {
984
985    var xScroll, yScroll;
986
987    if (window.innerHeight && window.scrollMaxY) {
988      xScroll = window.innerWidth + window.scrollMaxX;
989      yScroll = window.innerHeight + window.scrollMaxY;
990    }
991    else if (document.body.scrollHeight > document.body.offsetHeight) { // All but Explorer Mac.
992      xScroll = document.body.scrollWidth;
993      yScroll = document.body.scrollHeight;
994    }
995    else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari.
996      xScroll = document.body.offsetWidth;
997      yScroll = document.body.offsetHeight;
998    }
999
1000    var windowWidth, windowHeight;
1001
1002    if (self.innerHeight) { // All except Explorer.
1003      if (document.documentElement.clientWidth) {
1004        windowWidth = document.documentElement.clientWidth;
1005      }
1006      else {
1007        windowWidth = self.innerWidth;
1008      }
1009      windowHeight = self.innerHeight;
1010    }
1011    else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode.
1012      windowWidth = document.documentElement.clientWidth;
1013      windowHeight = document.documentElement.clientHeight;
1014    }
1015    else if (document.body) { // Other Explorers.
1016      windowWidth = document.body.clientWidth;
1017      windowHeight = document.body.clientHeight;
1018    }
1019    // For small pages with total height less than height of the viewport.
1020    if (yScroll < windowHeight) {
1021      pageHeight = windowHeight;
1022    }
1023    else {
1024      pageHeight = yScroll;
1025    }
1026    // For small pages with total width less than width of the viewport.
1027    if (xScroll < windowWidth) {
1028      pageWidth = xScroll;
1029    }
1030    else {
1031      pageWidth = windowWidth;
1032    }
1033    arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
1034    return arrayPageSize;
1035  },
1036
1037
1038  // pause(numberMillis)
1039  pause : function(ms) {
1040    var date = new Date();
1041    var curDate = null;
1042    do { curDate = new Date(); }
1043    while (curDate - date < ms);
1044  },
1045
1046
1047  // toggleSelectsFlash()
1048  // Hide / unhide select lists and flash objects as they appear above the
1049  // lightbox in some browsers.
1050  toggleSelectsFlash: function (state) {
1051    if (state == 'visible') {
1052      $("select.lightbox_hidden, embed.lightbox_hidden, object.lightbox_hidden").show();
1053    }
1054    else if (state == 'hide') {
1055      $("select:visible, embed:visible, object:visible").not('#lightboxAutoModal select, #lightboxAutoModal embed, #lightboxAutoModal object').addClass("lightbox_hidden");
1056      $("select.lightbox_hidden, embed.lightbox_hidden, object.lightbox_hidden").hide();
1057    }
1058  },
1059
1060
1061  // parseRel()
1062  parseRel: function (link) {
1063    var parts = [];
1064    parts["rel"] = parts["title"] = parts["group"] = parts["style"] = parts["flashvars"] = null;
1065    if (!$(link).attr('rel')) return parts;
1066    parts["rel"] = $(link).attr('rel').match(/\w+/)[0];
1067
1068    if ($(link).attr('rel').match(/\[(.*)\]/)) {
1069      var info = $(link).attr('rel').match(/\[(.*?)\]/)[1].split('|');
1070      parts["group"] = info[0];
1071      parts["style"] = info[1];
1072      if (parts["style"] != undefined && parts["style"].match(/flashvars:\s?(.*?);/)) {
1073        parts["flashvars"] = parts["style"].match(/flashvars:\s?(.*?);/)[1];
1074      }
1075    }
1076    if ($(link).attr('rel').match(/\[.*\]\[([\s\S]*)\]/)) {
1077      var title = $(link).attr('rel').match(/\[.*\]\[([\s\S]*)\]/)[1];
1078      parts["title"] = title.replace(/\n/g, '<br />');
1079    }
1080    return parts;
1081  },
1082
1083  // setStyles()
1084  setStyles: function(item, styles) {
1085    item.width = Lightbox.iframe_width;
1086    item.height = Lightbox.iframe_height;
1087    item.scrolling = "auto";
1088
1089    if (!styles) return item;
1090    var stylesArray = styles.split(';');
1091    for (var i = 0; i< stylesArray.length; i++) {
1092      if (stylesArray[i].indexOf('width:') >= 0) {
1093        var w = stylesArray[i].replace('width:', '');
1094        item.width = jQuery.trim(w);
1095      }
1096      else if (stylesArray[i].indexOf('height:') >= 0) {
1097        var h = stylesArray[i].replace('height:', '');
1098        item.height = jQuery.trim(h);
1099      }
1100      else if (stylesArray[i].indexOf('scrolling:') >= 0) {
1101        var scrolling = stylesArray[i].replace('scrolling:', '');
1102        item.scrolling = jQuery.trim(scrolling);
1103      }
1104      else if (stylesArray[i].indexOf('overflow:') >= 0) {
1105        var overflow = stylesArray[i].replace('overflow:', '');
1106        item.overflow = jQuery.trim(overflow);
1107      }
1108    }
1109    return item;
1110  },
1111
1112
1113  // togglePlayPause()
1114  // Hide the pause / play button as appropriate.  If pausing the slideshow also
1115  // clear the timers, otherwise move onto the next image.
1116  togglePlayPause: function(hideId, showId) {
1117    if (Lightbox.isSlideshow && hideId == "lightshowPause") {
1118      for (var i = 0; i < Lightbox.slideIdCount; i++) {
1119        window.clearTimeout(Lightbox.slideIdArray[i]);
1120      }
1121    }
1122    $('#' + hideId).hide();
1123    $('#' + showId).show();
1124
1125    if (hideId == "lightshowPlay") {
1126      Lightbox.isPaused = false;
1127      if (!Lightbox.loopSlides && Lightbox.activeImage == (Lightbox.total - 1)) {
1128        Lightbox.end();
1129      }
1130      else if (Lightbox.total > 1) {
1131        Lightbox.changeData(Lightbox.activeImage + 1);
1132      }
1133    }
1134    else {
1135      Lightbox.isPaused = true;
1136    }
1137  },
1138
1139  triggerLightbox: function (rel_type, rel_group) {
1140    if (rel_type.length) {
1141      if (rel_group && rel_group.length) {
1142        $("a[rel^='" + rel_type +"\[" + rel_group + "\]'], area[rel^='" + rel_type +"\[" + rel_group + "\]']").eq(0).trigger("click");
1143      }
1144      else {
1145        $("a[rel^='" + rel_type +"'], area[rel^='" + rel_type +"']").eq(0).trigger("click");
1146      }
1147    }
1148  },
1149
1150  detectMacFF2: function() {
1151    var ua = navigator.userAgent.toLowerCase();
1152    if (/firefox[\/\s](\d+\.\d+)/.test(ua)) {
1153      var ffversion = new Number(RegExp.$1);
1154      if (ffversion < 3 && ua.indexOf('mac') != -1) {
1155        return true;
1156      }
1157    }
1158    return false;
1159  },
1160
1161  checkKey: function(keys, key, code) {
1162    return (jQuery.inArray(key, keys) != -1 || jQuery.inArray(String(code), keys) != -1);
1163  },
1164
1165  filterXSS: function(str, allowed_tags) {
1166    var output = "";
1167    var prefix = Drupal.settings.pathPrefix;
1168    if (!prefix) prefix = '';
1169    $.ajax({
1170      url: Drupal.settings.basePath + prefix + '?q=system/lightbox2/filter-xss',
1171      data: {
1172        'string' : str,
1173        'allowed_tags' : allowed_tags
1174      },
1175      type: "POST",
1176      async: false,
1177      dataType:  "json",
1178      success: function(data) {
1179        output = data;
1180      }
1181    });
1182    return output;
1183  }
1184
1185};
1186
1187// Initialize the lightbox.
1188Drupal.behaviors.initLightbox = {
1189  attach: function(context) {
1190
1191  $('body:not(.lightbox-processed)', context).addClass('lightbox-processed').each(function() {
1192    Lightbox.initialize();
1193    return false; // Break the each loop.
1194  });
1195
1196  // Attach lightbox to any links with lightbox rels.
1197  Lightbox.initList(context);
1198  $('#lightboxAutoModal', context).triggerHandler('click');
1199  }
1200};
1201})(jQuery);
1202;
1203// Javascript for user_relationships_ui.module
1204
1205(function ($) {
1206
1207  // Creating our own namespace for the module
1208  Drupal.user_relationships_ui = {};
1209
1210  Drupal.behaviors.userpointsNCNodeTypeFieldsetSummaries = {
1211    attach: function() {
1212      // Any links that we have created in the ui module are
1213      // Given a click handler so you can display the popup correctly
1214      $('a.user_relationships_popup_link').click(function(e) {
1215        var buttoncode = e.which ? e.which : e.button; // msie specific checks does not support e.which
1216        // If position is fixed, allow for %'s.
1217        position = Drupal.settings.user_relationships_ui.position.position;
1218        left = Drupal.settings.user_relationships_ui.position.left;
1219        xtop = Drupal.settings.user_relationships_ui.position.top;
1220
1221        if(position == "fixed") {
1222          // If left is defined in a % (.5) calculate left requirement
1223          if(left <= 1) {
1224            // Window width * desired - UI width
1225            left = Math.round(($(window).width()*left) - ($("#user_relationships_popup_form").width()/2));
1226          }
1227          // If top is define in a % (.33) calculate top requirement
1228          if(xtop <= 1) {
1229            // Window height * desired - UI height (which is an unknown)
1230            xtop = Math.round(($(window).height()*xtop));// - ($("#user_relationships_popup_form").height()/2));
1231          }
1232        } else {
1233        left = (e.pageX ? e.pageX : e.clientX) + Number(left); // msie specific checks does not support e.page
1234        if (left + $("#user_relationships_popup_form").width() > $(window).width()) {
1235          left = (e.pageX ? e.pageX : e.clientX) - $("#user_relationships_popup_form").width();
1236        }
1237          xtop = (e.pageY ? e.pageY : e.clientY) + Number(xtop); // msie specific checks does not support e.page
1238        }
1239        var href = $(this).attr('href'); // Where we send the ajax request.
1240        Drupal.user_relationships_ui.showForm(href, position, left, xtop);
1241        e.preventDefault();
1242      });
1243    }
1244  };
1245
1246  /**
1247   * Function to display the pertinent form for the user
1248   *
1249   * @param href
1250   *      Ajax url where we will retrieve the form
1251   * @param pageX
1252   *      Left value for the event
1253   * @param pageY
1254   *      Top value for the event
1255   */
1256  Drupal.user_relationships_ui.showForm = function(href, position, left, top) {
1257    // Making sure that any currently open popups will be hidden.
1258    Drupal.user_relationships_ui.hidePopup();
1259    // Putting the animation into this
1260
1261    $('#user_relationships_popup_form')
1262      .css({top: top + 'px', left: left + 'px', position: position})
1263      .html(Drupal.user_relationships_ui.loadingAnimation())
1264      .slideDown();
1265    // Adding ajax to the href because we need to determine between ajax and regular
1266    if (href.indexOf('?') == -1) {
1267      href += '?';
1268    }
1269    href += '&ajax=1';
1270    // Making the ajax request to the server to retrieve the form.
1271    $.get(href, function(result) {
1272      $('#user_relationships_popup_form').html(result).slideDown();
1273      // Making sure the cancel link on each form in the popup closes the popup.
1274      $('#user_relationships_popup_form .container-inline a').click(function() {
1275        Drupal.user_relationships_ui.hidePopup();
1276        return false;
1277      });
1278      //Prevent users from clicking submit button twice
1279      Drupal.user_relationships_ui.formCheck();
1280    });
1281  };
1282
1283  /**
1284   * Function used to return the html that is used to build the.
1285   * Loading animation when a form is requested by the user.
1286   */
1287  Drupal.user_relationships_ui.loadingAnimation = function() {
1288    var html = '<div>';
1289    html += '<div style="text-align: center; font-weight: bold;">';
1290    html += Drupal.t('Form Loading');
1291    html += '</div>';
1292    html += '<img src="' + Drupal.settings.user_relationships_ui['loadingimage'] + '" border="0" height="20" width="200" />';
1293    html += '</div>';
1294    return html;
1295  };
1296
1297  /**
1298   * Helper function to hide the popup form
1299   */
1300  Drupal.user_relationships_ui.hidePopup = function() {
1301    $('#user_relationships_popup_form').slideUp();
1302  };
1303
1304  /**
1305   * Prevent users from clicking a submit button twice - borrowed from http://drupal.org/project/newswire - thanks, fellows :)
1306   */
1307  Drupal.user_relationships_ui.formCheck = function() {
1308    // only apply this to node and comment and new user registration forms
1309    var forms = $("#user_relationships_popup_form #edit-submit");
1310    // insert the saving div now to cache it for better performance and to show the loading image
1311    $('<div id="user_relationships_popup_form_saving"><p class="user_relationships_popup_form_saving">' + Drupal.t('Saving...') + '</p></div>').insertAfter(forms);
1312    forms.click(function() {
1313      $(this).siblings("input[type=submit]").hide();
1314      $(this).hide();
1315      $("#user_relationships_popup_form_saving").show();
1316      var notice = function() {
1317        $('<p id="user_relationships_popup_form_saving_notice">' + Drupal.t('Not saving? Please wait a few seconds, reload this page, and try again.') + '</p>').appendTo("#user_relationships_popup_form_saving").fadeIn();
1318      };
1319      // append notice if form saving isn't work, perhaps a timeout issue
1320      setTimeout(notice, 60000);
1321    });
1322  };
1323
1324})(jQuery);
1325;
vendor: 23,089 bytes, lines 1326-1330
1326/*
1327 * jQuery FlexSlider v2.7.2
1328 * Copyright 2012 WooThemes
1329 * Contributing Author: Tyler Smith
1330 */!function($){var e=!0;$.flexslider=function(t,a){var n=$(t);void 0===a.rtl&&"rtl"==$("html").attr("dir")&&(a.rtl=!0),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":n.vars.rtl?"marginRight":"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.isFirefox=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,n.ensureAnimationEnd="",""!==n.vars.controlsContainer&&(n.controlsContainer=$(n.vars.controlsContainer).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=n.vars.rtl?37===t?n.getTarget("next"):39===t&&n.getTarget("prev"):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(),r;r=n.vars.rtl?-1*(t.offset().right-$(n).scrollLeft()):t.offset().left-$(n).scrollLeft(),r<=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++){if(r=n.slides.eq(s),void 0===r.attr("data-thumb-alt")&&r.attr("data-thumb-alt",""),a=$("<a></a>").attr("href","#").text(t),"thumbnails"===n.vars.controlNav&&(a=$("<img/>").attr("src",r.attr("data-thumb"))),""!==r.attr("data-thumb-alt")&&a.attr("alt",r.attr("data-thumb-alt")),"thumbnails"===n.vars.controlNav&&!0===n.vars.thumbCaptions){var c=r.attr("data-thumbcaption");if(""!==c&&void 0!==c){var d=$("<span></span>").addClass(i+"caption").text(c);a.append(d)}}var u=$("<li>");a.appendTo(u),u.append("</li>"),n.controlNavScaffold.append(u),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),w=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(w+=d?i:n,m=(a.vars.rtl?-1:1)*w,x=d?Math.abs(w)<Math.abs(-n):Math.abs(w)<Math.abs(-i),e.detail===e.MSGESTURE_FLAG_INERTIA)return void setImmediate(function(){t._gesture.stop()});(!x||Number(new Date)-f>500)&&(e.preventDefault(),!p&&a.transitions&&(a.vars.animationLoop||(m=w/(0===a.currentSlide&&w<0||a.currentSlide===a.last&&w>0?Math.abs(w)/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&&!x&&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,w=0}}var s,o,l,c,m,f,g,h,S,x=!1,y=0,b=0,w=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),y=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:y,o=d?y:b,t.addEventListener("touchmove",h,!1),t.addEventListener("touchend",S,!1))},h=function(e){y=e.touches[0].pageX,b=e.touches[0].pageY,m=d?s-b:(n.vars.rtl?-1:1)*(s-y),x=d?Math.abs(m)<Math.abs(y-o):Math.abs(m)<Math.abs(b-o);var t=500;(!x||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&&!x&&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 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}}()*(n.vars.rtl?1:-1)+"px"}();n.transitions&&(i=n.isFirefox?d?"translate3d(0,"+i+",0)":"translate3d("+parseInt(i)+"px,0,0)":d?"translate3d(0,"+i+",0)":"translate3d("+(n.vars.rtl?-1:1)*parseInt(i)+"px,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.vars.rtl?n.slides.css({width:"100%",float:"right",marginLeft:"-100%",position:"relative"}):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")},"init"===e?100:0)):(n.container.width(200*(n.count+n.cloneCount)+"%"),n.setProps(t*n.computedW,"init"),setTimeout(function(){n.doMath(),n.vars.rtl&&n.isFirefox?n.newSlides.css({width:n.computedW,marginRight:n.computedM,float:"right",display:"block"}):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.isFirefox&&(n.w=n.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,isFirefox:!1,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){},rtl:!1},$.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);
1330;
1331(function($) {
1332  Drupal.behaviors.hideCookieWindow = {
1333    attach: function(context, settings) {
1334      if (document.cookie.indexOf('simple_cookie_compliance_dismissed=1') >= 0) {
1335        $('#cookie-compliance').remove();
1336      }
1337    }
1338  }
1339})(jQuery);;
1340(function ($) {
1341
1342/**
1343 * A progressbar object. Initialized with the given id. Must be inserted into
1344 * the DOM afterwards through progressBar.element.
1345 *
1346 * method is the function which will perform the HTTP request to get the
1347 * progress bar state. Either "GET" or "POST".
1348 *
1349 * e.g. pb = new progressBar('myProgressBar');
1350 *      some_element.appendChild(pb.element);
1351 */
1352Drupal.progressBar = function (id, updateCallback, method, errorCallback) {
1353  var pb = this;
1354  this.id = id;
1355  this.method = method || 'GET';
1356  this.updateCallback = updateCallback;
1357  this.errorCallback = errorCallback;
1358
1359  // The WAI-ARIA setting aria-live="polite" will announce changes after users
1360  // have completed their current activity and not interrupt the screen reader.
1361  this.element = $('<div class="progress" aria-live="polite"></div>').attr('id', id);
1362  this.element.html('<div class="bar"><div class="filled"></div></div>' +
1363                    '<div class="percentage"></div>' +
1364                    '<div class="message">&nbsp;</div>');
1365};
1366
1367/**
1368 * Set the percentage and status message for the progressbar.
1369 */
1370Drupal.progressBar.prototype.setProgress = function (percentage, message) {
1371  if (percentage >= 0 && percentage <= 100) {
1372    $('div.filled', this.element).css('width', percentage + '%');
1373    $('div.percentage', this.element).html(percentage + '%');
1374  }
1375  $('div.message', this.element).html(message);
1376  if (this.updateCallback) {
1377    this.updateCallback(percentage, message, this);
1378  }
1379};
1380
1381/**
1382 * Start monitoring progress via Ajax.
1383 */
1384Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
1385  this.delay = delay;
1386  this.uri = uri;
1387  this.sendPing();
1388};
1389
1390/**
1391 * Stop monitoring progress via Ajax.
1392 */
1393Drupal.progressBar.prototype.stopMonitoring = function () {
1394  clearTimeout(this.timer);
1395  // This allows monitoring to be stopped from within the callback.
1396  this.uri = null;
1397};
1398
1399/**
1400 * Request progress data from server.
1401 */
1402Drupal.progressBar.prototype.sendPing = function () {
1403  if (this.timer) {
1404    clearTimeout(this.timer);
1405  }
1406  if (this.uri) {
1407    var pb = this;
1408    // When doing a post request, you need non-null data. Otherwise a
1409    // HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
1410    $.ajax({
1411      type: this.method,
1412      url: this.uri,
1413      data: '',
1414      dataType: 'json',
1415      success: function (progress) {
1416        // Display errors.
1417        if (progress.status == 0) {
1418          pb.displayError(progress.data);
1419          return;
1420        }
1421        // Update display.
1422        pb.setProgress(progress.percentage, progress.message);
1423        // Schedule next timer.
1424        pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay);
1425      },
1426      error: function (xmlhttp) {
1427        pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri));
1428      }
1429    });
1430  }
1431};
1432
1433/**
1434 * Display errors on the page.
1435 */
1436Drupal.progressBar.prototype.displayError = function (string) {
1437  var error = $('<div class="messages error"></div>').html(string);
1438  $(this.element).before(error).hide();
1439
1440  if (this.errorCallback) {
1441    this.errorCallback(this);
1442  }
1443};
1444
1445})(jQuery);
1446;
1447(function ($) {
1448
1449  Drupal.behaviors.captcha = {
1450    attach: function (context) {
1451
1452      // Turn off autocompletion for the CAPTCHA response field.
1453      // We do it here with JavaScript (instead of directly in the markup)
1454      // because this autocomplete attribute is not standard and
1455      // it would break (X)HTML compliance.
1456      $("#edit-captcha-response").attr("autocomplete", "off");
1457
1458    }
1459  };
1460
1461  Drupal.behaviors.captchaAdmin = {
1462    attach: function (context) {
1463      // Add onclick handler to checkbox for adding a CAPTCHA description
1464      // so that the textfields for the CAPTCHA description are hidden
1465      // when no description should be added.
1466      // @todo: div.form-item-captcha-description depends on theming, maybe
1467      // it's better to add our own wrapper with id (instead of a class).
1468      $("#edit-captcha-add-captcha-description").click(function() {
1469        if ($("#edit-captcha-add-captcha-description").is(":checked")) {
1470          // Show the CAPTCHA description textfield(s).
1471          $("div.form-item-captcha-description").show('slow');
1472        }
1473        else {
1474          // Hide the CAPTCHA description textfield(s).
1475          $("div.form-item-captcha-description").hide('slow');
1476        }
1477      });
1478      // Hide the CAPTCHA description textfields if option is disabled on page load.
1479      if (!$("#edit-captcha-add-captcha-description").is(":checked")) {
1480        $("div.form-item-captcha-description").hide();
1481      }
1482    }
1483
1484  };
1485
1486})(jQuery);
1487;

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.