Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"":{"@title dialog":"@title dialoog","Show":"Weergeven","(active tab)":"(actieve tabblad)","Changes made in this table will not be saved until the form is submitted.":"Wijzigingen in deze tabel worden pas opgeslagen wanneer het formulier wordt ingediend.","Hide shortcuts":"Verberg snelkoppelingen","An AJAX HTTP request terminated abnormally.":"Een AJAX HTTP-aanvraag is onverwacht afgebroken","Debugging information follows.":"Debug informatie volgt.","Path: !uri":"Pad: !uri","StatusText: !statusText":"Statustekst: !statusText","ResponseText: !responseText":"Antwoordtekst: !responseText","ReadyState: !readyState":"ReadyState: !readyState","Re-order rows by numerical weight instead of dragging.":"Herschik de rijen op basis van gewicht, in plaats van slepen.","Show shortcuts":"Snelkoppelingen weergeven","Hide":"Verbergen","Show row weights":"Gewicht van rijen tonen","Hide row weights":"Gewicht van rij verbergen","Drag to re-order":"Slepen om de volgorde te wijzigen","An AJAX HTTP error occurred.":"Er is een AJAX HTTP fout opgetreden.","HTTP Result Code: !status":"HTTP-resultaatcode: !status","Edit":"Bewerken","Customize dashboard":"Dashboard aanpassen","Downloads":"Downloads","Not restricted":"Geen beperking","Please wait...":"Even geduld...","Not in menu":"Niet in een menu","Alias: @alias":"Alias: @alias","New revision":"Nieuwe revisie","By @name":"Door @name","By @name on @date":"Door @name op @date","Edit summary":"Samenvatting bewerken","Hide summary":"Samenvatting verbergen","The block cannot be placed in this region.":"Het blok kan niet worden geplaatst in dit gebied.","Don't display post information":"Geen berichtinformatie weergeven","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"Het bestand %filename kan niet ge\u00fcpload worden. Alleen bestanden met de volgende extensies zijn toegestaan: %extensions","Searching for matches...":"Zoeken naar overeenkomsten...","Autocomplete popup":"Popup voor automatisch aanvullen","Delete selected files?":"Geselecteerde bestanden verwijderen?","Do you want to refresh the current directory?":"Wilt u de huidige map verversen?","%filename is not an image.":"%filename is geen afbeelding.","Close":"Sluiten","You are not allowed to operate on more than %num files.":"U mag aan niet meer dan %num bestanden werken.","Please select a thumbnail.":"Kies een miniatuur","Please select a file.":"Selecteer a.u.b. een bestand.","You can not perform this operation.":"U kunt deze actie niet uitvoeren.","You must select at least %num files.":"Er dienen tenminste %num bestanden geselecteerd te worden.","Log messages":"Log berichten","Insert file":"Bestand toevoegen","File browsing is disabled in directory %dir.":"Bestanden zoeken is uitgeschakeld in folder %dir.","Deselect all rows in this table":"De-selecteer alle regels van deze tabel","Only files with the following extensions are allowed: %files-allowed.":"Uitsluitend bestanden met de volgende extensies zijn toegelaten: %files-allowed.","No revision":"Geen revisie","No alias":"Geen alias","Done":"Gereed","Not published":"Niet gepubliceerd","Loading":"Laden","Restricted to certain pages":"Beperkt tot bepaalde pagina's","Configure":"Instellen","@number comments per page":"@number reacties per pagina","Requires a title":"Een titel is verplicht","Not customizable":"Niet aanpasbaar","The changes to these blocks will not be saved until the \u003cem\u003eSave blocks\u003c\/em\u003e button is clicked.":"Wijzigingen aan de blokken worden pas opgeslagen wanneer u de knop \u003cem\u003eBlokken opslaan\u003c\/em\u003e aanklikt.","Upload":"Uploaden","Select all rows in this table":"Selecteer alle regels van deze tabel"}} };;
(function(a){Drupal.viewsSlideshow=Drupal.viewsSlideshow||{};Drupal.viewsSlideshowControls=Drupal.viewsSlideshowControls||{};Drupal.viewsSlideshowControls.play=function(b){try{if(typeof Drupal.settings.viewsSlideshowControls[b.slideshowID].top.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowControls[b.slideshowID].top.type].play=="function"){Drupal[Drupal.settings.viewsSlideshowControls[b.slideshowID].top.type].play(b);}}catch(c){}try{if(typeof Drupal.settings.viewsSlideshowControls[b.slideshowID].bottom.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowControls[b.slideshowID].bottom.type].play=="function"){Drupal[Drupal.settings.viewsSlideshowControls[b.slideshowID].bottom.type].play(b);}}catch(c){}};Drupal.viewsSlideshowControls.pause=function(b){try{if(typeof Drupal.settings.viewsSlideshowControls[b.slideshowID].top.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowControls[b.slideshowID].top.type].pause=="function"){Drupal[Drupal.settings.viewsSlideshowControls[b.slideshowID].top.type].pause(b);}}catch(c){}try{if(typeof Drupal.settings.viewsSlideshowControls[b.slideshowID].bottom.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowControls[b.slideshowID].bottom.type].pause=="function"){Drupal[Drupal.settings.viewsSlideshowControls[b.slideshowID].bottom.type].pause(b);}}catch(c){}};Drupal.behaviors.viewsSlideshowControlsText={attach:function(b){a(".views_slideshow_controls_text_previous:not(.views-slideshow-controls-text-previous-processed)",b).addClass("views-slideshow-controls-text-previous-processed").each(function(){var c=a(this).attr("id").replace("views_slideshow_controls_text_previous_","");a(this).click(function(){Drupal.viewsSlideshow.action({action:"previousSlide",slideshowID:c});return false;});});a(".views_slideshow_controls_text_next:not(.views-slideshow-controls-text-next-processed)",b).addClass("views-slideshow-controls-text-next-processed").each(function(){var c=a(this).attr("id").replace("views_slideshow_controls_text_next_","");a(this).click(function(){Drupal.viewsSlideshow.action({action:"nextSlide",slideshowID:c});return false;});});a(".views_slideshow_controls_text_pause:not(.views-slideshow-controls-text-pause-processed)",b).addClass("views-slideshow-controls-text-pause-processed").each(function(){var c=a(this).attr("id").replace("views_slideshow_controls_text_pause_","");a(this).click(function(){if(Drupal.settings.viewsSlideshow[c].paused){Drupal.viewsSlideshow.action({action:"play",slideshowID:c,force:true});}else{Drupal.viewsSlideshow.action({action:"pause",slideshowID:c,force:true});}return false;});});}};Drupal.viewsSlideshowControlsText=Drupal.viewsSlideshowControlsText||{};Drupal.viewsSlideshowControlsText.pause=function(c){var b=Drupal.theme.prototype.viewsSlideshowControlsPause?Drupal.theme("viewsSlideshowControlsPause"):"";a("#views_slideshow_controls_text_pause_"+c.slideshowID+" a").text(b);};Drupal.viewsSlideshowControlsText.play=function(b){var c=Drupal.theme.prototype.viewsSlideshowControlsPlay?Drupal.theme("viewsSlideshowControlsPlay"):"";a("#views_slideshow_controls_text_pause_"+b.slideshowID+" a").text(c);};Drupal.theme.prototype.viewsSlideshowControlsPause=function(){return Drupal.t("Resume");};Drupal.theme.prototype.viewsSlideshowControlsPlay=function(){return Drupal.t("Pause");};Drupal.viewsSlideshowPager=Drupal.viewsSlideshowPager||{};Drupal.viewsSlideshowPager.transitionBegin=function(b){try{if(typeof Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type].transitionBegin=="function"){Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type].transitionBegin(b);}}catch(c){}try{if(typeof Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type].transitionBegin=="function"){Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type].transitionBegin(b);}}catch(c){}};Drupal.viewsSlideshowPager.goToSlide=function(b){try{if(typeof Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type].goToSlide=="function"){Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type].goToSlide(b);}}catch(c){}try{if(typeof Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type].goToSlide=="function"){Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type].goToSlide(b);}}catch(c){}};Drupal.viewsSlideshowPager.previousSlide=function(b){try{if(typeof Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type].previousSlide=="function"){Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type].previousSlide(b);}}catch(c){}try{if(typeof Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type].previousSlide=="function"){Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type].previousSlide(b);}}catch(c){}};Drupal.viewsSlideshowPager.nextSlide=function(b){try{if(typeof Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type].nextSlide=="function"){Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].top.type].nextSlide(b);}}catch(c){}try{if(typeof Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type!="undefined"&&typeof Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type].nextSlide=="function"){Drupal[Drupal.settings.viewsSlideshowPager[b.slideshowID].bottom.type].nextSlide(b);}}catch(c){}};Drupal.behaviors.viewsSlideshowPagerFields={attach:function(b){a(".views_slideshow_pager_field:not(.views-slideshow-pager-field-processed)",b).addClass("views-slideshow-pager-field-processed").each(function(){var e=a(this).attr("id").split("_");var c=e[2];e.splice(0,3);var d=e.join("_");if(Drupal.settings.viewsSlideshowPagerFields[d][c].activatePauseOnHover){a(this).children().each(function(g,i){var f=function(){Drupal.viewsSlideshow.action({action:"goToSlide",slideshowID:d,slideNum:g});Drupal.viewsSlideshow.action({action:"pause",slideshowID:d});};var h=function(){Drupal.viewsSlideshow.action({action:"play",slideshowID:d});};if(jQuery.fn.hoverIntent){a(i).hoverIntent(f,h);}else{a(i).hover(f,h);}});}else{a(this).children().each(function(f,g){a(g).click(function(){Drupal.viewsSlideshow.action({action:"goToSlide",slideshowID:d,slideNum:f});});});}});}};Drupal.viewsSlideshowPagerFields=Drupal.viewsSlideshowPagerFields||{};Drupal.viewsSlideshowPagerFields.transitionBegin=function(b){for(pagerLocation in Drupal.settings.viewsSlideshowPager[b.slideshowID]){a('[id^="views_slideshow_pager_field_item_'+pagerLocation+"_"+b.slideshowID+'"]').removeClass("active");a("#views_slideshow_pager_field_item_"+pagerLocation+"_"+b.slideshowID+"_"+b.slideNum).addClass("active");}};Drupal.viewsSlideshowPagerFields.goToSlide=function(b){for(pagerLocation in Drupal.settings.viewsSlideshowPager[b.slideshowID]){a('[id^="views_slideshow_pager_field_item_'+pagerLocation+"_"+b.slideshowID+'"]').removeClass("active");a("#views_slideshow_pager_field_item_"+pagerLocation+"_"+b.slideshowID+"_"+b.slideNum).addClass("active");}};Drupal.viewsSlideshowPagerFields.previousSlide=function(b){for(pagerLocation in Drupal.settings.viewsSlideshowPager[b.slideshowID]){var c=a('[id^="views_slideshow_pager_field_item_'+pagerLocation+"_"+b.slideshowID+'"].active').attr("id").replace("views_slideshow_pager_field_item_"+pagerLocation+"_"+b.slideshowID+"_","");if(c==0){c=a('[id^="views_slideshow_pager_field_item_'+pagerLocation+"_"+b.slideshowID+'"]').length()-1;}else{c--;}a('[id^="views_slideshow_pager_field_item_'+pagerLocation+"_"+b.slideshowID+'"]').removeClass("active");a("#views_slideshow_pager_field_item_"+pagerLocation+"_"+b.slideshowID+"_"+c).addClass("active");}};Drupal.viewsSlideshowPagerFields.nextSlide=function(b){for(pagerLocation in Drupal.settings.viewsSlideshowPager[b.slideshowID]){var d=a('[id^="views_slideshow_pager_field_item_'+pagerLocation+"_"+b.slideshowID+'"].active').attr("id").replace("views_slideshow_pager_field_item_"+pagerLocation+"_"+b.slideshowID+"_","");var c=a('[id^="views_slideshow_pager_field_item_'+pagerLocation+"_"+b.slideshowID+'"]').length();d++;if(d==c){d=0;}a('[id^="views_slideshow_pager_field_item_'+pagerLocation+"_"+b.slideshowID+'"]').removeClass("active");a("#views_slideshow_pager_field_item_"+pagerLocation+"_"+b.slideshowID+"_"+slideNum).addClass("active");}};Drupal.viewsSlideshowSlideCounter=Drupal.viewsSlideshowSlideCounter||{};Drupal.viewsSlideshowSlideCounter.transitionBegin=function(b){a("#views_slideshow_slide_counter_"+b.slideshowID+" .num").text(b.slideNum+1);};Drupal.viewsSlideshow.action=function(d){var b={value:true,text:""};if(typeof d.action=="undefined"||d.action==""){b.value=false;b.text=Drupal.t("There was no action specified.");return error;}if(d.action=="pause"){Drupal.settings.viewsSlideshow[d.slideshowID].paused=1;if(d.force){Drupal.settings.viewsSlideshow[d.slideshowID].pausedForce=1;}}else{if(d.action=="play"){if(!Drupal.settings.viewsSlideshow[d.slideshowID].pausedForce||d.force){Drupal.settings.viewsSlideshow[d.slideshowID].paused=0;Drupal.settings.viewsSlideshow[d.slideshowID].pausedForce=0;}else{b.value=false;b.text+=" "+Drupal.t("This slideshow is forced paused.");return b;}}}switch(d.action){case"goToSlide":case"transitionBegin":case"transitionEnd":if(typeof d.slideNum=="undefined"||typeof d.slideNum!=="number"||parseInt(d.slideNum)!=(d.slideNum-0)){b.value=false;b.text=Drupal.t("An invalid integer was specified for slideNum.");}case"pause":case"play":case"nextSlide":case"previousSlide":var c=Drupal.settings.viewsSlideshow[d.slideshowID]["methods"];var f={};if(typeof d.excludeMethods!=="undefined"){for(var e=0;e<excludeMethods.length;e++){f[excludeMethods[e]]="";}}for(e=0;e<c[d.action].length;e++){if(Drupal[c[d.action][e]]!=undefined&&typeof Drupal[c[d.action][e]][d.action]=="function"&&!(c[d.action][e] in f)){Drupal[c[d.action][e]][d.action](d);}}break;default:b.value=false;b.text=Drupal.t('An invalid action "!action" was specified.',{"!action":d.action});}return b;};})(jQuery);;
/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.9999 (13-NOV-2011)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.3.2 or later
 */
