PageSourceSearch

https://ural-sib.org/sites/ural-sib.org/files/js/js_O5lOYBSLWCXzx6ZysIesAAdn7FSN59iS3JIc1zG_4zA.js

js ural-sib.org collected 2026-10-02 13:13:01 UTC 76,171 bytes, 1,879 lines download raw bytes

1Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"":{"Sun":"Dim","Mon":"Lun","Tue":"Mar","Wed":"Mer","Thu":"\u0134a\u016d","Fri":"Ven","Sat":"Sab","May":"Majo","Value":"Valoro","Select all rows in this table":"Elektu \u0109iujn vicojn en \u0109i tiu tabelo","Deselect all rows in this table":"Malelektu \u0109iujn vicojn en \u0109i tiu tabelo","Join summary":"Kunigu resumon","Split summary at cursor":"Disigu resumon \u0109e montrilo","Unspecified error":"Neindikita eraro","An HTTP error @status occurred. \n@uri":"HTTP-eraro @status okazis. \n@uri","Changes made in this table will not be saved until the form is submitted.":"\u015can\u011doj kreitaj en \u0109i tiu tabulo ne konservi\u011dos \u011dis kiam la formularo submeti\u011das.","Drag to re-order":"Treni por reordigi","An error occurred. \n@uri\n@text":"Eraro okazis. \n@uri\n@text","An error occurred. \n@uri\n(no information available).":"Eraro okazis. \n@uri\n(neniuj informoj disponeblaj).","Enabled":"\u015caltita","Default":"Defa\u016dlto","Configure":"Agordi","Disabled":"Mal\u015daltita","Not published":"Ne publikigita","Wednesday":"Merkredo","Thursday":"\u0134a\u016ddo","Friday":"Vendredo","Saturday":"Sabato","Sunday":"Diman\u0109o","Monday":"Lundo","Tuesday":"Mardo","Your server has been successfully tested to support this feature.":"Via servilo sukcese testi\u011dis por subteni \u0109i tiun funkcion.","Your system configuration does not currently support this feature. The \u003Ca href=\u0022http:\/\/drupal.org\/node\/15365\u0022\u003Ehandbook page on Clean URLs\u003C\/a\u003E has additional troubleshooting information.":"Via sistema agordo nun ne subtenas \u0109i tiun funkcion. La \u003Ca href=\u0022http:\/\/drupal.org\/node\/15365\u0022\u003Emanlibra pa\u011do pri puraj URL-oj\u003C\/a\u003E havas aldonajn korektigajn informojn.","Testing clean URLs...":"Testante purajn URL-ojn...","Edit":"Redakti","Upload":"Al\u015duti","This field is required.":"\u0108i tiu kampo estas deviga.","Only files with the following extensions are allowed: %files-allowed.":"Nur dosieroj kun la jenaj etenda\u0135oj permesi\u011das: %files-allowed.","The changes to these blocks will not be saved until the \u003Cem\u003ESave blocks\u003C\/em\u003E button is clicked.":"La \u015dan\u011doj al \u0109i tiuj blokoj ne konservi\u011dos \u011dis kiam la butono de \u003Cem\u003EKonservi blokojn\u003C\/em\u003E estas klakata.","Remove":"Forigi","Jan":"Jan","Feb":"Feb","Mar":"Mar","Apr":"Apr","Jun":"Jun","Jul":"Jul","Aug":"A\u016dg","Sep":"Sep","Oct":"Okt","Nov":"Nov","Dec":"Dec","All":"\u0108iuj","Add item":"Aldoni eron","Please wait...":"Bonvolu atendi...","Show":"Montri","Add":"Aldonu","January":"januaro","February":"februaro","March":"marto","April":"aprilo","June":"junio","July":"julio","August":"a\u016dgusto","September":"septembro","October":"oktobro","November":"novembro","December":"decembro","Previous":"Anta\u016da","Next":"Sekva","Translatable":"Tradukebla"}} };;
2(function($){Drupal.behaviors.image_caption={attach:function(context,settings){$("img.caption:not(.caption-processed)").each(function(i){var imgwidth=$(this).width()?$(this).width():false;var imgheight=$(this).height()?$(this).height():false;var captiontext=$(this).attr('alt');if(captiontext){if($(this).attr('align')){var alignment=$(this).attr('align');$(this).css({'float':alignment});$(this).removeAttr('align');}else if($(this).css('float')){var alignment=$(this).css('float');}else{var alignment='normal';}
3var style=$(this).attr('style')?$(this).attr('style'):'';$(this).removeAttr('width');$(this).removeAttr('height');$(this).css('width','');$(this).css('height','');$(this).removeAttr('align');$(this).removeAttr('style');$(this).wrap("<span class=\"image-caption-container\" style=\"display:inline-block;"+style+"\"></span>");$(this).parent().addClass('image-caption-container-'+alignment);if(imgwidth){$(this).width(imgwidth);$(this).parent().width(imgwidth);}
4if(imgheight){$(this).height(imgheight);}
5$(this).parent().append("<span style=\"display:block;\" class=\"image-caption\">"+captiontext+"</span>");$(this).addClass('caption-processed');}});}};})(jQuery);
6;
7(function ($) {
8    
9Drupal.behaviors.jquerymenu = { 
10    attach:function(context) {    
11    
12    
13  jqm_showit = function() {
14    $(this).children('.jqm_link_edit').fadeIn();
15  }
16  jqm_hideit = function() {
17    $(this).children('.jqm_link_edit').fadeOut();
18  }
19  $('ul.jquerymenu li').hover(jqm_showit, jqm_hideit);
20  
21  jqm_mouseenter = function() {
22    momma = $(this);
23    if ($(momma).hasClass('closed')){
24      if (Drupal.settings.jquerymenu.animate === 1) {
25        $($(this).siblings('ul').children()).hide().fadeIn('3000');
26        $(momma).children('ul').slideDown('700');
27      }
28      $(momma).removeClass('closed').addClass('open');
29      $(this).removeClass('closed').addClass('open');
30    }    
31  }
32  
33  jqm_mouseleave = function(){
34    momma = $(this);
35    if ($(momma).hasClass('open')){
36      if (Drupal.settings.jquerymenu.animate === 1) {
37        $(momma).children('ul').slideUp('700');
38        $($(this).siblings('ul').children()).fadeOut('3000');
39      }
40      $(momma).removeClass('open').addClass('closed');
41      $(this).removeClass('open').addClass('closed');
42    }
43  }
44
45$('ul.jquerymenu .active').parents('li').removeClass('closed').addClass('open');
46$('ul.jquerymenu .active').parents('li').children('span.parent').removeClass('closed').addClass('open');
47
48  if (Drupal.settings.jquerymenu.hover === 1) {
49    $('ul.jquerymenu:not(.jquerymenu-processed)', context).addClass('jquerymenu-processed').each(function(){
50      $(this).find('li.parent').hover(jqm_mouseenter, jqm_mouseleave);
51    });
52    $('ul.jquerymenu-processed span.parent').remove();
53  }
54
55  else if (Drupal.settings.jquerymenu.hover === 0) {
56    $('ul.jquerymenu:not(.jquerymenu-processed)', context).addClass('jquerymenu-processed').each(function(){
57      $(this).find("li.parent span.parent").click(function(){
58        momma = $(this).parent();
59        if ($(momma).hasClass('closed')){
60          if (Drupal.settings.jquerymenu.animate === 1) {
61            $($(this).siblings('ul').children()).hide().fadeIn('3000');
62            $(momma).children('ul').slideDown('700');
63          }
64          $(momma).removeClass('closed').addClass('open');
65          $(this).removeClass('closed').addClass('open');
66        }
67        else{
68          if (Drupal.settings.jquerymenu.animate === 1) {          
69            $(momma).children('ul').slideUp('700');
70            $($(this).siblings('ul').children()).fadeOut('3000');
71          }
72          $(momma).removeClass('open').addClass('closed');
73          $(this).removeClass('open').addClass('closed');
74        }
75      });
76    });
77  }
78}
79}})(jQuery);;
80// Image Node Auto-Format with Auto Image Grouping.
81// Original version by Steve McKenzie.
82// Altered by Stella Power for jQuery version.
83
84(function ($) {
85
86function parse_url(url, param) {
87  param = param.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
88  url = url.replace(/&amp;/, "&");
89  var regexS = "[\\?&]"+param+"=([^&#]*)";
90  var regex = new RegExp(regexS);
91  var results = regex.exec(url);
92  if (results === null) {
93    return "";
94  }
95  else {
96    return results[1];
97  }
98}
99
100
101function lightbox2_init_triggers(classes, rel_type, custom_class) {
102  if (classes == '' || rel_type == 0) {
103    return;
104  }
105  var settings = Drupal.settings.lightbox2;
106
107  var link_target  = "";
108  if (settings.node_link_target !== 0) {
109    link_target = 'target="'+ settings.node_link_target +'"';
110  }
111
112  $("a:has("+classes+")").each(function(i) {
113    if ((!settings.disable_for_gallery_lists && !settings.disable_for_acidfree_gallery_lists) || (!$(this).parents("td.giAlbumCell").attr("class") && !$(this).parents(".galleries").length && !$(this).parents(".acidfree-folder").length && !$(this).parents(".acidfree-list").length) || ($(this).parents(".galleries").length && !settings.disable_for_gallery_lists) || (($(this).parents(".acidfree-folder").length || $(this).parents(".acidfree-list").length) && !sett
113ings.disable_for_acidfree_gallery_lists)) {
114      var child = $(this).find(classes);
115      // Ensure the child has a class attribute we can work with.
116      if ($(child).attr("class")) {
117        // Set the alt text.
118        var alt = $(child).attr("alt");
119        if (!alt) {
120          alt = "";
121        }
122
123        // Set the image node link text.
124        var link_text = settings.node_link_text;
125        var download_link_text = settings.download_link_text;
126        var rewrite = 1;
127
128        // Set the rel attribute.
129        var rel = "lightbox";
130        var lightframe = false;
131        if (rel_type == "lightframe_ungrouped") {
132          rel = "lightframe[]";
133          lightframe = true;
134        }
135        else if (rel_type == "lightframe") {
136          lightframe = true;
137        }
138        else if (rel_type == "lightbox_ungrouped") {
139          rel = "lightbox[]";
140        }
141        if (rel_type != "lightbox_ungrouped" && rel_type != "lightframe_ungrouped") {
142          rel = rel_type + "[" + $(child).attr("class") + "]";
143        }
144
145        // Set the basic href attribute - need to ensure there's no language
146        // string (e.g. /en) prepended to the URL.
147        var id = null;
148        var href = $(child).attr("src");
149        var download = null;
150        var orig_href = $(this).attr("href");
151        var pattern = new RegExp(settings.file_path);
152        if (orig_href.match(pattern)) {
153          var lang_pattern = new RegExp(Drupal.settings.basePath + "\\w\\w\\/");
154          orig_href = orig_href.replace(lang_pattern, Drupal.settings.basePath);
155        }
156        var frame_href = orig_href;
157        // Handle flickr images.
158        if ($(child).attr("class").match("flickr-photo-img") ||
159          $(child).attr("class").match("flickr-photoset-img")) {
160          href = $(child).attr("src").replace("_s.", ".").replace("_t.", ".").replace("_m.", ".").replace("_b.", ".");
161          if (rel_type != "lightbox_ungrouped" && rel_type != "lightframe_ungrouped") {
162            rel = rel_type + "[flickr]";
163            if ($(child).parents("div.block-flickr").attr("class")) {
164              id = $(child).parents("div.block-flickr").attr("id");
165              rel = rel_type + "["+ id +"]";
166            }
167          }
168          download = href;
169        }
170
171        // Handle "image-img_assist_custom" images.
172        else if ($(child).filter("img[class*=img_assist_custom]").size()) {
173          // Image assist uses "+" signs for spaces which doesn't work for
174          // normal links.
175          if (settings.display_image_size != "original") {
176            orig_href = orig_href.replace(/\+/, " ");
177            href = $(child).attr("src").replace(new RegExp("\\.img_assist_custom-[0-9]+x[0-9]+"), ((settings.display_image_size === "")?settings.display_image_size:"."+ settings.display_image_size));
178            if (rel_type != "lightbox_ungrouped" && rel_type != "lightframe_ungrouped") {
179              rel = rel_type + "[node_images]";
180            }
181            if (lightframe) {
182              frame_href = orig_href + "/lightbox2";
183            }
184          }
185          else {
186            rewrite = 0;
187          }
188        }
189
190        // Handle "inline" images.
191        else if ($(child).attr("class").match("inline")) {
192          href = orig_href;
193        }
194
195        // Handle gallery2 block images.
196        else if ($(child).attr("class").match("ImageFrame_image") || $(child).attr("class").match("ImageFrame_none")) {
197          var thumb_id = parse_url(href, "g2_itemId");
198          var new_id = parse_url(orig_href, "g2_itemId");
199          if (new_id && thumb_id) {
200            var g2pattern = new RegExp("g2_itemId="+thumb_id);
201            var replacement = "g2_itemId="+ new_id;
202            href = href.replace(g2pattern, replacement);
203          }
204          rel = rel_type + "[gallery2]";
205          if ($(child).parents("div.block-gallery").attr("class")) {
206            id = $(child).parents("div.block-gallery").attr("id");
207            rel = rel_type + "["+ id +"]";
208          }
209          download = href;
210        }
211
212
213        // Set the href attribute.
214        else if (settings.image_node_sizes != '()' && !custom_class) {
215          if (settings.display_image_size != "original") {
216            href = $(child).attr("src").replace(new RegExp(settings.image_node_sizes), ((settings.display_image_size === "")?settings.display_image_size:"."+ settings.display_image_size)).replace(/(image\/view\/\d+)(\/[\w\-]*)/, ((settings.display_image_size === "")?"$1/_original":"$1/"+ settings.display_image_size));
217            if (rel_type != "lightbox_ungrouped" && rel_type != "lightframe_ungrouped") {
218              rel = rel_type + "[node_images]";
219              if ($(child).parents("div.block-multiblock,div.block-image").attr("class")) {
220                id = $(child).parents("div.block-multiblock,div.block-image").attr("id");
221                rel = rel_type + "["+ id +"]";
222              }
223            }
224            download = $(child).attr("src").replace(new RegExp(settings.image_node_sizes), "").replace(/(image\/view\/\d+)(\/[\w\-]*)/, "$1/_original");
225            if (lightframe) {
226              frame_href = orig_href + "/lightbox2";
227            }
228          }
229          else {
230            rewrite = 0;
231          }
232        }
233        // Modify the image url.
234        var img_title = $(child).attr("title");
235        if (!img_title) {
236          img_title = $(this).attr("title");
237          if (!img_title) {
238            img_title = $(child).attr("alt");
239          }
240          $(child).attr({title: img_title});
241        }
242        if (lightframe) {
243          href = frame_href;
244        }
245        if (rewrite) {
246          if (!custom_class) {
247            var title_link = "";
248            if (link_text.length) {
249              title_link = "<br /><br /><a href=\"" + orig_href + "\" id=\"lightbox2-node-link-text\" "+ link_target +" >"+ link_text + "</a>";
250            }
251            if (download_link_text.length && download) {
252              title_link = title_link + " - <a href=\"" + download + "\" id=\"lightbox2-download-l
252ink-text\" target=\"_blank\">" + download_link_text + "</a>";
253            }
254            rel = rel + "[" + img_title + title_link + "]";
255            $(this).attr({
256              rel: rel,
257              href: href
258            });
259          }
260          else {
261            if (rel_type != "lightbox_ungrouped" && rel_type != "lightframe_ungrouped") {
262              rel = rel_type + "[" + $(child).attr("class") + "]";
263              if ($(child).parents("div.block-image").attr("class")) {
264                id = $(child).parents("div.block-image").attr("id");
265                rel = rel_type + "["+ id +"]";
266              }
267            }
268            rel = rel + "[" + img_title + "]";
269            $(this).attr({
270              rel: rel,
271              href: orig_href
272            });
273          }
274        }
275      }
276    }
277
278  });
279}
280
281function lightbox2_image_nodes() {
282  var settings = Drupal.settings.lightbox2;
283
284  // Don't do it on the image assist popup selection screen.
285  var img_assist = document.getElementById("img_assist_thumbs");
286  if (!img_assist) {
287
288    // Select the enabled image types.
289    lightbox2_init_triggers(settings.trigger_lightbox_classes, "lightbox_ungrouped");
290    lightbox2_init_triggers(settings.custom_trigger_classes, settings.custom_class_handler, true);
291    lightbox2_init_triggers(settings.trigger_lightbox_group_classes, "lightbox");
292    lightbox2_init_triggers(settings.trigger_slideshow_classes, "lightshow");
293    lightbox2_init_triggers(settings.trigger_lightframe_classes, "lightframe_ungrouped");
294    lightbox2_init_triggers(settings.trigger_lightframe_group_classes, "lightframe");
295  }
296}
297
298Drupal.behaviors.initAutoLightbox = {
299  attach: function(context, settings) {
300    lightbox2_image_nodes();
301  }
302};
303
304//End jQuery block
305}(jQuery));
306;
307/* $Id: lightbox.js,v 1.5.2.6.2.136 2010/09/24 08:39:40 snpower Exp $ */
308
309/**
310 * jQuery Lightbox
311 * @author
312 *   Stella Power, <http://drupal.org/user/66894>
313 *
314 * Based on Lightbox v2.03.3 by Lokesh Dhakar
315 * <http://www.huddletogether.com/projects/lightbox2/>
316 * Also partially based on the jQuery Lightbox by Warren Krewenki
317 *   <http://warren.mesozen.com>
318 *
319 * Permission has been granted to Mark Ashmead & other Drupal Lightbox2 module
320 * maintainers to distribute this file via Drupal.org
321 * Under GPL license.
322 *
323 * Slideshow, iframe and video functionality added by Stella Power.
324 */
325
326var Lightbox;
327(function($) {
328Lightbox = {
329  auto_modal : false,
330  overlayOpacity : 0.8, // Controls transparency of shadow overlay.
331  overlayColor : '000', // Controls colour of shadow overlay.
332  disableCloseClick : true,
333  // Controls the order of the lightbox resizing animation sequence.
334  resizeSequence: 0, // 0: simultaneous, 1: width then height, 2: height then width.
335  resizeSpeed: 'normal', // Controls the speed of the lightbox resizing animation.
336  fadeInSpeed: 'normal', // Controls the speed of the image appearance.
337  slideDownSpeed: 'slow', // Controls the speed of the image details appearance.
338  minWidth: 240,
339  borderSize : 10,
340  boxColor : 'fff',
341  fontColor : '000',
342  topPosition : '',
343  infoHeight: 20,
344  alternative_layout : false,
345  imageArray : [],
346  imageNum : null,
347  total : 0,
348  activeImage : null,
349  inprogress : false,
350  disableResize : false,
351  disableZoom : false,
352  isZoomedIn : false,
353  rtl : false,
354  loopItems : false,
355  keysClose : ['c', 'x', 27],
356  keysPrevious : ['p', 37],
357  keysNext : ['n', 39],
358  keysZoom : ['z'],
359  keysPlayPause : [32],
360
361  // Slideshow options.
362  slideInterval : 5000, // In milliseconds.
363  showPlayPause : true,
364  autoStart : true,
365  autoExit : true,
366  pauseOnNextClick : false, // True to pause the slideshow when the "Next" button is clicked.
367  pauseOnPrevClick : true, // True to pause the slideshow when the "Prev" button is clicked.
368  slideIdArray : [],
369  slideIdCount : 0,
370  isSlideshow : false,
371  isPaused : false,
372  loopSlides : false,
373
374  // Iframe options.
375  isLightframe : false,
376  iframe_width : 600,
377  iframe_height : 400,
378  iframe_border : 1,
379
380  // Video and modal options.
381  enableVideo : false,
382  flvPlayer : '/flvplayer.swf',
383  flvFlashvars : '',
384  isModal : false,
385  isVideo : false,
386  videoId : false,
387  modalWidth : 400,
388  modalHeight : 400,
389  modalHTML : null,
390
391
392  // initialize()
393  // Constructor runs on completion of the DOM loading.
394  // The function inserts html at the bottom of the page which is used
395  // to display the shadow overlay and the image container.
396  initialize: function() {
397
398    var s = Drupal.settings.lightbox2;
399    Lightbox.overlayOpacity = s.overlay_opacity;
400    Lightbox.overlayColor = s.overlay_color;
401    Lightbox.disableCloseClick = s.disable_close_click;
402    Lightbox.resizeSequence = s.resize_sequence;
403    Lightbox.resizeSpeed = s.resize_speed;
404    Lightbox.fadeInSpeed = s.fade_in_speed;
405    Lightbox.slideDownSpeed = s.slide_down_speed;
406    Lightbox.borderSize = s.border_size;
407    Lightbox.boxColor = s.box_color;
408    Lightbox.fontColor = s.font_color;
409    Lightbox.topPosition = s.top_position;
410    Lightbox.rtl = s.rtl;
411    Lightbox.loopItems = s.loop_items;
412    Lightbox.keysClose = s.keys_close.split(" ");
413    Lightbox.keysPrevious = s.keys_previous.split(" ");
414    Lightbox.keysNext = s.keys_next.split(" ");
415    Lightbox.keysZoom = s.keys_zoom.split(" ");
416    Lightbox.keysPlayPause = s.keys_play_pause.split(" ");
417    Lightbox.disableResize = s.disable_resize;
418    Lightbox.disableZoom = s.disable_zoom;
419    Lightbox.slideInterval = s.slideshow_interval;
420    Lightbox.showPlayPause = s.show_play_pause;
421    Lightbox.showCaption = s.show_caption;
422    Lightbox.autoStart = s.slideshow_automatic_start;
423    Lightbox.autoExit = s.slideshow_automatic_exit;
424    Lightbox.pauseOnNextClick = s.pause_on_next_click;
425    Lightbox.pauseOnPrevClick = s.pause_on_previous_click;
426    Lightbox.loopSlides = s.loop_slides;
427    Lightbox.alternative_layout = s.use_alt_layout;
428    Lightbox.iframe_width = s.iframe_width;
429    Lightbox.iframe_height = s.iframe_height;
430    Lightbox.iframe_border = s.iframe_border;
431    Lightbox.enableVideo = s.enable_video;
432    if (s.enable_video) {
433      Lightbox.flvPlayer = s.flvPlayer;
434      Lightbox.flvFlashvars = s.flvFlashvars;
435    }
436
437    // Make the lightbox divs.
438    var layout_class = (s.use_alt_layout ? 'lightbox2-alt-layout' : 'lightbox2-orig-layout');
439    var output = '<div id="lightbox2-overlay" style="display: none;"></div>\
440      <div id="lightbox" style="display: none;" class="' + layout_class + '">\
441        <div id="outerImageContainer"></div>\
442        <div id="imageDataContainer" class="clearfix">\
443          <div id="imageData"></div>\
444        </div>\
445      </div>';
446    var loading = '<div id="loading"><a href="#" id="loadingLink"></a></div>';
447    var modal = '<div id="modalContainer" style="display: none;"></div>';
448    var frame = '<div id="frameContainer" style="display: none;"></div>';
449    var imageContainer = '<div id="imageContainer" style="display: none;"></div>';
450    var details = '<div id="imageDetails"></div>';
451    var bottomNav = '<div id="bottomNav"></div>';
452    var image = '<img id="lightboxImage" alt="" />';
453    var hoverNav = '<div id="hoverNav"><a id="prevLink" href="#"></a><a id="nextLink" href="#"></a></div>';
454    var frameNav = '<div id="frameHoverNav"><a id="framePrevLink" href="#"></a><a id="frameNextLink" href="#"></a></div>';
455    var hoverNav = '<div id="hoverNav"><a id="prevLink" title="' + Drupal.t('Previous') + '" href="#"></a><a id="nextLink" title="' + Drupal.t('Next') + '" href="#"></a></div>';
456    var frameNav = '<div id="frameHoverNav"><a id="framePrevLink" title="' + Drupal.t('Previous') + '" href="#"></a><a id="frameNextLink" title="' + Drupal.t('Next') + '" href="#"></a></div>';
457    var caption = '<span id="caption"></span>';
458    var numberDisplay = '<span id="numberDisplay"></span>';
459    var close = '<a id="bottomNavClose" title="' + Drupal.t('Close') + '" href="#"></a>';
460    var zoom = '<a id="bottomNavZoom" href="#"></a>';
461    var zoomOut = '<a id="bottomNavZoomOut" href="#"></a>';
462    var pause = '<a id="lightshowPause" title="' + Drupal.t('Pause Slideshow') + '" href="#" style="display: none;"></a>';
463    var play = '<a id="lightshowPlay" title="' + Drupal.t('Play Slideshow') + '" href="#" style="display: none;"></a>';
464
465    $("body").append(output);
466    $('#outerImageContainer').append(modal + frame + imageContainer + loading);
467    if (!s.use_alt_layout) {
468      $('#imageContainer').append(image + hoverNav);
469      $('#imageData').append(details + bottomNav);
470      $('#imageDetails').append(caption + numberDisplay);
471      $('#bottomNav').append(frameNav + close + zoom + zoomOut + pause + play);
472    }
473    else {
474      $('#outerImageContainer').append(bottomNav);
475      $('#imageContainer').append(image);
476      $('#bottomNav').append(close + zoom + zoomOut);
477      $('#imageData').append(hoverNav + details);
478      $('#imageDetails').append(caption + numberDisplay + pause + play);
479    }
480
481    // Setup onclick handlers.
482    if (Lightbox.disableCloseClick) {
483      $('#lightbox2-overlay').click(function() { Lightbox.end(); return false; } ).hide();
484    }
485    $('#loadingLink, #bottomNavClose').click(function() { Lightbox.end('forceClose'); return false; } );
486    $('#prevLink, #framePrevLink').click(function() { Lightbox.changeData(Lightbox.activeImage - 1); return false; } );
487    $('#nextLink, #frameNextLink').click(function() { Lightbox.changeData(Lightbox.activeImage + 1); return false; } );
488    $('#bottomNavZoom').click(function() { Lightbox.changeData(Lightbox.activeImage, true); return false; } );
489    $('#bottomNavZoomOut').click(function() { Lightbox.changeData(Lightbox.activeImage, false); return false; } );
490    $('#lightshowPause').click(function() { Lightbox.togglePlayPause("lightshowPause", "lightshowPlay"); return false; } );
491    $('#lightshowPlay').click(function() { Lightbox.togglePlayPause("lightshowPlay", "lightshowPause"); return false; } );
492
493    // Fix positioning.
494    $('#prevLink, #nextLink, #framePrevLink, #frameNextLink').css({ 'paddingTop': Lightbox.borderSize + 'px'});
495    $('#imageContainer, #frameContainer, #modalContainer').css({ 'padding': Lightbox.borderSize + 'px'});
496    $('#outerImageContainer, #imageDataContainer, #bottomNavClose').css({'backgroundColor': '#' + Lightbox.boxColor, 'color': '#'+Lightbox.fontColor});
497    if (Lightbox.alternative_layout) {
498      $('#bottomNavZoom, #bottomNavZoomOut').css({'bottom': Lightbox.borderSize + 'px', 'right': Lightbox.borderSize + 'px'});
499    }
500    else if (Lightbox.rtl == 1 && Drupal.settings.lightbox2.useragent.search('MSIE') !== -1) {
501      $('#bottomNavZoom, #bottomNavZoomOut').css({'left': '0px'});
502    }
503
504    // Force navigation links to always be displayed
505    if (s.force_show_nav) {
506      $('#prevLink, #nextLink').addClass("force_show_nav");
507    }
508
509  },
510
511  // initList()
512  // Loops through anchor tags looking for 'lightbox', 'lightshow' and
513  // 'lightframe', etc, references and applies onclick events to appropriate
514  // links. You can rerun after dynamically adding images w/ajax.
515  initList : function(context) {
516
517    if (context == undefined || context == null) {
518      context = document;
519    }
520
521    // Attach lightbox to any links with rel 'lightbox', 'lightshow' or
522    // 'lightframe', etc.
523    $("a[rel^='lightbox']:not(.lightbox-processed), area[rel^='lightbox']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
524      if (Lightbox.disableCloseClick) {
525        $('#lightbox').unbind('click');
526        $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
527      }
528      Lightbox.start(this, false, false, false, false);
529      if (e.preventDefault) { e.preventDefault(); }
530      return false;
531    });
532    $("a[rel^='lightshow']:not(.lightbox-processed), area[rel^='lightshow']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
533      if (Lightbox.disableCloseClick) {
534        $('#lightbox').unbind('click');
535        $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
536      }
537      Lightbox.start(this, true, false, false, false);
538      if (e.preventDefault) { e.preventDefault(); }
539      return false;
540    });
541    $("a[rel^='lightframe']:not(.lightbox-processed), area[rel^='lightframe']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
542      if (Lightbox.disableCloseClick) {
543        $('#lightbox').unbind('click');
544        $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
545      }
546      Lightbox.start(this, false, true, false, false);
547      if (e.preventDefault) { e.preventDefault(); }
548      return false;
549    });
550    if (Lightbox.enableVideo) {
551      $("a[rel^='lightvideo']:not(.lightbox-processed), area[rel^='lightvideo']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
552        if (Lightbox.disableCloseClick) {
553          $('#lightbox').unbind('click');
554          $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
555        }
556        Lightbox.start(this, false, false, true, false);
557        if (e.preventDefault) { e.preventDefault(); }
558        return false;
559      });
560    }
561    $("a[rel^='lightmodal']:not(.lightbox-processed), area[rel^='lightmodal']:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
562      $('#lightbox').unbind('click');
563      // Add classes from the link to the lightbox div - don't include lightbox-processed
564      $('#lightbox').addClass($(this).attr('class'));
565      $('#lightbox').removeClass('lightbox-processed');
566      Lightbox.start(this, false, false, false, true);
567      if (e.preventDefault) { e.preventDefault(); }
568      return false;
569    });
570    $("#lightboxAutoModal:not(.lightbox-processed)", context).addClass('lightbox-processed').click(function(e) {
571      Lightbox.auto_modal = true;
572      $('#lightbox').unbind('click');
573      Lightbox.start(this, false, false, false, true);
574      if (e.preventDefault) { e.preventDefault(); }
575      return false;
576    });
577  },
578
579  // start()
580  // Display overlay and lightbox. If image is part of a set, add siblings to
581  // imageArray.
582  start: function(imageLink, slideshow, lightframe, lightvideo, lightmodal) {
583
584    Lightbox.isPaused = !Lightbox.autoStart;
585
586    // Replaces hideSelectBoxes() and hideFlash() calls in original lightbox2.
587    Lightbox.toggleSelectsFlash('hide');
588
589    // Stretch overlay to fill page and fade in.
590    var arrayPageSize = Lightbox.getPageSize();
591    $("#lightbox2-overlay").hide().css({
592      'width': '100%',
593      'zIndex': '10090',
594      'height': arrayPageSize[1] + 'px',
595      'backgroundColor' : '#' + Lightbox.overlayColor
596    });
597    // Detect OS X FF2 opacity + flash issue.
598    if (lightvideo && this.detectMacFF2()) {
599      $("#lightbox2-overlay").removeClass("overlay_default");
600      $("#lightbox2-overlay").addClass("overlay_macff2");
601      $("#lightbox2-overlay").css({'opacity' : null});
602    }
603    else {
604      $("#lightbox2-overlay").removeClass("overlay_macff2");
605      $("#lightbox2-overlay").addClass("overlay_default");
606      $("#lightbox2-overlay").css({'opacity' : Lightbox.overlayOpacity});
607    }
608    $("#lightbox2-overlay").fadeIn(Lightbox.fadeInSpeed);
609
610
611    Lightbox.isSlideshow = slideshow;
612    Lightbox.isLightframe = lightframe;
613    Lightbox.isVideo = lightvideo;
614    Lightbox.isModal = lightmodal;
615    Lightbox.imageArray = [];
616    Lightbox.imageNum = 0;
617
618    var anchors = $(imageLink.tagName);
619    var anchor = null;
620    var rel_parts = Lightbox.parseRel(imageLink);
621    var rel = rel_parts["rel"];
622    var rel_group = rel_parts["group"];
623    var title = (rel_parts["title"] ? rel_parts["title"] : imageLink.title);
624    var rel_style = null;
625    var i = 0;
626
627    if (rel_parts["flashvars"]) {
628      Lightbox.flvFlashvars = Lightbox.flvFlashvars + '&' + rel_parts["flashvars"];
629    }
630
631    // Set the title for image alternative text.
632    var alt = imageLink.title;
633    if (!alt) {
634      var img = $(imageLink).find("img");
635      if (img && $(img).attr("alt")) {
636        alt = $(img).attr("alt");
637      }
638      else {
639        alt = title;
640      }
641    }
642
643    if ($(imageLink).attr('id') == 'lightboxAutoModal') {
644      rel_style = rel_parts["style"];
645      Lightbox.imageArray.push(['#lightboxAutoModal > *', title, alt, rel_style, 1]);
646    }
647    else {
648      // Handle lightbox images with no grouping.
649      if ((rel == 'lightbox' || rel == 'lightshow') && !rel_group) {
650        Lightbox.imageArray.push([imageLink.href, title, alt]);
651      }
652
653      // Handle other items with no grouping.
654      else if (!rel_group) {
655        rel_style = rel_parts["style"];
656        Lightbox.imageArray.push([imageLink.href, title, alt, rel_style]);
657      }
658
659      // Handle grouped items.
660      else {
661
662        // Loop through anchors and add them to imageArray.
663        for (i = 0; i < anchors.length; i++) {
664          anchor = anchors[i];
665          if (anchor.href && typeof(anchor.href) == "string" && $(anchor).attr('rel')) {
666            var rel_data = Lightbox.parseRel(anchor);
667            var anchor_title = (rel_data["title"] ? rel_data["title"] : anchor.title);
668            img_alt = anchor.title;
669            if (!img_alt) {
670              var anchor_img = $(anchor).find("img");
671              if (anchor_img && $(anchor_img).attr("alt")) {
672                img_alt = $(anchor_img).attr("alt");
673              }
674              else {
675                img_alt = title;
676              }
677            }
678            if (rel_data["rel"] == rel) {
679              if (rel_data["group"] == rel_group) {
680                if (Lightbox.isLightframe || Lightbox.isModal || Lightbox.isVideo) {
681                  rel_style = rel_data["style"];
682                }
683                Lightbox.imageArray.push([anchor.href, anchor_title, img_alt, rel_style]);
684              }
685            }
686          }
687        }
688
689        // Remove duplicates.
690        for (i = 0; i < Lightbox.imageArray.length; i++) {
691          for (j = Lightbox.imageArray.length-1; j > i; j--) {
692            if (Lightbox.imageArray[i][0] == Lightbox.imageArray[j][0]) {
693              Lightbox.imageArray.splice(j,1);
694            }
695          }
696        }
697        while (Lightbox.imageArray[Lightbox.imageNum][0] != imageLink.href) {
698          Lightbox.imageNum++;
699        }
700      }
701    }
702
703    if (Lightbox.isSlideshow && Lightbox.showPlayPause && Lightbox.isPaused) {
704      $('#lightshowPlay').show();
705      $('#lightshowPause').hide();
706    }
707
708    // Calculate top and left offset for the lightbox.
709    var arrayPageScroll = Lightbox.getPageScroll();
710    var lightboxTop = arrayPageScroll[1] + (Lightbox.topPosition == '' ? (arrayPageSize[3] / 10) : Lightbox.topPosition) * 1;
711    var lightboxLeft = arrayPageScroll[0];
712    $('#frameContainer, #modalContainer, #lightboxImage').hide();
713    $('#hoverNav, #prevLink, #nextLink, #frameHoverNav, #framePrevLink, #frameNextLink').hide();
714    $('#imageDataContainer, #numberDisplay, #bottomNavZoom, #bottomNavZoomOut').hide();
715    $('#outerImageContainer').css({'width': '250px', 'height': '250px'});
716    $('#lightbox').css({
717      'zIndex': '10500',
718      'top': lightboxTop + 'px',
719      'left': lightboxLeft + 'px'
720    }).show();
721
722    Lightbox.total = Lightbox.imageArray.length;
723    Lightbox.changeData(Lightbox.imageNum);
724  },
725
726  // changeData()
727  // Hide most elements and preload image in preparation for resizing image
728  // container.
729  changeData: function(imageNum, zoomIn) {
730
731    if (Lightbox.inprogress === false) {
732      if (Lightbox.total > 1 && ((Lightbox.isSlideshow && Lightbox.loopSlides) || (!Lightbox.isSlideshow && Lightbox.loopItems))) {
733        if (imageNum >= Lightbox.total) imageNum = 0;
734        if (imageNum < 0) imageNum = Lightbox.total - 1;
735      }
736
737      if (Lightbox.isSlideshow) {
738        for (var i = 0; i < Lightbox.slideIdCount; i++) {
739          window.clearTimeout(Lightbox.slideIdArray[i]);
740        }
741      }
742      Lightbox.inprogress = true;
743      Lightbox.activeImage = imageNum;
744
745      if (Lightbox.disableResize && !Lightbox.isSlideshow) {
746        zoomIn = true;
747      }
748      Lightbox.isZoomedIn = zoomIn;
749
750
751      // Hide elements during transition.
752      $('#loading').css({'zIndex': '10500'}).show();
753      if (!Lightbox.alternative_layout) {
754        $('#imageContainer').hide();
755      }
756      $('#frameContainer, #modalContainer, #lightboxImage').hide();
757      $('#hoverNav, #prevLink, #nextLink, #frameHoverNav, #framePrevLink, #frameNextLink').hide();
758      $('#imageDataContainer, #numberDisplay, #bottomNavZoom, #bottomNavZoomOut').hide();
759
760      // Preload image content, but not iframe pages.
761      if (!Lightbox.isLightframe && !Lightbox.isVideo && !Lightbox.isModal) {
762        $("#lightbox #imageDataContainer").removeClass('lightbox2-alt-layout-data');
763        imgPreloader = new Image();
764        imgPreloader.onerror = function() { Lightbox.imgNodeLoadingError(this); };
765
766        imgPreloader.onload = function() {
767          var photo = document.getElementById('lightboxImage');
768          photo.src = Lightbox.imageArray[Lightbox.activeImage][0];
769          photo.alt = Lightbox.imageArray[Lightbox.activeImage][2];
770
771          var imageWidth = imgPreloader.width;
772          var imageHeight = imgPreloader.height;
773
774          // Resize code.
775          var arrayPageSize = Lightbox.getPageSize();
776          var targ = { w:arrayPageSize[2] - (Lightbox.borderSize * 2), h:arrayPageSize[3] - (Lightbox.borderSize * 6) - (Lightbox.infoHeight * 4) - (arrayPageSize[3] / 10) };
777          var orig = { w:imgPreloader.width, h:imgPreloader.height };
778
779          // Image is very large, so show a smaller version of the larger image
780          // with zoom button.
781          if (zoomIn !== true) {
782            var ratio = 1.0; // Shrink image with the same aspect.
783            $('#bottomNavZoomOut, #bottomNavZoom').hide();
784            if ((orig.w >= targ.w || orig.h >= targ.h) && orig.h && orig.w) {
785              ratio = ((targ.w / orig.w) < (targ.h / orig.h)) ? targ.w / orig.w : targ.h / orig.h;
786              if (!Lightbox.disableZoom && !Lightbox.isSlideshow) {
787                $('#bottomNavZoom').css({'zIndex': '10500'}).show();
788              }
789            }
790
791            imageWidth  = Math.floor(orig.w * ratio);
792            imageHeight = Math.floor(orig.h * ratio);
793          }
794
795          else {
796            $('#bottomNavZoom').hide();
797            // Only display zoom out button if the image is zoomed in already.
798            if ((orig.w >= targ.w || orig.h >= targ.h) && orig.h && orig.w) {
799              // Only display zoom out button if not a slideshow and if the
800              // buttons aren't disabled.
801              if (!Lightbox.disableResize && Lightbox.isSlideshow === false && !Lightbox.disableZoom) {
802                $('#bottomNavZoomOut').css({'zIndex': '10500'}).show();
803              }
804            }
805          }
806
807          photo.style.width = (imageWidth) + 'px';
808          photo.style.height = (imageHeight) + 'px';
809          Lightbox.resizeContainer(imageWidth, imageHeight);
810
811          // Clear onLoad, IE behaves irratically with animated gifs otherwise.
812          imgPreloader.onload = function() {};
813        };
814
815        imgPreloader.src = Lightbox.imageArray[Lightbox.activeImage][0];
816        imgPreloader.alt = Lightbox.imageArray[Lightbox.activeImage][2];
817      }
818
819      // Set up frame size, etc.
820      else if (Lightbox.isLightframe) {
821        $("#lightbox #imageDataContainer").addClass('lightbox2-alt-layout-data');
822        var src = Lightbox.imageArray[Lightbox.activeImage][0];
823        $('#frameContainer').html('<iframe id="lightboxFrame" style="display: none;" src="'+src+'"></iframe>');
824
825        // Enable swf support in Gecko browsers.
826        if (Drupal.settings.lightbox2.useragent.search('Mozilla') !== -1 && src.indexOf('.swf') != -1) {
827          setTimeout(function () {
828            document.getElementById("lightboxFrame").src = Lightbox.imageArray[Lightbox.activeImage][0];
829          }, 1000);
830        }
831
832        if (!Lightbox.iframe_border) {
833          $('#lightboxFrame').css({'border': 'none'});
834          $('#lightboxFrame').attr('frameborder', '0');
835        }
836        var iframe = document.getElementById('lightboxFrame');
837        var iframeStyles = Lightbox.imageArray[Lightbox.activeImage][3];
838        iframe = Lightbox.setStyles(iframe, iframeStyles);
839        Lightbox.resizeContainer(parseInt(iframe.width, 10), parseInt(iframe.height, 10));
840      }
841      else if (Lightbox.isVideo || Lightbox.isModal) {
842        $("#lightbox #imageDataContainer").addClass('lightbox2-alt-layout-data');
843        var container = document.getElementById('modalContainer');
844        var modalStyles = Lightbox.imageArray[Lightbox.activeImage][3];
845        container = Lightbox.setStyles(container, modalStyles);
846        if (Lightbox.isVideo) {
847          Lightbox.modalHeight =  parseInt(container.height, 10) - 10;
848          Lightbox.modalWidth =  parseInt(container.width, 10) - 10;
849          Lightvideo.startVideo(Lightbox.imageArray[Lightbox.activeImage][0]);
850        }
851        Lightbox.resizeContainer(parseInt(container.width, 10), parseInt(container.height, 10));
852      }
853    }
854  },
855
856  // imgNodeLoadingError()
857  imgNodeLoadingError: function(image) {
858    var s = Drupal.settings.lightbox2;
859    var original_image = Lightbox.imageArray[Lightbox.activeImage][0];
860    if (s.display_image_size !== "") {
861      original_image = original_image.replace(new RegExp("."+s.display_image_size), "");
862    }
863    Lightbox.imageArray[Lightbox.activeImage][0] = original_image;
864    image.onerror = function() { Lightbox.imgLoadingError(image); };
865    image.src = original_image;
866  },
867
868  // imgLoadingError()
869  imgLoadingError: function(image) {
870    var s = Drupal.settings.lightbox2;
871    Lightbox.imageArray[Lightbox.activeImage][0] = s.default_image;
872    image.src = s.default_image;
873  },
874
875  // resizeContainer()
876  resizeContainer: function(imgWidth, imgHeight) {
877
878    imgWidth = (imgWidth < Lightbox.minWidth ? Lightbox.minWidth : imgWidth);
879
880    this.widthCurrent = $('#outerImageContainer').width();
881    this.heightCurrent = $('#outerImageContainer').height();
882
883    var widthNew = (imgWidth  + (Lightbox.borderSize * 2));
884    var heightNew = (imgHeight  + (Lightbox.borderSize * 2));
885
886    // Scalars based on change from old to new.
887    this.xScale = ( widthNew / this.widthCurrent) * 100;
888    this.yScale = ( heightNew / this.heightCurrent) * 100;
889
890    // Calculate size difference between new and old image, and resize if
891    // necessary.
892    wDiff = this.widthCurrent - widthNew;
893    hDiff = this.heightCurrent - heightNew;
894
895    $('#modalContainer').css({'width': imgWidth, 'height': imgHeight});
896    // Detect animation sequence.
897    if (Lightbox.resizeSequence) {
898      var animate1 = {width: widthNew};
899      var animate2 = {height: heightNew};
900      if (Lightbox.resizeSequence == 2) {
901        animate1 = {height: heightNew};
902        animate2 = {width: widthNew};
903      }
904      $('#outerImageContainer').animate(animate1, Lightbox.resizeSpeed).animate(animate2, Lightbox.resizeSpeed, 'linear', function() { Lightbox.showData(); });
905    }
906    // Simultaneous.
907    else {
908      $('#outerImageContainer').animate({'width': widthNew, 'height': heightNew}, Lightbox.resizeSpeed, 'linear', function() { Lightbox.showData(); });
909    }
910
911    // If new and old image are same size and no scaling transition is necessary
912    // do a quick pause to prevent image flicker.
913    if ((hDiff === 0) && (wDiff === 0)) {
914      if (Drupal.settings.lightbox2.useragent.search('MSIE') !== -1) {
915        Lightbox.pause(250);
916      }
917      else {
918        Lightbox.pause(100);
919      }
920    }
921
922    var s = Drupal.settings.lightbox2;
923    if (!s.use_alt_layout) {
924      $('#prevLink, #nextLink').css({'height': imgHeight + 'px'});
925    }
926    $('#imageDataContainer').css({'width': widthNew + 'px'});
927  },
928
929  // showData()
930  // Display image and begin preloading neighbors.
931  showData: function() {
932    $('#loading').hide();
933
934    if (Lightbox.isLightframe || Lightbox.isVideo || Lightbox.isModal) {
935      Lightbox.updateDetails();
936      if (Lightbox.isLightframe) {
937        $('#frameContainer').show();
938        if (Drupal.settings.lightbox2.useragent.search('Safari') !== -1 || Lightbox.fadeInSpeed === 0) {
939          $('#lightboxFrame').css({'zIndex': '10500'}).show();
940        }
941        else {
942          $('#lightboxFrame').css({'zIndex': '10500'}).fadeIn(Lightbox.fadeInSpeed);
943        }
944      }
945      else {
946        if (Lightbox.isVideo) {
947          $("#modalContainer").html(Lightbox.modalHTML).click(function(){return false;}).css('zIndex', '10500').show();
948        }
949        else {
950          var src = unescape(Lightbox.imageArray[Lightbox.activeImage][0]);
951          if (Lightbox.imageArray[Lightbox.activeImage][4]) {
952            $(src).appendTo("#modalContainer");
953            $('#modalContainer').css({'zIndex': '10500'}).show();
954          }
955          else {
956            // Use a callback to show the new image, otherwise you get flicker.
957            $("#modalContainer").hide().load(src, function () {$('#modalContainer').css({'zIndex': '10500'}).show();});
958          }
959          $('#modalContainer').unbind('click');
960        }
961        // This might be needed in the Lightframe section above.
962        //$('#modalContainer').css({'zIndex': '10500'}).show();
963      }
964    }
965
966    // Handle display of image content.
967    else {
968      $('#imageContainer').show();
969      if (Drupal.settings.lightbox2.useragent.search('Safari') !== -1 || Lightbox.fadeInSpeed === 0) {
970        $('#lightboxImage').css({'zIndex': '10500'}).show();
971      }
972      else {
973        $('#lightboxImage').css({'zIndex': '10500'}).fadeIn(Lightbox.fadeInSpeed);
974      }
975      Lightbox.updateDetails();
976      this.preloadNeighborImages();
977    }
978    Lightbox.inprogress = false;
979
980    // Slideshow specific stuff.
981    if (Lightbox.isSlideshow) {
982      if (!Lightbox.loopSlides && Lightbox.activeImage == (Lightbox.total - 1)) {
983        if (Lightbox.autoExit) {
984          Lightbox.slideIdArray[Lightbox.slideIdCount++] = setTimeout(function () {Lightbox.end('slideshow');}, Lightbox.slideInterval);
985        }
986      }
987      else {
988        if (!Lightbox.isPaused && Lightbox.total > 1) {
989          Lightbox.slideIdArray[Lightbox.slideIdCount++] = setTimeout(function () {Lightbox.changeData(Lightbox.activeImage + 1);}, Lightbox.slideInterval);
990        }
991      }
992      if (Lightbox.showPlayPause && Lightbox.total > 1 && !Lightbox.isPaused) {
993        $('#lightshowPause').show();
994        $('#lightshowPlay').hide();
995      }
996      else if (Lightbox.showPlayPause && Lightbox.total > 1) {
997        $('#lightshowPause').hide();
998        $('#lightshowPlay').show();
999      }
1000    }
1001
1002    // Adjust the page overlay size.
1003    var arrayPageSize = Lightbox.getPageSize();
1004    var arrayPageScroll = Lightbox.getPageScroll();
1005    var pageHeight = arrayPageSize[1];
1006    if (Lightbox.isZoomedIn && arrayPageSize[1] > arrayPageSize[3]) {
1007      var lightboxTop = (Lightbox.topPosition == '' ? (arrayPageSize[3] / 10) : Lightbox.topPosition) * 1;
1008      pageHeight = pageHeight + arrayPageScroll[1] + lightboxTop;
1009    }
1010    $('#lightbox2-overlay').css({'height': pageHeight + 'px', 'width': arrayPageSize[0] + 'px'});
1011
1012    // Gecko browsers (e.g. Firefox, SeaMonkey, etc) don't handle pdfs as
1013    // expected.
1014    if (Drupal.settings.lightbox2.useragent.search('Mozilla') !== -1) {
1015      if (Lightbox.imageArray[Lightbox.activeImage][0].indexOf(".pdf") != -1) {
1016        setTimeout(function () {
1017          document.getElementById("lightboxFrame").src = Lightbox.imageArray[Lightbox.activeImage][0];
1018        }, 1000);
1019      }
1020    }
1021  },
1022
1023  // updateDetails()
1024  // Display caption, image number, and bottom nav.
1025  updateDetails: function() {
1026
1027    $("#imageDataContainer").hide();
1028
1029    var s = Drupal.settings.lightbox2;
1030
1031    if (s.show_caption) {
1032      var caption = Lightbox.filterXSS(Lightbox.imageArray[Lightbox.activeImage][1]);
1033      if (!caption) caption = '';
1034      $('#caption').html(caption).css({'zIndex': '10500'}).show();
1035    }
1036
1037    // If image is part of set display 'Image x of x'.
1038    var numberDisplay = null;
1039    if (s.image_count && Lightbox.total > 1) {
1040      var currentImage = Lightbox.activeImage + 1;
1041      if (!Lightbox.isLightframe && !Lightbox.isModal && !Lightbox.isVideo) {
1042        numberDisplay = s.image_count.replace(/\!current/, currentImage).replace(/\!total/, Lightbox.total);
1043      }
1044      else if (Lightbox.isVideo) {
1045        numberDisplay = s.video_count.replace(/\!current/, currentImage).replace(/\!total/, Lightbox.total);
1046      }
1047      else {
1048        numberDisplay = s.page_count.replace(/\!current/, currentImage).replace(/\!total/, Lightbox.total);
1049      }
1050      $('#numberDisplay').html(numberDisplay).css({'zIndex': '10500'}).show();
1051    }
1052    else {
1053      $('#numberDisplay').hide();
1054    }
1055
1056    $("#imageDataContainer").hide().slideDown(Lightbox.slideDownSpeed, function() {
1057      $("#bottomNav").show();
1058    });
1059    if (Lightbox.rtl == 1) {
1060      $("#bottomNav").css({'float': 'left'});
1061    }
1062    Lightbox.updateNav();
1063  },
1064
1065  // updateNav()
1066  // Display appropriate previous and next hover navigation.
1067  updateNav: function() {
1068
1069    $('#hoverNav').css({'zIndex': '10500'}).show();
1070    var prevLink = '#prevLink';
1071    var nextLink = '#nextLink';
1072
1073    // Slideshow is separated as we need to show play / pause button.
1074    if (Lightbox.isSlideshow) {
1075      if ((Lightbox.total > 1 && Lightbox.loopSlides) || Lightbox.activeImage !== 0) {
1076        $(prevLink).css({'zIndex': '10500'}).show().click(function() {
1077          if (Lightbox.pauseOnPrevClick) {
1078            Lightbox.togglePlayPause("lightshowPause", "lightshowPlay");
1079          }
1080          Lightbox.changeData(Lightbox.activeImage - 1); return false;
1081        });
1082      }
1083      else {
1084        $(prevLink).hide();
1085      }
1086
1087      // If not last image in set, display next image button.
1088      if ((Lightbox.total > 1 && Lightbox.loopSlides) || Lightbox.activeImage != (Lightbox.total - 1)) {
1089        $(nextLink).css({'zIndex': '10500'}).show().click(function() {
1090          if (Lightbox.pauseOnNextClick) {
1091            Lightbox.togglePlayPause("lightshowPause", "lightshowPlay");
1092          }
1093          Lightbox.changeData(Lightbox.activeImage + 1); return false;
1094        });
1095      }
1096      // Safari browsers need to have hide() called again.
1097      else {
1098        $(nextLink).hide();
1099      }
1100    }
1101
1102    // All other types of content.
1103    else {
1104
1105      if ((Lightbox.isLightframe || Lightbox.isModal || Lightbox.isVideo) && !Lightbox.alternative_layout) {
1106        $('#frameHoverNav').css({'zIndex': '10500'}).show();
1107        $('#hoverNav').css({'zIndex': '10500'}).hide();
1108        prevLink = '#framePrevLink';
1109        nextLink = '#frameNextLink';
1110      }
1111
1112      // If not first image in set, display prev image button.
1113      if ((Lightbox.total > 1 && Lightbox.loopItems) || Lightbox.activeImage !== 0) {
1114        // Unbind any other click handlers, otherwise this adds a new click handler
1115        // each time the arrow is clicked.
1116        $(prevLink).css({'zIndex': '10500'}).show().unbind().click(function() {
1117          Lightbox.changeData(Lightbox.activeImage - 1); return false;
1118        });
1119      }
1120      // Safari browsers need to have hide() called again.
1121      else {
1122        $(prevLink).hide();
1123      }
1124
1125      // If not last image in set, display next image button.
1126      if ((Lightbox.total > 1 && Lightbox.loopItems) || Lightbox.activeImage != (Lightbox.total - 1)) {
1127        // Unbind any other click handlers, otherwise this adds a new click handler
1128        // each time the arrow is clicked.
1129        $(nextLink).css({'zIndex': '10500'}).show().unbind().click(function() {
1130          Lightbox.changeData(Lightbox.activeImage + 1); return false;
1131        });
1132      }
1133      // Safari browsers need to have hide() called again.
1134      else {
1135        $(nextLink).hide();
1136      }
1137    }
1138
1139    // Don't enable keyboard shortcuts so forms will work.
1140    if (!Lightbox.isModal) {
1141      this.enableKeyboardNav();
1142    }
1143  },
1144
1145
1146  // enableKeyboardNav()
1147  enableKeyboardNav: function() {
1148    $(document).bind("keydown", this.keyboardAction);
1149  },
1150
1151  // disableKeyboardNav()
1152  disableKeyboardNav: function() {
1153    $(document).unbind("keydown", this.keyboardAction);
1154  },
1155
1156  // keyboardAction()
1157  keyboardAction: function(e) {
1158    if (e === null) { // IE.
1159      keycode = event.keyCode;
1160      escapeKey = 27;
1161    }
1162    else { // Mozilla.
1163      keycode = e.keyCode;
1164      escapeKey = e.DOM_VK_ESCAPE;
1165    }
1166
1167    key = String.fromCharCode(keycode).toLowerCase();
1168
1169    // Close lightbox.
1170    if (Lightbox.checkKey(Lightbox.keysClose, key, keycode)) {
1171      Lightbox.end('forceClose');
1172    }
1173    // Display previous image (p, <-).
1174    else if (Lightbox.checkKey(Lightbox.keysPrevious, key, keycode)) {
1175      if ((Lightbox.total > 1 && ((Lightbox.isSlideshow && Lightbox.loopSlides) || (!Lightbox.isSlideshow && Lightbox.loopItems))) || Lightbox.activeImage !== 0) {
1176        Lightbox.changeData(Lightbox.activeImage - 1);
1177      }
1178
1179    }
1180    // Display next image (n, ->).
1181    else if (Lightbox.checkKey(Lightbox.keysNext, key, keycode)) {
1182      if ((Lightbox.total > 1 && ((Lightbox.isSlideshow && Lightbox.loopSlides) || (!Lightbox.isSlideshow && Lightbox.loopItems))) || Lightbox.activeImage != (Lightbox.total - 1)) {
1183        Lightbox.changeData(Lightbox.activeImage + 1);
1184      }
1185    }
1186    // Zoom in.
1187    else if (Lightbox.checkKey(Lightbox.keysZoom, key, keycode) && !Lightbox.disableResize && !Lightbox.disableZoom && !Lightbox.isSlideshow && !Lightbox.isLightframe) {
1188      if (Lightbox.isZoomedIn) {
1189        Lightbox.changeData(Lightbox.activeImage, false);
1190      }
1191      else if (!Lightbox.isZoomedIn) {
1192        Lightbox.changeData(Lightbox.activeImage, true);
1193      }
1194      return false;
1195    }
1196    // Toggle play / pause (space).
1197    else if (Lightbox.checkKey(Lightbox.keysPlayPause, key, keycode) && Lightbox.isSlideshow) {
1198
1199      if (Lightbox.isPaused) {
1200        Lightbox.togglePlayPause("lightshowPlay", "lightshowPause");
1201      }
1202      else {
1203        Lightbox.togglePlayPause("lightshowPause", "lightshowPlay");
1204      }
1205      return false;
1206    }
1207  },
1208
1209  preloadNeighborImages: function() {
1210
1211    if ((Lightbox.total - 1) > Lightbox.activeImage) {
1212      preloadNextImage = new Image();
1213      preloadNextImage.src = Lightbox.imageArray[Lightbox.activeImage + 1][0];
1214    }
1215    if (Lightbox.activeImage > 0) {
1216      preloadPrevImage = new Image();
1217      preloadPrevImage.src = Lightbox.imageArray[Lightbox.activeImage - 1][0];
1218    }
1219
1220  },
1221
1222  end: function(caller) {
1223    var closeClick = (caller == 'slideshow' ? false : true);
1224    if (Lightbox.isSlideshow && Lightbox.isPaused && !closeClick) {
1225      return;
1226    }
1227    // To prevent double clicks on navigation links.
1228    if (Lightbox.inprogress === true && caller != 'forceClose') {
1229      return;
1230    }
1231    Lightbox.disableKeyboardNav();
1232    $('#lightbox').hide();
1233    $("#lightbox2-overlay").fadeOut();
1234    Lightbox.isPaused = true;
1235    Lightbox.inprogress = false;
1236    Lightbox.imageArray = [];
1237    Lightbox.imageNum = 0;
1238    // Replaces calls to showSelectBoxes() and showFlash() in original
1239    // lightbox2.
1240    Lightbox.toggleSelectsFlash('visible');
1241    if (Lightbox.isSlideshow) {
1242      for (var i = 0; i < Lightbox.slideIdCount; i++) {
1243        window.clearTimeout(Lightbox.slideIdArray[i]);
1244      }
1245      $('#lightshowPause, #lightshowPlay').hide();
1246    }
1247    else if (Lightbox.isLightframe) {
1248      $('#frameContainer').empty().hide();
1249    }
1250    else if (Lightbox.isVideo || Lightbox.isModal) {
1251      if (!Lightbox.auto_modal) {
1252        $('#modalContainer').hide().html("");
1253      }
1254      Lightbox.auto_modal = false;
1255    }
1256  },
1257
1258
1259  // getPageScroll()
1260  // Returns array with x,y page scroll values.
1261  // Core code from - quirksmode.com.
1262  getPageScroll : function() {
1263
1264    var xScroll, yScroll;
1265
1266    if (self.pageYOffset || self.pageXOffset) {
1267      yScroll = self.pageYOffset;
1268      xScroll = self.pageXOffset;
1269    }
1270    else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {  // Explorer 6 Strict.
1271      yScroll = document.documentElement.scrollTop;
1272      xScroll = document.documentElement.scrollLeft;
1273    }
1274    else if (document.body) {// All other Explorers.
1275      yScroll = document.body.scrollTop;
1276      xScroll = document.body.scrollLeft;
1277    }
1278
1279    arrayPageScroll = [xScroll,yScroll];
1280    return arrayPageScroll;
1281  },
1282
1283  // getPageSize()
1284  // Returns array with page width, height and window width, height.
1285  // Core code from - quirksmode.com.
1286  // Edit for Firefox by pHaez.
1287
1288  getPageSize : function() {
1289
1290    var xScroll, yScroll;
1291
1292    if (window.innerHeight && window.scrollMaxY) {
1293      xScroll = window.innerWidth + window.scrollMaxX;
1294      yScroll = window.innerHeight + window.scrollMaxY;
1295    }
1296    else if (document.body.scrollHeight > document.body.offsetHeight) { // All but Explorer Mac.
1297      xScroll = document.body.scrollWidth;
1298      yScroll = document.body.scrollHeight;
1299    }
1300    else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari.
1301      xScroll = document.body.offsetWidth;
1302      yScroll = document.body.offsetHeight;
1303    }
1304
1305    var windowWidth, windowHeight;
1306
1307    if (self.innerHeight) { // All except Explorer.
1308      if (document.documentElement.clientWidth) {
1309        windowWidth = document.documentElement.clientWidth;
1310      }
1311      else {
1312        windowWidth = self.innerWidth;
1313      }
1314      windowHeight = self.innerHeight;
1315    }
1316    else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode.
1317      windowWidth = document.documentElement.clientWidth;
1318      windowHeight = document.documentElement.clientHeight;
1319    }
1320    else if (document.body) { // Other Explorers.
1321      windowWidth = document.body.clientWidth;
1322      windowHeight = document.body.clientHeight;
1323    }
1324    // For small pages with total height less than height of the viewport.
1325    if (yScroll < windowHeight) {
1326      pageHeight = windowHeight;
1327    }
1328    else {
1329      pageHeight = yScroll;
1330    }
1331    // For small pages with total width less than width of the viewport.
1332    if (xScroll < windowWidth) {
1333      pageWidth = xScroll;
1334    }
1335    else {
1336      pageWidth = windowWidth;
1337    }
1338    arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
1339    return arrayPageSize;
1340  },
1341
1342
1343  // pause(numberMillis)
1344  pause : function(ms) {
1345    var date = new Date();
1346    var curDate = null;
1347    do { curDate = new Date(); }
1348    while (curDate - date < ms);
1349  },
1350
1351
1352  // toggleSelectsFlash()
1353  // Hide / unhide select lists and flash objects as they appear above the
1354  // lightbox in some browsers.
1355  toggleSelectsFlash: function (state) {
1356    if (state == 'visible') {
1357      $("select.lightbox_hidden, embed.lightbox_hidden, object.lightbox_hidden").show();
1358    }
1359    else if (state == 'hide') {
1360      $("select:visible, embed:visible, object:visible").not('#lightboxAutoModal select, #lightboxAutoModal embed, #lightboxAutoModal object').addClass("lightbox_hidden");
1361      $("select.lightbox_hidden, embed.lightbox_hidden, object.lightbox_hidden").hide();
1362    }
1363  },
1364
1365
1366  // parseRel()
1367  parseRel: function (link) {
1368    var parts = [];
1369    parts["rel"] = parts["title"] = parts["group"] = parts["style"] = parts["flashvars"] = null;
1370    if (!$(link).attr('rel')) return parts;
1371    parts["rel"] = $(link).attr('rel').match(/\w+/)[0];
1372
1373    if ($(link).attr('rel').match(/\[(.*)\]/)) {
1374      var info = $(link).attr('rel').match(/\[(.*?)\]/)[1].split('|');
1375      parts["group"] = info[0];
1376      parts["style"] = info[1];
1377      if (parts["style"] != undefined && parts["style"].match(/flashvars:\s?(.*?);/)) {
1378        parts["flashvars"] = parts["style"].match(/flashvars:\s?(.*?);/)[1];
1379      }
1380    }
1381    if ($(link).attr('rel').match(/\[.*\]\[(.*)\]/)) {
1382      parts["title"] = $(link).attr('rel').match(/\[.*\]\[(.*)\]/)[1];
1383    }
1384    return parts;
1385  },
1386
1387  // setStyles()
1388  setStyles: function(item, styles) {
1389    item.width = Lightbox.iframe_width;
1390    item.height = Lightbox.iframe_height;
1391    item.scrolling = "auto";
1392
1393    if (!styles) return item;
1394    var stylesArray = styles.split(';');
1395    for (var i = 0; i< stylesArray.length; i++) {
1396      if (stylesArray[i].indexOf('width:') >= 0) {
1397        var w = stylesArray[i].replace('width:', '');
1398        item.width = jQuery.trim(w);
1399      }
1400      else if (stylesArray[i].indexOf('height:') >= 0) {
1401        var h = stylesArray[i].replace('height:', '');
1402        item.height = jQuery.trim(h);
1403      }
1404      else if (stylesArray[i].indexOf('scrolling:') >= 0) {
1405        var scrolling = stylesArray[i].replace('scrolling:', '');
1406        item.scrolling = jQuery.trim(scrolling);
1407      }
1408      else if (stylesArray[i].indexOf('overflow:') >= 0) {
1409        var overflow = stylesArray[i].replace('overflow:', '');
1410        item.overflow = jQuery.trim(overflow);
1411      }
1412    }
1413    return item;
1414  },
1415
1416
1417  // togglePlayPause()
1418  // Hide the pause / play button as appropriate.  If pausing the slideshow also
1419  // clear the timers, otherwise move onto the next image.
1420  togglePlayPause: function(hideId, showId) {
1421    if (Lightbox.isSlideshow && hideId == "lightshowPause") {
1422      for (var i = 0; i < Lightbox.slideIdCount; i++) {
1423        window.clearTimeout(Lightbox.slideIdArray[i]);
1424      }
1425    }
1426    $('#' + hideId).hide();
1427    $('#' + showId).show();
1428
1429    if (hideId == "lightshowPlay") {
1430      Lightbox.isPaused = false;
1431      if (!Lightbox.loopSlides && Lightbox.activeImage == (Lightbox.total - 1)) {
1432        Lightbox.end();
1433      }
1434      else if (Lightbox.total > 1) {
1435        Lightbox.changeData(Lightbox.activeImage + 1);
1436      }
1437    }
1438    else {
1439      Lightbox.isPaused = true;
1440    }
1441  },
1442
1443  triggerLightbox: function (rel_type, rel_group) {
1444    if (rel_type.length) {
1445      if (rel_group && rel_group.length) {
1446        $("a[rel^='" + rel_type +"\[" + rel_group + "\]'], area[rel^='" + rel_type +"\[" + rel_group + "\]']").eq(0).trigger("click");
1447      }
1448      else {
1449        $("a[rel^='" + rel_type +"'], area[rel^='" + rel_type +"']").eq(0).trigger("click");
1450      }
1451    }
1452  },
1453
1454  detectMacFF2: function() {
1455    var ua = navigator.userAgent.toLowerCase();
1456    if (/firefox[\/\s](\d+\.\d+)/.test(ua)) {
1457      var ffversion = new Number(RegExp.$1);
1458      if (ffversion < 3 && ua.indexOf('mac') != -1) {
1459        return true;
1460      }
1461    }
1462    return false;
1463  },
1464
1465  checkKey: function(keys, key, code) {
1466    return (jQuery.inArray(key, keys) != -1 || jQuery.inArray(String(code), keys) != -1);
1467  },
1468
1469  filterXSS: function(str, allowed_tags) {
1470    var output = "";
1471    var prefix = Drupal.settings.pathPrefix;
1472    if (!prefix) prefix = '';
1473    $.ajax({
1474      url: Drupal.settings.basePath + prefix + '?q=system/lightbox2/filter-xss',
1475      data: {
1476        'string' : str,
1477        'allowed_tags' : allowed_tags
1478      },
1479      type: "POST",
1480      async: false,
1481      dataType:  "json",
1482      success: function(data) {
1483        output = data;
1484      }
1485    });
1486    return output;
1487  }
1488
1489};
1490
1491// Initialize the lightbox.
1492Drupal.behaviors.initLightbox = {
1493  attach: function(context) {
1494
1495  $('body:not(.lightbox-processed)', context).addClass('lightbox-processed').each(function() {
1496    Lightbox.initialize();
1497    return false; // Break the each loop.
1498  });
1499
1500  // Attach lightbox to any links with lightbox rels.
1501  Lightbox.initList(context);
1502  $('#lightboxAutoModal', context).triggerHandler('click');
1503  }
1504};
1505})(jQuery);
1506;
1507/**
1508 * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
1509 *
1510 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
1511 * http://www.opensource.org/licenses/mit-license.php
1512 *
1513 * **SWFObject is the SWF embed script formarly known as FlashObject. The name was changed for
1514 *   legal reasons.
1515 */
1516if(typeof deconcept=="undefined"){var deconcept=new Object();}
1517if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
1518if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
1519deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
1520if(!document.createElement||!document.getElementById){return;}
1521this.DETECT_KEY=_b?_b:"detectflash";
1522this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
1523this.params=new Object();
1524this.variables=new Object();
1525this.attributes=new Array();
1526if(_1){this.setAttribute("swf",_1);}
1527if(id){this.setAttribute("id",id);}
1528if(w){this.setAttribute("width",w);}
1529if(h){this.setAttribute("height",h);}
1530if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
1531this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
1532if(c){this.addParam("bgcolor",c);}
1533var q=_8?_8:"high";
1534this.addParam("quality",q);
1535this.setAttribute("useExpressInstall",_7);
1536this.setAttribute("doExpressInstall",false);
1537var _d=(_9)?_9:window.location;
1538this.setAttribute("xiRedirectUrl",_d);
1539this.setAttribute("redirectUrl","");
1540if(_a){this.setAttribute("redirectUrl",_a);}};
1541deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
1542this.attributes[_e]=_f;
1543},getAttribute:function(_10){
1544return this.attributes[_10];
1545},addParam:function(_11,_12){
1546this.params[_11]=_12;
1547},getParams:function(){
1548return this.params;
1549},addVariable:function(_13,_14){
1550this.variables[_13]=_14;
1551},getVariable:function(_15){
1552return this.variables[_15];
1553},getVariables:function(){
1554return this.variables;
1555},getVariablePairs:function(){
1556var _16=new Array();
1557var key;
1558var _18=this.getVariables();
1559for(key in _18){
1560_16.push(key+"="+_18[key]);}
1561return _16;
1562},getSWFHTML:function(){
1563var _19="";
1564if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
1565if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
1566_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
1567_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
1568var _1a=this.getParams();
1569for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
1570var _1c=this.getVariablePairs().join("&");
1571if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
1572_19+="/>";
1573}else{
1574if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
1575_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
1576_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
1577var _1d=this.getParams();
1578for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
1579var _1f=this.getVariablePairs().join("&");
1580if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
1581_19+="</object>";}
1582return _19;
1583},write:function(_20){
1584if(this.getAttribute("useExpressInstall")){
1585var _21=new deconcept.PlayerVersion([6,0,65]);
1586if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
1587this.setAttribute("doExpressInstall",true);
1588this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
1589document.title=document.title.slice(0,47)+" - Flash Player Installation";
1590this.addVariable("MMdoctitle",document.title);}}
1591if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
1592var n=(typeof _20=="string")?document.getElementById(_20):_20;
1593n.innerHTML=this.getSWFHTML();
1594return true;
1595}else{
1596if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
1597return false;}};
1598deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
1599var _25=new deconcept.PlayerVersion([0,0,0]);
1600if(navigator.plugins&&navigator.mimeTypes.length){
1601var x=navigator.plugins["Shockwave Flash"];
1602if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
1603}else{try{
1604var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
1605for(var i=3;axo!=null;i++){
1606axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
1607_25=new deconcept.PlayerVersion([i,0,0]);}}
1608catch(e){}
1609if(_23&&_25.major>_23.major){return _25;}
1610if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
1611try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
1612catch(e){}}}
1613return _25;};
1614deconcept.PlayerVersion=function(_29){
1615this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
1616this.minor=parseInt(_29[1])||0;
1617this.rev=parseInt(_29[2])||0;};
1618deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
1619if(this.major<fv.major){return false;}
1620if(this.major>fv.major){return true;}
1621if(this.minor<fv.minor){return false;}
1622if(this.minor>fv.minor){return true;}
1623if(this.rev<fv.rev){return false;}return true;};
1624deconcept.util={getRequestParameter:function(_2b){
1625var q=document.location.search||document.location.hash;
1626if(q){
1627var _2d=q.indexOf(_2b+"=");
1628var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
1629if(q.length>1&&_2d>-1){
1630return q.substring(q.indexOf("=",_2d)+1,_2e);
1631}}return "";}};
1632if(Array.prototype.push==null){
1633Array.prototype.push=function(_2f){
1634this[this.length]=_2f;
1635return this.length;};}
1636var getQueryParamValue=deconcept.util.getRequestParameter;
1637var FlashObject=deconcept.SWFObject; // for backwards compatibility
1638var SWFObject=deconcept.SWFObject;
1639
1640;
1641
1642(function ($) {
1643  Drupal.behaviors.LoginToboggan = {
1644    attach: function (context, settings) {
1645      $('#toboggan-login', context).once('toggleboggan_setup', function () {
1646        $(this).hide();
1647        Drupal.logintoboggan_toggleboggan();
1648      });
1649    }
1650  };
1651
1652  Drupal.logintoboggan_toggleboggan = function() {
1653    $("#toboggan-login-link").click(
1654      function () {
1655        $("#toboggan-login").slideToggle("fast");
1656        this.blur();
1657        return false;
1658      }
1659    );
1660  };
1661})(jQuery);
1662
1663;
1664/**
1665 * @file
1666 */
1667
1668(function ($) {
1669
1670  'use strict';
1671
1672  Drupal.extlink = Drupal.extlink || {};
1673
1674  Drupal.extlink.attach = function (context, settings) {
1675    if (!settings.hasOwnProperty('extlink')) {
1676      return;
1677    }
1678
1679    // Strip the host name down, removing ports, subdomains, or www.
1680    var pattern = /^(([^\/:]+?\.)*)([^\.:]{1,})((\.[a-z0-9]{1,253})*)(:[0-9]{1,5})?$/;
1681    var host = window.location.host.replace(pattern, '$2$3$6');
1682    var subdomain = window.location.host.replace(host, '');
1683
1684    // Determine what subdomains are considered internal.
1685    var subdomains;
1686    if (settings.extlink.extSubdomains) {
1687      subdomains = '([^/]*\\.)?';
1688    }
1689    else if (subdomain === 'www.' || subdomain === '') {
1690      subdomains = '(www\\.)?';
1691    }
1692    else {
1693      subdomains = subdomain.replace('.', '\\.');
1694    }
1695
1696    // Build regular expressions that define an internal link.
1697    var internal_link = new RegExp('^https?://([^@]*@)?' + subdomains + host, 'i');
1698
1699    // Extra internal link matching.
1700    var extInclude = false;
1701    if (settings.extlink.extInclude) {
1702      extInclude = new RegExp(settings.extlink.extInclude.replace(/\\/, '\\'), 'i');
1703    }
1704
1705    // Extra external link matching.
1706    var extExclude = false;
1707    if (settings.extlink.extExclude) {
1708      extExclude = new RegExp(settings.extlink.extExclude.replace(/\\/, '\\'), 'i');
1709    }
1710
1711    // Extra external link CSS selector exclusion.
1712    var extCssExclude = false;
1713    if (settings.extlink.extCssExclude) {
1714      extCssExclude = settings.extlink.extCssExclude;
1715    }
1716
1717    // Extra external link CSS selector explicit.
1718    var extCssExplicit = false;
1719    if (settings.extlink.extCssExplicit) {
1720      extCssExplicit = settings.extlink.extCssExplicit;
1721    }
1722
1723    // Define the jQuery method (either 'append' or 'prepend') of placing the icon, defaults to 'append'.
1724    var extIconPlacement = settings.extlink.extIconPlacement || 'append';
1725
1726    // Find all links which are NOT internal and begin with http as opposed
1727    // to ftp://, javascript:, etc. other kinds of links.
1728    // When operating on the 'this' variable, the host has been appended to
1729    // all links by the browser, even local ones.
1730    // In jQuery 1.1 and higher, we'd use a filter method here, but it is not
1731    // available in jQuery 1.0 (Drupal 5 default).
1732    var external_links = [];
1733    var mailto_links = [];
1734    $('a:not([data-extlink]), area:not([data-extlink])', context).each(function (el) {
1735      try {
1736        var url = '';
1737        if (typeof this.href == 'string') {
1738          url = this.href.toLowerCase();
1739        }
1740        // Handle SVG links (xlink:href).
1741        else if (typeof this.href == 'object') {
1742          url = this.href.baseVal;
1743        }
1744        if (url.indexOf('http') === 0
1745          && ((!url.match(internal_link) && !(extExclude && url.match(extExclude))) || (extInclude && url.match(extInclude)))
1746          && !(extCssExclude && $(this).is(extCssExclude))
1747          && !(extCssExclude && $(this).parents(extCssExclude).length > 0)
1748          && !(extCssExplicit && $(this).parents(extCssExplicit).length < 1)) {
1749          external_links.push(this);
1750        }
1751        // Do not include area tags with begin with mailto: (this prohibits
1752        // icons from being added to image-maps).
1753        else if (this.tagName !== 'AREA'
1754          && url.indexOf('mailto:') === 0
1755          && !(extCssExclude && $(this).parents(extCssExclude).length > 0)
1756          && !(extCssExplicit && $(this).parents(extCssExplicit).length < 1)) {
1757          mailto_links.push(this);
1758        }
1759      }
1760      // IE7 throws errors often when dealing with irregular links, such as:
1761      // <a href="node/10"></a> Empty tags.
1762      // <a href="http://user:[email protected]">example</a> User:pass syntax.
1763      catch (error) {
1764        return false;
1765      }
1766    });
1767
1768    if (settings.extlink.extClass) {
1769      Drupal.extlink.applyClassAndSpan(external_links, settings.extlink.extClass, extIconPlacement);
1770    }
1771
1772    if (settings.extlink.mailtoClass) {
1773      Drupal.extlink.applyClassAndSpan(mailto_links, settings.extlink.mailtoClass, extIconPlacement);
1774    }
1775
1776    if (settings.extlink.extTarget) {
1777      // Apply the target attribute to all links.
1778      $(external_links).attr('target', settings.extlink.extTarget);
1779      // Add rel attributes noopener and noreferrer.
1780      $(external_links).attr('rel', function (i, val) {
1781        // If no rel attribute is present, create one with the values noopener and noreferrer.
1782        if (val == null) {
1783          return 'noopener noreferrer';
1784        }
1785        // Check to see if rel contains noopener or noreferrer. Add what doesn't exist.
1786        if (val.indexOf('noopener') > -1 || val.indexOf('noreferrer') > -1) {
1787          if (val.indexOf('noopener') === -1) {
1788            return val + ' noopener';
1789          }
1790          if (val.indexOf('noreferrer') === -1) {
1791            return val + ' noreferrer';
1792          }
1793          // Both noopener and noreferrer exist. Nothing needs to be added.
1794          else {
1795            return val;
1796          }
1797        }
1798        // Else, append noopener and noreferrer to val.
1799        else {
1800          return val + ' noopener noreferrer';
1801        }
1802      });
1803    }
1804
1805    Drupal.extlink = Drupal.extlink || {};
1806
1807    // Set up default click function for the external links popup. This should be
1808    // overridden by modules wanting to alter the popup.
1809    Drupal.extlink.popupClickHandler = Drupal.extlink.popupClickHandler || function () {
1810      if (settings.extlink.extAlert) {
1811        return confirm(settings.extlink.extAlertText);
1812      }
1813    };
1814
1815    $(external_links).click(function (e) {
1816      return Drupal.extlink.popupClickHandler(e, this);
1817    });
1818  };
1819
1820  /**
1821   * Apply a class and a trailing <span> to all links not containing images.
1822   *
1823   * @param {object[]} links
1824   *   An array of DOM elements representing the links.
1825   * @param {string} class_name
1826   *   The class to apply to the links.
1827   * @param {string} icon_placement
1828   *   'append' or 'prepend' the icon to the link.
1829   */
1830  Drupal.extlink.applyClassAndSpan = function (links, class_name, icon_placement) {
1831    var $links_to_process;
1832    if (Drupal.settings.extlink.extImgClass) {
1833      $links_to_process = $(links);
1834    }
1835    else {
1836      var links_with_images = $(links).find('img').parents('a');
1837      $links_to_process = $(links).not(links_with_images);
1838    }
1839    // Add data-extlink attribute.
1840    $links_to_process.attr('data-extlink', '');
1841    var i;
1842    var length = $links_to_process.length;
1843    for (i = 0; i < length; i++) {
1844      var $link = $($links_to_process[i]);
1845      if ($link.css('display') === 'inline' || $link.css('display') === 'inline-block') {
1846        if (Drupal.settings.extlink.extUseFontAwesome) {
1847          if (class_name === Drupal.settings.extlink.mailtoClass) {
1848            $link[icon_placement]('<span class="fa-' + class_name + ' extlink"><span class="fa fa-envelope-o" title="' + Drupal.settings.extlink.mailtoLabel + '"></span><span class="element-invisible">' + Drupal.settings.extlink.mailtoLabel + '</span></span>');
1849          }
1850          else {
1851            $link[icon_placement]('<span class="fa-' + class_name + ' extlink"><span class="fa fa-external-link" title="' + Drupal.settings.extlink.extLabel + '"></span><span class="element-invisible">' + Drupal.settings.extlink.extLabel + '</span></span>');
1852          }
1853        }
1854        else {
1855          if (class_name === Drupal.settings.extlink.mailtoClass) {
1856            $link[icon_placement]('<span class="' + class_name + '"><span class="element-invisible">' + Drupal.settings.extlink.mailtoLabel + '</span></span>');
1857          }
1858          else {
1859            $link[icon_placement]('<span class="' + class_name + '"><span class="element-invisible">' + Drupal.settings.extlink.extLabel + '</span></span>');
1860          }
1861        }
1862      }
1863    }
1864  };
1865
1866  Drupal.behaviors.extlink = Drupal.behaviors.extlink || {};
1867  Drupal.behaviors.extlink.attach = function (context, settings) {
1868    // Backwards compatibility, for the benefit of modules overriding extlink
1869    // functionality by defining an "extlinkAttach" global function.
1870    if (typeof extlinkAttach === 'function') {
1871      extlinkAttach(context);
1872    }
1873    else {
1874      Drupal.extlink.attach(context, settings);
1875    }
1876  };
1877
1878})(jQuery);
1879;

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.