var Drupal=Drupal||{settings:{},behaviors:{},themes:{},locale:{}};Drupal.jsEnabled=true;Drupal.attachBehaviors=function(context){context=context||document;jQuery.each(Drupal.behaviors,function(){this(context)})};Drupal.checkPlain=function(str){str=String(str);var replace={'&':'&amp;','"':'&quot;','<':'&lt;','>':'&gt;'};for(var character in replace){var regex=new RegExp(character,'g');str=str.replace(regex,replace[character])};return str};Drupal.t=function(str,args){if(Drupal.locale.strings&&Drupal.locale.strings[str])str=Drupal.locale.strings[str];if(args)for(var key in args){switch(key.charAt(0)){case'@':args[key]=Drupal.checkPlain(args[key]);break;case'!':break;case'%':default:args[key]=Drupal.theme('placeholder',args[key]);break};str=str.replace(key,args[key])};return str};Drupal.formatPlural=function(count,singular,plural,args){var args=args||{};args['@count']=count;var index=Drupal.locale.pluralFormula?Drupal.locale.pluralFormula(args['@count']):((args['@count']==1)?0:1);if(index==0){return Drupal.t(singular,args)}else if(index==1){return Drupal.t(plural,args)}else{args['@count['+index+']']=args['@count'];delete args['@count'];return Drupal.t(plural.replace('@count','@count['+index+']'))}};Drupal.theme=function(func){for(var i=1,args=[];i<arguments.length;i++)args.push(arguments[i]);return(Drupal.theme[func]||Drupal.theme.prototype[func]).apply(this,args)};Drupal.parseJson=function(data){if((data.substring(0,1)!='{')&&(data.substring(0,1)!='['))return{status:0,data:data.length?data:Drupal.t('Unspecified error')};return eval('('+data+');')};Drupal.freezeHeight=function(){Drupal.unfreezeHeight();var div=document.createElement('div');$(div).css({position:'absolute',top:'0px',left:'0px',width:'1px',height:$('body').css('height')}).attr('id','freeze-height');$('body').append(div)};Drupal.unfreezeHeight=function(){$('#freeze-height').remove()};Drupal.encodeURIComponent=function(item,uri){uri=uri||location.href;item=encodeURIComponent(item).replace(/%2F/g,'/');return(uri.indexOf('?q=')!=-1)?item:item.replace(/%26/g,'%2526').replace(/%23/g,'%2523').replace(/\/\//g,'/%252F')};Drupal.getSelection=function(element){if(typeof(element.selectionStart)!='number'&&document.selection){var range1=document.selection.createRange(),range2=range1.duplicate();range2.moveToElementText(element);range2.setEndPoint('EndToEnd',range1);var start=range2.text.length-range1.text.length,end=start+range1.text.length;return{start:start,end:end}};return{start:element.selectionStart,end:element.selectionEnd}};Drupal.ahahError=function(xmlhttp,uri){if(xmlhttp.status==200){if(jQuery.trim(xmlhttp.responseText)){var message=Drupal.t("An error occurred. \n@uri\n@text",{'@uri':uri,'@text':xmlhttp.responseText})}else var message=Drupal.t("An error occurred. \n@uri\n(no information available).",{'@uri':uri})}else var message=Drupal.t("An HTTP error @status occurred. \n@uri",{'@uri':uri,'@status':xmlhttp.status});return message.replace(/\n/g,'<br />')};$(document.documentElement).addClass('js');$(document).ready(function(){Drupal.attachBehaviors(this)});Drupal.theme.prototype={placeholder:function(str){return'<em>'+Drupal.checkPlain(str)+'</em>'}};
Drupal.progressBar=function(id,updateCallback,method,errorCallback){var pb=this;this.id=id;this.method=method||"GET";this.updateCallback=updateCallback;this.errorCallback=errorCallback;this.element=document.createElement('div');this.element.id=id;this.element.className='progress';$(this.element).html('<div class="bar"><div class="filled"></div></div><div class="percentage"></div><div class="message">&nbsp;</div>')};Drupal.progressBar.prototype.setProgress=function(percentage,message){if(percentage>=0&&percentage<=100){$('div.filled',this.element).css('width',percentage+'%');$('div.percentage',this.element).html(percentage+'%')};$('div.message',this.element).html(message);if(this.updateCallback)this.updateCallback(percentage,message,this)};Drupal.progressBar.prototype.startMonitoring=function(uri,delay){this.delay=delay;this.uri=uri;this.sendPing()};Drupal.progressBar.prototype.stopMonitoring=function(){clearTimeout(this.timer);this.uri=null};Drupal.progressBar.prototype.sendPing=function(){if(this.timer)clearTimeout(this.timer);if(this.uri){var pb=this;$.ajax({type:this.method,url:this.uri,data:'',dataType:'json',success:function(progress){if(progress.status==0){pb.displayError(progress.data);return};pb.setProgress(progress.percentage,progress.message);pb.timer=setTimeout(function(){pb.sendPing()},pb.delay)},error:function(xmlhttp){pb.displayError(Drupal.ahahError(xmlhttp,pb.uri))}})}};Drupal.progressBar.prototype.displayError=function(string){var error=document.createElement('div');error.className='error';error.innerHTML=string;$(this.element).before(error).hide();if(this.errorCallback)this.errorCallback(this)};
Drupal.preventSelect=function(elt){if(document.onselectstart){elt.onselectstart=function(){return false}}else $(elt).mousedown(function(){return false})};Drupal.url=function(path,query,fragment){query=query?query:'';fragment=fragment?'#'+fragment:'';var base=Drupal.settings.basePath;if(!Drupal.settings.jstools.cleanurls){if(query){return base+'?q='+path+'&'+query+fragment}else return base+'?q='+path+fragment}else if(query){return base+path+'?'+query+fragment}else return base+path+fragment};Drupal.getPath=function(href){href=Drupal.pathPortion(href);href=href.substring(Drupal.settings.basePath.length+(Drupal.settings.jstools.cleanurls?0:3),href.length);var chars=['#','?','&'];for(i in chars)if(href.indexOf(chars[i])>-1)href=href.substr(0,href.indexOf(chars[i]));return href};Drupal.prependPath=function(href,segment){href=Drupal.pathPortion(href);var baseLength=Drupal.settings.jstools.basePath.length+(Drupal.settings.jstools.cleanurls?0:3),base=href.substring(0,baseLength);return base+segment+'/'+href.substring(baseLength,href.length)};Drupal.pathPortion=function(href){var protocol=window.location.protocol;if(href.substring(0,protocol.length)==protocol)href=href.substring(href.indexOf('/',protocol.length+2));return href};Drupal.scrollTo=function(el){var pos=Drupal.absolutePosition(el);window.scrollTo(0,pos.y)};Drupal.elementChildren=function(element){var children=[];for(i in element)if(i.substr(0,1)!='#')children[children.length]=i;return children};Drupal.elementProperties=function(element){var properties=[];for(i in element)if(i.substr(0,1)=='#')properties[properties.length]=i;return properties};Drupal.parseQueryString=function(href){query=Drupal.getQueryString(href);var args={},pairs=query.split("&");for(var i=0;i<pairs.length;i++){var pos=pairs[i].indexOf('=');if(pos==-1)continue;var argname=pairs[i].substring(0,pos),value=pairs[i].substring(pos+1);args[argname]=unescape(value.replace(/\+/g," "))};return args};Drupal.getQueryString=function(href){if(href){var index=href.indexOf('?');href=(index==-1)?'':href.substring(index+1)};query=href?href:location.search.substring(1);if(!Drupal.settings.jstools.cleanurls){var index=query.indexOf('&');query=(index==-1)?'':query.substring(index+1)};return query};Drupal.pathMatch=function(path,paths,type){paths='^'+paths+'$';paths=paths.replace(/\n/g,'$|^');paths=paths.replace(/\*/g,'.*');var search=path.search(new RegExp(paths))>-1?true:false;return(type==0)?search:!search};Drupal.absolutePosition=function(el){var sLeft=0,sTop=0,isDiv=/^div$/i.test(el.tagName);if(isDiv&&el.scrollLeft)sLeft=el.scrollLeft;if(isDiv&&el.scrollTop)sTop=el.scrollTop;var r={x:el.offsetLeft-sLeft,y:el.offsetTop-sTop};if(el.offsetParent){var tmp=Drupal.absolutePosition(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y};return r};Drupal.mousePosition=function(e){return{x:e.clientX+document.documentElement.scrollLeft,y:e.clientY+document.documentElement.scrollTop}};
// $Id: collapsiblock.js,v 1.8 2010/10/02 00:42:28 gagarine Exp $

Drupal.Collapsiblock = Drupal.Collapsiblock || {};

Drupal.behaviors.collapsiblock = function (context) {
  var cookieData = Drupal.Collapsiblock.getCookieData();
  var slidetype = Drupal.settings.collapsiblock.slide_type;
  var defaultState = Drupal.settings.collapsiblock.default_state;
  var slidespeed = parseInt(Drupal.settings.collapsiblock.slide_speed);
  var title = Drupal.settings.collapsiblock.block_title;
  var block = Drupal.settings.collapsiblock.block;
  var block_content = Drupal.settings.collapsiblock.block_content;
  $(block + ':not(.collapsiblock-processed)', context).addClass('collapsiblock-processed').each(function () {
    var id = this.id;
    var titleElt = $(title, this).not($('.content :header',this));
    if (titleElt.size()) {
      titleElt = titleElt[0];
      // Status values: 1 = not collapsible, 2 = collapsible and expanded, 3 = collapsible and collapsed, 4 = always collapsed
      var stat = Drupal.settings.collapsiblock.blocks[this.id] ? Drupal.settings.collapsiblock.blocks[this.id] : defaultState;
      if (stat == 1) {
        return;
      }

      titleElt.target = $(this).find(block_content);
      $(titleElt)
      .wrapInner('<a href="#" role="link" />')
      .addClass('collapsiblock')
      .click(function (e) {
        var st = Drupal.Collapsiblock.getCookieData();
        if ($(this).is('.collapsiblockCollapsed')) {
          $(this).removeClass('collapsiblockCollapsed');
          if (slidetype == 1) {
            $(this.target).slideDown(slidespeed).attr('aria-hidden', false); ;
          }
          else {
            $(this.target).animate({
              height:'show',
              opacity:'show'
            }, slidespeed);
          }

          // Don't save cookie data if the block is always collapsed.
          if (stat != 4) {
            st[id] = 1;
          }
        }
        else {
          $(this).addClass('collapsiblockCollapsed');
          if (slidetype == 1) {
            $(this.target).slideUp(slidespeed).attr('aria-hidden', true);
          }
          else {
            $(this.target).animate({
              height:'hide',
              opacity:'hide'
            }, slidespeed);
          }

          // Don't save cookie data if the block is always collapsed.
          if (stat != 4) {
            st[id] = 0;
          }
        }
        // Stringify the object in JSON format for saving in the cookie.
        var cookieString = '{ ';
        var cookieParts = [];
        $.each(st, function (id, setting) {
          cookieParts[cookieParts.length] = ' "' + id + '": ' + setting;
        });
        cookieString += cookieParts.join(', ') + ' }';
        $.cookie('collapsiblock', cookieString, {
          path: Drupal.settings.basePath
          });
        e.preventDefault();
      });
      // Leave active blocks uncollapsed. If the block is expanded, do nothing.
      if (stat ==  4 || (cookieData[id] == 0 || (stat == 3 && cookieData[id] == undefined)) && !$(this).find('a.active').size()) {
        $(titleElt).addClass('collapsiblockCollapsed');
        $(titleElt.target).hide();
      }
    }
  });
};

Drupal.Collapsiblock.getCookieData = function () {
  var cookieString = $.cookie('collapsiblock');
  return cookieString ? Drupal.parseJson(cookieString) : {};
};

  

;
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1};var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1e3))}else date=options.expires;expires='; expires='+date.toUTCString()};var path=options.path?'; path='+(options.path):'',domain=options.domain?'; domain='+(options.domain):'',secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('')}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}};return cookieValue}};
$(document).ready(function(){$(document.body).click(function(event){$(event.target).parents("a:first,area:first").andSelf().filter("a,area").each(function(){var ga=Drupal.settings.googleanalytics,isInternal=new RegExp("^(https?):\/\/"+window.location.host,"i"),isInternalSpecial=new RegExp("(\/go\/.*)$","i"),isDownload=new RegExp("\\.("+ga.trackDownloadExtensions+")$","i");if(isInternal.test(this.href)){if(ga.trackDownload&&isDownload.test(this.href)){var extension=isDownload.exec(this.href);_gaq.push(["_trackEvent","Downloads",extension[1].toUpperCase(),this.href.replace(isInternal,'')])}else if(isInternalSpecial.test(this.href))_gaq.push(["_trackPageview",this.href.replace(isInternal,'')])}else if(ga.trackMailto&&$(this).is("a[href^=mailto:],area[href^=mailto:]")){_gaq.push(["_trackEvent","Mails","Click",this.href.substring(7)])}else if(ga.trackOutgoing&&this.href)if(ga.trackOutboundAsPageview){_gaq.push(["_trackPageview",'/outbound/'+this.href.replace(/^(https?|ftp|news|nntp|telnet|irc|ssh|sftp|webcal):\/\//i,'').split('/').join('--')])}else _gaq.push(["_trackEvent","Outbound links","Click",this.href])})})});
Drupal.behaviors.jquerymenu=function(context){jqm_showit=function(){$(this).children('.jqm_link_edit').fadeIn()};jqm_hideit=function(){$(this).children('.jqm_link_edit').fadeOut()};$('ul.jquerymenu li').hover(jqm_showit,jqm_hideit);$('ul.jquerymenu:not(.jquerymenu-processed)',context).addClass('jquerymenu-processed').each(function(){$(this).find("li.parent span.parent").click(function(){momma=$(this).parent();if($(momma).hasClass('closed')){$($(this).siblings('ul').children()).hide().fadeIn('3000');$(momma).children('ul').slideDown('700');$(momma).removeClass('closed').addClass('open');$(this).removeClass('closed').addClass('open')}else{$(momma).children('ul').slideUp('700');$($(this).siblings('ul').children()).fadeOut('3000');$(momma).removeClass('open').addClass('closed');$(this).removeClass('open').addClass('closed')}})})};
var Lightbox={auto_modal:false,overlayOpacity:0.8,overlayColor:'000',disableCloseClick:true,resizeSequence:0,resizeSpeed:'normal',fadeInSpeed:'normal',slideDownSpeed:'slow',minWidth:240,borderSize:10,boxColor:'fff',fontColor:'000',topPosition:'',infoHeight:20,alternative_layout:false,imageArray:[],imageNum:null,total:0,activeImage:null,inprogress:false,disableResize:false,disableZoom:false,isZoomedIn:false,rtl:false,loopItems:false,keysClose:['c','x',27],keysPrevious:['p',37],keysNext:['n',39],keysZoom:['z'],keysPlayPause:[32],slideInterval:5e3,showPlayPause:true,autoStart:true,autoExit:true,pauseOnNextClick:false,pauseOnPrevClick:true,slideIdArray:[],slideIdCount:0,isSlideshow:false,isPaused:false,loopSlides:false,isLightframe:false,iframe_width:600,iframe_height:400,iframe_border:1,enableVideo:false,flvPlayer:'/flvplayer.swf',flvFlashvars:'',isModal:false,isVideo:false,videoId:false,modalWidth:400,modalHeight:400,modalHTML:null,initialize:function(){var s=Drupal.settings.lightbox2;Lightbox.overlayOpacity=s.overlay_opacity;Lightbox.overlayColor=s.overlay_color;Lightbox.disableCloseClick=s.disable_close_click;Lightbox.resizeSequence=s.resize_sequence;Lightbox.resizeSpeed=s.resize_speed;Lightbox.fadeInSpeed=s.fade_in_speed;Lightbox.slideDownSpeed=s.slide_down_speed;Lightbox.borderSize=s.border_size;Lightbox.boxColor=s.box_color;Lightbox.fontColor=s.font_color;Lightbox.topPosition=s.top_position;Lightbox.rtl=s.rtl;Lightbox.loopItems=s.loop_items;Lightbox.keysClose=s.keys_close.split(" ");Lightbox.keysPrevious=s.keys_previous.split(" ");Lightbox.keysNext=s.keys_next.split(" ");Lightbox.keysZoom=s.keys_zoom.split(" ");Lightbox.keysPlayPause=s.keys_play_pause.split(" ");Lightbox.disableResize=s.disable_resize;Lightbox.disableZoom=s.disable_zoom;Lightbox.slideInterval=s.slideshow_interval;Lightbox.showPlayPause=s.show_play_pause;Lightbox.showCaption=s.show_caption;Lightbox.autoStart=s.slideshow_automatic_start;Lightbox.autoExit=s.slideshow_automatic_exit;Lightbox.pauseOnNextClick=s.pause_on_next_click;Lightbox.pauseOnPrevClick=s.pause_on_previous_click;Lightbox.loopSlides=s.loop_slides;Lightbox.alternative_layout=s.use_alt_layout;Lightbox.iframe_width=s.iframe_width;Lightbox.iframe_height=s.iframe_height;Lightbox.iframe_border=s.iframe_border;Lightbox.enableVideo=s.enable_video;if(s.enable_video){Lightbox.flvPlayer=s.flvPlayer;Lightbox.flvFlashvars=s.flvFlashvars};var layout_class=(s.use_alt_layout?'lightbox2-alt-layout':'lightbox2-orig-layout'),output='<div id="lightbox2-overlay" style="display: none;"></div>\
      <div id="lightbox" style="display: none;" class="'+layout_class+'">\
        <div id="outerImageContainer"></div>\
        <div id="imageDataContainer" class="clearfix">\
          <div id="imageData"></div>\
        </div>\
      </div>',loading='<div id="loading"><a href="#" id="loadingLink"></a></div>',modal='<div id="modalContainer" style="display: none;"></div>',frame='<div id="frameContainer" style="display: none;"></div>',imageContainer='<div id="imageContainer" style="display: none;"></div>',details='<div id="imageDetails"></div>',bottomNav='<div id="bottomNav"></div>',image='<img id="lightboxImage" alt="" />',hoverNav='<div id="hoverNav"><a id="prevLink" href="#"></a><a id="nextLink" href="#"></a></div>',frameNav='<div id="frameHoverNav"><a id="framePrevLink" href="#"></a><a id="frameNextLink" href="#"></a></div>',hoverNav='<div id="hoverNav"><a id="prevLink" title="'+Drupal.t('Previous')+'" href="#"></a><a id="nextLink" title="'+Drupal.t('Next')+'" href="#"></a></div>',frameNav='<div id="frameHoverNav"><a id="framePrevLink" title="'+Drupal.t('Previous')+'" href="#"></a><a id="frameNextLink" title="'+Drupal.t('Next')+'" href="#"></a></div>',caption='<span id="caption"></span>',numberDisplay='<span id="numberDisplay"></span>',close='<a id="bottomNavClose" title="'+Drupal.t('Close')+'" href="#"></a>',zoom='<a id="bottomNavZoom" href="#"></a>',zoomOut='<a id="bottomNavZoomOut" href="#"></a>',pause='<a id="lightshowPause" title="'+Drupal.t('Pause Slideshow')+'" href="#" style="display: none;"></a>',play='<a id="lightshowPlay" title="'+Drupal.t('Play Slideshow')+'" href="#" style="display: none;"></a>';$("body").append(output);$('#outerImageContainer').append(modal+frame+imageContainer+loading);if(!s.use_alt_layout){$('#imageContainer').append(image+hoverNav);$('#imageData').append(details+bottomNav);$('#imageDetails').append(caption+numberDisplay);$('#bottomNav').append(frameNav+close+zoom+zoomOut+pause+play)}else{$('#outerImageContainer').append(bottomNav);$('#imageContainer').append(image);$('#bottomNav').append(close+zoom+zoomOut);$('#imageData').append(hoverNav+details);$('#imageDetails').append(caption+numberDisplay+pause+play)};if(Lightbox.disableCloseClick)$('#lightbox2-overlay').click(function(){Lightbox.end();return false}).hide();$('#loadingLink, #bottomNavClose').click(function(){Lightbox.end('forceClose');return false});$('#prevLink, #framePrevLink').click(function(){Lightbox.changeData(Lightbox.activeImage-1);return false});$('#nextLink, #frameNextLink').click(function(){Lightbox.changeData(Lightbox.activeImage+1);return false});$('#bottomNavZoom').click(function(){Lightbox.changeData(Lightbox.activeImage,true);return false});$('#bottomNavZoomOut').click(function(){Lightbox.changeData(Lightbox.activeImage,false);return false});$('#lightshowPause').click(function(){Lightbox.togglePlayPause("lightshowPause","lightshowPlay");return false});$('#lightshowPlay').click(function(){Lightbox.togglePlayPause("lightshowPlay","lightshowPause");return false});$('#prevLink, #nextLink, #framePrevLink, #frameNextLink').css({paddingTop:Lightbox.borderSize+'px'});$('#imageContainer, #frameContainer, #modalContainer').css({padding:Lightbox.borderSize+'px'});$('#outerImageContainer, #imageDataContainer, #bottomNavClose').css({backgroundColor:'#'+Lightbox.boxColor,color:'#'+Lightbox.fontColor});if(Lightbox.alternative_layout){$('#bottomNavZoom, #bottomNavZoomOut').css({bottom:Lightbox.borderSize+'px',right:Lightbox.borderSize+'px'})}else if(Lightbox.rtl==1&&$.browser.msie)$('#bottomNavZoom, #bottomNavZoomOut').css({left:'0px'});if(s.force_show_nav)$('#prevLink, #nextLink').addClass("force_show_nav")},initList:function(context){if(context==undefined||context==null)context=document;$("a[rel^='lightbox']:not(.lightbox-processed), area[rel^='lightbox']:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){if(Lightbox.disableCloseClick){$('#lightbox').unbind('click');$('#lightbox').click(function(){Lightbox.end('forceClose')})};Lightbox.start(this,false,false,false,false);if(e.preventDefault)e.preventDefault();return false});$("a[rel^='lightshow']:not(.lightbox-processed), area[rel^='lightshow']:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){if(Lightbox.disableCloseClick){$('#lightbox').unbind('click');$('#lightbox').click(function(){Lightbox.end('forceClose')})};Lightbox.start(this,true,false,false,false);if(e.preventDefault)e.preventDefault();return false});$("a[rel^='lightframe']:not(.lightbox-processed), area[rel^='lightframe']:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){if(Lightbox.disableCloseClick){$('#lightbox').unbind('click');$('#lightbox').click(function(){Lightbox.end('forceClose')})};Lightbox.start(this,false,true,false,false);if(e.preventDefault)e.preventDefault();return false});if(Lightbox.enableVideo)$("a[rel^='lightvideo']:not(.lightbox-processed), area[rel^='lightvideo']:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){if(Lightbox.disableCloseClick){$('#lightbox').unbind('click');$('#lightbox').click(function(){Lightbox.end('forceClose')})};Lightbox.start(this,false,false,true,false);if(e.preventDefault)e.preventDefault();return false});$("a[rel^='lightmodal']:not(.lightbox-processed), area[rel^='lightmodal']:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){$('#lightbox').unbind('click');$('#lightbox').addClass($(this).attr('class'));$('#lightbox').removeClass('lightbox-processed');Lightbox.start(this,false,false,false,true);if(e.preventDefault)e.preventDefault();return false});$("#lightboxAutoModal:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){Lightbox.auto_modal=true;$('#lightbox').unbind('click');Lightbox.start(this,false,false,false,true);if(e.preventDefault)e.preventDefault();return false})},start:function(imageLink,slideshow,lightframe,lightvideo,lightmodal){Lightbox.isPaused=!Lightbox.autoStart;Lightbox.toggleSelectsFlash('hide');var arrayPageSize=Lightbox.getPageSize();$("#lightbox2-overlay").hide().css({width:'100%',zIndex:'10090',height:arrayPageSize[1]+'px',backgroundColor:'#'+Lightbox.overlayColor});if(lightvideo&&this.detectMacFF2()){$("#lightbox2-overlay").removeClass("overlay_default");$("#lightbox2-overlay").addClass("overlay_macff2");$("#lightbox2-overlay").css({opacity:null})}else{$("#lightbox2-overlay").removeClass("overlay_macff2");$("#lightbox2-overlay").addClass("overlay_default");$("#lightbox2-overlay").css({opacity:Lightbox.overlayOpacity})};$("#lightbox2-overlay").fadeIn(Lightbox.fadeInSpeed);Lightbox.isSlideshow=slideshow;Lightbox.isLightframe=lightframe;Lightbox.isVideo=lightvideo;Lightbox.isModal=lightmodal;Lightbox.imageArray=[];Lightbox.imageNum=0;var anchors=$(imageLink.tagName),anchor=null,rel_parts=Lightbox.parseRel(imageLink),rel=rel_parts.rel,rel_group=rel_parts.group,title=(rel_parts.title?rel_parts.title:imageLink.title),rel_style=null,i=0;if(rel_parts.flashvars)Lightbox.flvFlashvars=Lightbox.flvFlashvars+'&'+rel_parts.flashvars;var alt=imageLink.title;if(!alt){var img=$(imageLink).find("img");if(img&&$(img).attr("alt")){alt=$(img).attr("alt")}else alt=title};if($(imageLink).attr('id')=='lightboxAutoModal'){rel_style=rel_parts.style;Lightbox.imageArray.push(['#lightboxAutoModal > *',title,alt,rel_style,1])}else if((rel=='lightbox'||rel=='lightshow')&&!rel_group){Lightbox.imageArray.push([imageLink.href,title,alt])}else if(!rel_group){rel_style=rel_parts.style;Lightbox.imageArray.push([imageLink.href,title,alt,rel_style])}else{for(i=0;i<anchors.length;i++){anchor=anchors[i];if(anchor.href&&typeof(anchor.href)=="string"&&$(anchor).attr('rel')){var rel_data=Lightbox.parseRel(anchor),anchor_title=(rel_data.title?rel_data.title:anchor.title);img_alt=anchor.title;if(!img_alt){var anchor_img=$(anchor).find("img");if(anchor_img&&$(anchor_img).attr("alt")){img_alt=$(anchor_img).attr("alt")}else img_alt=title};if(rel_data.rel==rel)if(rel_data.group==rel_group){if(Lightbox.isLightframe||Lightbox.isModal||Lightbox.isVideo)rel_style=rel_data.style;Lightbox.imageArray.push([anchor.href,anchor_title,img_alt,rel_style])}}};for(i=0;i<Lightbox.imageArray.length;i++)for(j=Lightbox.imageArray.length-1;j>i;j--)if(Lightbox.imageArray[i][0]==Lightbox.imageArray[j][0])Lightbox.imageArray.splice(j,1);while(Lightbox.imageArray[Lightbox.imageNum][0]!=imageLink.href)Lightbox.imageNum++};if(Lightbox.isSlideshow&&Lightbox.showPlayPause&&Lightbox.isPaused){$('#lightshowPlay').show();$('#lightshowPause').hide()};var arrayPageScroll=Lightbox.getPageScroll(),lightboxTop=arrayPageScroll[1]+(Lightbox.topPosition==''?(arrayPageSize[3]/10):Lightbox.topPosition)*1,lightboxLeft=arrayPageScroll[0];$('#frameContainer, #modalContainer, #lightboxImage').hide();$('#hoverNav, #prevLink, #nextLink, #frameHoverNav, #framePrevLink, #frameNextLink').hide();$('#imageDataContainer, #numberDisplay, #bottomNavZoom, #bottomNavZoomOut').hide();$('#outerImageContainer').css({width:'250px',height:'250px'});$('#lightbox').css({zIndex:'10500',top:lightboxTop+'px',left:lightboxLeft+'px'}).show();Lightbox.total=Lightbox.imageArray.length;Lightbox.changeData(Lightbox.imageNum)},changeData:function(imageNum,zoomIn){if(Lightbox.inprogress===false){if(Lightbox.total>1&&((Lightbox.isSlideshow&&Lightbox.loopSlides)||(!Lightbox.isSlideshow&&Lightbox.loopItems))){if(imageNum>=Lightbox.total)imageNum=0;if(imageNum<0)imageNum=Lightbox.total-1};if(Lightbox.isSlideshow)for(var i=0;i<Lightbox.slideIdCount;i++)window.clearTimeout(Lightbox.slideIdArray[i]);Lightbox.inprogress=true;Lightbox.activeImage=imageNum;if(Lightbox.disableResize&&!Lightbox.isSlideshow)zoomIn=true;Lightbox.isZoomedIn=zoomIn;$('#loading').css({zIndex:'10500'}).show();if(!Lightbox.alternative_layout)$('#imageContainer').hide();$('#frameContainer, #modalContainer, #lightboxImage').hide();$('#hoverNav, #prevLink, #nextLink, #frameHoverNav, #framePrevLink, #frameNextLink').hide();$('#imageDataContainer, #numberDisplay, #bottomNavZoom, #bottomNavZoomOut').hide();if(!Lightbox.isLightframe&&!Lightbox.isVideo&&!Lightbox.isModal){$("#lightbox #imageDataContainer").removeClass('lightbox2-alt-layout-data');imgPreloader=new Image();imgPreloader.onerror=function(){Lightbox.imgNodeLoadingError(this)};imgPreloader.onload=function(){var photo=document.getElementById('lightboxImage');photo.src=Lightbox.imageArray[Lightbox.activeImage][0];photo.alt=Lightbox.imageArray[Lightbox.activeImage][2];var imageWidth=imgPreloader.width,imageHeight=imgPreloader.height,arrayPageSize=Lightbox.getPageSize(),targ={w:arrayPageSize[2]-(Lightbox.borderSize*2),h:arrayPageSize[3]-(Lightbox.borderSize*6)-(Lightbox.infoHeight*4)-(arrayPageSize[3]/10)},orig={w:imgPreloader.width,h:imgPreloader.height};if(zoomIn!==true){var ratio=1.0;$('#bottomNavZoomOut, #bottomNavZoom').hide();if((orig.w>=targ.w||orig.h>=targ.h)&&orig.h&&orig.w){ratio=((targ.w/orig.w)<(targ.h/orig.h))?targ.w/orig.w:targ.h/orig.h;if(!Lightbox.disableZoom&&!Lightbox.isSlideshow)$('#bottomNavZoom').css({zIndex:'10500'}).show()};imageWidth=Math.floor(orig.w*ratio);imageHeight=Math.floor(orig.h*ratio)}else{$('#bottomNavZoom').hide();if((orig.w>=targ.w||orig.h>=targ.h)&&orig.h&&orig.w)if(!Lightbox.disableResize&&Lightbox.isSlideshow===false&&!Lightbox.disableZoom)$('#bottomNavZoomOut').css({zIndex:'10500'}).show()};photo.style.width=imageWidth+'px';photo.style.height=imageHeight+'px';Lightbox.resizeContainer(imageWidth,imageHeight);imgPreloader.onload=function(){}};imgPreloader.src=Lightbox.imageArray[Lightbox.activeImage][0];imgPreloader.alt=Lightbox.imageArray[Lightbox.activeImage][2]}else if(Lightbox.isLightframe){$("#lightbox #imageDataContainer").addClass('lightbox2-alt-layout-data');var src=Lightbox.imageArray[Lightbox.activeImage][0];$('#frameContainer').html('<iframe id="lightboxFrame" style="display: none;" src="'+src+'"></iframe>');if($.browser.mozilla&&src.indexOf('.swf')!=-1)setTimeout(function(){document.getElementById("lightboxFrame").src=Lightbox.imageArray[Lightbox.activeImage][0]},1e3);if(!Lightbox.iframe_border){$('#lightboxFrame').css({border:'none'});$('#lightboxFrame').attr('frameborder','0')};var iframe=document.getElementById('lightboxFrame'),iframeStyles=Lightbox.imageArray[Lightbox.activeImage][3];iframe=Lightbox.setStyles(iframe,iframeStyles);Lightbox.resizeContainer(parseInt(iframe.width,10),parseInt(iframe.height,10))}else if(Lightbox.isVideo||Lightbox.isModal){$("#lightbox #imageDataContainer").addClass('lightbox2-alt-layout-data');var container=document.getElementById('modalContainer'),modalStyles=Lightbox.imageArray[Lightbox.activeImage][3];container=Lightbox.setStyles(container,modalStyles);if(Lightbox.isVideo){Lightbox.modalHeight=parseInt(container.height,10)-10;Lightbox.modalWidth=parseInt(container.width,10)-10;Lightvideo.startVideo(Lightbox.imageArray[Lightbox.activeImage][0])};Lightbox.resizeContainer(parseInt(container.width,10),parseInt(container.height,10))}}},imgNodeLoadingError:function(image){var s=Drupal.settings.lightbox2,original_image=Lightbox.imageArray[Lightbox.activeImage][0];if(s.display_image_size!=="")original_image=original_image.replace(new RegExp("."+s.display_image_size),"");Lightbox.imageArray[Lightbox.activeImage][0]=original_image;image.onerror=function(){Lightbox.imgLoadingError(image)};image.src=original_image},imgLoadingError:function(image){var s=Drupal.settings.lightbox2;Lightbox.imageArray[Lightbox.activeImage][0]=s.default_image;image.src=s.default_image},resizeContainer:function(imgWidth,imgHeight){imgWidth=(imgWidth<Lightbox.minWidth?Lightbox.minWidth:imgWidth);this.widthCurrent=$('#outerImageContainer').width();this.heightCurrent=$('#outerImageContainer').height();var widthNew=(imgWidth+(Lightbox.borderSize*2)),heightNew=(imgHeight+(Lightbox.borderSize*2));this.xScale=(widthNew/this.widthCurrent)*100;this.yScale=(heightNew/this.heightCurrent)*100;wDiff=this.widthCurrent-widthNew;hDiff=this.heightCurrent-heightNew;$('#modalContainer').css({width:imgWidth,height:imgHeight});if(Lightbox.resizeSequence){var animate1={width:widthNew},animate2={height:heightNew};if(Lightbox.resizeSequence==2){animate1={height:heightNew};animate2={width:widthNew}};$('#outerImageContainer').animate(animate1,Lightbox.resizeSpeed).animate(animate2,Lightbox.resizeSpeed,'linear',function(){Lightbox.showData()})}else $('#outerImageContainer').animate({width:widthNew,height:heightNew},Lightbox.resizeSpeed,'linear',function(){Lightbox.showData()});if((hDiff===0)&&(wDiff===0))if($.browser.msie){Lightbox.pause(250)}else Lightbox.pause(100);var s=Drupal.settings.lightbox2;if(!s.use_alt_layout)$('#prevLink, #nextLink').css({height:imgHeight+'px'});$('#imageDataContainer').css({width:widthNew+'px'})},showData:function(){$('#loading').hide();if(Lightbox.isLightframe||Lightbox.isVideo||Lightbox.isModal){Lightbox.updateDetails();if(Lightbox.isLightframe){$('#frameContainer').show();if($.browser.safari||Lightbox.fadeInSpeed===0){$('#lightboxFrame').css({zIndex:'10500'}).show()}else $('#lightboxFrame').css({zIndex:'10500'}).fadeIn(Lightbox.fadeInSpeed)}else if(Lightbox.isVideo){$("#modalContainer").html(Lightbox.modalHTML).click(function(){return false}).css('zIndex','10500').show()}else{var src=unescape(Lightbox.imageArray[Lightbox.activeImage][0]);if(Lightbox.imageArray[Lightbox.activeImage][4]){$(src).appendTo("#modalContainer");$('#modalContainer').css({zIndex:'10500'}).show()}else $("#modalContainer").hide().load(src,function(){$('#modalContainer').css({zIndex:'10500'}).show()});$('#modalContainer').unbind('click')}}else{$('#imageContainer').show();if($.browser.safari||Lightbox.fadeInSpeed===0){$('#lightboxImage').css({zIndex:'10500'}).show()}else $('#lightboxImage').css({zIndex:'10500'}).fadeIn(Lightbox.fadeInSpeed);Lightbox.updateDetails();this.preloadNeighborImages()};Lightbox.inprogress=false;if(Lightbox.isSlideshow){if(!Lightbox.loopSlides&&Lightbox.activeImage==(Lightbox.total-1)){if(Lightbox.autoExit)Lightbox.slideIdArray[Lightbox.slideIdCount++]=setTimeout(function(){Lightbox.end('slideshow')},Lightbox.slideInterval)}else if(!Lightbox.isPaused&&Lightbox.total>1)Lightbox.slideIdArray[Lightbox.slideIdCount++]=setTimeout(function(){Lightbox.changeData(Lightbox.activeImage+1)},Lightbox.slideInterval);if(Lightbox.showPlayPause&&Lightbox.total>1&&!Lightbox.isPaused){$('#lightshowPause').show();$('#lightshowPlay').hide()}else if(Lightbox.showPlayPause&&Lightbox.total>1){$('#lightshowPause').hide();$('#lightshowPlay').show()}};var arrayPageSize=Lightbox.getPageSize(),arrayPageScroll=Lightbox.getPageScroll(),pageHeight=arrayPageSize[1];if(Lightbox.isZoomedIn&&arrayPageSize[1]>arrayPageSize[3]){var lightboxTop=(Lightbox.topPosition==''?(arrayPageSize[3]/10):Lightbox.topPosition)*1;pageHeight=pageHeight+arrayPageScroll[1]+lightboxTop};$('#lightbox2-overlay').css({height:pageHeight+'px',width:arrayPageSize[0]+'px'});if($.browser.mozilla)if(Lightbox.imageArray[Lightbox.activeImage][0].indexOf(".pdf")!=-1)setTimeout(function(){document.getElementById("lightboxFrame").src=Lightbox.imageArray[Lightbox.activeImage][0]},1e3)},updateDetails:function(){$("#imageDataContainer").hide();var s=Drupal.settings.lightbox2;if(s.show_caption){var caption=Lightbox.filterXSS(Lightbox.imageArray[Lightbox.activeImage][1]);if(!caption)caption='';$('#caption').html(caption).css({zIndex:'10500'}).show()};var numberDisplay=null;if(s.image_count&&Lightbox.total>1){var currentImage=Lightbox.activeImage+1;if(!Lightbox.isLightframe&&!Lightbox.isModal&&!Lightbox.isVideo){numberDisplay=s.image_count.replace(/\!current/,currentImage).replace(/\!total/,Lightbox.total)}else if(Lightbox.isVideo){numberDisplay=s.video_count.replace(/\!current/,currentImage).replace(/\!total/,Lightbox.total)}else numberDisplay=s.page_count.replace(/\!current/,currentImage).replace(/\!total/,Lightbox.total);$('#numberDisplay').html(numberDisplay).css({zIndex:'10500'}).show()}else $('#numberDisplay').hide();$("#imageDataContainer").hide().slideDown(Lightbox.slideDownSpeed,function(){$("#bottomNav").show()});if(Lightbox.rtl==1)$("#bottomNav").css({'float':'left'});Lightbox.updateNav()},updateNav:function(){$('#hoverNav').css({zIndex:'10500'}).show();var prevLink='#prevLink',nextLink='#nextLink';if(Lightbox.isSlideshow){if((Lightbox.total>1&&Lightbox.loopSlides)||Lightbox.activeImage!==0){$(prevLink).css({zIndex:'10500'}).show().click(function(){if(Lightbox.pauseOnPrevClick)Lightbox.togglePlayPause("lightshowPause","lightshowPlay");Lightbox.changeData(Lightbox.activeImage-1);return false})}else $(prevLink).hide();if((Lightbox.total>1&&Lightbox.loopSlides)||Lightbox.activeImage!=(Lightbox.total-1)){$(nextLink).css({zIndex:'10500'}).show().click(function(){if(Lightbox.pauseOnNextClick)Lightbox.togglePlayPause("lightshowPause","lightshowPlay");Lightbox.changeData(Lightbox.activeImage+1);return false})}else $(nextLink).hide()}else{if((Lightbox.isLightframe||Lightbox.isModal||Lightbox.isVideo)&&!Lightbox.alternative_layout){$('#frameHoverNav').css({zIndex:'10500'}).show();$('#hoverNav').css({zIndex:'10500'}).hide();prevLink='#framePrevLink';nextLink='#frameNextLink'};if((Lightbox.total>1&&Lightbox.loopItems)||Lightbox.activeImage!==0){$(prevLink).css({zIndex:'10500'}).show().unbind().click(function(){Lightbox.changeData(Lightbox.activeImage-1);return false})}else $(prevLink).hide();if((Lightbox.total>1&&Lightbox.loopItems)||Lightbox.activeImage!=(Lightbox.total-1)){$(nextLink).css({zIndex:'10500'}).show().unbind().click(function(){Lightbox.changeData(Lightbox.activeImage+1);return false})}else $(nextLink).hide()};if(!Lightbox.isModal)this.enableKeyboardNav()},enableKeyboardNav:function(){$(document).bind("keydown",this.keyboardAction)},disableKeyboardNav:function(){$(document).unbind("keydown",this.keyboardAction)},keyboardAction:function(e){if(e===null){keycode=event.keyCode;escapeKey=27}else{keycode=e.keyCode;escapeKey=e.DOM_VK_ESCAPE};key=String.fromCharCode(keycode).toLowerCase();if(Lightbox.checkKey(Lightbox.keysClose,key,keycode)){Lightbox.end('forceClose')}else if(Lightbox.checkKey(Lightbox.keysPrevious,key,keycode)){if((Lightbox.total>1&&((Lightbox.isSlideshow&&Lightbox.loopSlides)||(!Lightbox.isSlideshow&&Lightbox.loopItems)))||Lightbox.activeImage!==0)Lightbox.changeData(Lightbox.activeImage-1)}else if(Lightbox.checkKey(Lightbox.keysNext,key,keycode)){if((Lightbox.total>1&&((Lightbox.isSlideshow&&Lightbox.loopSlides)||(!Lightbox.isSlideshow&&Lightbox.loopItems)))||Lightbox.activeImage!=(Lightbox.total-1))Lightbox.changeData(Lightbox.activeImage+1)}else if(Lightbox.checkKey(Lightbox.keysZoom,key,keycode)&&!Lightbox.disableResize&&!Lightbox.disableZoom&&!Lightbox.isSlideshow&&!Lightbox.isLightframe){if(Lightbox.isZoomedIn){Lightbox.changeData(Lightbox.activeImage,false)}else if(!Lightbox.isZoomedIn)Lightbox.changeData(Lightbox.activeImage,true);return false}else if(Lightbox.checkKey(Lightbox.keysPlayPause,key,keycode)&&Lightbox.isSlideshow){if(Lightbox.isPaused){Lightbox.togglePlayPause("lightshowPlay","lightshowPause")}else Lightbox.togglePlayPause("lightshowPause","lightshowPlay");return false}},preloadNeighborImages:function(){if((Lightbox.total-1)>Lightbox.activeImage){preloadNextImage=new Image();preloadNextImage.src=Lightbox.imageArray[Lightbox.activeImage+1][0]};if(Lightbox.activeImage>0){preloadPrevImage=new Image();preloadPrevImage.src=Lightbox.imageArray[Lightbox.activeImage-1][0]}},end:function(caller){var closeClick=(caller=='slideshow'?false:true);if(Lightbox.isSlideshow&&Lightbox.isPaused&&!closeClick)return;if(Lightbox.inprogress===true&&caller!='forceClose')return;Lightbox.disableKeyboardNav();$('#lightbox').hide();$("#lightbox2-overlay").fadeOut();Lightbox.isPaused=true;Lightbox.inprogress=false;Lightbox.toggleSelectsFlash('visible');if(Lightbox.isSlideshow){for(var i=0;i<Lightbox.slideIdCount;i++)window.clearTimeout(Lightbox.slideIdArray[i]);$('#lightshowPause, #lightshowPlay').hide()}else if(Lightbox.isLightframe){$('#frameContainer').empty().hide()}else if(Lightbox.isVideo||Lightbox.isModal){if(!Lightbox.auto_modal)$('#modalContainer').hide().html("");Lightbox.auto_modal=false}},getPageScroll:function(){var xScroll,yScroll;if(self.pageYOffset||self.pageXOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset}else if(document.documentElement&&(document.documentElement.scrollTop||document.documentElement.scrollLeft)){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft};arrayPageScroll=[xScroll,yScroll];return arrayPageScroll},getPageSize:function(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight};var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth}else windowWidth=self.innerWidth;windowHeight=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight};if(yScroll<windowHeight){pageHeight=windowHeight}else pageHeight=yScroll;if(xScroll<windowWidth){pageWidth=xScroll}else pageWidth=windowWidth;arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize},pause:function(ms){var date=new Date(),curDate=null;do{curDate=new Date()}while(curDate-date<ms)},toggleSelectsFlash:function(state){if(state=='visible'){$("select.lightbox_hidden, embed.lightbox_hidden, object.lightbox_hidden").show()}else if(state=='hide'){$("select:visible, embed:visible, object:visible").not('#lightboxAutoModal select, #lightboxAutoModal embed, #lightboxAutoModal object').addClass("lightbox_hidden");$("select.lightbox_hidden, embed.lightbox_hidden, object.lightbox_hidden").hide()}},parseRel:function(link){var parts=[];parts.rel=parts.title=parts.group=parts.style=parts.flashvars=null;if(!$(link).attr('rel'))return parts;parts.rel=$(link).attr('rel').match(/\w+/)[0];if($(link).attr('rel').match(/\[(.*)\]/)){var info=$(link).attr('rel').match(/\[(.*?)\]/)[1].split('|');parts.group=info[0];parts.style=info[1];if(parts.style!=undefined&&parts.style.match(/flashvars:\s?(.*?);/))parts.flashvars=parts.style.match(/flashvars:\s?(.*?);/)[1]};if($(link).attr('rel').match(/\[.*\]\[(.*)\]/))parts.title=$(link).attr('rel').match(/\[.*\]\[(.*)\]/)[1];return parts},setStyles:function(item,styles){item.width=Lightbox.iframe_width;item.height=Lightbox.iframe_height;item.scrolling="auto";if(!styles)return item;var stylesArray=styles.split(';');for(var i=0;i<stylesArray.length;i++)if(stylesArray[i].indexOf('width:')>=0){var w=stylesArray[i].replace('width:','');item.width=jQuery.trim(w)}else if(stylesArray[i].indexOf('height:')>=0){var h=stylesArray[i].replace('height:','');item.height=jQuery.trim(h)}else if(stylesArray[i].indexOf('scrolling:')>=0){var scrolling=stylesArray[i].replace('scrolling:','');item.scrolling=jQuery.trim(scrolling)}else if(stylesArray[i].indexOf('overflow:')>=0){var overflow=stylesArray[i].replace('overflow:','');item.overflow=jQuery.trim(overflow)};return item},togglePlayPause:function(hideId,showId){if(Lightbox.isSlideshow&&hideId=="lightshowPause")for(var i=0;i<Lightbox.slideIdCount;i++)window.clearTimeout(Lightbox.slideIdArray[i]);$('#'+hideId).hide();$('#'+showId).show();if(hideId=="lightshowPlay"){Lightbox.isPaused=false;if(!Lightbox.loopSlides&&Lightbox.activeImage==(Lightbox.total-1)){Lightbox.end()}else if(Lightbox.total>1)Lightbox.changeData(Lightbox.activeImage+1)}else Lightbox.isPaused=true},triggerLightbox:function(rel_type,rel_group){if(rel_type.length)if(rel_group&&rel_group.length){$("a[rel^='"+rel_type+"\["+rel_group+"\]'], area[rel^='"+rel_type+"\["+rel_group+"\]']").eq(0).trigger("click")}else $("a[rel^='"+rel_type+"'], area[rel^='"+rel_type+"']").eq(0).trigger("click")},detectMacFF2:function(){var ua=navigator.userAgent.toLowerCase();if(/firefox[\/\s](\d+\.\d+)/.test(ua)){var ffversion=new Number(RegExp.$1);if(ffversion<3&&ua.indexOf('mac')!=-1)return true};return false},checkKey:function(keys,key,code){return(jQuery.inArray(key,keys)!=-1||jQuery.inArray(String(code),keys)!=-1)},filterXSS:function(str,allowed_tags){var output="";$.ajax({url:Drupal.settings.basePath+'system/lightbox2/filter-xss',data:{string:str,allowed_tags:allowed_tags},type:"POST",async:false,dataType:"json",success:function(data){output=data}});return output}};Drupal.behaviors.initLightbox=function(context){$('body:not(.lightbox-processed)',context).addClass('lightbox-processed').each(function(){Lightbox.initialize();return false});Lightbox.initList(context);$('#lightboxAutoModal',context).triggerHandler('click')};