(function(c,d){var b="2.9999";if(c.support==d){c.support={opacity:!(c.browser.msie)};}function g(t){c.fn.cycle.debug&&f(t);}function f(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "));}c.expr[":"].paused=function(t){return t.cyclePause;};c.fn.cycle=function(u,t){var v={s:this.selector,c:this.context};if(this.length===0&&u!="stop"){if(!c.isReady&&v.s){f("DOM not ready, queuing slideshow");c(function(){c(v.s,v.c).cycle(u,t);});return this;}f("terminating; zero elements found by selector"+(c.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var z=l(this,u,t);if(z===false){return;}z.updateActivePagerLink=z.updateActivePagerLink||c.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var A=c(this);var B=z.slideExpr?c(z.slideExpr,this):A.children();var x=B.get();var w=r(A,B,x,z,v);if(w===false){return;}if(x.length<2){f("terminating; too few slides: "+x.length);return;}var y=w.continuous?10:m(x[w.currSlide],x[w.nextSlide],w,!w.backwards);if(y){y+=(w.delay||0);if(y<10){y=10;}g("first timeout: "+y);this.cycleTimeout=setTimeout(function(){n(x,w,0,!z.backwards);},y);}});};function k(t,w,v){var x=c(t).data("cycle.opts");var u=!!t.cyclePause;if(u&&x.paused){x.paused(t,x,w,v);}else{if(!u&&x.resumed){x.resumed(t,x,w,v);}}}function l(t,w,u){if(t.cycleStop==d){t.cycleStop=0;}if(w===d||w===null){w={};}if(w.constructor==String){switch(w){case"destroy":case"stop":var y=c(t).data("cycle.opts");if(!y){return false;}t.cycleStop++;if(t.cycleTimeout){clearTimeout(t.cycleTimeout);}t.cycleTimeout=0;y.elements&&c(y.elements).stop();c(t).removeData("cycle.opts");if(w=="destroy"){s(y);}return false;case"toggle":t.cyclePause=(t.cyclePause===1)?0:1;x(t.cyclePause,u,t);k(t);return false;case"pause":t.cyclePause=1;k(t);return false;case"resume":t.cyclePause=0;x(false,u,t);k(t);return false;case"prev":case"next":var y=c(t).data("cycle.opts");if(!y){f('options not found, "prev/next" ignored');return false;}c.fn.cycle[w](y);return false;default:w={fx:w};}return w;}else{if(w.constructor==Number){var v=w;w=c(t).data("cycle.opts");if(!w){f("options not found, can not advance slide");return false;}if(v<0||v>=w.elements.length){f("invalid slide index: "+v);return false;}w.nextSlide=v;if(t.cycleTimeout){clearTimeout(t.cycleTimeout);t.cycleTimeout=0;}if(typeof u=="string"){w.oneTimeFx=u;}n(w.elements,w,1,v>=w.currSlide);return false;}}return w;function x(A,B,z){if(!A&&B===true){var C=c(z).data("cycle.opts");if(!C){f("options not found, can not resume");return false;}if(z.cycleTimeout){clearTimeout(z.cycleTimeout);z.cycleTimeout=0;}n(C.elements,C,1,!C.backwards);}}}function e(t,u){if(!c.support.opacity&&u.cleartype&&t.style.filter){try{t.style.removeAttribute("filter");}catch(v){}}}function s(t){if(t.next){c(t.next).unbind(t.prevNextEvent);}if(t.prev){c(t.prev).unbind(t.prevNextEvent);}if(t.pager||t.pagerAnchorBuilder){c.each(t.pagerAnchors||[],function(){this.unbind().remove();});}t.pagerAnchors=null;if(t.destroy){t.destroy(t);}}function r(D,R,A,z,K){var t;var I=c.extend({},c.fn.cycle.defaults,z||{},c.metadata?D.metadata():c.meta?D.data():{});var G=c.isFunction(D.data)?D.data(I.metaAttr):null;if(G){I=c.extend(I,G);}if(I.autostop){I.countdown=I.autostopCount||A.length;}var v=D[0];D.data("cycle.opts",I);I.$cont=D;I.stopCount=v.cycleStop;I.elements=A;I.before=I.before?[I.before]:[];I.after=I.after?[I.after]:[];if(!c.support.opacity&&I.cleartype){I.after.push(function(){e(this,I);});}if(I.continuous){I.after.push(function(){n(A,I,0,!I.backwards);});}i(I);if(!c.support.opacity&&I.cleartype&&!I.cleartypeNoBg){a(R);}if(D.css("position")=="static"){D.css("position","relative");}if(I.width){D.width(I.width);}if(I.height&&I.height!="auto"){D.height(I.height);}if(I.startingSlide!=d){I.startingSlide=parseInt(I.startingSlide,10);if(I.startingSlide>=A.length||I.startSlide<0){I.startingSlide=0;}else{t=true;}}else{if(I.backwards){I.startingSlide=A.length-1;}else{I.startingSlide=0;}}if(I.random){I.randomMap=[];for(var P=0;P<A.length;P++){I.randomMap.push(P);}I.randomMap.sort(function(T,w){return Math.random()-0.5;});if(t){for(var N=0;N<A.length;N++){if(I.startingSlide==I.randomMap[N]){I.randomIndex=N;}}}else{I.randomIndex=1;I.startingSlide=I.randomMap[1];}}else{if(I.startingSlide>=A.length){I.startingSlide=0;}}I.currSlide=I.startingSlide||0;var C=I.startingSlide;R.css({position:"absolute",top:0,left:0}).hide().each(function(w){var T;if(I.backwards){T=C?w<=C?A.length+(w-C):C-w:A.length-w;}else{T=C?w>=C?A.length-(w-C):C-w:A.length-w;}c(this).css("z-index",T);});c(A[C]).css("opacity",1).show();e(A[C],I);if(I.fit){if(!I.aspect){if(I.width){R.width(I.width);}if(I.height&&I.height!="auto"){R.height(I.height);}}else{R.each(function(){var T=c(this);var w=(I.aspect===true)?T.width()/T.height():I.aspect;if(I.width&&T.width()!=I.width){T.width(I.width);T.height(I.width/w);}if(I.height&&T.height()<I.height){T.height(I.height);T.width(I.height*w);}});}}if(I.center&&((!I.fit)||I.aspect)){R.each(function(){var w=c(this);w.css({"margin-left":I.width?((I.width-w.width())/2)+"px":0,"margin-top":I.height?((I.height-w.height())/2)+"px":0});});}if(I.center&&!I.fit&&!I.slideResize){R.each(function(){var w=c(this);w.css({"margin-left":I.width?((I.width-w.width())/2)+"px":0,"margin-top":I.height?((I.height-w.height())/2)+"px":0});});}var J=I.containerResize&&!D.innerHeight();if(J){var B=0,H=0;for(var M=0;M<A.length;M++){var u=c(A[M]),S=u[0],F=u.outerWidth(),Q=u.outerHeight();if(!F){F=S.offsetWidth||S.width||u.attr("width");}if(!Q){Q=S.offsetHeight||S.height||u.attr("height");}B=F>B?F:B;H=Q>H?Q:H;}if(B>0&&H>0){D.css({width:B+"px",height:H+"px"});}}var y=false;if(I.pause){D.hover(function(){y=true;this.cyclePause++;k(v,true);},function(){y&&this.cyclePause--;k(v,true);});}if(o(I)===false){return false;}var x=false;z.requeueAttempts=z.requeueAttempts||0;R.each(function(){var V=c(this);this.cycleH=(I.fit&&I.height)?I.height:(V.height()||this.offsetHeight||this.height||V.attr("height")||0);this.cycleW=(I.fit&&I.width)?I.width:(V.width()||this.offsetWidth||this.width||V.attr("width")||0);if(V.is("img")){var T=(c.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var W=(c.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var U=(c.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var w=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(T||W||U||w){if(K.s&&I.requeueOnImageNotLoaded&&++z.requeueAttempts<100){f(z.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){c(K.s,K.c).cycle(z);},I.requeueTimeout);x=true;return false;}else{f("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(x){return false;}I.cssBefore=I.cssBefore||{};I.cssAfter=I.cssAfter||{};I.cssFirst=I.cssFirst||{};I.animIn=I.animIn||{};I.animOut=I.animOut||{};R.not(":eq("+C+")").css(I.cssBefore);c(R[C]).css(I.cssFirst);if(I.timeout){I.timeout=parseInt(I.timeout,10);if(I.speed.constructor==String){I.speed=c.fx.speeds[I.speed]||parseInt(I.speed,10);}if(!I.sync){I.speed=I.speed/2;}var L=I.fx=="none"?0:I.fx=="shuffle"?500:250;while((I.timeout-I.speed)<L){I.timeout+=I.speed;}}if(I.easing){I.easeIn=I.easeOut=I.easing;}if(!I.speedIn){I.speedIn=I.speed;}if(!I.speedOut){I.speedOut=I.speed;}I.slideCount=A.length;I.currSlide=I.lastSlide=C;if(I.random){if(++I.randomIndex==A.length){I.randomIndex=0;}I.nextSlide=I.randomMap[I.randomIndex];}else{if(I.backwards){I.nextSlide=I.startingSlide==0?(A.length-1):I.startingSlide-1;}else{I.nextSlide=I.startingSlide>=(A.length-1)?0:I.startingSlide+1;}}if(!I.multiFx){var O=c.fn.cycle.transitions[I.fx];if(c.isFunction(O)){O(D,R,I);}else{if(I.fx!="custom"&&!I.multiFx){f("unknown transition: "+I.fx,"; slideshow terminating");return false;}}}var E=R[C];if(!I.skipInitializationCallbacks){if(I.before.length){I.before[0].apply(E,[E,E,I,true]);}if(I.after.length){I.after[0].apply(E,[E,E,I,true]);}}if(I.next){c(I.next).bind(I.prevNextEvent,function(){return h(I,1);});}if(I.prev){c(I.prev).bind(I.prevNextEvent,function(){return h(I,0);});}if(I.pager||I.pagerAnchorBuilder){q(A,I);}j(I,A);return I;}function i(t){t.original={before:[],after:[]};t.original.cssBefore=c.extend({},t.cssBefore);t.original.cssAfter=c.extend({},t.cssAfter);t.original.animIn=c.extend({},t.animIn);t.original.animOut=c.extend({},t.animOut);c.each(t.before,function(){t.original.before.push(this);});c.each(t.after,function(){t.original.after.push(this);});}function o(z){var x,v,u=c.fn.cycle.transitions;if(z.fx.indexOf(",")>0){z.multiFx=true;z.fxs=z.fx.replace(/\s*/g,"").split(",");for(x=0;x<z.fxs.length;x++){var y=z.fxs[x];v=u[y];if(!v||!u.hasOwnProperty(y)||!c.isFunction(v)){f("discarding unknown transition: ",y);z.fxs.splice(x,1);x--;}}if(!z.fxs.length){f("No valid transitions named; slideshow terminating.");return false;}}else{if(z.fx=="all"){z.multiFx=true;z.fxs=[];for(p in u){v=u[p];if(u.hasOwnProperty(p)&&c.isFunction(v)){z.fxs.push(p);}}}}if(z.multiFx&&z.randomizeEffects){var w=Math.floor(Math.random()*20)+30;for(x=0;x<w;x++){var t=Math.floor(Math.random()*z.fxs.length);z.fxs.push(z.fxs.splice(t,1)[0]);}g("randomized fx sequence: ",z.fxs);}return true;}function j(u,t){u.addSlide=function(w,x){var v=c(w),y=v[0];if(!u.autostopCount){u.countdown++;}t[x?"unshift":"push"](y);if(u.els){u.els[x?"unshift":"push"](y);}u.slideCount=t.length;if(u.random){u.randomMap.push(u.slideCount-1);u.randomMap.sort(function(A,z){return Math.random()-0.5;});}v.css("position","absolute");v[x?"prependTo":"appendTo"](u.$cont);if(x){u.currSlide++;u.nextSlide++;}if(!c.support.opacity&&u.cleartype&&!u.cleartypeNoBg){a(v);}if(u.fit&&u.width){v.width(u.width);}if(u.fit&&u.height&&u.height!="auto"){v.height(u.height);}y.cycleH=(u.fit&&u.height)?u.height:v.height();y.cycleW=(u.fit&&u.width)?u.width:v.width();v.css(u.cssBefore);if(u.pager||u.pagerAnchorBuilder){c.fn.cycle.createPagerAnchor(t.length-1,y,c(u.pager),t,u);}if(c.isFunction(u.onAddSlide)){u.onAddSlide(v);}else{v.hide();}};}c.fn.cycle.resetState=function(u,t){t=t||u.fx;u.before=[];u.after=[];u.cssBefore=c.extend({},u.original.cssBefore);u.cssAfter=c.extend({},u.original.cssAfter);u.animIn=c.extend({},u.original.animIn);u.animOut=c.extend({},u.original.animOut);u.fxFn=null;c.each(u.original.before,function(){u.before.push(this);});c.each(u.original.after,function(){u.after.push(this);});var v=c.fn.cycle.transitions[t];if(c.isFunction(v)){v(u.$cont,c(u.elements),u);}};function n(z,t,y,B){if(y&&t.busy&&t.manualTrump){g("manualTrump in go(), stopping active transition");c(z).stop(true,true);t.busy=0;}if(t.busy){g("transition active, ignoring new tx request");return;}var w=t.$cont[0],E=z[t.currSlide],C=z[t.nextSlide];if(w.cycleStop!=t.stopCount||w.cycleTimeout===0&&!y){return;}if(!y&&!w.cyclePause&&!t.bounce&&((t.autostop&&(--t.countdown<=0))||(t.nowrap&&!t.random&&t.nextSlide<t.currSlide))){if(t.end){t.end(t);}return;}var A=false;if((y||!w.cyclePause)&&(t.nextSlide!=t.currSlide)){A=true;var x=t.fx;E.cycleH=E.cycleH||c(E).height();E.cycleW=E.cycleW||c(E).width();C.cycleH=C.cycleH||c(C).height();C.cycleW=C.cycleW||c(C).width();if(t.multiFx){if(B&&(t.lastFx==d||++t.lastFx>=t.fxs.length)){t.lastFx=0;}else{if(!B&&(t.lastFx==d||--t.lastFx<0)){t.lastFx=t.fxs.length-1;}}x=t.fxs[t.lastFx];}if(t.oneTimeFx){x=t.oneTimeFx;t.oneTimeFx=null;}c.fn.cycle.resetState(t,x);if(t.before.length){c.each(t.before,function(F,G){if(w.cycleStop!=t.stopCount){return;}G.apply(C,[E,C,t,B]);});}var u=function(){t.busy=0;c.each(t.after,function(F,G){if(w.cycleStop!=t.stopCount){return;}G.apply(C,[E,C,t,B]);});if(!w.cycleStop){D();}};g("tx firing("+x+"); currSlide: "+t.currSlide+"; nextSlide: "+t.nextSlide);t.busy=1;if(t.fxFn){t.fxFn(E,C,t,u,B,y&&t.fastOnEvent);}else{if(c.isFunction(c.fn.cycle[t.fx])){c.fn.cycle[t.fx](E,C,t,u,B,y&&t.fastOnEvent);}else{c.fn.cycle.custom(E,C,t,u,B,y&&t.fastOnEvent);}}}else{D();}if(A||t.nextSlide==t.currSlide){t.lastSlide=t.currSlide;if(t.random){t.currSlide=t.nextSlide;if(++t.randomIndex==z.length){t.randomIndex=0;t.randomMap.sort(function(G,F){return Math.random()-0.5;});}t.nextSlide=t.randomMap[t.randomIndex];if(t.nextSlide==t.currSlide){t.nextSlide=(t.currSlide==t.slideCount-1)?0:t.currSlide+1;}}else{if(t.backwards){var v=(t.nextSlide-1)<0;if(v&&t.bounce){t.backwards=!t.backwards;t.nextSlide=1;t.currSlide=0;}else{t.nextSlide=v?(z.length-1):t.nextSlide-1;t.currSlide=v?0:t.nextSlide+1;}}else{var v=(t.nextSlide+1)==z.length;if(v&&t.bounce){t.backwards=!t.backwards;t.nextSlide=z.length-2;t.currSlide=z.length-1;}else{t.nextSlide=v?0:t.nextSlide+1;t.currSlide=v?z.length-1:t.nextSlide-1;}}}}if(A&&t.pager){t.updateActivePagerLink(t.pager,t.currSlide,t.activePagerClass);}function D(){var F=0,G=t.timeout;if(t.timeout&&!t.continuous){F=m(z[t.currSlide],z[t.nextSlide],t,B);if(t.fx=="shuffle"){F-=t.speedOut;}}else{if(t.continuous&&w.cyclePause){F=10;}}if(F>0){w.cycleTimeout=setTimeout(function(){n(z,t,0,!t.backwards);},F);}}}c.fn.cycle.updateActivePagerLink=function(t,v,u){c(t).each(function(){c(this).children().removeClass(u).eq(v).addClass(u);});};function m(y,w,x,v){if(x.timeoutFn){var u=x.timeoutFn.call(y,y,w,x,v);while(x.fx!="none"&&(u-x.speed)<250){u+=x.speed;}g("calculated timeout: "+u+"; speed: "+x.speed);if(u!==false){return u;}}return x.timeout;}c.fn.cycle.next=function(t){h(t,1);};c.fn.cycle.prev=function(t){h(t,0);};function h(w,v){var z=v?1:-1;var u=w.elements;var y=w.$cont[0],x=y.cycleTimeout;if(x){clearTimeout(x);y.cycleTimeout=0;}if(w.random&&z<0){w.randomIndex--;if(--w.randomIndex==-2){w.randomIndex=u.length-2;}else{if(w.randomIndex==-1){w.randomIndex=u.length-1;}}w.nextSlide=w.randomMap[w.randomIndex];}else{if(w.random){w.nextSlide=w.randomMap[w.randomIndex];}else{w.nextSlide=w.currSlide+z;if(w.nextSlide<0){if(w.nowrap){return false;}w.nextSlide=u.length-1;}else{if(w.nextSlide>=u.length){if(w.nowrap){return false;}w.nextSlide=0;}}}}var t=w.onPrevNextEvent||w.prevNextClick;if(c.isFunction(t)){t(z>0,w.nextSlide,u[w.nextSlide]);}n(u,w,1,v);return false;}function q(u,v){var t=c(v.pager);c.each(u,function(w,x){c.fn.cycle.createPagerAnchor(w,x,t,u,v);});v.updateActivePagerLink(v.pager,v.startingSlide,v.activePagerClass);}c.fn.cycle.createPagerAnchor=function(y,v,A,x,u){var B;if(c.isFunction(u.pagerAnchorBuilder)){B=u.pagerAnchorBuilder(y,v);g("pagerAnchorBuilder("+y+", el) returned: "+B);}else{B='<a href="#">'+(y+1)+"</a>";}if(!B){return;}var w=c(B);if(w.parents("body").length===0){var z=[];if(A.length>1){A.each(function(){var E=w.clone(true);c(this).append(E);z.push(E[0]);});w=c(z);}else{w.appendTo(A);}}u.pagerAnchors=u.pagerAnchors||[];u.pagerAnchors.push(w);var C=function(H){H.preventDefault();u.nextSlide=y;var G=u.$cont[0],F=G.cycleTimeout;if(F){clearTimeout(F);G.cycleTimeout=0;}var E=u.onPagerEvent||u.pagerClick;if(c.isFunction(E)){E(u.nextSlide,x[u.nextSlide]);}n(x,u,1,u.currSlide<y);};if(/mouseenter|mouseover/i.test(u.pagerEvent)){w.hover(C,function(){});}else{w.bind(u.pagerEvent,C);}if(!/^click/.test(u.pagerEvent)&&!u.allowPagerClickBubble){w.bind("click.cycle",function(){return false;});}var D=u.$cont[0];var t=false;if(u.pauseOnPagerHover){w.hover(function(){t=true;D.cyclePause++;k(D,true,true);},function(){t&&D.cyclePause--;k(D,true,true);});}};c.fn.cycle.hopsFromLast=function(w,v){var u,t=w.lastSlide,x=w.currSlide;if(v){u=x>t?x-t:w.slideCount-t;}else{u=x<t?t-x:t+w.slideCount-x;}return u;};function a(v){g("applying clearType background-color hack");function u(w){w=parseInt(w,10).toString(16);return w.length<2?"0"+w:w;}function t(y){for(;y&&y.nodeName.toLowerCase()!="html";y=y.parentNode){var w=c.css(y,"background-color");if(w&&w.indexOf("rgb")>=0){var x=w.match(/\d+/g);return"#"+u(x[0])+u(x[1])+u(x[2]);}if(w&&w!="transparent"){return w;}}return"#ffffff";}v.each(function(){c(this).css("background-color",t(this));});}c.fn.cycle.commonReset=function(z,x,y,u,v,t){c(y.elements).not(z).hide();if(typeof y.cssBefore.opacity=="undefined"){y.cssBefore.opacity=1;}y.cssBefore.display="block";if(y.slideResize&&u!==false&&x.cycleW>0){y.cssBefore.width=x.cycleW;}if(y.slideResize&&v!==false&&x.cycleH>0){y.cssBefore.height=x.cycleH;}y.cssAfter=y.cssAfter||{};y.cssAfter.display="none";c(z).css("zIndex",y.slideCount+(t===true?1:0));c(x).css("zIndex",y.slideCount+(t===true?0:1));};c.fn.cycle.custom=function(F,z,t,w,y,u){var E=c(F),A=c(z);var v=t.speedIn,D=t.speedOut,x=t.easeIn,C=t.easeOut;A.css(t.cssBefore);if(u){if(typeof u=="number"){v=D=u;}else{v=D=1;}x=C=null;}var B=function(){A.animate(t.animIn,v,x,function(){w();});};E.animate(t.animOut,D,C,function(){E.css(t.cssAfter);if(!t.sync){B();}});if(t.sync){B();}};c.fn.cycle.transitions={fade:function(u,v,t){v.not(":eq("+t.currSlide+")").css("opacity",0);t.before.push(function(y,w,x){c.fn.cycle.commonReset(y,w,x);x.cssBefore.opacity=0;});t.animIn={opacity:1};t.animOut={opacity:0};t.cssBefore={top:0,left:0};}};c.fn.cycle.ver=function(){return b;};c.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!c.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:false,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:d,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null,width:null};})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:	 2.73
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function(a){a.fn.cycle.transitions.none=function(c,d,b){b.fxFn=function(g,e,f,h){a(e).show();a(g).hide();h();};};a.fn.cycle.transitions.fadeout=function(c,d,b){d.not(":eq("+b.currSlide+")").css({display:"block",opacity:1});b.before.push(function(k,i,j,f,g,e){a(k).css("zIndex",j.slideCount+(!e===true?1:0));a(i).css("zIndex",j.slideCount+(!e===true?0:1));});b.animIn.opacity=1;b.animOut.opacity=0;b.cssBefore.opacity=1;b.cssBefore.display="block";b.cssAfter.zIndex=0;};a.fn.cycle.transitions.scrollUp=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.height();c.cssBefore.top=b;c.cssBefore.left=0;c.cssFirst.top=0;c.animIn.top=0;c.animOut.top=-b;};a.fn.cycle.transitions.scrollDown=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.height();c.cssFirst.top=0;c.cssBefore.top=-b;c.cssBefore.left=0;c.animIn.top=0;c.animOut.top=b;};a.fn.cycle.transitions.scrollLeft=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.width();c.cssFirst.left=0;c.cssBefore.left=b;c.cssBefore.top=0;c.animIn.left=0;c.animOut.left=0-b;};a.fn.cycle.transitions.scrollRight=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.width();c.cssFirst.left=0;c.cssBefore.left=-b;c.cssBefore.top=0;c.animIn.left=0;c.animOut.left=b;};a.fn.cycle.transitions.scrollHorz=function(c,d,b){c.css("overflow","hidden").width();b.before.push(function(h,f,g,e){if(g.rev){e=!e;}a.fn.cycle.commonReset(h,f,g);g.cssBefore.left=e?(f.cycleW-1):(1-f.cycleW);g.animOut.left=e?-h.cycleW:h.cycleW;});b.cssFirst.left=0;b.cssBefore.top=0;b.animIn.left=0;b.animOut.top=0;};a.fn.cycle.transitions.scrollVert=function(c,d,b){c.css("overflow","hidden");b.before.push(function(h,f,g,e){if(g.rev){e=!e;}a.fn.cycle.commonReset(h,f,g);g.cssBefore.top=e?(1-f.cycleH):(f.cycleH-1);g.animOut.top=e?h.cycleH:-h.cycleH;});b.cssFirst.top=0;b.cssBefore.left=0;b.animIn.top=0;b.animOut.left=0;};a.fn.cycle.transitions.slideX=function(c,d,b){b.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW;});b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.width=0;b.animIn.width="show";b.animOut.width=0;};a.fn.cycle.transitions.slideY=function(c,d,b){b.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH;});b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.height=0;b.animIn.height="show";b.animOut.height=0;};a.fn.cycle.transitions.shuffle=function(e,f,d){var c,b=e.css("overflow","visible").width();f.css({left:0,top:0});d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h,true,true,true);});if(!d.speedAdjusted){d.speed=d.speed/2;d.speedAdjusted=true;}d.random=0;d.shuffle=d.shuffle||{left:-b,top:15};d.els=[];for(c=0;c<f.length;c++){d.els.push(f[c]);}for(c=0;c<d.currSlide;c++){d.els.push(d.els.shift());}d.fxFn=function(m,j,l,g,i){if(l.rev){i=!i;}var h=i?a(m):a(j);a(j).css(l.cssBefore);var k=l.slideCount;h.animate(l.shuffle,l.speedIn,l.easeIn,function(){var o=a.fn.cycle.hopsFromLast(l,i);for(var q=0;q<o;q++){i?l.els.push(l.els.shift()):l.els.unshift(l.els.pop());}if(i){for(var r=0,n=l.els.length;r<n;r++){a(l.els[r]).css("z-index",n-r+k);}}else{var s=a(m).css("z-index");h.css("z-index",parseInt(s,10)+1+k);}h.animate({left:0,top:0},l.speedOut,l.easeOut,function(){a(i?this:m).hide();if(g){g();}});});};a.extend(d.cssBefore,{display:"block",opacity:1,top:0,left:0});};a.fn.cycle.transitions.turnUp=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=e.cycleH;f.animIn.height=e.cycleH;f.animOut.width=e.cycleW;});b.cssFirst.top=0;b.cssBefore.left=0;b.cssBefore.height=0;b.animIn.top=0;b.animOut.height=0;};a.fn.cycle.transitions.turnDown=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH;f.animOut.top=g.cycleH;});b.cssFirst.top=0;b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.height=0;b.animOut.height=0;};a.fn.cycle.transitions.turnLeft=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=e.cycleW;f.animIn.width=e.cycleW;});b.cssBefore.top=0;b.cssBefore.width=0;b.animIn.left=0;b.animOut.width=0;};a.fn.cycle.transitions.turnRight=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW;f.animOut.left=g.cycleW;});a.extend(b.cssBefore,{top:0,left:0,width:0});b.animIn.left=0;b.animOut.width=0;};a.fn.cycle.transitions.zoom=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false,true);f.cssBefore.top=e.cycleH/2;f.cssBefore.left=e.cycleW/2;a.extend(f.animIn,{top:0,left:0,width:e.cycleW,height:e.cycleH});a.extend(f.animOut,{width:0,height:0,top:g.cycleH/2,left:g.cycleW/2});});b.cssFirst.top=0;b.cssFirst.left=0;b.cssBefore.width=0;b.cssBefore.height=0;};a.fn.cycle.transitions.fadeZoom=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false);f.cssBefore.left=e.cycleW/2;f.cssBefore.top=e.cycleH/2;a.extend(f.animIn,{top:0,left:0,width:e.cycleW,height:e.cycleH});});b.cssBefore.width=0;b.cssBefore.height=0;b.animOut.opacity=0;};a.fn.cycle.transitions.blindX=function(d,e,c){var b=d.css("overflow","hidden").width();c.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.width=f.cycleW;g.animOut.left=h.cycleW;});c.cssBefore.left=b;c.cssBefore.top=0;c.animIn.left=0;c.animOut.left=b;};a.fn.cycle.transitions.blindY=function(d,e,c){var b=d.css("overflow","hidden").height();c.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.height=f.cycleH;g.animOut.top=h.cycleH;});c.cssBefore.top=b;c.cssBefore.left=0;c.animIn.top=0;c.animOut.top=b;};a.fn.cycle.transitions.blindZ=function(e,f,d){var c=e.css("overflow","hidden").height();var b=e.width();d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h);h.animIn.height=g.cycleH;h.animOut.top=i.cycleH;});d.cssBefore.top=c;d.cssBefore.left=b;d.animIn.top=0;d.animIn.left=0;d.animOut.top=c;d.animOut.left=b;};a.fn.cycle.transitions.growX=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=this.cycleW/2;f.animIn.left=0;f.animIn.width=this.cycleW;f.animOut.left=0;});b.cssBefore.top=0;b.cssBefore.width=0;};a.fn.cycle.transitions.growY=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=this.cycleH/2;f.animIn.top=0;f.animIn.height=this.cycleH;f.animOut.top=0;});b.cssBefore.height=0;b.cssBefore.left=0;};a.fn.cycle.transitions.curtainX=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true,true);f.cssBefore.left=e.cycleW/2;f.animIn.left=0;f.animIn.width=this.cycleW;f.animOut.left=g.cycleW/2;f.animOut.width=0;});b.cssBefore.top=0;b.cssBefore.width=0;};a.fn.cycle.transitions.curtainY=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false,true);f.cssBefore.top=e.cycleH/2;f.animIn.top=0;f.animIn.height=e.cycleH;f.animOut.top=g.cycleH/2;f.animOut.height=0;});b.cssBefore.height=0;b.cssBefore.left=0;};a.fn.cycle.transitions.cover=function(f,g,e){var i=e.direction||"left";var b=f.css("overflow","hidden").width();var c=f.height();e.before.push(function(j,d,h){a.fn.cycle.commonReset(j,d,h);if(i=="right"){h.cssBefore.left=-b;}else{if(i=="up"){h.cssBefore.top=c;}else{if(i=="down"){h.cssBefore.top=-c;}else{h.cssBefore.left=b;}}}});e.animIn.left=0;e.animIn.top=0;e.cssBefore.top=0;e.cssBefore.left=0;};a.fn.cycle.transitions.uncover=function(f,g,e){var i=e.direction||"left";var b=f.css("overflow","hidden").width();var c=f.height();e.before.push(function(j,d,h){a.fn.cycle.commonReset(j,d,h,true,true,true);if(i=="right"){h.animOut.left=b;}else{if(i=="up"){h.animOut.top=-c;}else{if(i=="down"){h.animOut.top=c;}else{h.animOut.left=-b;}}}});e.animIn.left=0;e.animIn.top=0;e.cssBefore.top=0;e.cssBefore.left=0;};a.fn.cycle.transitions.toss=function(e,f,d){var b=e.css("overflow","visible").width();var c=e.height();d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h,true,true,true);if(!h.animOut.left&&!h.animOut.top){a.extend(h.animOut,{left:b*2,top:-c/2,opacity:0});}else{h.animOut.opacity=0;}});d.cssBefore.left=0;d.cssBefore.top=0;d.animIn.left=0;};a.fn.cycle.transitions.wipe=function(s,m,e){var q=s.css("overflow","hidden").width();var j=s.height();e.cssBefore=e.cssBefore||{};var g;if(e.clip){if(/l2r/.test(e.clip)){g="rect(0px 0px "+j+"px 0px)";}else{if(/r2l/.test(e.clip)){g="rect(0px "+q+"px "+j+"px "+q+"px)";}else{if(/t2b/.test(e.clip)){g="rect(0px "+q+"px 0px 0px)";}else{if(/b2t/.test(e.clip)){g="rect("+j+"px "+q+"px "+j+"px 0px)";}else{if(/zoom/.test(e.clip)){var o=parseInt(j/2,10);var f=parseInt(q/2,10);g="rect("+o+"px "+f+"px "+o+"px "+f+"px)";}}}}}}e.cssBefore.clip=e.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var k=e.cssBefore.clip.match(/(\d+)/g);var u=parseInt(k[0],10),c=parseInt(k[1],10),n=parseInt(k[2],10),i=parseInt(k[3],10);e.before.push(function(w,h,t){if(w==h){return;}var d=a(w),b=a(h);a.fn.cycle.commonReset(w,h,t,true,true,false);t.cssAfter.display="block";var r=1,l=parseInt((t.speedIn/13),10)-1;(function v(){var y=u?u-parseInt(r*(u/l),10):0;var z=i?i-parseInt(r*(i/l),10):0;var A=n<j?n+parseInt(r*((j-n)/l||1),10):j;var x=c<q?c+parseInt(r*((q-c)/l||1),10):q;b.css({clip:"rect("+y+"px "+x+"px "+A+"px "+z+"px)"});(r++<=l)?setTimeout(v,13):d.css("display","none");})();});a.extend(e.cssBefore,{display:"block",opacity:1,top:0,left:0});e.animIn={left:0};e.animOut={left:0};};})(jQuery);;

