1(function($){$.fn.bxSlider=function(options){var defaults={alignment:'horizontal',controls:true,speed:500,pager:true,pager_short:false,pager_short_separator:' / ',margin:0,next_text:'next',next_image:'',prev_text:'prev',prev_image:'',auto:false,pause:3500,auto_direction:'next',auto_hover:true,auto_controls:false,ticker:false,ticker_controls:false,ticker_direction:'next',ticker_hover:true,stop_text:'stop',start_text:'start',wrapper_class:'bxslider_wrap'};var o=$.extend(defaults,options);return this.each(function(){var $this=$(this);var $kids=$this.children();var l=$this.children().length;var first=$this.children(':first').clone();var last=$this.children(':last').clone();var w=0,h=0,current_temp=0,pos=0,d=0;var is_working=false,playing=true,tick_play=true;var current=1;var ease='swing',side='',t='';var ani={};$this.append(first).prepend(last);$this.wrap('<div class="bxslider_container"></div>');$this.parent().wrap('<div class="'+o.wrapper_class+'"></div>');if(o.alignment=='horizontal'){$this.children().css({'float':'left','listStyle':'none','marginRight':o.margin});w=first.outerWidth(true);$this.css({'width':'99999px','position':'relative','left':-w});$this.parent().css({'position':'relative','overflow':'hidden','width':'100%'});}else if(o.alignment=='vertical'){$kids.each(function(){if($(this).height()>h){h=$(this).height();}});w=first.outerWidth();$this.children().css({'height':h,'listStyle':'none','marginBottom':o.margin});$this.css({'height':'99999px','width':w,'position':'relative','top':-(h+o.margin)});$this.parent().css({'position':'relative','overflow':'hidden','height':h})} 2if(o.pager&&!o.ticker){$this.parent().after('<div class="bx_pager"></div>');if(!o.pager_short){var $a;$kids.each(function(index){$a=$('<a href="#">'+(index+1)+'</a>');$this.parent().siblings('.bx_pager').append($a);$a.click(function(){is_working=false;tick_play=false;$this.stop();move_slide(index+1);current=index+1;if(o.auto){clearInterval(t);$this.parent().siblings('.auto_controls').find('a').html(o.start_text);playing=false;} 3else if(o.ticker){$this.parent().siblings('.ticker_controls').find('a').html(o.start_text);playing=false;} 4return false;});});}else{$this.parent().siblings('.bx_pager').append();} 5set_active(1);} 6if(o.controls&&!o.ticker){if(o.next_image!=''||o.prev_image!=''){$this.parent().after('<a class="prev" href="#"><img src="'+o.prev_image+'" /></a><a class="next" href="#"><img src="'+o.next_image+'" /></a>');} 7else{$this.parent().after('<a class="prev" href="#">'+o.prev_text+'</a><a class="next" href="#">'+o.next_text+'</a>');} 8$this.parent().siblings('.next').click(function(){if(!is_working){move_slide(++current);} 9if(o.auto){clearInterval(t);$this.parent().siblings('.auto_controls').find('a').html(o.start_text);playing=false;} 10return false;});$this.parent().siblings('.prev').click(function(){if(!is_working){move_slide(--current);} 11if(o.auto){clearInterval(t);$this.parent().siblings('.auto_controls').find('a').html(o.start_text);playing=false;} 12return false;});} 13if(o.auto&&!o.ticker){t=setInterval(function(){if(o.auto_direction=='next'){move_slide(++current);}else{move_slide(--current);}},o.pause);if(o.auto_hover){$this.hover(function(){clearInterval(t);},function(){if(playing){t=setInterval(function(){if(o.auto_direction=='next'){move_slide(++current);} 14else{move_slide(--current);}},o.pause);}});} 15if(o.auto_controls){$this.parent().after('<div class="auto_controls"><a class="auto_link" href="#">'+o.stop_text+'</a></div>');$this.parent().siblings('.auto_controls').find('a').click(function(){if(playing){clearInterval(t);$(this).html(o.start_text);playing=false;} 16else{t=setInterval(function(){if(o.auto_direction=='next'){move_slide(++current);}else{move_slide(--current);}},o.pause);$(this).html(o.stop_text);playing=true;} 17return false;});}} 18if(o.ticker){var tick_play=true;tick_slide();$this.hover(function(){$this.stop();},function(){if(tick_play){tick_slide();}});if(o.ticker_controls){$this.parent().after('<div class="ticker_controls"><a class="ticker_link" href="#">'+o.stop_text+'</a></div>');$this.parent().siblings('.ticker_controls').find('a').click(function(){if(tick_play){$this.stop();$(this).html(o.start_text);tick_play=false;} 19else{is_working=false;$(this).html(o.stop_text) 20tick_slide();tick_play=true;} 21return false;});}} 22function tick_slide(){if(o.ticker_direction=='next'&&o.alignment=='horizontal'){$this.animate({left:'-=5px'},o.speed/5,'linear',function(){if(parseInt($this.css('left'))<=-((l+1)*w)){$this.css('left',-w);} 23tick_slide();});}else if(o.ticker_direction=='prev'&&o.alignment=='horizontal'){$this.animate({left:'+=5px'},o.speed/5,'linear',function(){if(parseInt($this.css('left'))>=-(w)){$this.css('left',-((l+1)*w));} 24tick_slide();});}else if(o.ticker_direction=='next'&&o.alignment=='vertical'){$this.animate({top:'-=5px'},o.speed/5,'linear',function(){if(parseInt($this.css('top'))<=-((l+1)*(h+o.margin))){$this.css('top',-(h+o.margin));} 25tick_slide();});}else if(o.ticker_direction=='prev'&&o.alignment=='vertical'){$this.animate({top:'+=4px'},o.speed/5,'linear',function(){if(parseInt($this.css('top'))>-(h+o.margin)){$this.css('top',-((l+1)*(h+o.margin-1)));} 26tick_slide();});}} 27function move_slide(num){if(o.ticker){ease='linear';} 28if(!is_working){if(o.alignment=='horizontal'){d=w;side='left';} 29else if(o.alignment=='vertical'){d=h+o.margin;side='top';} 30pos=num*d;ani[side]=-pos;is_working=true;$this.animate(ani,o.speed,ease,function(){is_working=false;if(current>l){$this.css(side,-d);current=1;} 31else if(current<1){$this.css(side,-(d*l));current=l;} 32set_active(current);});}} 33function set_active(num){if(o.pager&&!o.pager_short){$this.parent().siblings('.bx_pager').find('a').removeClass('active').eq(num-1).addClass('active');} 34else if(o.pager_short){$this.parent().siblings('.bx_pager').html(num+o.pager_short_separator+$kids.length);}}});};})(jQuery); 35/** 36 * jCarousel 37 */
38(function($){$.fn.jcarousel=function(o){if(typeof o=='string'){var instance=$(this).data('jcarousel'),args=Array.prototype.slice.call(arguments,1);return instance[o].apply(instance,args);}else 39 return this.each(function(){$(this).data('jcarousel',new $jc(this,o));});};var defaults={vertical:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:'normal',easing:'swing',auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:'<div></div>',buttonPrevHTML:'<div></div>',buttonNextEvent:'click',buttonPrevEvent:'click',buttonNextCallback:null,buttonPrevCallback:null};$.jcarousel=function(e,o){this.options=$.extend({},defaults,o||{});this.locked=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.wh=!this.options.vertical?'width':'height';this.lt=!this.options.vertical?'left':'top';var skin='',split=e.className.split(' ');for(var i=0;i<split.length;i++){if(split[i].indexOf('jcarousel-skin')!=-1){$(e).removeClass(split[i]);skin=split[i];break;}}if(e.nodeName=='UL'||e.nodeName=='OL'){this.list=$(e);this.container=this.list.parent();if(this.container.hasClass('jcarousel-clip')){if(!this.container.parent().hasClass('jcarousel-container'))this.container=this.container.wrap('<div></div>');this.container=this.container.parent();}else if(!this.container.hasClass('jcarousel-container'))this.container=this.list.wrap('<div></div>').parent();}else{this.container=$(e);this.list=this.container.find('ul,ol').eq(0);}if(skin!=''&&this.container.parent()[0].className.indexOf('jcarousel-skin')==-1)this.container.wrap('<div class=" '+skin+'"></div>');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass('jcarousel-clip'))this.clip=this.list.wrap('<div></div>').parent();this.buttonNext=$('.jcarousel-next',this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null)this.buttonNext=this.clip.after(this.options.buttonNextHTML).next();this.buttonNext.addClass(this.className('jcarousel-next'));this.buttonPrev=$('.jcarousel-prev',this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null)this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next();this.buttonPrev.addClass(this.className('jcarousel-prev'));this.clip.addClass(this.className('jcarousel-clip')).css({overflow:'hidden',position:'relative'});this.list.addClass(this.className('jcarousel-list')).css({overflow:'hidden',position:'relative',top:0,left:0,margin:0,padding:0});this.container.addClass(this.className('jcarousel-container')).css({position:'relative'});var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var li=this.list.children('li');var self=this;if(li.size()>0){var wh=0,i=this.options.offset;li.each(function(){self.format(this,i++);wh+=self.dimension(this,di);});this.list.css(this.wh,wh+'px');if(!o||o.size===undefined)this.options.size=li.size();}this.container.css('display','block');this.buttonNext.css('display','block');this.buttonPrev.css('display','block');this.funcNext=function(){self.next();};this.funcPrev=function(){self.prev();};this.funcResize=function(){self.reload();};if(this.options.initCallback!=null)this.options.initCallback(this,'init');
39if($.browser.safari){this.buttons(false,false);$(window).bind('load.jcarousel',function(){self.setup();});}else 40 this.setup();};var $jc=$.jcarousel;$jc.fn=$jc.prototype={jcarousel:'0.2.4'};$jc.fn.extend=$jc.extend=$.extend;$jc.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.tail=null;this.inTail=false;if(this.locked)return;this.list.css(this.lt,this.pos(this.options.offset)+'px');var p=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(p,false);$(window).unbind('resize.jcarousel',this.funcResize).bind('resize.jcarousel',this.funcResize);},reset:function(){this.list.empty();this.list.css(this.lt,'0px');this.list.css(this.wh,'10px');if(this.options.initCallback!=null)this.options.initCallback(this,'reset');this.setup();},reload:function(){if(this.tail!=null&&this.inTail)this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;if(this.options.reloadCallback!=null)this.options.reloadCallback(this);if(this.options.visible!=null){var self=this;var di=Math.ceil(this.clipping()/this.options.visible),wh=0,lt=0;$('li',this.list).each(function(i){wh+=self.dimension(this,di);if(i+1<self.first)lt=wh;});this.list.css(this.wh,wh+'px');this.list.css(this.lt,-lt+'px');}this.scroll(this.first,false);},lock:function(){this.locked=true;this.buttons();},unlock:function(){this.locked=false;this.buttons();},size:function(s){if(s!=undefined){this.options.size=s;if(!this.locked)this.buttons();}return this.options.size;},has:function(i,i2){if(i2==undefined||!i2)i2=i;if(this.options.size!==null&&i2>this.options.size)i2=this.options.size;for(var j=i;j<=i2;j++){var e=this.get(j);if(!e.length||e.hasClass('jcarousel-item-placeholder'))return false;}return true;},get:function(i){return $('.jcarousel-item-'+i,this.list);},add:function(i,s){var e=this.get(i),old=0,add=0;if(e.length==0){var c,e=this.create(i),j=$jc.intval(i);while(c=this.get(--j)){if(j<=0||c.length){j<=0?this.list.prepend(e):c.after(e);break;}}}else 41 old=this.dimension(e);e.removeClass(this.className('jcarousel-item-placeholder'));typeof s=='string'?e.html(s):e.empty().append(s);var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var wh=this.dimension(e,di)-old;if(i>0&&i<this.first)this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-wh+'px');this.list.css(this.wh,$jc.intval(this.list.css(this.wh))+wh+'px');return e;},remove:function(i){var e=this.get(i);if(!e.length||(i>=this.first&&i<=this.last))return;var d=this.dimension(e);if(i<this.first)this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+d+'px');e.remove();this.list.css(this.wh,$jc.intval(this.list.css(this.wh))-d+'px');},next:function(){this.stopAuto();if(this.tail!=null&&!this.inTail)this.scrollTail(false);else 42 this.scroll(((this.options.wrap=='both'||this.options.wrap=='last')&&this.options.size!=null&&this.last==this.options.size)?1:this.first+this.options.scroll);},prev:function(){this.stopAuto();if(this.tail!=null&&this.inTail)this.scrollTail(true);else 43 this.scroll(((this.options.wrap=='both'||this.options.wrap=='first')&&this.options.size!=null&&this.first==1)?this.options.size:this.first-this.options.scroll);},scrollTail:function(b){if(this.locked||this.animating||!this.tail)return;var pos=$jc.intval(this.list.css(this.lt));!b?pos-=this.tail:pos+=this.tail;this.inTail=!b;this.prevFirst=this.first;this.prevLast=this.last;this.animate(pos);},scroll:function(i,a){if(this.locked||this.animating)return;this.animate(this.pos(i),a);},pos:function(i){var pos=$jc.intval(this.list.css(this.lt));if(this.locked||this.animating)return pos;if(this.options.wrap!='circular')i=i<1?1:(this.options.size&&i>this.options.size?this.options.size:i);var back=this.first>i;var f=this.options.wrap!='circular'&&this.first<=1?1:this.first;var c=back?this.get(f):this.get(this.last);var j=back?f:f-1;var e=null,l=0,p=false,d=0,g;while(back?--j>=i:++j<i){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c[back?'before':'after'](e);if(this.first!=null&&this.options.wrap=='circular'&&this.options.size!==null&&(j<=0||j>this.options.size)){g=this.get(this.index(j));if(g.length)this.add(j,g.children().clone(true));}}c=e;d=this.dimension(e);if(p)l+=d;if(this.first!=null&&(this.options.wrap=='circular'||(j>=1&&(this.options.size==null||j<=this.options.size))))pos=back?pos+d:pos-d;}var clipping=this.clipping();var cache=[];var visible=0,j=i,v=0;var c=this.get(i-1);while(++visible){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c.length==0?this.list.prepend(e):c[back?'before':'after'](e);if(this.first!=null&&this.options.wrap=='circular'&&this.options.size!==null&&(j<=0||j>this.options.size)){g=this.get(this.index(j));if(g.length)this.add(j,g.find('>*').clone(true));}}c=e;var d=this.dimension(e);if(d==0){alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...');return 0;}if(this.options.wrap!='circular'&&this.options.size!==null&&j>this.options.size)cache.push(e);else if(p)l+=d;v+=d;if(v>=clipping)break;j++;}for(var x=0;x<cache.length;x++)cache[x].remove();if(l>0){this.list.css(this.wh,this.dimension(this.list)+l+'px');if(back){pos-=l;this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-l+'px');}}var last=i+visible-1;if(this.options.wrap!='circular'&&this.options.size&&last>this.options.size)last=this.options.size;if(j>last){visible=0,j=last,v=0;while(++visible){var e=this.get(j--);if(!e.length)break;v+=this.dimension(e);if(v>=clipping)break;}}var first=last-visible+1;if(this.options.wrap!='circular'&&first<1)first=1;
43if(this.inTail&&back){pos+=this.tail;this.inTail=false;}this.tail=null;if(this.options.wrap!='circular'&&last==this.options.size&&(last-visible+1)>=1){var m=$jc.margin(this.get(last),!this.options.vertical?'marginRight':'marginBottom');if((v-m)>clipping)this.tail=v-clipping-m;}while(i-->first)pos+=this.dimension(this.get(i));this.prevFirst=this.first;this.prevLast=this.last;this.first=first;this.last=last;return pos;},animate:function(p,a){if(this.locked||this.animating)return;this.animating=true;var self=this;var scrolled=function(){self.animating=false;if(p==0)self.list.css(self.lt,0);if(self.options.wrap=='circular'||self.options.wrap=='both'||self.options.wrap=='last'||self.options.size==null||self.last<self.options.size)self.startAuto();self.buttons();self.notify('onAfterAnimation');};this.notify('onBeforeAnimation');if(!this.options.animation||a==false){this.list.css(this.lt,p+'px');scrolled();}else{var o=!this.options.vertical?{'left':p}:{'top':p};this.list.animate(o,this.options.animation,this.options.easing,scrolled);}},startAuto:function(s){if(s!=undefined)this.options.auto=s;if(this.options.auto==0)return this.stopAuto();if(this.timer!=null)return;var self=this;this.timer=setTimeout(function(){self.next();},this.options.auto*1000);},stopAuto:function(){if(this.timer==null)return;clearTimeout(this.timer);this.timer=null;},buttons:function(n,p){if(n==undefined||n==null){var n=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='first')||this.options.size==null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=='first')&&this.options.size!=null&&this.last>=this.options.size)n=this.tail!=null&&!this.inTail;}if(p==undefined||p==null){var p=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='last')||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=='last')&&this.options.size!=null&&this.first==1)p=this.tail!=null&&this.inTail;}var self=this;this.buttonNext[n?'bind':'unbind'](this.options.buttonNextEvent+'.jcarousel',this.funcNext)[n?'removeClass':'addClass'](this.className('jcarousel-next-disabled')).attr('disabled',n?false:true);this.buttonPrev[p?'bind':'unbind'](this.options.buttonPrevEvent+'.jcarousel',this.funcPrev)[p?'removeClass':'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled',p?false:true);if(this.buttonNext.length>0&&(this.buttonNext[0].jcarouselstate==undefined||this.buttonNext[0].jcarouselstate!=n)&&this.options.buttonNextCallback!=null){this.buttonNext.each(function(){self.options.buttonNextCallback(self,this,n);});this.buttonNext[0].jcarouselstate=n;}if(this.buttonPrev.length>0&&(this.buttonPrev[0].jcarouselstate==undefined||this.buttonPrev[0].jcarouselstate!=p)&&this.options.buttonPrevCallback!=null){this.buttonPrev.each(function(){self.options.buttonPrevCallback(self,this,p);});this.buttonPrev[0].jcarouselstate=p;}},notify:function(evt){var state=this.prevFirst==null?'init':(this.prevFirst<this.first?'next':'prev');this.callback('itemLoadCallback',evt,state);if(this.prevFirst!==this.first){this.callback('itemFirstInCallback',evt,state,this.first);this.callback('itemFirstOutCallback',evt,state,this.prevFirst);}if(this.prevLast!==this.last){this.callback('itemLastInCallback',evt,state,this.last);this.callback('itemLastOutCallback',evt,state,this.prevLast);}this.callback('itemVisibleInCallback',evt,state,this.first,this.last,this.prevFirst,this.prevLast);this.callback('itemVisibleOutCallback',evt,state,this.prevFirst,this.prevLast,this.first,this.last);},callback:function(cb,evt,state,i1,i2,i3,i4){if(this.options[cb]==undefined||(typeof this.options[cb]!='object'&&evt!='onAfterAnimation'))return;var callback=typeof this.options[cb]=='object'?this.options[cb][evt]:this.options[cb];if(!$.isFunction(callback))return;var self=this;if(i1===undefined)callback(self,state,evt);else if(i2===undefined)this.get(i1).each(function(){callback(self,this,i1,state,evt);});else{for(var i=i1;i<=i2;i++)if(i!==null&&!(i>=i3&&i<=i4))this.get(i).each(function(){callback(self,this,i,state,evt);});}},create:function(i){return this.format('<li></li>',i);},format:function(e,i){var $e=$(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-'+i)).css({'float':'left','list-style':'none'});$e.attr('jcarouselindex',i);return $e;},className:function(c){return c+' '+c+(!this.options.vertical?'-horizontal':'-vertical');},dimension:function(e,d){var el=e.jquery!=undefined?e[0]:e;var old=!this.options.vertical?el.offsetWidth+$jc.margin(el,'marginLeft')+$jc.margin(el,'marginRight'):el.offsetHeight+$jc.margin(el,'marginTop')+$jc.margin(el,'marginBottom');if(d==undefined||old==d)return old;var w=!this.options.vertical?d-$jc.margin(el,'marginLeft')-$jc.margin(el,'marginRight'):d-$jc.margin(el,'marginTop')-$jc.margin(el,'marginBottom');$(el).css(this.wh,w+'px');return this.dimension(el);},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-$jc.intval(this.clip.css('borderLeftWidth'))-$jc.intval(this.clip.css('borderRightWidth')):this.clip[0].offsetHeight-$jc.intval(this.clip.css('borderTopWidth'))-$jc.intval(this.clip.css('borderBottomWidth'));}
43,index:function(i,s){if(s==undefined)s=this.options.size;return Math.round((((i-1)/s)-Math.floor((i-1)/s))*s)+1;}});$jc.extend({defaults:function(d){return $.extend(defaults,d||{});},margin:function(e,p){if(!e)return 0;var el=e.jquery!=undefined?e[0]:e;if(p=='marginRight'&&$.browser.safari){var old={'display':'block','float':'none','width':'auto'},oWidth,oWidth2;$.swap(el,old,function(){oWidth=el.offsetWidth;});old['marginRight']=0;$.swap(el,old,function(){oWidth2=el.offsetWidth;});return oWidth2-oWidth;}return $jc.intval($.css(el,p));},intval:function(v){v=parseInt(v);return isNaN(v)?0:v;}});})(jQuery); 44/** 45 * jQuery fadeTransition plugin version 1.1 46 * 47 * Licensed under GPL License http://www.gnu.org/copyleft/gpl.html 48 * 49 * Copyright (c) Gurpartap Singh <[email protected]> 50 */ 51 52(function($) { 53 var runonce = true; 54 var old_html = ''; 55 var saved_html = ''; 56 57 $.fn.fadeTransition = function(options) { 58 return this.each(function() { 59 $.fadeTransition(this, options); 60 }); 61 }; 62 63 $.fadeTransition = function(container, options) { 64 var settings = { 65 'html': '', 66 'speed': 'normal', 67 'timeout': 100, 68 'first': null, 69 'second': null 70 }; 71 72 if (options) { 73 $.extend(settings, options); 74 } 75 76 old_html = saved_html; 77 saved_html = settings.html; 78 79 var first = settings.first; 80 var second = settings.second; 81 var temp; 82 83 if ((typeof first == 'undefined') || (typeof second == 'undefined')) { 84 return true; 85 } 86 87 if (runonce) { 88 $(container).css({'position': 'relative'}); 89 first.css({'z-index': '2', 'position': 'absolute'}).hide(); 90 second.css({'z-index': '1', 'position': 'absolute'}).hide(); 91 runonce = false; 92 }; 93 94 setTimeout(function() { 95 first.html(settings.html).fadeIn(settings.speed, function() { 96 removeFilter($(this)[0]); 97 }); 98 second.fadeOut(settings.speed, function() {
99 $(this).html(settings.html); 100 }); 101 102 }, settings.timeout); 103 104 $(first).show(); 105 106 // Swap first and second. 107 temp = first; 108 first = second; 109 second = temp; 110 }; 111 112})(jQuery); 113 114/** 115 * Remove Opacity-Filter in IE. 116 */ 117function removeFilter(element) { 118 if (element.style.removeAttribute){ 119 element.style.removeAttribute('filter'); 120 } 121} 122 123/** 124 * jQuery.timers - Timer abstractions for jQuery 125 * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com) 126 * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/). 127 * Date: 2009/10/16 128 * 129 * @author Blair Mitchelmore 130 * @version 1.2 131 * 132 **/ 133 134jQuery.fn.extend({ 135 everyTime: function(interval, label, fn, times) { 136 return this.each(function() { 137 jQuery.timer.add(this, interval, label, fn, times); 138 }); 139 }, 140 oneTime: function(interval, label, fn) { 141 return this.each(function() { 142 jQuery.timer.add(this, interval, label, fn, 1); 143 }); 144 }, 145 stopTime: function(label, fn) { 146 return this.each(function() { 147 jQuery.timer.remove(this, label, fn); 148 }); 149 } 150}); 151 152jQuery.extend({ 153 timer: { 154 global: [], 155 guid: 1, 156 dataKey: "jQuery.timer", 157 regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/, 158 powers: { 159 // Yeah this is major overkill... 160 'ms': 1, 161 'cs': 10, 162 'ds': 100, 163 's': 1000, 164 'das': 10000, 165 'hs': 100000, 166 'ks': 1000000 167 }, 168 timeParse: function(value) { 169 if (value == undefined || value == null) 170 return null; 171 var result = this.regex.exec(jQuery.trim(value.toString())); 172 if (result[2]) { 173 var num = parseFloat(result[1]); 174 var mult = this.powers[result[2]] || 1; 175 return num * mult; 176 } else { 177 return value; 178 } 179 }, 180 add: function(element, interval, label, fn, times) { 181 var counter = 0; 182 183 if (jQuery.isFunction(label)) { 184 if (!times) 185 times = fn; 186 fn = label; 187 label = interval; 188 } 189 190 interval = jQuery.timer.timeParse(interval); 191 192 if (typeof interval != 'number' || isNaN(interval) || interval < 0) 193 return; 194 195 if (typeof times != 'number' || isNaN(times) || times < 0) 196 times = 0; 197 198 times = times || 0; 199 200 var timers = jQuery.data(element, this.dataKey) || jQuery.data(element, this.dataKey, {}); 201 202 if (!timers[label]) 203 timers[label] = {}; 204 205 fn.timerID = fn.timerID || this.guid++; 206 207 var handler = function() { 208 if ((++counter > times && times !== 0) || fn.call(element, counter) === false) 209 jQuery.timer.remove(element, label, fn); 210 }; 211 212 handler.timerID = fn.timerID; 213 214 if (!timers[label][fn.timerID]) 215 timers[label][fn.timerID] = window.setInterval(handler,interval); 216 217 this.global.push( element ); 218 219 }, 220 remove: function(element, label, fn) { 221 var timers = jQuery.data(element, this.dataKey), ret; 222 223 if ( timers ) { 224 225 if (!label) { 226 for ( label in timers ) 227 this.remove(element, label, fn); 228 } else if ( timers[label] ) { 229 if ( fn ) { 230 if ( fn.timerID ) { 231 window.clearInterval(timers[label][fn.timerID]); 232 delete timers[label][fn.timerID]; 233 } 234 } else { 235 for ( var fn in timers[label] ) { 236 window.clearInterval(timers[label][fn]); 237 delete timers[label][fn]; 238 } 239 } 240 241 for ( ret in timers[label] ) break; 242 if ( !ret ) { 243 ret = null; 244 delete timers[label]; 245 } 246 } 247 248 for ( ret in timers ) break; 249 if ( !ret ) 250 jQuery.removeData(element, this.dataKey); 251 } 252 } 253 } 254}); 255 256 257 258/* jQuery.preloader - v0.95 - K Reeve aka BinaryKitten 259 * 260*/ 261 262(function ($) { 263 $.preLoadImages = function(imageList,callback) { 264 var pic = [], i, total, loaded = 0; 265 if (typeof imageList != 'undefined') { 266 if ($.isArray(imageList)) { 267 total = imageList.length; // used later 268 for (i=0; i < total; i++) { 269 pic[i] = new Image(); 270 pic[i].onload = function() { 271 loaded++; // should never hit a race condition due to JS's non-threaded nature 272 if (loaded == total) { 273 if ($.isFunction(callback)) { 274 callback(); 275 } 276 } 277 }; 278 pic[i].src = imageList[i]; 279 } 280 } 281 else { 282 pic[0] = new Image(); 283 pic[0].onload = function() { 284 if ($.isFunction(callback)) { 285 callback(); 286 } 287 } 288 pic[0].src = imageList; 289 } 290 } 291 pic = undefined; 292 }; 293 294 $.preLoadCSSImages = function(callback) { 295 var pic = [], i, imageList = [], loaded = 0, total, regex = new RegExp("url\((.*)\)",'i'),spl; 296 var cssSheets = document.styleSheets, path,myRules,Rule,match,txt,img,sheetIdx,ruleIdx; 297 for (sheetIdx=0;sheetIdx < cssSheets.length;sheetIdx++){ 298 var sheet = cssSheets[sheetIdx]; 299 if (typeof sheet.href == 'string' && sheet.href.length > 0) { 300 spl = sheet.href.split('/');spl.pop();path = spl.join('/')+'/'; 301 } 302 else { 303 path = './'; 304 } 305 myRules = sheet.cssRules ? sheet.cssRules : sheet.rules; 306 for (ruleIdx=0;ruleIdx < myRules.length;ruleIdx++) { 307 Rule = myRules[ruleIdx]; 308 txt = Rule.cssText ? Rule.cssText : Rule.style.cssText; 309 match = regex.exec(txt); 310 if (match != null) { 311 img = match[1].substring(1,match[1].indexOf(')',1)); 312 if (img.substring(0,4) == 'http') { 313 imageList[imageList.length] = img; 314 } 315 else if ( match[1].substring(1,2) == '/') { 316 var p2 = path.split('/');p2.pop();p2.pop();p2x = p2.join("/"); 317 imageList[imageList.length] = p2x+img; 318 } 319 else { 320 imageList[imageList.length] = path+img; 321 } 322 } 323 }; 324 }; 325 326 total = imageList.length; // used later 327 for (i=0; i < total; i++) { 328 pic[i] = new Image(); 329 pic[i].onload = function() { 330 loaded++; // should never hit a race condition due to JS's non-threaded nature 331 if (loaded == total) { 332 if ($.isFunction(callback)) { 333 callback(); 334 } 335 } 336 }; 337 pic[i].src = imageList[i]; 338 } 339 340 }; 341 $.preLoadAllImages = function(imageList,callback) { 342 if (typeof imageList != 'undefined') { 343 if ($.isFunction(imageList)) { 344 callback = imageList; 345 } 346 else if (!$.isArray(imageList)) { 347 imageList = [imageList]; 348 } 349 } 350 $.preLoadCSSImages(function(){ 351 if (imageList.length > 0) { 352 $.preLoadImages(imageList,function(){ 353 callback(); 354 }); 355 } 356 else { 357 callback(); 358 } 359 }); 360 } 361})(jQuery); 362function asDecode(input) { 363 var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
363+/="; 364 var output = ""; 365 var chr1, chr2, chr3; 366 var enc1, enc2, enc3, enc4; 367 var i = 0; 368 input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); 369 do { 370 enc1 = keyStr.indexOf(input.charAt(i++)); 371 enc2 = keyStr.indexOf(input.charAt(i++)); 372 enc3 = keyStr.indexOf(input.charAt(i++)); 373 enc4 = keyStr.indexOf(input.charAt(i++)); 374 375 chr1 = (enc1 << 2) | (enc2 >> 4); 376 chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); 377 chr3 = ((enc3 & 3) << 6) | enc4; 378 379 output = output + String.fromCharCode(chr1); 380 381 if (enc3 != 64) { 382 output = output + String.fromCharCode(chr2); 383 } 384 if (enc4 != 64) { 385 output = output + String.fromCharCode(chr3); 386 } 387 } while (i < input.length); 388 return output; 389} 390(function($){ 391 $.fn.popupWindow = function(instanceSettings){ 392 393 return this.each(function(){ 394 395 $(this).click(function(){ 396 397 $.fn.popupWindow.defaultSettings = { 398 centerBrowser:0, // center window over browser window? {1 (YES) or 0 (NO)}. overrides top and left 399 centerScreen:0, // center window over entire screen? {1 (YES) or 0 (NO)}. overrides top and left 400 height:550, // sets the height in pixels of the window. 401 left:0, // left position when the window appears. 402 location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}. 403 menubar:0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}. 404 resizable:0, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable. 405 scrollbars:1, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}. 406 status:0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}. 407 width:900, // sets the width in pixels of the window. 408 windowName:null, // name of window set from the name attribute of the element that invokes the click 409 windowURL:null, // url used for the popup 410 top:0, // top position when the window appears. 411 toolbar:0 // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}. 412 }; 413 414 settings = $.extend({}, $.fn.popupWindow.defaultSettings, instanceSettings || {}); 415 416 var windowFeatures = 'height=' + settings.height + 417 ',width=' + settings.width + 418 ',toolbar=' + settings.toolbar + 419 ',scrollbars=' + settings.scrollbars + 420 ',status=' + settings.status + 421 ',resizable=' + settings.resizable + 422 ',location=' + settings.location + 423 ',menuBar=' + settings.menubar; 424 425 settings.windowName = this.name || settings.windowName; 426 settings.windowURL = this.href || settings.windowURL; 427 var centeredY,centeredX; 428 429 if(settings.centerBrowser){ 430 431 if ($.browser.msie) {//hacked together for IE browsers 432 centeredY = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120)/2) - (settings.height/2))); 433 centeredX = window.screenLeft + ((((document.body.offsetWidth + 20)/2) - (settings.width/2))); 434 }else{ 435 centeredY = window.screenY + (((window.outerHeight/2) - (settings.height/2))); 436 centeredX = window.screenX + (((window.outerWidth/2) - (settings.width/2))); 437 } 438 window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY).focus(); 439 }else if(settings.centerScreen){ 440 centeredY = (screen.height - settings.height)/2; 441 centeredX = (screen.width - settings.width)/2; 442 window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY).focus(); 443 }else{ 444 window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + settings.left +',top=' + settings.top).focus(); 445 } 446 return false; 447 }); 448 449}); 450}; 451})(jQuery); 452 453function uniqueid(){ 454 var idstr=String.fromCharCode(Math.floor((Math.random()*25)+65)); 455 do { 456 var ascicode=Math.floor((Math.random()*42)+48); 457 if (ascicode<58 || ascicode>64){ 458 idstr+=String.fromCharCode(ascicode); 459 } 460 } while (idstr.length<32); 461 return (idstr); 462} 463if (!Object.keys) { 464 Object.keys = function (obj) { 465 var arr = [], 466 key; 467 for (key in obj) { 468 if (obj.hasOwnProperty(key)) { 469 arr.push(key); 470 } 471 } 472 return arr; 473 }; 474} 475 476// Avoid 'console' errors in browsers that lack a console. 477(function() { 478 var method; 479 var noop = function () {}; 480 var methods = [ 481 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 482 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 483 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 484 'timeStamp', 'trace', 'warn' 485 ]; 486 var length = methods.length; 487 var console = (window.console = window.console || {}); 488 489 while (length--) { 490 method = methods[length]; 491 492 // Only stub undefined methods. 493 if (!console[method]) { 494 console[method] = noop; 495 } 496 } 497}()); 498
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.