1/****************************** 2 Contains: 3 bxSlider 4 easyListDplitter 5 elastic 6 URL 7*******************************/ 8 9/** 10 * jQuery bxSlider v3.0 11 * http://bxslider.com 12 * 13 * Copyright 2010, Steven Wanderski 14 * http://stevenwanderski.com 15 * 16 * Free to use and abuse under the MIT license. 17 * http://www.opensource.org/licenses/mit-license.php 18 * 19 */ 20(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:'swing',pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null} 21var options=$.extend(defaults,options);var base=this;var $parent='';var $origElement='';var $children='';var $outerWrapper='';var $firstChild='';var childrenWidth='';var childrenOuterWidth='';var wrapperWidth='';var wrapperHeight='';var $pager='';var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var childrenMaxWidth=0;var childrenMaxHeight=0;var currentSlide=0;var origLeft=0;var origTop=0;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;var isWorking=false;var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;} 22if(stopAuto){if(options.auto){base.stopShow(true);}} 23slide=number;if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));} 24if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));} 25if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} 26checkEndControls();if(options.moveSlideQty>1){number=Math.floor(number/options.moveSlideQty);} 27makeSlideActive(number);showCaptions();}} 28this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} 29if(stopAuto){if(options.auto){base.stopShow(true);}} 30if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide<=lastSlide){checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}else{currentSlide-=options.moveSlideQty;}}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;} 31options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} 32options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} 33options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} 34if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} 35showCaptions();}}} 36this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} 37if(stopAuto){if(options.auto){base.stopShow(true);}} 38if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}}
39checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;} 40slideLoop=true;} 41options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} 42options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} 43options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} 44if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} 45showCaptions();}}} 46this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} 47base.goToSlide(firstSlide,stopAuto);} 48this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} 49base.goToSlide(lastSlide,stopAuto);} 50this.getCurrentSlide=function(){return currentSlide;} 51this.getSlideCount=function(){return $children.length;} 52this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;} 53if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} 54this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;} 55setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}} 56this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;} 57if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} 58this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();} 59var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();} 60var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;} 61if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}} 62this.initShow=function(){$parent=$(this);$origElement=$parent.clone();$children=$parent.children();$outerWrapper='';$firstChild=$parent.children(':first');childrenWidth=$firstChild.width();childrenMaxWidth=0;childrenOuterWidth=$firstChild.outerWidth();childrenMaxHeight=0;wrapperWidth=getWrapperWidth();wrapperHeight=getWrapperHeight();isWorking=false;$pager='';currentSlide=0;origLeft=0;origTop=0;interval='';$autoControls='';$stopHtml='';$startContent='';$stopContent='';autoPlaying=true;loaded=false;origShowWidth=0;origShowHeight=0;tickerLeft=0;tickerTop=0;firstSlide=0;lastSlide=$children.length-1;
62$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();} 63if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);} 64initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}} 65if(options.controls&&!options.ticker){setControlsVars();} 66if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();} 67if(options.autoStart){setTimeout(function(){base.startShow(true);},options.autoDelay);}else{base.stopShow(true);} 68if(options.autoHover){setAutoHover();}} 69if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} 70checkEndControls();if(options.captions){showCaptions();} 71options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));} 72this.destroyShow=function(){clearInterval(interval);$('.bx-next, .bx-prev, .bx-pager, .bx-auto',$outerWrapper).remove();$parent.unwrap().unwrap().removeAttr('style');$parent.children().removeAttr('style').not('.pager').remove();$children.removeClass('pager');} 73this.reloadShow=function(){base.destroyShow();base.initShow();} 74function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('<div class="'+options.wrapperClass+'" style="width:'+wrapperWidth+'px; position:relative;"></div>').wrap('<div class="bx-window" style="position:relative; overflow:hidden; width:'+wrapperWidth+'px;"></div>').css({width:'99999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,float:'left',listStyle:'none'});$outerWrapper=base.parents('.bx-wrapper');$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('<div class="'+options.wrapperClass+'" style="width:'+childrenMaxWidth+'px; position:relative;"></div>').wrap('<div class="bx-window" style="width:'+childrenMaxWidth+'px; height:'+wrapperHeight+'px; position:relative; overflow:hidden;"></div>').css({height:'99999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('<div class="'+options.wrapperClass+'" style="width:'+childrenMaxWidth+'px; position:relative;"></div>').wrap('<div class="bx-window" style="height:'+childrenMaxHeight+'px; width:'+childrenMaxWidth+'px; position:relative; overflow:hidden;"></div>');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);} 75if(options.captions&&options.captionsSelector==null){$outerWrapper.append('<div class="bx-captions"></div>');}} 76function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}} 77function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';} 78if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';} 79showControls(nextType,nextContent,prevType,prevContent);} 80function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;} 81base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}} 82base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=100;$('.pager').each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');} 83if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}
83else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);} 84if(options.tickerHover){setTickerHover();}}} 85function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}} 86function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';} 87if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';} 88showAutoControls(startType,startContent,stopType,stopContent);} 89function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});} 90function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});} 91function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}} 92function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('<a href="" class="bx-next"></a>');var $prevHtml=$('<a href="" class="bx-prev"></a>');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('<img src="'+nextContent+'" />');} 93if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('<img src="'+prevContent+'" />');} 94if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);} 95if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);} 96$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});} 97function showPager(type){var pagerQty=$children.length;if(options.moveSlideQty>1){if($children.length%options.moveSlideQty!=0){pagerQty=Math.ceil($children.length/options.moveSlideQty);}else{pagerQty=$children.length/options.moveSlideQty;}} 98var pagerString='';if(options.buildPager){for(var i=0;i<pagerQty;i++){pagerString+=options.buildPager(i,$children.eq(i*options.moveSlideQty));}}else if(type=='full'){for(var i=1;i<=pagerQty;i++){pagerString+='<a href="" class="pager-link pager-'+i+'">'+i+'</a>';}}else if(type=='short'){pagerString='<span class="bx-pager-current">'+(options.startingSlide+1)+'</span> '+options.pagerShortSeparator+' <span class="bx-pager-total">'+$children.length+'<span>';} 99if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('<div class="bx-pager"></div>');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);} 100$pager=$('.bx-pager',$outerWrapper);} 101$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);if(options.moveSlideQty>1){slideIndex*=options.moveSlideQty;} 102base.goToSlide(slideIndex);} 103return false;});} 104function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}} 105function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('<a href="" class="bx-start"></a>');if(startType=='text'){$startContent=startContent;}else{$startContent='<img src="'+startContent+'" />';} 106if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='<img src="'+stopContent+'" />';} 107if(options.autoControlsSelector){$(options.autoControlsSelector).append($autoControls);}else{$outerWrapper.append('<div class="bx-auto"></div>');$('.bx-auto',$outerWrapper).html($autoControls);} 108$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}} 109return false;});}
110function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();} 111if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}} 112function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;} 113return position;} 114function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;} 115function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;} 116function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();} 117while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});} 118return sample;} 119this.each(function(){base.initShow();});return this;}})(jQuery); 120 121/*! 122 * jQuery Cookie Plugin v1.4.1 123 * https://github.com/carhartl/jquery-cookie 124 * 125 * Copyright 2013 Klaus Hartl 126 * Released under the MIT license 127 */ 128(function (factory) { 129 if (typeof define === 'function' && define.amd) { 130 // AMD 131 define(['jquery'], factory); 132 } else if (typeof exports === 'object') { 133 // CommonJS 134 factory(require('jquery')); 135 } else { 136 // Browser globals 137 factory(jQuery); 138 } 139}(function ($) { 140 141 var pluses = /\+/g; 142 143 function encode(s) { 144 return config.raw ? s : encodeURIComponent(s); 145 } 146 147 function decode(s) { 148 return config.raw ? s : decodeURIComponent(s); 149 } 150 151 function stringifyCookieValue(value) { 152 return encode(config.json ? JSON.stringify(value) : String(value)); 153 } 154 155 function parseCookieValue(s) { 156 if (s.indexOf('"') === 0) { 157 // This is a quoted cookie as according to RFC2068, unescape... 158 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 159 } 160 161 try { 162 // Replace server-side written pluses with spaces. 163 // If we can't decode the cookie, ignore it, it's unusable. 164 // If we can't parse the cookie, ignore it, it's unusable. 165 s = decodeURIComponent(s.replace(pluses, ' ')); 166 return config.json ? JSON.parse(s) : s; 167 } catch(e) {} 168 } 169 170 function read(s, converter) { 171 var value = config.raw ? s : parseCookieValue(s); 172 return $.isFunction(converter) ? converter(value) : value; 173 } 174 175 var config = $.cookie = function (key, value, options) { 176 177 // Write 178 179 if (value !== undefined && !$.isFunction(value)) { 180 options = $.extend({}, config.defaults, options); 181 182 if (typeof options.expires === 'number') { 183 var days = options.expires, t = options.expires = new Date(); 184 t.setTime(+t + days * 864e+5); 185 } 186 187 return (document.cookie = [ 188 encode(key), '=', stringifyCookieValue(value), 189 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 190 options.path ? '; path=' + options.path : '', 191 options.domain ? '; domain=' + options.domain : '', 192 options.secure ? '; secure' : '' 193 ].join('')); 194 } 195 196 // Read 197 198 var result = key ? undefined : {}; 199 200 // To prevent the for loop in the first place assign an empty array 201 // in case there are no cookies at all. Also prevents odd result when 202 // calling $.cookie(). 203 var cookies = document.cookie ? document.cookie.split('; ') : []; 204 205 for (var i = 0, l = cookies.length; i < l; i++) { 206 var parts = cookies[i].split('='); 207 var name = decode(parts.shift()); 208 var cookie = parts.join('='); 209 210 if (key && key === name) { 211 // If second argument (value) is a function it's a converter... 212 result = read(cookie, value); 213 break; 214 } 215 216 // Prevent storing a cookie that we couldn't decode. 217 if (!key && (cookie = read(cookie)) !== undefined) { 218 result[name] = cookie; 219 } 220 } 221 222 return result; 223 }; 224 225 config.defaults = {}; 226 227 $.removeCookie = function (key, options) { 228 if ($.cookie(key) === undefined) { 229 return false; 230 } 231
232 // Must not alter options, thus extending a fresh object... 233 $.cookie(key, '', $.extend({}, options, { expires: -1 })); 234 return !$.cookie(key); 235 }; 236 237})); 238 239 240/* 241 * easyListSplitter 1.0.2 - jQuery Plugin 242 * written by Andrea Cima Serniotti 243 * http://www.madeincima.eu 244 * 245 * Copyright (c) 2010 Andrea Cima Serniotti (http://www.madeincima.eu) 246 * Dual licensed under the MIT (MIT-LICENSE.txt) 247 * and GPL (GPL-LICENSE.txt) licenses. 248 * 249 * Built for jQuery library 250 * http://jquery.com 251 * 252 */ 253 254 /* 255 To activate the plugin add the following code to your own js file: 256 257 $('.your-list-class-name').easyListSplitter({ 258 colNumber: 3, 259 direction: 'horizontal' 260 }); 261 262 */ 263 264var j = 1; 265 266(function(jQuery) { 267 jQuery.fn.easyListSplitter = function(options) { 268 269 var defaults = { 270 colNumber: 2, // Insert here the number of columns you want. Consider that the plugin will create the number of cols requested only if there are enough items in the list. 271 direction: 'vertical' 272 }; 273 274 this.each(function() { 275 276 var obj = jQuery(this); 277 var settings = jQuery.extend(defaults, options); 278 var totalListElements = jQuery(this).children('li').size(); 279 var baseColItems = Math.ceil(totalListElements / settings.colNumber); 280 var listClass = jQuery(this).attr('class'); 281 282 // -------- Create List Elements given colNumber ------------------------------------------------------------------------------ 283 284 for (i=1;i<=settings.colNumber;i++) 285 { 286 if(i==1){ 287 jQuery(this).addClass('listCol1').wrap('<div class="listContainer'+j+'"></div>'); 288 } else if(jQuery(this).is('ul')){ // Check whether the list is ordered or unordered 289 jQuery(this).parents('.listContainer'+j).append('<ul class="listCol'+i+'"></ul>'); 290 } else{ 291 jQuery(this).parents('.listContainer'+j).append('<ol class="listCol'+i+'"></ol>'); 292 } 293 jQuery('.listContainer'+j+' > ul,.listContainer'+j+' > ol').addClass(listClass); 294 } 295 296 var listItem = 0; 297 var k = 1; 298 var l = 0; 299 300 if(settings.direction == 'vertical'){ // -------- Append List Elements to the respective listCol - Vertical ------------------------------- 301 302 jQuery(this).children('li').each(function(){ 303 listItem = listItem+1; 304 if (listItem > baseColItems*(settings.colNumber-1) ){ 305 jQuery(this).parents('.listContainer'+j).find('.listCol'+settings.colNumber).append(this); 306 } 307 else { 308 if(listItem<=(baseColItems*k)){ 309 jQuery(this).parents('.listContainer'+j).find('.listCol'+k).append(this); 310 } 311 else{ 312 jQuery(this).parents('.listContainer'+j).find('.listCol'+(k+1)).append(this); 313 k = k+1; 314 } 315 } 316 }); 317 318 jQuery('.listContainer'+j).find('ol,ul').each(function(){ 319 if(jQuery(this).children().size() == 0) { 320 jQuery(this).remove(); 321 } 322 }); 323 324 } else{ // -------- Append List Elements to the respective listCol - Horizontal ---------------------------------------------------------- 325 326 jQuery(this).children('li').each(function(){ 327 l = l+1; 328 329 if(l <= settings.colNumber){ 330 jQuery(this).parents('.listContainer'+j).find('.listCol'+l).append(this); 331 332 } else { 333 l = 1; 334 jQuery(this).parents('.listContainer'+j).find('.listCol'+l).append(this); 335 } 336 }); 337 } 338 339 jQuery('.listContainer'+j).find('ol:last,ul:last').addClass('last'); // Set class last on the last UL or OL 340 j = j+1; 341 342 }); 343 }; 344})(jQuery); 345 346/* 347jQuery Url Plugin 348 * Version 1.0 349 * 2009-03-22 19:30:05 350 * URL: http://ajaxcssblog.com/jquery/url-read-get-variables/ 351 * Description: jQuery Url Plugin gives the ability to read GET parameters from the actual URL 352 * Author: Matthias Jäggli 353 * Copyright: Copyright (c) 2009 Matthias Jäggli 354 * Licence: dual, MIT/GPLv2 355*/ 356(function($){$.url={};$.extend($.url,{_params:{},init:function(){var paramsRaw="";try{paramsRaw=(document.location.href.split("?",2)[1]||"").split("#")[0].split("&")||[];for(var i=0;i<paramsRaw.length;i++){var single=paramsRaw[i].split("=");if(single[0])this._params[single[0]]=unescape(single[1]);}}catch(e){alert(e);}},param:function(name){return this._params[name]||"";},paramAll:function(){return this._params;}});$.url.init();})(jQuery); 357 358/* bgiframe jQuery plugin */ 359/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh) 360 * Licensed under the MIT License (LICENSE.txt). 361 * 362 * Version 3.0.1 363 * 364 * Requires jQuery >= 1.2.6 365 */ 366(function(b){"function"===typeof define&&define.amd?define(["jquery"],b):"object"===typeof exports?module.exports=b:b(jQuery)})(function(b){function c(a){return a&&a.constructor===Number?a+"px":a}b.fn.bgiframe=function(a){a=b.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:!0,src:"javascript:false;",conditional:/MSIE 6\.0/.test(navigator.userAgent)},a);if(!b.isFunction(a.conditional)){var g=a.conditional;a.conditional=function(){return g}}var h=b('<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+ 367a.src+'"style="display:block;position:absolute;z-index:-1;"/>');return this.each(function(){var d=b(this);if(!1!==a.conditional(this)){var e=d.children("iframe.bgiframe"),f=0===e.length?h.clone():e;
367f.css({top:"auto"==a.top?-1*(parseInt(d.css("borderTopWidth"),10)||0)+"px":c(a.top),left:"auto"==a.left?-1*(parseInt(d.css("borderLeftWidth"),10)||0)+"px":c(a.left),width:"auto"==a.width?this.offsetWidth+"px":c(a.width),height:"auto"==a.height?this.offsetHeight+"px":c(a.height),opacity:!0===a.opacity?0: 368void 0});0===e.length&&d.prepend(f)}})};b.fn.bgIframe=b.fn.bgiframe}); 369 370/** 371 * jQuery.ScrollTo - Easy element scrolling using jQuery. 372 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com 373 * Dual licensed under MIT and GPL. 374 * Date: 5/25/2009 375 * @author Ariel Flesler 376 * @version 1.4.2 377 * 378 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html 379 */ 380;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); 381 382/** 383 * jQuery.LocalScroll - Animated scrolling navigation, using anchors. 384 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com 385 * Dual licensed under MIT and GPL. 386 * Date: 3/11/2009 387 * @author Ariel Flesler 388 * @version 1.2.7 389 **/ 390;(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$('<a> </a>').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery); 391 392/* RC Toggle Text*/ 393jQuery.fn.toggleText = function (value1, value2) { 394 return this.each(function () { 395 var $this = $(this), 396 text = $this.text(); 397 398 if (text.indexOf(value1) > -1) 399 $this.text(text.replace(value1, value2)); 400 else 401 $this.text(text.replace(value2, value1)); 402 });
403};
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.