");
dt.next().appendTo(container);
dt.prependTo(container);
container.appendTo(ticker);
});
//hide the scrollbar
ticker.css("overflow", "hidden");
//animator function
function animator(currentItem) {
//work out new anim duration
var distance = currentItem.height();
duration = (distance + parseInt(currentItem.css("marginTop"))) / 0.025;
//animate the first child of the ticker
currentItem.animate({ marginTop: -distance }, duration, "linear", function() {
//move current item to the bottom
currentItem.appendTo(currentItem.parent()).css("marginTop", 0);
//recurse
animator(currentItem.parent().children(":first"));
});
};
//start the ticker
animator(ticker.children(":first"));
//set mouseenter
ticker.mouseenter(function() {
//stop current animation
ticker.children().stop();
});
//set mouseleave
ticker.mouseleave(function() {
//resume animation
animator(ticker.children(":first"));
});
});
$(function() {
//cache the ticker
var ticker = $("#ticker2");
//wrap dt:dd pairs in divs
ticker.children().filter("div").each(function() {
var dt = $(this),
container = $("
");
dt.next().appendTo(container);
dt.prependTo(container);
container.appendTo(ticker);
});
//hide the scrollbar
ticker.css("overflow", "hidden");
//animator function
function animator(currentItem) {
//work out new anim duration
var distance = currentItem.height();
duration = (distance + parseInt(currentItem.css("marginTop"))) / 0.025;
//animate the first child of the ticker
currentItem.animate({ marginTop: -distance }, duration, "linear", function() {
//move current item to the bottom
currentItem.appendTo(currentItem.parent()).css("marginTop", 0);
//recurse
animator(currentItem.parent().children(":first"));
});
};
//start the ticker
animator(ticker.children(":first"));
//set mouseenter
ticker.mouseenter(function() {
//stop current animation
ticker.children().stop();
});
//set mouseleave
ticker.mouseleave(function() {
//resume animation
animator(ticker.children(":first"));
});
});
/* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
*
* Version: 3.0.2
*
* Requires: 1.2.2+
*/
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);
(function($){
var CarouselEvo = function(element, options){
var settings = $.extend({}, $.fn.carousel.defaults, options),
self = this,
element = $(element),
carousel = element.children('.slides');
carousel.children('div').addClass('slideItem');
var slideItems = carousel.children('.slideItem'),
slideImage = slideItems.find('img'),
currentSlide = 0,
targetSlide = 0,
numberSlides = slideItems.length,
isAnimationRunning = false,
pause = true ;
videos = {
youtube: {
reg: /youtube\.com\/watch/i,
split: '=',
index: 1,
url:'http://www.youtube.com/embed/%id%?autoplay=1&fs=1&rel=0'},
vimeo: {
reg: /vimeo\.com/i,
split: '/',
index: 3,
url: 'http://player.vimeo.com/video/%id%?portrait=0&autoplay=1'}
};
this.current = currentSlide;
this.length = numberSlides;
this.init = function(){
var o = settings ;
initSlides();
if (o.directionNav == true){
initDirectionButton();
}
if (o.reflection == true){
initReflection();
}
if (o.shadow == true){
initShadow();
}
if (o.description == true){
initDesc();
}
if (o.autoplay == true){
runAutoplay();
}
initVideo();
};
/* _________________________________ */
/* IMAGE */
/* _________________________________ */
var setImageSize = function(p){
var o = settings,
n = numberSlides ,
w = o.frontWidth,
h = o.frontHeight,
ret;
if (p != 0){
if (o.hAlign == 'center') {
if (p > 0 && p <= Math.ceil((n-1)/2)){
var front = setImageSize(p-1);
w = o.backZoom * front.width ;
h = o.backZoom * front.height ;
}
else {
var sz = setImageSize(n-p);
w = sz.width;
h = sz.height;
}
}
else {
//left & right
if (p == (n -1)){
w = o.frontWidth / o.backZoom;
h = o.frontHeight / o.backZoom;
}
else{
var front = setImageSize(p-1);
w = o.backZoom * front.width ;
h = o.backZoom * front.height ;
}
}
}
return ret = {width:w, height:h};
};
/* _______________________________ */
/* SLIDE */
/* _______________________________ */
var setSlideSize = function(p){
var o = settings,
n = numberSlides ,
w = o.frontWidth,
h = o.frontHeight + reflectionHeight(p) + shadowHeight(p),
ret;
if (p != 0){
if (o.hAlign == 'center'){
if (p > 0 && p <= Math.ceil((n-1)/2)){
var front = setImageSize(p-1);
w = o.backZoom * front.width ;
h = (o.backZoom * front.height) + reflectionHeight(p) + shadowHeight(p);
}
else {
var sz = setSlideSize(n - p);
w = sz.width;
h = sz.height;
}
}
else {
//left & right
if (p == (n -1)){
w = o.frontWidth / o.backZoom;
h = (o.frontHeight/o.backZoom) + reflectionHeight(p) + shadowHeight(p);
}
else{
var front = setImageSize(p-1);
w = o.backZoom * front.width ;
h = (o.backZoom * front.height) + reflectionHeight(p) + shadowHeight(p);
}
}
}
return ret = {width:w, height:h};
};
var getMargin = function(p){
var o = settings,
vm, hm, ret,
iz = setImageSize(p);
vm = iz.height * o.vMargin;
hm = iz.width * o.hMargin;
return ret = {vMargin:vm, hMargin:hm};
};
var centerPos = function(p){
var o = settings,
c = topPos(p-1) + (setImageSize(p-1).height - setImageSize(p).height)/2;
if (o.hAlign != 'center'){
if (p == (numberSlides -1)){
c = o.top - ((setImageSize(p).height - setImageSize(0).height)/2);
}
}
return c;
};
var topPos = function(p){
var o = settings,
t = o.top,
vm = getMargin(p).vMargin ;
if (o.vAlign == 'bottom'){
t = o.bottom;
}
if (p != 0){
if (o.hAlign == 'center'){
if (p > 0 && p <= Math.ceil((numberSlides-1)/2)){
if (o.vAlign == 'center'){
t = centerPos(p);
}
else {
t = centerPos(p) + vm;
}
}
else{
t = topPos(numberSlides -p);
}
}
else {
if (p == (numberSlides -1)){
if (o.vAlign == 'center'){
t = centerPos(p);
}
else {
t = centerPos(p) - vm;
}
}
else{
if (o.vAlign == 'center'){
t = centerPos(p);
}
else {
t = centerPos(p) + vm ;
}
}
}
}
return t;
};
var horizonPos = function(p){
var o = settings,
n = numberSlides ,
hPos,
mod = n % 2,
endSlide = n / 2,
hm = getMargin(p).hMargin;
if (p == 0){
if (o.hAlign == 'center'){
hPos = (o.carouselWidth - o.frontWidth)/2;
}
else {
hPos = o.left ;
if (o.hAlign == 'right'){
hPos = o.right;
}
}
}
else {
if (o.hAlign == 'center'){
if (p > 0 && p <= Math.ceil((n-1)/2)){
hPos = horizonPos(p-1) - hm;
if (mod == 0){
if (p == endSlide){
hPos = (o.carouselWidth - setSlideSize(p).width)/2 ;
}
}
}
else{
hPos = o.carouselWidth - horizonPos(n-p) - setSlideSize(p).width;
}
}
else {
if (p == (n -1)){
hPos = horizonPos(0) - (setSlideSize(p).width - setSlideSize(0).width)/2 - hm;
}
else{
hPos = horizonPos(p-1) + (setSlideSize(p-1).width - setSlideSize(p).width)/2 + hm;
}
}
}
return hPos;
};
var setOpacity = function(p){
var o = settings,
n = numberSlides ,
opc = 1,
hiddenSlide = n - o.slidesPerScroll;
if (hiddenSlide < 2){
hiddenSlide = 2;
}
if (o.hAlign == 'center'){
var s1 = (n-1)/2,
hs2 = hiddenSlide / 2,
lastSlide1 = (s1+1) - hs2,
lastSlide2 = s1 + hs2;
if (p == 0){
opc = 1;
}
else {
opc = o.backOpacity;
if (p == lastSlide1 || p == lastSlide2){
opc = 0.8;
} else if (p > lastSlide1 || p < lastSlide2) {
opc = 0.9;
}
}
}
else { //left & right
if (p == 0){
opc = 1;
}
else {
opc = o.backOpacity;
if (!(p < (n - hiddenSlide))){
opc = 0 ;
}
}
}
return opc;
};
var setSlidePosition = function(p) {
var pos = new Array(),
o = settings,
n = numberSlides ;
for (var i = 0; i < n; i++){
var sz = setSlideSize(i);
if (o.hAlign == 'left'){
pos[i] = {width:sz.width, height:sz.height, top:topPos(i), left:horizonPos(i), opacity:setOpacity(i)};
if (o.vAlign == 'bottom'){
pos[i] = {width:sz.width, height:sz.height, bottom:topPos(i), left:horizonPos(i), opacity:setOpacity(i)} ;
}
}
else {
pos[i] = {width:sz.width, height:sz.height, top:topPos(i), right:horizonPos(i), opacity:setOpacity(i)} ;
if (o.vAlign == 'bottom'){
pos[i] = {width:sz.width, height:sz.height, bottom:topPos(i), right:horizonPos(i), opacity:setOpacity(i)} ;
}
}
}
return pos[p];
};
// returns the slide # at location i of the ith image
var slidePos = function(i) {
var cs = currentSlide,
pos = i - cs;
if (i < cs){
pos += numberSlides ;
}
return pos;
};
//returns z-index
var zIndex = function(i){
var z,
n = numberSlides ,
hAlign = settings.hAlign;
if (hAlign == 'left' || hAlign == 'right'){
if (i == (n - 1)){
z = n - 1;
}
else {
z = n - (2+i);
}
}
else {
if (i >= 0 && i <= ((n - 1)/2)){
z = (n - 1) - i;
}
else {
z = i - 1 ;
}
}
return z;
};
var slidesMouseOver = function(event){
var o = settings ;
if (o.autoplay == true && o.pauseOnHover == true){
stopAutoplay();
}
};
var slidesMouseOut = function(event){
var o = settings ;
if (o.autoplay == true && o.pauseOnHover == true){
if (pause == true){
runAutoplay();
}
}
};
var initSlides = function(){
var o = settings,
n = numberSlides,
images = slideImage ;
carousel
.css({'width':o.carouselWidth+'px', 'height':o.carouselHeight+'px'})
.bind('mouseover', slidesMouseOver)
.bind('mouseout', slidesMouseOut);
for (var i = 0; i < n; i++){
var item = slideItems.eq(i);
var tempPos = {};
for (var key in setSlidePosition(slidePos(i))) {
if (key != "opacity") {
tempPos[key] = setSlidePosition(slidePos(i))[key];
}
}
item
.css(tempPos)
.bind('click', slideClick);
item.find(".cover").css({"opacity": 1- setSlidePosition(slidePos(i)).opacity});
slideItems.eq(slidePos(i)).css({'z-index':zIndex(i)});
images.eq(i).css(setImageSize(slidePos(i)));
var op = item.css('opacity');
if (op == 0){
item.hide();
}
else {
item.show();
}
}
// mouse wheel navigation
if (o.mouse == true){
carousel.mousewheel(function(event, delta){
if (delta > 0){
goTo(currentSlide-1, true, false);
return false ;
}
else if (delta < 0){
goTo(currentSlide+1, true, false);
return false ;
}
});
}
};
var hideItem = function(slide){
var op = slide.css('opacity');
if (op == 0){ slide.hide();}
};
var goTo = function(index, isStopAutoplay, isPause){
if (isAnimationRunning == true){return;}
var o = settings,
n = numberSlides ;
if (isStopAutoplay == true){
stopAutoplay();
}
targetSlide = index;
if (targetSlide == n){ targetSlide = 0; }
if (targetSlide == -1){ targetSlide = n - 1; }
o.before(self);
animateSlide();
pause = isPause ;
};
var animateSlide = function(){
var o = settings,
n = numberSlides;
if (isAnimationRunning == true ){ return ; }
if (currentSlide == targetSlide){
isAnimationRunning = false ;
return ;
}
isAnimationRunning = true ;
hideDesc(currentSlide);
// direction
if (currentSlide > targetSlide) {
var forward = n - currentSlide + targetSlide,
backward = currentSlide - targetSlide;
}
else {
var forward = targetSlide - currentSlide,
backward = currentSlide + n - targetSlide ;
}
if (forward > backward) {
dir = -1;
}
else {
dir = 1;
}
currentSlide += dir;
if (currentSlide == n) { currentSlide = 0; }
if (currentSlide == -1) { currentSlide = n - 1; }
hideVideoOverlay();
showDesc(currentSlide);
//animation
for (var i = 0; i < n; i++){
animateImage(i);
}
};
var animateImage = function(i){
var o = settings,
item = slideItems.eq(i),
pos = slidePos(i);
var tempPos = {};
for (var key in setSlidePosition(pos)) {
if (key != "opacity") {
tempPos[key] = setSlidePosition(pos)[key];
}
}
//console.log(setSlidePosition(pos));
item.show();
item.animate(tempPos, o.speed, 'linear', function(){
hideItem($(this));
if (i == numberSlides - 1){
isAnimationRunning = false ;
if (currentSlide != targetSlide){
animateSlide();
}
else {
self.current = currentSlide ;
showVideoOverlay(currentSlide);
o.after(self);
}
}
});
item.css({'z-index':zIndex(pos)});
slideImage.eq(i).animate(setImageSize(pos), o.speed, 'linear');
item.find(".cover").eq(i).animate(setImageSize(pos), o.speed, 'linear');
item.find(".cover").animate({"opacity": 1 - setSlidePosition(slidePos(i)).opacity});
if (o.reflection == true){
animateReflection(o, item, i);
}
if (o.shadow == true){
animateShadow(o, item, i);
}
};
var slideClick = function(event){
var $this = $(this);
if ($this.index() != currentSlide){
goTo($this.index(), true, false);
return false;
}
};
/* ________________________________ */
/* REFLECTION */
/* ________________________________ */
var reflectionHeight = function(p){
var h = 0,
o = settings ;
if (o.reflection == true){
h = o.reflectionHeight * setImageSize(p).height;
}
h = 0;
return h ;
};
var initReflection = function(){
var o = settings ,
items = slideItems ,
images = slideImage ,
n = numberSlides,
opc = o.reflectionOpacity,
start = 'rgba('+o.reflectionColor+','+ opc +')',
end = 'rgba('+o.reflectionColor+',1)';
var style = '';
$(style).appendTo('head');
for (var i=0; i < n; i++){
var src = images.eq(i).attr('src'),
sz = setImageSize(i);
$('
')
.css({'position':'absolute', 'margin':'0', 'padding':'0', 'border':'none', 'overflow':'hidden', 'left':'0',
'top':setImageSize(i).height+'px', 'width':'100%', 'height':reflectionHeight(i)})
.appendTo(items.eq(i))
.append($('

').css({'width':sz.width+'px', 'height':sz.height+'px', 'left':'0','margin':'0',
'padding':'0', 'border':'none', '-moz-transform':'rotate(180deg) scale(-1,1)',
'-webkit-transform':'rotate(180deg) scale(-1,1)', '-o-transform':'rotate(180deg) scale(-1,1)',
'transform':'rotate(180deg) scale(-1,1)', 'filter': 'progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)',
'-ms-filter': 'progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)'}))
.append('
');
}
};
var animateReflection = function(option, item, i){
var ref = item.children('.reflection'),
speed = option.speed,
sz = setImageSize(slidePos(i));
ref.animate({'top':sz.height+'px', 'height':reflectionHeight(slidePos(i))}, speed, 'linear');
ref.children('img').animate(sz, speed, 'linear');
};
/* ________________________________ */
/* SHADOW */
/* ________________________________ */
var shadowHeight = function(p){
var sh = 0;
if (settings.shadow == true){
sh = 0.1 * setImageSize(p).height;
}
sh = 0;
return sh ;
};
var shadowMiddleWidth = function(p){
var w,
s = slideItems.eq(p).find('.shadow'),
sL = s.children('.shadowLeft'),
sR = s.children('.shadowRight'),
sM = s.children('.shadowMiddle');
return w = setImageSize(p).width - (sL.width() + sR.width());
};
var initShadow = function(){
var items = slideItems,
n = numberSlides,
sWidth = setImageSize(0).width,
sInner = '
';
if (settings.hAlign != 'center'){
sWidth = setImageSize(n-1).width;
}
for (var i = 0; i < n; i++){
var item = items.eq(i);
$('
')
.css({'width':sWidth+'px', 'z-index':'-1', 'position':'absolute', 'margin':'0', 'padding':'0', 'border':'none',
'overflow':'hidden', 'left':'0', 'bottom':'0'})
.append(sInner)
.appendTo(item)
.children('div').css({'position':'relative', 'float':'left'});
item.find('.shadow').children('.shadowMiddle').width(shadowMiddleWidth(i));
}
};
var animateShadow = function(option, item, i){
item.find('.shadow').children('.shadowMiddle').animate({'width':shadowMiddleWidth(slidePos(i))+'px'}, option.speed, 'linear');
};
/* ________________________________ */
/* DIRECTION BUTTONS */
/* ________________________________ */
var initDirectionButton = function(){
var el = element ;
el.append('
');
el.children('.nextButton').bind('click', function(event){
goTo(currentSlide+1, true, false);
});
el.children('.prevButton').bind('click', function(event){
goTo(currentSlide-1, true, false);
});
};
/* ________________________________ */
/* DESCRIPTION */
/* ________________________________ */
var initDesc = function(){
var desc = $(settings.descriptionContainer),
w = desc.width(),
h = desc.height(),
descItems = desc.children('div'),
n = descItems.length;
for (var i = 0; i < n; i++){
descItems.eq(i)
//.hide()
.css({'position':'absolute', 'top':'0', 'left':'0'});
}
descItems.eq(0).show();
};
var hideDesc = function(index){
var o = settings ;
if (o.description == true){
var desc = $(o.descriptionContainer);
desc.children('div').eq(index).hide();
}
};
var showDesc = function(index){
var o = settings ;
if (o.description == true){
var desc = $(o.descriptionContainer);
desc.children('div').eq(index).show();
}
};
/* ___________________________________ */
/* VIDEO */
/* ___________________________________ */
var initSpinner = function(){
var sz = setImageSize(0);
$('
')
.hide()
.css(setSlidePosition(0))
.css({'width':sz.width+'px', 'height':sz.height+'px', 'z-index':numberSlides+3, 'position':'absolute', 'cursor':'pointer',
'overflow':'hidden', 'padding':'0', 'margin':'0', 'border':'none'})
.appendTo(carousel);
};
var initVideo = function(){
initSpinner();
var sz = setImageSize(0);
$('
')
.hide()
.css(setSlidePosition(0))
.css({'width':sz.width+'px', 'height':sz.height+'px', 'z-index':numberSlides+2, 'position':'absolute',
'cursor':'pointer', 'overflow':'hidden', 'padding':'0', 'margin':'0', 'border':'none'})
.bind('click', videoOverlayClick)
.appendTo(carousel);
showVideoOverlay(currentSlide);
};
var showVideoOverlay = function(index){
if (slideItems.eq(index).children('a').hasClass('video')){
carousel.children('.videoOverlay').show();
}
};
var hideVideoOverlay = function(){
var car = carousel;
car.children('.videoOverlay')
.hide()
.children().remove();
car.children('.spinner').hide();
};
var getVideo = function(url){
var types = videos,
src;
$.each(types, function(i, e){
if (url.match(e.reg)){
var id = url.split(e.split)[e.index].split('?')[0].split('&')[0];
src = e.url.replace("%id%", id);
}
});
return src ;
};
var addVideoContent = function(){
var vo = carousel.children('.videoOverlay'),
url = slideItems.eq(currentSlide).children('a').attr('href'),
src = getVideo(url);
$('
')
.attr({'width':vo.width()+'px', 'height':vo.height()+'px', 'src':src, 'frameborder':'0'})
.bind('load', videoLoad)
.appendTo(vo);
};
var videoOverlayClick = function(event){
addVideoContent();
carousel.children('.spinner').show();
$(this).hide();
if (settings.autoplay == true){
stopAutoplay();
pause = false ;
}
};
var videoLoad = function(event){
var car = carousel;
car.children('.videoOverlay').show();
car.children('.spinner').hide();
};
/* ________________________________ */
/* AUTOPLAY */
/* ________________________________ */
var runAutoplay = function(){
intervalProcess = setInterval(function(){
goTo(currentSlide+1, false, true);
}, settings.autoplayInterval);
};
var stopAutoplay = function(){
if (settings.autoplay == true){
clearInterval(intervalProcess);
return ;
}
};
//public api
this.prev = function(){
goTo(currentSlide-1, true, false);
};
this.next = function(){
goTo(currentSlide+1, true, false);
};
this.goTo = function(index){
goTo(index, true, false);
};
this.pause = function(){
stopAutoplay();
pause = false ;
};
this.resume = function(){
if (settings.autoplay == true){
runAutoplay();
}
};
};
//plugin
$.fn.carousel = function(options){
var returnArr = [];
for(var i=0; i < this.length; i++){
if(!this[i].carousel){
this[i].carousel = new CarouselEvo(this[i], options);
this[i].carousel.init();
}
returnArr.push(this[i].carousel);
}
return returnArr.length > 1 ? returnArr : returnArr[0];
};
//调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸调整尺寸
//default settings
$.fn.carousel.defaults = {
hAlign:'center',
vAlign:'center',
hMargin:0.5,
vMargin:0.5,
frontWidth:400,
frontHeight:300,
carouselWidth:1020,
carouselHeight:360,
left:0,
right:0,
top:0,
bottom:0,
backZoom:0.83,
slidesPerScroll:5,
speed:500,
directionNav:false,
autoplay:true,
autoplayInterval:5000,
pauseOnHover:true,
mouse:true,
shadow:false,
reflection:false,
reflectionHeight:0.2,
reflectionOpacity:0.5,
reflectionColor:'255,255,255',
description:false, descriptionContainer:'.description',
backOpacity:1,
before: function(carousel){},
after: function(carousel){}
};
})(jQuery);
//--------------------------------滑动门 js-----------------------------------//
/*插件 superSlide切换 开始*/
(function (a) { a.fn.slide = function (b) { return a.fn.slide.defaults = { type: "slide", effect: "fade", autoPlay: !1, delayTime: 500, interTime: 2500, triggerTime: 150, defaultIndex: 0, titCell: ".hd li", mainCell: ".bd", targetCell: null, trigger: "mouseover", scroll: 1, vis: 1, titOnClassName: "on", autoPage: !1, prevCell: ".prev", nextCell: ".next", pageStateCell: ".pageState", opp: !1, pnLoop: !0, easing: "swing", startFun: null, endFun: null, switchLoad: null, playStateCell: ".playState", mouseOverStop: !0, defaultPlay: !0, returnDefault: !1 }, this.each(function () { var c = a.extend({}, a.fn.slide.defaults, b), d = a(this), e = c.effect, f = a(c.prevCell, d), g = a(c.nextCell, d), h = a(c.pageStateCell, d), i = a(c.playStateCell, d), j = a(c.titCell, d), k = j.size(), l = a(c.mainCell, d), m = l.children().size(), n = c.switchLoad, o = a(c.targetCell, d), p = parseInt(c.defaultIndex), q = parseInt(c.delayTime), r = parseInt(c.interTime); parseInt(c.triggerTime); var P, t = parseInt(c.scroll), u = parseInt(c.vis), v = "false" == c.autoPlay || 0 == c.autoPlay ? !1 : !0, w = "false" == c.opp || 0 == c.opp ? !1 : !0, x = "false" == c.autoPage || 0 == c.autoPage ? !1 : !0, y = "false" == c.pnLoop || 0 == c.pnLoop ? !1 : !0, z = "false" == c.mouseOverStop || 0 == c.mouseOverStop ? !1 : !0, A = "false" == c.defaultPlay || 0 == c.defaultPlay ? !1 : !0, B = "false" == c.returnDefault || 0 == c.returnDefault ? !1 : !0, C = 0, D = 0, E = 0, F = 0, G = c.easing, H = null, I = null, J = null, K = c.titOnClassName, L = j.index(d.find("." + K)), M = p = defaultIndex = -1 == L ? p : L, N = p, O = m >= u ? 0 != m % t ? m % t : t : 0, Q = "leftMarquee" == e || "topMarquee" == e ? !0 : !1, R = function () { a.isFunction(c.startFun) && c.startFun(p, k, d, a(c.titCell, d), l, o, f, g) }, S = function () { a.isFunction(c.endFun) && c.endFun(p, k, d, a(c.titCell, d), l, o, f, g) }, T = function () { j.removeClass(K), A && j.eq(defaultIndex).addClass(K) }; if ("menu" == c.type) return A && j.removeClass(K).eq(p).addClass(K), j.hover(function () { P = a(this).find(c.targetCell); var b = j.index(a(this)); I = setTimeout(function () { switch (p = b, j.removeClass(K).eq(p).addClass(K), R(), e) { case "fade": P.stop(!0, !0).animate({ opacity: "show" }, q, G, S); break; case "slideDown": P.stop(!0, !0).animate({ height: "show" }, q, G, S) } }, c.triggerTime) }, function () { switch (clearTimeout(I), e) { case "fade": P.animate({ opacity: "hide" }, q, G); break; case "slideDown": P.animate({ height: "hide" }, q, G) } }), B && d.hover(function () { clearTimeout(J) }, function () { J = setTimeout(T, q) }), void 0; if (0 == k && (k = m), Q && (k = 2), x) { if (m >= u) if ("leftLoop" == e || "topLoop" == e) k = 0 != m % t ? (0 ^ m / t) + 1 : m / t; else { var U = m - u; k = 1 + parseInt(0 != U % t ? U / t + 1 : U / t), 0 >= k && (k = 1) } else k = 1; j.html(""); var V = ""; if (1 == c.autoPage || "true" == c.autoPage) for (var W = 0; k > W; W++) V += "
" + (W + 1) + ""; else for (var W = 0; k > W; W++) V += c.autoPage.replace("$", W + 1); j.html(V); var j = j.children() } if (m >= u) { l.children().each(function () { a(this).width() > E && (E = a(this).width(), D = a(this).outerWidth(!0)), a(this).height() > F && (F = a(this).height(), C = a(this).outerHeight(!0)) }); var X = l.children(), Y = function () { for (var a = 0; u > a; a++) X.eq(a).clone().addClass("clone").appendTo(l); for (var a = 0; O > a; a++) X.eq(m - a - 1).clone().addClass("clone").prependTo(l) }; switch (e) { case "fold": l.css({ position: "relative", width: D, height: C }).children().css({ position: "absolute", width: E, left: 0, top: 0, display: "none" }); break; case "top": l.wrap('
').css({ top: -(p * t) * C, position: "relative", padding: "0", margin: "0" }).children().css({ height: F }); break; case "left": l.wrap('
').css({ width: m * D, left: -(p * t) * D, position: "relative", overflow: "hidden", padding: "0", margin: "0" }).children().css({ "float": "left", width: E }); break; case "leftLoop": case "leftMarquee": Y(), l.wrap('
').css({ width: (m + u + O) * D, position: "relative", overflow: "hidden", padding: "0", margin: "0", left: -(O + p * t) * D }).children().css({ "float": "left", width: E }); break; case "topLoop": case "topMarquee": Y(), l.wrap('
').css({ height: (m + u + O) * C, position: "relative", padding: "0", margin: "0", top: -(O + p * t) * C }).children().css({ height: F }) } } var Z = function (a) { var b = a * t; return a == k ? b = m : -1 == a && 0 != m % t && (b = -m % t), b }, $ = function (b) { var c = function (c) { for (var d = c; u + c > d; d++) b.eq(d).find("img[" + n + "]").each(function () { var b = a(this); if (b.attr("src", b.attr(n)).removeAttr(n), l.find(".clone")[0]) for (var c = l.children(), d = 0; c.size() > d; d++) c.eq(d).find("img[" + n + "]").each(function () { a(this).attr(n) == b.attr("src") && a(this).attr("src", a(this).attr(n)).removeAttr(n) }) }) }; switch (e) { case "fade": case "fold": case "top": case "left": case "slideDown": c(p * t); break; case "leftLoop": case "topLoop": c(O + Z(N)); break; case "leftMarquee": case "topMarquee": var d = "leftMarquee" == e ? l.css("left").replace("px", "") : l.css("top").replace("px", ""), f = "leftMarquee" == e ? D : C, g = O; if (0 != d % f) { var h = Math.abs(0 ^ d / f); g = 1 == p ? O + h : O + h - 1 } c(g) } }, _ = function (a) { if (!A || M != p || a || Q) { if (Q ? p >= 1 ? p = 1 : 0 >= p && (p = 0) : (N = p, p >= k ? p = 0 : 0 > p && (p = k - 1)), R(), null != n && $(l.children()), o[0] && (P = o.eq(p), null != n && $(o), "slideDown" == e ? (o.not(P).stop(!0, !0).slideUp(q), P.slideDown(q, G, function () { l[0] || S() })) : (o.not(P).stop(!0, !0).hide(), P.animate({ opacity: "show" }, q, function () { l[0] || S() }))), m >= u) switch (e) { case "fade": l.children().stop(!0, !0).eq(p).animate({ opacity: "show" }, q, G, function () { S() }).siblings().hide(); break; case "fold": l.children().stop(!0, !0).eq(p).animate({ opacity: "show" }, q, G, function () { S() }).siblings().animate({ opacity: "hide" }, q, G); break; case "top": l.stop(!0, !1).animate({ top: -p * t * C }, q, G, function () { S() }); break; case "left": l.stop(!0, !1).animate({ left: -p * t * D }, q, G, function () { S() }); break; case "leftLoop": var b = N; l.stop(!0, !0).animate({ left: -(Z(N) + O) * D }, q, G, function () { -1 >= b ? l.css("left", -(O + (k - 1) * t) * D) : b >= k && l.css("left", -O * D), S() }); break; case "topLoop": var b = N; l.stop(!0, !0).animate({ top: -(Z(N) + O) * C }, q, G, function () { -1 >= b ? l.css("top", -(O + (k - 1) * t) * C) : b >= k && l.css("top", -O * C), S() }); break; case "leftMarquee": var c = l.css("left").replace("px", ""); 0 == p ? l.animate({ left: ++c }, 0, function () { l.css("left").replace("px", "") >= 0 && l.css("left", -m * D) }) : l.animate({ left: --c }, 0, function () { -(m + O) * D >= l.css("left").replace("px", "") && l.css("left", -O * D) }); break; case "topMarquee": var d = l.css("top").replace("px", ""); 0 == p ? l.animate({ top: ++d }, 0, function () { l.css("top").replace("px", "") >= 0 && l.css("top", -m * C) }) : l.animate({ top: --d }, 0, function () { -(m + O) * C >= l.css("top").replace("px", "") && l.css("top", -O * C) }) } j.removeClass(K).eq(p).addClass(K), M = p, y || (g.removeClass("nextStop"), f.removeClass("prevStop"), 0 == p && f.addClass("prevStop"), p == k - 1 && g.addClass("nextStop")), h.html("
" + (p + 1) + "/" + k) } }; A && _(!0), B && d.hover(function () { clearTimeout(J) }, function () { J = setTimeout(function () { p = defaultIndex, A ? _() : "slideDown" == e ? P.slideUp(q, T) : P.animate({ opacity: "hide" }, q, T), M = p }, 300) }); var ab = function (a) { H = setInterval(function () { w ? p-- : p++, _() }, a ? a : r) }, bb = function (a) { H = setInterval(_, a ? a : r) }, cb = function () { z || (clearInterval(H), ab()) }, db = function () { (y || p != k - 1) && (p++, _(), Q || cb()) }, eb = function () { (y || 0 != p) && (p--, _(), Q || cb()) }, fb = function () { clearInterval(H), Q ? bb() : ab(), i.removeClass("pauseState") }, gb = function () { clearInterval(H), i.addClass("pauseState") }; if (v ? Q ? (w ? p-- : p++, bb(), z && l.hover(gb, fb)) : (ab(), z && d.hover(gb, fb)) : (Q && (w ? p-- : p++), i.addClass("pauseState")), i.click(function () { i.hasClass("pauseState") ? fb() : gb() }), "mouseover" == c.trigger ? j.hover(function () { var a = j.index(this); I = setTimeout(function () { p = a, _(), cb() }, c.triggerTime) }, function () { clearTimeout(I) }) : j.click(function () { p = j.index(this), _(), cb() }), Q) { if (g.mousedown(db), f.mousedown(eb), y) { var hb, ib = function () { hb = setTimeout(function () { clearInterval(H), bb(0 ^ r / 10) }, 150) }, jb = function () { clearTimeout(hb), clearInterval(H), bb() }; g.mousedown(ib), g.mouseup(jb), f.mousedown(ib), f.mouseup(jb) } "mouseover" == c.trigger && (g.hover(db, function () { }), f.hover(eb, function () { })) } else g.click(db), f.click(eb) }) } })(jQuery), jQuery.easing.jswing = jQuery.easing.swing, jQuery.extend(jQuery.easing, { def: "easeOutQuad", swing: function (a, b, c, d, e) { return jQuery.easing[jQuery.easing.def](a, b, c, d, e) }, easeInQuad: function (a, b, c, d, e) { return d * (b /= e) * b + c }, easeOutQuad: function (a, b, c, d, e) { return -d * (b /= e) * (b - 2) + c }, easeInOutQuad: function (a, b, c, d, e) { return 1 > (b /= e / 2) ? d / 2 * b * b + c : -d / 2 * (--b * (b - 2) - 1) + c }, easeInCubic: function (a, b, c, d, e) { return d * (b /= e) * b * b + c }, easeOutCubic: function (a, b, c, d, e) { return d * ((b = b / e - 1) * b * b + 1) + c }, easeInOutCubic: function (a, b, c, d, e) { return 1 > (b /= e / 2) ? d / 2 * b * b * b + c : d / 2 * ((b -= 2) * b * b + 2) + c }, easeInQuart: function (a, b, c, d, e) { return d * (b /= e) * b * b * b + c }, easeOutQuart: function (a, b, c, d, e) { return -d * ((b = b / e - 1) * b * b * b - 1) + c }, easeInOutQuart: function (a, b, c, d, e) { return 1 > (b /= e / 2) ? d / 2 * b * b * b * b + c : -d / 2 * ((b -= 2) * b * b * b - 2) + c }, easeInQuint: function (a, b, c, d, e) { return d * (b /= e) * b * b * b * b + c }, easeOutQuint: function (a, b, c, d, e) { return d * ((b = b / e - 1) * b * b * b * b + 1) + c }, easeInOutQuint: function (a, b, c, d, e) { return 1 > (b /= e / 2) ? d / 2 * b * b * b * b * b + c : d / 2 * ((b -= 2) * b * b * b * b + 2) + c }, easeInSine: function (a, b, c, d, e) { return -d * Math.cos(b / e * (Math.PI / 2)) + d + c }, easeOutSine: function (a, b, c, d, e) { return d * Math.sin(b / e * (Math.PI / 2)) + c }, easeInOutSine: function (a, b, c, d, e) { return -d / 2 * (Math.cos(Math.PI * b / e) - 1) + c }, easeInExpo: function (a, b, c, d, e) { return 0 == b ? c : d * Math.pow(2, 10 * (b / e - 1)) + c }, easeOutExpo: function (a, b, c, d, e) { return b == e ? c + d : d * (-Math.pow(2, -10 * b / e) + 1) + c }, easeInOutExpo: function (a, b, c, d, e) { return 0 == b ? c : b == e ? c + d : 1 > (b /= e / 2) ? d / 2 * Math.pow(2, 10 * (b - 1)) + c : d / 2 * (-Math.pow(2, -10 * --b) + 2) + c }, easeInCirc: function (a, b, c, d, e) { return -d * (Math.sqrt(1 - (b /= e) * b) - 1) + c }, easeOutCirc: function (a, b, c, d, e) { return d * Math.sqrt(1 - (b = b / e - 1) * b) + c }, easeInOutCirc: function (a, b, c, d, e) { return 1 > (b /= e / 2) ? -d / 2 * (Math.sqrt(1 - b * b) - 1) + c : d / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + c }, easeInElastic: function (a, b, c, d, e) { var f = 1.70158, g = 0, h = d; if (0 == b) return c; if (1 == (b /= e)) return c + d; if (g || (g = .3 * e), Math.abs(d) > h) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); return -(h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g)) + c }, easeOutElastic: function (a, b, c, d, e) { var f = 1.70158, g = 0, h = d; if (0 == b) return c; if (1 == (b /= e)) return c + d; if (g || (g = .3 * e), Math.abs(d) > h) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); return h * Math.pow(2, -10 * b) * Math.sin((b * e - f) * 2 * Math.PI / g) + d + c }, easeInOutElastic: function (a, b, c, d, e) { var f = 1.70158, g = 0, h = d; if (0 == b) return c; if (2 == (b /= e / 2)) return c + d; if (g || (g = e * .3 * 1.5), Math.abs(d) > h) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); return 1 > b ? -.5 * h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) + c : .5 * h * Math.pow(2, -10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) + d + c }, easeInBack: function (a, b, c, d, e, f) { return void 0 == f && (f = 1.70158), d * (b /= e) * b * ((f + 1) * b - f) + c }, easeOutBack: function (a, b, c, d, e, f) { return void 0 == f && (f = 1.70158), d * ((b = b / e - 1) * b * ((f + 1) * b + f) + 1) + c }, easeInOutBack: function (a, b, c, d, e, f) { return void 0 == f && (f = 1.70158), 1 > (b /= e / 2) ? d / 2 * b * b * (((f *= 1.525) + 1) * b - f) + c : d / 2 * ((b -= 2) * b * (((f *= 1.525) + 1) * b + f) + 2) + c }, easeInBounce: function (a, b, c, d, e) { return d - jQuery.easing.easeOutBounce(a, e - b, 0, d, e) + c }, easeOutBounce: function (a, b, c, d, e) { return 1 / 2.75 > (b /= e) ? d * 7.5625 * b * b + c : 2 / 2.75 > b ? d * (7.5625 * (b -= 1.5 / 2.75) * b + .75) + c : 2.5 / 2.75 > b ? d * (7.5625 * (b -= 2.25 / 2.75) * b + .9375) + c : d * (7.5625 * (b -= 2.625 / 2.75) * b + .984375) + c }, easeInOutBounce: function (a, b, c, d, e) { return e / 2 > b ? .5 * jQuery.easing.easeInBounce(a, 2 * b, 0, d, e) + c : .5 * jQuery.easing.easeOutBounce(a, 2 * b - e, 0, d, e) + .5 * d + c } });