/**
 *  @file
 *  A simple jQuery Cycle Div Slideshow Rotator.
 */

/**
 * This will set our initial behavior, by starting up each individual slideshow.
 */
(function ($) {
  Drupal.behaviors.viewsSlideshowCycle = {
    attach: function (context) {
      $('.views_slideshow_cycle_main:not(.viewsSlideshowCycle-processed)', context).addClass('viewsSlideshowCycle-processed').each(function() {
        var fullId = '#' + $(this).attr('id');
        var settings = Drupal.settings.viewsSlideshowCycle[fullId];
        settings.targetId = '#' + $(fullId + " :first").attr('id');
        settings.slideshowId = settings.targetId.replace('#views_slideshow_cycle_teaser_section_', '');
        settings.loaded = false;

        settings.opts = {
          speed:settings.speed,
          timeout:settings.timeout,
          delay:settings.delay,
          sync:settings.sync,
          random:settings.random,
          nowrap:settings.nowrap,
          after:function(curr, next, opts) {
            // Need to do some special handling on first load.
            var slideNum = opts.currSlide;
            if (typeof settings.processedAfter == 'undefined' || !settings.processedAfter) {
              settings.processedAfter = 1;
              slideNum = (typeof settings.opts.startingSlide == 'undefined') ? 0 : settings.opts.startingSlide;
            }
            Drupal.viewsSlideshow.action({ "action": 'transitionEnd', "slideshowID": settings.slideshowId, "slideNum": slideNum });
          },
          before:function(curr, next, opts) {
            // Remember last slide.
            if (settings.remember_slide) {
              createCookie(settings.vss_id, opts.currSlide + 1, settings.remember_slide_days);
            }

            // Make variable height.
            if (!settings.fixed_height) {
              //get the height of the current slide
              var $ht = $(this).height();
              //set the container's height to that of the current slide
              $(this).parent().animate({height: $ht});
            }

            // Need to do some special handling on first load.
            var slideNum = opts.nextSlide;
            if (typeof settings.processedBefore == 'undefined' || !settings.processedBefore) {
              settings.processedBefore = 1;
              slideNum = (typeof settings.opts.startingSlide == 'undefined') ? 0 : settings.opts.startingSlide;
            }

            Drupal.viewsSlideshow.action({ "action": 'transitionBegin', "slideshowID": settings.slideshowId, "slideNum": slideNum });
          },
          cleartype:(settings.cleartype)? true : false,
          cleartypeNoBg:(settings.cleartypenobg)? true : false
        }

        // Set the starting slide if we are supposed to remember the slide
        if (settings.remember_slide) {
          var startSlide = readCookie(settings.vss_id);
          if (startSlide == null) {
            startSlide = 0;
          }
          settings.opts.startingSlide =  startSlide;
        }

        if (settings.effect == 'none') {
          settings.opts.speed = 1;
        }
        else {
          settings.opts.fx = settings.effect;
        }

        // Take starting item from fragment.
        var hash = location.hash;
        if (hash) {
          var hash = hash.replace('#', '');
          var aHash = hash.split(';');
          var aHashLen = aHash.length;

          // Loop through all the possible starting points.
          for (var i = 0; i < aHashLen; i++) {
            // Split the hash into two parts. One part is the slideshow id the
            // other is the slide number.
            var initialInfo = aHash[i].split(':');
            // The id in the hash should match our slideshow.
            // The slide number chosen shouldn't be larger than the number of
            // slides we have.
            if (settings.slideshowId == initialInfo[0] && settings.num_divs > initialInfo[1]) {
              settings.opts.startingSlide = parseInt(initialInfo[1]);
            }
          }
        }

        // Pause on hover.
        if (settings.pause) {
          var mouseIn = function() {
            Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId });
          }
          
          var mouseOut = function() {
            Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": settings.slideshowId });
          }
          
          if (jQuery.fn.hoverIntent) {
            $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hoverIntent(mouseIn, mouseOut);
          }
          else {
            $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hover(mouseIn, mouseOut);
          }
        }

        // Pause on clicking of the slide.
        if (settings.pause_on_click) {
          $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).click(function() {
            Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId, "force": true });
          });
        }

        if (typeof JSON != 'undefined') {
          var advancedOptions = JSON.parse(settings.advanced_options);
          for (var option in advancedOptions) {
            switch(option) {

              // Standard Options
              case "activePagerClass":
              case "allowPagerClickBubble":
              case "autostop":
              case "autostopCount":
              case "backwards":
              case "bounce":
              case "cleartype":
              case "cleartypeNoBg":
              case "containerResize":
              case "continuous":
              case "delay":
              case "easeIn":
              case "easeOut":
              case "easing":
              case "fastOnEvent":
              case "fit":
              case "fx":
              case "height":
              case "manualTrump":
              case "metaAttr":
              case "next":
              case "nowrap":
              case "pager":
              case "pagerEvent":
              case "pause":
              case "pauseOnPagerHover":
              case "prev":
              case "prevNextEvent":
              case "random":
              case "randomizeEffects":
              case "requeueOnImageNotLoaded":
              case "requeueTimeout":
              case "rev":
              case "slideExpr":
              case "slideResize":
              case "speed":
              case "speedIn":
              case "speedOut":
              case "startingSlide":
              case "sync":
              case "timeout":
              case "width":
                var optionValue = advancedOptions[option];
                optionValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(optionValue);
                settings.opts[option] = optionValue;
                break;
  
              // These process options that look like {top:50, bottom:20}
              case "animIn":
              case "animOut":
              case "cssBefore":
              case "cssAfter":
              case "shuffle":
                var cssValue = advancedOptions[option];
                cssValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(cssValue);
                settings.opts[option] = eval('(' + cssValue + ')');
                break;
  
              // These options have their own functions.
              case "after":
                var afterValue = advancedOptions[option];
                afterValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(afterValue);
                // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
                settings.opts[option] = function(currSlideElement, nextSlideElement, options, forwardFlag) {
                  eval(afterValue);
                }
                break;
  
              case "before":
                var beforeValue = advancedOptions[option];
                beforeValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(beforeValue);
                // transition callback (scope set to element to be shown):     function(currSlideElement, nextSlideElement, options, forwardFlag)
                settings.opts[option] = function(currSlideElement, nextSlideElement, options, forwardFlag) {
                  eval(beforeValue);
                }
                break;
  
              case "end":
                var endValue = advancedOptions[option];
                endValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(endValue);
                // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
                settings.opts[option] = function(options) {
                  eval(endValue);
                }
                break;
  
              case "fxFn":
                var fxFnValue = advancedOptions[option];
                fxFnValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(fxFnValue);
                // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
                settings.opts[option] = function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) {
                  eval(fxFnValue);
                }
                break;
  
              case "onPagerEvent":
                var onPagerEventValue = advancedOptions[option];
                onPagerEventValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(onPagerEventValue);
                settings.opts[option] = function(zeroBasedSlideIndex, slideElement) {
                  eval(onPagerEventValue);
                }
                break;
  
              case "onPrevNextEvent":
                var onPrevNextEventValue = advancedOptions[option];
                onPrevNextEventValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(onPrevNextEventValue);
                settings.opts[option] = function(isNext, zeroBasedSlideIndex, slideElement) {
                  eval(onPrevNextEventValue);
                }
                break;
  
              case "pagerAnchorBuilder":
                var pagerAnchorBuilderValue = advancedOptions[option];
                pagerAnchorBuilderValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(pagerAnchorBuilderValue);
                // callback fn for building anchor links:  function(index, DOMelement)
                settings.opts[option] = function(index, DOMelement) {
                  var returnVal = '';
                  eval(pagerAnchorBuilderValue);
                  return returnVal;
                }
                break;
  
              case "pagerClick":
                var pagerClickValue = advancedOptions[option];
                pagerClickValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(pagerClickValue);
                // callback fn for pager clicks:    function(zeroBasedSlideIndex, slideElement)
                settings.opts[option] = function(zeroBasedSlideIndex, slideElement) {
                  eval(pagerClickValue);
                }
                break;

              case "paused":
                var pausedValue = advancedOptions[option];
                pausedValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(pausedValue);
                // undocumented callback when slideshow is paused:    function(cont, opts, byHover)
                settings.opts[option] = function(cont, opts, byHover) {
                  eval(pausedValue);
                }
                break;
              
              case "resumed":
                var resumedValue = advancedOptions[option];
                resumedValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(resumedValue);
                // undocumented callback when slideshow is resumed:    function(cont, opts, byHover)
                settings.opts[option] = function(cont, opts, byHover) {
                  eval(resumedValue);
                }
                break;
  
              case "timeoutFn":
                var timeoutFnValue = advancedOptions[option];
                timeoutFnValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(timeoutFnValue);
                settings.opts[option] = function(currSlideElement, nextSlideElement, options, forwardFlag) {
                  eval(timeoutFnValue);
                }
                break;
  
              case "updateActivePagerLink":
                var updateActivePagerLinkValue = advancedOptions[option];
                updateActivePagerLinkValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(updateActivePagerLinkValue);
                // callback fn invoked to update the active pager link (adds/removes activePagerClass style)
                settings.opts[option] = function(pager, currSlideIndex) {
                  eval(updateActivePagerLinkValue);
                }
                break;
            }
          }
        }

        // If selected wait for the images to be loaded.
        // otherwise just load the slideshow.
        if (settings.wait_for_image_load) {
          // For IE/Chrome/Opera we if there are images then we need to make
          // sure the images are loaded before starting the slideshow.
          settings.totalImages = $(settings.targetId + ' img').length;
          if (settings.totalImages) {
            settings.loadedImages = 0;

            // Add a load event for each image.
            $(settings.targetId + ' img').each(function() {
              var $imageElement = $(this);
              $imageElement.bind('load', function () {
                Drupal.viewsSlideshowCycle.imageWait(fullId);
              });

              // Removing the source and adding it again will fire the load event.
              var imgSrc = $imageElement.attr('src');
              $imageElement.attr('src', '');
              $imageElement.attr('src', imgSrc);
            });

            // We need to set a timeout so that the slideshow doesn't wait
            // indefinitely for all images to load.
            setTimeout("Drupal.viewsSlideshowCycle.load('" + fullId + "')", settings.wait_for_image_load_timeout);
          }
          else {
            Drupal.viewsSlideshowCycle.load(fullId);
          }
        }
        else {
          Drupal.viewsSlideshowCycle.load(fullId);
        }
      });
    }
  };

  Drupal.viewsSlideshowCycle = Drupal.viewsSlideshowCycle || {};

  // Cleanup the values of advanced options.
  Drupal.viewsSlideshowCycle.advancedOptionCleanup = function(value) {
    value = $.trim(value);
    value = value.replace(/\n/g, '');
    if (!isNaN(parseInt(value))) {
      value = parseInt(value);
    }
    else if (value.toLowerCase() == 'true') {
      value = true;
    }
    else if (value.toLowerCase() == 'false') {
      value = false;
    }
    
    return value;
  }

  // This checks to see if all the images have been loaded.
  // If they have then it starts the slideshow.
  Drupal.viewsSlideshowCycle.imageWait = function(fullId) {
    if (++Drupal.settings.viewsSlideshowCycle[fullId].loadedImages == Drupal.settings.viewsSlideshowCycle[fullId].totalImages) {
      Drupal.viewsSlideshowCycle.load(fullId);
    }
  };

  // Start the slideshow.
  Drupal.viewsSlideshowCycle.load = function (fullId) {
    var settings = Drupal.settings.viewsSlideshowCycle[fullId];
    
    // Make sure the slideshow isn't already loaded.
    if (!settings.loaded) {
      $(settings.targetId).cycle(settings.opts);
      settings.loaded = true;
  
      // Start Paused
      if (settings.start_paused) {
        Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId, "force": true });
      }
  
      // Pause if hidden.
      if (settings.pause_when_hidden) {
        var checkPause = function(settings) {
          // If the slideshow is visible and it is paused then resume.
          // otherwise if the slideshow is not visible and it is not paused then
          // pause it.
          var visible = viewsSlideshowCycleIsVisible(settings.targetId, settings.pause_when_hidden_type, settings.amount_allowed_visible);
          if (visible) {
            Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": settings.slideshowId });
          }
          else {
            Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId });
          }
        }
  
        // Check when scrolled.
        $(window).scroll(function() {
         checkPause(settings);
        });
  
        // Check when the window is resized.
        $(window).resize(function() {
          checkPause(settings);
        });
      }
    }
  };

  Drupal.viewsSlideshowCycle.pause = function (options) {
    $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('pause');
  };

  Drupal.viewsSlideshowCycle.play = function (options) {
    Drupal.settings.viewsSlideshowCycle['#views_slideshow_cycle_main_' + options.slideshowID].paused = false;
    $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('resume');
  };

  Drupal.viewsSlideshowCycle.previousSlide = function (options) {
    $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('prev');
  };

  Drupal.viewsSlideshowCycle.nextSlide = function (options) {
    $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('next');
  };

  Drupal.viewsSlideshowCycle.goToSlide = function (options) {
    $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle(options.slideNum);
  };

  // Verify that the value is a number.
  function IsNumeric(sText) {
    var ValidChars = "0123456789";
    var IsNumber=true;
    var Char;

    for (var i=0; i < sText.length && IsNumber == true; i++) {
      Char = sText.charAt(i);
      if (ValidChars.indexOf(Char) == -1) {
        IsNumber = false;
      }
    }
    return IsNumber;
  }

  /**
   * Cookie Handling Functions
   */
  function createCookie(name,value,days) {
    if (days) {
      var date = new Date();
      date.setTime(date.getTime()+(days*24*60*60*1000));
      var expires = "; expires="+date.toGMTString();
    }
    else {
      var expires = "";
    }
    document.cookie = name+"="+value+expires+"; path=/";
  }

  function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
      var c = ca[i];
      while (c.charAt(0)==' ') c = c.substring(1,c.length);
      if (c.indexOf(nameEQ) == 0) {
        return c.substring(nameEQ.length,c.length);
      }
    }
    return null;
  }

  function eraseCookie(name) {
    createCookie(name,"",-1);
  }

  /**
   * Checks to see if the slide is visible enough.
   * elem = element to check.
   * type = The way to calculate how much is visible.
   * amountVisible = amount that should be visible. Either in percent or px. If
   *                it's not defined then all of the slide must be visible.
   *
   * Returns true or false
   */
  function viewsSlideshowCycleIsVisible(elem, type, amountVisible) {
    // Get the top and bottom of the window;
    var docViewTop = $(window).scrollTop();
    var docViewBottom = docViewTop + $(window).height();
    var docViewLeft = $(window).scrollLeft();
    var docViewRight = docViewLeft + $(window).width();

    // Get the top, bottom, and height of the slide;
    var elemTop = $(elem).offset().top;
    var elemHeight = $(elem).height();
    var elemBottom = elemTop + elemHeight;
    var elemLeft = $(elem).offset().left;
    var elemWidth = $(elem).width();
    var elemRight = elemLeft + elemWidth;
    var elemArea = elemHeight * elemWidth;

    // Calculate what's hiding in the slide.
    var missingLeft = 0;
    var missingRight = 0;
    var missingTop = 0;
    var missingBottom = 0;

    // Find out how much of the slide is missing from the left.
    if (elemLeft < docViewLeft) {
      missingLeft = docViewLeft - elemLeft;
    }

    // Find out how much of the slide is missing from the right.
    if (elemRight > docViewRight) {
      missingRight = elemRight - docViewRight;
    }

    // Find out how much of the slide is missing from the top.
    if (elemTop < docViewTop) {
      missingTop = docViewTop - elemTop;
    }

    // Find out how much of the slide is missing from the bottom.
    if (elemBottom > docViewBottom) {
      missingBottom = elemBottom - docViewBottom;
    }

    // If there is no amountVisible defined then check to see if the whole slide
    // is visible.
    if (type == 'full') {
      return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom)
      && (elemBottom <= docViewBottom) &&  (elemTop >= docViewTop)
      && (elemLeft >= docViewLeft) && (elemRight <= docViewRight)
      && (elemLeft <= docViewRight) && (elemRight >= docViewLeft));
    }
    else if(type == 'vertical') {
      var verticalShowing = elemHeight - missingTop - missingBottom;

      // If user specified a percentage then find out if the current shown percent
      // is larger than the allowed percent.
      // Otherwise check to see if the amount of px shown is larger than the
      // allotted amount.
      if (amountVisible.indexOf('%')) {
        return (((verticalShowing/elemHeight)*100) >= parseInt(amountVisible));
      }
      else {
        return (verticalShowing >= parseInt(amountVisible));
      }
    }
    else if(type == 'horizontal') {
      var horizontalShowing = elemWidth - missingLeft - missingRight;

      // If user specified a percentage then find out if the current shown percent
      // is larger than the allowed percent.
      // Otherwise check to see if the amount of px shown is larger than the
      // allotted amount.
      if (amountVisible.indexOf('%')) {
        return (((horizontalShowing/elemWidth)*100) >= parseInt(amountVisible));
      }
      else {
        return (horizontalShowing >= parseInt(amountVisible));
      }
    }
    else if(type == 'area') {
      var areaShowing = (elemWidth - missingLeft - missingRight) * (elemHeight - missingTop - missingBottom);

      // If user specified a percentage then find out if the current shown percent
      // is larger than the allowed percent.
      // Otherwise check to see if the amount of px shown is larger than the
      // allotted amount.
      if (amountVisible.indexOf('%')) {
        return (((areaShowing/elemArea)*100) >= parseInt(amountVisible));
      }
      else {
        return (areaShowing >= parseInt(amountVisible));
      }
    }
  }
})(jQuery);
;
(function ($) {

$(document).ready(function() {

  // Accepts a string; returns the string with regex metacharacters escaped. The returned string
  // can safely be used at any point within a regex to match the provided literal string. Escaped
  // characters are [ ] { } ( ) * + ? - . , \ ^ $ # and whitespace. The character | is excluded
  // in this function as it's used to separate the domains names.
  RegExp.escapeDomains = function(text) {
    return (text) ? text.replace(/[-[\]{}()*+?.,\\^$#\s]/g, "\\$&") : '';
  }

  // Attach onclick event to document only and catch clicks on all elements.
  $(document.body).click(function(event) {
    // Catch the closest surrounding link of a clicked element.
    $(event.target).closest("a,area").each(function() {

      var ga = Drupal.settings.googleanalytics;
      // Expression to check for absolute internal links.
      var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i");
      // Expression to check for special links like gotwo.module /go/* links.
      var isInternalSpecial = new RegExp("(\/go\/.*)$", "i");
      // Expression to check for download links.
      var isDownload = new RegExp("\\.(" + ga.trackDownloadExtensions + ")$", "i");
      // Expression to check for the sites cross domains.
      var isCrossDomain = new RegExp("^(https?|ftp|news|nntp|telnet|irc|ssh|sftp|webcal):\/\/.*(" + RegExp.escapeDomains(ga.trackCrossDomains) + ")", "i");

      // Is the clicked URL internal?
      if (isInternal.test(this.href)) {
        // Is download tracking activated and the file extension configured for download tracking?
        if (ga.trackDownload && isDownload.test(this.href)) {
          // Download link clicked.
          var extension = isDownload.exec(this.href);
          _gaq.push(["_trackEvent", "Downloads", extension[1].toUpperCase(), this.href.replace(isInternal, '')]);
        }
        else if (isInternalSpecial.test(this.href)) {
          // Keep the internal URL for Google Analytics website overlay intact.
          _gaq.push(["_trackPageview", this.href.replace(isInternal, '')]);
        }
      }
      else {
        if (ga.trackMailto && $(this).is("a[href^=mailto:],area[href^=mailto:]")) {
          // Mailto link clicked.
          _gaq.push(["_trackEvent", "Mails", "Click", this.href.substring(7)]);
        }
        else if (ga.trackOutbound && this.href) {
          if (ga.trackDomainMode == 2 && isCrossDomain.test(this.href)) {
            // Top-level cross domain clicked. document.location is handled by _link internally.
            _gaq.push(["_link", this.href]);
          }
          else {
            // External link clicked.
            _gaq.push(["_trackEvent", "Outbound links", "Click", this.href]);
          }
        }
      }
    });
  });
});

})(jQuery);
;

