UNPKG

lixin-web

Version:

vue and bootstrap

1 lines 28.2 kB
window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var b=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,b):console.log.apply(console,b))}};(function(e){function h(){}for(var g="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),f;f=g.pop();){e[f]=e[f]||h}})((function(){try{console.log();return window.console}catch(a){return window.console={}}})());(function(j){var m="2.88";if(j.support==undefined){j.support={opacity:!(j.browser.msie)}}function a(t){if(j.fn.cycle.debug){f(t)}}function f(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}}j.fn.cycle=function(t,s){var u={s:this.selector,c:this.context};if(this.length===0&&t!="stop"){if(!j.isReady&&u.s){f("DOM not ready, queuing slideshow");j(function(){j(u.s,u.c).cycle(t,s)});return this}f("terminating; zero elements found by selector"+(j.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var y=n(this,t,s);if(y===false){return}y.updateActivePagerLink=y.updateActivePagerLink||j.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var z=j(this);var A=y.slideExpr?j(y.slideExpr,this):z.children();var w=A.get();if(w.length<2){f("terminating; too few slides: "+w.length);return}var v=l(z,A,w,y,u);if(v===false){return}var x=v.continuous?10:h(w[v.currSlide],w[v.nextSlide],v,!v.rev);if(x){x+=(v.delay||0);if(x<10){x=10}a("first timeout: "+x);this.cycleTimeout=setTimeout(function(){e(w,v,0,(!v.rev&&!y.backwards))},x)}})};function n(s,v,t){if(s.cycleStop==undefined){s.cycleStop=0}if(v===undefined||v===null){v={}}if(v.constructor==String){switch(v){case"destroy":case"stop":var x=j(s).data("cycle.opts");if(!x){return false}s.cycleStop++;if(s.cycleTimeout){clearTimeout(s.cycleTimeout)}s.cycleTimeout=0;j(s).removeData("cycle.opts");if(v=="destroy"){r(x)}return false;case"toggle":s.cyclePause=(s.cyclePause===1)?0:1;w(s.cyclePause,t,s);return false;case"pause":s.cyclePause=1;return false;case"resume":s.cyclePause=0;w(false,t,s);return false;case"prev":case"next":var x=j(s).data("cycle.opts");if(!x){f('options not found, "prev/next" ignored');return false}j.fn.cycle[v](x);return false;default:v={fx:v}}return v}else{if(v.constructor==Number){var u=v;v=j(s).data("cycle.opts");if(!v){f("options not found, can not advance slide");return false}if(u<0||u>=v.elements.length){f("invalid slide index: "+u);return false}v.nextSlide=u;if(s.cycleTimeout){clearTimeout(s.cycleTimeout);s.cycleTimeout=0}if(typeof t=="string"){v.oneTimeFx=t}e(v.elements,v,1,u>=v.currSlide);return false}}return v;function w(z,A,y){if(!z&&A===true){var B=j(y).data("cycle.opts");if(!B){f("options not found, can not resume");return false}if(y.cycleTimeout){clearTimeout(y.cycleTimeout);y.cycleTimeout=0}e(B.elements,B,1,(!x.rev&&!x.backwards))}}}function b(s,t){if(!j.support.opacity&&t.cleartype&&s.style.filter){try{s.style.removeAttribute("filter")}catch(u){}}}function r(s){if(s.next){j(s.next).unbind(s.prevNextEvent)}if(s.prev){j(s.prev).unbind(s.prevNextEvent)}if(s.pager||s.pagerAnchorBuilder){j.each(s.pagerAnchors||[],function(){this.unbind().remove()})}s.pagerAnchors=null;if(s.destroy){s.destroy(s)}}function l(A,M,x,v,G){var E=j.extend({},j.fn.cycle.defaults,v||{},j.metadata?A.metadata():j.meta?A.data():{});if(E.autostop){E.countdown=E.autostopCount||x.length}var t=A[0];A.data("cycle.opts",E);E.$cont=A;E.stopCount=t.cycleStop;E.elements=x;E.before=E.before?[E.before]:[];E.after=E.after?[E.after]:[];E.after.unshift(function(){E.busy=0});if(!j.support.opacity&&E.cleartype){E.after.push(function(){b(this,E)})}if(E.continuous){E.after.push(function(){e(x,E,0,(!E.rev&&!E.backwards))})}o(E);if(!j.support.opacity&&E.cleartype&&!E.cleartypeNoBg){g(M)}if(A.css("position")=="static"){A.css("position","relative")}if(E.width){A.width(E.width)}if(E.height&&E.height!="auto"){A.height(E.height)}if(E.startingSlide){E.startingSlide=parseInt(E.startingSlide)}else{if(E.backwards){E.startingSlide=x.length-1}}if(E.random){E.randomMap=[];for(var K=0;K<x.length;K++){E.randomMap.push(K)}E.randomMap.sort(function(O,w){return Math.random()-0.5});E.randomIndex=1;E.startingSlide=E.randomMap[1]}else{if(E.startingSlide>=x.length){E.startingSlide=0}}E.currSlide=E.startingSlide||0;var z=E.startingSlide;M.css({position:"absolute"}).hide().each(function(w){var O;if(E.backwards){O=z?w<=z?x.length+(w-z):z-w:x.length-w}else{O=z?w>=z?x.length-(w-z):z-w:x.length-w}j(this).css("z-index",O)});j(x[z]).css("opacity",1).show();b(x[z],E);if(E.fit&&E.width){M.width(E.width)}if(E.fit&&E.height&&E.height!="auto"){M.height(E.height)}var F=E.containerResize&&!A.innerHeight();if(F){var y=0,D=0;for(var I=0;I<x.length;I++){var s=j(x[I]),N=s[0],C=s.outerWidth(),L=s.outerHeight();if(!C){C=N.offsetWidth||N.width||s.attr("width")}if(!L){L=N.offsetHeight||N.height||s.attr("height")}y=C>y?C:y;D=L>D?L:D}if(y>0&&D>0){A.css({width:y+"px",height:D+"px"})}}if(E.pause){A.hover(function(){this.cyclePause++},function(){this.cyclePause--})}if(c(E)===false){return false}var u=false;v.requeueAttempts=v.requeueAttempts||0;M.each(function(){var Q=j(this);this.cycleH=(E.fit&&E.height)?E.height:(Q.height()||this.offsetHeight||this.height||Q.attr("height")||0);this.cycleW=(E.fit&&E.width)?E.width:(Q.width()||this.offsetWidth||this.width||Q.attr("width")||0);if(Q.is("img")){var O=(j.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var R=(j.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var P=(j.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var w=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(O||R||P||w){if(G.s&&E.requeueOnImageNotLoaded&&++v.requeueAttempts<100){f(v.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){j(G.s,G.c).cycle(v)},E.requeueTimeout);u=true;return false}else{f("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(u){return false}E.cssBefore=E.cssBefore||{};E.animIn=E.animIn||{};E.animOut=E.animOut||{};M.not(":eq("+z+")").css(E.cssBefore);if(E.cssFirst){j(M[z]).css(E.cssFirst)}if(E.timeout){E.timeout=parseInt(E.timeout);if(E.speed.constructor==String){E.speed=j.fx.speeds[E.speed]||parseInt(E.speed)}if(!E.sync){E.speed=E.speed/2}var H=E.fx=="shuffle"?500:250;while((E.timeout-E.speed)<H){E.timeout+=E.speed}}if(E.easing){E.easeIn=E.easeOut=E.easing}if(!E.speedIn){E.speedIn=E.speed}if(!E.speedOut){E.speedOut=E.speed}E.slideCount=x.length;E.currSlide=E.lastSlide=z;if(E.random){if(++E.randomIndex==x.length){E.randomIndex=0}E.nextSlide=E.randomMap[E.randomIndex]}else{if(E.backwards){E.nextSlide=E.startingSlide==0?(x.length-1):E.startingSlide-1}else{E.nextSlide=E.startingSlide>=(x.length-1)?0:E.startingSlide+1}}if(!E.multiFx){var J=j.fn.cycle.transitions[E.fx];if(j.isFunction(J)){J(A,M,E)}else{if(E.fx!="custom"&&!E.multiFx){f("unknown transition: "+E.fx,"; slideshow terminating");return false}}}var B=M[z];if(E.before.length){E.before[0].apply(B,[B,B,E,true])}if(E.after.length>1){E.after[1].apply(B,[B,B,E,true])}if(E.next){j(E.next).bind(E.prevNextEvent,function(){return q(E,E.rev?-1:1)})}if(E.prev){j(E.prev).bind(E.prevNextEvent,function(){return q(E,E.rev?1:-1)})}if(E.pager||E.pagerAnchorBuilder){d(x,E)}k(E,x);return E}function o(s){s.original={before:[],after:[]};s.original.cssBefore=j.extend({},s.cssBefore);s.original.cssAfter=j.extend({},s.cssAfter);s.original.animIn=j.extend({},s.animIn);s.original.animOut=j.extend({},s.animOut);j.each(s.before,function(){s.original.before.push(this)});j.each(s.after,function(){s.original.after.push(this)})}function c(y){var w,u,t=j.fn.cycle.transitions;if(y.fx.indexOf(",")>0){y.multiFx=true;y.fxs=y.fx.replace(/\s*/g,"").split(",");for(w=0;w<y.fxs.length;w++){var x=y.fxs[w];u=t[x];if(!u||!t.hasOwnProperty(x)||!j.isFunction(u)){f("discarding unknown transition: ",x);y.fxs.splice(w,1);w--}}if(!y.fxs.length){f("No valid transitions named; slideshow terminating.");return false}}else{if(y.fx=="all"){y.multiFx=true;y.fxs=[];for(p in t){u=t[p];if(t.hasOwnProperty(p)&&j.isFunction(u)){y.fxs.push(p)}}}}if(y.multiFx&&y.randomizeEffects){var v=Math.floor(Math.random()*20)+30;for(w=0;w<v;w++){var s=Math.floor(Math.random()*y.fxs.length);y.fxs.push(y.fxs.splice(s,1)[0])}a("randomized fx sequence: ",y.fxs)}return true}function k(t,s){t.addSlide=function(v,w){var u=j(v),x=u[0];if(!t.autostopCount){t.countdown++}s[w?"unshift":"push"](x);if(t.els){t.els[w?"unshift":"push"](x)}t.slideCount=s.length;u.css("position","absolute");u[w?"prependTo":"appendTo"](t.$cont);if(w){t.currSlide++;t.nextSlide++}if(!j.support.opacity&&t.cleartype&&!t.cleartypeNoBg){g(u)}if(t.fit&&t.width){u.width(t.width)}if(t.fit&&t.height&&t.height!="auto"){$slides.height(t.height)}x.cycleH=(t.fit&&t.height)?t.height:u.height();x.cycleW=(t.fit&&t.width)?t.width:u.width();u.css(t.cssBefore);if(t.pager||t.pagerAnchorBuilder){j.fn.cycle.createPagerAnchor(s.length-1,x,j(t.pager),s,t)}if(j.isFunction(t.onAddSlide)){t.onAddSlide(u)}else{u.hide()}}}j.fn.cycle.resetState=function(t,s){s=s||t.fx;t.before=[];t.after=[];t.cssBefore=j.extend({},t.original.cssBefore);t.cssAfter=j.extend({},t.original.cssAfter);t.animIn=j.extend({},t.original.animIn);t.animOut=j.extend({},t.original.animOut);t.fxFn=null;j.each(t.original.before,function(){t.before.push(this)});j.each(t.original.after,function(){t.after.push(this)});var u=j.fn.cycle.transitions[s];if(j.isFunction(u)){u(t.$cont,j(t.elements),t)}};function e(z,s,y,B){if(y&&s.busy&&s.manualTrump){a("manualTrump in go(), stopping active transition");j(z).stop(true,true);s.busy=false}if(s.busy){a("transition active, ignoring new tx request");return}var w=s.$cont[0],D=z[s.currSlide],C=z[s.nextSlide];if(w.cycleStop!=s.stopCount||w.cycleTimeout===0&&!y){return}if(!y&&!w.cyclePause&&!s.bounce&&((s.autostop&&(--s.countdown<=0))||(s.nowrap&&!s.random&&s.nextSlide<s.currSlide))){if(s.end){s.end(s)}return}var A=false;if((y||!w.cyclePause)&&(s.nextSlide!=s.currSlide)){A=true;var x=s.fx;D.cycleH=D.cycleH||j(D).height();D.cycleW=D.cycleW||j(D).width();C.cycleH=C.cycleH||j(C).height();C.cycleW=C.cycleW||j(C).width();if(s.multiFx){if(s.lastFx==undefined||++s.lastFx>=s.fxs.length){s.lastFx=0}x=s.fxs[s.lastFx];s.currFx=x}if(s.oneTimeFx){x=s.oneTimeFx;s.oneTimeFx=null}j.fn.cycle.resetState(s,x);if(s.before.length){j.each(s.before,function(E,F){if(w.cycleStop!=s.stopCount){return}F.apply(C,[D,C,s,B])})}var u=function(){j.each(s.after,function(E,F){if(w.cycleStop!=s.stopCount){return}F.apply(C,[D,C,s,B])})};a("tx firing; currSlide: "+s.currSlide+"; nextSlide: "+s.nextSlide);s.busy=1;if(s.fxFn){s.fxFn(D,C,s,u,B,y&&s.fastOnEvent)}else{if(j.isFunction(j.fn.cycle[s.fx])){j.fn.cycle[s.fx](D,C,s,u,B,y&&s.fastOnEvent)}else{j.fn.cycle.custom(D,C,s,u,B,y&&s.fastOnEvent)}}}if(A||s.nextSlide==s.currSlide){s.lastSlide=s.currSlide;if(s.random){s.currSlide=s.nextSlide;if(++s.randomIndex==z.length){s.randomIndex=0}s.nextSlide=s.randomMap[s.randomIndex];if(s.nextSlide==s.currSlide){s.nextSlide=(s.currSlide==s.slideCount-1)?0:s.currSlide+1}}else{if(s.backwards){var v=(s.nextSlide-1)<0;if(v&&s.bounce){s.backwards=!s.backwards;s.nextSlide=1;s.currSlide=0}else{s.nextSlide=v?(z.length-1):s.nextSlide-1;s.currSlide=v?0:s.nextSlide+1}}else{var v=(s.nextSlide+1)==z.length;if(v&&s.bounce){s.backwards=!s.backwards;s.nextSlide=z.length-2;s.currSlide=z.length-1}else{s.nextSlide=v?0:s.nextSlide+1;s.currSlide=v?z.length-1:s.nextSlide-1}}}}if(A&&s.pager){s.updateActivePagerLink(s.pager,s.currSlide,s.activePagerClass)}var t=0;if(s.timeout&&!s.continuous){t=h(z[s.currSlide],z[s.nextSlide],s,B)}else{if(s.continuous&&w.cyclePause){t=10}}if(t>0){w.cycleTimeout=setTimeout(function(){e(z,s,0,(!s.rev&&!s.backwards))},t)}}j.fn.cycle.updateActivePagerLink=function(s,u,t){j(s).each(function(){j(this).children().removeClass(t).eq(u).addClass(t)})};function h(x,v,w,u){if(w.timeoutFn){var s=w.timeoutFn.call(x,x,v,w,u);while((s-w.speed)<250){s+=w.speed}a("calculated timeout: "+s+"; speed: "+w.speed);if(s!==false){return s}}return w.timeout}j.fn.cycle.next=function(s){q(s,s.rev?-1:1)};j.fn.cycle.prev=function(s){q(s,s.rev?1:-1)};function q(u,x){var t=u.elements;var w=u.$cont[0],v=w.cycleTimeout;if(v){clearTimeout(v);w.cycleTimeout=0}if(u.random&&x<0){u.randomIndex--;if(--u.randomIndex==-2){u.randomIndex=t.length-2}else{if(u.randomIndex==-1){u.randomIndex=t.length-1}}u.nextSlide=u.randomMap[u.randomIndex]}else{if(u.random){u.nextSlide=u.randomMap[u.randomIndex]}else{u.nextSlide=u.currSlide+x;if(u.nextSlide<0){if(u.nowrap){return false}u.nextSlide=t.length-1}else{if(u.nextSlide>=t.length){if(u.nowrap){return false}u.nextSlide=0}}}}var s=u.onPrevNextEvent||u.prevNextClick;if(j.isFunction(s)){s(x>0,u.nextSlide,t[u.nextSlide])}e(t,u,1,x>=0);return false}function d(t,u){var s=j(u.pager);j.each(t,function(v,w){j.fn.cycle.createPagerAnchor(v,w,s,t,u)});u.updateActivePagerLink(u.pager,u.startingSlide,u.activePagerClass)}j.fn.cycle.createPagerAnchor=function(w,x,u,v,y){var t;if(j.isFunction(y.pagerAnchorBuilder)){t=y.pagerAnchorBuilder(w,x);a("pagerAnchorBuilder("+w+", el) returned: "+t)}else{t='<a href="#">'+(w+1)+"</a>"}if(!t){return}var z=j(t);if(z.parents("body").length===0){var s=[];if(u.length>1){u.each(function(){var A=z.clone(true);j(this).append(A);s.push(A[0])});z=j(s)}else{z.appendTo(u)}}y.pagerAnchors=y.pagerAnchors||[];y.pagerAnchors.push(z);z.bind(y.pagerEvent,function(D){D.preventDefault();y.nextSlide=w;var C=y.$cont[0],B=C.cycleTimeout;if(B){clearTimeout(B);C.cycleTimeout=0}var A=y.onPagerEvent||y.pagerClick;if(j.isFunction(A)){A(y.nextSlide,v[y.nextSlide])}e(v,y,1,y.currSlide<w)});if(!/^click/.test(y.pagerEvent)&&!y.allowPagerClickBubble){z.bind("click.cycle",function(){return false})}if(y.pauseOnPagerHover){z.hover(function(){y.$cont[0].cyclePause++},function(){y.$cont[0].cyclePause--})}};j.fn.cycle.hopsFromLast=function(v,u){var t,s=v.lastSlide,w=v.currSlide;if(u){t=w>s?w-s:v.slideCount-s}else{t=w<s?s-w:s+v.slideCount-w}return t};function g(u){a("applying clearType background-color hack");function t(v){v=parseInt(v).toString(16);return v.length<2?"0"+v:v}function s(y){for(;y&&y.nodeName.toLowerCase()!="html";y=y.parentNode){var w=j.css(y,"background-color");if(w.indexOf("rgb")>=0){var x=w.match(/\d+/g);return"#"+t(x[0])+t(x[1])+t(x[2])}if(w&&w!="transparent"){return w}}return"#ffffff"}u.each(function(){j(this).css("background-color",s(this))})}j.fn.cycle.commonReset=function(y,v,x,t,u,s){j(x.elements).not(y).hide();x.cssBefore.opacity=1;x.cssBefore.display="block";if(t!==false&&v.cycleW>0){x.cssBefore.width=v.cycleW}if(u!==false&&v.cycleH>0){x.cssBefore.height=v.cycleH}x.cssAfter=x.cssAfter||{};x.cssAfter.display="none";j(y).css("zIndex",x.slideCount+(s===true?1:0));j(v).css("zIndex",x.slideCount+(s===true?0:1))};j.fn.cycle.custom=function(E,y,s,v,x,t){var D=j(E),z=j(y);var u=s.speedIn,C=s.speedOut,w=s.easeIn,B=s.easeOut;z.css(s.cssBefore);if(t){if(typeof t=="number"){u=C=t}else{u=C=1}w=B=null}var A=function(){z.animate(s.animIn,u,w,v)};D.animate(s.animOut,C,B,function(){if(s.cssAfter){D.css(s.cssAfter)}if(!s.sync){A()}});if(s.sync){A()}};j.fn.cycle.transitions={fade:function(t,u,s){u.not(":eq("+s.currSlide+")").css("opacity",0);s.before.push(function(x,v,w){j.fn.cycle.commonReset(x,v,w);w.cssBefore.opacity=0});s.animIn={opacity:1};s.animOut={opacity:0};s.cssBefore={}}};j.fn.cycle.ver=function(){return m};j.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!j.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null,backwards:false}})(jQuery);(function(a){a.fn.cycle.transitions.none=function(c,d,b){b.fxFn=function(g,e,f,h){a(e).show();a(g).hide();h()}};a.fn.cycle.transitions.scrollUp=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.height();c.cssBefore={top:b,left:0};c.cssFirst={top:0};c.animIn={top:0};c.animOut={top:-b}};a.fn.cycle.transitions.scrollDown=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.height();c.cssFirst={top:0};c.cssBefore={top:-b,left:0};c.animIn={top:0};c.animOut={top:b}};a.fn.cycle.transitions.scrollLeft=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.width();c.cssFirst={left:0};c.cssBefore={left:b,top:0};c.animIn={left:0};c.animOut={left:0-b}};a.fn.cycle.transitions.scrollRight=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.width();c.cssFirst={left:0};c.cssBefore={left:-b,top:0};c.animIn={left:0};c.animOut={left:b}};a.fn.cycle.transitions.scrollHorz=function(c,d,b){c.css("overflow","hidden").width();b.before.push(function(h,f,g,e){a.fn.cycle.commonReset(h,f,g);g.cssBefore.left=e?(f.cycleW-1):(1-f.cycleW);g.animOut.left=e?-h.cycleW:h.cycleW});b.cssFirst={left:0};b.cssBefore={top:0};b.animIn={left:0};b.animOut={top:0}};a.fn.cycle.transitions.scrollVert=function(c,d,b){c.css("overflow","hidden");b.before.push(function(h,f,g,e){a.fn.cycle.commonReset(h,f,g);g.cssBefore.top=e?(1-f.cycleH):(f.cycleH-1);g.animOut.top=e?h.cycleH:-h.cycleH});b.cssFirst={top:0};b.cssBefore={left:0};b.animIn={top:0};b.animOut={left:0}};a.fn.cycle.transitions.slideX=function(c,d,b){b.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW});b.cssBefore={left:0,top:0,width:0};b.animIn={width:"show"};b.animOut={width:0}};a.fn.cycle.transitions.slideY=function(c,d,b){b.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH});b.cssBefore={left:0,top:0,height:0};b.animIn={height:"show"};b.animOut={height:0}};a.fn.cycle.transitions.shuffle=function(e,f,d){var c,b=e.css("overflow","visible").width();f.css({left:0,top:0});d.before.push(function(j,g,h){a.fn.cycle.commonReset(j,g,h,true,true,true)});if(!d.speedAdjusted){d.speed=d.speed/2;d.speedAdjusted=true}d.random=0;d.shuffle=d.shuffle||{left:-b,top:15};d.els=[];for(c=0;c<f.length;c++){d.els.push(f[c])}for(c=0;c<d.currSlide;c++){d.els.push(d.els.shift())}d.fxFn=function(n,k,m,g,j){var h=j?a(n):a(k);a(k).css(m.cssBefore);var l=m.slideCount;h.animate(m.shuffle,m.speedIn,m.easeIn,function(){var q=a.fn.cycle.hopsFromLast(m,j);for(var r=0;r<q;r++){j?m.els.push(m.els.shift()):m.els.unshift(m.els.pop())}if(j){for(var s=0,o=m.els.length;s<o;s++){a(m.els[s]).css("z-index",o-s+l)}}else{var t=a(n).css("z-index");h.css("z-index",parseInt(t)+1+l)}h.animate({left:0,top:0},m.speedOut,m.easeOut,function(){a(j?this:n).hide();if(g){g()}})})};d.cssBefore={display:"block",opacity:1,top:0,left:0}};a.fn.cycle.transitions.turnUp=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=e.cycleH;f.animIn.height=e.cycleH});b.cssFirst={top:0};b.cssBefore={left:0,height:0};b.animIn={top:0};b.animOut={height:0}};a.fn.cycle.transitions.turnDown=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH;f.animOut.top=g.cycleH});b.cssFirst={top:0};b.cssBefore={left:0,top:0,height:0};b.animOut={height:0}};a.fn.cycle.transitions.turnLeft=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=e.cycleW;f.animIn.width=e.cycleW});b.cssBefore={top:0,width:0};b.animIn={left:0};b.animOut={width:0}};a.fn.cycle.transitions.turnRight=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW;f.animOut.left=g.cycleW});b.cssBefore={top:0,left:0,width:0};b.animIn={left:0};b.animOut={width:0}};a.fn.cycle.transitions.zoom=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false,true);f.cssBefore.top=e.cycleH/2;f.cssBefore.left=e.cycleW/2;f.animIn={top:0,left:0,width:e.cycleW,height:e.cycleH};f.animOut={width:0,height:0,top:g.cycleH/2,left:g.cycleW/2}});b.cssFirst={top:0,left:0};b.cssBefore={width:0,height:0}};a.fn.cycle.transitions.fadeZoom=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false);f.cssBefore.left=e.cycleW/2;f.cssBefore.top=e.cycleH/2;f.animIn={top:0,left:0,width:e.cycleW,height:e.cycleH}});b.cssBefore={width:0,height:0};b.animOut={opacity:0}};a.fn.cycle.transitions.blindX=function(d,e,c){var b=d.css("overflow","hidden").width();c.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.width=f.cycleW;g.animOut.left=h.cycleW});c.cssBefore={left:b,top:0};c.animIn={left:0};c.animOut={left:b}};a.fn.cycle.transitions.blindY=function(d,e,c){var b=d.css("overflow","hidden").height();c.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.height=f.cycleH;g.animOut.top=h.cycleH});c.cssBefore={top:b,left:0};c.animIn={top:0};c.animOut={top:b}};a.fn.cycle.transitions.blindZ=function(e,f,d){var c=e.css("overflow","hidden").height();var b=e.width();d.before.push(function(j,g,h){a.fn.cycle.commonReset(j,g,h);h.animIn.height=g.cycleH;h.animOut.top=j.cycleH});d.cssBefore={top:c,left:b};d.animIn={top:0,left:0};d.animOut={top:c,left:b}};a.fn.cycle.transitions.growX=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=this.cycleW/2;f.animIn={left:0,width:this.cycleW};f.animOut={left:0}});b.cssBefore={width:0,top:0}};a.fn.cycle.transitions.growY=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=this.cycleH/2;f.animIn={top:0,height:this.cycleH};f.animOut={top:0}});b.cssBefore={height:0,left:0}};a.fn.cycle.transitions.curtainX=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true,true);f.cssBefore.left=e.cycleW/2;f.animIn={left:0,width:this.cycleW};f.animOut={left:g.cycleW/2,width:0}});b.cssBefore={top:0,width:0}};a.fn.cycle.transitions.curtainY=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false,true);f.cssBefore.top=e.cycleH/2;f.animIn={top:0,height:e.cycleH};f.animOut={top:g.cycleH/2,height:0}});b.cssBefore={left:0,height:0}};a.fn.cycle.transitions.cover=function(f,g,e){var j=e.direction||"left";var b=f.css("overflow","hidden").width();var c=f.height();e.before.push(function(k,d,h){a.fn.cycle.commonReset(k,d,h);if(j=="right"){h.cssBefore.left=-b}else{if(j=="up"){h.cssBefore.top=c}else{if(j=="down"){h.cssBefore.top=-c}else{h.cssBefore.left=b}}}});e.animIn={left:0,top:0};e.animOut={opacity:1};e.cssBefore={top:0,left:0}};a.fn.cycle.transitions.uncover=function(f,g,e){var j=e.direction||"left";var b=f.css("overflow","hidden").width();var c=f.height();e.before.push(function(k,d,h){a.fn.cycle.commonReset(k,d,h,true,true,true);if(j=="right"){h.animOut.left=b}else{if(j=="up"){h.animOut.top=-c}else{if(j=="down"){h.animOut.top=c}else{h.animOut.left=-b}}}});e.animIn={left:0,top:0};e.animOut={opacity:1};e.cssBefore={top:0,left:0}};a.fn.cycle.transitions.toss=function(e,f,d){var b=e.css("overflow","visible").width();var c=e.height();d.before.push(function(j,g,h){a.fn.cycle.commonReset(j,g,h,true,true,true);if(!h.animOut.left&&!h.animOut.top){h.animOut={left:b*2,top:-c/2,opacity:0}}else{h.animOut.opacity=0}});d.cssBefore={left:0,top:0};d.animIn={left:0}};a.fn.cycle.transitions.wipe=function(u,n,e){var s=u.css("overflow","hidden").width();var k=u.height();e.cssBefore=e.cssBefore||{};var g;if(e.clip){if(/l2r/.test(e.clip)){g="rect(0px 0px "+k+"px 0px)"}else{if(/r2l/.test(e.clip)){g="rect(0px "+s+"px "+k+"px "+s+"px)"}else{if(/t2b/.test(e.clip)){g="rect(0px "+s+"px 0px 0px)"}else{if(/b2t/.test(e.clip)){g="rect("+k+"px "+s+"px "+k+"px 0px)"}else{if(/zoom/.test(e.clip)){var q=parseInt(k/2);var f=parseInt(s/2);g="rect("+q+"px "+f+"px "+q+"px "+f+"px)"}}}}}}e.cssBefore.clip=e.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var m=e.cssBefore.clip.match(/(\d+)/g);var v=parseInt(m[0]),c=parseInt(m[1]),o=parseInt(m[2]),j=parseInt(m[3]);e.before.push(function(x,h,t){if(x==h){return}var d=a(x),b=a(h);a.fn.cycle.commonReset(x,h,t,true,true,false);t.cssAfter.display="block";var r=1,l=parseInt((t.speedIn/13))-1;(function w(){var z=v?v-parseInt(r*(v/l)):0;var A=j?j-parseInt(r*(j/l)):0;var B=o<k?o+parseInt(r*((k-o)/l||1)):k;var y=c<s?c+parseInt(r*((s-c)/l||1)):s;b.css({clip:"rect("+z+"px "+y+"px "+B+"px "+A+"px)"});(r++<=l)?setTimeout(w,13):d.css("display","none")})()});e.cssBefore={display:"block",opacity:1,top:0,left:0};e.animIn={left:0};e.animOut={left:0}}})(jQuery);(function(a){var b={images:["http://dharmmotyar.googlecode.com/svn/trunk/images/spark.png","http://dharmmotyar.googlecode.com/svn/trunk/images/spark2.png","http://dharmmotyar.googlecode.com/svn/trunk/images/spark3.png","http://dharmmotyar.googlecode.com/svn/trunk/images/spark4.png"],total:20};a.firefly=function(c){a.firefly.settings=a.extend({},b,c);if(a.firefly.preloadImages()){for(i=0;i<a.firefly.settings.total;i++){a.firefly.fly(a.firefly.create(a.firefly.settings.images[a.firefly.random((a.firefly.settings.images).length)]))}}return};a.firefly.create=function(c){spark=a('<img class="lottery_star">').attr({src:c}).hide();a(document.body).append(spark);return spark.css({position:"absolute","z-index":a.firefly.random(1),top:a.firefly.random((a(window).height()-150)),left:a.firefly.random((a(window).width()-150))}).show()};a.firefly.fly=function(c){a(c).animate({top:a.firefly.random((a(window).height()-150)),left:a.firefly.random((a(window).width()-150))},((a.firefly.random(10)+5)*1100),function(){a.firefly.fly(c)})};a.firefly.preloadImages=function(){var c=new Object();for(i=0;i<(a.firefly.settings.images).length;i++){c[i]=new Image();c[i].src=a.firefly.settings.images[i]}return true};a.firefly.random=function(c){return Math.ceil(Math.random()*c)-1}})(jQuery);(function(a){if(!document.defaultView||!document.defaultView.getComputedStyle){var c=a.curCSS;a.curCSS=function(f,d,g){if(d==="background-position"){d="backgroundPosition"}if(d!=="backgroundPosition"||!f.currentStyle||f.currentStyle[d]){return c.apply(this,arguments)}var e=f.style;if(!g&&e&&e[d]){return e[d]}return c(f,"backgroundPositionX",g)+" "+c(f,"backgroundPositionY",g)}}var b=a.fn.animate;a.fn.animate=function(d){if("background-position" in d){d.backgroundPosition=d["background-position"];delete d["background-position"]}if("backgroundPosition" in d){d.backgroundPosition="("+d.backgroundPosition}return b.apply(this,arguments)};a.fx.step.backgroundPosition=function(e){if(!e.bgPosReady){var g=a.curCSS(e.elem,"backgroundPosition");if(!g){g="0px 0px"}g=toArray(g);e.start=[g[0],g[2]];var d=toArray(e.end);e.end=[d[0],d[2]];e.unit=[d[1],d[3]];e.bgPosReady=true}var f=[];f[0]=((e.end[0]-e.start[0])*e.pos)+e.start[0]+e.unit[0];f[1]=((e.end[1]-e.start[1])*e.pos)+e.start[1]+e.unit[1];e.elem.style.backgroundPosition=f[0]+" "+f[1]}})(jQuery);$(document).ready(function(){if(screen.width>960){$.firefly({images:["../img/lottery/fly1by1.png","../img/lottery/fly2by2.png"],total:20})}$(".tabs li:first-child").addClass("on");$(".tabs a").click(function(){$(".tabs li").removeClass("on");$(this).parent().toggleClass("on");var a;a=parseInt($(this).attr("class"));$("#tab-container").cycle(a);return false});$("#services figure a").hover(function(){$(this).parent().addClass("on")},function(){$(this).parent().removeClass("on")});$("#tab-container").cycle({fx:"scrollDown",speed:"slow",timeout:0,slideResize:true,containerResize:false,width:"80%",cleartypeNoBg:true,fit:1})});