style.zIndex = "8888";
} else if (thisSource.tagName.toLowerCase() == "img") {
var oSearchForm = document.getElementById("search-form");
oSearchForm.submit();
}
});
myAddEvent(oSearchShow, "click", function() {
oSearch.className = "search-box";
oSearchShow.className = "search-show";
oAside.className = "aside";
oHeader.style.zIndex = "999";
for (var i = 0; i < oAsideLeft.length; i++) {
oAsideLeft[i].className = oAsideLeft[i].className.replace(" on", "");
}
});
}
/*!
=================涓嬮潰涓哄ぇ璇濅富甯彃浠=============================
* TouchSlide v1.1
* javascript瑙﹀睆婊戝姩鐗规晥鎻掍欢锛岀Щ鍔ㄧ婊戝姩鐗规晥锛岃Е灞忕劍鐐瑰浘锛岃Е灞廡ab鍒囨崲锛岃Е灞忓鍥惧垏鎹㈢瓑
* 璇﹀敖淇℃伅璇风湅瀹樼綉锛歨ttp://www.SuperSlide2.com/TouchSlide/
*
* Copyright 2013 澶ц瘽涓诲腑
*
* 璇峰皧閲嶅師鍒涳紝淇濈暀澶撮儴鐗堟潈
* 鍦ㄤ繚鐣欑増鏉冪殑鍓嶆彁涓嬪彲搴旂敤浜庝釜浜烘垨鍟嗕笟鐢ㄩ
* 1.1 瀹藉害鑷傚簲锛堜慨澶嶅畨鍗撴í灞忔椂婊戝姩鑼冨洿涓嶅彉鐨刡ug锛
*/
var TouchSlide = function(a) {
a = a || {};
var b = {slideCell: a.slideCell || "#touchSlide",titCell: a.titCell || ".hd li",mainCell: a.mainCell || ".bd",effect: a.effect || "left",autoPlay: a.autoPlay || !1,delayTime: a.delayTime || 200,interTime: a.interTime || 2500,defaultIndex: a.defaultIndex || 0,titOnClassName: a.titOnClassName || "on",autoPage: a.autoPage || !1,prevCell: a.prevCell || ".prev",nextCell: a.nextCell || ".next",pageStateCell: a.pageStateCell || ".pageState",pnLoop: "undefined " == a.pnLoop ? !0 : a.pnLoop,startFun: a.startFun || null,endFun: a.endFun || null,switchLoad: a.switchLoad || null}, c = document.getElementById(b.slideCell.replace("#", ""));
if (!c)
return !1;
var d = function(a, b) {
a = a.split(" ");
var c = [];
b = b || document;
var d = [b];
for (var e in a)
0 != a[e].length && c.push(a[e]);
for (var e in c) {
if (0 == d.length)
return !1;
var f = [];
for (var g in d)
if ("#" == c[e][0])
f.push(document.getElementById(c[e].replace("#", "")));
else if ("." == c[e][0])
for (var h = d[g].getElementsByTagName("*"), i = 0; i < h.length; i++) {
var j = h[i].className;
j && -1 != j.search(new RegExp("\\b" + c[e].replace(".", "") + "\\b")) && f.push(h[i])
}
else
for (var h = d[g].getElementsByTagName(c[e]), i = 0; i < h.length; i++)
f.push(h[i]);
d = f
}
return 0 == d.length || d[0] == b ? !1 : d
}, e = function(a, b) {
var c = document.createElement("div");
c.innerHTML = b, c = c.children[0];
var d = a.cloneNode(!0);
return c.appendChild(d), a.parentNode.replaceChild(c, a), m = d, c
}, g = function(a, b) {
!a || !b || a.className && -1 != a.className.search(new RegExp("\\b" + b + "\\b")) || (a.className += (a.className ? " " : "") + b)
}, h = function(a, b) {
!a || !b || a.className && -1 == a.className.search(new RegExp("\\b" + b + "\\b")) || (a.className = a.className.replace(new RegExp("\\s*\\b" + b + "\\b", "g"), ""))
}, i = b.effect, j = d(b.prevCell, c)[0], k = d(b.nextCell, c)[0], l = d(b.pageStateCell)[0], m = d(b.mainCell, c)[0];
if (!m)
return !1;
var N, O, n = m.children.length, o = d(b.titCell, c), p = o ? o.length : n, q = b.switchLoad, r = parseInt(b.defaultIndex), s = parseInt(b.delayTime), t = parseInt(b.interTime), u = "false" == b.autoPlay || 0 == b.autoPlay ? !1 : !0, v = "false" == b.autoPage || 0 == b.autoPage ? !1 : !0, w = "false" == b.pnLoop || 0 == b.pnLoop ? !1 : !0, x = r, y = null, z = null, A = null, B = 0, C = 0, D = 0, E = 0, G = /hp-tablet/gi.test(navigator.appVersion), H = "ontouchstart" in window && !G, I = H ? "touchstart" : "mousedown", J = H ? "touchmove" : "", K = H ? "touchend" : "mouseup", M = m.parentNode.clientWidth, P = n;
if (0 == p && (p = n), v) {
p = n, o = o[0], o.innerHTML = "";
var Q = "";
if (1 == b.autoPage || "true" == b.autoPage)
for (var R = 0; p > R; R++)
Q += "<li>" + (R + 1) + "</li>";
else
for (var R = 0; p > R; R++)
Q += b.autoPage.replace("$", R + 1);
o.innerHTML = Q, o = o.children
}
"leftLoop" == i && (P += 2, m.appendChild(m.children[0].cloneNode(!0)), m.insertBefore(m.children[n - 1].cloneNode(!0), m.children[0])), N = e(m, '<div class="tempWrap" style="overflow:hidden; position:relative;"></div>'), m.style.cssText = "width:" + P * M + "px;" + "position:relative;overflow:hidden;padding:0;margin:0;";
for (var R = 0; P > R; R++)
m.children[R].style.cssText = "display:table-cell;vertical-align:top;width:" + M + "px";
var S = function() {
"function" == typeof b.startFun && b.startFun(r, p)
}, T = function() {
"function" == typeof b.endFun && b.endFun(r, p)
}, U = function(a) {
var b = ("leftLoop" == i ? r + 1 : r) + a, c = function(a) {
for (var b = m.children[a].getElementsByTagName("img"), c = 0; c < b.length; c++)
b[c].getAttribute(q) && (b[c].setAttribute("src", b[c].getAttribute(q)), b[c].removeAttribute(q))
};
if (c(b), "leftLoop" == i)
switch (b) {
case 0:
c(n);
break;
case 1:
c(n + 1);
break;
case n:
c(0);
break;
case n + 1:
c(1)
}
}, V = function() {
M = N.clientWidth, m.style.width = P * M + "px";
for (var a = 0; P > a; a++)
m.children[a].style.width = M + "px";
var b = "leftLoop" == i ? r + 1 : r;
W(-b * M, 0)
};
window.addEventListener("resize", V, !1);
var W = function(a, b, c) {
c = c ? c.style : m.style, c.webkitTransitionDuration = c.MozTransitionDuration = c.msTransitionDuration = c.OTransitionDuration = c.
Back to home |
File page
Subscribe |
Register |
Login
| N