https://www.artfestival.com/sites/default/files/js/js_OR4TtVOSwa5rtdygzmsXViXUPB6rozMgpoGVvfoYmaQ.js
vendor: 11,373 bytes, lines 1-47
1 2/** 3 * @file 4 * Attaches the behaviors for the Nivo Slider module. 5 */ 6 7(function ($) { 8 Drupal.behaviors.nivoSlider = { 9 attach: function (context, settings) { 10 // Initialize the slider 11 $('#slider').nivoSlider({ 12 'effect': Drupal.settings.nivo_slider.effect, // Specify sets like: 'fold,fade,sliceDown' 13 'slices': Drupal.settings.nivo_slider.slices, // For slice animations 14 'boxCols': Drupal.settings.nivo_slider.boxCols, // For box animations 15 'boxRows': Drupal.settings.nivo_slider.boxRows, // For box animations 16 'animSpeed': Drupal.settings.nivo_slider.animSpeed, // Slide transition speed 17 'pauseTime': Drupal.settings.nivo_slider.pauseTime, // How long each slide will show 18 'startSlide': Drupal.settings.nivo_slider.startSlide, // Set starting Slide (0 index) 19 'directionNav': Drupal.settings.nivo_slider.directionNav, // Next & Prev navigation 20 'directionNavHide': Drupal.settings.nivo_slider.directionNavHide, // Only show on hover 21 'controlNav': Drupal.settings.nivo_slider.controlNav, // 1,2,3... navigation 22 'controlNavThumbs': Drupal.settings.nivo_slider.controlNavThumbs, // Use thumbnails for Control Nav 23 'pauseOnHover': Drupal.settings.nivo_slider.pauseOnHover, // Stop animation while hovering 24 'manualAdvance': Drupal.settings.nivo_slider.manualAdvance, // Force manual transitions 25 'prevText': Drupal.settings.nivo_slider.prevText, // Prev directionNav text 26 'nextText': Drupal.settings.nivo_slider.nextText, // Next directionNav text 27 'randomStart': Drupal.settings.nivo_slider.randomStart, // Start on a random slide 28 'beforeChange': Drupal.settings.nivo_slider.beforeChange, // Triggers before a slide transition 29 'afterChange': Drupal.settings.nivo_slider.afterChange, // Triggers after a slide transition 30 'slideshowEnd': Drupal.settings.nivo_slider.slideshowEnd, // Triggers after all slides have been shown 31 'lastSlide': Drupal.settings.nivo_slider.lastSlide, // Triggers when last slide is shown 32 'afterLoad': Drupal.settings.nivo_slider.afterLoad // Triggers when slider has loaded 33 }); 34 } 35 }; 36}(jQuery)); 37; 38/* 39 * jQuery Nivo Slider v3.2 40 * http://nivo.dev7studios.com 41 * 42 * Copyright 2012, Dev7studios 43 * Free to use and abuse under the MIT license. 44 * http://www.opensource.org/licenses/mit-license.php 45 */ 46 47(function(e){var t=function(t,n){var r=e.extend({},e.fn.nivoSlider.defaults,n);var i={currentSlide:0,currentImage:"",totalSlides:0,running:false,paused:false,stop:false,controlNavEl:false};var s=e(t);s.data("nivo:vars",i).addClass("nivoSlider");var o=s.children();o.each(function(){var t=e(this);var n="";if(!t.is("img")){if(t.is("a")){t.addClass("nivo-imageLink");n=t}t=t.find("img:first")}var r=r===0?t.attr("width"):t.width(),s=s===0?t.attr("height"):t.height();if(n!==""){n.css("display","none")}t.css("display","none");i.totalSlides++});if(r.randomStart){r.startSlide=Math.floor(Math.random()*i.totalSlides)}if(r.startSlide>0){if(r.startSlide>=i.totalSlides){r.startSlide=i.totalSlides-1}i.currentSlide=r.startSlide}if(e(o[i.currentSlide]).is("img")){i.currentImage=e(o[i.currentSlide])}else{i.currentImage=e(o[i.currentSlide]).find("img:first")}if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}var u=e("<img/>").addClass("nivo-main-image");u.attr("src",i.currentImage.attr("src")).show();s.append(u);e(window).resize(function(){s.children("img").width(s.width());u.attr("src",i.currentImage.attr("src"));u.stop().height("auto");e(".nivo-slice").remove();e(".nivo-box").remove()});s.append(e('<div class="nivo-caption"></div>'));var a=function(t){var n=e(".nivo-caption",s);if(i.currentImage.attr("title")!=""&&i.currentImage.attr("title")!=undefined){var r=i.currentImage.attr("title");if(r.substr(0,1)=="#")r=e(r).html();if(n.css("display")=="block"){setTimeout(function(){n.html(r)},t.animSpeed)}else{n.html(r);n.stop().fadeIn(t.animSpeed)}}else{n.stop().fadeOut(t.animSpeed)}};a(r);var f=0;if(!r.manualAdvance&&o.length>1){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}if(r.directionNav){s.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+r.prevText+'</a><a class="nivo-nextNav">'+r.nextText+"</a></div>");e(s).on("click","a.nivo-prevNav",function(){if(i.running){return false}clearInterval(f);f="";i.currentSlide-=2;d(s,o,r,"prev")});e(s).on("click","a.nivo-nextNav",function(){if(i.running){return false}clearInterval(f);f="";d(s,o,r,"next")})}if(r.controlNav){i.controlNavEl=e('<div class="nivo-controlNav"></div>');s.after(i.controlNavEl);for(var l=0;l<o.length;l++){if(r.controlNavThumbs){i.controlNavEl.addClass("nivo-thumbs-enabled");var c=o.eq(l);if(!c.is("img")){c=c.find("img:first")}if(c.attr("data-thumb"))i.controlNavEl.append('<a class="nivo-control" rel="'+l+'"><img src="'+c.attr("data-thumb")+'" alt="" /></a>')}else{i.controlNavEl.append('<a class="nivo-control" rel="'+l+'">'+(l+1)+"</a>")}}e("a:eq("+i.currentSlide+")",i.controlNavEl).addClass("active");e("a",i.controlNavEl).bind("click",function(){if(i.running)return false;if(e(this).hasClass("active"))return false;clearInterval(f);f="";u.attr("src",i.currentImage.attr("src"));i.currentSlide=e(this).attr("rel")-1;d(s,o,r,"control")})}if(r.pauseOnHover){s.hover(function(){i.paused=true;clearInterval(f);f=""},function(){i.paused=false;if(f===""&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}})}s.bind("nivo:animFinished",function(){u.attr("src",i.currentImage.attr("src"));i.running=false;e(o).each(function(){if(e(this).is("a")){e(this).css("display","none")}});if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}if(f===""&&!i.paused&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}r.afterChange.call(this)});var h=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().is("a")?e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().height():e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height();for(var s=0;s<n.slices;s++){var o=Math.round(t.width()/n.slices);if(s===n.slices-1){t.append(e('<div class="nivo-slice" name="'+s+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block !important; top:0; left:-"+(o+s*o-o)+'px;" /></div>').css({left:o*s+"px",width:t.width()-o*s+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}else{t.append(e('<div class="nivo-slice" name="'+s+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block !important; top:0; left:-"+(o+s*o-o)+'px;" /></div>').css({left:o*s+"px",width:o+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}}e(".nivo-slice",t).height(i);u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var p=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=Math.round(t.width()/n.boxCols),s=Math.round(e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height()/n.boxRows);for(var o=0;o<n.boxRows;o++){for(var a=0;a<n.boxCols;a++){if(a===n.boxCols-1){t.append(e('<div class="nivo-box" name="'+a+'" rel="'+o+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block; top:-"+s*o+"px; left:-"+i*a+'px;" /></div>').css({opacity:0,left:i*a+"px",top:s*o+"px",width:t.width()-i*a+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}else{t.append(e('<div class="nivo-box" name="'+a+'" rel="'+o+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block; top:-"+s*o+"px; left:-"+i*a+'px;" /></div>').css({opacity:0,left:i*a+"px",top:s*o+"px",width:i+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}}}u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var d=function(t,n,r,i){var s=t.data("nivo:vars");if(s&&s.currentSlide===s.totalSlides-1){r.lastSlide.call(this)}if((!s||s.stop)&&!i){return false}r.beforeChange.call(this);if(!i){u.attr("src",s.currentImage.attr("src"))}else{if(i==="prev"){u.attr("src",s.currentImage.attr("src"))}if(i==="next"){u.attr("src",s.currentImage.attr("src"))}}s.currentSlide++;if(s.currentSlide===s.totalSlides){s.currentSlide=0;r.slideshowEnd.call(this)}if(s.currentSlide<0){s.currentSlide=s.totalSlides-1}if(e(n[s.currentSlide]).is("img")){s.currentImage=e(n[s.currentSlide])}else{s.currentImage=e(n[s.currentSlide]).find("img:first")}if(r.controlNav){e("a",s.controlNavEl).removeClass("active");e("a:eq("+s.currentSlide+")",s.controlNavEl).addClass("active")}a(r);e(".nivo-slice",t).remove();e(".nivo-box",t).remove();var o=r.effect,f="";if(r.effect==="random"){f=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");o=f[Math.floor(Math.random()*(f.length+1))];if(o===undefined){o="fade"}}if(r.effect.indexOf(",")!==-1){f=r.effect.split(",");o=f[Math.floor(Math.random()*f.length)];if(o===undefined){o="fade"}}if(s.currentImage.attr("data-transition")){o=s.currentImage.attr("data-transition")}s.running=true;var l=0,c=0,d="",m="",g="",y="";if(o==="sliceDown"||o==="sliceDownRight"||o==="sliceDownLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({top:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUp"||o==="sliceUpRight"||o==="sliceUpLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceUpLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({bottom:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUpDown"||o==="sliceUpDownRight"||o==="sliceUpDownLeft"){h(t,r,s);l=0;c=0;var b=0;d=e(".nivo-slice",t);if(o==="sliceUpDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);if(c===0){n.css("top","0px");c++}else{n.css("bottom","0px");c=0}if(b===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;b++})}else if(o==="fold"){h(t,r,s);l=0;c=0;e(".nivo-slice",t).each(function(){var n=e(this);var i=n.width();n.css({top:"0px",width:"0px"});
47if(c===r.slices-1){setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="fade"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:t.width()+"px"});m.animate({opacity:"1.0"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInRight"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInLeft"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1",left:"",right:"0px"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){m.css({left:"0px",right:""});t.trigger("nivo:animFinished")})}else if(o==="boxRandom"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;y=v(e(".nivo-box",t));y.each(function(){var n=e(this);if(c===g-1){setTimeout(function(){n.animate({opacity:"1"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1"},r.animSpeed)},100+l)}l+=20;c++})}else if(o==="boxRain"||o==="boxRainReverse"||o==="boxRainGrow"||o==="boxRainGrowReverse"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;var w=0;var E=0;var S=[];S[w]=[];y=e(".nivo-box",t);if(o==="boxRainReverse"||o==="boxRainGrowReverse"){y=e(".nivo-box",t)._reverse()}y.each(function(){S[w][E]=e(this);E++;if(E===r.boxCols){w++;E=0;S[w]=[]}});for(var x=0;x<r.boxCols*2;x++){var T=x;for(var N=0;N<r.boxRows;N++){if(T>=0&&T<r.boxCols){(function(n,i,s,u,a){var f=e(S[n][i]);var l=f.width();var c=f.height();if(o==="boxRainGrow"||o==="boxRainGrowReverse"){f.width(0).height(0)}if(u===a-1){setTimeout(function(){f.animate({opacity:"1",width:l,height:c},r.animSpeed/1.3,"",function(){t.trigger("nivo:animFinished")})},100+s)}else{setTimeout(function(){f.animate({opacity:"1",width:l,height:c},r.animSpeed/1.3)},100+s)}})(N,T,l,c,g);c++}T--}l+=100}}};var v=function(e){for(var t,n,r=e.length;r;t=parseInt(Math.random()*r,10),n=e[--r],e[r]=e[t],e[t]=n);return e};var m=function(e){if(this.console&&typeof console.log!=="undefined"){console.log(e)}};this.stop=function(){if(!e(t).data("nivo:vars").stop){e(t).data("nivo:vars").stop=true;m("Stop Slider")}};this.start=function(){if(e(t).data("nivo:vars").stop){e(t).data("nivo:vars").stop=false;m("Start Slider")}};r.afterLoad.call(this);return this};e.fn.nivoSlider=function(n){return this.each(function(r,i){var s=e(this);if(s.data("nivoslider")){return s.data("nivoslider")}var o=new t(this,n);s.data("nivoslider",o)})};e.fn.nivoSlider.defaults={effect:"random",slices:15,boxCols:8,boxRows:4,animSpeed:500,pauseTime:3e3,startSlide:0,directionNav:true,controlNav:true,controlNavThumbs:false,pauseOnHover:true,manualAdvance:false,prevText:"Prev",nextText:"Next",randomStart:false,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};e.fn._reverse=[].reverse})(jQuery); 48/** 49* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+ 50* <http://cherne.net/brian/resources/jquery.hoverIntent.html> 51* 52* @param f onMouseOver function || An object with configuration options 53* @param g onMouseOut function || Nothing (use configuration options object) 54* @author Brian Cherne brian(at)cherne(dot)net 55*/ 56(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);; 57/* 58 * Supposition v0.2 - an optional enhancer for Superfish jQuery menu widget. 59 * 60 * Copyright (c) 2008 Joel Birch - based mostly on work by Jesse Klaasse and credit goes largely to him. 61 * Special thanks to Karl Swedberg for valuable input. 62 * 63 * Dual licensed under the MIT and GPL licenses: 64 * http://www.opensource.org/licenses/mit-license.php 65 * http://www.gnu.org/licenses/gpl.html 66 */ 67/* 68 * This is not the original jQuery Supersubs plugin. 69 * Please refer to the README for more information. 70 */ 71 72(function($){ 73 $.fn.supposition = function(){ 74 var $w = $(window), /*do this once instead of every onBeforeShow call*/ 75 _offset = function(dir) { 76 return window[dir == 'y' ? 'pageYOffset' : 'pageXOffset'] 77 || document.documentElement && document.documentElement[dir=='y' ? 'scrollTop' : 'scrollLeft'] 78 || document.body[dir=='y' ? 'scrollTop' : 'scrollLeft']; 79 }, 80 onHide = function(){ 81 this.css({bottom:''}); 82 }, 83 onBeforeShow = function(){ 84 this.each(function(){ 85 var $u = $(this); 86 $u.css('display','block'); 87 var menuWidth = $u.width(), 88 menuParentWidth = $u.closest('li').outerWidth(true), 89 menuParentLeft = $u.closest('li').offset().left, 90 totalRight = $w.width() + _offset('x'), 91 menuRight = $u.offset().left + menuWidth, 92 exactMenuWidth = (menuRight > (menuParentWidth + menuParentLeft)) ? menuWidth - (menuRight - (menuParentWidth + menuParentLeft)) : menuWidth; 93 if ($u.parents('.sf-js-enabled').hasClass('rtl')) { 94 if (menuParentLeft < exactMenuWidth) { 95 $u.css('left', menuParentWidth + 'px'); 96 $u.css('right', 'auto'); 97 } 98 } 99 else { 100 if (menuRight > totalRight && menuParentLeft > menuWidth) { 101 $u.css('right', menuParentWidth + 'px'); 102 $u.css('left', 'auto'); 103 } 104 } 105 var windowHeight = $w.height(), 106 offsetTop = $u.offset().top, 107 menuParentShadow = ($u.closest('.sf-menu').hasClass('sf-shadow') && $u.css('padding-bottom').length > 0) ? parseInt($u.css('padding-bottom').slice(0,-2)) : 0, 108 menuParentHeight = ($u.closest('.sf-menu').hasClass('sf-vertical')) ? '-' + menuParentShadow : $u.parent().outerHeight(true) - menuParentShadow, 109 menuHeight = $u.height(), 110 baseline = windowHeight + _offset('y'); 111 var expandUp = ((offsetTop + menuHeight > baseline) && (offsetTop > menuHeight)); 112 if (expandUp) { 113 $u.css('bottom', menuParentHeight + 'px'); 114 $u.css('top', 'auto'); 115 } 116 $u.css('display','none'); 117 }); 118 }; 119 120 return this.each(function() { 121 var o = $.fn.superfish.o[this.serial]; /* get this menu's options */ 122 123 /* if callbacks already set, store them */ 124 var _onBeforeShow = o.onBeforeShow, 125 _onHide = o.onHide; 126 127 $.extend($.fn.superfish.o[this.serial],{ 128 onBeforeShow: function() { 129 onBeforeShow.call(this); /* fire our Supposition callback */ 130 _onBeforeShow.call(this); /* fire stored callbacks */ 131 }, 132 onHide: function() { 133 onHide.call(this); /* fire our Supposition callback */ 134 _onHide.call(this); /* fire stored callbacks */ 135 } 136 }); 137 }); 138 }; 139})(jQuery);; 140/* 141 * Superfish v1.4.8 - jQuery menu widget 142 * Copyright (c) 2008 Joel Birch 143 * 144 * Dual licensed under the MIT and GPL licenses: 145 * http://www.opensource.org/licenses/mit-license.php 146 * http://www.gnu.org/licenses/gpl.html 147 * 148 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt 149 */ 150/* 151 * This is not the original jQuery Supersubs plugin. 152 * Please refer to the README for more information. 153 */ 154 155(function($){ 156 $.fn.superfish = function(op){ 157 var sf = $.fn.superfish, 158 c = sf.c, 159 $arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')), 160 over = function(){ 161 var $$ = $(this), menu = getMenu($$); 162 clearTimeout(menu.sfTimer); 163 $$.showSuperfishUl().siblings().hideSuperfishUl(); 164 }, 165 out = function(){ 166 var $$ = $(this), menu = getMenu($$), o = sf.op; 167 clearTimeout(menu.sfTimer); 168 menu.sfTimer=setTimeout(function(){ 169 o.retainPath=($.inArray($$[0],o.$path)>-1);
170 $$.hideSuperfishUl(); 171 if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} 172 },o.delay); 173 }, 174 getMenu = function($menu){ 175 var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; 176 sf.op = sf.o[menu.serial]; 177 return menu; 178 }, 179 addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; 180 181 return this.each(function() { 182 var s = this.serial = sf.o.length; 183 var o = $.extend({},sf.defaults,op); 184 o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ 185 $(this).addClass([o.hoverClass,c.bcClass].join(' ')) 186 .filter('li:has(ul)').removeClass(o.pathClass); 187 }); 188 sf.o[s] = sf.op = o; 189 190 $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { 191 if (o.autoArrows) addArrow( $('>a:first-child',this) ); 192 }) 193 .not('.'+c.bcClass) 194 .hideSuperfishUl(); 195 196 var $a = $('a',this); 197 $a.each(function(i){ 198 var $li = $a.eq(i).parents('li'); 199 $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); 200 }); 201 o.onInit.call(this); 202 203 }).each(function() { 204 var menuClasses = [c.menuClass]; 205 if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); 206 $(this).addClass(menuClasses.join(' ')); 207 }); 208 }; 209 210 var sf = $.fn.superfish; 211 sf.o = []; 212 sf.op = {}; 213 sf.IE7fix = function(){ 214 var o = sf.op; 215 if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined) 216 this.toggleClass(sf.c.shadowClass+'-off'); 217 }; 218 sf.c = { 219 bcClass: 'sf-breadcrumb', 220 menuClass: 'sf-js-enabled', 221 anchorClass: 'sf-with-ul', 222 arrowClass: 'sf-sub-indicator', 223 shadowClass: 'sf-shadow' 224 }; 225 sf.defaults = { 226 hoverClass: 'sfHover', 227 pathClass: 'overideThisToUse', 228 pathLevels: 1, 229 delay: 800, 230 animation: {opacity:'show'}, 231 speed: 'normal', 232 autoArrows: true, 233 dropShadows: true, 234 disableHI: false, // true disables hoverIntent detection 235 onInit: function(){}, // callback functions 236 onBeforeShow: function(){}, 237 onShow: function(){}, 238 onHide: function(){} 239 }; 240 $.fn.extend({ 241 hideSuperfishUl : function(){ 242 var o = sf.op, 243 not = (o.retainPath===true) ? o.$path : ''; 244 o.retainPath = false; 245 var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) 246 .find('>ul').addClass('sf-hidden'); 247 o.onHide.call($ul); 248 return this; 249 }, 250 showSuperfishUl : function(){ 251 var o = sf.op, 252 sh = sf.c.shadowClass+'-off', 253 $ul = this.addClass(o.hoverClass) 254 .find('>ul.sf-hidden').hide().removeClass('sf-hidden'); 255 sf.IE7fix.call($ul); 256 o.onBeforeShow.call($ul); 257 $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); 258 return this; 259 } 260 }); 261})(jQuery);; 262/* 263 * Supersubs v0.2b - jQuery plugin 264 * Copyright (c) 2008 Joel Birch 265 * 266 * Dual licensed under the MIT and GPL licenses: 267 * http://www.opensource.org/licenses/mit-license.php 268 * http://www.gnu.org/licenses/gpl.html 269 * 270 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of 271 * their longest list item children. If you use this, please expect bugs and report them 272 * to the jQuery Google Group with the word 'Superfish' in the subject line. 273 * 274 */ 275/* 276 * This is not the original jQuery Supersubs plugin. 277 * Please refer to the README for more information. 278 */ 279 280(function($){ // $ will refer to jQuery within this closure 281 $.fn.supersubs = function(options){ 282 var opts = $.extend({}, $.fn.supersubs.defaults, options); 283 // return original object to support chaining 284 return this.each(function() { 285 // cache selections 286 var $$ = $(this); 287 // support metadata 288 var o = $.meta ? $.extend({}, opts, $$.data()) : opts; 289 // get the font size of menu. 290 // .css('fontSize') returns various results cross-browser, so measure an em dash instead 291 var fontsize = $('<li id="menu-fontsize">—</li>').css({ 292 'padding' : 0, 293 'position' : 'absolute', 294 'top' : '-99999em', 295 'width' : 'auto' 296 }).appendTo($$).width(); //clientWidth is faster, but was incorrect here 297 // remove em dash 298 $('#menu-fontsize').remove(); 299 300 // Jump on level if it's a "NavBar" 301 if ($$.hasClass('sf-navbar')) { 302 $$ = $('li > ul', $$); 303 } 304 // cache all ul elements
305 $ULs = $$.find('ul:not(.sf-megamenu)'); 306 // loop through each ul in menu 307 $ULs.each(function(i) { 308 // cache this ul 309 var $ul = $ULs.eq(i); 310 // get all (li) children of this ul 311 var $LIs = $ul.children(); 312 // get all anchor grand-children 313 var $As = $LIs.children('a'); 314 // force content to one line and save current float property 315 var liFloat = $LIs.css('white-space','nowrap').css('float'); 316 // remove width restrictions and floats so elements remain vertically stacked 317 var emWidth = $ul.add($LIs).add($As).css({ 318 'float' : 'none', 319 'width' : 'auto' 320 }) 321 // this ul will now be shrink-wrapped to longest li due to position:absolute 322 // so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer 323 .end().end()[0].clientWidth / fontsize; 324 // add more width to ensure lines don't turn over at certain sizes in various browsers 325 emWidth += o.extraWidth; 326 // restrict to at least minWidth and at most maxWidth 327 if (emWidth > o.maxWidth) { emWidth = o.maxWidth; } 328 else if (emWidth < o.minWidth) { emWidth = o.minWidth; } 329 emWidth += 'em'; 330 // set ul to width in ems 331 $ul.css('width',emWidth); 332 // restore li floats to avoid IE bugs 333 // set li width to full width of this ul 334 // revert white-space to normal 335 $LIs.css({ 336 'float' : liFloat, 337 'width' : '100%', 338 'white-space' : 'normal' 339 }) 340 // update offset position of descendant ul to reflect new width of parent 341 .each(function(){ 342 var $childUl = $('>ul',this); 343 var offsetDirection = $childUl.css('left')!==undefined ? 'left' : 'right'; 344 $childUl.css(offsetDirection,emWidth); 345 }); 346 }); 347 }); 348 }; 349 // expose defaults 350 $.fn.supersubs.defaults = { 351 minWidth: 9, // requires em unit. 352 maxWidth: 25, // requires em unit. 353 extraWidth: 0 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values 354 }; 355})(jQuery); // plugin code ends; 356/** 357 * @file 358 * The Superfish Drupal Behavior to apply the Superfish jQuery plugin to lists. 359 */ 360 361(function ($) { 362 Drupal.behaviors.superfish = { 363 attach: function (context, settings) { 364 // Take a look at each list to apply Superfish to. 365 $.each(settings.superfish || {}, function(index, options) { 366 // Process all Superfish lists. 367 $('#superfish-' + options.id, context).once('superfish', function() { 368 var list = $(this); 369 370 // Check if we are to apply the Supersubs plug-in to it. 371 if (options.plugins || false) { 372 if (options.plugins.supersubs || false) { 373 list.supersubs(options.plugins.supersubs); 374 } 375 } 376 377 // Apply Superfish to the list. 378 list.superfish(options.sf); 379 380 // Check if we are to apply any other plug-in to it. 381 if (options.plugins || false) { 382 if (options.plugins.touchscreen || false) { 383 list.sftouchscreen(options.plugins.touchscreen); 384 } 385 if (options.plugins.smallscreen || false) { 386 list.sfsmallscreen(options.plugins.smallscreen); 387 } 388 if (options.plugins.supposition || false) { 389 list.supposition(); 390 } 391 if (options.plugins.bgiframe || false) { 392 list.find('ul').bgIframe({opacity:false}); 393 } 394 } 395 }); 396 }); 397 } 398 }; 399})(jQuery);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.