/* * @author: jason * @date: 2017-04-08 21:08:57 * @last modified by: jason * @last modified time: 2017-05-02 11:45:27 */ // jquery.superslide.js (function($){$.fn.slide=function(options){$.fn.slide.deflunt={effect:"fade",autoplay:false,delaytime:500,intertime:2500,defaultindex:0,titcell:".hd li",maincell:".bd",trigger:"mouseover",scroll:1,vis:1,titonclassname:"on",autopage:false,prevcell:".prev",nextcell:".next"};return this.each(function(){var opts=$.extend({},$.fn.slide.deflunt,options);var index=opts.defaultindex;var prevbtn=$(opts.prevcell,$(this));var nextbtn=$(opts.nextcell,$(this));var navobj=$(opts.titcell,$(this));var navobjsize=navobj.size();var conbox=$(opts.maincell,$(this));var conboxsize=conbox.children().size();var conboxw=0;var slideh=0;var slidew=0;var selfw=0;var selfh=0;var autoplay=opts.autoplay;var inter=null;var oldindex=index;if(conboxsize"+(i+1)+"")}var navobj=$("li",navobj)}conbox.children().each(function(){conboxw=conboxw+$(this).outerwidth(true);if($(this).width()>selfw){selfw=$(this).width();slidew=$(this).outerwidth(true)}if($(this).height()>selfh){selfh=$(this).height();slideh=$(this).outerheight(true)}});switch(opts.effect){case"top":conbox.wrap('
').css({"position":"relative","padding":"0","margin":"0"}).children().css({"height":selfh});break;case"left":conbox.wrap('
').css({"width":conboxsize*slidew,"position":"relative","overflow":"hidden","padding":"0","margin":"0"}).children().css({"float":"left","width":selfw});break;case"leftloop":conbox.children().clone().appendto(conbox).clone().prependto(conbox);conbox.wrap('
').css({"width":conboxsize*slidew*3,"position":"relative","overflow":"hidden","padding":"0","margin":"0","left":-conboxsize*slidew}).children().css({"float":"left","width":selfw});break;case"leftmarquee":conbox.children().clone().appendto(conbox).clone().prependto(conbox);conbox.wrap('
').css({"width":conboxw*3,"position":"relative","overflow":"hidden","padding":"0","margin":"0","left":-conboxw}).children().css({"float":"left","width":"auto"});break;case"toploop":case"topmarquee":conbox.children().clone().appendto(conbox).clone().prependto(conbox);conbox.wrap('
').css({"height":conboxsize*slideh*3,"position":"relative","padding":"0","margin":"0","top":-conboxsize*slideh}).children().css({"height":selfh});break}var doplay=function(){switch(opts.effect){case"fade":case"top":case"left":if(index>=navobjsize){index=0}else{if(index<0){index=navobjsize-1}}break;case"leftmarquee":case"topmarquee":if(index>=2){index=1}else{if(index<0){index=0}}break;case"leftloop":case"toploop":var tempnum=index-oldindex;if(navobjsize>2&&tempnum==-(navobjsize-1)){tempnum=1}if(navobjsize>2&&tempnum==(navobjsize-1)){tempnum=-1}var scrollnum=math.abs(tempnum*opts.scroll);if(index>=navobjsize){index=0}else{if(index<0){index=navobjsize-1}}break}switch(opts.effect){case"fade":conbox.children().stop(true,true).eq(index).fadein(opts.delaytime).siblings().hide();break;case"top":conbox.stop(true,true).animate({"top":-index*opts.scroll*slideh},opts.delaytime);break;case"left":conbox.stop(true,true).animate({"left":-index*opts.scroll*slidew},opts.delaytime);break;case"leftloop":if(tempnum<0){conbox.stop(true,true).animate({"left":-(conboxsize-scrollnum)*slidew},opts.delaytime,function(){for(var i=0;i=0){for(var i=0;i=0){for(var i=0;i