(function(a) {
	a.flexslider = function(d, l) {
		var b = a(d), j = a.extend({}, a.flexslider.defaults, l), f = j.namespace, h = ("ontouchstart" in window)
				|| window.DocumentTouch && document instanceof DocumentTouch, c = (h) ? "touchend"
				: "click", g = j.direction === "vertical", e = {};
		a.data(d, "flexslider", b);
		e = {
			init : function() {
				b.animating = false;
				b.currentSlide = j.startAt;
				b.animatingTo = b.currentSlide;
				b.atEnd = (b.currentSlide === 0 || b.currentSlide === b.last);
				b.containerSelector = j.selector.substr(0, j.selector
						.search(" "));
				b.slides = a(j.selector, b);
				b.container = a(b.containerSelector, b);
				b.count = b.slides.length;
				b.prop = (g) ? "top" : "marginLeft";
				b.padding = j.paddingWidth;
				b.args = {};
				b.manualPause = false;
				b.transitions = (function() {
					var o = document.createElement("div"), n = [
							"perspectiveProperty", "WebkitPerspective",
							"MozPerspective", "OPerspective", "msPerspective" ];
					for ( var m in n) {
						if (o.style[n[m]] !== undefined) {
							b.pfx = n[m].replace("Perspective", "")
									.toLowerCase();
							b.prop = "-" + b.pfx + "-transform";
							return true
						}
					}
					return false
				}());
				if (j.controlsContainer !== "") {
					b.controlsContainer = a(j.controlsContainer).length > 0
							&& a(j.controlsContainer)
				}
				if (j.randomize) {
					b.slides.sort(function() {
						return (Math.round(Math.random()) - 0.5)
					});
					b.container.empty().append(b.slides)
				}
				b.doMath();
				b.setup("init");
				if (j.controlNav) {
					e.controlNav.setup()
				}
				if (j.directionNav) {
					e.directionNav.setup()
				}
				if (j.slideshow) {
					(j.initDelay > 0) ? setTimeout(b.play, j.initDelay) : b
							.play()
				}
				if (h && j.touch) {
					e.touch()
				}
				a(window).bind("resize focus", e.resize)
			},
			controlNav : {
				setup : function() {
					e.controlNav.setupPaging()
				},
				setupPaging : function() {
					var o = (j.controlNav === "thumbnails") ? "control-thumbs"
							: "control-paging", m = 1, p;
					var s = j.controlType == 0 ? ""
							: '<div class="m-xs-line"></div><div class="m-ct-time"><ul></ul></div>';
					b.controlNavSelector = j.controlType == 0 ? "a" : "a";
					b.controlNavScaffold = a('<article class="' + f
							+ "control-nav " + f + o + '">' + s + "</article>");
					if (b.pagingCount > 1) {
						var r = parseInt(100 / b.pagingCount);
						for (var n = 0; n < b.pagingCount; n++) {
							if (j.controlType == 0) {
								b.controlNavScaffold.append("<"
										+ b.controlNavSelector + "/>")
							} else {
								var q = b.controlNavScaffold.find("ul");
								q.append('<li style="width:' + r + '%"><a><b>'
										+ b.slides.eq(n).attr("txt")
										+ "</b><s></s></a></li>")
							}
							m++
						}
					}
					(b.controlsContainer) ? (j.controlPos == 0 ? a(
							b.controlsContainer).append(b.controlNavScaffold)
							: a(b.controlsContainer).prepend(
									b.controlNavScaffold))
							: (j.controlPos == 0 ? b.container
									.after(b.controlNavScaffold) : b.container
									.before(b.controlNavScaffold));
					e.controlNav.set();
					e.controlNav.active();
					if (j.controlType == 1) {
						b.controlNav.bind(c, function(t) {
							t.preventDefault();
							var v = a(this), u = b.controlNav.index(v);
							if (!v.hasClass(f + "active")) {
								b.direction = (u > b.currentSlide) ? "next"
										: "prev";
								b.flexAnimate(u, j.pauseOnAction)
							}
						});
						if (h) {
							b.controlNav.bind("click touchstart", function(t) {
								t.preventDefault()
							})
						}
					}
				},
				set : function() {
					var m = (j.controlNav === "thumbnails") ? "img"
							: b.controlNavSelector;
					b.controlNav = a("." + f + "control-nav " + m,
							(b.controlsContainer) ? b.controlsContainer : b)
				},
				active : function() {
					b.controlNav.removeClass(f + "active").eq(b.animatingTo)
							.addClass(f + "active")
				},
				update : function(m, n) {
					if (b.pagingCount > 1 && m === "add") {
						b.controlNavScaffold.append(a("<"
								+ b.controlNavSelector + "/>"))
					} else {
						if (b.pagingCount === 1) {
							b.controlNavScaffold.find(b.controlNavSelector)
									.remove()
						} else {
							b.controlNav.eq(n).closest(b.controlNavSelector)
									.remove()
						}
					}
					e.controlNav.set();
					(b.pagingCount > 1 && b.pagingCount !== b.controlNav.length) ? b
							.update(n, m)
							: e.controlNav.active()
				}
			},
			directionNav : {
				setup : function() {
					var m = a('<ul class="' + f
							+ 'direction-nav"><li><a class="' + f + 'prev">'
							+ j.prevText + '</a></li><li><a class="' + f
							+ 'next">' + j.nextText + "</a></li></ul>");
					if (b.controlsContainer) {
						a(b.controlsContainer).append(m);
						b.directionNav = a("." + f + "direction-nav li a",
								b.controlsContainer)
					} else {
						b.append(m);
						b.directionNav = a("." + f + "direction-nav li a", b)
					}
					e.directionNav.update();
					alert(c);
					b.directionNav.bind(c, function(n) {
						n.preventDefault();
						var o = (a(this).hasClass(f + "next")) ? b
								.getTarget("next") : b.getTarget("prev");
						b.flexAnimate(o, j.pauseOnAction)
					});
					if (h) {
						b.directionNav.bind("click touchstart", function(n) {
							n.preventDefault()
						})
					}
				},
				update : function() {
					var m = f + "disabled";
					if (!j.animationLoop) {
						if (b.pagingCount === 1) {
							b.directionNav.addClass(m)
						} else {
							if (b.animatingTo === 0) {
								b.directionNav.removeClass(m).filter(
										"." + f + "prev").addClass(m)
							} else {
								if (b.animatingTo === b.last) {
									b.directionNav.removeClass(m).filter(
											"." + f + "next").addClass(m)
								} else {
									b.directionNav.removeClass(m)
								}
							}
						}
					}
				}
			},
			touch : function() {
				var t, r, p, u, x, n, v, o, s = false;
				d.addEventListener("touchstart", q, false);
				function q(y) {
					if (b.animating) {
						y.preventDefault()
					} else {
						if (y.touches.length === 1) {
							b.pause();
							u = (g) ? b.h : b.computedW;
							n = 0;
							p = (b.currentSlide + b.cloneOffset) * u
									- b.padding;
							t = (g) ? y.touches[0].pageY : y.touches[0].pageX;
							r = (g) ? y.touches[0].pageX : y.touches[0].pageY;
							d.addEventListener("touchmove", m, false);
							d.addEventListener("touchend", w, false)
						}
					}
				}
				function m(y) {
					x = (g) ? t - y.touches[0].pageY : t - y.touches[0].pageX;
					s = (g) ? (Math.abs(x) < Math.abs(y.touches[0].pageX - r))
							: (Math.abs(x) < Math.abs(y.touches[0].pageY - r));
					if (!s) {
						y.preventDefault();
						if (Math.abs(x - n) > 3) {
							n = x;
							if (b.transitions) {
								if (!j.animationLoop) {
									x = x
											/ ((b.currentSlide === 0 && x < 0 || b.currentSlide === b.last
													&& x > 0) ? (Math.abs(x)
													/ u + 2) : 1)
								}
								b.setProps(p + x, "setTouch")
							}
						}
					}
				}
				function w(A) {
					if (b.animatingTo === b.currentSlide && !s && !(x === null)) {
						var z = x, y = (z > 0) ? b.getTarget("next") : b
								.getTarget("prev");
						if (b.canAdvance(y)) {
							b.flexAnimate(y, j.pauseOnAction)
						} else {
							b
									.flexAnimate(b.currentSlide,
											j.pauseOnAction, true)
						}
					}
					d.removeEventListener("touchmove", m, false);
					d.removeEventListener("touchend", w, false);
					t = null;
					r = null;
					x = null;
					p = null;
					if (j.slideshow && !b.playing) {
						b.play()
					}
				}
			},
			resize : function() {
				if (!b.animating && b.is(":visible")) {
					b.doMath();
					if (g) {
						b.viewport.height(b.h);
						b.setProps(b.h, "setTotal")
					} else {
						b.newSlides.width(b.computedW);
						b.setProps(b.computedW, "setTotal")
					}
				}
			}
		};
		var i = a(".index_up");
		var k = a(".index_down");
		if (i.length > 0 && k.length > 0) {
			i.bind("click", function() {
				b.flexAnimate(b.getTarget("prev"))
			});
			k.bind("click", function() {
				b.flexAnimate(b.getTarget("next"))
			}).show()
		}
		b.flexAnimate = function(r, q, n) {
			if (!b.animating && (b.canAdvance(r) || n) && b.is(":visible")) {
				b.animating = true;
				b.animatingTo = r;
				if (j.controlNav) {
					e.controlNav.active()
				}
				b.slides.removeClass(f + "active-slide").eq(r).addClass(
						f + "active-slide");
				b.atEnd = r === 0 || r === b.last;
				if (j.directionNav) {
					e.directionNav.update()
				}
				if (r === b.last) {
					if (!j.animationLoop) {
						b.pause()
					}
				}
				var p = (g) ? b.slides.filter(":first").height() : b.computedW, o, s, m;
				if (b.currentSlide === 0 && r === b.count - 1
						&& j.animationLoop && b.direction !== "next") {
					s = 0
				} else {
					if (b.currentSlide === b.last && r === 0 && j.animationLoop
							&& b.direction !== "prev") {
						s = (b.count + 1) * p
					} else {
						s = (r + b.cloneOffset) * p
					}
				}
				b.setProps(s, "", j.animationSpeed);
				if (b.transitions) {
					if (!j.animationLoop || !b.atEnd) {
						b.animating = false;
						b.currentSlide = b.animatingTo
					}
					b.container.unbind("webkitTransitionEnd transitionend");
					b.container.bind("webkitTransitionEnd transitionend",
							function() {
								b.wrapup(p)
							})
				}
			}
			if (i.length > 0 && k.length > 0) {
				if (r === b.last) {
					i.show();
					k.hide()
				} else {
					if (b.currentSlide === 0) {
						i.hide();
						k.show()
					} else {
						i.show();
						k.show()
					}
				}
			}
		};
		b.wrapup = function(m) {
			if (b.currentSlide === 0 && b.animatingTo === b.last
					&& j.animationLoop) {
				b.setProps(m, "jumpEnd")
			} else {
				if (b.currentSlide === b.last && b.animatingTo === 0
						&& j.animationLoop) {
					b.setProps(m, "jumpStart")
				}
			}
			b.animating = false;
			b.currentSlide = b.animatingTo
		};
		b.animateSlides = function() {
			if (!b.animating) {
				b.flexAnimate(b.getTarget("next"))
			}
		};
		b.pause = function() {
			clearInterval(b.animatedSlidesTimer);
			b.playing = false
		};
		b.play = function() {
			b.animatedSlidesTimer = setInterval(b.animateSlides,
					j.slideshowSpeed);
			b.playing = true
		};
		b.canAdvance = function(m) {
			return (m === b.currentSlide) ? false
					: (j.animationLoop) ? true
							: (b.atEnd && b.currentSlide === 0 && m === b.last && b.direction !== "next") ? false
									: (b.atEnd && b.currentSlide === b.last
											&& m === 0 && b.direction === "next") ? false
											: true
		};
		b.getTarget = function(m) {
			b.direction = m;
			if (m === "next") {
				return (b.currentSlide === b.last) ? 0 : b.currentSlide + 1
			} else {
				return (b.currentSlide === 0) ? b.last : b.currentSlide - 1
			}
		};
		b.setProps = function(p, m, n) {
			var o = (function() {
				var q = (function() {
					switch (m) {
					case "setTotal":
						return (b.currentSlide + b.cloneOffset) * p - b.padding;
					case "setTouch":
						return p;
					case "jumpEnd":
						return b.count * p - b.padding;
					case "jumpStart":
						return p - b.padding;
					default:
						return p - b.padding
					}
				}());
				return (q * -1) + "px"
			}());
			if (b.transitions) {
				o = (g) ? "translate3d(0," + o + ",0)" : "translate3d(" + o
						+ ",0,0)";
				n = (n !== undefined) ? (n / 1000) + "s" : "0s";
				b.container.css("-" + b.pfx + "-transition-duration", n)
			}
			b.args[b.prop] = o;
			if (b.transitions || n === undefined) {
				b.container.css(b.args)
			}
		};
		b.setup = function(m) {
			if (m === "init") {
				b.container.find("div.loading").remove();
				b.viewport = a('<div class="flex-viewport"></div>').css({
					overflow : "hidden",
					position : "relative"
				}).appendTo(b).append(b.container);
				b.cloneCount = 0;
				b.cloneOffset = 0
			}
			if (j.animationLoop) {
				b.cloneCount = 2;
				b.cloneOffset = 1;
				if (m !== "init") {
					b.container.find(".clone").remove()
				}
				b.container.append(b.slides.first().clone().addClass("clone"))
						.prepend(b.slides.last().clone().addClass("clone"))
			}
			b.newSlides = a(j.selector, b);
			var n = b.currentSlide + b.cloneOffset;
			if (g) {
				b.container.height((b.count + b.cloneCount) * 100 + "%").css(
						"position", "absolute").width("100%");
				setTimeout(function() {
					b.newSlides.css({
						display : "block"
					});
					b.doMath();
					b.viewport.height(b.h);
					b.setProps(n * b.h, "init")
				}, (m === "init") ? 100 : 0)
			} else {
				b.container.width((b.count + b.cloneCount) * 100 + "%");
				b.setProps(n * b.computedW, "init");
				setTimeout(function() {
					b.doMath();
					b.newSlides.css({
						width : b.computedW,
						"float" : "left",
						display : "block"
					})
				}, (m === "init") ? 100 : 0)
			}
			b.slides.removeClass(f + "active-slide").eq(b.currentSlide)
					.addClass(f + "active-slide")
		};
		b.doMath = function() {
			var m = b.slides.first();
			b.w = b.width();
			b.h = m.height();
			b.boxPadding = b.padding * 2;
			b.itemW = b.w;
			b.pagingCount = b.count;
			b.last = b.count - 1;
			b.computedW = b.itemW - b.boxPadding
		};
		b.update = function(n, m) {
			b.doMath();
			if (n < b.currentSlide) {
				b.currentSlide += 1
			} else {
				if (n <= b.currentSlide && n !== 0) {
					b.currentSlide -= 1
				}
			}
			b.animatingTo = b.currentSlide;
			if (j.controlNav) {
				if ((m === "add") || b.pagingCount > b.controlNav.length) {
					e.controlNav.update("add")
				} else {
					if ((m === "remove") || b.pagingCount < b.controlNav.length) {
						e.controlNav.update("remove", b.last)
					}
				}
			}
			if (j.directionNav) {
				e.directionNav.update()
			}
		};
		e.init()
	};
	a.flexslider.defaults = {
		namespace : "flex-",
		selector : ".slides > li",
		direction : "horizontal",
		animationLoop : true,
		startAt : 0,
		slideshow : true,
		slideshowSpeed : 5000,
		animationSpeed : 400,
		initDelay : 0,
		randomize : false,
		pauseOnAction : true,
		touch : true,
		controlNav : true,
		directionNav : false,
		prevText : "",
		nextText : "",
		controlType : 0,
		controlPos : 0,
		paddingWidth : 0,
		controlsContainer : "",
	};
	a.fn.flexslider = function(b) {
		b = b || {};
		return this.each(function() {
			var d = a(this);
			if (b.selector === undefined) {
				b.selector = ".slides > li"
			}
			var c = d.find(b.selector);
			if (c.length === 0) {
				return
			} else {
				new a.flexslider(this, b)
			}
		})
	}
})(jQuery);





$(function() {
	var onresize = function() {
		var left = ($(window).width() - 16) / 2;
		$(".index_up,.index_down").css("left", left);
	};
	window.onresize = onresize;
	onresize();

	var d = $("#newbeiBox");
	var e = $(window).height();
	d.find("li").css({
		display : "block",
		height : e + "px"
	});
	d.find("div.item").each(function(g) {
		var h = parseInt(((e - $(this).height()) / 2));
		if (g == 2) {
			h = h > 30 ? h - 30 : 0
		}
		$(this).css({
			padding : h + "px 0"
		});
	});
	var f = ("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch;
	if (f) {
		d.flexslider({
			slideshow : false,
			animationLoop : false,
			direction : "vertical",
			controlNav : false
		});
	} else {
		d.find("li").show()
	}
});