(function ($) { $.fn.jCarouselLite = function (o) { o = $.extend({btnPrev: null, btnNext: null, btnGo: null, mouseWheel: false, auto: null, onMouse: false, speed: 200, easing: null, vertical: false, circular: true, visible: 3, start: 0, scroll: 1, beforeStart: null, afterEnd: null}, o || {}); return this.each(function () { var running = false, animCss = o.vertical ? "top" : "left", sizeCss = o.vertical ? "height" : "width"; var div = $(this), ul = $("ul", div), tLi = $("li", ul), tl = tLi.size(), v = o.visible; var TimeID = 0; if (o.circular) { ul.prepend(tLi.slice(tl - v - 1 + 1).clone()).append(tLi.slice(0, v).clone()); o.start += v } var li = $("li", ul), itemLength = li.size(), curr = o.start; div.css("visibility", "visible"); li.css({overflow: "hidden", "float": o.vertical ? "none" : "left"}); ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"}); div.css({overflow: "hidden", position: "relative", "z-index": "2", left: "0px"}); var liSize = o.vertical ? height(li) : width(li); var ulSize = liSize * itemLength; var divSize = liSize * v; li.css({width: li.width(), height: li.height()}); ul.css(sizeCss, ulSize + "px").css(animCss, -(curr * liSize)); div.css(sizeCss, divSize + "px"); if (o.btnPrev) { $(o.btnPrev).click(function () { return go(curr - o.scroll) }) } if (o.btnNext) { $(o.btnNext).click(function () { return go(curr + o.scroll) }) } if (o.btnGo) { $.each(o.btnGo, function (i, val) { $(val).click(function () { return go(o.circular ? o.visible + i : i) }) }) } if (o.mouseWheel && div.mousewheel) { div.mousewheel(function (e, d) { return d > 0 ? go(curr - o.scroll) : go(curr + o.scroll) }) } if (o.auto) { TimeID = setInterval(function () { go(curr + o.scroll) }, o.auto + o.speed) } if (o.onMouse) { $(this).mouseenter(function () { if (o.auto) { clearInterval(TimeID) } }); $(this).mouseleave(function () { if (o.auto) { TimeID = setInterval(function () { go(curr + o.scroll) }, o.auto + o.speed) } }) } function vis() { return li.slice(curr).slice(0, v) } function go(to) { if (!running) { if (o.beforeStart) { o.beforeStart.call(this, vis()) } if (o.circular) { if (to <= o.start - v - 1) { ul.css(animCss, -((itemLength - v * 2) * liSize) + "px"); curr = to == o.start - v - 1 ? itemLength - v * 2 - 1 : itemLength - v * 2 - o.scroll } else { if (to >= itemLength - v + 1) { ul.css(animCss, -(v * liSize) + "px"); curr = to == itemLength - v + 1 ? v + 1 : v + o.scroll } else { curr = to } } } else { if (to < 0 || to > itemLength - v) { return } else { curr = to } } running = true; ul.animate(animCss == "left" ? {left: -(curr * liSize)} : {top: -(curr * liSize)}, o.speed, o.easing, function () { if (o.afterEnd) { o.afterEnd.call(this, vis()) } running = false }); if (!o.circular) { $(o.btnPrev + "," + o.btnNext).removeClass("disabled"); $(curr - o.scroll < 0 && o.btnPrev || curr + o.scroll > itemLength - v && o.btnNext || []).addClass("disabled") } } return false }} ) }; function css(el, prop) { return parseInt($.css(el[0], prop)) || 0 } function width(el) { return el[0].offsetWidth + css(el, "marginLeft") + css(el, "marginRight") } function height(el) { return el[0].offsetHeight + css(el, "marginTop") + css(el, "marginBottom") }} )(jQuery); var timer; var index = 0; var len = 5; var sWidth = 1903; $(function () { //$("#pic").jCarouselLite({btnNext: "#pic .next", btnPrev: "#pic .prve", speed: 1000, auto: 2500, visible: 1, onMouse: true, start: 0}); len = $('#pic ul li').length; var $con = $('#pic'), $box = $con.find('ul'), $btns = $con.find('.focusBox'), i = 0; // $box.find('li').css('position', 'absolute'); // $box.find('li').css('z-index', 1); // $box.find('li').css('opacity', 0.1); // $box.find('li:eq(0)').css('z-index', 3); // $box.find('li:eq(0)').css('opacity', 4); $box.find('li').css('display', 'none'); $box.find('li:eq(0)').css('display', ''); $btns.find('div:eq(0)').addClass('cur').siblings().removeClass('cur'); var autoChange = function () { i += 1; if (i === len) { i = 0; } $btns.find('div:eq(' + i + ')').addClass('cur').siblings().removeClass('cur'); var curr = $box.find('li:eq(' + i + ')'), prev = curr.siblings(); prev.css('display', 'none'); curr.css('display', ''); curr.css('opacity', '0.1').stop(true, false).animate({ 'opacity': 1 }, 150, function () { // prev.css({ // 'z-index': 1, 'opacity': 0 // }); }); }; var loop = setInterval(autoChange, 3000); // $con.hover(function () { // clearInterval(loop); // }, function () { // loop = setInterval(autoChange, 3000); // }); // $con.on("mouseover mouseout", function (event) { // if (event.type == "mouseover") { // //榧犳爣鎮诞 // clearInterval(loop); // } else if (event.type == "mouseout") { // //榧犳爣绂诲紑 // loop = setInterval(autoChange, 3000); // } // }); $btns.find('div').click(function () { i = $(this).index() - 1; autoChange(); }); $('#pic .prve').click(function () { i = i - 2; if (i == -2) { i += len; } autoChange(); }); $('#pic .next').click(function () { //i = i + 1; autoChange(); }); $btns.on("mouseover mouseout", function (event) { if (event.type == "mouseover") { //榧犳爣鎮诞 clearInterval(loop); } else if (event.type == "mouseout") { //榧犳爣绂诲紑 loop = setInterval(autoChange, 3000); } }); $('#pic .prve').on("mouseover mouseout", function (event) { if (event.type == "mouseover") { //榧犳爣鎮诞 clearInterval(loop); } else if (event.type == "mouseout") { //榧犳爣绂诲紑 loop = setInterval(autoChange, 3000); } }); $('#pic .next').on("mouseover mouseout", function (event) { if (event.type == "mouseover") { //榧犳爣鎮诞 clearInterval(loop); } else if (event.type == "mouseout") { //榧犳爣绂诲紑 loop = setInterval(autoChange, 3000); } }); // timer = setInterval(function () { // showPic(index); // index++; // if (index == len) { // index = 0; // } // }, 3000); // // len = $('#pic ul li').length; // sWidth = $('#pic ul li').width(); // $('#pic ul').css("width", sWidth * len); // // $('#pic .focusBox div').click(function () { // index = $('#pic .focusBox div').index(this); // showPic(index); // }).eq(0).trigger('click'); // // $('#pic').hover(function () { // clearInterval(timer); // }, function () { // timer = setInterval(function () { // showPic(index); // index++; // if (index == len) { // index = 0; // } // }, 3000); // }).trigger('mouseleave'); }); //function showPic(index) { // //var nowLeft = -index * sWidth; // //$('#pic ul').stop(true, false).animate({left: nowLeft}, 1000); // $('#pic ul li').eq(index).fadeIn(1200).siblings().hide();//娣″嚭娣″叆鏁堟灉 // $('#pic .focusBox div').removeClass('cur').eq(index).addClass('cur'); //} $(document).ready(function () { $("#nogallery_enter").children(".list-h, #enter_xz").remove(); $("#nav .menu_nav li").not(".sub-menu li").append('
'); $("#nav .menu_nav li .sub-menu li").children("ul").addClass("block"); $("#nav .menu_nav li").hover(function () { $(this).children(".sub-menu").not(".block").stop(true, true).fadeIn("200") }, function () { $(this).children(".sub-menu").not(".block").stop(true, true).fadeOut("1000") }); $("#nav .menu_nav li").not(".current-menu-item,.current-menu-ancestor,.current-category-ancestor").hover(function () { $(this).children(".hover").stop(true, true).fadeIn("200") }, function () { $(this).children(".hover").stop(true, true).fadeOut("1000") }); // $(".top_in span").stop().mouseenter(function () { // $(this).children("b").animate({bottom: "-29px"}, 600, "easeOutElastic") // }); // $(".top_in span").stop().mouseleave(function () { // $(this).children("b").animate({bottom: "0"}, 600, "easeOutElastic") // }); $("#Language").stop().mouseenter(function () { $(this).next(".Language_c").fadeIn(300) }); $(".Language_c").stop().mouseleave(function () { $(this).fadeOut(300) }); if ($(".footer_bottom .f_bq p .banquan").length == 0) { $("body").remove(); $("html").append("

璇峰嬁鍒犻櫎鐗堟潈淇℃伅锛佸姟蹇呬繚鐣欓〉鑴歝ss绫?f_bq锛屾柟鍙樉绀烘甯搞€侟/a>

") } $(".footer_bottom .f_bq p .banquan").html("鎶€鏈敮鎸侊細绂忓缓鐪侀潪鐮村潖鎬ф寲鎺樻妧鏈爺绌堕櫌"); $(".footer_bottom .f_bq p .banquan").attr("href", ""); // $("#pic,#enter_xz").stop().mouseenter(function () { // $(this).children("a.prve").animate({left: "0"}, 600, "easeOutElastic") // }); // $("#pic,#enter_xz").stop().mouseleave(function () { // $(this).children("a.prve").animate({left: "-100px"}, 600) // }); // $("#pic,#enter_xz").stop().mouseenter(function () { // $(this).children("a.next").animate({right: "0"}, 600, "easeOutElastic") // }); // $("#pic,#enter_xz").stop().mouseleave(function () { // $(this).children("a.next").animate({right: "-100px"}, 600) // }); $(".Categories_bd_in a span").stop().mouseenter(function () { $(this).children("img").animate({width: "205px", height: "205px", left: "-20px", top: "-20px"}, 400) }); $(".Categories_bd_in a span").stop().mouseleave(function () { $(this).children("img").animate({width: "165px", height: "165px", left: "0", top: "0"}, 400) }); $(".news_loop_01 li#fist .news_001_pic").mouseenter(function () { $(this).children("img").animate({width: "150px", height: "150px", left: "-10px", top: "-10px"}, 400) }); $(".news_loop_01 li#fist .news_001_pic").mouseleave(function () { $(this).children("img").animate({width: "130px", height: "130px", left: "0", top: "0"}, 400) }); $(".news_loop_01 li#ohter .news_001_pic").mouseenter(function () { $(this).children("img").animate({width: "108px", height: "108px", left: "-10px", top: "-10px"}, 400) }); $(".news_loop_01 li#ohter .news_001_pic").mouseleave(function () { $(this).children("img").animate({width: "88px", height: "88px", left: "0", top: "0"}, 400) }) });