function banner(){function u(n){$(".banner .btns span").eq(n).addClass("cur").siblings("span").removeClass("cur");$(".banner li").eq(n).stop(!0,!0).fadeIn(1e3).siblings().stop(!0,!0).fadeOut(1e3)}var r=$(".banner li").length,i,n,t;for($(".loader").stop().fadeOut(1e3),$(".banner li").eq(0).fadeIn(1e3),i=0;i<\/span>');$(".banner .btns").css("margin-left",-$(".btns").width()/2);$(".banner .btns span").eq(0).addClass("cur");n=1;$(".banner .btns span").mouseover(function(){n=$(this).index();u(n)});$(".banner").hover(function(){t&&clearInterval(t)},function(){clearInterval(t);t=setInterval(function(){u(n);n++;n==r&&(n=0)},5e3)});t=setInterval(function(){u(n);n++;n==r&&(n=0)},5e3)}function Scroll(n,t,i,r,u){var f={thisUl:n.find("ul"),thisLi:n.find("ul").find("li"),btnLeft:t,btnRight:i,init:function(){f.thisUl.width(f.thisLi.length*r+f.thisLi.length*50);f.slideAuto();f.btnLeft.click(f.slideLeft).hover(f.slideStop,f.slideAuto);f.btnRight.click(f.slideRight).hover(f.slideStop,f.slideAuto);f.thisUl.hover(f.slideStop,f.slideAuto)},slideLeft:function(){return f.btnLeft.unbind("click",f.slideLeft),f.thisLi.parent().children().eq(f.thisLi.length-1).prependTo(f.thisUl),f.thisUl.css("marginLeft",0-r),f.thisUl.animate({marginLeft:0},500,"linear",function(){f.btnLeft.bind("click",f.slideLeft)}),!1},slideRight:function(){return f.btnRight.unbind("click",f.slideRight),f.thisUl.animate({marginLeft:0-r},500,"linear",function(){f.thisUl.css("marginLeft","0");f.thisLi.parent().children().eq(0).appendTo(f.thisUl);f.btnRight.bind("click",f.slideRight)}),!1},slideAuto:function(){u==1&&(f.intervalId=window.setInterval(f.slideRight,3e3))},slideStop:function(){window.clearInterval(f.intervalId)}};$(document).ready(function(){f.init()})}function banner2(){function f(n){$(".ibox-banner .btns span").eq(n).addClass("cur").siblings("span").removeClass("cur");$(".ibox-banner ul").stop(!0,!0).animate({marginLeft:-t*n},1e3,"easeOutQuart")}var i=$(".ibox-banner li").length,t=parseInt($(".i-banner .i-box").width()),u,n,r;for(t<=1014&&(t=1014),$(".ibox-banner li").width(t),$(".ibox-banner ul").width(i*t),$(window).resize(function(){t=parseInt($(".i-banner .i-box").width());t<=1014&&(t=1014);$(".ibox-banner li").width(t);$(".ibox-banner ul").width(i*t)}),$(".ibox-banner li").eq(0).fadeIn(1e3),u=0;u<\/span>');$(".ibox-banner .btns span").eq(0).addClass("cur");n=1;$(".ibox-banner .btns span").mouseover(function(){n=$(this).index();f(n)});$(".ibox-banner").hover(function(){r&&clearInterval(r)},function(){clearInterval(r);r=setInterval(function(){f(n);n++;n==i&&(n=0)},5e3)});r=setInterval(function(){f(n);n++;n==i&&(n=0)},5e3)}$(function(){var n=$(".banner li").length;$(".banner li").each(function(){var i=$(this),r=i.attr("data-img"),t=new Image;if(t.src=r,t.complete||t.width){i.attr("style","background:url("+r+") no-repeat center");n--;n==0&&banner();return}$(t).load(function(){i.attr("style","background:url("+r+") no-repeat center");n--;n==0&&banner()})})}),function(n){n.fn.extend({showx:function(n){function e(r,u){if(r=="mouseenter")switch(u){case"down":n.css({left:"0px",top:i}).stop(!0,!0).animate({top:"0px"},"500");break;case"up":n.css({left:"0px",top:-i}).stop(!0,!0).animate({top:"0px"},"500");break;case"right":n.css({left:t,top:"0px"}).stop(!0,!0).animate({left:"0px"},"500");break;case"left":n.css({left:-t,top:"0px"}).stop(!0,!0).animate({left:"0px"},"500")}else switch(u){case"down":n.stop(!0,!0).animate({top:i},"500");break;case"up":n.stop(!0,!0).animate({top:-i},"500");break;case"right":n.stop(!0,!0).animate({left:t},"500");break;case"left":n.stop(!0,!0).animate({left:-t},"500")}}var t=this.width(),i=this.height(),u=t/2,f=i/2,r="";t>i?n.css({position:"absolute",top:this.width()}):t<=i&&n.css({position:"absolute",top:this.height()});this.css({overflow:"hidden",position:"relative"});this.on("mouseenter mouseleave",function(n){var s=n||event,i=s.offsetX,o=s.offsetY,t=Math.atan((i-u)/(o-f))*180/Math.PI;t>-45&&t<45&&o>f&&(r="down");t>-45&&t<45&&o-90&&t<-45||t>45&&t<90)&&i>u&&(r="right");(t>-90&&t<-45||t>45&&t<90)&&ii?n.css({position:"absolute",top:this.width()}):t<=i&&n.css({position:"absolute",top:this.height()});this.css({overflow:"hidden",position:"relative"});this.on("mouseenter mouseleave",function(n){var s=n||event,i=s.offsetX,o=s.offsetY,t=Math.atan((i-u)/(o-f))*180/Math.PI;t>-45&&t<45&&o>f&&(r="down");t>-45&&t<45&&o-90&&t<-45||t>45&&t<90)&&i>u&&(r="right");(t>-90&&t<-45||t>45&&t<90)&&i