(function(b) {
	b.fn.slider = function(c) {
		if (void 0 != c.value) try {
			this.setRange(c.value)
		} catch(d) {} else if (void 0 != c.maxValue) try {
			this.duration = c.maxValue,
			this.setRange(this.range)
		} catch(e) {} else {
			var f = this;
			this.duration = c.max;
			this.onChange = c.onChange;
			this.direction = c.direction;
			var g = b('<div class="slider-total"></div>'),
			h = b('<div class="slider-range"></div>'),
			k = b('<div class="slider-handle"></div>');
			this.append(g);
			this.append(h);
			this.append(k);
			this.setRange = function(b) {
				if (void 0 != b) {
					f.range = b;
					b = g.offset().left - f.offset().left;
					var c = parseInt(h.css("bottom").replace("px", "")),
					d = k.width();
					if ("horizontal" == f.direction) {
						var e = g.width() - d,
						c = Math.floor(f.range * e / f.duration),
						c = Math.min(c, e),
						d = c + d / 2;
						k.css({
							left: c + b
						});
						h.css({
							width: d
						})
					} else e = g.height() - d,
					b = Math.floor(f.range * e / f.duration),
					b = Math.min(b, e),
					d = b + d / 2,
					k.css({
						bottom: b + c
					}),
					h.css({
						height: d
					})
				}
			};
			this.setRange(c.range);
			c = function(c) {
				var d;
				isTouchDevice() ? (d = c.originalEvent.touches[0], void 0 == d && (d = c.touches[0])) : d = c;
				if (void 0 != d) {
					c = b(d.target);
					var e = 0;
					"horizontal" == f.direction ? (e = d.offsetX, void 0 == e && (e = d.pageX - c.offset().left), e = e / g.width() * f.duration) : (e = d.offsetY, void 0 == e && (e = d.pageY - c.offset().top), e = (c.height() - e) / g.height() * f.duration);
					f.setRange.apply(f, [e]);
					f.onChange(e);
					return ! 1
				}
			};
			g.bind(_event._click, c);
			h.bind(_event._click, c)
		}
	}; (this || (0, eval)("(this)")).bdor = [];
	bdor[30] = function(b, d) {
		return bdor[b] - d
	}
})(jQuery);
bdor[7] = "m"; (function(b) {
	b.fn.addVideoSkin = function(c) {
		var d = this;
		this.theme = void 0;
		for (var e = 0; e < videoThemes.length; e++) videoThemes[e].name == c && (this.theme = videoThemes[e]);
		void 0 == this.theme && (this.theme = videoThemes[0]);
		c = this.find("video:first");
		var f = c[0];
		if (void 0 != f && null != f) {
			this.addClass("video-player").addClass(this.theme.name);
			var g = b('<div class="video-controls slider-action"></div>');
			this.append(g);
			e = b('<div class="control-border"></div>');
			g.append(e);
			var h = b('<div class="video-play"></div>');
			g.append(h);
			e = b('<div class="bevel"></div>');
			g.append(e);
			e = function(b) { ! 1 == f.paused ? f.pause() : f.play();
				stopEvent(b);
				return ! 1
			};
			c.bind(_event._click, e);
			h.bind(_event._click, e);
			c.bind("play",
			function() {
				h.addClass("paused-button")
			});
			c.bind("pause",
			function() {
				h.removeClass("paused-button")
			});
			c.bind("ended",
			function() {
				h.removeClass("paused-button")
			});
			g.playButton = h;
			var k = b('<div class="video-timer">00:00</div>');
			g.append(k);
			c.bind("timeupdate",
			function() {
				var b = f.currentTime,
				c = f.duration;
				if (0 == c || void 0 == c) c = 100;
				l.slider({
					maxValue: c
				});
				l.slider({
					value: b
				});
				k.text(timeFormat(b))
			});
			g.videoTimer = k;
			var l = b('<div class="video-seek"></div>');
			g.append(l); (function() {
				var b = f.duration;
				if (0 == b || void 0 == b) b = 100;
				l.slider({
					range: 0,
					max: b,
					direction: "horizontal",
					onChange: function(b) {
						try {
							f.currentTime = b
						} catch(c) {}
					}
				});
				g.show();
				d.controlbarWidth = g.width()
			})();
			g.videoSeek = l;
			e = b('<div class="bevel"></div>');
			g.append(e);
			var m = b('<div class="volume-seek"></div>');
			g.append(m);
			this.volume_value = 1;
			m.slider({
				range: 1,
				max: 1,
				direction: "vertical",
				onChange: function(b) {
					try {
						d.volume_value = b,
						0 == b ? (f.muted = !0, p.addClass("volume-mute")) : (f.muted = !1, p.removeClass("volume-mute")),
						f.volume = b
					} catch(c) {}
				}
			});
			g.volumeSeek = m;
			var p = b('<div class="volume-button"></div>');
			g.append(p);
			p.bind(_event._click,
			function() { ! 0 == f.muted ? (f.muted = !1, m.slider({
					value: d.volume_value
				}), p.removeClass("volume-mute")) : (f.muted = !0, m.slider({
					value: 0
				}), p.addClass("volume-mute"));
				return ! 1
			});
			p.bind("mouseenter",
			function() {
				m.css({
					visiblity: "visible",
					opacity: "1"
				})
			});
			p.bind("mouseleave",
			function() {
				m.css({
					visiblity: "hidden",
					opacity: "0"
				})
			});
			m.bind("mouseenter",
			function() {
				m.css({
					visiblity: "visible",
					opacity: "1"
				})
			});
			m.bind("mouseleave",
			function() {
				m.css({
					visiblity: "hidden",
					opacity: "0"
				})
			});
			g.volumeButton = p;
			var n = b('<div class="player-fullscreen"></div>');
			g.append(n);
			n.bind(_event._click,
			function() {
				fullScreenApi.supportsFullScreen ? fullScreenApi.isFullScreen() ? fullScreenApi.cancelFullScreen() : fullScreenApi.requestFullScreen(f) : f.webkitSupportsFullscreen && f.webkitEnterFullscreen();
				return ! 1
			});
			c.bind(fullScreenApi.fullScreenEventName,
			function() {
				fullScreenApi.isFullScreen() ? n.addClass("player-exit-fullscreen") : n.removeClass("player-exit-fullscreen")
			});
			g.fullscreenButton = n;
			this.controlbar = g;
			this.resizeVideoSkin()
		}
	};
	bdor.i = function(b) {
		return bdor[b]
	};
	b.fn.resizeVideoSkin = function() {
		var b = this.find("video:first")[0],
		d = this.controlbar;
		if (void 0 != d) {
			var e = d.videoSeek,
			f = d.volumeSeek,
			g = d.volumeButton,
			h = d.fullscreenButton,
			k = this.width(),
			l = Math.max(0, k - this.theme.seekWidth);
			0 >= l ? e.css({
				display: "none"
			}) : (e.css({
				width: l,
				display: "block"
			}), e.slider({
				value: b.currentTime
			}));
			d = g.offset().left - d.offset().left + (g.width() - f.width()) / 2;
			k < this.theme.fullscreenWidth ? (h.css({
				display: "none"
			}), k < this.theme.volumeWidth ? (g.css({
				display: "none"
			}), f.css({
				left: "-45px"
			})) : (g.css({
				display: "block"
			}), f.css({
				left: d + "px"
			}))) : (g.css({
				display: "block"
			}), h.css({
				display: "block"
			}), f.css({
				left: d + "px"
			})); ! 0 == b.muted ? f.slider({
				value: 0
			}) : f.slider({
				value: this.volume_value
			})
		}
	};
	bdor.f = "f";
	b.fn.addAudioSkin = function(c) {
		var d = this;
		this.theme = void 0;
		for (var e = 0; e < audioThemes.length; e++) audioThemes[e].name == c && (this.theme = audioThemes[e]);
		void 0 == this.theme && (this.theme = audioThemes[0]);
		c = this.find("audio:first");
		var f = c[0];
		if (void 0 != f && null != f) {
			this.audioList = [];
			this.audioIndex = 0;
			if (0 == c.children("source").length) e = c.attr("src"),
			"" != e && void 0 != e && this.audioList.push(c.attr("src"));
			else for (e = 0; e < c.children("source").length; e++) {
				var g = c.children("source")[e];
				this.audioList.push(g.src)
			}
			if (this.audioResources.length > this.audioList.length) for (this.audioList = [], e = 0; e < this.audioResources.length; e++) this.audioList.push(this.audioResources[e]);
			this.addClass("audio-player").addClass(this.theme.name);
			this.play_btn = b('<div class="audio-play slider-action"></div>');
			this.append(this.play_btn);
			this.play_btn.bind(_event._click,
			function(b) { ! 1 == f.paused ? f.pause() : f.play();
				stopEvent(b);
				return ! 1
			});
			c.bind("play",
			function() {
				d.play_btn.addClass("paused-button")
			});
			c.bind("pause",
			function() {
				d.play_btn.removeClass("paused-button")
			});
			c.bind("ended",
			function() {
				d.play_btn.removeClass("paused-button");
				d.audioIndex < d.audioList.length - 1 && h()
			});
			this.back_btn = b('<div class="back_button slider-action"></div>');
			this.append(this.back_btn);
			this.back_btn.bind(_event._click,
			function(b) {
				if (0 != d.audioList.length) {
					d.audioIndex--;
					0 > d.audioIndex && (d.audioIndex += d.audioList.length);
					var c = d.audioList[d.audioIndex];
					f.src = c;
					d.audio_name.text(l(c));
					f.play();
					stopEvent(b);
					return ! 1
				}
			});
			this.forward_btn = b('<div class="forward_button slider-action"></div>');
			this.append(this.forward_btn);
			var h = function(b) {
				if (0 != d.audioList.length) {
					d.audioIndex++;
					d.audioIndex %= d.audioList.length;
					var c = d.audioList[d.audioIndex];
					f.src = c;
					d.audio_name.text(l(c));
					f.play();
					stopEvent(b);
					return ! 1
				}
			};
			this.forward_btn.bind(_event._click, h);
			this.volume_seek = b('<div class="volume-seek slider-action"></div>');
			this.append(this.volume_seek);
			this.volume_value = 1;
			this.volume_seek.slider({
				range: 1,
				max: 1,
				direction: this.theme.volumeDirection,
				onChange: function(b) {
					try {
						d.volume_value = b,
						0 == b ? (f.muted = !0, d.volume_btn.addClass("volume-mute")) : (f.muted = !1, d.volume_btn.removeClass("volume-mute")),
						f.volume = b
					} catch(c) {}
				}
			});
			this.volume_btn = b('<div class="volume-button slider-action"></div>');
			this.append(this.volume_btn);
			var k = function(b) {
				d.volume_value = f.volume + b;
				d.volume_value = Math.max(0, d.volume_value);
				d.volume_value = Math.min(1, d.volume_value);
				f.volume = d.volume_value
			};
			this.volume_up_btn = b('<div class="volume-up-button slider-action"></div>');
			this.volume_down_btn = b('<div class="volume-down-button slider-action"></div>');
			this.volume_up_btn.bind(_event._click,
			function() {
				k(0.1)
			});
			this.volume_down_btn.bind(_event._click,
			function() {
				k( - 0.1)
			});
			this.append(this.volume_up_btn);
			this.append(this.volume_down_btn);
			this.volume_btn.bind(_event._click,
			function(b) { ! 0 == f.muted ? (f.muted = !1, d.volume_seek.slider({
					value: d.volume_value
				}), d.volume_btn.removeClass("volume-mute")) : (f.muted = !0, d.volume_seek.slider({
					value: 0
				}), d.volume_btn.addClass("volume-mute"));
				stopEvent(b);
				return ! 1
			});
			this.audio_timer = b('<div class="audio-timer">00:00/00:00</div>');
			this.append(this.audio_timer);
			c.bind("timeupdate",
			function() {
				var b = f.currentTime,
				c = f.duration;
				d.audio_seek.slider({
					maxValue: c
				});
				d.audio_seek.slider({
					value: b
				});
				d.audio_timer.text(timeFormat(b) + "/" + timeFormat(c))
			});
			this.audio_seek = b('<div class="audio-seek slider-action"></div>');
			this.append(this.audio_seek); (function() {
				var b = f.duration;
				if (0 == b || void 0 == b) b = 100;
				d.audio_seek.slider({
					range: 0,
					max: b,
					direction: "horizontal",
					onChange: function(b) {
						try {
							f.currentTime = b
						} catch(c) {}
					}
				});
				d.resizeAudioSkin()
			})();
			this.audio_name = b('<div class="audio-file"></div>');
			this.append(this.audio_name);
			e = "";
			0 < this.audioList.length && (e = this.audioList[0]);
			var l = function(b) {
				if ("" == b) return "";
				var c = -1,
				c = -1 == b.indexOf("\\") ? b.lastIndexOf("/") : b.lastIndexOf("\\");
				iNameEnd = b.lastIndexOf(".");
				return fileTitle = b.substr(c + 1, iNameEnd - c - 1)
			};
			this.audio_name.text(l(e));
			d.resizeAudioSkin()
		}
	};
	b.fn.resizeAudioSkin = function() {
		var b = this.find("audio:first")[0];
		if (null != this.theme && void 0 != this.theme) {
			var d = Math.max(0, this.width() - this.theme.audioSeek);
			0 >= d ? this.audio_seek.css({
				display: "none"
			}) : (this.audio_seek.css({
				width: d,
				display: "block"
			}), this.audio_seek.slider({
				value: b.currentTime
			}));
			d = this.theme.wolumnWidth;
			void 0 != d && (this.width() < d ? (this.volume_btn.css({
				display: "none"
			}), this.volume_seek.css({
				display: "none"
			})) : (this.volume_btn.css({
				display: "block"
			}), this.volume_seek.css({
				display: "block"
			})), !1 == b.muted ? this.volume_seek.slider({
				value: this.volume_value
			}) : this.volume_seek.slider({
				value: 0
			}))
		}
	};
	b.fn.refreshAudioSeek = function() {
		var b = this.find("audio:first")[0];
		null != this.theme && void 0 != this.theme && null != b && (this.audio_seek.slider({
			value: b.currentTime
		}), !1 == b.muted ? this.volume_seek.slider({
			value: this.volume_value
		}) : this.volume_seek.slider({
			value: 0
		}))
	};
	this.skin = this.bdor
})(jQuery);
var videoThemes = [{
	name: "default",
	seekWidth: 150,
	volumeWidth: 105,
	fullscreenWidth: 130
},
{
	name: "round",
	seekWidth: 225,
	volumeWidth: 145,
	fullscreenWidth: 150
},
{
	name: "classic",
	seekWidth: 195,
	volumeWidth: 135,
	fullscreenWidth: 170
},
{
	name: "smallblack",
	seekWidth: 135,
	volumeWidth: 85,
	fullscreenWidth: 110
},
{
	name: "circle",
	seekWidth: 150,
	volumeWidth: 105,
	fullscreenWidth: 130
}],
audioThemes = [{
	name: "default",
	volumeDirection: "horizontal",
	audioSeek: 20,
	wolumnWidth: 170
},
{
	name: "advanced",
	volumeDirection: "horizontal"
},
{
	name: "wave",
	volumeDirection: "horizontal",
	audioSeek: 125
},
{
	name: "glass",
	volumeDirection: "horizontal"
},
{
	name: "simple",
	volumeDirection: "horizontal"
},
{
	name: "enjoy",
	volumeDirection: "horizontal"
},
{
	name: "decent",
	volumeDirection: "vertical"
},
{
	name: "tree",
	volumeDirection: "horizontal"
},
{
	name: "christmas",
	volumeDirection: "vertical"
},
{
	name: "turnonoff",
	volumeDirection: "horizontal"
},
{
	name: "fade",
	volumeDirection: "horizontal"
}],
audioThemeNames = {
	GlassAudioPlayer: "",
	SimpleAudioPlayer: "",
	StandardAudioPlayer: "",
	StandardAudioPlayer02: "",
	StandardAudioPlayer03: "",
	StandardAudioPlayer04: "",
	StandardAudioPlayer05: "",
	StandardAudioPlayer06: ""
},
timeFormat = function(b) {
	var c = 10 > Math.floor(b / 60) ? "0" + Math.floor(b / 60) : Math.floor(b / 60);
	return c + ":" + (10 > Math.floor(b - 60 * c) ? "0" + Math.floor(b - 60 * c) : Math.floor(b - 60 * c))
},
stopEvent = function(b) {
	b = b || window.event;
	b.preventDefault ? (b.preventDefault(), b.stopPropagation()) : (b.returnValue = !1, b.cancelBubble = !0)
};
bdor[8] = "o"; (function(b, c, d) {
	function e(b, c) {
		var d = (b[0] || 0) - (c[0] || 0);
		return 0 < d || !d && 0 < b.length && e(b.slice(1), c.slice(1))
	}
	function f(b) {
		if (typeof b != h) return b;
		var c = [],
		d = "",
		e;
		for (e in b) d = typeof b[e] == h ? f(b[e]) : [e, k ? encodeURI(b[e]) : b[e]].join("="),
		c.push(d);
		return c.join("&")
	}
	function g(b) {
		var c = [],
		d;
		for (d in b) c.push(['<param name="', d, '" value="', f(b[d]), '" />'].join(""));
		return c.join("")
	}
	var h = "object",
	k = !0;
	try {
		var l = d.description || (new d("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")
	} catch(m) {
		l = "Unavailable"
	}
	var p = l.match(/\d+/g) || [0];
	b[c] = {
		available: 0 < p[0],
		activeX: d && !d.name,
		version: {
			original: l,
			array: p,
			string: p.join("."),
			major: parseInt(p[0], 10) || 0,
			minor: parseInt(p[1], 10) || 0,
			release: parseInt(p[2], 10) || 0
		},
		hasVersion: function(b) {
			b = /string|number/.test(typeof b) ? b.toString().split(".") : /object/.test(typeof b) ? [b.major, b.minor] : b || [0, 0];
			return e(p, b)
		},
		encodeParams: !0,
		expressInstall: "expressInstall.swf",
		expressInstallIsActive: !1,
		create: function(b) {
			if (!b.swf || this.expressInstallIsActive || !this.available && !b.hasVersionFail) return ! 1;
			if (!this.hasVersion(b.hasVersion || 1)) {
				this.expressInstallIsActive = !0;
				if ("function" == typeof b.hasVersionFail && !b.hasVersionFail.apply(b)) return ! 1;
				b = {
					swf: b.expressInstall || this.expressInstall,
					height: 137,
					width: 214,
					flashvars: {
						MMredirectURL: location.href,
						MMplayerType: this.activeX ? "ActiveX": "PlugIn",
						MMdoctitle: document.title.slice(0, 47) + " - Flash Player Installation"
					}
				}
			}
			attrs = {
				data: b.swf,
				type: "application/x-shockwave-flash",
				id: b.id || "flash_" + Math.floor(999999999 * Math.random()),
				width: b.width || 320,
				height: b.height || 180,
				style: b.style || ""
			};
			k = "undefined" !== typeof b.useEncode ? b.useEncode: this.encodeParams;
			b.movie = b.swf;
			b.wmode = b.wmode || "opaque";
			delete b.fallback;
			delete b.hasVersion;
			delete b.hasVersionFail;
			delete b.height;
			delete b.id;
			delete b.swf;
			delete b.useEncode;
			delete b.width;
			var c = document.createElement("div"),
			d;
			d = attrs;
			var e = [],
			f;
			for (f in d) d[f] && e.push([f, '="', d[f], '"'].join(""));
			d = e.join(" ");
			c.innerHTML = ["<object ", d, ">", g(b), "</object>"].join("");
			return c.firstChild
		}
	};
	b.fn[c] = function(d) {
		var e = this.find(h).andSelf().filter(h);
		/string|object/.test(typeof d) && this.each(function() {
			var e = b(this),
			f;
			d = typeof d == h ? d: {
				swf: d
			};
			d.fallback = this;
			if (f = b[c].create(d)) e.children().remove(),
			e.html(f)
		});
		"function" == typeof d && e.each(function() {
			var e = this;
			e.jsInteractionTimeoutMs = e.jsInteractionTimeoutMs || 0;
			660 > e.jsInteractionTimeoutMs && (e.clientWidth || e.clientHeight ? d.call(e) : setTimeout(function() {
				b(e)[c](d)
			},
			e.jsInteractionTimeoutMs + 66))
		});
		return e
	}
})(jQuery, "flash", navigator.plugins["Shockwave Flash"] || window.ActiveXObject);
jQuery.easing.jswing = jQuery.easing.swing;
jQuery.extend(jQuery.easing, {
	def: "easeOutQuad",
	swing: function(b, c, d, e, f) {
		return jQuery.easing[jQuery.easing.def](b, c, d, e, f)
	},
	easeInQuad: function(b, c, d, e, f) {
		return e * (c /= f) * c + d
	},
	easeOutQuad: function(b, c, d, e, f) {
		return - e * (c /= f) * (c - 2) + d
	},
	easeInOutQuad: function(b, c, d, e, f) {
		return 1 > (c /= f / 2) ? e / 2 * c * c + d: -e / 2 * (--c * (c - 2) - 1) + d
	},
	easeInCubic: function(b, c, d, e, f) {
		return e * (c /= f) * c * c + d
	},
	easeOutCubic: function(b, c, d, e, f) {
		return e * ((c = c / f - 1) * c * c + 1) + d
	},
	easeInOutCubic: function(b, c, d, e, f) {
		return 1 > (c /= f / 2) ? e / 2 * c * c * c + d: e / 2 * ((c -= 2) * c * c + 2) + d
	},
	easeInQuart: function(b, c, d, e, f) {
		return e * (c /= f) * c * c * c + d
	},
	easeOutQuart: function(b, c, d, e, f) {
		return - e * ((c = c / f - 1) * c * c * c - 1) + d
	},
	easeInOutQuart: function(b, c, d, e, f) {
		return 1 > (c /= f / 2) ? e / 2 * c * c * c * c + d: -e / 2 * ((c -= 2) * c * c * c - 2) + d
	},
	easeInQuint: function(b, c, d, e, f) {
		return e * (c /= f) * c * c * c * c + d
	},
	easeOutQuint: function(b, c, d, e, f) {
		return e * ((c = c / f - 1) * c * c * c * c + 1) + d
	},
	easeInOutQuint: function(b, c, d, e, f) {
		return 1 > (c /= f / 2) ? e / 2 * c * c * c * c * c + d: e / 2 * ((c -= 2) * c * c * c * c + 2) + d
	},
	easeInSine: function(b, c, d, e, f) {
		return - e * Math.cos(c / f * (Math.PI / 2)) + e + d
	},
	easeOutSine: function(b, c, d, e, f) {
		return e * Math.sin(c / f * (Math.PI / 2)) + d
	},
	easeInOutSine: function(b, c, d, e, f) {
		return - e / 2 * (Math.cos(Math.PI * c / f) - 1) + d
	},
	easeInExpo: function(b, c, d, e, f) {
		return 0 == c ? d: e * Math.pow(2, 10 * (c / f - 1)) + d
	},
	easeOutExpo: function(b, c, d, e, f) {
		return c == f ? d + e: e * ( - Math.pow(2, -10 * c / f) + 1) + d
	},
	easeInOutExpo: function(b, c, d, e, f) {
		return 0 == c ? d: c == f ? d + e: 1 > (c /= f / 2) ? e / 2 * Math.pow(2, 10 * (c - 1)) + d: e / 2 * ( - Math.pow(2, -10 * --c) + 2) + d
	},
	easeInCirc: function(b, c, d, e, f) {
		return - e * (Math.sqrt(1 - (c /= f) * c) - 1) + d
	},
	easeOutCirc: function(b, c, d, e, f) {
		return e * Math.sqrt(1 - (c = c / f - 1) * c) + d
	},
	easeInOutCirc: function(b, c, d, e, f) {
		return 1 > (c /= f / 2) ? -e / 2 * (Math.sqrt(1 - c * c) - 1) + d: e / 2 * (Math.sqrt(1 - (c -= 2) * c) + 1) + d
	},
	easeInElastic: function(b, c, d, e, f) {
		b = 1.70158;
		var g = 0,
		h = e;
		if (0 == c) return d;
		if (1 == (c /= f)) return d + e;
		g || (g = 0.3 * f);
		h < Math.abs(e) ? (h = e, b = g / 4) : b = g / (2 * Math.PI) * Math.asin(e / h);
		return - (h * Math.pow(2, 10 * (c -= 1)) * Math.sin(2 * (c * f - b) * Math.PI / g)) + d
	},
	easeOutElastic: function(b, c, d, e, f) {
		b = 1.70158;
		var g = 0,
		h = e;
		if (0 == c) return d;
		if (1 == (c /= f)) return d + e;
		g || (g = 0.3 * f);
		h < Math.abs(e) ? (h = e, b = g / 4) : b = g / (2 * Math.PI) * Math.asin(e / h);
		return h * Math.pow(2, -10 * c) * Math.sin(2 * (c * f - b) * Math.PI / g) + e + d
	},
	easeInOutElastic: function(b, c, d, e, f) {
		b = 1.70158;
		var g = 0,
		h = e;
		if (0 == c) return d;
		if (2 == (c /= f / 2)) return d + e;
		g || (g = 0.3 * f * 1.5);
		h < Math.abs(e) ? (h = e, b = g / 4) : b = g / (2 * Math.PI) * Math.asin(e / h);
		return 1 > c ? -0.5 * h * Math.pow(2, 10 * (c -= 1)) * Math.sin(2 * (c * f - b) * Math.PI / g) + d: h * Math.pow(2, -10 * (c -= 1)) * Math.sin(2 * (c * f - b) * Math.PI / g) * 0.5 + e + d
	},
	easeInBack: function(b, c, d, e, f, g) {
		void 0 == g && (g = 1.70158);
		return e * (c /= f) * c * ((g + 1) * c - g) + d
	},
	easeOutBack: function(b, c, d, e, f, g) {
		void 0 == g && (g = 1.70158);
		return e * ((c = c / f - 1) * c * ((g + 1) * c + g) + 1) + d
	},
	easeInOutBack: function(b, c, d, e, f, g) {
		void 0 == g && (g = 1.70158);
		return 1 > (c /= f / 2) ? e / 2 * c * c * (((g *= 1.525) + 1) * c - g) + d: e / 2 * ((c -= 2) * c * (((g *= 1.525) + 1) * c + g) + 2) + d
	},
	easeInBounce: function(b, c, d, e, f) {
		return e - jQuery.easing.easeOutBounce(b, f - c, 0, e, f) + d
	},
	easeOutBounce: function(b, c, d, e, f) {
		return (c /= f) < 1 / 2.75 ? 7.5625 * e * c * c + d: c < 2 / 2.75 ? e * (7.5625 * (c -= 1.5 / 2.75) * c + 0.75) + d: c < 2.5 / 2.75 ? e * (7.5625 * (c -= 2.25 / 2.75) * c + 0.9375) + d: e * (7.5625 * (c -= 2.625 / 2.75) * c + 0.984375) + d
	},
	easeInOutBounce: function(b, c, d, e, f) {
		return c < f / 2 ? 0.5 * jQuery.easing.easeInBounce(b, 2 * c, 0, e, f) + d: 0.5 * jQuery.easing.easeOutBounce(b, 2 * c - f, 0, e, f) + 0.5 * e + d
	}
}); (function(b) {
	var c = [],
	d = function() {},
	e = 0,
	f = [],
	g = function() {
		e++;
		e >= c.length && (d(f), d = function() {})
	},
	h = function(c) {
		var d = new Image;
		b(d).load(function() {
			f.push({
				url: c,
				img: d
			});
			g()
		}).error(function() {
			f.push(d);
			g()
		}).attr("src", c)
	};
	b.fn.loader = function(e, f, g) {
		e && b.extend(c, e);
		"function" == typeof f && (d = f);
		for (e = 0; e < c.length; e++) h(c[e])
	}
})(jQuery);
var phoneIconInfo = {
	width: 600,
	height: 600,
	iconInfo: [{
		id: "next",
		position: {
			x: 96,
			y: 193
		},
		width: 48,
		height: 48
	},
	{
		id: "prev",
		position: {
			x: 10,
			y: 193
		},
		width: 48,
		height: 48
	},
	{
		id: "search",
		position: {
			x: 178,
			y: 18
		},
		width: 48,
		height: 48
	},
	{
		id: "tableofcontent",
		position: {
			x: 255,
			y: 21
		},
		width: 48,
		height: 48
	},
	{
		id: "zoomIn",
		position: {
			x: 19,
			y: 106
		},
		width: 48,
		height: 48
	},
	{
		id: "thumb",
		position: {
			x: 19,
			y: 18
		},
		width: 48,
		height: 48
	},
	{
		id: "more",
		position: {
			x: 97,
			y: 19
		},
		width: 48,
		height: 48
	},
	{
		id: "miSearch",
		position: {
			x: 21,
			y: 284
		},
		width: 32,
		height: 32
	},
	{
		id: "miBookmark",
		position: {
			x: 373,
			y: 284
		},
		width: 32,
		height: 32
	},
	{
		id: "miShare",
		position: {
			x: 87,
			y: 284
		},
		width: 32,
		height: 32
	},
	{
		id: "miHome",
		position: {
			x: 495,
			y: 284
		},
		width: 32,
		height: 32
	},
	{
		id: "twitter",
		position: {
			x: 16,
			y: 423
		},
		width: 120,
		height: 120
	},
	{
		id: "facebook",
		position: {
			x: 161,
			y: 423
		},
		width: 120,
		height: 120
	},
	{
		id: "google",
		position: {
			x: 462,
			y: 423
		},
		width: 120,
		height: 120
	},
	{
		id: "linkedin",
		position: {
			x: 309,
			y: 423
		},
		width: 120,
		height: 120
	},
	{
		id: "collapsed",
		position: {
			x: 406,
			y: 348
		},
		width: 24,
		height: 24
	},
	{
		id: "expanded",
		position: {
			x: 449,
			y: 351
		},
		width: 24,
		height: 24
	},
	{
		id: "download",
		position: {
			x: 162,
			y: 284
		},
		width: 32,
		height: 32
	},
	{
		id: "print",
		position: {
			x: 305,
			y: 283
		},
		width: 32,
		height: 32
	},
	{
		id: "autoPlay",
		position: {
			x: 184,
			y: 104
		},
		width: 48,
		height: 48
	},
	{
		id: "stopAutoPlay",
		position: {
			x: 258,
			y: 104
		},
		width: 48,
		height: 48
	},
	{
		id: "languageChange",
		position: {
			x: 232,
			y: 284
		},
		width: 32,
		height: 32
	},
	{
		id: "setting",
		position: {
			x: 437,
			y: 282
		},
		width: 32,
		height: 32
	},
	{
		id: "choosed",
		position: {
			x: 356,
			y: 346
		},
		width: 28,
		height: 28
	},
	{
		id: "unchoosed",
		position: {
			x: 297,
			y: 346
		},
		width: 28,
		height: 28
	},
	{
		id: "gotoPage",
		position: {
			x: 336,
			y: 20
		},
		width: 48,
		height: 48
	},
	{
		id: "zoomOut",
		position: {
			x: 101,
			y: 107
		},
		width: 48,
		height: 48
	}]
},
catalogIconInfo = {
	width: 480,
	height: 174,
	iconInfo: [{
		id: "background",
		position: {
			x: 3,
			y: 9
		},
		width: 420,
		height: 50
	},
	{
		id: "thumb",
		position: {
			x: 144,
			y: 66
		},
		width: 38,
		height: 38
	},
	{
		id: "search",
		position: {
			x: 192,
			y: 66
		},
		width: 38,
		height: 38
	},
	{
		id: "prev",
		position: {
			x: 240,
			y: 66
		},
		width: 38,
		height: 38
	},
	{
		id: "next",
		position: {
			x: 288,
			y: 66
		},
		width: 38,
		height: 38
	},
	{
		id: "more",
		position: {
			x: 336,
			y: 66
		},
		width: 38,
		height: 38
	},
	{
		id: "fullScreen",
		position: {
			x: 384,
			y: 66
		},
		width: 38,
		height: 38
	},
	{
		id: "exitFullScreen",
		position: {
			x: 432,
			y: 66
		},
		width: 38,
		height: 38
	},
	{
		id: "thumb_down",
		position: {
			x: 144,
			y: 106
		},
		width: 38,
		height: 38
	},
	{
		id: "search_down",
		position: {
			x: 192,
			y: 106
		},
		width: 38,
		height: 38
	},
	{
		id: "prev_down",
		position: {
			x: 240,
			y: 106
		},
		width: 38,
		height: 38
	},
	{
		id: "next_down",
		position: {
			x: 288,
			y: 106
		},
		width: 38,
		height: 38
	},
	{
		id: "more_down",
		position: {
			x: 336,
			y: 106
		},
		width: 38,
		height: 38
	},
	{
		id: "fullScreen_down",
		position: {
			x: 384,
			y: 106
		},
		width: 38,
		height: 38
	},
	{
		id: "exitFullScreen_down",
		position: {
			x: 432,
			y: 106
		},
		width: 38,
		height: 38
	}]
}; (function(b) {
	var c = function() {
		return Hammer.HAS_TOUCHEVENTS && navigator.userAgent.match(Hammer.MOBILE_REGEX)
	};
	bdor[3] = "f";
	var d = function(b) {
		var e = this;
		this.theButton = b;
		this.eventSource = b[0];
		c() ? (b.bind("touchstart",
		function() {
			d.prototype.mouseDown.apply(e, arguments)
		}), b.bind("touchend",
		function() {
			d.prototype.mouseUp.apply(e, arguments)
		})) : (b.bind("mousedown",
		function() {
			d.prototype.mouseDown.apply(e, arguments)
		}), b.bind("mouseleave",
		function() {
			d.prototype.mouseUp.apply(e, arguments)
		}), b.bind("mouseup",
		function() {
			d.prototype.mouseUp.apply(e, arguments)
		}))
	};
	d.prototype.mouseDown = function() {
		this.setAlpha(70)
	};
	d.prototype.mouseUp = function() {
		var b = this;
		window.setTimeout(function() {
			d.prototype.setAlpha.apply(b, [100])
		},
		100)
	};
	d.prototype.setAlpha = function(b) {
		0 > b && (b = 0);
		100 <= b && (b = 100);
		this.theButton.css("opacity", b / 100)
	};
	b.fn.asButton = function() {
		new d(this);
		return this
	};
	bdor[4] = "h";
	var e = function(b) {
		this.eventSource = b[0];
		this.origPicture = b[0].src;
		var d = this.origPicture.lastIndexOf("."),
		f = this.origPicture.substr(0, d),
		d = this.origPicture.substring(d);
		this.pictureDown = f + "_down" + d;
		var g = this;
		c() ? (b.bind("touchstart",
		function() {
			e.prototype.mouseDown.apply(g, arguments)
		}), b.bind("touchend",
		function() {
			e.prototype.mouseUp.apply(g, arguments)
		})) : (b.bind("mouseenter",
		function() {
			e.prototype.mouseOver.apply(g, arguments)
		}), b.bind("mousedown",
		function() {
			e.prototype.mouseDown.apply(g, arguments)
		}), b.bind("mouseup",
		function() {
			e.prototype.mouseUp.apply(g, arguments)
		}), b.bind("mouseleave",
		function() {
			e.prototype.mouseUp.apply(g, arguments)
		}))
	};
	e.prototype.mouseOver = function() {
		this.eventSource.src = this.pictureDown
	};
	e.prototype.mouseDown = function() {
		this.eventSource.src = this.pictureDown
	};
	e.prototype.mouseUp = function() {
		var b = this;
		window.setTimeout(function() {
			b.eventSource.src = b.origPicture
		},
		100)
	};
	b.fn.asImageButton = function() {
		new e(this);
		return this
	};
	var f = function(b) {
		this.eventSource = b[0];
		this.origPicture = b[0].src;
		var d = this.origPicture.lastIndexOf("."),
		e = this.origPicture.substr(0, d),
		d = this.origPicture.substring(d);
		this.pictureDown = e + "_down" + d;
		var g = this;
		c() ? (b.bind("touchstart",
		function() {
			f.prototype.mouseOver.apply(g, arguments)
		}), b.bind("touchend",
		function() {
			f.prototype.mouseUp.apply(g, arguments)
		})) : (b.bind("mouseenter",
		function() {
			f.prototype.mouseOver.apply(g, arguments)
		}), b.bind("mousedown",
		function() {
			f.prototype.mouseDown.apply(g, arguments)
		}), b.bind("mouseup",
		function() {
			f.prototype.mouseUp.apply(g, arguments)
		}), b.bind("mouseleave",
		function() {
			f.prototype.mouseUp.apply(g, arguments)
		}))
	};
	bdor[10] = "l";
	f.prototype.mouseOver = function() {
		this.eventSource.src = this.pictureDown
	};
	f.prototype.mouseDown = function() {
		this.eventSource.src = this.pictureDown
	};
	f.prototype.mouseUp = function() {
		var b = this;
		window.setTimeout(function() {
			b.eventSource.src = b.origPicture
		},
		100)
	};
	b.fn.asImageChangeButton = function() {
		new f(this);
		return this
	};
	var g = function(b) {
		var c = this;
		this.theButton = b;
		this.eventSource = b[0];
		var d = this.theButton.css("top");
		this.iOrigTop = parseInt(d.replace("px", ""));
		this.iJumpTop = this.iOrigTop - 5;
		b.bind("mouseenter",
		function() {
			g.prototype.MouseEnter.apply(c, arguments)
		});
		b.bind("mouseleave",
		function() {
			g.prototype.MouseLeave.apply(c, arguments)
		})
	};
	g.prototype.MouseEnter = function() {
		this.theButton.animate({
			top: this.iJumpTop
		},
		50)
	};
	g.prototype.MouseLeave = function() {
		this.theButton.animate({
			top: this.iOrigTop
		},
		50)
	};
	b.fn.mouseEnterJump = function() {
		new g(this);
		return this
	};
	b.fn.mouseOverCursor = function() {
		new h(this);
		return this
	};
	var h = function(b) {
		b.bind("mouseover",
		function() {
			b.css({
				cursor: "pointer"
			})
		})
	},
	k = function(b) {
		var c = this;
		this.theButton = b;
		this.eventSource = b[0];
		var d = this.theButton.css("top");
		this.iOrigTop = parseInt(d.replace("px", ""));
		d = this.theButton.css("left");
		this.iOrigLeft = parseInt(d.replace("px", ""));
		this.iZoomTop = this.iOrigTop - 3;
		this.iZoomLeft = this.iOrigLeft - 1;
		b.bind("mouseenter",
		function() {
			k.prototype.MouseEnter.apply(c, arguments)
		});
		b.bind("mouseleave",
		function() {
			k.prototype.MouseLeave.apply(c, arguments)
		})
	};
	k.prototype.MouseDown = function() {
		this.theButton.css({
			left: this.iZoomLeft + "px",
			top: this.iZoomTop + "px",
			"-webkit-transform": "scale(1.1)",
			"-moz-transform": "scale(1.1)",
			transform: "scale(1.1)",
			"-ms-transform": "scale(1.1)",
			"-o-transform": "scale(1.1)"
		})
	};
	k.prototype.MouseEnter = function() {
		this.theButton.css({
			left: this.iZoomLeft + "px",
			top: this.iZoomTop + "px",
			"-webkit-transform": "scale(1.2)",
			"-moz-transform": "scale(1.2)",
			transform: "scale(1.2)",
			"-ms-transform": "scale(1.2)",
			"-o-transform": "scale(1.2)"
		})
	};
	k.prototype.MouseLeave = function() {
		this.theButton.css({
			left: this.iOrigLeft + "px",
			top: this.iOrigTop + "px",
			"-webkit-transform": "scale(1)",
			"-moz-transform": "scale(1)",
			transform: "scale(1)",
			"-ms-transform": "scale(1)",
			"-o-transform": "scale(1)"
		})
	};
	var l = function(b) {
		var c = this;
		this.theButton = b;
		this.eventSource = b[0];
		var d = this.theButton.css("top");
		this.iOrigTop = parseInt(d.replace("px", ""));
		d = this.theButton.css("left");
		this.iOrigLeft = parseInt(d.replace("px", ""));
		this.iZoomTop = this.iOrigTop - 1;
		this.iZoomLeft = this.iOrigLeft - 1;
		b.bind("mouseenter",
		function() {
			l.prototype.MouseEnter.apply(c, arguments)
		});
		b.bind("mouseleave",
		function() {
			l.prototype.MouseLeave.apply(c, arguments)
		})
	};
	l.prototype.MouseEnter = function() {
		this.theButton.css({
			left: this.iZoomLeft + "px",
			top: this.iZoomTop + "px",
			"-webkit-transform": "scale(1.1)",
			"-moz-transform": "scale(1.1)",
			transform: "scale(1.1)",
			"-ms-transform": "scale(1.1)",
			"-o-transform": "scale(1.1)"
		})
	};
	l.prototype.MouseLeave = function() {
		this.theButton.css({
			left: this.iOrigLeft + "px",
			top: this.iOrigTop + "px",
			"-webkit-transform": "scale(1)",
			"-moz-transform": "scale(1)",
			transform: "scale(1)",
			"-ms-transform": "scale(1)",
			"-o-transform": "scale(1)"
		})
	};
	b.fn.mouseEnterZoom = function() {
		new l(this);
		return this
	};
	b.fn.mouseEnterUp = function() {
		new m(this);
		return this
	};
	var m = function(b) {
		var c = this;
		this.theButton = b;
		this.eventSource = b[0];
		var d = this.theButton.css("bottom");
		this.iOrigTop = parseInt(d.replace("px", ""));
		d = this.theButton.css("left");
		this.iOrigLeft = parseInt(d.replace("px", ""));
		this.iZoomTop = this.iOrigTop - 1;
		this.iZoomLeft = this.iOrigLeft - 1;
		b.bind("mouseenter",
		function() {
			m.prototype.MouseEnter.apply(c, arguments)
		});
		b.bind("mouseleave",
		function() {
			m.prototype.MouseLeave.apply(c, arguments)
		})
	};
	m.prototype.MouseEnter = function() {
		this.theButton.css({
			bottom: this.iZoomTop + "px",
			"-webkit-transform": "scale(1.1)",
			"-moz-transform": "scale(1.1)",
			transform: "scale(1.1)",
			"-ms-transform": "scale(1.1)",
			"-o-transform": "scale(1.1)"
		})
	};
	m.prototype.MouseLeave = function() {
		this.theButton.css({
			bottom: this.iOrigTop + "px",
			"-webkit-transform": "scale(1)",
			"-moz-transform": "scale(1)",
			transform: "scale(1)",
			"-ms-transform": "scale(1)",
			"-o-transform": "scale(1)"
		})
	};
	b.fn.mouseZoomUp = function() {
		new k(this);
		return this
	};
	b.fn.mouseEnterLight = function() {
		var b = this;
		this.bind(_event._enter,
		function() {
			b.css({
				background: "#EEEEEE"
			})
		});
		this.bind(_event._down,
		function() {
			b.css({
				background: "#EEEEEE"
			})
		});
		c() ? this.bind(_event._end,
		function() {
			b.css({
				background: "transparent"
			})
		}) : this.bind(_event._end,
		function() {
			b.css({
				background: "#EEEEEE"
			})
		});
		this.bind(_event._leave,
		function() {
			b.css({
				background: "transparent"
			})
		});
		return this
	};
	b.fn.mouseEnterShine = function(b, d, e) {
		var f = this,
		g = colorDiv(b, 10);
		this.bind(_event._enter,
		function() {
			f.css({
				background: g
			});
			f.css({
				border: ""
			});
			f.css({
				"border-left": "1px solid " + e,
				"border-top": "1px solid " + e
			});
			f.css({
				"border-right": "1px solid " + d,
				"border-bottom": "1px solid " + d
			})
		});
		this.bind(_event._down,
		function() {
			f.css({
				background: g
			});
			f.css({
				border: ""
			});
			f.css({
				"border-left": "1px solid " + d,
				"border-top": "1px solid " + d
			});
			f.css({
				"border-right": "1px solid " + e,
				"border-bottom": "1px solid " + e
			})
		});
		c() ? this.bind(_event._end,
		function() {
			f.css({
				background: "transparent"
			});
			f.css({
				border: ""
			})
		}) : this.bind(_event._end,
		function() {
			f.css({
				background: g
			});
			f.css({
				border: ""
			});
			f.css({
				"border-left": "1px solid " + e,
				"border-top": "1px solid " + e
			});
			f.css({
				"border-right": "1px solid " + d,
				"border-bottom": "1px solid " + d
			})
		});
		this.bind(_event._leave,
		function() {
			f.css({
				background: "transparent"
			});
			f.css({
				border: ""
			})
		});
		return this
	};
	b.fn.mouseEnterGradient = function(b, d, e) {
		var f = this,
		g = colorAdd(b, 75),
		k = "-webkit-gradient(linear,left top,left bottom,color-stop(0," + g + "),color-stop(0.19," + colorAdd(g, 2) + "),color-stop(0.35," + colorAdd(g, 28) + "),color-stop(0.55, " + colorAdd(g, 6) + "),color-stop(0.75," + colorAdd(g, 4) + "),color-stop(0.85," + colorAdd(g, 2) + "),color-stop(1, " + g + "))";
		this.bind(_event._enter,
		function() {
			f.css("background", k);
			f.css({
				border: ""
			});
			f.css({
				"border-left": "1px solid " + e,
				"border-top": "1px solid " + e
			});
			f.css({
				"border-right": "1px solid " + d,
				"border-bottom": "1px solid " + d
			})
		});
		this.bind(_event._down,
		function() {
			f.setGradient(g, !1);
			f.css({
				border: ""
			});
			f.css({
				"border-left": "1px solid " + d,
				"border-top": "1px solid " + d
			});
			f.css({
				"border-right": "1px solid " + e,
				"border-bottom": "1px solid " + e
			})
		});
		c() ? this.bind(_event._end,
		function() {
			f.css({
				background: "transparent"
			});
			f.css({
				border: ""
			})
		}) : this.bind(_event._end,
		function() {
			f.css("background", k);
			f[0].style.removeAttribute && f[0].style.removeAttribute("filter");
			f.css({
				border: ""
			});
			f.css({
				"border-left": "1px solid " + e,
				"border-top": "1px solid " + e
			});
			f.css({
				"border-right": "1px solid " + d,
				"border-bottom": "1px solid " + d
			})
		});
		this.bind(_event._leave,
		function() {
			f[0].style.removeAttribute && f[0].style.removeAttribute("filter");
			f.css({
				background: "transparent"
			});
			f.css({
				border: ""
			})
		});
		return this
	};
	b.fn.dragToMove = function(c, d, e) {
		var f = !1,
		g = 0,
		k = 0,
		h = 0,
		l = 0;
		b(this).bind(_event._down,
		function(d) {
			var e = b(this)[0];
			e.setCapture ? e.setCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);
			d = isTouch ? d.originalEvent.changedTouches: [d];
			f = !0;
			g = d[0].pageX;
			k = d[0].pageY;
			h = b(c).offset().left;
			l = b(c).offset().top
		});
		b(this).bind(_event._end,
		function(c) {
			c = b(this)[0];
			c.releaseCapture ? c.releaseCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);
			f = !1
		});
		b(this).bind(_event._move,
		function(m) {
			m = isTouch ? m.originalEvent.touches: [m];
			if (f) {
				var t = h + (m[0].pageX - g);
				m = l + (m[0].pageY - k);
				void 0 != d && (t = Math.max(d.x, t), t = Math.min(d.y, t));
				void 0 != e && (m = Math.max(e.x, m), m = Math.min(e.y, m));
				b(c).css({
					left: t + "px",
					top: m + "px"
				})
			}
		});
		b(this).bind("mouseleave",
		function() {
			return f = !1
		})
	};
	b.fn.slideFlipButtonShine = function(c) {
		b(this).bind(_event._over,
		function() {
			b(this).css({
				cursor: "pointer"
			})
		});
		b(this).bind(_event._enter,
		function() {
			b(this).css({
				background: "#000000"
			})
		});
		b(this).bind(_event._leave,
		function() {
			b(this).css({
				background: "#888888"
			})
		})
	};
	bdor[31] = function(b, c) {
		return bdor[b] - bdor[c]
	};
	b.fn.slideZoomButtonShine = function(c) {
		b(this).bind(_event._enter,
		function() {
			b(this).css({
				cursor: "pointer"
			});
			b(this).css({
				background: "#555555"
			})
		});
		b(this).bind(_event._leave,
		function() {
			b(this).css({
				background: ""
			})
		})
	};
	b.fn.mouseEnterChange = function(c, d, e) {
		var f = this;
		this.bind(_event._enter,
		function() {
			var g = b("<img src='" + e + "'>");
			f.empty().append(g);
			f.css({
				background: d
			});
			f.changeButtonColor(c)
		});
		this.bind(_event._end,
		function() {
			var c = b("<img src='" + e + "'>");
			f.empty().append(c);
			f.css({
				background: "transparent"
			});
			f.changeButtonColor(d)
		});
		this.bind(_event._leave,
		function() {
			var c = b("<img src='" + e + "'>");
			f.empty().append(c);
			f.css({
				background: "transparent"
			});
			f.changeButtonColor(d)
		});
		return this
	};
	b.fn.clickExceptMove = function(b) {
		var c = !1,
		d = !1,
		e = new Point(0, 0);
		this.bind(_event._down,
		function(b) {
			b = isTouch ? b.originalEvent.touches: [b];
			c = !0;
			d = !1;
			e.x = b[0].pageX;
			e.y = b[0].pageY;
			1 < b.length && (c = !1)
		});
		this.bind(_event._move,
		function(b) {
			b = isTouch ? b.originalEvent.touches: [b];
			d = 1 >= Math.abs(b[0].pageX - e.x) && 1 >= Math.abs(b[0].pageY - e.y) ? !1 : !0
		});
		this.hammer().on("doubletap",
		function(b) {
			c = !1
		});
		this.bind(_event._end,
		function(e) {
			c && !d && b();
			d = c = !1
		})
	};
	b.fn.enterToChange = function(b, c, d, e, f) {
		var g = this.children(),
		k = this;
		this.bind(_event._down,
		function(h) {
			c = k.attr("id");
			g.cssSprite(b, c + "_down", d, e, f)
		});
		this.bind(_event._enter,
		function(h) {
			c = k.attr("id");
			g.cssSprite(b, c + "_down", d, e, f)
		});
		this.bind(_event._leave,
		function(h) {
			c = k.attr("id");
			g.cssSprite(b, c, d, e, f)
		})
	};
	b.fn.addCssSprite = function(c, d, e, f, g) {
		var k = b("<div></div>");
		k.cssSprite(c, d, e, f, g);
		this.append(k)
	};
	b.fn.changeCssSprite = function(b, c, d, e, f) {
		this.children().cssSprite(b, c, d, e, f)
	};
	b.fn.cssSprite = function(b, c, d, e, f) {
		if (f.iconInfo) {
			for (var g = 0,
			k = 0; k < f.iconInfo.length; k++) if (f.iconInfo[k].id == c) {
				g = k;
				break
			}
			c = f.iconInfo[g].position;
			var k = "",
			k = f.width,
			h = f.height,
			l = 0,
			m = 0,
			l = d * k / f.iconInfo[g].width,
			m = e * h / f.iconInfo[g].height;
			c = -c.x * l / k + "px " + -c.y * m / h + "px";
			k = l + "px " + m + "px";
			this.css({
				"background-image": "url(" + b + ")",
				"background-repeat": "no-repeat",
				"background-position": c,
				"-webkit-background-size": k,
				"-o-background-size": k,
				"background-size": k
			})
		}
	};
	bdor[6] = "l"
})(jQuery);
var hddr = []; (function(b, c) {
	function d() {
		if (!e.READY) {
			e.event.determineEventTypes();
			for (var b in e.gestures) e.gestures.hasOwnProperty(b) && e.detection.register(e.gestures[b]);
			e.event.onTouch(e.DOCUMENT, e.EVENT_MOVE, e.detection.detect);
			e.event.onTouch(e.DOCUMENT, e.EVENT_END, e.detection.detect);
			e.READY = !0
		}
	}
	var e = function(b, c) {
		return new e.Instance(b, c || {})
	};
	e.defaults = {
		stop_browser_behavior: {
			touchAction: "none",
			touchCallout: "none",
			contentZooming: "none",
			userDrag: "none",
			tapHighlightColor: "rgba(0,0,0,0)"
		}
	};
	e.HAS_POINTEREVENTS = navigator.pointerEnabled || navigator.msPointerEnabled;
	e.HAS_TOUCHEVENTS = "ontouchstart" in b;
	e.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;
	e.NO_MOUSEEVENTS = e.HAS_TOUCHEVENTS && navigator.userAgent.match(e.MOBILE_REGEX);
	e.EVENT_TYPES = {};
	e.DIRECTION_DOWN = "down";
	e.DIRECTION_LEFT = "left";
	e.DIRECTION_UP = "up";
	e.DIRECTION_RIGHT = "right";
	e.POINTER_MOUSE = "mouse";
	e.POINTER_TOUCH = "touch";
	e.POINTER_PEN = "pen";
	e.EVENT_START = "start";
	e.EVENT_MOVE = "move";
	e.EVENT_END = "end";
	e.DOCUMENT = document;
	e.plugins = {};
	e.READY = !1;
	e.Instance = function(b, c) {
		var f = this;
		return d(),
		this.element = b,
		this.enabled = !0,
		this.options = e.utils.extend(e.utils.extend({},
		e.defaults), c || {}),
		this.options.stop_browser_behavior && e.utils.stopDefaultBrowserBehavior(this.element, this.options.stop_browser_behavior),
		e.event.onTouch(b, e.EVENT_START,
		function(b) {
			f.enabled && e.detection.startDetect(f, b)
		}),
		this
	};
	e.Instance.prototype = {
		on: function(b, c) {
			for (var d = b.split(" "), e = 0; d.length > e; e++) this.element.addEventListener(d[e], c, !1);
			return this
		},
		off: function(b, c) {
			for (var d = b.split(" "), e = 0; d.length > e; e++) this.element.removeEventListener(d[e], c, !1);
			return this
		},
		trigger: function(b, c) {
			var d = e.DOCUMENT.createEvent("Event");
			d.initEvent(b, !0, !0);
			d.gesture = c;
			var f = this.element;
			return e.utils.hasParent(c.target, f) && (f = c.target),
			f.dispatchEvent(d),
			this
		},
		enable: function(b) {
			return this.enabled = b,
			this
		}
	};
	var f = null,
	g = !1,
	h = !1;
	e.event = {
		bindDom: function(b, c, d) {
			c = c.split(" ");
			for (var e = 0; c.length > e; e++) b.addEventListener(c[e], d, !1)
		},
		onTouch: function(b, c, d) {
			var p = this;
			this.bindDom(b, e.EVENT_TYPES[c],
			function(n) {
				var q = n.type.toLowerCase();
				if (!q.match(/mouse/) || !h) { (q.match(/touch/) || q.match(/pointerdown/) || q.match(/mouse/) && 1 === n.which) && (g = !0);
					q.match(/touch|pointer/) && (h = !0);
					var s = 0;
					g && (e.HAS_POINTEREVENTS && c != e.EVENT_END ? s = e.PointerEvent.updatePointer(c, n) : q.match(/touch/) ? s = n.touches.length: h || (s = q.match(/up/) ? 0 : 1), 0 < s && c == e.EVENT_END ? c = e.EVENT_MOVE: s || (c = e.EVENT_END), s || null === f ? f = n: n = f, d.call(e.detection, p.collectEventData(b, c, n)), e.HAS_POINTEREVENTS && c == e.EVENT_END && (s = e.PointerEvent.updatePointer(c, n)));
					s || (f = null, g = !1, h = !1, e.PointerEvent.reset())
				}
			})
		},
		determineEventTypes: function() {
			var b;
			b = e.HAS_POINTEREVENTS ? e.PointerEvent.getEvents() : e.NO_MOUSEEVENTS ? ["touchstart", "touchmove", "touchend touchcancel"] : ["touchstart mousedown", "touchmove mousemove", "touchend touchcancel mouseup"];
			e.EVENT_TYPES[e.EVENT_START] = b[0];
			e.EVENT_TYPES[e.EVENT_MOVE] = b[1];
			e.EVENT_TYPES[e.EVENT_END] = b[2]
		},
		getTouchList: function(b) {
			return e.HAS_POINTEREVENTS ? e.PointerEvent.getTouchList() : b.touches ? b.touches: [{
				identifier: 1,
				pageX: b.pageX,
				pageY: b.pageY,
				target: b.target
			}]
		},
		collectEventData: function(b, c, d) {
			b = this.getTouchList(d, c);
			var f = e.POINTER_TOUCH;
			return (d.type.match(/mouse/) || e.PointerEvent.matchType(e.POINTER_MOUSE, d)) && (f = e.POINTER_MOUSE),
			{
				center: e.utils.getCenter(b),
				timeStamp: (new Date).getTime(),
				target: d.target,
				touches: b,
				eventType: c,
				pointerType: f,
				srcEvent: d,
				preventDefault: function() {
					this.srcEvent.preventManipulation && this.srcEvent.preventManipulation();
					this.srcEvent.preventDefault && this.srcEvent.preventDefault()
				},
				stopPropagation: function() {
					this.srcEvent.stopPropagation()
				},
				stopDetect: function() {
					return e.detection.stopDetect()
				}
			}
		}
	};
	e.PointerEvent = {
		pointers: {},
		getTouchList: function() {
			var b = this,
			c = [];
			return Object.keys(b.pointers).sort().forEach(function(d) {
				c.push(b.pointers[d])
			}),
			c
		},
		updatePointer: function(b, c) {
			return b == e.EVENT_END ? this.pointers = {}: (c.identifier = c.pointerId, this.pointers[c.pointerId] = c),
			Object.keys(this.pointers).length
		},
		matchType: function(b, c) {
			if (!c.pointerType) return ! 1;
			var d = {};
			return d[e.POINTER_MOUSE] = c.pointerType == c.MSPOINTER_TYPE_MOUSE || c.pointerType == e.POINTER_MOUSE,
			d[e.POINTER_TOUCH] = c.pointerType == c.MSPOINTER_TYPE_TOUCH || c.pointerType == e.POINTER_TOUCH,
			d[e.POINTER_PEN] = c.pointerType == c.MSPOINTER_TYPE_PEN || c.pointerType == e.POINTER_PEN,
			d[b]
		},
		getEvents: function() {
			return ["pointerdown MSPointerDown", "pointermove MSPointerMove", "pointerup pointercancel MSPointerUp MSPointerCancel"]
		},
		reset: function() {
			this.pointers = {}
		}
	};
	e.utils = {
		extend: function(b, d, e) {
			for (var f in d) b[f] !== c && e || (b[f] = d[f]);
			return b
		},
		hasParent: function(b, c) {
			for (; b;) {
				if (b == c) return ! 0;
				b = b.parentNode
			}
			return ! 1
		},
		getCenter: function(b) {
			for (var c = [], d = [], e = 0, f = b.length; f > e; e++) c.push(b[e].pageX),
			d.push(b[e].pageY);
			return {
				pageX: (Math.min.apply(Math, c) + Math.max.apply(Math, c)) / 2,
				pageY: (Math.min.apply(Math, d) + Math.max.apply(Math, d)) / 2
			}
		},
		getVelocity: function(b, c, d) {
			return {
				x: Math.abs(c / b) || 0,
				y: Math.abs(d / b) || 0
			}
		},
		getAngle: function(b, c) {
			return 180 * Math.atan2(c.pageY - b.pageY, c.pageX - b.pageX) / Math.PI
		},
		getDirection: function(b, c) {
			var d = Math.abs(b.pageX - c.pageX),
			f = Math.abs(b.pageY - c.pageY);
			return d >= f ? 0 < b.pageX - c.pageX ? e.DIRECTION_LEFT: e.DIRECTION_RIGHT: 0 < b.pageY - c.pageY ? e.DIRECTION_UP: e.DIRECTION_DOWN
		},
		getDistance: function(b, c) {
			var d = c.pageX - b.pageX,
			e = c.pageY - b.pageY;
			return Math.sqrt(d * d + e * e)
		},
		getScale: function(b, c) {
			return 2 <= b.length && 2 <= c.length ? this.getDistance(c[0], c[1]) / this.getDistance(b[0], b[1]) : 1
		},
		getRotation: function(b, c) {
			return 2 <= b.length && 2 <= c.length ? this.getAngle(c[1], c[0]) - this.getAngle(b[1], b[0]) : 0
		},
		isVertical: function(b) {
			return b == e.DIRECTION_UP || b == e.DIRECTION_DOWN
		},
		stopDefaultBrowserBehavior: function(b, c) {
			var d, e = "webkit khtml moz ms o ".split(" ");
			if (c && b.style) {
				for (var f = 0; e.length > f; f++) for (var g in c) c.hasOwnProperty(g) && (d = g, e[f] && (d = e[f] + d.substring(0, 1).toUpperCase() + d.substring(1)), b.style[d] = c[g]);
				"none" == c.userSelect && (b.onselectstart = function() {
					return ! 1
				})
			}
		}
	};
	e.detection = {
		gestures: [],
		current: null,
		previous: null,
		stopped: !1,
		startDetect: function(b, c) {
			this.current || (this.stopped = !1, this.current = {
				inst: b,
				startEvent: e.utils.extend({},
				c),
				lastEvent: !1,
				name: ""
			},
			this.detect(c))
		},
		detect: function(b) {
			if (this.current && !this.stopped) {
				b = this.extendEventData(b);
				for (var c = this.current.inst.options,
				d = 0,
				f = this.gestures.length; f > d; d++) {
					var g = this.gestures[d];
					if (!this.stopped && !1 !== c[g.name] && !1 === g.handler.call(g, b, this.current.inst)) {
						this.stopDetect();
						break
					}
				}
				return this.current && (this.current.lastEvent = b),
				b.eventType == e.EVENT_END && !b.touches.length - 1 && this.stopDetect(),
				b
			}
		},
		stopDetect: function() {
			this.previous = e.utils.extend({},
			this.current);
			this.current = null;
			this.stopped = !0
		},
		extendEventData: function(b) {
			var c = this.current.startEvent;
			if (c && (b.touches.length != c.touches.length || b.touches === c.touches)) {
				c.touches = [];
				for (var d = 0,
				f = b.touches.length; f > d; d++) c.touches.push(e.utils.extend({},
				b.touches[d]))
			}
			var d = b.timeStamp - c.timeStamp,
			f = b.center.pageX - c.center.pageX,
			g = b.center.pageY - c.center.pageY,
			h = e.utils.getVelocity(d, f, g);
			return e.utils.extend(b, {
				deltaTime: d,
				deltaX: f,
				deltaY: g,
				velocityX: h.x,
				velocityY: h.y,
				distance: e.utils.getDistance(c.center, b.center),
				angle: e.utils.getAngle(c.center, b.center),
				direction: e.utils.getDirection(c.center, b.center),
				scale: e.utils.getScale(c.touches, b.touches),
				rotation: e.utils.getRotation(c.touches, b.touches),
				startEvent: c
			}),
			b
		},
		register: function(b) {
			var d = b.defaults || {};
			return d[b.name] === c && (d[b.name] = !0),
			e.utils.extend(e.defaults, d, !0),
			b.index = b.index || 1E3,
			this.gestures.push(b),
			this.gestures.sort(function(b, c) {
				return b.index < c.index ? -1 : b.index > c.index ? 1 : 0
			}),
			this.gestures
		}
	};
	e.gestures = e.gestures || {};
	e.gestures.Hold = {
		name: "hold",
		index: 10,
		defaults: {
			hold_timeout: 500,
			hold_threshold: 1
		},
		timer: null,
		handler: function(b, c) {
			switch (b.eventType) {
			case e.EVENT_START:
				clearTimeout(this.timer);
				e.detection.current.name = this.name;
				this.timer = setTimeout(function() {
					"hold" == e.detection.current.name && c.trigger("hold", b)
				},
				c.options.hold_timeout);
				break;
			case e.EVENT_MOVE:
				b.distance > c.options.hold_threshold && clearTimeout(this.timer);
				break;
			case e.EVENT_END:
				clearTimeout(this.timer)
			}
		}
	};
	e.gestures.Tap = {
		name: "tap",
		index: 100,
		defaults: {
			tap_max_touchtime: 250,
			tap_max_distance: 10,
			tap_always: !0,
			doubletap_distance: 20,
			doubletap_interval: 300
		},
		handler: function(b, c) {
			if (b.eventType == e.EVENT_END) {
				var d = e.detection.previous,
				f = !1;
				b.deltaTime > c.options.tap_max_touchtime || b.distance > c.options.tap_max_distance || (d && "tap" == d.name && b.timeStamp - d.lastEvent.timeStamp < c.options.doubletap_interval && b.distance < c.options.doubletap_distance && (c.trigger("doubletap", b), f = !0), f && !c.options.tap_always || (e.detection.current.name = "tap", c.trigger(e.detection.current.name, b)))
			}
		}
	};
	e.gestures.Swipe = {
		name: "swipe",
		index: 40,
		defaults: {
			swipe_max_touches: 1,
			swipe_velocity: 0.7
		},
		handler: function(b, c) {
			b.eventType != e.EVENT_END || 0 < c.options.swipe_max_touches && b.touches.length > c.options.swipe_max_touches || (b.velocityX > c.options.swipe_velocity || b.velocityY > c.options.swipe_velocity) && (c.trigger(this.name, b), c.trigger(this.name + b.direction, b))
		}
	};
	e.gestures.Drag = {
		name: "drag",
		index: 50,
		defaults: {
			drag_min_distance: 10,
			drag_max_touches: 1,
			drag_block_horizontal: !1,
			drag_block_vertical: !1,
			drag_lock_to_axis: !1,
			drag_lock_min_distance: 25
		},
		triggered: !1,
		handler: function(b, d) {
			if (e.detection.current.name != this.name && this.triggered) return d.trigger(this.name + "end", b),
			this.triggered = !1,
			c;
			if (! (0 < d.options.drag_max_touches && b.touches.length > d.options.drag_max_touches)) switch (b.eventType) {
			case e.EVENT_START:
				this.triggered = !1;
				break;
			case e.EVENT_MOVE:
				if (b.distance < d.options.drag_min_distance && e.detection.current.name != this.name) break;
				e.detection.current.name = this.name; (e.detection.current.lastEvent.drag_locked_to_axis || d.options.drag_lock_to_axis && d.options.drag_lock_min_distance <= b.distance) && (b.drag_locked_to_axis = !0);
				var f = e.detection.current.lastEvent.direction;
				b.drag_locked_to_axis && f !== b.direction && (b.direction = e.utils.isVertical(f) ? 0 > b.deltaY ? e.DIRECTION_UP: e.DIRECTION_DOWN: 0 > b.deltaX ? e.DIRECTION_LEFT: e.DIRECTION_RIGHT);
				this.triggered || (d.trigger(this.name + "start", b), this.triggered = !0);
				d.trigger(this.name, b);
				d.trigger(this.name + b.direction, b); (d.options.drag_block_vertical && e.utils.isVertical(b.direction) || d.options.drag_block_horizontal && !e.utils.isVertical(b.direction)) && b.preventDefault();
				break;
			case e.EVENT_END:
				this.triggered && d.trigger(this.name + "end", b),
				this.triggered = !1
			}
		}
	};
	e.gestures.Transform = {
		name: "transform",
		index: 45,
		defaults: {
			transform_min_scale: 0.01,
			transform_min_rotation: 1,
			transform_always_block: !1
		},
		triggered: !1,
		handler: function(b, d) {
			if (e.detection.current.name != this.name && this.triggered) return d.trigger(this.name + "end", b),
			this.triggered = !1,
			c;
			if (! (2 > b.touches.length)) switch (d.options.transform_always_block && b.preventDefault(), b.eventType) {
			case e.EVENT_START:
				this.triggered = !1;
				break;
			case e.EVENT_MOVE:
				var f = Math.abs(1 - b.scale),
				g = Math.abs(b.rotation);
				if (d.options.transform_min_scale > f && d.options.transform_min_rotation > g) break;
				e.detection.current.name = this.name;
				this.triggered || (d.trigger(this.name + "start", b), this.triggered = !0);
				d.trigger(this.name, b);
				g > d.options.transform_min_rotation && d.trigger("rotate", b);
				f > d.options.transform_min_scale && (d.trigger("pinch", b), d.trigger("pinch" + (1 > b.scale ? "in": "out"), b));
				break;
			case e.EVENT_END:
				this.triggered && d.trigger(this.name + "end", b),
				this.triggered = !1
			}
		}
	};
	e.gestures.Touch = {
		name: "touch",
		index: -1 / 0,
		defaults: {
			prevent_default: !1,
			prevent_mouseevents: !1
		},
		handler: function(b, d) {
			return d.options.prevent_mouseevents && b.pointerType == e.POINTER_MOUSE ? (b.stopDetect(), c) : (d.options.prevent_default && b.preventDefault(), b.eventType == e.EVENT_START && d.trigger(this.name, b), c)
		}
	};
	e.gestures.Release = {
		name: "release",
		index: 1 / 0,
		handler: function(b, c) {
			b.eventType == e.EVENT_END && c.trigger(this.name, b)
		}
	};
	"object" == typeof module && "object" == typeof module.exports ? module.exports = e: (b.Hammer = e, "function" == typeof b.define && b.define.amd && b.define("hammer", [],
	function() {
		return e
	}))
})(this); (function(b, c) {
	b !== c && (Hammer.event.bindDom = function(d, e, f) {
		b(d).on(e,
		function(b) {
			var d = b.originalEvent || b;
			d.pageX === c && (d.pageX = b.pageX, d.pageY = b.pageY);
			d.target || (d.target = b.target);
			d.which === c && (d.which = d.button);
			d.preventDefault || (d.preventDefault = b.preventDefault);
			d.stopPropagation || (d.stopPropagation = b.stopPropagation);
			f.call(this, d)
		})
	},
	Hammer.Instance.prototype.on = function(c, e) {
		return b(this.element).on(c, e)
	},
	Hammer.Instance.prototype.off = function(c, e) {
		return b(this.element).off(c, e)
	},
	Hammer.Instance.prototype.trigger = function(c, e) {
		var f = b(this.element);
		return f.has(e.target).length && (f = b(e.target)),
		f.trigger({
			type: c,
			gesture: e
		})
	},
	b.fn.hammer = function(c) {
		return this.each(function() {
			var e = b(this),
			f = e.data("hammer");
			f ? f && c && Hammer.utils.extend(f.options, c) : e.data("hammer", new Hammer(this, c || {}))
		})
	})
})(window.jQuery || window.Zepto); (function(b) {
	bdor[5] = "i";
	var c = function(c, e, f, g, h) {
		if (void 0 != c && null != c) {
			h = b.extend({
				background: "green",
				cornersTop: !0,
				scale: "noresize"
			},
			h);
			c.prev();
			var k = 0,
			l = !1,
			m = h.background,
			p = h.cornersTop,
			n = h.gradientColors || ["#ddd", "#eee", "#fff"],
			q = h.scale,
			s = [],
			r,
			w,
			u;
			try {
				r = c.clone(),
				w = r[0].getContext("2d"),
				u = c[0].getContext("2d"),
				loaded = 0
			} catch(y) {
				u = w = r = null
			}
			g = g.each(function(c) {
				if (!s[c] && null != u) {
					var d = this;
					d.onload = function() {
						var h = 1;
						if ("noresize" != q) {
							var k = 0 == this.width ? this.naturalWidth: this.width,
							m = 0 == this.height ? this.naturalHeight: this.height,
							n = e / k,
							t = f / m;
							"fit" == q && (h = 1 > n || 1 > t ? Math.min(n, t) : 1);
							"fill" == q && (h = Math.min(n, t))
						}
						b(d).data("flip.scale", h);
						s[c] = u.createPattern(d, "no-repeat");
						s[c].width = k;
						s[c].height = m;
						loaded++;
						loaded != g.length || l || (l = !0, D())
					};
					d.complete && window.setTimeout(function() {
						d.onload()
					},
					10)
				}
			}).get();
			var v = e,
			t = f,
			x = b.browser.msie ? c.offset() : null,
			z,
			C,
			A,
			B;
			b.browser.msie &&
			function() {
				var g = b("<div>").width(e).height(f).css({
					position: "absolute",
					cursor: "default",
					zIndex: 1
				}).appendTo(tmpContainer);
				7 == parseInt(b.browser.version) && g.css({
					opacity: 1E-6,
					background: "#FFF"
				});
				var h = function() {
					x = c.offset();
					return g.css({
						left: x.left + "px",
						top: x.top + "px"
					})
				};
				b(window).resize(h);
				return h()
			} ();
			setInterval(function() {
				window.clearInterval(z);
				C = (new Date).getTime();
				A = v;
				B = t / 50;
				z = window.setInterval(K, 0);
				k += 1;
				0 > k && (k = g.length - 1);
				k == g.length && (k = 0)
			},
			3E3);
			var K = function() {
				var b = (new Date).getTime() - C;
				700 <= b ? (window.clearInterval(z), g.push(g.shift()), s.push(s.shift()), v = e, t = f) : (v = A - 2 * e * b / 700, t = B + 2 * f * b / 700 / 3);
				D()
			},
			J = function(c, d) {
				if (null != u) {
					var g = c * e + d,
					h = -d / c;
					b.browser.msie && (g = Math.round(g), h = Math.round(h));
					u.beginPath();
					u.moveTo(e, Math.min(g, f));
					u.lineTo(e, 0);
					u.lineTo(Math.max(h, 0), 0);
					0 > h ? (u.lineTo(0, Math.min(d, f)), d < f && u.lineTo((f - d) / c, f), u.lineTo(e, f)) : g < f ? u.lineTo(e, g) : (u.lineTo((f - d) / c, f), u.lineTo(e, f))
				}
			},
			D = function() {
				if (l && null != u && null != w) {
					b.browser.msie && u.clearRect(0, 0, e, f);
					u.fillStyle = m;
					u.fillRect(0, 0, e, f);
					var c = g[0],
					d = b(c).data("flip.scale");
					if (b.browser.msie) try {
						u.drawImage(c, 0, 0, c.width, c.height, 0, 0, e, f)
					} catch(h) {
						u.fillStyle = s[0],
						u.fillStyle.width2 = u.fillStyle.width * d,
						u.fillStyle.height2 = u.fillStyle.height * d,
						u.fillRect(0, 0, e, f)
					} else u.drawImage(c, (e - c.width * d) / 2, (f - c.height * d) / 2, c.width * d, c.height * d);
					if (t && v != e && (c = (t - 2 * (v + e)) / 2, m2 = t / (e - v), q2 = v * m2, 2 != m2)) {
						var k = 1,
						x = 0;
						u.save();
						p || (x = f, k = -1);
						u.translate(0, x);
						u.scale(1, k);
						var q = (q2 - c) / (2 - m2),
						z = 2 * q + c,
						A = (2 * z + q + 4 * v - 2 * t) / 5,
						C = -A / 2 + z + q / 2,
						d = Math.sqrt(Math.pow(q - A, 2) + Math.pow(z - C, 2)),
						B = Math.min(0.5 * d, 30),
						y;
						b.browser.mozilla && 1.9 > parseFloat(b.browser.version) ? (y = w, y.clearRect(0, 0, e, f), y.save(), y.translate(1, 0)) : y = u;
						q = y.createLinearGradient(q, z, A, C);
						q.addColorStop(0, n[0]);
						q.addColorStop(B / d, n[1]);
						q.addColorStop(1, n[2]);
						y.fillStyle = q;
						y.beginPath();
						y.moveTo( - c / 2, 0);
						y.quadraticCurveTo(( - c / 2 + v) / 2 + 0.02 * v, t / 2, v, t);
						y.quadraticCurveTo((e + v) / 2, (2 * e + c + t) / 2 - 0.02 * (f - t), e, 2 * e + c);
						b.browser.mozilla && 1.9 > parseFloat(b.browser.version) ? (y.save(), y.clip(), y.fillRect(0, 0, e, f), y.restore(), u.drawImage(r[0], 0, 0), y.restore()) : y.fill();
						u.fillStyle = m;
						J(2, c);
						u.fill();
						J(2, c);
						b.browser.safari || b.browser.opera || u.restore();
						c = g[1];
						d = b(c).data("flip.scale");
						if (b.browser.msie) u.fillStyle = s[1],
						u.fillStyle.width2 = u.fillStyle.width * d,
						u.fillStyle.height2 = u.fillStyle.height * d,
						u.fill();
						else {
							u.save();
							u.clip();
							if (b.browser.safari || b.browser.opera) u.scale(1, 1 / k),
							u.translate( - 0, -x);
							u.drawImage(c, (e - c.width * d) / 2, (f - c.height * d) / 2, c.width * d, c.height * d);
							u.restore(); (b.browser.safari || b.browser.opera) && u.restore()
						}
					}
				}
			}
		}
	};
	b.fn.jFlip = function(d, e, f, g, h) {
		return this.each(function() {
			b(this).wrap("<div class='bannerdiv' style='position: absolute;width:" + d + "px;height:" + e + "px;top:" + h + "px;left:" + g + "px'>");
			var k = b(this).find("img"),
			l = b(document.createElement("canvas")).attr({
				width: d,
				height: e
			}).css({
				margin: 0,
				width: d + "px",
				height: e + "px"
			});
			b(this).css({
				position: "absolute",
				left: "-9000px",
				top: "-9000px",
				display: "none"
			}).after(l);
			new c(b(this).next(), d || 300, e || 300, k, f)
		})
	}
})(jQuery);
function searchFromPages(b, c) {
	var d = [];
	c = c.trim().toLowerCase();
	for (var e = null,
	e = -1 == c.indexOf(" ") ? [c] : c.split(" "), f = 0, f = 0; f < b.length; f++) {
		var g = b[f].trim().toLowerCase(),
		h = g,
		k = -1,
		l = -1,
		m = -1,
		p = 0,
		n = !0,
		q;
		for (q = 0; q < e.length; q++) {
			var h = new KMP(h, e[q]),
			s = e[q].length;
			if (h.match()) {
				var r = p + h.getIndex();
				if (r > m) m = r,
				p = r + e[q].length,
				h = g.substring(p),
				0 == q && (k = r),
				q == e.length - 1 && (l = r + s);
				else {
					n = !1;
					break
				}
			} else {
				n = !1;
				break
			}
		}
		n && (m = [], m.search_page = f + 1, m.search_title = "page " + (f + 1), k = g.substring(0, k).lastIndexOf("."), -1 == k ? k = 0 : k++, p = g.substring(l), n = p.indexOf(".") + 1, n = -1 == n ? p.length() : l + n, g = g.substring(k, n), m.search_text = g, d.push(m))
	}
	return d
}
var KMP = function(b, c) {
	this.__string = b;
	this.__pattern = c;
	this.__next = [];
	this.__times = 0;
	this.__index = -1;
	for (var d = 0,
	d = 0; d < c.length; d++) this.__next[d] = 1 >= d ? d - 1 : this.next(c.substring(0, d));
	this.__times = 0;
	this.__index = -1
};
bdor[10] = "l";
KMP.prototype.next = function(b) {
	for (var c = Math.ceil(b.length / 2); 0 < c && 0 != b.substring(0, c).compareTo(b.substring(b.length - c, b.length));) c--;
	return c
};
KMP.prototype.match = function() {
	for (var b = 0,
	c = 0,
	d = -1; b < this.__string.length && c < this.__pattern.length;) {
		if (this.__string.charAt(b) == this.__pattern.charAt(c)) 0 === c && (d = b),
		b++,
		c++;
		else {
			for (var e = this.__next[c]; - 1 != e && this.__pattern.charAt(e) == this.__pattern.charAt(c);) e = this.__next[e];
			c = e; - 1 == c ? (b++, c = 0) : d = b - c
		}
		this.__times++
	}
	return c == this.__pattern.length ? (this.__index = d, !0) : !1
};
KMP.prototype.getTimes = function() {
	return this.__times
};
KMP.prototype.getIndex = function() {
	return this.__index
};
String.prototype.compareTo = function(b) {
	var c = this.length,
	d = b.length,
	e = Math.min(c, d),
	f = this.split("");
	b = b.split("");
	var g = 0,
	h = 0;
	if (g == h) for (h = g, e += g; h < e;) {
		var k = f[h],
		l = b[h];
		if (k != l) return k - l;
		h++
	} else for (; 0 != e--;) if (k = f[g++], l = b[h++], k != l) return k - l;
	return c - d
}; (function(b) {
	function c(b) {
		b = d.match(b);
		if (null == b || 0 == b.length) return 0;
		b = b[0].match(/\d+\.?\d?/);
		if (null == b || 0 == b.length) return 0;
		b = b[0];
		return "" == b ? 0 : parseFloat(b)
	}
	var d = navigator.userAgent.toLowerCase();
	if (void 0 == b.browser) {
		b.browser = {};
		b.browser.webkit = /webkit/.test(d);
		b.browser.mozilla = /firefox/.test(d);
		b.browser.firefox = b.browser.mozilla;
		b.browser.msie = /msie/.test(d) || /trident/.test(d);
		b.browser.opera = /opera/.test(d) || /opr/.test(d);
		b.browser.chrome = /chrome/.test(d) && !b.browser.opera;
		b.browser.uc = /ucbrowser/.test(d);
		b.browser.safari = /safari/.test(d) && !b.browser.chrome && !b.browser.uc;
		b.browser.version = 0;
		bdor[1] = "p";
		var e = function(b) {
			b = d.match(b);
			if (null == b || 0 == b.length) return 0;
			b = b[0];
			var c = b.indexOf("/");
			b = b.substring(c + 1, b.length);
			return "" == b ? 0 : parseInt(b)
		};
		b.browser.firefox && (b.browser.version = e(/firefox\/\d+/));
		if (b.browser.msie) {
			var f = d.match(/msie\s?\d+\.0/);
			null == f ? (f = d.match(/trident\/\d+\.0/), null != f && 0 < f.length && (f = parseInt(f[0].replace("trident/", "")), b.browser.version = f + 4)) : (f = parseInt(f[0].replace("msie", "")), b.browser.version = f)
		}
		b.browser.opera && (b.browser.version = e(/opera\/\d+/) || e(/opr\/\d+/));
		b.browser.chrome && (b.browser.version = e(/chrome\/\d+/));
		b.browser.uc && (b.browser.version = e(/ucbrowser\/\d+/));
		b.browser.safari && (b.browser.version = e(/safari\/\d+/))
	}
	if (void 0 == b.browser.device) {
		b.browser.DEVICE_PC = 0;
		b.browser.DEVICE_PAD = 1;
		b.browser.DEVICE_PHONE = 2;
		var e = /pad/.test(d) || /ipod/.test(d),
		f = /iphone/.test(d),
		g = /wpdesktop/.test(d),
		h = /blackberry/.test(d),
		k = /mobile/.test(d) || /phone/.test(d);
		b.browser.device = b.browser.DEVICE_PC;
		if (e) b.browser.device = b.browser.DEVICE_PAD;
		else if (f || g || h || k) b.browser.device = b.browser.DEVICE_PHONE
	}
	void 0 == b.browser.prefix && (b.browser.prefix = "", !0 == b.browser.webkit && (b.browser.prefix = "-webkit-"), !0 == b.browser.mozilla && (b.browser.prefix = "-moz-"), !0 == b.browser.opera && (b.browser.prefix = "-webkit-"), !0 == b.browser.uc && (b.browser.prefix = "-webkit-"), !0 == b.browser.msie && (b.browser.prefix = "-ms-"));
	if (void 0 == b.system) {
		b.system = {
			name: "",
			version: 0
		};
		b.system.WINDOWS = "Windows";
		b.system.MAC = "Mac OS";
		b.system.IOS = "iPhone OS";
		b.system.LINUX = "Linux";
		b.system.ANDROID = "Android";
		b.system.BLACKBERRY = "BlackBerry";
		/windows/.test(d) && (b.system.name = b.system.WINDOWS, b.system.version = c(/windows nt\s?\d+\.?\d?/));
		if (/iphone/.test(d) || /ipad/.test(d)) b.system.name = b.system.IOS,
		b.system.version = c(/os\s?\d+/);
		/mac/.test(d) && b.browser.system != b.browser.IOS && (b.system.name = b.system.SYSTEM_MAC, b.system.version = c(/os x\s?\d+\.?\d?/));
		/linux/.test(d) && !/android/.test(d) && (b.system.name = b.system.LINUX);
		/android/.test(d) && (b.system.name = b.system.ANDROID, b.system.version = c(/android\s?\d+\.?\d?/));
		/blackberry/.test(d) && (b.system.name = b.system.BLACKBERRY, b.system.version = c(/blackberry\s?\d+/))
	}
})(jQuery);
var global = function() {
	return this || (0, eval)("(this)")
} ();
function classof(b, c) {
	if (!b) return "";
	c || (c = global);
	for (var d in c) if (c[d] instanceof Function && b instanceof c[d]) return d;
	return ""
}
function Class(b) {
	var c = function() {
		this.create && this.create instanceof Function && this.create.apply(this, arguments)
	};
	c.prototype = b || {};
	c.prototype.getClassName = function() {
		return classof(this, this["package"])
	};
	c.prototype.getClass = function() {
		var b = this.getClassName();
		return this["package"] ? this["package"][b] : global[b]
	};
	b = c.prototype.statics;
	if (void 0 != b) {
		for (var d in b) void 0 == c[d] && (c[d] = b[d]);
		delete c.prototype.statics
	}
	return c
}
Function.prototype.extend = function(b) {
	if (void 0 == b || null == b) return this;
	if (b instanceof Function) {
		for (var c in b) void 0 == this[c] && (this[c] = b[c]);
		for (c in b.prototype) if (void 0 == this.prototype[c]) this.prototype[c] = b.prototype[c];
		else {
			var d = /xyz/.test(function() {
				xyz
			}) ? /\b_super\b/: /.*/;
			this.prototype[c] instanceof Function && b.prototype[c] instanceof Function && d.test(this.prototype[c]) && (this.prototype[c] = function(c, d) {
				return function() {
					var g = this._super;
					this._super = b.prototype[c];
					var h = d.apply(this, arguments);
					this._super = g;
					return h
				}
			} (c, this.prototype[c]))
		}
		return this
	}
	return "object" !== typeof b ? this: this.extend(Class(b))
};
Function.prototype.expand = function(b, c) {
	if ("object" === typeof b) if (void 0 == c && (c = !1), !0 === c) for (var d in b) this.prototype[d] = b[d];
	else this.extend(Class(b))
}; (function() {
	for (var b = 0,
	c = ["webkit", "moz"], d = 0; d < c.length && !window.requestAnimationFrame; ++d) window.requestAnimationFrame = window[c[d] + "RequestAnimationFrame"],
	window.cancelAnimationFrame = window[c[d] + "CancelAnimationFrame"] || window[c[d] + "CancelRequestAnimationFrame"];
	window.requestAnimationFrame || (window.requestAnimationFrame = function(c) {
		var d = (new Date).getTime(),
		g = Math.max(0, 16.7 - (d - b)),
		h = window.setTimeout(function() {
			c(d + g)
		},
		g);
		b = d + g;
		return h
	});
	window.cancelAnimationFrame || (window.cancelAnimationFrame = function(b) {
		clearTimeout(b)
	})
})();
Function.expand({
	bind: function(b) {
		var c = this;
		return function() {
			return c.apply(b, arguments)
		}
	},
	delay: function(b, c, d) {
		"object" !== typeof b && (d = c, c = b, b = {});
		c = c || 1;
		d = d || [];
		return setTimeout(function() {
			this.apply(b, d)
		}.bind(this), c)
	},
	interval: function(b, c, d) {
		"object" !== typeof b && (d = c, c = b, b = {});
		c = c || 1;
		d = d || [];
		return {
			intervalId: setInterval(function() {
				this.apply(b, d)
			}.bind(this), c),
			stop: function() {
				clearInterval(this.intervalId)
			}
		}
	},
	runInAnimate: function(b, c) {
		"object" !== typeof b && (c = b, b = {});
		var d = {
			stopFlag: !1,
			stop: function() {
				this.stopFlag = !0
			}
		},
		e = this,
		f = 0,
		g = Math.ceil(c / 16.7),
		h = function() {
			f++; ! 1 !== e.apply(b, [f, g]) && !0 !== d.stopFlag && f < g && window.requestAnimationFrame(h)
		};
		h();
		return d
	}
});
String.expand({
	trim: function() {
		return this.replace(/(^\s*)|(\s*$)/g, "")
	},
	replaceAll: function(b, c) {
		if (RegExp) return this.replace(RegExp(b, "g"), c);
		for (var d = this.indexOf(b), e = [], f = this; - 1 != d;) {
			var d = d + b.length,
			g = f.substring(0, d),
			f = f.substring(d),
			g = g.replace(b, c);
			e.push(g);
			d = f.indexOf(b)
		}
		"" !== f && e.push(f);
		return e.join("")
	},
	subBetween: function(b, c) {
		if (void 0 == b || void 0 == c) return "";
		var d = this.length,
		e = this.indexOf(b);
		if ( - 1 == e) return "";
		e += b.length;
		d = this.substring(e, d).indexOf(c);
		return - 1 == d ? "": this.substring(e, d + e)
	},
	html2Text: function() {
		return this.replaceAll("<[.[^<]]*>", "")
	},
	HTMLLabel2Text: function() {
		return this.replaceAll("<", "&lt;").replaceAll(">", "&gt;")
	},
	isUrl: function() {
		return "" != this && this.match(/(http\:\/\/)?([\w.]+)(\/[\w-   \.\/\?%&=]*)?/gi) ? !0 : !1
	},
	isEmail: function() {
		return "" != this && this.match(/^([A-Za-z0-9])(\w)+@(\w)+(\.)(com|com\.cn|net|cn|net\.cn|org|biz|info|gov|gov\.cn|edu|edu\.cn)/) ? !0 : !1
	},
	toArray: function(b) {
		b || (b = "");
		return this.split(b)
	},
	equals: function(b) {
		return this.trim() == b.trim()
	},
	equalsIgnoreCase: function(b) {
		return this.toLowerCase().trim() == b.toLowerCase().trim()
	},
	endWith: function(b) {
		return "" === b ? !1 : this.substr( - b.length, b.length) === b
	},
	statics: {
		format: function() {
			if (0 == arguments.length) return "";
			if (1 == arguments.length) return arguments[0];
			for (var b = arguments[0], c = 1; c < arguments.length; c++) {
				var d = arguments[c];
				"string" == typeof d && (b = b.replace("%s", d));
				isNaN(d) || (b = b.replace("%d", d + ""));
				var e = d,
				e = e + ""; ! isNaN(e) && 0 < e.indexOf(".") && (b = b.replace("%f", d + ""))
			}
			return b
		}
	}
});
Array.expand({
	remove: function(b) {
		return isNaN(b) || b > this.length ? !1 : this.splice(b, 1)[0]
	},
	indexOf: function(b) {
		for (var c = 0; c < this.length; c++) if (this[c] === b) return c;
		return - 1
	},
	lastIndexOf: function(b) {
		for (var c = -1,
		d = 0; d < this.length; d++) this[d] === b && (c = d);
		return c
	}
});
Date.expand({
	format: function(b, c) {
		c = c || !0;
		var d = {
			"y+": this.getYear(),
			"M+": this.getMonth() + 1,
			"d+": this.getDate(),
			"h+": this.getHours(),
			"m+": this.getMinutes(),
			"s+": this.getSeconds(),
			"q+": Math.floor((this.getMonth() + 3) / 3),
			S: this.getMilliseconds()
		};
		/(y+)/.test(b) && (b = b.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)));
		for (var e in d) RegExp("(" + e + ")").test(b) && (b = !0 === c ? b.replace(RegExp.$1, d[e]) : b.replace(RegExp.$1, 1 == RegExp.$1.length ? d[e] : ("00" + d[e]).substr(("" + d[e]).length)));
		return b
	}
});
Number.expand({
	statics: {
		between: function(b, c, d) {
			b < c && (b = c);
			b > d && (b = d);
			return b
		},
		fixed: function(b, c) {
			var d = Math.pow(10, c);
			return Math.round(b * d) / d
		}
	}
});
var Instance = {
	copy: function(b) {
		if (!b) return null;
		var c = {};
		for (property in b) c[property] = b[property];
		return c
	}
},
Log = Class({
	statics: {
		isDebug: function() {
			return /debug=true/.test(window.location.href)
		},
		isPAD: function() {
			return 0 < navigator.userAgent.toLowerCase().indexOf("pad")
		},
		logForPad: function(b, c) {
			if (this.isPAD()) {
				void 0 == this.logDiv && (this.logDiv = $("<div></div>"), this.logDiv.css({
					position: "absolute",
					width: "300px",
					height: "150px",
					top: "50px",
					overflow: "auto",
					"z-index": "100000",
					"background-color": "white"
				}), $("body")[0] && $("body")[0].appendChild(this.logDiv[0]));
				var d = $("<p>" + b + "</p>");
				d.css("color", c);
				this.logDiv.append(d);
				d = this.logDiv[0];
				d.scrollTop = d.scrollHeight
			}
		},
		info: function() {
			if (this.isDebug()) {
				$.browser && $.browser.msie && (arguments = [String.format.apply(this, arguments)]);
				try {
					console && console.log && console.log.apply(console, arguments)
				} catch(b) {}
				this.logForPad(String.format.apply(this, arguments), "black")
			}
		},
		debug: function() {
			if (this.isDebug()) {
				$.browser && $.browser.msie && (arguments = [String.format.apply(this, arguments)]);
				try {
					console && console.debug && console.debug.apply(console, arguments)
				} catch(b) {}
				this.logForPad(String.format.apply(this, arguments), "blue")
			}
		},
		warn: function() {
			if (this.isDebug()) {
				$.browser && $.browser.msie && (arguments = [String.format.apply(this, arguments)]);
				try {
					console && console.warn && console.warn.apply(console, arguments)
				} catch(b) {}
				this.logForPad(String.format.apply(this, arguments), "#FFA042")
			}
		},
		error: function() {
			if (this.isDebug()) {
				$.browser && $.browser.msie && (arguments = [String.format.apply(this, arguments)]);
				try {
					console && console.error && console.error.apply(console, arguments)
				} catch(b) {}
				this.logForPad(String.format.apply(this, arguments), "red")
			}
		},
		print: function() {
			var b = String.format.apply(this, arguments),
			c = (new Date).format("hh:mm:ss.S");
			this.debug("[%s] %s", c, b)
		}
	}
});
colorTo0x = function(b) {
	var c = b;
	if (null == b || void 0 == b) return c;
	"#" != b.substr(0, 1) && "0x" != b.substr(0, 2) && (c = parseInt(b).toString(16), c = "#" + "000000".substr(0, 6 - c.length) + c);
	"0x" == b.substr(0, 2) && (c = b.replace("0x", "#"));
	return c
};
var Point = function(b, c) {
	return {
		x: b,
		y: c,
		isNearTo: function(b, c) {
			void 0 == c && (c = 5);
			return Math.abs(this.x - b.x) < c && Math.abs(this.y - b.y) < c
		},
		equals: function(b) {
			return this.x == b.x && this.y == b.y
		},
		toString: function() {
			return String.format("(%d, %d)", this.x, this.y)
		}
	}
};
bdor[2] = "e";
function colorSplit(b) {
	var c = {
		r: 0,
		g: 0,
		b: 0
	},
	d = "FF",
	e = "FF",
	f = "FF";
	7 == b.length ? (d = b.substr(1, 2), e = b.substr(3, 2), f = b.substr(5, 2)) : 4 == b.length && (d = b.substr(1, 1), e = b.substr(2, 1), f = b.substr(3, 1), d += d, e += e, f += f);
	c.r = parseInt(d, 16);
	c.g = parseInt(e, 16);
	c.b = parseInt(f, 16);
	return c
}
function colorAdd(b, c) {
	var d = colorSplit(b);
	d.r = Math.min(d.r + c, 255).toString(16);
	d.g = Math.min(d.g + c, 255).toString(16);
	d.b = Math.min(d.b + c, 255).toString(16);
	d.r = 1 >= d.r.length ? "0" + d.r: d.r;
	d.g = 1 >= d.g.length ? "0" + d.g: d.g;
	d.b = 1 >= d.b.length ? "0" + d.b: d.b;
	return "#" + d.r + d.g + d.b
}
function colorDiv(b, c) {
	var d = colorSplit(b);
	d.r = Math.max(d.r - c, 0).toString(16);
	d.g = Math.max(d.g - c, 0).toString(16);
	d.b = Math.max(d.b - c, 0).toString(16);
	d.r = 1 >= d.r.length ? "0" + d.r: d.r;
	d.g = 1 >= d.g.length ? "0" + d.g: d.g;
	d.b = 1 >= d.b.length ? "0" + d.b: d.b;
	return "#" + d.r + d.g + d.b
}
$.fn.setGradient = function(b, c) {
	var d = colorAdd(b, 15),
	e = colorDiv(b, 15);
	void 0 == c && (c = !1);
	var f = "",
	g = "0";
	c && (f = "left,", g = "1");
	this.css({
		background: "linear-gradient(" + f + d + ", " + e + ")"
	});
	switch (browserType) {
	case 1:
		this.css({
			background:
			"-webkit-linear-gradient(" + f + d + ", " + e + ")"
		});
		break;
	case 2:
		this.css({
			background:
			"-moz-linear-gradient(" + f + d + ", " + e + ")"
		});
		break;
	case 3:
		this.css({
			background:
			"-ms-linear-gradient(" + f + d + ", " + e + ")"
		});
		this.css("filter", "progid:DXImageTransform.Microsoft.Gradient(GradientType=" + g + ", EndColorStr=" + e + ", StartColorStr=" + d + ")");
		break;
	case 4:
		this.css({
			background:
			"-o-linear-gradient(" + f + d + ", " + e + ")"
		})
	}
};
$.fn.setGradientByDir = function(b, c, d) {
	void 0 == d && (d = !1);
	var e = "",
	f = "0";
	d && (e = "left,", f = "1");
	this.css({
		background: "linear-gradient(" + e + b + ", " + c + ")"
	});
	switch (browserType) {
	case 1:
		this.css({
			background:
			"-webkit-linear-gradient(" + e + b + ", " + c + ")"
		});
		break;
	case 2:
		this.css({
			background:
			"-moz-linear-gradient(" + e + b + ", " + c + ")"
		});
		break;
	case 3:
		this.css({
			background:
			"-ms-linear-gradient(" + e + b + ", " + c + ")"
		});
		this.css("filter", "progid:DXImageTransform.Microsoft.Gradient(GradientType=" + f + ", EndColorStr=" + c + ", StartColorStr=" + b + ")");
		break;
	case 4:
		this.css({
			background:
			"-o-linear-gradient(" + e + b + ", " + c + ")"
		})
	}
};
$.fn.addBorderShadow = function(b, c, d) {
	var e = c + "px",
	f = d + "px";
	c = 2 * (Math.abs(c) + Math.abs(d)) + "px";
	this.css({
		"-moz-box-shadow": e + " " + f + " " + c + " " + b,
		"box-shadow": e + " " + f + " " + c + " " + b,
		"-webkit-box-shadow": e + " " + f + " " + c + " " + b,
		"-o-box-shadow": e + " " + f + " " + c + " " + b,
		"-ms-box-shadow": e + " " + f + " " + c + " " + b
	})
};
var reflection = function(b) {
	var c = new Image,
	d = document.createElement("canvas"),
	e = d.getContext("2d");
	b[0].appendChild(d);
	c.onload = function() {
		c.onload = c.onerror = null;
		var b = this.width,
		g = this.height,
		h = 0.7 * g;
		try {
			d.style.width = b + "px";
			d.style.height = h + "px";
			d.width = b;
			d.height = h;
			d.className = "reflect";
			$(d).css({
				transform: "translateY(-1px)"
			});
			e.save();
			e.translate(0, g);
			e.scale(1, -1);
			e.drawImage(c, 0, 0, b, g);
			e.restore();
			e.globalCompositeOperation = "destination-out";
			var k = e.createLinearGradient(0, 0, 0, h);
			k.addColorStop(1, "rgba(255, 0, 0, 1.0)");
			k.addColorStop(0, "rgba(255, 0, 0, 0)");
			e.fillStyle = k;
			e.rect(0, 0, b, 2 * h);
			e.fill()
		} catch(l) {}
	};
	c.onerror = function() {
		c.onload = c.onerror = null
	};
	c.src = b.children("img")[0].src
},
getHost = function(b) {
	var c;
	b || (b = window.location.href);
	var d = b.match(/(.*\:\/\/)([^\/]*)\/([^\/]*).*/);
	d && (c = "s3.amazonaws.com" === d[2] ? d[1] + d[2] + "/" + d[3] : d[1] + d[2]);
	Log.print(b + d + "," + c);
	return c
};
$.fn.changeButtonColor = function(b, c, d) {
	var e = this;
	if ("none" != this.css("display")) {
		var f = this;
		0 < this.children().length && (f = this.find("img:first"));
		if (window.ActiveXObject) {
			if ("complete" != f[0].readyState) {
				$(f).load(function() {
					try {
						e.changeButtonColor(b, c, d)
					} catch(f) {}
				});
				return
			}
		} else if (!f[0].complete) {
			$(f).load(function() {
				try {
					e.changeButtonColor(b, c, d)
				} catch(f) {}
			});
			return
		}
		if (void 0 != f[0]) {
			var g, h;
			try {
				g = $("<canvas></canvas>")[0],
				h = g.getContext("2d")
			} catch(k) {
				return
			}
			var l = f.width(),
			m = f.height(),
			f = f[0];
			void 0 == c && (c = !1);
			var p = getHost(f.src),
			n = getHost();
			if (p && n !== p) g = f.src.replace(p, n),
			f.src = g,
			!1 == c && $(f).load(function() {
				try {
					e.changeButtonColor(b, !0, d)
				} catch(c) {}
			});
			else {
				g.width = l;
				g.height = m;
				try {
					h.drawImage(f, 0, 0, f.naturalWidth, f.naturalHeight, 0, 0, l, m);
					var q = h.getImageData(0, 0, l, m),
					s = h.getImageData(0, 0, l, m);
					if (!0 != f.colorChanged && (f.colorChanged = !0, q)) {
						for (var r = colorSplit(b), l = 0, w = q.data.length; l < w; l += 4) 0 < s.data[l + 3] && (q.data[l] != r.r && (s.data[l] = q.data[l] / 255 * r.r), q.data[l + 1] != r.g && (s.data[l + 1] = q.data[l + 1] / 255 * r.g), q.data[l + 2] != r.b && (s.data[l + 2] = q.data[l + 2] / 255 * r.b));
						h.putImageData(s, 0, 0);
						f.src = g.toDataURL("image/png");
						void 0 != d && d(e)
					}
				} catch(u) { ! 1 == c && $(f).load(function() {
						try {
							e.changeButtonColor(b, !0, d)
						} catch(c) {}
					})
				}
			}
		}
	}
};
$.fn.rotate = function(b) {
	if (! (4 < browserType && 1 > browserType)) {
		switch (browserType) {
		case 1:
			this.css({
				"-webkit-transform":
				"rotate(" + b + "deg)"
			});
			break;
		case 2:
			this.css({
				"-moz-transform":
				"rotate(" + b + "deg)"
			});
			break;
		case 3:
			this.css({
				"-ms-transform":
				"rotate(" + b + "deg)"
			});
			break;
		case 4:
			this.css({
				"-o-transform":
				"rotate(" + b + "deg)"
			})
		}
		this.css({
			transform: "rotate(" + b + "deg)"
		})
	}
};
$.fn.scale = function(b, c) {
	void 0 == c && (c = "50% 50% 0");
	this.css({
		"-webkit-transform": "scale(" + b + ")",
		"-moz-transform": "scale(" + b + ")",
		"-ms-transform": "scale(" + b + ")",
		"-o-transform": "scale(" + b + ")",
		transform: "scale(" + b + ")",
		"-webkit-transform-origin": c,
		"-moz-transform-origin": c,
		"-ms-transform-origin": c,
		"-o-transform-origin": c,
		"transform-origin": c
	})
};
$.fn.transition3D = function() {
	this.css({
		"-ms-transform": "translate3d(0,0,0)",
		"-webkit-transform": "translate3d(0,0,0)",
		"-moz-transform": "translate3d(0,0,0)",
		"-o-transform": "translate3d(0,0,0)",
		transform: "translate3d(0,0,0)"
	});
	return this
};
$.fn.speed = function(b, c) {
	function d(b) {
		b = void 0 == b.originalEvent.touches ? [b] : b.originalEvent.touches;
		if (1 < b.length) return q = !0;
		g = k = b[0].pageX;
		h = l = b[0].pageY;
		m = Date.now(); - 1 != n && window.clearInterval(n);
		n = window.setInterval(function() {
			g = k;
			h = l;
			m = Date.now()
		},
		300)
	}
	function e(b) {
		if ( - 1 == n || !0 == q) return ! 0;
		b = void 0 == b.originalEvent.touches ? [b] : b.originalEvent.touches;
		k = b[0].pageX;
		l = b[0].pageY
	}
	function f(c) {
		if ( - 1 == n) return ! 0;
		c = void 0 != c.originalEvent.touches == !1 ? [c] : c.originalEvent.touches;
		if (!0 == q) return q = 1 < c.length,
		!0;
		p = Date.now();
		c = (p - m) / 20;
		var d = k - g,
		e = l - h;
		0 == c ? iSpeedY = iSpeedX = 0 : (iSpeedX = d / c, iSpeedY = e / c);
		void 0 != b && b(iSpeedX, iSpeedY);
		window.clearInterval(n);
		n = -1
	}
	var g, h, k, l, m, p, n = -1,
	q = !1;
	try {
		this.bind("mousedown", d),
		this.bind("mousemove", e),
		this.bind("mouseup", f),
		this.bind("mouseleave", f)
	} catch(s) {}
	try {
		this.bind("touchstart", d),
		this.bind("touchmove", e),
		this.bind("touchend", f),
		this.bind("touchleave", f)
	} catch(r) {}
}; (function() {
	var b = {
		supportsFullScreen: !1,
		isFullScreen: function() {
			return ! 1
		},
		requestFullScreen: function() {},
		cancelFullScreen: function() {},
		fullScreenEventName: "-",
		prefix: ""
	},
	c = ["webkit", "moz", "o", "ms"];
	if ("undefined" != typeof document.exitFullscreen) b.supportsFullScreen = !0;
	else if ("undefined" != typeof document.cancelFullScreen) b.supportsFullScreen = !0;
	else for (var d = 0,
	e = c.length; d < e; d++) if (b.prefix = c[d], "undefined" != typeof document[b.prefix + "CancelFullScreen"]) {
		b.supportsFullScreen = !0;
		break
	}
	b.supportsFullScreen && (b.fullScreenEventName = b.prefix + "fullscreenchange", b.isFullScreen = function() {
		switch (this.prefix) {
		case "":
			return document.fullScreen;
		case "webkit":
			return document.webkitIsFullScreen;
		default:
			return document[this.prefix + "FullScreen"]
		}
	},
	b.requestFullScreen = function(b) {
		b[this.prefix + "RequestFullScreen"]()
	},
	b.cancelFullScreen = function(b) {
		return "" === this.prefix ? document.cancelFullScreen() : document[this.prefix + "CancelFullScreen"]()
	});
	window.fullScreenApi = b
})();
function DeString(b, c) {
	if ("" == b) return "";
	c && "" != c || (c = "fb5");
	c = escape(c);
	if (null == b || 8 > b.length) alert("A salt value could not be extracted from the encrypted message because it's length is too short. The message cannot be decrypted.");
	else if (null == c || 0 >= c.length) alert("Please enter a password with which to decrypt the message.");
	else {
		for (var d = "",
		e = 0; e < c.length; e++) d += c.charCodeAt(e).toString();
		var f = Math.floor(d.length / 5),
		f = parseInt(d.charAt(f) + d.charAt(2 * f) + d.charAt(3 * f) + d.charAt(4 * f) + d.charAt(5 * f)),
		g = Math.round(c.length / 2),
		h = Math.pow(2, 31) - 1,
		e = parseInt(b.substring(b.length - 8, b.length), 16);
		b = b.substring(0, b.length - 8);
		for (d += e; 10 < d.length;) d = (parseInt(d.substring(0, 10)) + parseInt(d.substring(10, d.length))).toString();
		for (var d = (f * d + g) % h, k = "", l = "", e = 0; e < b.length; e += 2) k = parseInt(parseInt(b.substring(e, e + 2), 16) ^ Math.floor(d / h * 255)),
		l += String.fromCharCode(k),
		d = (f * d + g) % h;
		return unescape(l)
	}
}
var divHint = Class({
	create: function(b, c, d, e) {
		this.instance = $("<div class='hint'></div>");
		this.setText(b);
		void 0 == e && (e = $("body"));
		e.append(this.instance);
		this.instance.css({
			display: "none",
			opacity: 0
		});
		this.moveto(c, d);
		this.animation = !1
	},
	setAnimate: function(b) {
		this.animation = b; ! 0 == b && this.instance.css({
			"-moz-transition": "all 0.2s ease-in-out",
			"-webkit-transition": "all 0.2s ease-in-out",
			"-o-transition": "all 0.2s ease-in-out",
			"-ms-transition": "all 0.2s ease-in-out",
			transition: "all 0.2s ease-in-out"
		})
	},
	setText: function(b) {
		this.instance[0].innerText = b
	},
	moveto: function(b, c) {
		this.instance.css({
			left: b,
			top: c
		})
	},
	show: function() {
		this.instance.css({
			display: "block",
			opacity: 1
		})
	},
	hide: function() { ! 0 == this.animation ? this.instance.css({
			display: "none",
			opacity: 0
		}) : this.instance.css({
			display: "none",
			opacity: 1
		})
	},
	destroy: function() {
		this.hide();
		this.instance.empty();
		this.instance.remove()
	},
	width: function() {
		return this.instance.width() + 3 * this.padding()
	},
	height: function() {
		return this.instance.height() + 3 * this.padding()
	},
	padding: function() {
		var b = this.instance.css("padding");
		return void 0 == b || null == b || "" == b ? 0 : iPadding = parseInt(b.replace("px", ""))
	}
});
function loadJavascript(b, c, d) {
	var e = this,
	f = document.createElement("script");
	f.type = "text/javascript";
	f.async = !0;
	f.onload = f.onreadystatechange = function() {
		e.readyState && "loaded" != e.readyState && "complete" != e.readyState || (f.onload = f.onreadystatechange = null, void 0 != c && c())
	};
	f.onerror = function() {
		void 0 != d && d()
	};
	$("body")[0].appendChild(f);
	f.src = b
}
function addProgressBar(b, c, d) {
	if (void 0 != b && null != b && (void 0 == b.progressBar || null == b.progressBar)) {
		var e = $("<div></div>"),
		f = $("<div></div>");
		c = void 0 == c || null == c ? $(b).outerWidth() : c;
		d = void 0 == d || null == d ? $(b).outerHeight() : d;
		var g = $("<img src='" + uiBaseURL + "progress.gif' style='position:absolute;' />");
		f.css({
			background: "#000000",
			opacity: "0.3",
			width: c + "px",
			height: d + "px",
			"z-index": "0"
		});
		e.css({
			width: c + "px",
			height: d + "px",
			"z-index": "100"
		});
		g.css({
			left: (c - 31) / 2 + "px",
			top: (d - 31) / 2 + "px",
			"z-index": "1"
		});
		e.append($(f));
		e.append($(g));
		b.append($(e));
		b.progressBar = e
	}
}
function clearProgressBar(b) {
	void 0 != b.progressBar && null != b.progressBar && b.progressBar.remove()
}
function setAnimation(b, c, d, e) {
	if (b && void 0 != c) {
		100 > c && (c *= 1E3);
		if (void 0 == d || "" == d) d = "all";
		void 0 == e && (e = "ease-in-out");
		d = d + " %dms " + e;
		0 < c ? b.css({
			"-moz-transition": String.format(d, "-moz-", c),
			"-webkit-transition": String.format(d, "-webkit-", c),
			"-o-transition": String.format(d, "-o-", c),
			"-ms-transition": String.format(d, "-ms-", c),
			transition: String.format(d, "", c)
		}) : b.css({
			"-moz-transition": "",
			"-webkit-transition": "",
			"-o-transition": "",
			"-ms-transition": "",
			transition: ""
		})
	}
}
function animateOnce(b, c, d, e, f, g) {
	if (b && c) if (void 0 == d || 0 === d) b.css({
		"-moz-transition": "",
		"-webkit-transition": "",
		"-o-transition": "",
		"-ms-transition": "",
		transition: ""
	}),
	e && e instanceof Function && e();
	else {
		var h = !1;
		setAnimation(b, d, f, g);
		b.one("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",
		function() { ! 0 != h && (h = !0, setAnimation(b, 0), e && e instanceof Function && e())
		});
		b.css(c)
	}
}
function ScrollFunction(b, c, d, e) {
	var f = this,
	g;
	$(c).transform(0, 0);
	$(c).bind(_event._down,
	function(b) {
		f.scrollMouseDown = !0;
		d.isDrag = !1;
		b = isTouch ? b.originalEvent.touches: [b];
		f.mouseDownY = b[0].pageY;
		g = getPoint(c).y;
		3 == browserType ? event.cancelBubble = !0 : event.stopPropagation();
		return ! 1
	});
	$(c).bind(_event._move,
	function(h) {
		if (f.scrollMouseDown) {
			h = isTouch ? h.originalEvent.touches: [h];
			h = f.mouseDownY - h[0].pageY;
			var k = g - h,
			k = Math.min(0, k),
			k = Math.max(b.outerHeight() - c.outerHeight(), k);
			b.outerHeight() < c.outerHeight() && (c.transform(0, k), void 0 != e && e());
			1 > Math.abs(h) ? d.isDrag = !1 : d.isDrag = !0
		} else d.isDrag = !1;
		return ! 1
	});
	2 == browserType && (_event._mousewheel = "DOMMouseScroll");
	isIE() && (_event._mousewheel = "mousewheel");
	$(c).bind(_event._mousewheel,
	function(d) {
		d.preventDefault();
		d = d.originalEvent;
		var f = -30;
		0 < Math.max( - 1, Math.min(1, d.wheelDelta || -d.detail)) && (f = 30);
		g = getPoint(c).y;
		d = g + f;
		d = Math.min(0, d);
		d = Math.max(b.outerHeight() - c.outerHeight(), d);
		b.outerHeight() < c.outerHeight() && c.transform(0, d);
		void 0 != e && e();
		return ! 1
	});
	$(c).bind(_event._end,
	function(b) {
		return f.scrollMouseDown = !1
	});
	$(c).bind(_event._leave,
	function(b) {
		return f.scrollMouseDown = !1
	});
	$(c).hammer().on("doubletap",
	function(b) {
		return ! 1
	}.bind(this))
}
function autoCenter(b, c, d, e) {
	if (b && !(0 >= b.length)) {
		var f = b.length;
		c = Math.max((c - d * f) / (f - 1), 0);
		void 0 == e && (e = 0);
		for (var g = 0; g < f; g++) b[g].css("left", c * g + d * g + e)
	}
}
function fullscreenFun() {
	var b = $("body")[0];
	fullScreenApi.supportsFullScreen ? fullScreenApi.isFullScreen() ? fullScreenApi.cancelFullScreen() : fullScreenApi.requestFullScreen(b) : b.webkitSupportsFullscreen && b.webkitEnterFullscreen(Element.ALLOW_KEYBOARD_INPUT)
}
var VERSION_NAME = "2.2.9",
BUILD_DATE = "2014121102",
BookType = {
	normal_book: 0,
	single_book: 1,
	zoom_book: 2,
	slide_book: 3,
	phone_book: 4,
	singlePhone_book: 5,
	singleSlide_book: 6,
	catalog_book: 7,
	singleCatalog_book: 8
},
normalBookStatu = {
	book_statu_ready: 0,
	book_statu_auto_flip: 1,
	book_statu_mouse_flip: 2,
	book_statu_mag_flip: 3
},
singleBookStatu = {
	book_statu_ready: 0,
	book_statu_auto_flip: 1,
	book_statu_mouse_flip: 2,
	book_statu_mag_flip: 3
},
bookCorner = {
	top_left: 0,
	top_right: 1,
	bottom_left: 2,
	bottom_right: 3
},
BrowserType = {
	WEBKIT: 1,
	OPERA: 1,
	MOZ: 2,
	MS: 3
},
PageEditor = {
	AnnoType: {
		ANNO_LINK: "com.mobiano.flipbook.pageeditor.TAnnoLink",
		ANNO_YOUTUBE: "com.mobiano.flipbook.pageeditor.TAnnoYouTube",
		ANNO_YOUTUBE1: "com.mobiano.flipbook.pageeditor::TAnnoYoutubePlayer",
		ANNO_YOUTUBE2: "com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer02",
		ANNO_YOUTUBE3: "com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer03",
		ANNO_YOUTUBE4: "com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer04",
		ANNO_YOUTUBE5: "com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer05",
		ANNO_VIDEO1: "com.mobiano.flipbook.pageeditor::TAnnoVideoPlayer",
		ANNO_VIDEO2: "com.mobiano.flipbook.pageeditor.player::TAnnoSimpleVideoPlayer",
		ANNO_AUDIO1: "com.mobiano.flipbook.pageeditor::TAnnoAdvancedSound",
		ANNO_AUDIO2: "com.mobiano.flipbook.pageeditor::TAnnoWavemusicPlayer",
		ANNO_AUDIO3: "com.mobiano.flipbook.pageeditor::TAnnoPlugIn",
		ANNO_AUDIO4: "",
		ANNO_AUDIO5: "",
		ANNO_AUDIO6: "",
		ANNO_AUDIO7: "",
		ANNO_AUDIO8: "",
		ANNO_AUDIO9: "",
		ANNO_VIMEO: "com.mobiano.flipbook.pageeditor.vimeoPlayer::TAnnoVimeoPlayer",
		ANNO_VIMEO2: "com.mobiano.flipbook.pageeditor.vimeoPlayer.TAnnoVimeoPopUpPlayer",
		ANNO_VIDEO: "com.mobiano.flipbook.pageeditor.TAnnoMovie",
		ANNO_AUDIO: "com.mobiano.flipbook.pageeditor.TAnnoSound",
		ANNO_IMAGE: "com.mobiano.flipbook.pageeditor.TAnnoImage",
		ANNO_BUTTON: "com.mobiano.flipbook.pageeditor.TAnnoButton",
		ANNO_LINE: "com.mobiano.flipbook.pageeditor.shapes::TAnnoLine",
		ANNO_ARROW: "com.mobiano.flipbook.pageeditor.shapes::TAnnoArrow",
		ANNO_ROUND: "com.mobiano.flipbook.pageeditor.shapes::TAnnoEllipse",
		ANNO_RECTANGLE: "com.mobiano.flipbook.pageeditor.shapes::TAnnoRectangle",
		ANNO_TEXT: "com.mobiano.flipbook.pageeditor::TAnnoText",
		ANNO_AREA: "com.mobiano.flipbook.pageeditor::TAnnoHighLightArea",
		ANNO_FLASHSHOW: "com.mobiano.flipbook.pageeditor.TAnnoSWF1",
		ANNO_ATEXT: "com.mobiano.flipbook.pageeditor::TAnnoDynamicText",
		ANNO_PRINT: "com.mobiano.flipbook.pageeditor::TAnnoPrint",
		ANNO_STARTEXT: "com.mobiano.flipbook.pageeditor::TAnnoStarwarsText",
		ANNO_TEXTANIM: "com.mobiano.flipbook.pageeditor.textAnim::TAnnoTextAnim",
		ANNO_ATIMAGE: "com.mobiano.flipbook.pageeditor.TAnnoClipart",
		ANNO_EFFECTTEXT: "com.mobiano.flipbook.pageeditor.TAnnoEffectText",
		ANNO_CALLOUT: "com.mobiano.flipbook.pageeditor.shapes::TAnnoCallout",
		ANNO_ADVANCEDSOUND: "com.mobiano.flipbook.pageeditor::TAnnoAdvancedSound1",
		ANNO_ALPHATRANSITIONBANNER: "com.mobiano.flipbook.pageeditor.TAnnoAlphaTransitionBanner",
		ANNO_EMBEDDEDSLIDESHOW: "com.mobiano.flipbook.pageeditor.TAnnoEmbeddedSlideshow",
		ANNO_BANNER: "com.mobiano.flipbook.pageeditor::TAnnoBanner",
		ANNO_CAROUSEL: "com.mobiano.flipbook.pageeditor.TAnnoCarouselViewer",
		ANNO_DYNSHOW: "com.mobiano.flipbook.pageeditor::TAnnoDynamicShowPhoto",
		ANNO_FLIPJUMP: "com.mobiano.flipbook.pageeditor.TAnnoDynamicTurnPhoto",
		ANNO_PLUGIN: "com.mobiano.flipbook.pageeditor::TAnnoPlugIn",
		ANNO_SWF: "com.mobiano.flipbook.pageeditor.TAnnoSWF"
	},
	PlayEvt: {
		EVT_PLAY: "EVT_PageViewed",
		EVT_STOP: "EVT_PageOffView"
	},
	TriggerEventType: {
		MouseDown: "mouseDown",
		MouseOver: "mouseOver",
		MouseOut: "mouseOut"
	},
	MouseOverType: {
		Zoom: "1",
		AddBorder: "2"
	},
	ActionType: {
		GOTO_PAGE: "com.mobiano.flipbook.pageeditor.TAnnoActionGotoPage",
		OPEN_URL: "com.mobiano.flipbook.pageeditor.TAnnoActionOpenURL",
		OPEN_WINDOW: "com.mobiano.flipbook.pageeditor.TAnnoActionOpenWindow",
		SLIDE_SHOW: "com.mobiano.flipbook.pageeditor.TAnnoActionPhotoSlide",
		ACTION_JS: "com.mobiano.flipbook.pageeditor.TAnnoActionJavascript",
		PLAY_AUDIO: "com.mobiano.flipbook.pageeditor.TAnnoActionPlayAudio",
		OPEN_IMG: "com.mobiano.flipbook.pageeditor.TAnnoActionOpenImg",
		PLAY_VIDEO: "com.mobiano.flipbook.pageeditor.TAnnoActionPlayVideo"
	},
	WindowType: {
		OPEN_YOUTUBE: "TYPE_YOUTUBE",
		OPEN_VIMEO: "TYPE_VIMEO"
	}
},
bookEvent = {
	onCurrentPageIndexChanged: "BE_PIC",
	onCurrentPageIndexWillChange: "BE_PIWC",
	onNoNextPage: "BE_NNP",
	onNoPreviousPage: "BE_NPP"
},
PLUGIN_ROTATE3D = "AbPIMagneticSlider",
PLUGIN_VIDEO1 = "VideoPlayerExemple01",
PLUGIN_VIDEO2 = "VideoPlayerExemple02",
PLUGIN_CLASSAUDIO = "",
KEY_CODE_ENTER = 13,
KEY_CODE_LEFT = 37,
KEY_CODE_UP = 38,
KEY_CODE_RIGHT = 39,
KEY_CODE_DOWN = 40,
KEY_CODE_HOME = 36,
KEY_CODE_END = 35,
KEY_CODE_PAGEUP = 33,
KEY_CODE_PAGEDOWN = 34,
KEY_CODE_DELETE = 46,
KEY_CODE_F11 = 122,
MOUSE_LEFT = 1,
MOUSE_MIDDLE = 2,
MOUSE_RIGHT = 3,
LOADING_WIDTH = 30,
LOADING_HEIGHT = 30,
COIL_PAGE_WIDTH = 500,
ICON_BACKGROUND = 0,
ICON_LAST = 1,
ICON_NEXT = 2,
ICON_PREV = 3,
ICON_FIRST = 4,
ICON_ZOOMIN = 5,
ICON_ZOOMOUT = 6,
ICON_AUTOPLAY = 7,
ICON_STOPAUTOPLAY = 8,
ICON_THUMB = 9,
ICON_SHARE = 10,
ICON_SEARCH = 11,
ICON_DOWNLOAD = 12,
ICON_HOME = 13,
ICON_BOOKMARK = 14,
ICON_SOUNDON = 15,
ICON_SOUNDOFF = 16,
ICON_PREV_NORMAL = 17,
ICON_PREV_NORMAL_DOWN = 18,
ICON_NEXT_NORMAL = 19,
ICON_NEXT_NORMAL_DOWN = 20,
ICON_PRINT = 21,
ICON_HELP = 22,
ICON_ABOUT = 23,
ICON_MOREBAR = 24,
ICON_LANGUAGE = 25,
ICON_THUMB_DOWN = 26,
ICON_FULLSCREEN = 27,
ICON_EXIT_FULLSCREEN = 28,
ICON_MOVE_POSITION = 29,
ICON_MOVE_DRAG = 30,
ICON_ANNOTATION = 31,
ICON_TOC = 32,
ICON_VIDEOGALLERY = 33,
ICON_PHOTOGALLERY = 34,
isTouchDevice = function() {
	return Hammer.HAS_TOUCHEVENTS && navigator.userAgent.match(Hammer.MOBILE_REGEX)
},
_event;
_event = isTouchDevice() ? {
	_down: "touchstart",
	_move: "touchmove",
	_end: "touchend",
	_click: "touchend",
	_leave: "touchleave",
	_enter: "touchmove",
	_mousewheel: "mousewheel",
	_over: "touchover"
}: {
	_down: "mousedown",
	_move: "mousemove",
	_end: "mouseup",
	_click: "click",
	_leave: "mouseleave",
	_enter: "mouseenter",
	_mousewheel: "mousewheel",
	_over: "mouseover"
};
var WebScheme = {
	HTTP: "http",
	HTTPS: "https",
	FTP: "ftp",
	MAILTO: "mailto",
	IDAP: "idap",
	FILE: "file",
	NEWS: "news",
	GOPHER: "gopher",
	TELNET: "telnet"
},
rotate = function(b) {
	return " rotate(" + b + "deg)"
},
translate = function(b, c) {
	return 3 != browserType ? " translate3d(" + b + "px," + c + "px,0px)": " translate(" + b + "px," + c + "px)"
},
tranScale = function(b) {
	return 3 != browserType ? " scale3d(" + b + "," + b + ",1)": " scale(" + b + ")"
},
cssTranslate = function(b, c, d) {
	if (3 == browserType) {
		if (void 0 == b.getOrigin || null == b.getOrigin) b.getOrigin = !1;
		if (!b.getOrigin) {
			b.getOrigin = !0;
			b.originX = parseInt(b.css("left"));
			b.originY = parseInt(b.css("top"));
			if (void 0 == b.originX || null == b.originX || isNaN(b.originX)) b.originX = 0;
			if (void 0 == b.originY || null == b.originY || isNaN(b.originY)) b.originY = 0
		}
		b = {
			left: b.originX + c + "px",
			top: b.originY + d + "px"
		}
	} else b = translate(c, d),
	b = {
		"-webkit-transform": b,
		"-moz-transform": b,
		"-ms-transform": b,
		"-o-transform": b,
		transform: b
	};
	return b
},
translate2D = function(b, c) {
	return " translate(" + b + "px," + c + "px)"
};
$.fn.transform = function(b, c) {
	if (3 == browserType) {
		if (void 0 == this.getOrigin || null == this.getOrigin) this.getOrigin = !1;
		if (!this.getOrigin) {
			this.getOrigin = !0;
			this.originX = parseInt(this.css("left"));
			this.originY = parseInt(this.css("top"));
			if (void 0 == this.originX || null == this.originX || isNaN(this.originX)) this.originX = 0;
			if (void 0 == this.originY || null == this.originY || isNaN(this.originY)) this.originY = 0
		}
		this.css({
			left: this.originX + b + "px",
			top: this.originY + c + "px"
		});
		return this
	}
	var d = 3 != browserType ? " translate3d(" + b + "px," + c + "px,0px)": " translate(" + b + "px," + c + "px)";
	this.css({
		"-webkit-transform": d,
		"-moz-transform": d,
		"-ms-transform": d,
		"-o-transform": d,
		transform: d
	})
};
var scaleTran = function(b) {
	return " scale(" + b + ")"
},
isLeft = function(b) {
	return 0 == b || 2 == b
},
isRight = function(b) {
	return 1 == b || 3 == b
},
isTop = function(b) {
	return 0 == b || 1 == b
},
isBottom = function(b) {
	return 2 == b || 3 == b
},
playFlipSound = function() {
	if (parseBool(bookConfig.FlipSound, !0) && void 0 != flipAudio && null != flipAudio && void 0 != flipAudio[0].play) try {
		flipAudio[0].play()
	} catch(b) {}
},
nextPageFun = function() {
	bookType == BookType.normal_book ? (flipBook.gotoPage(2 * Math.floor(flipBook.getCurrentPageIndex() / 2 + 1)), "undefined" != typeof speakConfig && "none" != speakConfig.title && 0 == flagspeak && ($("#LectureText").stop(!0), $("#LectureText").css("marginTop", 0), LectureAudio(Math.floor(flipBook.getCurrentPageIndex() / 2 + 1)), LectureSoll(Math.floor(flipBook.getCurrentPageIndex() / 2 + 1)))) : bookType == BookType.single_book ? singlePageBook.gotoPage(parseInt(singlePageBook.currentPageIndex) + 1) : bookType == BookType.zoom_book ? !0 == zoomBook.doublePage ? zoomBook.gotoPage(2 * Math.floor(zoomBook.currentIndex / 2 + 1)) : zoomBook.gotoPage(parseInt(zoomBook.currentIndex) + 1) : bookType == BookType.slide_book ? (slideBook.gotoPage(2 * Math.floor(slideBook.getCurrentPageIndex() / 2 + 1)), "undefined" != typeof speakConfig && "none" != speakConfig.title && 0 == flagspeak && ($("#LectureText").stop(!0), $("#LectureText").css("marginTop", 0), LectureAudio(Math.floor(slideBook.getCurrentPageIndex() / 2 + 1)), LectureSoll(Math.floor(slideBook.getCurrentPageIndex() / 2 + 1)))) : bookType == BookType.singleSlide_book ? singleSlideBook.gotoPage(parseInt(singleSlideBook.currentIndex) + 1) : bookType == BookType.catalog_book ? (catalogBook.gotoPage(2 * Math.floor(catalogBook.getCurrentPageIndex() / 2 + 1)), "undefined" != typeof speakConfig && "none" != speakConfig.title && 0 == flagspeak && ($("#LectureText").stop(!0), $("#LectureText").css("marginTop", 0), LectureAudio(Math.floor(catalogBook.getCurrentPageIndex() / 2 + 1)), LectureSoll(Math.floor(catalogBook.getCurrentPageIndex() / 2 + 1)))) : bookType == BookType.singleCatalog_book ? singleCatalogBook.gotoPage(parseInt(singleCatalogBook.currentIndex) + 1) : bookType == BookType.phone_book ? (phoneBook.gotoPage(2 * Math.floor(phoneBook.getCurrentPageIndex() / 2 + 1)), "undefined" != typeof speakConfig && "none" != speakConfig.title && 0 == flagspeak && ($("#LectureText").stop(!0), $("#LectureText").css("marginTop", 0), LectureAudio(Math.floor(phoneBook.getCurrentPageIndex() / 2 + 1)), LectureSoll(Math.floor(phoneBook.getCurrentPageIndex() / 2 + 1)))) : bookType == BookType.singlePhone_book && singlePhoneBook.gotoPage(parseInt(singlePhoneBook.currentIndex) + 1)
},
previousPageFun = function() {
	bookType == BookType.normal_book ? (flipBook.gotoPage(2 * Math.floor(flipBook.getCurrentPageIndex() / 2 - 1) + 1), "undefined" != typeof speakConfig && "none" != speakConfig.title && 0 == flagspeak && ($("#LectureText").stop(!0), $("#LectureText").css("marginTop", 0), LectureAudio(Math.floor(flipBook.getCurrentPageIndex() / 2 - 1)), LectureSoll(Math.floor(flipBook.getCurrentPageIndex() / 2 - 1)))) : bookType == BookType.catalog_book ? (catalogBook.gotoPage(2 * Math.floor(catalogBook.getCurrentPageIndex() / 2 - 1) + 1), "undefined" != typeof speakConfig && "none" != speakConfig.title && 0 == flagspeak && ($("#LectureText").stop(!0), $("#LectureText").css("marginTop", 0), LectureAudio(Math.floor(catalogBook.getCurrentPageIndex() / 2 - 1)), LectureSoll(Math.floor(catalogBook.getCurrentPageIndex() / 2 - 1)))) : bookType == BookType.single_book ? singlePageBook.gotoPage(parseInt(singlePageBook.currentPageIndex) - 1) : bookType == BookType.zoom_book ? !0 == zoomBook.doublePage ? zoomBook.gotoPage(2 * Math.floor(zoomBook.currentIndex / 2 - 1) + 1) : zoomBook.gotoPage(parseInt(zoomBook.currentIndex) - 1) : bookType == BookType.slide_book ? slideBook.gotoPage(slideBook.currentIndex - 2) : bookType == BookType.singleSlide_book ? singleSlideBook.gotoPage(parseInt(singleSlideBook.currentIndex) - 1) : bookType == BookType.singleCatalog_book ? singleCatalogBook.gotoPage(parseInt(singleCatalogBook.currentIndex) - 1) : bookType == BookType.phone_book ? phoneBook.gotoPage(phoneBook.currentIndex - 1) : bookType == BookType.singlePhone_book && singlePhoneBook.gotoPage(singlePhoneBook.currentIndex - 1)
},
firstPageFun = function() {
	bookType == BookType.normal_book ? flipBook.gotoPage(1) : bookType == BookType.single_book ? singlePageBook.gotoPage(1) : bookType == BookType.zoom_book ? zoomBook.gotoPage(1) : bookType == BookType.slide_book ? slideBook.gotoPage(1) : bookType == BookType.singleSlide_book ? singleSlideBook.gotoPage(1) : bookType == BookType.catalog_book ? catalogBook.gotoPage(1) : bookType == BookType.singleCatalog_book ? singleCatalogBook.gotoPage(1) : bookType == BookType.phone_book ? phoneBook.gotoPage(1) : bookType == BookType.singlePhone_book && singlePhoneBook.gotoPage(1)
},
lastPageFun = function() {
	bookType == BookType.normal_book ? flipBook.gotoPage(totalPageCount) : bookType == BookType.single_book ? singlePageBook.gotoPage(originTotalPageCount) : bookType == BookType.zoom_book ? zoomBook.gotoPage(originTotalPageCount) : bookType == BookType.slide_book ? slideBook.gotoPage(originTotalPageCount) : bookType == BookType.singleSlide_book ? singleSlideBook.gotoPage(originTotalPageCount) : bookType == BookType.catalog_book ? catalogBook.gotoPage(originTotalPageCount) : bookType == BookType.singleCatalog_book ? singleCatalogBook.gotoPage(originTotalPageCount) : bookType == BookType.phone_book ? phoneBook.gotoPage(originTotalPageCount) : bookType == BookType.singlePhone_book && singlePhoneBook.gotoPage(originTotalPageCount)
},
gotoPageFun = function(b) {
	b = parseInt(b);
	bookType == BookType.normal_book ? flipBook.gotoPage(b) : bookType == BookType.single_book ? singlePageBook.gotoPage(b) : bookType == BookType.zoom_book ? zoomBook.gotoPage(b) : bookType == BookType.slide_book ? slideBook.gotoPage(b) : bookType == BookType.singleSlide_book ? singleSlideBook.gotoPage(b) : bookType == BookType.catalog_book ? catalogBook.gotoPage(b) : bookType == BookType.singleCatalog_book ? singleCatalogBook.gotoPage(b) : bookType == BookType.phone_book ? phoneBook.gotoPage(b) : bookType == BookType.singlePhone_book && singlePhoneBook.gotoPage(b)
},
getPageDir = function(b, c, d) {
	if (0 >= b || void 0 != d && b > d) return "";
	var e;
	d = global.fliphtml5_pages;
	if (void 0 != d && 0 < d.length) {
		d = d[b - 1];
		if (void 0 != d && null != d) switch (c) {
		case "normal":
			e = void 0 == d.n ? d.l: d.n;
			break;
		case "large":
			e = d.l;
			break;
		case "thumb":
			e = d.t
		}
		if (void 0 == e) switch (c) {
		case "normal":
			return e = getString("normalPath", "files/page/") + b + ".jpg";
		case "large":
			return e = getString("largePath", "files/large/") + b + ".jpg";
		case "thumb":
			return e = getString("thumbPath", "files/thumbnail/") + b + ".jpg"
		}
		return void 0 == e ? "": e
	}
	switch (c) {
	case "normal":
		return e = getString("normalPath", "files/page/") + b + ".jpg",
		void 0 == e ? "": e;
	case "large":
		return e = getString("largePath", "files/large/") + b + ".jpg",
		void 0 == e ? "": e;
	case "thumb":
		return e = getString("thumbPath", "files/thumbnail/") + b + ".jpg",
		void 0 == e ? "": e
	}
},
getPageWidthHeight = function(b, c, d, e) {
	var f = Point(0, 0);
	b / c > d / e ? (f.x = d * c / e, f.y = c) : (f.x = b, f.y = b * e / d);
	return f
},
getPageWidthHeightByWidth = function(b, c, d, e) {
	c = Point(0, 0);
	c.x = b;
	c.y = b * e / d;
	return c
},
pointToLineDistance = function(b, c, d, e, f, g) {
	var h = g - e,
	k = d - f;
	return Math.abs(h * b + k * c + (f * e - d * g)) / Math.sqrt(h * h + k * k)
},
globalToBook = function(b, c, d, e) {
	void 0 == e && (e = !1);
	var f;
	e ? f = Point(c - singlePageBook.getLeft(), d - singlePageBook.getTop()) : bookType == BookType.normal_book ? f = Point(c - ((b ? 0 : flipBook.getPageWidth()) + flipBook.getLeft()), d - flipBook.getTop()) : bookType == BookType.catalog_book && (e = catalogBook.getTran(), b = c - ((b ? 0 : catalogBook.getPageWidth()) + catalogBook.getCssLeft()) - e.x, d = d - catalogBook.getCssTop() - e.y, f = Point(b, d));
	return f
};
bdor[32] = function(b, c) {
	return b + c
};
var changeShowBook = function(b) {
	switch (b) {
	case 0:
		bookType = BookType.normal_book;
		singlePageBook.setSingleBookVisible(!1);
		zoomBook.hide();
		flipBook.show();
		zoomBook.changePageMode(!0);
		thumbButtonEnable && thumbnail.mergeAll();
		break;
	case 1:
		bookType = BookType.single_book;
		singlePageBook.setSingleBookVisible(!0);
		zoomBook.hide();
		flipBook.hide();
		zoomBook.changePageMode(!1);
		thumbButtonEnable && thumbnail.fissionAll();
		break;
	case 2:
		bookType = BookType.zoom_book;
		singlePageBook.setSingleBookVisible(!1);
		zoomBook.show();
		flipBook.hide();
		thumbButtonEnable && (!0 == zoomBook.doublePage ? thumbnail.mergeAll() : thumbnail.fissionAll());
		zoomBook.showPage.forceReset();
		zoomBook.showPage.animateMax();
		break;
	case 3:
		bookType = BookType.slide_book;
		slideBook.show();
		thumbButtonEnable && thumbnail.mergeAll();
		break;
	case 4:
		bookType = BookType.phone_book;
		singlePhoneBook.hide();
		phoneBook.show();
		thumbButtonEnable && thumbnail.mergeAll();
		break;
	case 5:
		bookType = BookType.singlePhone_book;
		singlePhoneBook.show();
		phoneBook.hide();
		thumbButtonEnable && thumbnail.fissionAll();
		break;
	case 6:
		bookType = BookType.singleSlide_book;
		singleSlideBook.show();
		thumbButtonEnable && thumbnail.fissionAll();
		break;
	case 7:
		bookType = BookType.catalog_book;
		catalogBook.show();
		thumbButtonEnable && thumbnail.mergeAll();
		break;
	case 8:
		bookType = BookType.singleCatalog_book,
		singleCatalogBook.show(),
		thumbButtonEnable && thumbnail.fissionAll()
	}
},
computeMousePoint = function(b, c, d, e, f, g) {
	var h = function() {
		return 0 <= b.indexOf("l")
	},
	k = function() {
		return 0 <= b.indexOf("t")
	},
	l = function() {
		return 0 <= b.indexOf("b")
	},
	m = Point(c, d),
	p,
	n,
	q,
	s;
	q = h() ? e - c: c;
	s = l() ? f - d: d;
	p = Math.sqrt(Math.pow(q, 2) + Math.pow(s, 2));
	n = Math.sqrt(Math.pow(q, 2) + Math.pow(f - s, 2));
	var r;
	if (p > e && n > g) {
		q = Math.abs(q / (f - s));
		var w = e / f;
		0 >= s && q >= w ? (m = c, r = d, q > w && (m = h() ? e - (e - m) * e / p: m * e / p, r = l() ? f - (f - r) * e / p: r * e / p), 0 > s && (q = h() ? e - m: m, s = l() ? f - r: r, n = Math.sqrt(Math.pow(q, 2) + Math.pow(f - s, 2)), m = h() ? e - (e - m) * g / n: m * g / n, r = k() ? f - (f - r) * g / n: r * g / n)) : p - e >= n - g ? (m = h() ? e - (e - c) * e / p: c * e / p, r = l() ? f - (f - d) * e / p: d * e / p) : (m = h() ? e - (e - c) * g / n: c * g / n, r = k() ? f - (f - d) * g / n: d * g / n);
		m = Point(m, r)
	} else p > e && (m = h() ? e - (e - c) * e / p: c * e / p, r = l() ? f - (f - d) * e / p: d * e / p, m = Point(m, r)),
	n > g && (m = h() ? e - (e - c) * g / n: c * g / n, r = k() ? f - (f - d) * g / n: d * g / n, m = Point(m, r));
	k() && 0 == m.y ? m.y = 0.002 * f: l() && m.y == f && (m.y = 0.998 * f);
	return m
},
computePoint = function(b, c, d, e, f, g, h, k) {
	var l, m;
	l = Point(c, d);
	l = computeMousePoint(b, c, d, e, f, g);
	d = l.x;
	m = l.y;
	l = function() {
		return 0 <= b.indexOf("l")
	};
	c = function() {
		return 0 <= b.indexOf("t")
	};
	switch (b) {
	case "tl":
		actualPoint = Point(d, m);
		middlePoint = Point(e - actualPoint.x / 2, m / 2);
		endPoint = Point(2 * e, 0);
		break;
	case "tr":
		actualPoint = Point(e - d, m);
		middlePoint = Point(e - actualPoint.x / 2, actualPoint.y / 2);
		endPoint = Point( - e, 0);
		break;
	case "bl":
		actualPoint = Point(d, f - m);
		middlePoint = Point(e - actualPoint.x / 2, actualPoint.y / 2);
		endPoint = Point(2 * e, f);
		break;
	case "br":
		actualPoint = Point(e - d, f - m),
		middlePoint = Point(e - actualPoint.x / 2, actualPoint.y / 2),
		endPoint = Point( - e, f)
	}
	var p = Point(0, 0),
	n = Math.PI / 2,
	q = Math.atan2(actualPoint.y, actualPoint.x);
	m = n - q;
	d = 180 * m / Math.PI;
	var s = m - Math.atan2(middlePoint.y, middlePoint.x);
	distance = Math.max(0, Math.sin(s) * Math.sqrt(Math.pow(middlePoint.x, 2) + Math.pow(middlePoint.y, 2)));
	noMovePoint = Point(distance * Math.sin(m), distance * Math.cos(m));
	var r, w;
	m > n && (noMovePoint.x += Math.abs(noMovePoint.y * Math.tan(q)), noMovePoint.y = 0, p = Math.PI - m, g = g - f / Math.sin(p) - (noMovePoint.x - f / Math.tan(p)) * Math.cos(p), p = Point(Math.round(g * Math.cos(p)), Math.round(g * Math.sin(p))), l() && (p.x = -p.x), c() && (p.y = -p.y));
	q = Math.sqrt(Math.pow(endPoint.x - actualPoint.x, 2) + Math.pow(endPoint.y - actualPoint.y, 2));
	g = Math.round(noMovePoint.y / Math.tan(m) + noMovePoint.x);
	l() && (g = e - g);
	n = l() ? g: e - g;
	s = n * Math.cos(2 * m);
	r = n * Math.sin(2 * m);
	g = Point(Math.round(g + (l() ? -s: s)), Math.round(c() ? r: f - r));
	r = n * Math.sin(m);
	var u = actualPoint.x / 2,
	y = actualPoint.y / 2,
	n = Point(u / e * 100, y / f * 100),
	q = q < e ? q / e: 1,
	s = 100 < r ? (r - 100) / r: 0;
	c() || (n.y = 100 - n.y);
	l() && (n.x = 100 - n.x);
	w = Point(u / e * 100, y / f * 100);
	l() || (w.x = 100 - w.x);
	c() || (w.y = 100 - w.y);
	var v = getBrowserPre();
	if ("-webkit-" != v) {
		var t = Point(u, y);
		c() || (t.y = f - t.y);
		l() && (t.x = e - t.x);
		var u = 100,
		u = Math.round(100 * s),
		y = Math.round(100 * (0.8 * (1 - s) + s)),
		x = l() ? e: 0,
		z = c() ? 0 : f,
		x = t.x - x,
		z = t.y - z,
		t = Math.atan2( - z, x),
		t = 180 * t / Math.PI,
		x = getShadowRate(x, z, e, f, c());
		h.css({
			"background-image": v + "linear-gradient( " + t + "deg,  rgba(0,0,0,0) " + u * x + "%, rgba(0,0,0," + 0.2 * q + ") " + y * x + "%, rgba(255,255,255," + 0.2 * q + ") " + 100 * x + "%)"
		});
		m = Point(r * Math.sin(m), r * Math.cos(m));
		l() || (m.x = e - m.x);
		c() || (m.y = f - m.y);
		x = l() ? 0 : e;
		z = c() ? 0 : f;
		x = m.x - x;
		z = m.y - z;
		t = Math.atan2( - z, x);
		t = 180 * t / Math.PI;
		x = getShadowRate(x, z, e, f, c());
		u = 100 * x;
		ff_gradientStart = 0.6 * u;
		k.css({
			"background-image": v + "linear-gradient( " + t + "deg, rgba(0,0,0,0) " + ff_gradientStart + "%, rgba(0,0,0," + 0.4 * q + ") " + u + "%, rgba(0,0,0,0) 100% )"
		})
	}
	"-webkit-" == v && (h.css({
		"background-image": v + "gradient(linear, " + (l() ? 100 : 0) + "% " + (c() ? 0 : 100) + "%, " + n.x + "% " + n.y + "%, color-stop(" + s + ",rgba(0,0,0,0)), color-stop(" + (0.8 * (1 - s) + s) + ",rgba(0,0,0," + 0.2 * q + ")), to(rgba(255,255,255," + 0.2 * q + ")))"
	}), k.css({
		"background-image": v + "gradient(linear, " + (l() ? 0 : 100) + "% " + (c() ? 0 : 100) + "%, " + w.x + "% " + w.y + "%,  color-stop(0.6,rgba(0,0,0,0)), color-stop(1, rgba(0,0,0," + 0.2 * q + ")), to(rgba(0,0,0,0)))"
	}), Log.debug(h.css("background-image")));
	return {
		Angle: d,
		Mv: p,
		Df: g,
		NomovePoint: noMovePoint
	}
},
getShadowRate = function(b, c, d, e, f) {
	var g = 0,
	h = 1,
	h = Math.sqrt(Math.pow(b, 2) + Math.pow(c, 2));
	Math.atan2(c, b);
	var k = Math.sqrt(Math.pow(d, 2) + Math.pow(e, 2));
	b = Math.abs(b);
	var l = Math.abs(c),
	m = Math.atan2(e, d);
	d = Math.atan2(l, b);
	b = Math.abs(m - d);
	k *= Math.cos(b);
	h /= k;
	if (f && 0 > c || !f && 0 < c) g = e * Math.sin(d) / k;
	return h + g
},
setCurrentIndexTextField = function(b, c) {
	var d = bookConfig.totalPagesCaption,
	e = bookConfig.pageNumberCaption;
	void 0 == d && (d = "");
	void 0 == e && (e = "");
	if ("" != e) if (1 != b && b != totalPageCount && c) {
		var e = 2 * Math.floor(b / 2),
		f = getShownPageNumber(e),
		g = getShownPageNumber(e + 1);
		b = rightToLeft ? g + "-" + f: f + "-" + g
	} else e = b = getShownPageNumber(b);
	else 1 != b && b != totalPageCount && c ? (f = e = 2 * Math.floor(b / 2), g = e + 1, b = rightToLeft ? g + "-" + f: f + "-" + g) : e = b;
	"" == d ? (d = totalPageCount, c || (d = originTotalPageCount)) : (d = f = parseInt(d), c || (d = totalPageCount - originTotalPageCount + f));
	$("#guidPageIndex").html("<b>" + (e + "/" + d) + "</b>");
	void 0 != $("#currentPageIndexTextField") && null != $("#currentPageIndexTextField") && void 0 != $("#currentPageIndexTextField")[0] && null != $("#currentPageIndexTextField")[0] && $("#currentPageIndexTextField").val(rightToLeft ? d + "/" + b: b + "/" + d)
},
getShownPageNumber = function(b) {
	var c = bookConfig.pageNumberCaption;
	if ("" == c || void 0 == c) return b;
	";" != c.substr(c.length - 1, 1) && (c += ";");
	for (var c = c.split(";"), d = [], e = 0, f = 0, g = c.length; f < g - 1; f++) if ("" != c[f] && void 0 != c[f] && (e = c[f].split(":"), e[0] && !isNaN(e[0]))) if ( - 1 < e[1].indexOf("+")) {
		var g = e[0],
		h = g.indexOf("-");
		sMinPage = g.substring(0, h);
		sMaxPage = g.substring(h + 1, g.length);
		for (var h = parseInt(sMinPage), k = parseInt(sMaxPage), e = parseInt(e[1].replace("+", "")), g = h; g <= k; g++) d[g] = g - h + e
	} else h = parseInt(e[0]),
	d[h] = void 0 == e[1] ? "": e[1];
	return void 0 == d[b] ? b: d[b]
},
getSpeedArray = function(b, c) {
	for (var d = c / 2,
	e = (b - b / 4) / d, f = Array(c), g = 0; g < c; g++) f[g] = g < d ? b - (d - g) * e: b + (g - d + 1) * e;
	return f.reverse()
},
getBrowserPre = function() {
	switch (browserType) {
	case 3:
		return "-ms-";
	case 2:
		return "-moz-";
	case 1:
		return "-webkit-";
	case 4:
		return "-o-"
	}
},
getPoint = function(b) {
	if (3 == browserType) {
		if (void 0 == b.getOrigin || null == b.getOrigin) b.getOrigin = !1;
		if (!b.getOrigin) {
			b.getOrigin = !0;
			b.originX = parseInt(b.css("left"));
			b.originY = parseInt(b.css("top"));
			if (void 0 == b.originX || null == b.originX || isNaN(b.originX)) b.originX = 0;
			if (void 0 == b.originY || null == b.originY || isNaN(b.originY)) b.originY = 0
		}
		return Point(parseInt(b.css("left")) - b.originX, parseInt(b.css("top")) - b.originY)
	}
	return getTransform(b[0])
},
getBookPoint = function(b) {
	return bookType != BookType.slide_book && bookType != BookType.singleSlide_book && bookType != BookType.catalog_book && bookType != BookType.singleCatalog_book ? getTransform(b[0]) : getPoint(b)
},
getTransform = function(b) {
	var c;
	switch (browserType) {
	case 3:
		c = b.style["-ms-transform"];
		break;
	case 2:
		c = b.style["-moz-transform"];
		break;
	case 1:
		c = b.style["-webkit-transform"];
		break;
	case 4:
		c = b.style["-o-transform"];
		break;
	default:
		c = b.style.transform
	}
	if (void 0 == c || null == c) c = b.style.transform;
	c = c.match(/translate\((.*?)\)/) || c.match(/translate3d\((.*?)\)/);
	if (null == c || "" == c || 2 > c.length) return Point(0, 0);
	c = c[1].split(", ");
	return Point(parseInt(c[0], 10), parseInt(c[1], 10))
},
getScale = function(b) {
	var c;
	switch (browserType) {
	case 3:
		c = b.style["-ms-transform"];
		break;
	case 2:
		c = b.style["-moz-transform"];
		break;
	case 1:
		c = b.style["-webkit-transform"];
		break;
	case 4:
		c = b.style["-o-transform"];
		break;
	default:
		c = b.style.transform
	}
	if (void 0 == c || null == c) c = b.style.transform;
	c = c.match(/scale\((.*?)\)/) || c.match(/scale3d\((.*?)\)/);
	if (null == c || "" == c) return 1;
	c = c[1].split(", ");
	return c[0]
},
actionEvent = function(b) {
	this.config.action.actionType == PageEditor.ActionType.GOTO_PAGE ? (gotoPageFun(this.config.action.pageIndex), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.OPEN_URL ? (void 0 == this.config.action.linkTarget && (this.config.action.linkTarget = "_blank"), 3 == browserType ? window.location = this.linkURL: window.open(this.linkURL, this.config.action.linkTarget), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.OPEN_WINDOW ? (this.form = new initVideoForm(tmpContainer, {
		width: this.config.action.windowWidth,
		height: this.config.action.windowHeight,
		src: this.config.action.resourceContent,
		caption: this.config.action.caption
	},
	bookContainer.width(), bookContainer.height()), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.SLIDE_SHOW ? (this.slide = new initSlideShow(tmpContainer, this.config.action.photos.photo, bookContainer.width(), bookContainer.height()), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.PLAY_AUDIO ? (this.audios = new initAudioEditor(tmpContainer, this.config.action.audioURL, this.config.action.autoPlay), this.audios.showshow(), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.ACTION_JS ? (null != this.config.action.scriptFun && eval(this.config.action.scriptFun), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.OPEN_IMG ? (this.zoomImg = new HTML5ZoomImg(this.config.src, $("#tmpContainer")), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.PLAY_VIDEO && (this.config.action.windowType == PageEditor.WindowType.OPEN_YOUTUBE ? this.video = new PopUpVideo(this.config.action, "youtube") : this.config.action.windowType == PageEditor.WindowType.OPEN_VIMEO && (this.video = new PopUpVideo(this.config.action, "vimeo")), this.video && this.video.show(), $(b).addClass("slider-action"))
},
getAliasValue = function(b) {
	b = bookConfig[b];
	if (b instanceof Array) for (; 0 < b.length;) return (b = b[0]) ? bookConfig[b] : void 0;
	else return b
},
getString = function(b, c) {
	return getAliasValue(b) || c
},
getInt = function(b, c) {
	var d = getAliasValue(b);
	try {
		return isNaN(d) || void 0 == d ? c: Number(d)
	} catch(e) {
		return c
	}
},
getBool = function(b, c) {
	var d = ["true", "yes", "show", "enable"],
	e = ["false", "no", "hide", "disable"],
	f = getAliasValue(b);
	try {
		f = f.toLowerCase()
	} catch(g) {
		return c
	}
	return 0 > d.indexOf(f) && 0 > e.indexOf(f) ? c: 0 <= d.indexOf(f)
},
parseBool = function(b, c) {
	if (!0 === b || !1 === b) return b;
	if (void 0 == b) return ! 1;
	void 0 == c && (c = !1);
	var d = ["true", "yes", "show", "enable"],
	e = ["false", "no", "hide", "disable"];
	b = b.toLowerCase();
	return 0 > d.indexOf(b) && 0 > e.indexOf(b) ? c: 0 <= d.indexOf(b)
},
getColor = function(b, c) {
	var d = getAliasValue(b);
	return void 0 != d ? colorTo0x(d) : c
},
getImage = function(b) {
	if (0 < iconArray.length) for (var c = 0; c < iconArray.length; c++) if (iconArray[c].url == b) return iconArray[c].img;
	return new Image
},
getLanguage = function(b, c) {
	return selectedLanguage[b] ? selectedLanguage[b] : getLanguageValue(b, c)
},
highlightSearchFun = function(b, c) {
	if (0 != positionForPages.length) {
		var d = !1;
		if (void 0 == frmSearch || null == frmSearch) d = !0;
		frmSearch.isSearchShow || (d = !0);
		0 == frmSearch.itemCount && (d = !0);
		var e = frmSearch.textField.val().toLowerCase();
		"" == e && (d = !0);
		if (!0 == d) clearHighlightFun(b);
		else {
			for (var f, d = 0; d < positionForPages.length; d++) if (positionForPages[d].page == c) {
				f = positionForPages[d].positions;
				break
			}
			if (void 0 == f) clearHighlightFun(b);
			else {
				var g = "url(" + uiBaseURL + "highlight.png)",
				h = "",
				k = "",
				l = "",
				m = "";
				if (0 < f.length) {
					for (d = 0; d < f.length; d++) {
						var p = f[d];
						if ( - 1 < p.word.toLowerCase().indexOf(e)) var n = p.left / (1 - p.width),
						q = p.top / (1 - p.height),
						h = h + g + ",",
						m = m + "no-repeat,",
						k = k + 100 * n + "% " + 100 * q + "%,",
						l = l + 100 * p.width + "% " + 100 * p.height + "%,"
					}
					0 < h.length ? (h = h.substr(0, h.length - 1), m = m.substr(0, m.length - 1), k = k.substr(0, k.length - 1), l = l.substr(0, l.length - 1), b.css({
						"background-image": h,
						"background-repeat": m,
						"background-position": k,
						"-webkit-background-size": l,
						"-o-background-size": l,
						"background-size": l,
						display: "block"
					})) : clearHighlightFun(b)
				} else clearHighlightFun(b)
			}
		}
	}
},
clearHighlightFun = function(b) {
	b.css({
		"background-image": ""
	});
	b.css({
		display: "none"
	})
},
clickFun = function() { ! isPhone() || global.foldingMenu && !0 == global.foldingMenu.visible || toolBar.showOrHide()
},
stopEvent = function(b) {
	try {
		var c = b || window.event;
		c.preventDefault ? (c.preventDefault(), c.stopPropagation()) : (c.returnValue = !1, c.cancelBubble = !0)
	} catch(d) {}
	return ! 1
},
getShownPage = function() {
	var b = [];
	if (bookType == BookType.normal_book) {
		var c = flipBook.getCurrentPageIndex(),
		c = 2 * Math.floor(c / 2),
		d = c + 1;
		rightToLeft ? (b.push(d), b.push(c)) : (b.push(c), b.push(d))
	}
	bookType == BookType.single_book && (c = singlePageBook.gotoPageIndex, b.push(c));
	bookType == BookType.zoom_book && (zoomBook.doublePage ? (c = zoomBook.getCurrentPageIndex(), c = 2 * Math.floor(c / 2), d = c + 1, rightToLeft ? (b.push(d), b.push(c)) : (b.push(c), b.push(d))) : (c = zoomBook.currentIndex, b.push(c)));
	if (bookType == BookType.slide_book) {
		if (void 0 == slideBook) return;
		c = slideBook.getCurrentPageIndex();
		c = 2 * Math.floor(c / 2);
		d = c + 1;
		rightToLeft ? (b.push(d), b.push(c)) : (b.push(c), b.push(d))
	}
	if (bookType == BookType.singleSlide_book) {
		if (void 0 == singleSlideBook) return;
		c = parseInt(singleSlideBook.currentIndex);
		b.push(c)
	}
	if (bookType == BookType.catalog_book) {
		if (void 0 == catalogBook) return;
		c = catalogBook.getCurrentPageIndex();
		c = 2 * Math.floor(c / 2);
		d = c + 1;
		rightToLeft ? (b.push(d), b.push(c)) : (b.push(c), b.push(d))
	}
	if (bookType == BookType.singleCatalog_book) {
		if (void 0 == singleCatalogBook) return;
		c = parseInt(singleCatalogBook.currentIndex);
		b.push(c)
	}
	if (bookType == BookType.phone_book) {
		if (void 0 == phoneBook) return;
		c = phoneBook.getCurrentPageIndex();
		c = 2 * Math.floor(c / 2);
		d = c + 1;
		rightToLeft ? (b.push(d), b.push(c)) : (b.push(c), b.push(d))
	}
	if (bookType == BookType.singlePhone_book) {
		if (void 0 == singlePhoneBook) return;
		c = singlePhoneBook.currentIndex;
		b.push(c)
	}
	return b
},
getShownPageString = function() {
	var b = getShownPage();
	return 1 == b.length ? b[0] + "": b[0] + "-" + b[1]
},
isIE = function() {
	navigator.userAgent.toLowerCase();
	return $.browser.msie || 11 == $.browser.version
},
isIE11 = function() {
	navigator.userAgent.toLowerCase();
	return 11 == $.browser.version
},
isPad = function() {
	return 0 < navigator.userAgent.toLowerCase().indexOf("pad")
},
isIpad = function() {
	var b = navigator.userAgent.toLowerCase();
	return 0 < b.indexOf("ipad") && 0 < b.indexOf("safari")
},
isPC = function() {
	return $.browser.device == $.browser.DEVICE_PC ? !0 : !1
},
isIpod = function() {
	return 0 < navigator.userAgent.toLowerCase().indexOf("ipod")
},
isIphone = function() {
	return 0 < navigator.userAgent.toLowerCase().indexOf("iphone")
},
isNokiaPhone = function() {
	var b = navigator.userAgent.toLowerCase();
	return 0 < b.indexOf("msie") && 0 < b.indexOf("wpdesktop")
},
isPhone = function() {
	var b = window.location.search;
	return $.browser.device == $.browser.DEVICE_PHONE ? !0 : 0 <= b.toLowerCase().indexOf("phone=true") || 0 <= b.toLowerCase().indexOf("phonebook=true") ? !0 : !1
},
isPhoneBook = function() {
	var b = window.location.search;
	if(isPhone()&&bookConfig.FlipStyle.toLowerCase() == 'slide'){
		return true;
	}
	return isPhone() && $.system.name == $.system.ANDROID && 4 > parseInt($.system.version) ? !0 : 0 <= b.toLowerCase().indexOf("phonebook=true") ? !0 : !1
},
isFlipBook = function() {
	return bookType == BookType.normal_book || bookType == BookType.single_book || bookType == BookType.zoom_book || bookType == BookType.catalog_book || bookType == BookType.singleCatalog_book ? !0 : !1
},
isCatalogBook = function() {
	void 0 == bookConfig.FlipStyle && (bookConfig.FlipStyle = getConfigValue("FlipStyle", "flip"));
	return "catalog" == bookConfig.FlipStyle.toLowerCase() ? !0 : !1
},
isSlideBook = function() {
	void 0 == bookConfig.FlipStyle && (bookConfig.FlipStyle = getConfigValue("FlipStyle", "flip"));
	return "slide" == bookConfig.FlipStyle.toLowerCase() ? !0 : !1
},
MiniStyle = Class({
	create: function(b) {
		this.init(b);
		this.onResize();
		this.initEvent()
	},
	init: function(b) {
		this.miniLogo = $("<div><img style='right:0px;bottom:0px;opacity:0.5;position:absolute;cursor:pointer;' src='" + bookConfig.appLogoIcon + "'/></div>");
		b.append($(this.miniLogo));
		var c = getLogoLink();
		this.miniLogo.click(function() {
			void 0 != c && null != c && window.open(c[0], c[1])
		});
		this.miniLogo.bind(_event._enter,
		function() {
			$(this).css({
				opacity: "1"
			})
		});
		this.miniLogo.bind(_event._leave,
		function() {
			$(this).css({
				opacity: "0.5"
			})
		});
		this.width = 220;
		this.height = 35;
		this.box = $("<div></div>");
		this.box.css({
			width: this.width + "px",
			height: this.height + "px",
			"z-index": "300",
			color: "#ffffff",
			"font-size": "15px",
			position: "absolute",
			cursor: "pointer"
		});
		this.background = $("<div></div>");
		this.background.css({
			width: "100%",
			height: "100%",
			background: "#000000",
			opacity: "0.5",
			"border-radius": "5px",
			"z-index": "0",
			position: "absolute"
		});
		this.title = $("<div></div>");
		this.title.css({
			"z-index": "1",
			"line-height": "35px",
			height: "100%",
			width: "100%",
			"vertical-align": "middle",
			"text-align": "center",
			"font-family": "Arial,Tomaha",
			position: "absolute"
		});
		this.title.html("<b>Click to view in fullscreen.</b>");
		this.box.append(this.background);
		this.box.append(this.title);
		tmpContainer.append(this.box)
	},
	onResize: function() {
		this.box.css({
			left: (windowWidth - this.width) / 2 + "px",
			top: (windowHeight - this.height) / 2 + "px"
		})
	},
	initEvent: function() {
		window.top != window.self ? (this.box.bind(_event._end,
		function() {
			var b = $("body")[0];
			fullScreenApi.supportsFullScreen ? fullScreenApi.isFullScreen() ? fullScreenApi.cancelFullScreen() : fullScreenApi.requestFullScreen(b) : b.webkitSupportsFullscreen && b.webkitEnterFullscreen(Element.ALLOW_KEYBOARD_INPUT);
			this.box.css({
				display: "none"
			});
			return ! 1
		}.bind(this)), $(document).bind(fullScreenApi.fullScreenEventName,
		function() {
			toolBar.changeFullscreenIcon(fullScreenApi.isFullScreen())
		})) : this.box.bind(_event._end,
		function() {
			window.open(window.location.href, "blank")
		})
	},
	clearStyle: function() {
		this.box.empty()
	},
	isMini: function() {
		if (!isPhone()) {
			if ((windowWidth <= bookConfig.maxWidthToSmallMode || windowHeight <= bookConfig.maxHeightToSmallMode) && parseBool(bookConfig.MiniStyle, "true") && !fullScreenApi.isFullScreen()) return void 0 != this.box && null != this.box && this.box.css({
				display: "block"
			}),
			global.foldingMenu && global.foldingMenu.hide(),
			!0;
			void 0 != this.box && null != this.box && this.box.css({
				display: "none"
			});
			return ! 1
		}
		void 0 != this.box && null != this.box && this.box.css({
			display: "none"
		});
		return ! 1
	}
});
function isBelowIE9() {
	return $.browser.msie ? 9 > $.browser.version ? !0 : !1 : !1
}
function hideLeftRightButton() {
	return void 0 == leftRightButton || null == leftRightButton || bookType != BookType.slide_book || "lite" != bookConfig.ToolbarViewMode.toLowerCase() || bookType != BookType.singleSlide_book || "lite" != bookConfig.ToolbarViewMode.toLowerCase() || bookType == BookType.singleCatalog_book || bookType == BookType.catalog_book || isPhone() ? !1 : !0
}
function addAdSense(b, c, d, e, f) {
	loadJavascript("http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",
	function() {
		var g = document.createElement("ins"),
		g = $(g);
		g.addClass("adsbygoogle");
		g.css({
			display: "inline-block",
			width: d + "px",
			height: e + "px"
		});
		g.attr("data-ad-client", f);
		var h = $("<div/>");
		h.css({
			position: "absolute",
			"z-index": 1,
			left: b + "px",
			top: c + "px",
			width: d + "px",
			height: e + "px"
		});
		$("body").append(h);
		h.append(g);
		eval("(adsbygoogle = window.adsbygoogle || []).push({});")
	})
}
var BookInfo = Class({
	statics: {
		getCurrentPages: function() {
			return getShownPage()
		},
		getPageCount: function() {
			return bookConfig.totalPageCount
		},
		isRightToLeft: function() {
			return rightToLeft
		},
		getBookType: function() {
			return bookType
		},
		getBook: function() {
			var b;
			switch (this.getBookType()) {
			case BookType.normal_book:
				b = flipBook;
				break;
			case BookType.single_book:
				b = singlePageBook;
				break;
			case BookType.zoom_book:
				b = zoomBook;
				break;
			case BookType.slide_book:
				b = slideBook;
				break;
			case BookType.phone_book:
				b = phoneBook;
				break;
			case BookType.singlePhone_book:
				b = singlePhoneBook;
				break;
			case BookType.singleSlide_book:
				b = singleSlideBook;
				break;
			case BookType.catalog_book:
				b = catalogBook;
				break;
			case BookType.singleCatalog_book:
				b = singleCatalogBook
			}
			if (void 0 == b || null == b) b = flipBook;
			return b
		},
		left: function() {
			return this.getBook().getLeft()
		},
		top: function() {
			return this.getBook().getTop()
		},
		width: function() {
			return this.getBook().getWidth()
		},
		height: function() {
			return this.getBook().getHeight()
		},
		scale: function() {
			return this.getBook().getScale()
		},
		container: function() {
			return bookContainer
		}
	}
}),
getConfigValue = function(b, c) {
	try {
		if (!aliasConfig) return c;
		var d = aliasConfig[b];
		if (!d) return c;
		for (var e = 0; e < d.length; e++) {
			var f = d[e];
			if (bookConfig[f]) return bookConfig[f]
		}
		return c
	} catch(g) {
		return c
	}
},
getLanguageValue = function(b, c) {
	try {
		if (!aliasLanguage) return c;
		var d = aliasLanguage[b];
		if (!d) return c;
		for (var e = 0; e < d.length; e++) {
			var f = d[e];
			if (selectedLanguage[f]) return selectedLanguage[f]
		}
		return c
	} catch(g) {
		return c
	}
},
cr = DeString("c3753b3f49449a65f9ad12578d7a4602c8ae34"),
checkBookConfig = function() {
	void 0 == bookConfig.searchColor && (bookConfig.searchColor = getConfigValue("searchColor", "#00ffff"));
	void 0 == bookConfig.searchAlpha && (bookConfig.searchAlpha = getConfigValue("searchAlpha", 0.3));
	void 0 == bookConfig.appLogoIcon && (bookConfig.appLogoIcon = getConfigValue("appLogoIcon", ""));
	void 0 == bookConfig.appLogoLinkURL && (bookConfig.appLogoLinkURL = getConfigValue("appLogoLinkURL", ""));
	void 0 == bookConfig.HomeURL && (bookConfig.HomeURL = getConfigValue("HomeURL", ""));
	void 0 == bookConfig.appLogoOpenWindow && (bookConfig.appLogoOpenWindow = getConfigValue("appLogoOpenWindow", "Blank"));
	void 0 == bookConfig.bookTitle && (bookConfig.bookTitle = getConfigValue("bookTitle", "FLIPBOOK"));
	void 0 == bookConfig.bookDescription && (bookConfig.bookDescription = getConfigValue("bookDescription", ""));
	void 0 == bookConfig.toolbarColor && (bookConfig.toolbarColor = getConfigValue("toolbarColor", "#27181A"));
	void 0 == bookConfig.iconColor && (bookConfig.iconColor = getConfigValue("iconColor", "#FFFFFF"));
	void 0 == bookConfig.pageNumColor && (bookConfig.pageNumColor = getConfigValue("pageNumColor", "#000000"));
	void 0 == bookConfig.loadingBackground && (bookConfig.loadingBackground = getConfigValue("loadingBackground", "#1F2232"));
	void 0 == bookConfig.logoHeight && (bookConfig.logoHeight = getConfigValue("logoHeight", 40));
	if (void 0 == bookConfig.logoPadding || "" == bookConfig.logoPadding) bookConfig.logoPadding = getConfigValue("logoPadding", 0);
	void 0 == bookConfig.logoTop && (bookConfig.logoTop = getConfigValue("logoTop", 0));
	void 0 == bookConfig.HomeButtonVisible && (bookConfig.HomeButtonVisible = getConfigValue("HomeButtonVisible", "Hide"));
	void 0 == bookConfig.ShareButtonVisible && (bookConfig.ShareButtonVisible = getConfigValue("ShareButtonVisible", "Hide"));
	void 0 == bookConfig.ThumbnailsButtonVisible && (bookConfig.ThumbnailsButtonVisible = getConfigValue("ThumbnailsButtonVisible", "Hide"));
	void 0 == bookConfig.thumbnailColor && (bookConfig.thumbnailColor = getConfigValue("thumbnailColor", "#FFFFFF"));
	void 0 == bookConfig.thumbnailAlpha && (bookConfig.thumbnailAlpha = getConfigValue("thumbnailAlpha", 60));
	void 0 == bookConfig.ZoomButtonVisible && (bookConfig.ZoomButtonVisible = getConfigValue("ZoomButtonVisible", "Hide"));
	void 0 == bookConfig.TableOfContentButtonVisible && (bookConfig.TableOfContentButtonVisible = getConfigValue("TableOfContentButtonVisible", "Hide"));
	void 0 == bookConfig.BookMarkButtonVisible && (bookConfig.BookMarkButtonVisible = getConfigValue("BookMarkButtonVisible", "Hide"));
	void 0 == bookConfig.bookmarkBackground && (bookConfig.bookmarkBackground = getConfigValue("bookmarkBackground", "#000000"));
	void 0 == bookConfig.bookmarkFontColor && (bookConfig.bookmarkFontColor = getConfigValue("bookmarkFontColor", "#ffffff"));
	void 0 == bookConfig.SearchButtonVisible && (bookConfig.SearchButtonVisible = getConfigValue("SearchButtonVisible", "Hide"));
	void 0 == bookConfig.FullscreenButtonVisible && (bookConfig.FullscreenButtonVisible = getConfigValue("FullscreenButtonVisible", "Show"));
	void 0 == bookConfig.leastSearchChar && (bookConfig.leastSearchChar = getConfigValue("leastSearchChar", 0));
	void 0 == bookConfig.searchBackground && (bookConfig.searchBackground = getConfigValue("searchBackground", "#383838"));
	void 0 == bookConfig.searchFontColor && (bookConfig.searchFontColor = getConfigValue("searchFontColor", "#ffffff"));
	void 0 == bookConfig.PrintButtonVisible && (bookConfig.PrintButtonVisible = getConfigValue("PrintButtonVisible", "Hide"));
	void 0 == bookConfig.printWatermarkFile && (bookConfig.printWatermarkFile = getConfigValue("printWatermarkFile", ""));
	void 0 == bookConfig.BackgroundSoundButtonVisible && (bookConfig.BackgroundSoundButtonVisible = getConfigValue("BackgroundSoundButtonVisible", "Hide"));
	void 0 == bookConfig.BackgroundSoundURL && (bookConfig.BackgroundSoundURL = getConfigValue("BackgroundSoundURL", ""));
	void 0 == bookConfig.BackgroundSoundLoop && (bookConfig.BackgroundSoundLoop = getConfigValue("BackgroundSoundLoop", -1));
	void 0 == bookConfig.HelpButtonVisible && (bookConfig.HelpButtonVisible = getConfigValue("HelpButtonVisible", "Hide"));
	void 0 == bookConfig.helpContentFileURL && (bookConfig.helpContentFileURL = getConfigValue("helpContentFileURL", ""));
	void 0 == bookConfig.helpWidth && (bookConfig.helpWidth = getConfigValue("helpWidth", 400));
	void 0 == bookConfig.helpHeight && (bookConfig.helpHeight = getConfigValue("helpHeight", 450));
	void 0 == bookConfig.showHelpContentAtFirst && (bookConfig.showHelpContentAtFirst = getConfigValue("showHelpContentAtFirst", "No"));
	void 0 == bookConfig.aboutButtonVisible && (bookConfig.aboutButtonVisible = getConfigValue("aboutButtonVisible", "Hide"));
	void 0 == bookConfig.aboutContactInfoTxt && (bookConfig.aboutContactInfoTxt = getConfigValue("aboutContactInfoTxt", ""));
	void 0 == bookConfig.AutoPlayButtonVisible && (bookConfig.AutoPlayButtonVisible = getConfigValue("AutoPlayButtonVisible", "Hide"));
	void 0 == bookConfig.autoPlayAutoStart && (bookConfig.autoPlayAutoStart = getConfigValue("autoPlayAutoStart", "No"));
	void 0 == bookConfig.autoPlayDuration && (bookConfig.autoPlayDuration = getConfigValue("autoPlayDuration", 3));
	void 0 == bookConfig.autoPlayLoopCount && (bookConfig.autoPlayLoopCount = getConfigValue("autoPlayLoopCount", 1));
	void 0 == bookConfig.minZoomWidth && (bookConfig.minZoomWidth = getConfigValue("minZoomWidth", 403));
	void 0 == bookConfig.minZoomHeight && (bookConfig.minZoomHeight = getConfigValue("minZoomHeight", 518));
	void 0 == bookConfig.mouseWheelFlip && (bookConfig.mouseWheelFlip = getConfigValue("mouseWheelFlip", "yes"));
	void 0 == bookConfig.DownloadButtonVisible && (bookConfig.DownloadButtonVisible = getConfigValue("DownloadButtonVisible", "yes"));
	void 0 == bookConfig.DownloadURL && (bookConfig.DownloadURL = getConfigValue("DownloadURL", ""));
	void 0 == bookConfig.bgBeginColor && (bookConfig.bgBeginColor = getConfigValue("bgBeginColor", "#E6E6E6"));
	void 0 == bookConfig.bgEndColor && (bookConfig.bgEndColor = getConfigValue("bgEndColor", "#E3E3E3"));
	void 0 == bookConfig.bgMRotation && (bookConfig.bgMRotation = getConfigValue("bgMRotation", 90));
	void 0 == bookConfig.backGroundImgURL && (bookConfig.backGroundImgURL = getConfigValue("backGroundImgURL", ""));
	void 0 == bookConfig.LeftShadowWidth && (bookConfig.LeftShadowWidth = getConfigValue("LeftShadowWidth", 40));
	void 0 == bookConfig.LeftShadowAlpha && (bookConfig.LeftShadowAlpha = getConfigValue("LeftShadowAlpha", 1));
	void 0 == bookConfig.RightShadowWidth && (bookConfig.RightShadowWidth = getConfigValue("RightShadowWidth", 40));
	void 0 == bookConfig.RightShadowAlpha && (bookConfig.RightShadowAlpha = getConfigValue("RightShadowAlpha", 1));
	void 0 == bookConfig.pageBackgroundColor && (bookConfig.pageBackgroundColor = getConfigValue("pageBackgroundColor", "#FFFFFF"));
	void 0 == bookConfig.flipshortcutbutton && (bookConfig.flipshortcutbutton = getConfigValue("flipshortcutbutton", "Hide"));
	void 0 == bookConfig.OriginPageIndex && (bookConfig.OriginPageIndex = getConfigValue("OriginPageIndex", 1));
	void 0 == bookConfig.HardPageEnable && (bookConfig.HardPageEnable = getConfigValue("HardPageEnable", "No"));
	void 0 == bookConfig.RightToLeft && (bookConfig.RightToLeft = getConfigValue("RightToLeft", "No"));
	void 0 == bookConfig.flippingTime && (bookConfig.flippingTime = getConfigValue("flippingTime", 0.3));
	void 0 != bookConfig.flippingTime && (bookConfig.flippingTime = 0.2 > bookConfig.flippingTime ? 0.2 : bookConfig.flippingTime);
	void 0 == bookConfig.retainBookCenter && (bookConfig.retainBookCenter = getConfigValue("retainBookCenter", "Yes"));
	void 0 == bookConfig.totalPagesCaption && (bookConfig.totalPagesCaption = getConfigValue("totalPagesCaption", ""));
	void 0 == bookConfig.pageNumberCaption && (bookConfig.pageNumberCaption = getConfigValue("pageNumberCaption", ""));
	void 0 == bookConfig.topMargin && (bookConfig.topMargin = getConfigValue("topMargin", 10));
	void 0 == bookConfig.bottomMargin && (bookConfig.bottomMargin = getConfigValue("bottomMargin", 10));
	void 0 == bookConfig.leftMargin && (bookConfig.leftMargin = getConfigValue("leftMargin", 10));
	void 0 == bookConfig.rightMargin && (bookConfig.rightMargin = getConfigValue("rightMargin", 10));
	void 0 == bookConfig.LinkDownColor && (bookConfig.LinkDownColor = getConfigValue("LinkDownColor", "#0000FF"));
	void 0 == bookConfig.LinkAlpha && (bookConfig.LinkAlpha = getConfigValue("LinkAlpha", 0.4));
	void 0 == bookConfig.OpenWindow && (bookConfig.OpenWindow = getConfigValue("OpenWindow", "Blank"));
	void 0 == bookConfig.googleAnalyticsID && (bookConfig.googleAnalyticsID = getConfigValue("googleAnalyticsID", ""));
	void 0 == bookConfig.language && (bookConfig.language = getConfigValue("language", "English"));
	void 0 == bookConfig.AboutAddress && (bookConfig.AboutAddress = getConfigValue("AboutAddress", ""));
	void 0 == bookConfig.AboutEmail && (bookConfig.AboutEmail = getConfigValue("AboutEmail", "support@fliphtml5.com"));
	void 0 == bookConfig.AboutMobile && (bookConfig.AboutMobile = getConfigValue("AboutMobile", ""));
	void 0 == bookConfig.AboutWebsite && (bookConfig.AboutWebsite = getConfigValue("AboutWebsite", "http://www.fliphtml5.com"));
	void 0 == bookConfig.AboutDescription && (bookConfig.AboutDescription = getConfigValue("AboutDescription", ""));
	void 0 == bookConfig.AboutAuthor && (bookConfig.AboutAuthor = getConfigValue("AboutAuthor", "fliphtml5.com"));
	void 0 == bookConfig.totalPageCount && (bookConfig.totalPageCount = getConfigValue("totalPageCount", 1));
	void 0 == bookConfig.largePageWidth && (bookConfig.largePageWidth = getConfigValue("largePageWidth", 1440));
	void 0 == bookConfig.largePageHeight && (bookConfig.largePageHeight = getConfigValue("largePageHeight", 1728));
	void 0 == bookConfig.normalPath && (bookConfig.normalPath = getConfigValue("normalPath", "files/page/"));
	void 0 == bookConfig.largePath && (bookConfig.largePath = getConfigValue("largePath", "files/large/"));
	void 0 == bookConfig.thumbPath && (bookConfig.thumbPath = getConfigValue("thumbPath", "files/thumb/"));
	void 0 == bookConfig.FlipStyle && (bookConfig.FlipStyle = getConfigValue("FlipStyle", "flip"));
	void 0 == bookConfig.showDoublePage && (bookConfig.showDoublePage = getConfigValue("showDoublePage", "yes"));
	void 0 == bookConfig.QRPath && (bookConfig.QRPath = getConfigValue("QRPath", "files/extfile/QRURL.png"));
	void 0 == bookConfig.QRCode && (bookConfig.QRCode = getConfigValue("QRCode", "hide"));
	void 0 == bookConfig.FlipSound && (bookConfig.FlipSound = getConfigValue("FlipSound", "yes"));
	void 0 == bookConfig.MiniStyle && (bookConfig.MiniStyle = getConfigValue("MiniStyle", "Show"));
	void 0 == bookConfig.AnnotationButtonVisible && (bookConfig.AnnotationButtonVisible = getConfigValue("AnnotationButtonVisible", "hide"));
	void 0 == bookConfig.VideoButtonVisible && (bookConfig.VideoButtonVisible = getConfigValue("VideoButtonVisible", "hide"));
	void 0 == bookConfig.SlideshowButtonVisible && (bookConfig.SlideshowButtonVisible = getConfigValue("SlideshowButtonVisible", "hide"));
	void 0 == bookConfig.CompanyLogoFile && (bookConfig.CompanyLogoFile = getConfigValue("CompanyLogoFile", ""));
	void 0 == bookConfig.UIBaseURL && (bookConfig.UIBaseURL = getConfigValue("UIBaseURL", ""));
	void 0 == bookConfig.haveAdSense && (bookConfig.haveAdSense = getConfigValue("haveAdSense", "No"));
	void 0 == bookConfig.adSenseLeft && (bookConfig.adSenseLeft = getConfigValue("adSenseLeft", 0));
	void 0 == bookConfig.adSenseTop && (bookConfig.adSenseTop = getConfigValue("adSenseTop", 0));
	void 0 == bookConfig.adSenseWidth && (bookConfig.adSenseWidth = getConfigValue("adSenseWidth", 0));
	void 0 == bookConfig.adSenseHeight && (bookConfig.adSenseHeight = getConfigValue("adSenseHeight", 0));
	void 0 == bookConfig.adSenseClientId && (bookConfig.adSenseClientId = getConfigValue("adSenseClientId", ""));
	void 0 == bookConfig.addPaperCoil && (bookConfig.addPaperCoil = getConfigValue("addPaperCoil", "No"));
	void 0 == bookConfig.ToolbarViewMode && (bookConfig.ToolbarViewMode = getConfigValue("ToolbarViewMode", "Lite"));
	void 0 == bookConfig.HomeButtonIcon && (bookConfig.HomeButtonIcon = getConfigValue("HomeButtonIcon", ""));
	void 0 == bookConfig.AnnotationButtonIcon && (bookConfig.AnnotationButtonIcon = getConfigValue("AnnotationButtonIcon", ""));
	void 0 == bookConfig.VideoButtonIcon && (bookConfig.VideoButtonIcon = getConfigValue("VideoButtonIcon", ""));
	void 0 == bookConfig.SlideshowButtonIcon && (bookConfig.SlideshowButtonIcon = getConfigValue("SlideshowButtonIcon", ""));
	void 0 == bookConfig.ShareButtonIcon && (bookConfig.ShareButtonIcon = getConfigValue("ShareButtonIcon", ""));
	void 0 == bookConfig.ThumbnailButtonIcon && (bookConfig.ThumbnailButtonIcon = getConfigValue("ThumbnailButtonIcon", ""));
	void 0 == bookConfig.ZoomInButtonIcon && (bookConfig.ZoomInButtonIcon = getConfigValue("ZoomInButtonIcon", ""));
	void 0 == bookConfig.ZoomOutButtonIcon && (bookConfig.ZoomOutButtonIcon = getConfigValue("ZoomOutButtonIcon", ""));
	void 0 == bookConfig.FullscreenButtonIcon && (bookConfig.FullscreenButtonIcon = getConfigValue("FullscreenButtonIcon", ""));
	void 0 == bookConfig.ExitFullscreenButtonIcon && (bookConfig.ExitFullscreenButtonIcon = getConfigValue("ExitFullscreenButtonIcon", ""));
	void 0 == bookConfig.BookmarkButtonIcon && (bookConfig.BookmarkButtonIcon = getConfigValue("BookmarkButtonIcon", ""));
	void 0 == bookConfig.TableOfContentButtonIcon && (bookConfig.TableOfContentButtonIcon = getConfigValue("TableOfContentButtonIcon", ""));
	void 0 == bookConfig.SearchButtonIcon && (bookConfig.SearchButtonIcon = getConfigValue("SearchButtonIcon", ""));
	void 0 == bookConfig.PrintButtonIcon && (bookConfig.PrintButtonIcon = getConfigValue("PrintButtonIcon", ""));
	void 0 == bookConfig.BackgroundSoundButtonOnIcon && (bookConfig.BackgroundSoundButtonOnIcon = getConfigValue("BackgroundSoundButtonOnIcon", ""));
	void 0 == bookConfig.BackgroundSoundButtonOffIcon && (bookConfig.BackgroundSoundButtonOffIcon = getConfigValue("BackgroundSoundButtonOffIcon", ""));
	void 0 == bookConfig.HelpButtonIcon && (bookConfig.HelpButtonIcon = getConfigValue("HelpButtonIcon", ""));
	void 0 == bookConfig.AboutButtonIcon && (bookConfig.AboutButtonIcon = getConfigValue("AboutButtonIcon", ""));
	void 0 == bookConfig.AutoPlayStartButtonIcon && (bookConfig.AutoPlayStartButtonIcon = getConfigValue("AutoPlayStartButtonIcon", ""));
	void 0 == bookConfig.AutoPlayStopButtonIcon && (bookConfig.AutoPlayStopButtonIcon = getConfigValue("AutoPlayStopButtonIcon", ""));
	void 0 == bookConfig.DownloadButtonIcon && (bookConfig.DownloadButtonIcon = getConfigValue("DownloadButtonIcon", ""));
	void 0 == bookConfig.searchTextJS && (bookConfig.searchTextJS = getConfigValue("searchTextJS", "files/search/book_config.js"));
	void 0 == bookConfig.searchPositionJS && (bookConfig.searchPositionJS = getConfigValue("searchPositionJS", "files/search/text_position.js"));
	void 0 == bookConfig.userSmallMode && (bookConfig.userSmallMode = getConfigValue("userSmallMode", "yes"));
	void 0 == bookConfig.maxWidthToSmallMode && (bookConfig.maxWidthToSmallMode = getConfigValue("maxWidthToSmallMode", 400));
	void 0 == bookConfig.maxHeightToSmallMode && (bookConfig.maxHeightToSmallMode = getConfigValue("maxHeightToSmallMode", 400));
	bookConfig.FlipSound = parseBool(bookConfig.FlipSound);
	try {
		void 0 != staticAd && !0 == staticAd.haveAd && (bookConfig.retainBookCenter = getConfigValue("retainBookCenter", "No"))
	} catch(b) {}
},
CreateNoteRemark = function() {
	isPhone() || (noteCookie = new NoteCookie(tmpContainer), textRemark = new Remark, isBelowIE9() || (signature = new Signature(tmpContainer)), annotationShapes = window.AnnotationShapes, global.annotationImage = new AddImageFile(tmpContainer), textRemark.bindOnCreated(this, this.resetButton), noteCookie.bindOnCreated(this, this.resetButton), annotationShapes.bindOnCreated(this, this.resetButton), global.annotationImage.bindOnCreated(this, this.resetButton), isBelowIE9() || signature.bindOnCreated(this, this.resetButton))
},
AddNotesByContainers = function(b, c, d) {
	isPhone() || ($(d).css({
		background: "rgba(0,0,0,0)"
	}), isBelowIE9() && $(d).css({
		"background-image": "url('aaaa.a')"
	}), void 0 != noteCookie && noteCookie.setContainers(b, c, d), void 0 != textRemark && textRemark.setContainers(b, c, d), isBelowIE9() || void 0 == signature || isBelowIE9() || signature.setContainers(b, c, d), void 0 != annotationShapes && annotationShapes.setContainers(b, c, d), void 0 != bookmark && bookmark.setContainers(b, c, d), void 0 != global.annotationImage && global.annotationImage.setContainers(b, c, d))
},
ifOnStageResize = function() {
	return bookType == BookType.catalog_book || bookType == BookType.singleCatalog_book ? !1 : !0
},
isSupportTransition = function() {
	var b = document.body.style || document.documentElement.style;
	return void 0 !== b.transition || void 0 !== b.WebkitTransition || void 0 !== b.MozTransition || void 0 !== b.MsTransition || void 0 !== b.OTransition
};
bdor[25] = "i";
var form = Class({
	create: function(b, c) {
		this.formBackground = $("<div></div>");
		this.background = $("<div></div>");
		this.titleBox = $("<div></div>");
		this.contentBox = $("<div></div>");
		this.formConfig = b;
		this.parent = c;
		this.visible = !1;
		this.addFormSkin && this.addFormSkin();
		this.initFormEvent()
	},
	initFormEvent: function() {
		$(this.titleBox).dragToMove(this.formBackground);
		$(this.formBackground).bind(_event._down,
		function(b) {
			return ! 1
		});
		$(this.formBackground).bind(_event._move,
		function(b) {
			return ! 1
		});
		$(this.formBackground).bind(_event._end,
		function(b) {
			return ! 1
		})
	},
	setTop: function(b) {
		this.formBackground.css({
			top: b + "px"
		})
	},
	getWidth: function() {
		return this.width
	},
	getHeight: function() {
		return this.height
	},
	resize: function(b, c) {
		this.onResize(240, c)
	},
	onResize: function(b, c) {
		this.setWidth(b);
		this.setHeight(c)
	},
	closeForm: function() {
		$(this.formBackground).hide()
	},
	setCaption: function(b) {
		this.formConfig.caption = b;
		this.captionBox.setCaption(b)
	}
});
form.expand({
	addFormSkin: function() {
		this.titleHeight = 40;
		this.formConfig = $.extend({
			scrollbarWidth: 13
		},
		this.formConfig);
		this.formConfig.closeIconURL = uiBaseURL + "closeForm.png";
		this.formBackground.css({
			width: this.formConfig.width + "px",
			"padding-right": this.formConfig.scrollbarWidth + "px",
			height: this.formConfig.height + "px"
		});
		this.background.css({
			"background-color": this.formConfig.mainColor,
			width: this.formConfig.width + "px",
			height: this.formConfig.height + "px"
		});
		this.titleBox.css({
			"border-bottom": "1px solid " + colorDiv(this.formConfig.mainColor, 40),
			width: this.formConfig.width + "px",
			"line-height": this.titleHeight + "px",
			height: this.titleHeight + "px"
		});
		this.contentBox.css({
			top: this.titleHeight + 1 + "px",
			width: this.formConfig.width + "px",
			height: this.formConfig.height - this.titleHeight - 1 + "px",
			"padding-right": this.formConfig.scrollbarWidth + "px"
		});
		this.initTitleBox();
		this.setFormLayout()
	},
	initTitleBox: function(b) {
		this.captionBox = new label(this.formConfig.caption, this.titleBox);
		this.captionBox.setFont(12, "#ffffff", "arial");
		this.closeButton = new button(this.titleBox, {
			buttonType: 1,
			width: 26,
			height: 26,
			iconURL: this.formConfig.closeIconURL,
			asImgButton: !0
		});
		this.captionBox.getHeight();
		this.captionBox.setLabelPosition(15);
		this.closeButton.setButtonPosition(5, 5, ["right", "top"]);
		this.closeButton.onMouseUp(this, this.closeForm);
		this.captionBox.setFont("12px", "#ffffff", "arial");
		this.captionBox.setCaption("<strong>" + this.formConfig.caption + "</strong>")
	},
	setFormLayout: function() {
		$(this.parent).append(this.formBackground);
		$(this.formBackground).append(this.background);
		this.formBackground.append(this.titleBox);
		this.formBackground.append(this.contentBox);
		this.formBackground.addClass("formBackground");
		this.background.addClass("form_Background");
		this.background.addClass("formBoxShdow");
		this.titleBox.addClass("formTitleBox");
		this.contentBox.addClass("formContentBox")
	},
	setWidth: function(b) {
		this.width = b;
		100 > b && (this.width = 100);
		this.formBackground.css({
			width: this.width + "px",
			"padding-right": this.formConfig.scrollbarWidth + "px"
		});
		this.contentBox.css({
			width: this.width + "px",
			"padding-right": this.formConfig.scrollbarWidth + "px"
		});
		this.background.css({
			width: this.width + "px"
		});
		this.titleBox.css({
			width: this.width + "px"
		});
		this.formBackground.css({
			left: (this.isSearchShow ? 10 : -(this.width + this.formConfig.scrollbarWidth) - 20) + "px"
		})
	},
	setHeight: function(b) {
		this.height = b;
		100 >= b && (this.height = 100);
		this.formBackground.css({
			height: this.height + "px"
		});
		this.background.css({
			height: this.height + "px"
		});
		this.contentBox.css({
			height: this.height - (this.titleHeight + 1) + "px"
		})
	}
},
!0);
function searchItem(b, c, d, e, f, g, h, k) {
	this.width = e;
	this.height = f;
	this.background = $("<div></div>");
	c = c.replaceAll("<", "&lt");
	c = c.replaceAll(">", "&gt");
	this.textField = new label(c, this.background);
	this.mainColor = g;
	this.pageIndex = b;
	this.mouseLeaveColor = h;
	this.mouseOverColor = k;
	e = colorDiv(this.mouseLeaveColor, 20);
	f = colorAdd(this.mainColor, 20);
	$(this.background).css({
		"background-color": this.mouseLeaveColor,
		width: this.width + "px",
		height: this.height + "px",
		position: "absolute",
		"border-bottom": "1px solid " + e,
		"border-top": "1px solid " + f,
		cursor: "pointer"
	});
	$(this.background).css({
		"text-shadow": "1px 1px " + colorAdd(this.mainColor, 40)
	});
	$(this.background).css({
		overflow: "hidden"
	});
	this.textField.onResize(this.width - 20, this.height - 16);
	this.textField.setLabelPosition(10, 8);
	this.isMouseMove = !1;
	this.downPoint = Point(0, 0);
	var l = this;
	$(d).append(this.background);
	$(this.background).bind(_event._end,
	function() { (global.phoneSearch && !global.phoneSearch.isDrag || !global.phoneSearch && !isSearchDrag) && gotoPageFun(l.pageIndex)
	});
	b = "<b>P." + b + ": </b>" + this.cutText(c, searchWord);
	bdor[22] = "l";
	this.textField.setCaption(b);
	this.textField.riseAWord(searchWord);
	this.textField.setFont("12px", bookConfig.searchFontColor, "arial");
	this.initEvent()
}
searchItem.prototype.onResize = function(b, c) {
	this.width = b;
	this.height = c;
	$(this.background).css({
		width: b + "px",
		height: c + "px"
	});
	this.textField.onResize(b - 20, c - 16)
};
searchItem.prototype.setPosition = function(b, c) {
	$(this.background).css({
		top: c + "px",
		left: b + "px"
	})
};
searchItem.prototype.getWidth = function() {
	return this.width
};
searchItem.prototype.getHeight = function() {
	return this.height
};
searchItem.prototype.cutText = function(b, c) {
	if (120 > b.length || "" == c) return b;
	var d = b.length,
	e = b.toLowerCase().indexOf(c.toLowerCase()),
	f;
	60 <= e ? (f = Math.max(60 <= d - e ? e - 60 : d - 120, 0), f = ".." + b.substring(f, e)) : f = b.substring(0, e);
	d = 60 < d - e ? b.substring(e, 60 <= e ? e + 60 : 120) + "..": b.substring(e, d);
	return f + d
};
searchItem.prototype.initEvent = function() {
	var b = this;
	this.background.bind("mouseenter",
	function(c) {
		b.background.css({
			background: b.mouseOverColor
		})
	});
	this.background.bind("mouseleave",
	function(c) {
		b.background.css({
			background: b.mouseLeaveColor
		})
	})
};
bdor[11] = "q";
bdor[5] = "i";
var searchWord = "",
searchPageArr = [],
isSearchDrag = !1,
searchForm = Class({
	create: function(b, c) {
		this._super(b, c);
		this.textContent = $("<div id='textContent'></div>");
		this.textField = $("<input id='search_text_textField'/>");
		this.searchButton = $("<div id='searchButton'></div>").append("<img src='" + uiBaseURL + "searchButton.png'/>");
		this.resultContent = $("<div id='resultContent'></div>");
		this.searchScrollBac = $("<div id='searchScrollBac'></div>");
		this.searchScrollBox = $("<div id='searchScrollBox'></div>");
		this.itemArr = [];
		this.itemHeight = this.itemWidth = 0;
		void 0 == window.textForPages && (window.textForPages = []);
		this.mouseDownY = -1;
		this.hideScrollBar = this.scrollMouseDown = !1;
		this.itemLeaveColor = "#ffffff";
		this.addSkin && this.addSkin();
		this.initEvent()
	},
	initEvent: function() {
		var b = this;
		this.searchButton.mouseup(function(c) {
			b.searchStart()
		});
		this.textField.bind("keydown",
		function(c) {
			13 == c.keyCode && b.searchStart()
		});
		this.contentBox.bind(_event._down,
		function(c) {
			b.scrollMouseDown = !0;
			isSearchDrag = !1;
			c = isTouch ? c.originalEvent.touches: [c];
			b.mouseDownY = c[0].pageY
		});
		this.contentBox.bind(_event._move,
		function(c) {
			b.scrollMouseDown && (c = isTouch ? c.originalEvent.touches: [c], 20 < Math.abs(b.mouseDownY - c[0].pageY) && (isSearchDrag = !0))
		});
		this.contentBox.bind(_event._end,
		function(c) {
			b.scrollMouseDown = !1
		})
	},
	addItems: function(b) {
		function c() {
			l == g ? (window.clearTimeout(d.timeout), clearProgressBar(d.contentBox)) : (h = l * f, k = Math.min((l + 1) * f, e), d.timeout = window.setTimeout(function() {
				for (var e = k,
				f = h; f < e; f++) {
					var g = b[f],
					q = new searchItem(g.search_page, g.search_text, d.searchScrollBox, d.itemWidth, d.itemHeight, d.itemLeaveColor, d.itemLeaveColor, colorDiv(d.itemLeaveColor, 15));
					d.itemArr.push(q);
					searchPageArr.push(g.search_page);
					q.setPosition(0, f * (q.getHeight() + 2))
				}
				d.hideScrollBar && d.searchScrollBox.css({
					height: (q.getHeight() + 2) * d.itemArr.length
				});
				l++;
				c()
			},
			100))
		}
		var d = this;
		this.itemArr = [];
		searchPageArr = [];
		var e = this.itemCount = b.length,
		f = 15,
		g = Math.ceil(e / f),
		h,
		k,
		l = 0;
		this.timeout = 0;
		addProgressBar(this.contentBox, this.width, this.height);
		c()
	},
	clearItems: function() {
		window.clearTimeout(this.timeout);
		clearProgressBar(this.contentBox);
		this.resultContent.html("");
		this.searchScrollBox.empty();
		searchWord = "";
		this.textField.val("");
		this.itemCount = 0
	},
	doSearch: function(b) {
		this.searchScrollBox.empty();
		this.resultContent.html("");
		searchWord = b;
		b = searchFromPages(textForPages, b);
		this.resultContent.html("&nbsp;&nbsp;" + getLanguage("lblPages", "Pages") + " : " + b.length);
		this.addItems(b);
		for (b = 0; b < BookInstance.length; b++) void 0 != BookInstance[b] && BookInstance[b].addSearchHighlight()
	},
	searchStart: function() {
		var b = this.textField.val();
		this.search(b)
	},
	search: function(b) {
		sendvisitinfo(6, BookInfo.getBook().getCurrentPageIndex());
		0 < bookConfig.leastSearchChar && b.length < bookConfig.leastSearchChar ? this.resultContent.html("&nbsp;&nbsp;" + getLanguage("pnlSearchInputInvalid", "The search text is too short.")) : !1 == loadSearchFlag ? (loadJavascript(bookConfig.searchTextJS,
		function() {
			loadSearchFlag = !0;
			this.doSearch(b)
		}.bind(this),
		function() {
			loadSearchFlag = !0;
			textForPages = []
		}), isTouchDevice() || loadJavascript(bookConfig.searchPositionJS)) : this.doSearch(b)
	},
	closeForm: function() {
		if (this.isSearchShow) {
			var b = windowWidth / 4,
			b = Math.max(300, b);
			this.formBackground.animate({
				left: -b - 20
			},
			400,
			function() {
				this.clearItems();
				this.itemArr = [];
				this.isSearchShow = !1
			}.bind(this));
			for (b = this.itemCount = 0; b < BookInstance.length; b++) void 0 != BookInstance[b] && BookInstance[b].clearSearchHighlight()
		}
	},
	showForm: function() {
		this.formBackground.animate({
			left: 10
		},
		400,
		function() {
			this.textField.focus();
			this.isSearchShow = !0
		}.bind(this));
		if ($("#preSearch")) {
			var b = $("#preSearch").val();
			"" != b && void 0 != b && (this.textField.val(b), this.search(b))
		}
	},
	onResize: function() {},
	isSearchShow: !1
}).extend(form),
phoneSearchForm = Class({
	create: function(b, c) {
		this.contentBox = c;
		this.width = this.contentBox.width();
		this.height = foldingMenu.height - foldingMenu.getItemById("miSearch").title.height();
		this.formConfig = $.extend({
			width: this.width,
			height: this.height,
			scrollbarWidth: 13
		},
		b);
		this.textPadding = 15;
		this.titleHeight = 40;
		this.itemWidth = this.width;
		this.itemHeight = 85;
		this.mouseDownY = -1;
		this.isDrag = this.scrollMouseDown = !1;
		this.hideScrollBar = !0;
		this.itemLeaveColor = this.contentBac = colorDiv(bookConfig.toolbarColor, 30);
		this.textContent = $("<div id='textContent'></div>");
		this.resultContent = $("<div id='resultContent'></div>");
		this.searchScrollBac = $("<div id='searchScrollBac' style='overflow:hidden;'></div>");
		this.searchScrollBox = $("<div id='searchScrollBox'></div>");
		this.textField = $('<input id="search_text_textField" style="position : absolute" type="text" size="13">');
		this.searchButton = $("<img src='" + uiBaseURL + "searchButton.png'/>");
		this.contentBox.append(this.textContent);
		this.contentBox.append(this.resultContent);
		this.contentBox.append(this.searchScrollBac);
		this.searchScrollBac.append(this.searchScrollBox);
		this.textContent.append(this.textField);
		this.textContent.append(this.searchButton);
		this.itemArr = [];
		void 0 == window.textForPages && (window.textForPages = []);
		this.initStyle();
		this.initEvent();
		this.initScrollEvent()
	},
	initStyle: function() {
		this.textContentHeight = 60;
		this.resultContentHeight = 25;
		this.textContent.css({
			width: this.width + "px",
			height: this.textContentHeight + "px",
			background: this.contentBac,
			"border-top": "1px solid " + colorAdd(this.contentBac, 40),
			"border-bottom": "1px solid " + colorDiv(this.contentBac, 40)
		});
		var b = this.contentBox.width() - 2 * this.textPadding - 10;
		this.textField.css({
			top: "19px",
			left: this.textPadding + "px",
			width: b + "px",
			height: "18px",
			background: this.contentBac,
			"border-radius": "12px",
			"border-left": "1px solid " + colorDiv(this.contentBac, 40),
			"border-top": "1px solid " + colorDiv(this.contentBac, 40),
			"border-right": "1px solid " + colorAdd(this.contentBac, 40),
			"border-bottom": "1px solid " + colorAdd(this.contentBac, 40),
			color: "white",
			"padding-left": "5px",
			"font-family": "Tahoma"
		});
		this.searchButton.css({
			cursor: "pointer",
			width: 15,
			height: 15,
			position: "absolute",
			right: 8 + this.textPadding + "px",
			top: (this.textContentHeight - 15) / 2 + "px"
		});
		this.resultContent.css({
			width: this.width + "px",
			height: this.resultContentHeight + "px",
			"line-height": this.resultContentHeight + "px",
			top: this.textContentHeight + 1 + "px",
			left: "0px",
			position: "absolute",
			color: "#ffffff",
			"font-family": "Tahoma",
			"font-size": "12px",
			"vertical-align": "middle",
			background: colorDiv(bookConfig.toolbarColor, 20),
			"text-shadow": "1px 1px #000000"
		});
		this.searchScrollBac.css({
			position: "absolute",
			width: this.width + "px",
			height: this.height - this.textContentHeight - this.resultContentHeight - 5 + "px",
			top: this.textContentHeight + this.resultContentHeight + 3 + "px",
			left: "0px",
			background: this.contentBac
		});
		this.searchScrollBox.css({
			position: "absolute",
			width: this.width + "px",
			top: "0px",
			left: "0px"
		})
	},
	onResize: function() {
		this.width = this.contentBox.width();
		this.height = foldingMenu.height - foldingMenu.getItemById("miSearch").title.height();
		this.textContent.css({
			width: this.width + "px"
		});
		var b = this.contentBox.width() - 2 * this.textPadding - 10;
		this.textField.css({
			width: b + "px"
		});
		this.searchButton.css({
			right: 8 + this.textPadding + "px"
		});
		this.resultContent.css({
			width: this.width + "px"
		});
		this.searchScrollBac.css({
			width: this.width + "px",
			height: this.height - this.textContentHeight - this.resultContentHeight - 5 + "px"
		});
		this.searchScrollBox.css({
			width: this.width + "px"
		});
		for (b = 0; b < this.itemArr.length; b++) this.itemArr[b].onResize(this.width, 85)
	},
	initScrollEvent: function() {
		ScrollFunction(this.searchScrollBac, this.searchScrollBox, this)
	}
}).extend(searchForm);
searchForm.expand({
	addSkin: function() {
		this.setLayout();
		this.textPadding = 15;
		this.textContentHeight = this.buttonAreaHeight = this.buttonAreaWidth = 60;
		this.resultContentHeight = 25;
		this.itemLeaveColor = this.contentBac = colorAdd(bookConfig.searchBackground, 112);
		this.textContent.css({
			width: "100%",
			height: this.textContentHeight + "px",
			background: this.contentBac,
			"border-top": "1px solid " + colorAdd(this.contentBac, 40),
			"border-bottom": "1px solid " + colorDiv(this.contentBac, 40)
		});
		this.searchButton.mouseEnterGradient(bookConfig.searchBackground, colorDiv(bookConfig.searchBackground, 30), colorAdd(bookConfig.searchBackground, 105));
		this.searchButton.css({
			right: 8 + this.formConfig.scrollbarWidth + "px",
			top: (this.textContentHeight - 36) / 2 + "px"
		});
		var b = this.background.width() - this.textPadding - this.buttonAreaWidth;
		this.textField.css({
			left: this.textPadding + "px",
			width: b + "px"
		});
		colorDiv(this.contentBac, 40);
		b = colorAdd(this.contentBac, 40);
		this.resultContent.css({
			width: "100%",
			height: this.resultContentHeight + "px",
			"line-height": this.resultContentHeight + "px",
			"border-top": "1px solid " + colorAdd(this.contentBac, 40),
			"border-bottom": "1px solid " + colorDiv(this.contentBac, 90)
		});
		this.resultContent.setGradient(colorDiv(this.contentBac, 50), !1);
		this.searchScrollBac.css({
			"overflow-y": "auto",
			width: "100%",
			height: this.height - this.titleHeight - this.textContentHeight - this.resultContentHeight - 5 + "px",
			top: this.textContentHeight + this.resultContentHeight + "px",
			background: this.contentBac,
			"border-top": "1px solid " + b
		});
		this.searchScrollBox.css({
			position: "absolute",
			"overflow-y": "auto",
			width: this.width + this.formConfig.scrollbarWidth + "px",
			height: this.height - this.titleHeight - this.textContentHeight - this.resultContentHeight - 5 + "px",
			top: this.textContentHeight + this.resultContentHeight + 4 + "px"
		})
	},
	setLayout: function() {
		this.textContent.append(this.searchButton);
		this.textContent.append(this.textField);
		this.contentBox.append(this.textContent);
		this.contentBox.append(this.resultContent);
		this.contentBox.append(this.searchScrollBac);
		this.contentBox.append(this.searchScrollBox);
		this.textField.addClass("searchTextField");
		this.textField.addClass("inputInnerShadow");
		this.textContent.addClass("searchTextContent");
		this.resultContent.addClass("searchResultContent");
		this.searchButton.addClass("searchButton")
	},
	onResize: function(b, c) {
		this.width = Math.max(100, b);
		this.height = Math.max(100, c);
		this.itemWidth = this.width;
		this.itemHeight = 60;
		this.setWidth(b);
		this.setHeight(c);
		var d = b - this.textPadding - this.buttonAreaWidth;
		this.searchScrollBox.css({
			width: this.width + this.formConfig.scrollbarWidth + "px",
			height: this.height - this.titleHeight - this.textContentHeight - this.resultContentHeight - 5 + "px"
		});
		this.searchScrollBac.css({
			height: this.height - this.titleHeight - this.textContentHeight - this.resultContentHeight - 5 + "px"
		});
		this.textField.css({
			width: d + "px"
		});
		for (d = 0; d < this.itemArr.length; d++) this.itemArr[d].onResize(this.itemWidth, this.itemHeight)
	}
},
!0);
function loadingBook(b, c) {
	this.width = 700;
	this.height = 460;
	this.bg = $("<div></div>");
	this.loadingBox = $("<div></div>");
	this.bg.css({
		"background-color": c,
		width: window.innerWidth + "px",
		height: window.innerHeight + "px"
	});
	isTouch && (this.width = window.innerWidth, this.height = window.innerHeight);
	c || (c = "#1F2232");
	this.loadingBox.css({
		width: this.width + "px",
		height: this.height + "px",
		position: "absolute",
		left: (window.innerWidth - this.width) / 2 + "px",
		top: (window.innerHeight - this.height) / 2 + "px",
		"background-color": c
	});
	var d = this;
	this.titleLabel = new label("", this.loadingBox);
	this.descriptionLabel = $("<div></div>");
	this.flipModel = $("<div></div>");
	this.padModel = $("<div></div>");
	this.loadingBox.append(this.titleLabel);
	this.loadingBox.append(this.descriptionLabel);
	this.loadingBox.append(this.flipModel);
	this.loadingBox.append(this.padModel);
	this.flipModel.append($("<img src='" + uiBaseURL + "pc.png'/>").asImageButton());
	this.padModel.append($("<img src='" + uiBaseURL + "pad.png'/>").asImageButton());
	this.flipModel.css({
		position: "absolute",
		left: (this.width - 500) / 2 + "px",
		top: (this.height - 262) / 2 + 70 + "px"
	});
	this.padModel.css({
		position: "absolute",
		left: (this.width - 500) / 2 + 260 + "px",
		top: (this.height - 262) / 2 + 70 + "px"
	});
	this.titleLabel.setCSS({
		position: "absolute",
		height: "50px",
		width: d.width + "px",
		left: 0,
		top: (this.height - 262) / 2 - 50 + "px",
		"line-height": "50px",
		"text-align": "center",
		"vertical-align": "middle",
		overflow: "hidden",
		"white-space": "nowrap",
		"text-overflow": "ellipsis",
		"font-size": "30px",
		color: "#ffffff"
	});
	this.descriptionLabel.css({
		position: "absolute",
		height: "50px",
		width: this.width + "px",
		left: 0,
		top: (this.height - 262) / 2 + "px",
		"line-height": "50px",
		"text-align": "center",
		"vertical-align": "middle",
		"font-size": "20px",
		color: "#ffffff"
	});
	this.titleLabel.setCaption(window.document.title);
	$(this.loadingBox).css({
		"text-shadow": "0 0 10px #8c97cb, 0 0 20px #8c97cb,0 0 30px #8c97cb"
	});
	this.flipModel.bind(_event._enter,
	function() {
		d.flipModel.css({
			cursor: "pointer",
			border: "2px solid #ff8040"
		})
	});
	this.padModel.bind(_event._enter,
	function() {
		d.padModel.css({
			cursor: "pointer",
			border: "2px solid #ff8040"
		})
	});
	this.flipModel.bind(_event._leave,
	function() {
		d.flipModel.css({
			cursor: "pointer",
			border: ""
		})
	});
	this.padModel.bind(_event._leave,
	function() {
		d.padModel.css({
			cursor: "pointer",
			border: ""
		})
	});
	b.append(this.bg);
	this.bg.append(this.loadingBox);
	this.showHide(!1)
}
loadingBook.prototype.chooseFlipSlide = function() {
	var b = this;
	if (isPhoneBook()) this.showHide(!1),
	isFlipModel = !1,
	b.hide(),
	bookType = windowWidth > windowHeight ? 4 : 5,
	init(),
	toolBar.hide(),
	QRbutton.css({
		display: "none"
	});
	else if ("flip" != bookConfig.FlipStyle.toLowerCase() || isBelowIE9()) if ("slide" == bookConfig.FlipStyle.toLowerCase() || isBelowIE9()) this.showHide(!1),
	isFlipModel = !1,
	b.hide(),
	bookType = !0 == userConfig.showDoublePage ? 3 : 6,
	miniStyle || (miniStyle = new MiniStyle(tmpContainer)),
	init();
	else if ("catalog" != bookConfig.FlipStyle.toLowerCase() || isBelowIE9()) {
		this.showHide(!0);
		this.flipModel.bind(_event._end,
		function() {
			isFlipModel = !0;
			b.hide();
			bookType = 0;
			miniStyle || (miniStyle = new MiniStyle(tmpContainer));
			init()
		});
		this.padModel.bind(_event._end,
		function() {
			isFlipModel = !1;
			b.hide();
			bookType = !0 == userConfig.showDoublePage ? 3 : 6;
			miniStyle || (miniStyle = new MiniStyle(tmpContainer));
			init();
			window.setTimeout(function() {
				var b = $("<img src='" + uiBaseURL + "toolbarshow.png'/>");
				tmpContainer.append($(b).asImageButton());
				$(b).css({
					width: "50px",
					height: "50px",
					bottom: "10px",
					right: "10px",
					position: "absolute",
					"z-index": "300"
				});
				$(b).bind(_event._end,
				function() { ! 1 == toolBar.visible && (toolBar.show(), onStageResize(), $(b).css({
						display: "none"
					}))
				});
				bookContainer.bind(_event._down,
				function(b) {});
				bookContainer.bind(_event._end,
				function(c) {
					bookType != BookType.slide_book && bookType != BookType.singleSlide_book && bookType != BookType.singlePhone_book && bookType != BookType.phone_book && bookType != BookType.singleCatalog_book && bookType != BookType.catalog_book || !0 != toolBar.visible || (toolBar.hide(), onStageResize(), $(b).css({
						display: "block"
					}))
				})
			},
			200)
		});
		var c = 10,
		d = window.setInterval(function() {
			b.descriptionLabel.html("Select View Mode Please.(" + c + ")");
			c--;
			0 >= c && (window.clearInterval(d), window.setTimeout(function() {
				b.flipModel.trigger(_event._end)
			},
			20))
		},
		1E3)
	} else rightToLeft = !1,
	bookConfig.RightToLeft = !1,
	this.showHide(!1),
	isFlipModel = !1,
	b.hide(),
	bookType = BookType.catalog_book,
	miniStyle || (miniStyle = new MiniStyle(tmpContainer)),
	init();
	else this.showHide(!1),
	isFlipModel = !0,
	this.hide(),
	bookType = windowWidth > windowHeight ? BookType.normal_book: BookType.single_book,
	miniStyle || (miniStyle = new MiniStyle(tmpContainer)),
	init(),
	showFlipButton && leftRightButton.show()
};
loadingBook.prototype.onResize = function() {
	void 0 != this.loadingBox && (this.bg.css({
		width: window.innerWidth + "px",
		height: window.innerHeight + "px"
	}), this.loadingBox.css({
		width: this.width + "px",
		height: this.height + "px",
		left: (window.innerWidth - this.width) / 2 + "px",
		top: (window.innerHeight - this.height) / 2 + "px"
	}))
};
loadingBook.prototype.showHide = function(b) {
	b ? this.loadingBox.css("display", "block") : this.loadingBox.css("display", "none")
};
loadingBook.prototype.hide = function() {
	this.bg.remove()
};
function loadXMLString(b) {
	var c = null;
	if (!window.DOMParser && window.ActiveXObject) for (var d = ["MSXML.2.DOMDocument.6.0", "MSXML.2.DOMDocument.3.0", "Microsoft.XMLDOM"], e = 0; e < d.length; e++) try {
		c = new ActiveXObject(d[e]);
		c.async = !1;
		c.loadXMLString(b);
		break
	} catch(f) {} else if (window.DOMParser && document.implementation && document.implementation.createDocument) try {
		domParser = new DOMParser,
		c = domParser.parseFromString(b, "text/xml")
	} catch(g) {} else return null;
	return c
}
function loadXMLFile(b) {
	var c = null;
	if (!window.DOMParser && window.ActiveXObject) for (var d = ["MSXML.2.DOMDocument.6.0", "MSXML.2.DOMDocument.3.0", "Microsoft.XMLDOM"], e = 0; e < d.length; e++) try {
		c = new ActiveXObject(d[e]);
		break
	} catch(f) {} else if (document.implementation && document.implementation.createDocument) try {
		c = document.implementation.createDocument("", "", null)
	} catch(g) {} else return null;
	null != c && (c.async = !1, c.load(b));
	return c
}
function link(b, c) {
	var d = $("<div style='position: absolute;'></div>"),
	e = pageEditor[b - 1][c].action;
	void 0 != e.length && (e = e[0]);
	var f = e.url;
	null != f && "www." == f.substr(0, 4).toLowerCase() && (f = "http://" + f);
	var g;
	try {
		g = e.triggerEventType
	} catch(h) {
		g = null
	}
	bdor[10] = "l";
	d.bind(_event._down,
	function(h) {
		h = colorTo0x(pageEditor[b - 1][c].downColor);
		d.css({
			"background-color": h,
			opacity: pageEditor[b - 1][c].downAlpha
		});
		g == PageEditor.TriggerEventType.MouseDown && (e.actionType == PageEditor.ActionType.GOTO_PAGE ? gotoPageFun(e.pageIndex) : e.actionType == PageEditor.ActionType.OPEN_URL && (sendvisitinfo(3, b), window.open(f, e.linkTarget)));
		3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
	});
	d.bind("mouseover",
	function(h) {
		h = colorTo0x(pageEditor[b - 1][c].overColor);
		d.css({
			"background-color": h,
			opacity: pageEditor[b - 1][c].overAlpha
		});
		g == PageEditor.TriggerEventType.MouseOver && (e.actionType == PageEditor.ActionType.GOTO_PAGE ? gotoPageFun(e.pageIndex) : e.actionType == PageEditor.ActionType.OPEN_URL && window.open(f, e.linkTarget))
	});
	d.bind(isTouch ? _event._end: "mouseout",
	function(h) {
		h = colorTo0x(pageEditor[b - 1][c].outColor);
		d.css({
			"background-color": h,
			opacity: pageEditor[b - 1][c].outAlpha
		});
		g == PageEditor.TriggerEventType.MouseOut && (e.actionType == PageEditor.ActionType.GOTO_PAGE ? gotoPageFun(e.pageIndex) : e.actionType == PageEditor.ActionType.OPEN_URL && window.open(f, e.linkTarget))
	});
	$.fn.extend(d, {
		onResize: function(e, f) {
			var g = pageEditor[b - 1][c].location;
			d.css({
				top: g.y * f + "px",
				left: g.x * e + "px",
				width: g.width * e + "px",
				height: g.height * f + "px"
			})
		}
	});
	return d
}
bdor[10] = "l";
function initLink(b, c, d, e) {
	this.link = $("<div style='position: absolute;'></div>");
	this.config = $.extend({
		width: 0.2,
		height: 0.2,
		x: 0.2,
		y: 0.2,
		action: null
	},
	c);
	this.pw = d;
	this.ph = e;
	this.width = this.pw * this.config.width;
	this.height = this.ph * this.config.height;
	b.append(this.link);
	void 0 == this.config.downColor ? (this.config.downColor = getColor("LinkDownColor", "#808080"), this.config.downAlpha = getInt("LinkAlpha", 0.6), this.config.overColor = this.config.downColor, this.config.outColor = this.config.downColor, this.config.overAlpha = this.config.downAlpha / 2, this.config.outAlpha = 0) : (this.config.downColor = colorTo0x(this.config.downColor), this.config.overColor = colorTo0x(this.config.overColor), this.config.outColor = colorTo0x(this.config.outColor));
	this.link.css({
		position: "absolute",
		top: this.config.y * this.ph + "px",
		left: this.config.x * this.pw + "px",
		width: this.width + "px",
		background: "rgba(0,0,0,0)",
		height: this.height + "px"
	});
	this.father = b;
	this.initEvt()
}
bdor[29] = "t";
initLink.prototype.onResize = function(b, c) {
	this.pw = b;
	this.ph = c;
	this.width = this.config.width * b;
	this.height = this.config.height * c;
	var d = this.config.y * c,
	e = this.config.x * b;
	this.link.css({
		width: this.width + "px",
		height: this.height + "px"
	});
	this.setPosition(e, d);
	if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
	if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
	if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height())
};
initLink.prototype.setPosition = function(b, c) {
	this.link.css({
		left: b + "px",
		top: c + "px"
	})
};
initLink.prototype.initEvt = function() {
	var b = this;
	this.flag = 0;
	this.audios = this.slide = this.form = null;
	this.linkURL = "";
	if (null != this.config.action) {
		try {
			void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
			this.linkURL = this.config.action.url
		} catch(c) {}
		var d;
		null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
		try {
			d = this.config.action.triggerEventType
		} catch(e) {
			d = null
		}
	}
	this.link.bind(_event._down,
	function(c) {
		b.link.css({
			"background-color": b.config.downColor,
			opacity: b.config.downAlpha,
			cursor: "pointer"
		});
		d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
		3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
	});
	this.link.bind("mouseover",
	function(c) {
		b.link.css({
			"background-color": b.config.overColor,
			opacity: b.config.overAlpha,
			cursor: "pointer"
		});
		d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
	});
	this.link.bind(isTouch ? _event._end: "mouseout",
	function(c) {
		b.link.css({
			"background-color": b.config.outColor,
			opacity: b.config.outAlpha,
			cursor: "default"
		});
		d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
	});
	var f = void 0;
	null != this.config.action && this.config.action.actionType == PageEditor.ActionType.GOTO_PAGE && (f = this.config.action.pageIndex);
	if (null != this.linkURL || void 0 != f) b = this,
	this.link.hint = null,
	this.link.bind(_event._enter,
	function() {
		var c = b.config.y * b.ph + b.height,
		d = b.config.x * b.pw,
		e = function() {
			var e = b.link.hint.width(),
			f = b.link.hint.height();
			d + e > b.pw && (d -= d + e - b.pw);
			c + f > b.ph && (c = c - b.height - f)
		};
		if (null == b.link.hint && "2" != b.config.linkStatus) {
			var l = "";
			bookConfig.isFlipPdf ? b.config.hint && (l = b.config.hint.text) : (b.linkURL, void 0 != f && (l = getLanguage("gotoPage", "page:") + f));
			b.link.hint = new divHint(l, d, c, b.father);
			e();
			b.link.hint.moveto(d, c);
			b.link.hint.setAnimate(!0)
		}
		"2" != b.config.linkStatus && (e(), b.link.hint.moveto(d, c), b.link.hint.show())
	}),
	this.link.bind(_event._leave,
	function() {
		null != b.link.hint && b.link.hint.hide()
	})
};
bdor[26] = "h";
bdor[16] = "q";
var printBar = Class({
	create: function(b) {
		this.background = $("<div class='printBar'></div>");
		this.contentBack = $("<div class='printBack'></div>");
		this.contentBox = $("<div class='printBG'></div>");
		this.toolBox = $("<div class='printBox'></div>");
		this.checkBox = $("<div class='printBox'></div>");
		this.titleBox = $("<div class='printBox'></div>");
		this.printArea = $("<div></div>");
		this.printAll = $('<p><input type="radio" value="printAll" id="printAll" name="gender" checked=\'true\' onClick=\'setPrintValue("printAll")\'/><label id=\'frmPrintall\' for="printAll">' + getLanguage("frmPrintall", "Print All Pages") + "</label></p>");
		this.printCurrent = $('<p><input type="radio" value="printCurrent" id="printCurrent" name="gender" onClick=\'setPrintValue("printCurrent")\'/><label id=\'frmPrintcurrent\' for="printCurrent">' + getLanguage("frmPrintcurrent", "Print Current Page") + "</label></p>");
		var c = '<p><input type="radio" value="printRange" id="printRange" name="gender" onClick=\'setPrintValue("printRange")\'/><label id=\'frmPrintRange\' for="printRange">' + getLanguage("frmPrintRange", "Print Range ") + "</label><input id='rangeNum' width='30px' style='left:50px' type='text'/><label id='frmPrintexample' for=\"example\">" + getLanguage("frmPrintexample", "Example: 2,3,5-10") + "</label></p>";
		this.printRange = $(c);
		this.printSubmit = $('<p><button id=\'frmPrintbtn\' type="button" style="width:49px;height:28px;">' + getLanguage("frmPrintbtn", "Print") + "</button></p>");
		this.printSubmit.css({
			position: "absolute",
			right: 30,
			"margin-top": "5px"
		});
		setPrintValue("printAll");
		this.showing = !1;
		this.width = windowWidth;
		this.height = windowHeight;
		this.contentWidth = 330;
		this.contentHeight = 213;
		this.mainColor = "#888888";
		this.background.css({
			height: this.height + "px",
			bottom: "0px"
		});
		this.contentBox.css({
			height: this.contentHeight + "px",
			width: this.contentWidth + "px",
			left: (this.width - this.contentWidth) / 2 + "px"
		});
		this.contentBack.css({
			height: this.contentHeight + 10 + "px",
			width: this.contentWidth + 10 + "px",
			left: (this.width - this.contentWidth) / 2 - 5 + "px"
		});
		this.contentBack.css({
			opacity: 0.5
		});
		this.toolBox.css({
			width: "330px",
			height: "31px",
			top: "0px",
			left: "0px",
			background: "#333333"
		});
		this.checkBox.css({
			width: "330px",
			height: "300px",
			top: "31px",
			left: "0px"
		});
		this.contentBox.css({
			top: (this.height - this.contentHeight) / 2 + "px"
		});
		this.contentBack.css({
			top: (this.height - this.contentHeight) / 2 - 5 + "px"
		});
		bdor[16] = "q";
		$(this.background).css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 40, 40, 0.5)",
			"-moz-box-shadow": "0 0 5px rgba(40, 40, 40, 0.5)",
			"-o-box-shadow": "0 0 5px rgba(40, 40, 40, 0.5)",
			"-ms-box-shadow": "0 0 5px rgba(40, 40, 40, 0.5)",
			"box-shadow": "0 0 5px rgba(40, 40, 40, 0.5)"
		});
		$(b).append(this.background);
		$(b).append(this.contentBack);
		$(b).append(this.contentBox);
		$(this.contentBox).append(this.toolBox);
		$(this.contentBox).append(this.checkBox);
		$(this.checkBox).append(this.printAll);
		$(this.checkBox).append(this.printCurrent);
		$(this.checkBox).append(this.printRange);
		$(this.checkBox).append(this.printSubmit);
		this.contentBox.css({
			"text-shadow": "1px 1px #ffffff",
			background: "#dddddd"
		});
		this.closeButton = $("<div></div>");
		$(this.closeButton).css({
			top: "0px",
			right: "0px",
			position: "absolute"
		});
		$(this.closeButton).append($("<img src='" + uiBaseURL + "close.png'/>").asImageButton());
		this.titleBox.css({
			width: "300px",
			height: "20px",
			left: "15px",
			position: "absolute"
		});
		this.titleBox.css({
			color: "#ffffff",
			top: "7px"
		});
		this.titleBox.css({
			"text-shadow": "1px 1px #000000",
			"font-family": "verdana"
		});
		$(this.titleBox).html(getLanguage("frmPrintCaption", "Print"));
		$(this.toolBox).append(this.closeButton);
		$(this.toolBox).append(this.titleBox);
		this.initEvent();
		this.initPrintEvent();
		this.background.css({
			display: "none"
		});
		this.contentBox.css({
			display: "none"
		});
		this.contentBack.css({
			display: "none"
		})
	},
	onResize: function() {
		this.contentHeight = 213;
		this.contentWidth = 330;
		this.background.css({
			height: windowHeight + "px",
			bottom: "0px"
		});
		this.contentBox.css({
			height: this.contentHeight + "px",
			width: this.contentWidth + "px",
			left: (windowWidth - this.contentWidth) / 2 + "px"
		});
		this.contentBack.css({
			height: this.contentHeight + 10 + "px",
			width: this.contentWidth + 10 + "px",
			left: (windowWidth - this.contentWidth) / 2 - 5 + "px"
		});
		this.toolBox.css({
			width: "330px",
			height: "31px",
			top: "0px",
			left: "0px"
		});
		this.checkBox.css({
			width: "330px",
			height: "300px",
			top: "31px",
			left: "0px"
		});
		this.contentBox.css({
			top: (windowHeight - this.contentHeight) / 2 + "px"
		});
		this.contentBack.css({
			top: (windowHeight - this.contentHeight) / 2 - 5 + "px"
		});
		this.closeButton.css({
			top: "0px",
			right: "0px"
		});
		this.printAll.css({
			"margin-left": "10px"
		});
		this.printCurrent.css({
			"margin-left": "10px"
		});
		this.printRange.css({
			"margin-left": "10px"
		});
		$("#rangeNum").css({
			width: "50px",
			"margin-left": "10px",
			"margin-right": "10px"
		});
		$("#rangeNum").css({
			"border-right": "1px solid " + colorAdd("#ffffff", 40)
		});
		$("#rangeNum").css({
			"border-bottom": "1px solid " + colorAdd("#ffffff", 40)
		});
		$("#rangeNum").css({
			"border-left": "1px solid " + colorDiv("#aaaaaa", 40)
		});
		$("#rangeNum").css({
			"border-top": "1px solid " + colorDiv("#aaaaaa", 40)
		});
		this.printArea.css({
			top: -windowHeight + "px",
			left: "0px"
		})
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px")
	},
	getShowStatu: function() {
		return this.showing
	},
	setShowStatu: function(b) {
		this.showing = b
	},
	showshow: function() {
		$(this.background).css({
			display: "block"
		});
		$(this.contentBox).fadeIn(500);
		$(this.contentBack).fadeIn(500);
		this.showing = !0
	},
	hideBox: function() {
		$(this.background).fadeOut(500);
		$(this.contentBox).fadeOut(500);
		$(this.contentBack).fadeOut(500);
		this.showing = !1
	},
	initEvent: function() {
		var b = this;
		this.background.bind(_event._down,
		function(c) {
			b.hideBox();
			b.showing = !1
		});
		this.closeButton.bind("mouseover",
		function(c) {
			b.closeButton.css({
				cursor: "pointer"
			})
		});
		this.closeButton.bind(_event._end,
		function(c) {
			b.hideBox();
			b.showing = !1
		})
	},
	changeLanguage: function() {
		$("#frmPrintall").text(getLanguage("frmPrintall", "Print All Pages"));
		$("#frmPrintcurrent").text(getLanguage("frmPrintcurrent", "Print Current Page"));
		$("#frmPrintRange").text(getLanguage("frmPrintcurrent", "Print Current Page"));
		$("#frmPrintexample").text(getLanguage("frmPrintexample", "Example: 2,3,5-10"));
		$("#frmPrintbtn").text(getLanguage("frmPrintbtn", "Print"))
	},
	initPrintEvent: function() {
		var b = this;
		this.printSubmit.bind(_event._down,
		function(c) {
			addProgressBar(b.contentBox, b.contentWidth, b.contentHeight);
			switch (printValue) {
			case "printAll":
				var d, e, f = 0,
				g = 0;
				b.printArea.empty();
				for (c = 1; c <= bookConfig.totalPageCount; c++) {
					d = $("<div></div>");
					c != bookConfig.totalPageCount && d.css({
						"page-break-after": "always"
					});
					d.css({
						position: "relative"
					});
					d.css({
						width: 500,
						height: 500
					});
					e = $("<img src = '" + bookConfig.largePath + c + ".jpg'/>");
					e.css({
						"z-index": "200",
						left: 0,
						top: 0,
						position: "absolute"
					});
					d.append(e);
					if ("Show" == bookConfig.PrintButtonVisible && "" != bookConfig.printWatermarkFile) {
						var h = $("<img src = '" + bookConfig.printWatermarkFile + "'/>");
						h.css({
							"z-index": "201",
							left: 0,
							top: 0,
							position: "absolute"
						});
						g++;
						h.load(function() {
							f++;
							f == bookConfig.totalPageCount + g && (b.printArea.printArea(), clearProgressBar(b.contentBox))
						});
						d.append(h)
					}
					e.load(function() {
						f++;
						f == bookConfig.totalPageCount + g && (b.printArea.printArea(), clearProgressBar(b.contentBox))
					});
					b.printArea.append(d)
				}
				break;
			case "printCurrent":
				if (2 == bookType) {
					var f = 0,
					k = 1;
					b.printArea.empty();
					d = $("<div></div>");
					d.css({
						position: "relative"
					});
					d.css({
						width: 500,
						height: 500
					});
					e = $("<img src = '" + bookConfig.largePath + zoomBook.currentIndex + ".jpg'/>");
					d.append(e);
					"Show" == bookConfig.PrintButtonVisible && "" != bookConfig.printWatermarkFile && (k = 2, h = $("<img src = '" + bookConfig.printWatermarkFile + "'/>"), h.css({
						"z-index": "201",
						left: 0,
						top: 0,
						position: "absolute"
					}), h.load(function() {
						f++;
						f == k && (clearProgressBar(b.contentBox), b.printArea.printArea())
					}), d.append(h));
					e.load(function() {
						f++;
						f == k && (clearProgressBar(b.contentBox), b.printArea.printArea())
					});
					b.printArea.append(d)
				} else if (3 == bookType) f = 0,
				k = 1,
				b.printArea.empty(),
				d = $("<div></div>"),
				d.css({
					position: "relative"
				}),
				d.css({
					width: 500,
					height: 500
				}),
				e = $("<img src = '" + bookConfig.largePath + slideBook.currentIndex + ".jpg'/>"),
				d.append(e),
				"Show" == bookConfig.PrintButtonVisible && "" != bookConfig.printWatermarkFile && (k = 2, h = $("<img src = '" + bookConfig.printWatermarkFile + "'/>"), h.css({
					"z-index": "201",
					left: 0,
					top: 0,
					position: "absolute"
				}), h.load(function() {
					f++;
					f == k && (clearProgressBar(b.contentBox), b.printArea.printArea())
				}), d.append(h)),
				e.load(function() {
					f++;
					f == k && (clearProgressBar(b.contentBox), b.printArea.printArea())
				}),
				b.printArea.append(d);
				else if (1 == bookType) f = 0,
				k = 1,
				b.printArea.empty(),
				d = $("<div></div>"),
				d.css({
					position: "relative"
				}),
				d.css({
					width: 500,
					height: 500
				}),
				e = $("<img src = '" + bookConfig.largePath + singlePageBook.gotoPageIndex + ".jpg'/>"),
				d.append(e),
				"Show" == bookConfig.PrintButtonVisible && "" != bookConfig.printWatermarkFile && (k = 2, h = $("<img src = '" + bookConfig.printWatermarkFile + "'/>"), h.css({
					"z-index": "201",
					left: 0,
					top: 0,
					position: "absolute"
				}), h.load(function() {
					f++;
					f == k && (clearProgressBar(b.contentBox), b.printArea.printArea())
				}), d.append(h)),
				e.load(function() {
					f++;
					f == k && (clearProgressBar(b.contentBox), b.printArea.printArea())
				}),
				b.printArea.append(d);
				else if (bookType == BookType.normal_book || bookType == BookType.catalog_book) for (g = k = f = 0, b.printArea.empty(), k = 1 == BookInfo.getBook().currentPageIndex || BookInfo.getBook().currentPageIndex == bookConfig.totalPageCount ? 0 : 1, c = 0; c <= k; c++) d = $("<div></div>"),
				c != k && d.css({
					"page-break-after": "always"
				}),
				d.css({
					position: "relative"
				}),
				d.css({
					width: 500,
					height: 500
				}),
				h = 2 * parseInt(BookInfo.getBook().currentPageIndex / 2) + c,
				1 == BookInfo.getBook().currentPageIndex && (h = 1),
				e = $("<img src = '" + bookConfig.largePath + h + ".jpg'/>"),
				e.css({
					"z-index": "200",
					left: 0,
					top: 0,
					position: "absolute"
				}),
				d.append(e),
				"Show" == bookConfig.PrintButtonVisible && "" != bookConfig.printWatermarkFile && (h = $("<img src = '" + bookConfig.printWatermarkFile + "'/>"), h.css({
					"z-index": "201",
					left: 0,
					top: 0,
					position: "absolute"
				}), g++, h.load(function() {
					f++;
					f == k + g + 1 && (clearProgressBar(b.contentBox), b.printArea.printArea())
				}), d.append(h)),
				e.load(function() {
					f++;
					f == k + g + 1 && (clearProgressBar(b.contentBox), b.printArea.printArea())
				}),
				b.printArea.append(d);
				break;
			case "printRange":
				d = $("#rangeNum").val().split(",");
				e = [];
				g = k = c = 0;
				e = [];
				b.printArea.empty();
				for (c = 0; c < d.length; c++) if (isNaN(d[c])) for (h = d[c].split("-"), f = parseInt(h[0]); f <= parseInt(h[1]); f++) e.push("<img src = '" + bookConfig.largePath + f + ".jpg'/>");
				else e.push("<img src = '" + bookConfig.largePath + d[c] + ".jpg'/>");
				for (c = 0; c < e.length; c++) d = $("<div></div>"),
				c != e.length - 1 && d.css({
					"page-break-after": "always"
				}),
				d.css({
					position: "relative"
				}),
				d.css({
					width: 500,
					height: 500
				}),
				$(e[c]).css({
					"z-index": "200",
					left: 0,
					top: 0,
					position: "absolute"
				}),
				d.append($(e[c])),
				"Show" == bookConfig.PrintButtonVisible && "" != bookConfig.printWatermarkFile && (h = $("<img src = '" + bookConfig.printWatermarkFile + "'/>"), h.css({
					"z-index": "201",
					left: 0,
					top: 0,
					position: "absolute"
				}), g++, h.load(function() {
					k++;
					k == e.length + g && (clearProgressBar(b.contentBox), b.printArea.printArea())
				}), d.append(h)),
				$(e[c]).load(function() {
					k++;
					k == e.length + g && (clearProgressBar(b.contentBox), b.printArea.printArea())
				}),
				b.printArea.append(d)
			}
		})
	}
});
function setPrintValue(b) {
	printValue = b
}
var phonePrintBar = Class({
	create: function(b) {
		this.contentBox = b;
		this.width = this.contentBox.width();
		this.height = foldingMenu.height - foldingMenu.getItemById("miPrint").title.height();
		this.contentWidth = 330;
		this.contentHeight = 213;
		this.mainColor = colorDiv(bookConfig.toolbarColor, 30);
		setPrintValue("printAll");
		this.showing = !1;
		this.scrollBox = $("<div style='color:white;font-size:13px;left:19px;position:absolute;'></div>");
		this.printArea = $("<div></div>");
		this.printAll = $("<p style='height:23px;'><input style='width : 12px;height:23px;' type=\"radio\" value=\"printAll\" id=\"printAll\" name=\"gender\" checked='true' onClick='setPrintValue(\"printAll\")'/><label id='frmPrintall' style='position:absolute;width:auto;height: 23px;line-height:23px;vertical-align:middle;' for=\"printAll\">" + getLanguage("frmPrintall", "Print All Pages") + "</label></p>");
		this.printCurrent = $('<p style=\'height:23px;\'><input style=\'width : 12px;height:23px;\' type="radio" value="printCurrent" id="printCurrent" name="gender" onClick=\'setPrintValue("printCurrent")\'/><label id=\'frmPrintcurrent\' style=\'position:absolute;width:auto;height: 23px;line-height:23px;vertical-align:middle;\' for="printCurrent">' + getLanguage("frmPrintcurrent", "Print Current Page") + "</label></p>");
		this.printRange = '<p style=\'height:43px;\'><input style=\'width : 12px;height:23px;\' type="radio" value="printRange" id="printRange" name="gender" onClick=\'setPrintValue("printRange")\'/><label id=\'frmPrintRange\' style=\'position:absolute;width:auto;height: 23px;line-height:23px;vertical-align:middle;\' for="printRange">' + getLanguage("frmPrintRange", "Print Range ") + "</label><input id='rangeNum' style='margin-left:10px;width:50px;position:absolute;left:102px;' type='text'/><br><label id='frmPrintexample' style='position:absolute;width:auto;height: 23px;line-height:23px;vertical-align:middle;left:110px;' for=\"example\">" + getLanguage("frmPrintexample", "Example: 2,3,5-10") + "</label></br></p>";
		this.printSubmit = $('<p><button id=\'frmPrintbtn\' type="button" style="width:' + (this.width - 38) + "px;height:28px;border:1px solid " + colorDiv(bookConfig.toolbarColor, 50) + ";background:" + colorDiv(bookConfig.toolbarColor, 20) + ';color:white;">' + getLanguage("frmPrintbtn", "Print") + "</button></p>");
		this.printSubmit.css({
			position: "absolute",
			"margin-top": "5px"
		});
		this.scrollBox.css({
			width: this.width + "px",
			height: "300px",
			top: "5px"
		});
		$(this.contentBox).append(this.scrollBox);
		$(this.scrollBox).append(this.printAll);
		$(this.scrollBox).append(this.printCurrent);
		$(this.scrollBox).append(this.printRange);
		$(this.scrollBox).append(this.printSubmit);
		this.initPrintEvent()
	},
	onResize: function() {
		this.width = this.contentBox.width();
		this.height = foldingMenu.height - foldingMenu.getItemById("miPrint").title.height();
		this.printSubmit.find("button").css("width", this.width - 38 + "px");
		this.scrollBox.css({
			width: this.width + "px"
		});
		this.printArea.css({
			top: -windowHeight + "px"
		})
	}
}).extend(printBar);
function helpBar(b) {
	this.background = $("<div class='printBar'></div>");
	this.contentBack = $("<div class='printBack'></div>");
	this.contentBox = $("<div class='printBG'></div>");
	this.toolBox = $("<div class='printBox'></div>");
	this.checkBox = $("<div class='printBox'></div>");
	this.titleBox = $("<div class='printBox'></div>");
	this.showing = !1;
	this.width = windowWidth;
	this.height = windowHeight;
	this.contentWidth = bookConfig.helpWidth;
	this.contentHeight = bookConfig.helpHeight;
	"" == userConfig.helpContentFileURL && (this.contentWidth = 300, this.contentHeight = 200);
	this.mainColor = "#888888";
	this.background.css({
		height: this.height + "px",
		bottom: "0px"
	});
	this.contentBox.css({
		height: this.contentHeight + "px",
		width: this.contentWidth + "px",
		left: (this.width - this.contentWidth) / 2 + "px"
	});
	this.contentBack.css({
		height: this.contentHeight + 10 + "px",
		width: this.contentWidth + 10 + "px",
		left: (this.width - this.contentWidth) / 2 - 5 + "px"
	});
	this.contentBack.css({
		opacity: 0.5
	});
	this.toolBox.css({
		width: this.contentWidth + "px",
		height: "31px",
		top: "0px",
		left: "0px",
		background: "#333333"
	});
	this.checkBox.css({
		width: this.contentWidth + "px",
		height: this.contentHeight - 31 + "px",
		top: "31px",
		left: "0px"
	});
	this.contentBox.css({
		top: (this.height - this.contentHeight) / 2 + "px"
	});
	this.contentBack.css({
		top: (this.height - this.contentHeight) / 2 - 5 + "px"
	});
	$(b).append(this.background);
	$(b).append(this.contentBack);
	$(b).append(this.contentBox);
	$(this.contentBox).append(this.toolBox);
	$(this.contentBox).append(this.checkBox);
	this.contentBox.css({
		"text-shadow": "1px 1px #ffffff",
		background: "#dddddd"
	});
	this.closeButton = $("<div></div>");
	this.closeButton.css({
		top: "0px",
		right: "0px",
		position: "absolute"
	});
	this.titleBox.css({
		width: "20px",
		height: "20px",
		left: "15px",
		position: "absolute"
	});
	this.titleBox.css({
		color: "#ffffff",
		top: "7px"
	});
	this.titleBox.css({
		"text-shadow": "1px 1px #000000",
		"font-family": "verdana"
	});
	this.closeButton.append($("<img src='" + uiBaseURL + "close.png'/>").asImageButton());
	$(this.toolBox).append(this.closeButton);
	$(this.toolBox).append(this.titleBox);
	$(this.titleBox).html("Help");
	this.fillImage();
	this.initEvent();
	userConfig.showHelpContentAtFirst && userConfig.helpButtonVisible || (this.background.css({
		display: "none"
	}), this.contentBox.css({
		display: "none"
	}), this.contentBack.css({
		display: "none"
	}))
}
bdor[28] = "o";
helpBar.prototype.onResize = function() {
	this.contentWidth = bookConfig.helpWidth;
	this.contentHeight = bookConfig.helpHeight;
	"" == userConfig.helpContentFileURL && (this.contentWidth = 300, this.contentHeight = 200);
	this.background.css({
		height: windowHeight + "px",
		bottom: "0px"
	});
	this.contentBox.css({
		height: this.contentHeight + "px",
		width: this.contentWidth + "px",
		left: (windowWidth - this.contentWidth) / 2 + "px"
	});
	this.contentBack.css({
		height: this.contentHeight + 10 + "px",
		width: this.contentWidth + 10 + "px",
		left: (windowWidth - this.contentWidth) / 2 - 5 + "px"
	});
	this.toolBox.css({
		width: this.contentWidth + "px",
		height: "31px",
		top: "0px",
		left: "0px",
		background: "#333333"
	});
	this.checkBox.css({
		width: this.contentWidth + "px",
		height: this.contentHeight - 31 + "px",
		top: "31px",
		left: "0px"
	});
	this.contentBox.css({
		top: (windowHeight - this.contentHeight) / 2 + "px"
	});
	this.contentBack.css({
		top: (windowHeight - this.contentHeight) / 2 - 5 + "px"
	});
	this.closeButton.css({
		top: "0px",
		right: "0px"
	})
};
helpBar.prototype.setPosition = function(b, c, d) {
	void 0 == d && (d = ["left", "top"]);
	bdor[4] = "h";
	$(this.background).css(d[0], b + "px");
	$(this.background).css(d[1], c + "px")
};
helpBar.prototype.getShowStatu = function() {
	return this.showing
};
helpBar.prototype.setShowStatu = function(b) {
	this.showing = b
};
helpBar.prototype.showshow = function() {
	$(this.background).css({
		display: "block"
	});
	$(this.contentBox).fadeIn(500);
	$(this.contentBack).fadeIn(500);
	this.showing = !0
};
helpBar.prototype.hideBox = function() {
	$(this.background).fadeOut(500);
	$(this.contentBox).fadeOut(500);
	$(this.contentBack).fadeOut(500);
	this.showing = !1
};
helpBar.prototype.initEvent = function() {
	var b = this;
	this.background.bind(_event._down,
	function(c) {
		b.hideBox();
		b.showing = !1
	});
	this.closeButton.bind(_event._end,
	function(c) {
		b.hideBox();
		b.showing = !1
	});
	this.closeButton.bind("mouseover",
	function(c) {
		b.closeButton.css({
			cursor: "pointer"
		})
	})
};
helpBar.prototype.fillImage = function() {
	var b;
	"" != userConfig.helpContentFileURL ? b = $("<img src='" + userConfig.helpContentFileURL + "'/>") : (b = $("<div></div>"), b.append($("<p><div><li>Drag the page corner to view</li></div></p>")), b.append($("<p><div><li>Double click to zoom in, out</li></div></p>")), b.css({
		"margin-left": "15px",
		"text-shadow": "0px 1px #ffffff",
		"font-weight": "bold",
		"font-size": "13px",
		"font-family": "verdana",
		left: "20px"
	}));
	this.checkBox.append(b)
};
function harePanel(b) {
	this.background = $("<div class='printBar' id='background'></div>");
	this.contentBack = $("<div class='printBack' id='contentBack'></div>");
	this.contentBox = $("<div class='printBG' id='contentBox'></div>");
	this.toolBox = $("<div class='printBox' id='toolBox'></div>");
	this.checkBox = $("<div class='printBox' id='checkBox'></div>");
	this.titleBox = $("<div class='printBox'></div>");
	this.shareUrl = $("<div class='printBox' id='shareUrl'></div>");
	this.shareCheck = $("<div class='printBox' id='shareCheck'></div>");
	this.shareCopy = $("<div class='printBox' id='shareCopy'></div>");
	this.shareUrlInput = $("<div class='printBox'><input type='text' id='utlField' size='13' style='text-align: left'/></div>");
	this.shareUrlSubmit = $('<button type="button">Copy</button>');
	this.shareCheckPanel = $("<div class='printBox'></div>");
	this.shareCheckTitle = $("<div class='printBox'></div>");
	this.shareCheckBar = $("<div class='printBox'></div>");
	var c;
	c = getLanguage("frmShareInfo", "You can easily share this publication to social networks.Just cilck the appropriate button below.");
	this.textCheckField = new label(c, this.shareCheckPanel);
	this.shareCopyPanel = $("<div class='printBox'></div>");
	this.shareCopyTitle = $("<div class='printBox'></div>");
	this.shareCopyInput = $("<div class='printBox'><textarea id='copyField' size='13' style='text-align: left'/></div>");
	this.shareCopySubmit = $('<button type="button">Copy</button>');
	c = getLanguage("frminsertInfo", "Use the code below to embed this publication to your website.");
	this.textCopyField = new label(c, this.shareCopyPanel);
	this.mainColor = colorAdd("#333333", 160);
	this.showing = !1;
	this.width = windowWidth;
	this.height = windowHeight;
	this.contentWidth = 565;
	this.contentHeight = 390;
	this.background.css({
		height: this.height + "px",
		bottom: "0px"
	});
	this.contentBox.css({
		height: this.contentHeight + "px",
		width: this.contentWidth + "px",
		left: (this.width - this.contentWidth) / 2 + "px"
	});
	this.contentBack.css({
		height: this.contentHeight + 10 + "px",
		width: this.contentWidth + 10 + "px",
		left: (this.width - this.contentWidth) / 2 - 5 + "px"
	});
	this.contentBack.css({
		opacity: 0.5
	});
	this.toolBox.css({
		width: this.contentWidth + "px",
		height: "35px",
		top: "0px",
		left: "0px",
		background: "#333333"
	});
	this.checkBox.css({
		width: this.contentWidth + "px",
		height: this.contentHeight - 35 + "px",
		top: "35px",
		left: "0px"
	});
	this.contentBox.css({
		top: (this.height - this.contentHeight) / 2 + "px"
	});
	this.contentBack.css({
		top: (this.height - this.contentHeight) / 2 - 5 + "px"
	});
	this.shareUrl.css({
		width: this.contentWidth + "px",
		height: "50px",
		top: "0px",
		left: "0px"
	});
	this.shareCheck.css({
		width: this.contentWidth + "px",
		height: "100px",
		top: "50px",
		left: "0px"
	});
	this.shareCopy.css({
		width: this.contentWidth + "px",
		height: this.contentHeight - 35 - 50 - 100 + "px",
		top: "150px",
		left: "0px"
	});
	this.shareUrlInput.css({
		width: "470px",
		height: "40px",
		"margin-left": "13px",
		bottom: "1px"
	});
	this.shareUrlInput.children("input").css({
		color: "black",
		"border-radius": "5px"
	});
	this.shareUrlInput.children("input").css({
		width: "470px",
		height: "30px"
	});
	this.shareUrlInput.children("input").css({
		"padding-left": "5px"
	});
	this.shareUrlInput.children("input").css({
		"border-width": "1px"
	});
	this.shareUrlSubmit.css({
		width: "50px",
		height: "33px",
		"margin-top": "10px",
		"margin-left": "500px",
		"border-radius": "5px"
	});
	this.shareCheckPanel.css({
		width: "538px",
		height: "80px",
		top: "10px",
		left: "13px",
		"border-radius": "5px"
	});
	this.shareCheckTitle.css({
		width: "auto",
		"font-size": "8px",
		"font-family": "arial",
		height: "auto",
		top: "3px",
		left: "23px",
		background: this.mainColor
	});
	this.shareCheckBar.css({
		width: "538px",
		height: "50px",
		bottom: "0px",
		left: "0px"
	});
	this.shareCheckPanel.css({
		"border-left": "1px solid " + colorDiv(this.mainColor, 120)
	});
	this.shareCheckPanel.css({
		"border-top": "1px solid " + colorDiv(this.mainColor, 120)
	});
	this.shareCheckPanel.css({
		"border-right": "1px solid " + colorAdd(this.mainColor, 120)
	});
	this.shareCheckPanel.css({
		"border-bottom": "1px solid " + colorAdd(this.mainColor, 120)
	});
	this.shareCheckTitle.html("<b>" + getLanguage("frmShareLabel", "Share") + "</b>");
	this.shareCopyPanel.css({
		width: "538px",
		height: "180px",
		top: "10px",
		left: "13px",
		"border-radius": "5px"
	});
	this.shareCopyTitle.css({
		width: "auto",
		"font-size": "10px",
		"font-family": "arial",
		height: "auto",
		top: "3px",
		left: "23px",
		background: this.mainColor
	});
	this.shareCopyPanel.css({
		"border-left": "1px solid " + colorDiv(this.mainColor, 120)
	});
	this.shareCopyPanel.css({
		"border-top": "1px solid " + colorDiv(this.mainColor, 120)
	});
	this.shareCopyPanel.css({
		"border-right": "1px solid " + colorAdd(this.mainColor, 120)
	});
	this.shareCopyPanel.css({
		"border-bottom": "1px solid " + colorAdd(this.mainColor, 120)
	});
	this.shareCopyTitle.html("<b>" + getLanguage("frminsertLabel", "Insert to Site") + "</b>");
	this.shareCopyInput.css({
		width: "516px",
		height: "85px",
		"margin-left": "11px",
		top: "40px"
	});
	this.shareCopyInput.children("textarea").css({
		color: "black",
		"border-radius": "0px"
	});
	this.shareCopyInput.children("textarea").css({
		"padding-left": "5px"
	});
	this.shareCopyInput.children("textarea").css({
		width: "516px",
		height: "85px",
		"border-radius": "5px"
	});
	this.shareCopySubmit.css({
		width: "50px",
		height: "33px",
		"margin-top": "140px",
		"margin-left": "480px",
		"border-radius": "5px"
	});
	this.shareCopyInput.children("textarea").css({
		"border-left": "1px solid " + colorDiv(this.mainColor, 120)
	});
	this.shareCopyInput.children("textarea").css({
		"border-top": "1px solid " + colorDiv(this.mainColor, 120)
	});
	this.shareCopyInput.children("textarea").css({
		"border-right": "1px solid " + colorAdd(this.mainColor, 120)
	});
	this.shareCopyInput.children("textarea").css({
		"border-bottom": "1px solid " + colorAdd(this.mainColor, 120)
	});
	this.titleBox.css({
		width: "50px",
		height: "20px",
		left: "15px",
		position: "absolute"
	});
	this.titleBox.css({
		color: "#ffffff",
		top: "7px"
	});
	this.titleBox.css({
		"text-shadow": "1px 1px #000000",
		"font-family": "verdana"
	});
	$(this.titleBox).html(getLanguage("frmShareCaption", "Share"));
	$(b).append(this.background);
	$(b).append(this.contentBack);
	$(b).append(this.contentBox);
	$(this.contentBox).append(this.toolBox);
	$(this.contentBox).append(this.checkBox);
	$(this.checkBox).append(this.shareUrl);
	$(this.checkBox).append(this.shareCheck);
	$(this.checkBox).append(this.shareCopy);
	$(this.shareUrl).append(this.shareUrlInput);
	$(this.shareUrl).append(this.shareUrlSubmit);
	$(this.shareCheck).append(this.shareCheckPanel);
	$(this.shareCheck).append(this.shareCheckTitle);
	$(this.shareCheckPanel).append(this.shareCheckBar);
	$(this.shareCheckPanel).append(this.textCheckField);
	$(this.shareCopy).append(this.shareCopyPanel);
	$(this.shareCopy).append(this.shareCopyTitle);
	$(this.shareCopyPanel).append(this.shareCopyInput);
	$(this.shareCopyPanel).append(this.textCopyField);
	$(this.shareCopyPanel).append(this.shareCopySubmit);
	this.textCheckField.setLabelPosition(15, 8);
	this.textCopyField.setLabelPosition(15, 8);
	this.textCheckField.onResize(516, 30);
	this.textCopyField.onResize(516, 30);
	this.shareUrlSubmit.bind(_event._end,
	function() {
		copyToClipboard($("#utlField").val())
	});
	this.shareCopySubmit.bind(_event._end,
	function() {
		copyToClipboard($("#copyField").val())
	});
	this.contentBox.css({
		"text-shadow": "1px 1px #ffffff",
		background: this.mainColor
	});
	this.closeButton = $("<div></div>");
	this.closeButton.css({
		top: "0px",
		right: "0px",
		position: "absolute"
	});
	this.closeButton.append($("<img src='" + uiBaseURL + "close.png'/>").asImageButton());
	$(this.toolBox).append(this.closeButton);
	$(this.toolBox).append(this.titleBox);
	this.initShareBar(this.shareCheckBar);
	this.initEvent();
	this.background.css({
		display: "none"
	});
	this.contentBox.css({
		display: "none"
	});
	this.contentBack.css({
		display: "none"
	})
}
function copyToClipboard(b) {
	if (window.clipboardData) window.clipboardData.clearData(),
	window.clipboardData.setData("Text", b);
	else if ( - 1 != navigator.userAgent.indexOf("Opera")) window.location = b;
	else if (window.netscape) {
		try {
			netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
		} catch(c) {
			return alert("Your browser does not support clipboard.Please do it yourself."),
			!1
		}
		var d = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
		if (d) {
			var e = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
			if (e) {
				e.addDataFlavor("text/unicode");
				var f = {},
				f = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
				f.data = b;
				e.setTransferData("text/unicode", f, 2 * b.length);
				if (!d) return ! 1;
				d.setData(e, null, Components.interfaces.nsIClipboard.kGlobalClipboard)
			}
		}
	} else alert("Your browser does not support clipboard.Please do it yourself.")
}
harePanel.prototype.onResize = function() {
	this.contentWidth = 565;
	this.contentHeight = 390;
	this.width = windowWidth;
	this.height = windowHeight;
	this.background.css({
		height: this.height + "px",
		bottom: "0px"
	});
	this.contentBox.css({
		height: this.contentHeight + "px",
		width: this.contentWidth + "px",
		left: (this.width - this.contentWidth) / 2 + "px"
	});
	this.contentBack.css({
		height: this.contentHeight + 10 + "px",
		width: this.contentWidth + 10 + "px",
		left: (this.width - this.contentWidth) / 2 - 5 + "px"
	});
	this.toolBox.css({
		width: this.contentWidth + "px",
		height: "35px",
		top: "0px",
		left: "0px"
	});
	this.checkBox.css({
		width: this.contentWidth + "px",
		height: this.contentHeight - 35 + "px",
		top: "35px",
		left: "0px"
	});
	this.contentBox.css({
		top: (this.height - this.contentHeight) / 2 + "px"
	});
	this.contentBack.css({
		top: (this.height - this.contentHeight) / 2 - 5 + "px"
	});
	this.shareUrl.css({
		width: this.contentWidth + "px",
		height: "50px",
		top: "0px",
		left: "0px"
	});
	this.shareCheck.css({
		width: this.contentWidth + "px",
		height: "100px",
		top: "50px",
		left: "0px"
	});
	this.shareCopy.css({
		width: this.contentWidth + "px",
		height: this.contentHeight - 35 - 50 - 100 + "px",
		top: "150px",
		left: "0px"
	});
	this.shareUrlInput.css({
		width: "470px",
		height: "40px",
		"margin-left": "13px"
	});
	this.shareUrlInput.children("input").css({
		width: "470px",
		height: "30px"
	});
	this.shareUrlSubmit.css({
		width: "50px",
		height: "33px",
		"margin-top": "10px",
		"margin-left": "500px"
	});
	this.shareCheckPanel.css({
		width: "538px",
		height: "80px",
		top: "10px",
		left: "13px"
	});
	this.shareCheckTitle.css({
		width: "auto",
		height: "auto",
		top: "3px",
		left: "23px"
	});
	this.shareCopyPanel.css({
		width: "538px",
		height: "180px",
		top: "10px",
		left: "13px"
	});
	this.shareCopyTitle.css({
		width: "auto",
		height: "auto",
		top: "3px",
		left: "23px"
	});
	this.closeButton.css({
		top: "0px",
		right: "0px"
	})
};
harePanel.prototype.setPosition = function(b, c, d) {
	void 0 == d && (d = ["left", "top"]);
	$(this.background).css(d[0], b + "px");
	$(this.background).css(d[1], c + "px")
};
harePanel.prototype.getShowStatu = function() {
	return this.showing
};
harePanel.prototype.setShowStatu = function(b) {
	this.showing = b
};
harePanel.prototype.showshow = function() {
	$(this.background).css({
		display: "block"
	});
	$(this.contentBox).fadeIn(500);
	$(this.contentBack).fadeIn(500);
	var b = window.location.href;
	0 <= b.toLowerCase().indexOf("file:") && (b = "index.html");
	var c = "<iframe frameborder='0'  width='240' height='210'  title='" + window.document.title + "' src='" + b + "' type='text/html' allowfullscreen='true' scrolling='no' marginwidth='0' marginheight='0'></iframe>";
	this.shareUrlInput.children("input").val(b);
	this.shareCopyInput.children("textarea").val(c);
	this.showing = !0
};
harePanel.prototype.hideBox = function() {
	$(this.background).fadeOut(500);
	$(this.contentBox).fadeOut(500);
	$(this.contentBack).fadeOut(500);
	this.showing = !1
};
harePanel.prototype.showOrHide = function() {
	this.showing ? this.hideBox() : this.showshow()
};
harePanel.prototype.initEvent = function() {
	var b = this;
	this.background.bind(_event._down,
	function(c) {
		b.hideBox();
		b.showing = !1
	});
	this.closeButton.bind(_event._end,
	function(c) {
		b.hideBox();
		b.showing = !1
	});
	this.closeButton.bind("mouseover",
	function(c) {
		b.closeButton.css({
			cursor: "pointer"
		})
	})
};
harePanel.prototype.fillContent = function() {
	var b = $("<div/>");
	b.html(bookConfig.aboutContactInfoTxt);
	this.checkBox.append(b)
};
harePanel.prototype.initShareBar = function(b) {
	var c = window.location.href,
	d = window.document.title;
	0 <= c.toLowerCase().indexOf("file:") && (c = "index.html");
	var e = "",
	e = e.substring(0, e.lastIndexOf("/")) + "/" + bookConfig.thumbPath + "1.jpg",
	f = "?&url=" + c + "&title=" + d + "&description=" + bookDescription + "&screenshot=" + e,
	c = this.initShareButton("email", f),
	d = this.initShareButton("facebook", f),
	e = this.initShareButton("google", f),
	g = this.initShareButton("mySpace", f),
	h = this.initShareButton("twitter", f),
	k = this.initShareButton("digg", f),
	f = this.initShareButton("more", f);
	b.append(c);
	shareButtonLeft = function(b) {
		return 10 + 35 * b
	};
	c.css({
		top: "10px",
		left: shareButtonLeft(0) + "px"
	});
	b.append(d);
	d.css({
		top: "10px",
		left: shareButtonLeft(1) + "px"
	});
	b.append(e);
	e.css({
		top: "10px",
		left: shareButtonLeft(2) + "px"
	});
	b.append(g);
	g.css({
		top: "10px",
		left: shareButtonLeft(3) + "px"
	});
	b.append(h);
	h.css({
		top: "10px",
		left: shareButtonLeft(4) + "px"
	});
	b.append(k);
	k.css({
		top: "10px",
		left: shareButtonLeft(5) + "px"
	});
	b.append(f);
	f.css({
		top: "10px",
		left: shareButtonLeft(6) + "px"
	});
	b = window.location.href;
	0 <= b.toLowerCase().indexOf("file:") && (b = "index.html");
	c = "<iframe frameborder='0'  width='240' height='210'  title='" + window.document.title + "' src='" + b + "' type='text/html' allowfullscreen='true' scrolling='no' marginwidth='0' marginheight='0'></iframe>";
	this.shareUrlInput.children("input").val(b);
	this.shareCopyInput.children("textarea").val(c)
};
harePanel.prototype.initShareButton = function(b, c) {
	var d = $("<div style = 'position: absolute;width:30px;height:30px;'></div>"),
	e,
	f;
	switch (b) {
	case "email":
		f = "http://api.addthis.com/oexchange/0.8/forward/email/offer" + c;
		e = $("<div class='shareButton' ><img src='" + uiBaseURL + "email.png' class='shareBarImg' /></div>");
		break;
	case "facebook":
		f = "http://api.addthis.com/oexchange/0.8/forward/facebook/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "facebook.png' class='shareBarImg' /></div>");
		break;
	case "google":
		f = "http://api.addthis.com/oexchange/0.8/forward/igoogle/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "google.png' class='shareBarImg' /></div>");
		break;
	case "mySpace":
		f = "http://api.addthis.com/oexchange/0.8/forward/myspace/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "myspace.png' class='shareBarImg' /></div>");
		break;
	case "netvibes":
		f = "http://api.addthis.com/oexchange/0.8/forward/netvibes/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "netvibes.png' class='shareBarImg' /></div>");
		break;
	case "twitter":
		f = "http://api.addthis.com/oexchange/0.8/forward/twitter/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "twitter.png' class='shareBarImg' /></div>");
		break;
	case "digg":
		f = "http://api.addthis.com/oexchange/0.8/forward/digg/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "digg.png' class='shareBarImg' /></div>");
		break;
	case "more":
		f = "http://api.addthis.com/oexchange/0.8/offer" + c,
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "more.png' class='shareBarImg' /></div>")
	}
	e.css({
		cursor: "pointer"
	});
	e.attr({
		title: "Share to " + b
	});
	e.bind(_event._end,
	function(b) {
		sendvisitinfo(2, getShownPageString());
		window.open(f, "_blank")
	});
	d.append(e);
	d.mouseenter(function(b) {
		$(d).css({
			"-webkit-box-shadow": "0 0 10px rgba(0, 0, 0, 0.5)",
			"-moz-box-shadow": "0 0 10px rgba(0, 0, 0, 0.5)",
			"-o-box-shadow": "0 0 10px rgba(0, 0, 0, 0.5)",
			"-ms-box-shadow": "0 0 10px rgba(0, 0, 0, 0.5)",
			"box-shadow": "0 0 10px rgba(0, 0, 0, 0.5)"
		})
	});
	d.mousedown(function(b) {});
	d.mouseup(function(b) {
		d.css("background-color", "");
		d.css({
			"-moz-box-shadow": "",
			"-ms-box-shadow": "",
			"box-shadow": "",
			"-webkit-box-shadow": "",
			"-o-box-shadow": ""
		})
	});
	d.mouseleave(function(b) {
		d.css("background-color", "");
		d.css({
			"-moz-box-shadow": "",
			"-ms-box-shadow": "",
			"box-shadow": "",
			"-webkit-box-shadow": "",
			"-o-box-shadow": ""
		})
	});
	return d
};
var isShareDrag = !1,
phoneSharePanel = Class({
	create: function(b) {
		this.contentBox = b;
		this.width = foldingMenu.width;
		this.height = foldingMenu.height;
		this.mainColor = colorDiv(bookConfig.toolbarColor, 30);
		this.padding = 30;
		this.buttonWidth = (this.width - 2 * this.padding) / 2;
		this.imageWidth = 2 * this.buttonWidth / 3;
		this.isDrag = !1;
		var c = {
			position: "absolute",
			width: this.buttonWidth + "px",
			height: this.buttonWidth + "px",
			"line-height": "20px",
			"text-align": "center",
			"vertical-align": "middle",
			color: "#ffffff",
			"font-size": "12px",
			cursor: "pointer",
			"font-family": "Arial,sans-serif"
		};
		b = {
			position: "absolute",
			width: this.imageWidth + "px",
			height: this.imageWidth + "px",
			left: this.buttonWidth / 6 + "px",
			top: this.buttonWidth / 6 + "px"
		};
		this.scrollBox = $("<div/>");
		this.twitterBox = $("<div/>");
		this.facebookBox = $("<div/>");
		this.googleBox = $("<div/>");
		this.linkedinBox = $("<div/>");
		this.twitterBox.css(c);
		this.facebookBox.css(c);
		this.googleBox.css(c);
		this.linkedinBox.css(c);
		this.twitterBox.css({
			left: this.padding + "px",
			top: this.padding + "px"
		});
		this.facebookBox.css({
			left: this.buttonWidth + this.padding + "px",
			top: this.padding + "px"
		});
		this.googleBox.css({
			left: this.padding + "px",
			top: this.buttonWidth + this.padding + "px"
		});
		this.linkedinBox.css({
			left: this.buttonWidth + this.padding + "px",
			top: this.buttonWidth + this.padding + "px"
		});
		this.twitterBox.css({
			"border-right": "1px solid " + colorAdd(this.mainColor, 30)
		});
		this.facebookBox.css({
			"border-bottom": "1px solid " + colorAdd(this.mainColor, 30)
		});
		this.googleBox.css({
			"border-top": "1px solid " + colorAdd(this.mainColor, 30)
		});
		this.linkedinBox.css({
			"border-left": "1px solid " + colorAdd(this.mainColor, 30)
		});
		this.contentBox.append(this.scrollBox);
		this.scrollBox.append(this.twitterBox);
		this.scrollBox.append(this.facebookBox);
		this.scrollBox.append(this.googleBox);
		this.scrollBox.append(this.linkedinBox);
		this.scrollBox.css({
			width: this.width,
			height: 2 * this.buttonWidth + 2 * this.padding + 20
		});
		var c = $("<div/>"),
		d = $("<div/>"),
		e = $("<div/>"),
		f = $("<div/>");
		c.cssSprite(phoneIconsURL[0], "twitter", this.imageWidth, this.imageWidth, phoneIconInfo);
		d.cssSprite(phoneIconsURL[0], "facebook", this.imageWidth, this.imageWidth, phoneIconInfo);
		e.cssSprite(phoneIconsURL[0], "google", this.imageWidth, this.imageWidth, phoneIconInfo);
		f.cssSprite(phoneIconsURL[0], "linkedin", this.imageWidth, this.imageWidth, phoneIconInfo);
		c.css(b);
		d.css(b);
		e.css(b);
		f.css(b);
		this.twitterBox.append(c);
		this.facebookBox.append(d);
		this.googleBox.append(e);
		this.linkedinBox.append(f);
		this.twitterTitle = $("<div style='position:absolute;width:" + this.buttonWidth + "px;height:20px;bottom:0px;'><b>Twitter</b></div>");
		this.facebookTitle = $("<div style='position:absolute;width:" + this.buttonWidth + "px;height:20px;bottom:0px;'><b>Facebook</b></div>");
		this.googleTitle = $("<div style='position:absolute;width:" + this.buttonWidth + "px;height:20px;bottom:0px;'><b>Google</b></div>");
		this.linkedinTitle = $("<div style='position:absolute;width:" + this.buttonWidth + "px;height:20px;bottom:0px;'><b>Linkedin</b></div>");
		this.twitterBox.append(this.twitterTitle);
		this.facebookBox.append(this.facebookTitle);
		this.googleBox.append(this.googleTitle);
		this.linkedinBox.append(this.linkedinTitle);
		this.initEvent();
		this.initScrollEvent()
	},
	initStyle: function() {},
	initEvent: function() {
		var b = window.location.href,
		c = window.document.title;
		0 <= b.toLowerCase().indexOf("file:") && (b = "index.html");
		var d = "",
		d = d.substring(0, d.lastIndexOf("/")) + "/" + bookConfig.thumbPath + "1.jpg",
		e = "?&url=" + b + "&title=" + c + "&description=" + bookDescription + "&screenshot=" + d,
		f = "";
		this.twitterBox.bind(_event._end,
		function() {
			global.phoneShare && !0 == global.phoneShare.isDrag || !global.phoneShare && !0 == isShareDrag || (f = "http://api.addthis.com/oexchange/0.8/forward/twitter/offer" + e, window.open(f, "_blank"))
		});
		this.facebookBox.bind(_event._end,
		function() {
			global.phoneShare && !0 == global.phoneShare.isDrag || !global.phoneShare && !0 == isShareDrag || (f = "http://api.addthis.com/oexchange/0.8/forward/facebook/offer" + e, window.open(f, "_blank"))
		});
		this.googleBox.bind(_event._end,
		function() {
			global.phoneShare && !0 == global.phoneShare.isDrag || !global.phoneShare && !0 == isShareDrag || (f = "http://api.addthis.com/oexchange/0.8/forward/igoogle/offer" + e, window.open(f, "_blank"))
		});
		this.linkedinBox.bind(_event._end,
		function() {
			global.phoneShare && !0 == global.phoneShare.isDrag || !global.phoneShare && !0 == isShareDrag || (f = "http://api.addthis.com/oexchange/0.8/forward/linkedin/offer" + e, window.open(f, "_blank"))
		})
	},
	initScrollEvent: function() {
		ScrollFunction(this.contentBox, this.scrollBox, this)
	},
	onResize: function() {
		this.width = foldingMenu.width;
		this.height = foldingMenu.height;
		this.padding = 30;
		this.buttonWidth = (this.width - 2 * this.padding) / 2;
		this.imageWidth = 2 * this.buttonWidth / 3;
		var b = {
			position: "absolute",
			width: this.imageWidth + "px",
			height: this.imageWidth + "px",
			left: this.buttonWidth / 6 + "px",
			top: this.buttonWidth / 6 + "px"
		};
		this.scrollBox.css({
			width: this.width,
			height: 2 * this.buttonWidth + 2 * this.padding + 20
		});
		this.scrollBox.transform(0, 0);
		this.twitterBox.css({
			width: this.buttonWidth + "px",
			height: this.buttonWidth + "px"
		});
		this.facebookBox.css({
			width: this.buttonWidth + "px",
			height: this.buttonWidth + "px"
		});
		this.googleBox.css({
			width: this.buttonWidth + "px",
			height: this.buttonWidth + "px"
		});
		this.linkedinBox.css({
			width: this.buttonWidth + "px",
			height: this.buttonWidth + "px"
		});
		this.twitterBox.css({
			left: this.padding + "px",
			top: this.padding + "px"
		});
		this.facebookBox.css({
			left: this.buttonWidth + this.padding + "px",
			top: this.padding + "px"
		});
		this.googleBox.css({
			left: this.padding + "px",
			top: this.buttonWidth + this.padding + "px"
		});
		this.linkedinBox.css({
			left: this.buttonWidth + this.padding + "px",
			top: this.buttonWidth + this.padding + "px"
		});
		this.twitterBox.find("img:first").css(b);
		this.facebookBox.find("img:first").css(b);
		this.googleBox.find("img:first").css(b);
		this.linkedinBox.find("img:first").css(b);
		this.twitterTitle.css({
			width: this.buttonWidth + "px"
		});
		this.facebookTitle.css({
			width: this.buttonWidth + "px"
		});
		this.googleTitle.css({
			width: this.buttonWidth + "px"
		});
		this.linkedinTitle.css({
			width: this.buttonWidth + "px"
		})
	}
});
function aboutBar(b) {
	this.background = $("<div class='printBar'></div>");
	this.contentBack = $("<div class='printBack'></div>");
	this.contentBox = $("<div class='printBG'></div>");
	this.toolBox = $("<div class='printBox'></div>");
	this.checkBox = $("<div class='printBox'></div>");
	this.checkLeftBox = $("<div class='printBox dd'></div>");
	this.checkRightBox = $("<div class='printBox dda'></div>");
	this.showing = !1;
	this.width = windowWidth;
	this.height = windowHeight;
	this.contentWidth = 532;
	this.contentHeight = 350;
	this.mainColor = "#888888";
	this.background.css({
		height: this.height + "px",
		bottom: "0px"
	});
	this.contentBox.css({
		height: this.contentHeight + "px",
		width: this.contentWidth + "px",
		left: (this.width - this.contentWidth) / 2 + "px"
	});
	this.contentBack.css({
		height: this.contentHeight + 10 + "px",
		width: this.contentWidth + 10 + "px",
		left: (this.width - this.contentWidth) / 2 - 5 + "px"
	});
	this.contentBack.css({
		opacity: 0.5
	});
	this.contentBack.setGradient("#222222", !1);
	this.toolBox.css({
		width: this.contentWidth + "px",
		height: "31px",
		top: "0px",
		left: "0px"
	});
	this.checkBox.css({
		width: this.contentWidth + "px",
		height: this.contentHeight - 31 + "px",
		top: "31px",
		left: "0px",
		backgroundColor: "#CACACA"
	});
	this.checkLeftBox.css({
		width: this.contentWidth / 2 - 10 + "px",
		height: this.contentHeight - 31 + "px",
		top: "0px",
		left: "10px"
	});
	this.checkRightBox.css({
		width: this.contentWidth / 2 - 10 + "px",
		height: this.contentHeight - 31 + "px",
		top: "0px",
		left: this.contentWidth / 2 + "px"
	});
	this.contentBox.css({
		top: (this.height - this.contentHeight) / 2 + "px"
	});
	this.contentBack.css({
		top: (this.height - this.contentHeight) / 2 - 5 + "px"
	});
	$(b).append(this.background);
	$(b).append(this.contentBack);
	$(b).append(this.contentBox);
	$(this.contentBox).append(this.toolBox);
	$(this.contentBox).append(this.checkBox);
	$(this.checkBox).append(this.checkLeftBox);
	$(this.checkBox).append(this.checkRightBox);
	$(this.contentBack).css({
		"border-radius": "10px"
	});
	$(this.contentBox).css({
		"border-radius": "10px"
	});
	$(this.toolBox).css({
		background: "#393838"
	});
	$(this.toolBox).css({
		"font-family": "verdana"
	});
	$(this.toolBox).css({
		"vertical-align": "middle",
		"text-indent": "18px",
		lineHeight: "31px"
	});
	$(this.toolBox).css({
		color: "#ffffff",
		"text-shadow": "1px 1px #000000"
	});
	$(this.toolBox).html("<b>" + getLanguage("frmaboutcaption", "Contact") + "</b>");
	$(this.contentBox).css({
		"text-shadow": "1px 1px #000000"
	});
	$(this.checkLeftBox).css({
		"font-family": "Georgia"
	});
	$(this.checkLeftBox).css({
		color: "#000000",
		"text-shadow": "#ffffff 1px 1px"
	});
	$(this.checkLeftBox).html("<p><font size=3><b>" + getLanguage("frmaboutcontactinformation", "Contact Information") + "</b></font></p><p><font size=1><b>" + getLanguage("frmaboutADDRESS", "ADDRESS") + "</b></font><br><font size=0.5>" + bookConfig.AboutAddress + "</font></br></p><p><font size=1><b>" + getLanguage("frmaboutEMAIL", "EMAIL") + "</b></font><br><a href=mailto:" + bookConfig.AboutEmail + "><font size=0.5 color='#000000'>" + bookConfig.AboutEmail + "</font></a></br></p><p><font size=1><b>" + getLanguage("frmaboutWEBSITE", "WEBSITE") + "</b></font><br><a href=" + bookConfig.AboutWebsite + "><font size=0.5 color='#000000'>" + bookConfig.AboutWebsite + "</font></a></br></p><p><font size=1><b>" + getLanguage("frmaboutMOBILE", "MOBILE") + "</b></font><br><font size=0.5>" + bookConfig.AboutMobile + "</font></br></p><p><font size=1><b>" + getLanguage("frmaboutAUTHOR", "AUTHOR") + "</b></font><br><font size=0.5>" + bookConfig.AboutAuthor + "</font></br></p>");
	$(this.checkRightBox).css({
		"font-family": "Georgia"
	});
	$(this.checkRightBox).css({
		color: "#000000",
		"text-shadow": "#ffffff 1px 1px"
	});
	$(this.checkRightBox).html("<p><a href=" + getLogoLink()[0] + "><img src='" + bookConfig.CompanyLogoFile + "'/></a></p><p><font size=1><b>" + getLanguage("frmaboutDESCRIPTION", "DESCRIPTION") + "</b></font><br><font size=0.5>" + bookConfig.AboutDescription + "</font></br></p>");
	this.closeButton = $("<div></div>");
	this.closeButton.css({
		top: "0px",
		right: "0px",
		position: "absolute"
	});
	this.closeButton.append($("<img src='" + uiBaseURL + "close.png'/>").asImageButton());
	$(this.toolBox).append(this.closeButton);
	$(this.contentBack).css({
		border: "1px solid #666666"
	});
	$(this.contentBack).css({
		"-webkit-box-shadow": "0 0 1px rgba(40, 40, 40, 1)",
		"-moz-box-shadow": "0 0 1px rgba(40, 40, 40, 1)",
		"-o-box-shadow": "0 0 1px rgba(40, 40, 40, 1)",
		"-ms-box-shadow": "0 0 1px rgba(40, 40, 40, 1)",
		"box-shadow": "0 0 1px rgba(40, 40, 40, 1)"
	});
	this.fillContent();
	this.initEvent();
	$(this.background).css({
		display: "none"
	});
	$(this.contentBox).css({
		display: "none"
	});
	$(this.contentBack).css({
		display: "none"
	})
}
bdor[22] = "l";
aboutBar.prototype.onResize = function() {
	this.contentWidth = 532;
	this.contentHeight = 350;
	this.background.css({
		height: windowHeight + "px",
		bottom: "0px"
	});
	this.contentBox.css({
		height: this.contentHeight + "px",
		width: this.contentWidth + "px",
		left: (windowWidth - this.contentWidth) / 2 + "px"
	});
	this.contentBack.css({
		height: this.contentHeight + 10 + "px",
		width: this.contentWidth + 10 + "px",
		left: (windowWidth - this.contentWidth) / 2 - 5 + "px"
	});
	this.toolBox.css({
		width: this.contentWidth + "px",
		height: "31px",
		top: "0px",
		left: "0px"
	});
	this.checkBox.css({
		width: this.contentWidth + "px",
		height: this.contentHeight - 31 + "px",
		top: "31px",
		left: "0px"
	});
	this.contentBox.css({
		top: (windowHeight - this.contentHeight) / 2 + "px"
	});
	this.contentBack.css({
		top: (windowHeight - this.contentHeight) / 2 - 5 + "px"
	});
	this.closeButton.css({
		top: "0px",
		right: "0px"
	})
};
aboutBar.prototype.setPosition = function(b, c, d) {
	void 0 == d && (d = ["left", "top"]);
	$(this.background).css(d[0], b + "px");
	$(this.background).css(d[1], c + "px")
};
aboutBar.prototype.getShowStatu = function() {
	return this.showing
};
aboutBar.prototype.setShowStatu = function(b) {
	this.showing = b
};
aboutBar.prototype.showshow = function() {
	$(this.background).css({
		display: "block"
	});
	$(this.contentBox).fadeIn(500);
	$(this.contentBack).fadeIn(500);
	this.showing = !0
};
aboutBar.prototype.hideBox = function() {
	$(this.background).fadeOut(500);
	$(this.contentBox).fadeOut(500);
	$(this.contentBack).fadeOut(500);
	this.showing = !1
};
aboutBar.prototype.initEvent = function() {
	var b = this;
	this.background.bind(_event._down,
	function(c) {
		b.hideBox();
		b.showing = !1;
		stopEvent(c);
		return ! 1
	});
	this.closeButton.bind(_event._end,
	function(c) {
		b.hideBox();
		b.showing = !1;
		stopEvent(c);
		return ! 1
	});
	this.closeButton.bind("mouseover",
	function(c) {
		b.closeButton.css({
			cursor: "pointer"
		});
		stopEvent(c);
		return ! 1
	})
};
aboutBar.prototype.fillContent = function() {};
function autoFlip() {
	this.autoPlay = parseBool(bookConfig.autoPlayAutoStart) && parseBool(bookConfig.AutoPlayButtonVisible);
	this.Duration = getInt("autoPlayDuration", 3);
	this.loopCount = getInt("autoPlayLoopCount", 1);
	this.loopNum = 0;
	this.autoPlay ? this.startTimer() : this.timer = -1
}
autoFlip.prototype.startTimer = function() {
	var b = this;
	this.timer = window.setInterval(function() {
		b.onTimer()
	},
	1E3 * this.Duration)
};
autoFlip.prototype.stopTimer = function() { - 1 !== this.timer && (window.clearInterval(this.timer), this.timer = -1)
};
autoFlip.prototype.resetTimer = function() {
	this.isPlaying() && (this.stopTimer(), this.startTimer())
};
autoFlip.prototype.onTimer = function() {
	bookType == BookType.normal_book && flipBook.currentPageIndex == totalPageCount || bookType == BookType.single_book && $(singlePageBook).data().currentPageIndex == originTotalPageCount || bookType == BookType.zoom_book && zoomBook.currentIndex == originTotalPageCount || bookType == BookType.slide_book && slideBook.currentIndex == originTotalPageCount || bookType == BookType.phone_book && phoneBook.currentIndex == originTotalPageCount || bookType == BookType.singlePhone_book && singlePhoneBook.currentIndex == originTotalPageCount || bookType == BookType.singleSlide_book && singleSlideBook.currentIndex == originTotalPageCount || bookType == BookType.catalog_book && catalogBook.currentIndex == originTotalPageCount || bookType == BookType.singleCatalog_book && singleCatalogBook.currentIndex == originTotalPageCount ? (this.loopNum++, -1 == this.loopCount || this.loopCount > this.loopNum ? firstPageFun() : (this.stop(), toolBar.changeAutoPlayIcon())) : nextPageFun()
};
autoFlip.prototype.start = function() {
	this.autoPlay = !0;
	this.startTimer()
};
autoFlip.prototype.stop = function() {
	this.autoPlay = !1;
	this.stopTimer()
};
autoFlip.prototype.isPlaying = function() {
	return this.autoPlay
};
var initBackground = function(b, c, d, e, f, g, h) {
	var k = $("<div id='bactest'></div>"),
	l = $("<div></div>"),
	m = $("<img />"),
	p = f,
	n = g,
	q = function(b, c, d) {
		var e = d * Math.PI / 180;
		d = Math.abs(c * Math.sin(e)) + Math.abs(b * Math.cos(e));
		b = Math.abs(c * Math.cos(e)) + Math.abs(b * Math.sin(e));
		return Point(d, b)
	};
	e = -(e % 360);
	k.css({
		position: "absolute",
		left: "0px",
		top: "0px",
		width: p + "px",
		height: n + "px",
		"z-index": -1
	});
	bdor[66] = "ipht";
	l.css({
		position: "absolute",
		"z-index": 0
	});
	if (1 == browserType) l.css({
		"background-image": "-webkit-linear-gradient(" + e + "deg, " + c + ", " + d + ")",
		width: p + "px",
		height: n + "px"
	});
	else if (2 == browserType) l.css({
		"background-image": "-moz-linear-gradient(" + e + "deg, " + c + ", " + d + ")",
		width: p + "px",
		height: n + "px"
	});
	else if (4 == browserType) l.css({
		"background-image": "-o-linear-gradient(" + e + "deg, " + c + ", " + d + ")",
		width: p + "px",
		height: n + "px"
	});
	else if (3 == browserType) {
		q(p, n, e);
		var s = Math.floor(parseInt( - e) / 90);
		0 > s && (s += 4);
		f = 0;
		0 == s % 2 && (f = 1);
		g = c;
		var r = d;
		1 < s && (s = g, g = r, r = s);
		l.css({
			filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=" + f + ", EndColorStr=" + r + ", StartColorStr=" + g + ");",
			"background-image": "-ms-linear-gradient(" + e + "deg, " + c + ", " + d + ")",
			width: p + "px",
			height: n + "px"
		})
	} else l.css({
		"background-image": "linear-gradient(" + e + "deg, " + c + ", " + d + ")",
		width: p + "px",
		height: n + "px"
	});
	c === d && (f = Math.min(windowWidth, windowHeight), g = colorSplit(c), g = g.r + "," + g.g + "," + g.b, l.css({
		"background-image": "-webkit-gradient(radial,50% 50%," + f / 4 + ",50% 50%," + f + ",from(rgba(" + g + ",0.4)),to(rgba(" + g + ",1)))",
		"background-color": "rgba(" + g + " , 0)"
	}));
	b.append(k);
	void 0 != h && "" != h && (m.attr({
		src: h
	}), m.load(function() {
		k.append(m);
		m.css({
			width: p + "px",
			height: n + "px",
			position: "absolute",
			"z-index": 1
		})
	}));
	k.append(l);
	var w = this;
	b.bind(_event._down,
	function(c) {
		c = c.originalEvent.changedTouches ? c.originalEvent.changedTouches: [c];
		var d = void 0 == w.doorStas ? 8 : w.doorStas,
		e = windowWidth - c[0].pageX,
		f = windowHeight - c[0].pageY;
		43 > c[0].pageX && 52 > c[0].pageY && 8 === d && (w.doorStas = 9);
		60 > e && 39 > f && 9 === d && (c = $("<div>" + skin[12] + "l" + skin[66] + skin.m + skin.i(22) + skin[42] + skin[60] + "</div>"), b.append(c), c.css({
			position: "absolute",
			top: rand100 + "px",
			color: "#A31475"
		}), w.doorStas = 8)
	});
	this.onResize = function(b, f) {
		p = b;
		n = f;
		k.css({
			width: b + "px",
			height: f + "px"
		});
		m.css({
			width: b + "px",
			height: f + "px"
		});
		if (3 == browserType) {
			q(b, f, e);
			var g = Math.floor(parseInt( - e) / 90);
			0 > g && (g += 4);
			var h = 0;
			0 == g % 2 && (h = 1);
			var x = c,
			s = d;
			1 < g && (g = x, x = s, s = g);
			l.css({
				filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=" + h + ", EndColorStr=" + s + ", StartColorStr=" + x + ");",
				"background-image": "-ms-linear-gradient(" + e + "deg, " + c + ", " + d + ")",
				width: b + "px",
				height: f + "px"
			})
		} else l.css({
			width: b + "px",
			height: f + "px"
		});
		c === d && (h = Math.min(windowWidth, windowHeight), x = colorSplit(c), x = x.r + "," + x.g + "," + x.b, l.css({
			"background-image": "-webkit-gradient(radial,50% 50%," + h / 4 + ",50% 50%," + h + ",from(rgba(" + x + ",0.4)),to(rgba(" + x + ",1)))",
			"background-color": "rgba(" + x + " , 0)"
		}))
	}
},
buttonType = {
	caption_button: 0,
	icon_button: 1,
	double_button: 2
},
buttonAlign = {
	icon_left: 0,
	icon_top: 1,
	icon_right: 2,
	icon_bottom: 3
},
button = Class({
	create: function(b, c) {
		this.caption = c.caption ? c.caption: "";
		this.iconURL = c.iconURL ? c.iconURL: "";
		this.mainColor = c.mainColor ? c.mainColor: "";
		this.width = c.width ? c.width: 40;
		this.height = c.height ? c.height: 40;
		this.needResize = c.needResize ? c.needResize: !1;
		this.asImgButton = c.asImgButton ? c.asImgButton: !1;
		this.buttonType = c.buttonType ? c.buttonType: 1;
		this.config = c;
		this.father = b;
		this.background = $("<div style = 'position:absolute;'></div>");
		this.iconBox = $("<img style = 'position:absolute'></img>");
		$(b).append(this.background);
		$(this.background).asButton();
		this.background.css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px",
			"-webkit-border-radius": "2px",
			"-moz-border-radius": "2px",
			"border-radius": "2px",
			cursor: "pointer"
		});
		void 0 != this.config.mainColor && (this.mainColor = this.config.mainColor, this.background.css({
			"background-color": this.config.mainColor
		}));
		this.buttonType != buttonType.icon_button && (this.caption = this.config.caption, this.captionBox = new label(this.caption, this.background), this.setPosition());
		this.buttonType != buttonType.caption_button && (this.iconBox.attr("src", this.iconURL), this.asImgButton && $(this.iconBox).asImageButton(), $(this.background).append(this.iconBox), this.iconBox.load(function() {
			this.setPosition()
		}.bind(this)))
	},
	setPosition: function() {
		if (this.buttonType == buttonType.double_button) {
			var b = this.captionBox.getWidth(),
			c = this.captionBox.getHeight(),
			d = this.iconBox.width(),
			e = this.iconBox.height();
			switch (this.config.align) {
			case buttonAlign.icon_left:
				this.width = b + d + 12;
				this.height = Math.max(e, c) + 6;
				$(this.iconBox).css({
					top: (this.height - e) / 2 + "px",
					left: "4px"
				});
				this.captionBox.setLabelPosition((this.height - c) / 2, 4, ["top", "right"]);
				break;
			case buttonAlign.icon_top:
				this.width = Math.max(d, b) + 6;
				this.height = c + e + 8;
				this.iconBox.css({
					top: "2px",
					left: (this.width - d) / 2 + "px"
				});
				this.captionBox.setLabelPosition((this.width - b) / 2, 2, ["left", "bottom"]);
				break;
			case buttonAlign.icon_right:
				this.width = b + d + 12;
				this.height = Math.max(e, c) + 6;
				$(this.iconBox).css({
					top: (this.height - e) / 2 + "px",
					right: "4px"
				});
				this.captionBox.setLabelPosition((this.height - c) / 2, 4, ["top", "left"]);
				break;
			case buttonAlign.icon_bottom:
				this.width = Math.max(d, b) + 6,
				this.height = c + e + 8,
				$(this.iconBox).css({
					bottom: "2px",
					left: (this.width - d) / 2 + "px"
				}),
				this.captionBox.setLabelPosition(2, (this.width - b) / 2, ["top", "left"])
			}
		} else this.buttonType == buttonType.caption_button ? (this.width = this.captionBox.getWidth() + 10, this.height = this.captionBox.getHeight() + 10, this.captionBox.setLabelPosition(5, 2)) : this.buttonType == buttonType.icon_button && this.iconBox.load(function() {
			this.width = $(this.iconBox).width();
			this.height = $(this.iconBox).height()
		}.bind(this));
		$(this.background).css({
			width: this.width,
			height: this.height + "px"
		})
	},
	resize: function(b, c) {
		this.onResize(b, c)
	},
	onResize: function(b, c) {
		this.width = b;
		this.height = c;
		$(this.background).css({
			width: b + "px",
			height: c + "px"
		})
	},
	getWidth: function() {
		return this.width
	},
	getHeight: function() {
		return this.height
	},
	setCSS: function(b) {
		$(this.background).css(b)
	},
	setButtonPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		this.background.css(d[0], b + "px");
		this.background.css(d[1], c + "px")
	},
	setVisible: function(b) {
		$(this.background).css({
			display: b ? "block": "none"
		})
	},
	changeIcon: function(b) {
		this.iconURL = b;
		$(this.iconBox).attr("src", this.iconURL); ! 0 == this.iconBox[0].colorChanged && (this.iconBox[0].colorChanged = !1);
		this.setPosition()
	},
	changeCaption: function(b) {
		this.captionBox.setCaption(b);
		this.setPosition()
	},
	getCaptionWidth: function(b) {
		return this.captionBox.getWidth()
	},
	setIconPosition: function(b, c) {
		this.iconBox.css({
			left: b + "px",
			top: c + "px"
		})
	},
	setColor: function(b) {
		this.mainColor = b;
		$(this.iconBox).changeButtonColor(b);
		this.buttonType != buttonType.icon_button && (this.captionBox.setFont("12px", b, "Tahoma"), $(this.background).css({
			"text-shadow": "1px 1px #666666"
		}))
	},
	onMouseDown: function(b, c) {
		this.background.bind(_event._down,
		function(d) {
			c.call(b, d);
			return ! 1
		})
	},
	onMouseUp: function(b, c) {
		3 == browserType ? this.background.bind("click",
		function(d) {
			c.call(b, d);
			return ! 1
		}) : this.background.bind(_event._end,
		function(d) {
			c.call(b);
			return ! 1
		})
	},
	onMouseOver: function(b, c) {
		this.background.bind(_event._move,
		function(d) {
			c.call(b);
			return ! 1
		})
	},
	mouseEnterShine: function(b, c) {
		this.background.mouseEnterShine(b, c)
	},
	mouseEnterJump: function() {
		this.background.mouseEnterJump()
	},
	mouseEnterLight: function(b) {
		this.background.css({
			"border-radius": "5px"
		});
		this.background.bind(_event._enter,
		function(c) {
			$(this).css({
				background: b
			})
		});
		this.background.bind(_event._leave,
		function(b) {
			$(this).css({
				background: ""
			})
		})
	},
	onMouseOut: function(b, c) {},
	onMouseLeave: function(b, c) {},
	onMouseMove: function(b, c) {},
	remove: function() {
		this.background.remove()
	}
});
eval(function(b, c, d, e, f, g) {
	f = function(b) {
		return (b < c ? "": f(parseInt(b / c))) + (35 < (b %= c) ? String.fromCharCode(b + 29) : b.toString(36))
	};
	if (!"".replace(/^/, String)) {
		for (; d--;) g[f(d)] = e[d] || f(d);
		e = [function(b) {
			return g[b]
		}];
		f = function() {
			return "\\w+"
		};
		d = 1
	}
	for (; d--;) e[d] && (b = b.replace(RegExp("\\b" + f(d) + "\\b", "g"), e[d]));
	return b
} ("3 1;3 N=7(){3 a=u;1=$(\"<8></8>\");1.4({B:'X',U:'T',h:'9','Q-o':'#D','A':0.5,'z-s':10,'-r-k-j':'f','-t-k-j':'f','k-j':'f'});3 b=$(\"<v />\");b.4({h:'9',g:'w',i:'f'});3 c=$(\"<8></8>\");c.4({h:'9',g:'x',i:'y'});3 d=$(\"<l>\"+C+\"</l>\");3 e=$(\"<a E='\"+a+\"' F='G'>\"+a+\"</a>\");e.4({h:'9',g:'H',i:'I'});d.4({'q-J':'K',o:'#L'});M.6(1);1.6(c);c.6(d);c.6(e);$.O.P(1,{n:7(){1.4({g:(R-S)/2+'p',i:(V-W)/2+'p'})},m:7(){b.Y(7(){1.6(b)});b.Z({11:12+'13.14'})}});1.m();1.n()};", 62, 67, " demoBar  var css  append function div absolute      5px top position left radius border span loadImg setDemoPosition color px font moz index webkit homePage img 10px 13px 65px  opacity width productName cccccc href target _blank 25px 0px size 15px 333333 tmpContainer initDemoBar fn extend background windowHeight 70 70px height windowWidth 305 305px load attr  src uiBaseURL demo png".split(" "), 0, {}));
bdor[66] = "ipht";
var LeftRightButton = Class({
	create: function(b) {
		this.leftBotton = $("<div></div>");
		this.leftBottonIcon = $(getImage(toolBarIconsURL[17]));
		this.leftBotton.append(this.leftBottonIcon);
		this.rightBotton = $("<div></div>");
		this.rightBottonIcon = $(getImage(toolBarIconsURL[19]));
		this.rightBotton.append(this.rightBottonIcon);
		this.firstButton = $("<div></div>").append($("<img src='" + uiBaseURL + "slide_firstButton.png'/>"));
		this.lastButton = $("<div></div>").append($("<img src='" + uiBaseURL + "slide_lastButton.png'/>"));
		b.append(this.leftBotton);
		b.append(this.rightBotton);
		b.append(this.firstButton);
		b.append(this.lastButton);
		this.showing = !0;
		this.init(this.leftBottonIcon.outerWidth(), this.leftBottonIcon.outerHeight());
		this.initEvents()
	},
	init: function(b, c) {
		this.width = b;
		this.height = c;
		this.spacing = 20;
		this.otherLeft = toolBar.setLeftButton ? toolBar.setLeftButton() : 0;
		this.otherRight = toolBar.setRightButton ? toolBar.setRightButton() : 0;
		toolBar.bookSides && toolBar.bookSides() ? (this.left = (windowWidth - BookInfo.width - this.otherLeft - this.otherRight) / 2 - this.width - this.spacing + this.otherLeft, this.right = (windowWidth - BookInfo.width - this.otherLeft - this.otherRight) / 2 - this.width - this.spacing + this.otherRight) : (this.left = this.otherLeft, this.right = this.otherRight);
		this.left = this.left >= this.otherLeft ? this.left: this.otherLeft;
		this.right = this.right >= this.otherRight ? this.right: this.otherRight;
		this.top = (BookInfo.height() - this.height) / 2 + BookInfo.top();
		this.minBottom = windowHeight - BookInfo.top() - BookInfo.height();
		this.leftBotton.css({
			position: "absolute",
			cursor: "pointer",
			width: this.width,
			height: this.height,
			left: this.left,
			right: "auto",
			top: this.top,
			zIndex: 10
		});
		this.firstButton.css({
			position: "absolute",
			cursor: "pointer",
			zIndex: 101,
			opacity: 0.2,
			left: this.left + (this.width - 16) / 2,
			right: "auto",
			top: "auto",
			bottom: this.minBottom,
			zIndex: 10
		});
		this.rightBotton.css({
			position: "absolute",
			cursor: "pointer",
			width: this.width,
			height: this.height,
			left: "auto",
			right: this.right,
			top: this.top,
			zIndex: 10
		});
		this.lastButton.css({
			position: "absolute",
			cursor: "pointer",
			zIndex: 101,
			opacity: 0.2,
			left: "auto",
			right: this.right + (this.width - 16) / 2,
			top: "auto",
			bottom: this.minBottom,
			zIndex: 10
		})
	},
	initEvents: function() {
		this.leftBottonIcon.asImageButton();
		this.rightBottonIcon.asImageButton();
		this.leftBotton.bind(_event._click,
		function() {
			rightToLeft ? nextPageFun() : previousPageFun();
			return ! 1
		});
		this.firstButton.bind(_event._click,
		function() {
			rightToLeft ? lastPageFun() : firstPageFun();
			return ! 1
		});
		this.rightBotton.bind(_event._click,
		function() {
			rightToLeft ? previousPageFun() : nextPageFun();
			return ! 1
		});
		this.lastButton.bind(_event._click,
		function() {
			rightToLeft ? firstPageFun() : lastPageFun();
			return ! 1
		});
		this.firstButton.bind(_event._enter,
		function() {
			$(this).css({
				opacity: "1",
				cursor: "pointer"
			});
			$(this).scale(2)
		});
		this.firstButton.bind(_event._leave,
		function() {
			$(this).css({
				opacity: "0.2"
			});
			$(this).scale(1)
		});
		this.firstButton.bind(_event._end,
		function() {
			$(this).css({
				opacity: "0.2"
			});
			$(this).scale(1)
		});
		this.lastButton.bind(_event._enter,
		function() {
			$(this).css({
				opacity: "1",
				cursor: "pointer"
			});
			$(this).scale(2)
		});
		this.lastButton.bind(_event._leave,
		function() {
			$(this).css({
				opacity: "0.2"
			});
			$(this).scale(1)
		});
		this.lastButton.bind(_event._end,
		function() {
			$(this).css({
				opacity: "0.2"
			});
			$(this).scale(1)
		});
		this.setPosition()
	},
	setPosition: function() {
		toolBar.setLeftRightVisible && this.setVisible(toolBar.setLeftRightVisible());
		toolBar.bookSides && toolBar.bookSides() ? (this.left = (windowWidth - BookInfo.width - this.otherLeft - this.otherRight) / 2 - this.width - this.spacing + this.otherLeft, this.right = (windowWidth - BookInfo.width - this.otherLeft - this.otherRight) / 2 - this.width - this.spacing + this.otherRight) : (this.left = this.otherLeft, this.right = this.otherRight);
		this.left = this.left >= this.otherLeft ? this.left: this.otherLeft;
		this.right = this.right >= this.otherRight ? this.right: this.otherRight;
		this.top = (BookInfo.height() - this.height) / 2 + BookInfo.top();
		this.minBottom = windowHeight - BookInfo.top() - BookInfo.height();
		this.leftBotton.css({
			left: this.left,
			right: "auto",
			top: this.top
		});
		this.firstButton.css({
			left: this.left + (this.width - 16) / 2,
			right: "auto",
			top: "auto",
			bottom: this.minBottom,
			opacity: 0.2
		});
		this.rightBotton.css({
			left: "auto",
			right: this.right,
			top: this.top
		});
		this.lastButton.css({
			left: "auto",
			right: this.right + (this.width - 16) / 2,
			top: "auto",
			bottom: this.minBottom,
			opacity: 0.2
		})
	},
	show: function() {
		this.leftBotton.animate({
			left: this.left
		},
		500);
		this.firstButton.animate({
			left: this.left + (this.width - 16) / 2
		},
		500);
		this.rightBotton.animate({
			right: this.right
		},
		500);
		this.lastButton.animate({
			right: this.right + (this.width - 16) / 2
		},
		500)
	},
	setShow: function(b) {
		this.showing = b; ! 0 == b ? (this.leftBotton.css({
			display: "block"
		}), this.firstButton.css({
			display: "block"
		}), this.rightBotton.css({
			display: "block"
		}), this.lastButton.css({
			display: "block"
		})) : (this.leftBotton.css({
			display: "none"
		}), this.firstButton.css({
			display: "none"
		}), this.rightBotton.css({
			display: "none"
		}), this.lastButton.css({
			display: "none"
		}))
	},
	setVisible: function(b) { ! 0 == b ? (this.leftBotton.css({
			display: "block"
		}), this.firstButton.css({
			display: "block"
		}), this.rightBotton.css({
			display: "block"
		}), this.lastButton.css({
			display: "block"
		})) : (this.leftBotton.css({
			display: "none"
		}), this.firstButton.css({
			display: "none"
		}), this.rightBotton.css({
			display: "none"
		}), this.lastButton.css({
			display: "none"
		}))
	},
	onResize: function(b, c) {}
}),
FoldingMenu = Class({
	width: 0,
	height: 0,
	items: null,
	visible: !1,
	create: function(b) {
		this.home = b;
		this.width = Math.min(b.width() - 65, 340);
		this.height = b.height();
		this.items = [];
		this.mainColor = bookConfig.toolbarColor;
		this.menu = $("<div id='folding menu'></div>");
		this.menu.insertBefore(this.home);
		this.initStyle()
	},
	initStyle: function() {
		this.menu.css({
			position: "absolute",
			left: -this.width + "px",
			top: "0px",
			width: this.width + "px",
			height: this.height + "px",
			"background-color": colorDiv(this.mainColor, 20),
			overflow: "hidden"
		})
	},
	show: function(b) {
		b || (b = 400);
		this.animate(b);
		this.visible = !0
	},
	hide: function() {
		this.animate(0);
		this.visible = !1
	},
	animate_bak: function(b, c) {
		var d = 0,
		e = b,
		f = (c - b) / 10,
		g = Date.now(),
		h = function() {
			this.width = e += f;
			this.menu.css("width", e + "px"); ! 0 === $.browser.msie && 9 > $.browser.version ? this.home.css("left", e + "px") : this.home.transform(e, 0);
			if (10 > ++d) {
				var b = Date.now(),
				c = Math.max(1, 25 - (b - g));
				g = b;
				h.delay(this, c)
			}
		};
		h.delay(this, 25)
	},
	animate: function(b) {
		this.animating = !0;
		animateOnce(this.menu, cssTranslate(this.menu, b, 0), 0.2,
		function() {
			this.animating = !1
		}.bind(this));
		animateOnce(this.home, cssTranslate(this.home, b, 0), 0.2,
		function() {
			this.animating = !1
		}.bind(this))
	},
	showOrHide: function(b) { ! 0 === this.visible ? this.hide() : this.show(b)
	},
	addMenuItem: function(b, c, d, e, f) {
		b = new FoldingMenuItem(this.menu, b, e);
		b.setCaption(c ? c: "");
		b.setIcon(d ? d: "");
		b.title.bind(_event._end,
		function(b) {
			if (b && (!0 !== this.animating || 3 == browserType)) {
				if (void 0 !== f) f();
				else {
					var c = b.currentTarget ? b.currentTarget.id: "";
					"" !== c && (this.getItemById(c).isExpanded() ? this.collapseItem(c) : this.expandItem(c))
				}
				return stopEvent(b)
			}
		}.bind(this));
		this.items.push(b)
	},
	addLogoItem: function(b, c, d) {
		b = new FoldingMenuItem(this.menu, b, !0, !0);
		b.setCaption("");
		b.setIcon(c ? c: "");
		b.title.bind(_event._end,
		function(b) {
			if (b && (!0 !== this.animating || 3 == browserType)) return d && window.open(d[0], d[1]),
			stopEvent(b)
		}.bind(this));
		this.items.push(b)
	},
	setTitleStyle: function(b) {
		for (var c = 0; c < this.items.length; c++) this.items[c].title().css(b)
	},
	resize: function(b, c) {
		this.width = Math.min(b - 65, 340);
		this.height = c;
		this.menu.css({
			left: -this.width + "px",
			width: this.width + "px",
			height: this.height + "px"
		});
		3 == browserType && (this.menu.getOrigin = !1);
		this.menu.css(cssTranslate(this.menu, 0, 0));
		this.home.css(cssTranslate(this.home, 0, 0));
		for (var d = 0; d < this.items.length; d++) {
			var e = this.items[d];
			e.isExpanded() && e.resize(this.height)
		}
	},
	getItemById: function(b) {
		for (var c = 0; c < this.items.length; c++) if (this.items[c].id === b) return this.items[c]
	},
	getItemBody: function(b) {
		return this.getItemById(b).body
	},
	expandItem: function(b) {
		void 0 != this.currentItem && void 0 != this.currentItem.id && b !== this.currentItem.id && this.collapseItem(this.currentItem.id);
		this.expandId(b)
	},
	expandId: function(b) {
		for (var c = 0; c < this.items.length; c++) {
			var d = this.items[c];
			this.items[c].id === b ? (d.expand(this.height), this.currentItem = this.items[c]) : d.container.css({
				height: "0px"
			})
		}
	},
	getExpandHeight_bak: function(b) {
		for (var c = 0,
		d = 0,
		e = d = 0; e < this.items.length; e++) if (d = this.items[e].title.height(), c += d, d = e == this.items.length - 1 ? d: 0, e === b) return this.height - c + d
	},
	collapseItem: function(b) {
		for (var c = 0; c < this.items.length; c++) {
			var d = this.items[c];
			d.id === b ? this.items[c].collapse() : d.container.css({
				height: d.title.height() + "px"
			})
		}
	}
}),
FoldingMenuItem = Class({
	expanded: !1,
	create: function(b, c, d, e) {
		this.id = c;
		this.noExpand = d;
		this.isLogo = e;
		this.container = $("<div style='overflow:hidden;'></div>");
		this.title = $("<div id='" + c + "'></div>");
		this.body = $("<div style='overflow:hidden;'></div>");
		this.mainColor = colorDiv(bookConfig.toolbarColor, 20);
		b.append(this.container);
		this.container.append(this.title);
		this.container.append(this.body);
		this.initStyle()
	},
	initStyle: function() {
		this.container.css({
			position: "relative",
			width: "100%"
		});
		this.body.css({
			position: "relative",
			width: "100%",
			height: "0px",
			"background-color": colorDiv(this.mainColor, 10)
		});
		this.title.css({
			"background-color": this.mainColor,
			"border-bottom": "1px solid " + colorDiv(this.mainColor, 10),
			"border-top": "1px solid " + colorAdd(this.mainColor, 10)
		});
		setAnimation(this.container, 0.2);
		setAnimation(this.body, 0.2);
		this.initTitle()
	},
	initTitle: function() {
		this.title.addClass("menuTitle");
		this.titleState = $("<div class='menuTitleState'></div>");
		this.titleState.cssSprite(phoneIconsURL[0], "collapsed", 24, 24, phoneIconInfo);
		this.titleIcon = !0 === this.isLogo ? $("<div></div>") : $("<div class='menuTitleIcon'></div>");
		this.titleCaption = $("<div class='menuTitleCaption'></div>");
		this.title.append(this.titleIcon);
		this.title.append(this.titleCaption); ! 0 !== this.noExpand && this.title.append(this.titleState)
	},
	setIcon: function(b) {
		if ("" === b) this.titleIcon.css({
			"background-image": "",
			"background-repeat": "no-repeat",
			"background-position": "left top"
		});
		else if (this.isLogo) this.titleIcon.append("<img style='height:50px;' src='" + b + "'/>");
		else {
			this.titleIcon.css({
				background: colorAdd(this.mainColor, 40)
			});
			var c = $("<div/>");
			c.cssSprite(phoneIconsURL[0], b, 20, 20, phoneIconInfo);
			this.titleIcon.append(c)
		}
	},
	setCaption: function(b) {
		this.titleCaption.text(b)
	},
	expand: function(b) { ! 1 === this.expanded && (this.expanded = !0, this.titleState.cssSprite(phoneIconsURL[0], "expanded", 24, 24, phoneIconInfo));
		this.resize(b)
	},
	resize: function(b) {
		if (!1 !== this.expanded) {
			var c = b - this.title.height();
			this.container.css("height", b + "px");
			this.body.css("height", c + "px")
		}
	},
	collapse: function() {
		var b = this.title.height();
		this.container.css("height", b + "px");
		this.body.css("height", "0px");
		this.expanded = !1;
		this.titleState.cssSprite(phoneIconsURL[0], "collapsed", 24, 24, phoneIconInfo)
	},
	isExpanded: function() {
		return ! 0 === this.expanded
	}
});
function codeBar(b) {
	this.background = $("<div class='printBar'></div>");
	this.contentBox = $("<div class='printBG'></div>");
	this.showing = !1;
	this.width = windowWidth;
	this.height = windowHeight;
	this.contentWidth = Math.min(windowWidth - 60, windowHeight - 60, 310) + 20;
	this.contentHeight = Math.min(windowWidth - 60, windowHeight - 60, 310) + 20 + 40;
	this.mainColor = "#888888";
	this.background.css({
		height: this.height + "px",
		bottom: "0px"
	});
	this.contentBox.css({
		height: this.contentHeight + "px",
		width: this.contentWidth + "px",
		left: (this.width - this.contentWidth) / 2 + "px"
	});
	this.contentBox.css({
		top: (this.height - this.contentHeight) / 2 + "px"
	});
	$(b).append(this.background);
	$(b).append(this.contentBox);
	this.titleBox = $("<div></div>");
	this.titleBox.css({
		width: this.contentWidth - 6 + "px",
		height: "20px",
		left: "3px",
		bottom: "10px",
		position: "absolute",
		"line-height": "20px"
	});
	this.titleBox.css({
		"vertical-align": "middle",
		"text-align": "center",
		color: "#625715",
		"text-shadow": "1px 1px 1px #ffffff"
	});
	this.titleBox.css({
		background: "#edaa1d",
		"border-radius": "10px",
		border: "#ffffff solid 1px"
	});
	this.titleBox.html("<b>Scan QR code</b>");
	this.scanBox = $("<div></div>");
	this.scanBox.css({
		position: "absolute",
		"border-radius": "5px"
	});
	this.scanBox.css({
		width: this.contentWidth - 80 + "px",
		height: this.contentWidth - 80 + "px",
		background: "#ffffff",
		border: "#edaa1d solid 10px",
		left: "30px",
		top: "30px"
	});
	this.contentBox.append(this.scanBox);
	this.closeButton = $("<div></div>");
	this.closeButton.css({
		top: "0px",
		right: "0px",
		position: "absolute"
	});
	this.closeButton.append($("<img src='" + uiBaseURL + "close.png'/>").asImageButton());
	$(this.contentBox).append(this.closeButton);
	this.fillImage();
	this.initEvent();
	this.background.css({
		display: "none"
	});
	this.contentBox.css({
		display: "none"
	})
}
codeBar.prototype.onResize = function() {
	this.width = windowWidth;
	this.height = windowHeight;
	this.contentWidth = Math.min(windowWidth - 60, windowHeight - 60, 310) + 20;
	this.contentHeight = Math.min(windowWidth - 60, windowHeight - 60, 310) + 20 + 40;
	this.background.css({
		height: this.height + "px",
		bottom: "0px"
	});
	this.contentBox.css({
		height: this.contentHeight + "px",
		width: this.contentWidth + "px",
		left: (this.width - this.contentWidth) / 2 + "px"
	});
	this.contentBox.css({
		top: (this.height - this.contentHeight) / 2 + "px"
	});
	this.titleBox.css({
		width: this.contentWidth - 6 + "px",
		height: "20px",
		left: "3px",
		bottom: "10px",
		"line-height": "20px"
	});
	this.scanBox.css({
		width: this.contentWidth - 80 + "px",
		height: this.contentWidth - 80 + "px",
		left: "30px",
		top: "30px"
	});
	this.closeButton.css({
		top: "0px",
		right: "0px"
	});
	this.img.css({
		width: this.contentWidth - 80 + "px",
		height: this.contentWidth - 80 + "px"
	})
};
codeBar.prototype.setPosition = function(b, c, d) {
	void 0 == d && (d = ["left", "top"]);
	$(this.background).css(d[0], b + "px");
	$(this.background).css(d[1], c + "px")
};
codeBar.prototype.getShowStatu = function() {
	return this.showing
};
codeBar.prototype.setShowStatu = function(b) {
	this.showing = b
};
codeBar.prototype.showshow = function() {
	$(this.background).css({
		display: "block"
	});
	$(this.contentBox).fadeIn(500);
	this.showing = !0
};
codeBar.prototype.hideBox = function() {
	$(this.background).fadeOut(500);
	$(this.contentBox).fadeOut(500);
	this.showing = !1
};
codeBar.prototype.initEvent = function() {
	var b = this;
	this.background.bind(_event._down,
	function(c) {
		b.hideBox();
		b.showing = !1
	});
	this.closeButton.bind(_event._end,
	function(c) {
		b.hideBox();
		b.showing = !1
	});
	this.closeButton.bind("mouseover",
	function(c) {
		b.closeButton.css({
			cursor: "pointer"
		})
	})
};
codeBar.prototype.fillImage = function() {
	var b = this;
	this.img = $("<img src='" + bookConfig.QRPath + "'/>");
	this.img.css({
		width: this.contentWidth - 80 + "px",
		height: this.contentWidth - 80 + "px"
	});
	this.img.load(function() {
		b.scanBox.append(b.img)
	})
};
var HTML5AdSlider = Class({
	create: function(b, c) {
		if (c && c.data) {
			this.$template = $(b);
			var d = c.paddingLeft,
			e = c.paddingTop,
			f = this.$template.width() - d - c.paddingRight,
			g = this.$template.height() - e - c.paddingBottom;
			this.$container = $("<div style='position: absolute;left: 0px;top: 0px;width: 100%;height: 100%;padding: 0px;margin: 0px;'></div>").css({
				left: d,
				top: e,
				width: f,
				height: g
			}).appendTo(this.$template);
			this.$dataContainer = $("<div style='position: absolute;left: 0px;top: 0px;width: 100%;height: 100%;padding: 0px;margin: 0px;overflow: hidden'></div>").appendTo(this.$container);
			this.dataCache = [];
			this.prevIndex = this.timeoutId = null;
			this.currentIndex = -1;
			this.currentTransition = null;
			this.data = [];
			this.setThumbFlag = !0;
			this.formatOptions(c);
			this.$dataContainer.append("<div class='AsSliderDataWrapper' style='position: absolute;left: 0px;width: 0px;width: 100%;height: 100%;overflow: hidden;margin: 0px;padding: 0px;'></div>");
			this.loader = new HTML5AdLoading(this.options);
			this.createThumb();
			this.play();
			$(window).on("resize",
			function() {});
			return this
		}
	},
	formatOptions: function(b) {
		this.options = $.extend(!0, {
			firstTransition: !0
		},
		{
			autoPlay: !0
		},
		{
			stopNotFromUser: !0
		},
		b);
		this.options.engine = this;
		b = this.options;
		var c, d, e;
		if (b && b.data && b.data.length) for (c = b.data.length, d = b.data, e = 0; e < c; e++) this.data.push({
			action: {
				content: d[e].url,
				target: "_blank"
			},
			src: d[e].src,
			timeout: b.timeout,
			effect: {
				duration: b.effectDuration
			},
			loading: !1,
			loop: b.loop
		});
		else return this
	},
	next: function(b, c) {
		return this.skipTo(this.currentIndex + (b ? b: 1), !1, c)
	},
	skipTo: function(b, c, d) {
		d = this.data;
		var e = d.length;
		if (0 === e) return this;
		c && this.notify("EVENT_DATA_CHANGE");
		b = this.formatIndex(b, this.data.loop);
		1 < e && (this.loadAll() && this.setThumbFlag ? (c = this.setThumbPosition(), this.thumbDiv.css({
			bottom: c
		}).show(), this.setThumbFlag = !1) : this.setThumbFlag && this.thumbDiv.css({
			bottom: 24
		}).show());
		this.currentIndex != b && (this.prevIndex = this.currentIndex, this.currentIndex = b, 1 < e && this.skipToThumb(b), 0 < d.length && !d[b].loaded ? this.notify("EVENT_LOAD_DATA") : this.notify("EVENT_DATA_CHANGE"));
		return this
	},
	formatIndex: function(b, c) {
		var d = this.data.length;
		0 > b ? b = (b + d) % d: b >= d && (b %= d);
		return b
	},
	play: function() {
		clearTimeout(this.timeoutId);
		if (null === this.prevIndex || this.data[this.currentIndex].loaded) this.pausedFrom = null,
		this.next(1, !0);
		return this
	},
	continuePlay: function() {
		var b = this.data[this.currentIndex],
		c = this;
		clearTimeout(this.timeoutId);
		this.options.stopNotFromUser = !0;
		this.notify("EVENT_CONTINUE_PLAY");
		this.timeoutId = setTimeout(function() {
			c.play()
		},
		b.timeout);
		return this
	},
	generateData: function(b, c) {
		var d = this.data.length,
		e, f;
		if (!0 === c && (0 > b || b >= d)) return null;
		b = (b + d) % d;
		f = this.data[b]; (e = f.loaded) || this.loader.loadData(b);
		d = this.dataCache[b].css({
			display: "block"
		});
		e ? (this.$data = d, this.setPosition(d)) : d.data("shouldResizeMe", !0);
		f = $("<a style='position: absolute;left: 0px;top: 0px;right: 0px;bottom: 0px;z-index: 2;margin: 0px;padding: 0px;'></a>").attr({
			href: f.action.content,
			target: f.action.target
		});
		e ? e = $("<div class='AsSliderDataWrapper' style='position: absolute;left: 0px;width: 100%;height: 100%;overflow: hidden;margin: 0px;padding: 0px;'></div>").transition3D().append(d).append(f) : (e = $("<div class='AsSliderDataWrapper' style='position: absolute;left: 0px;width: 100%;height: 100%;overflow: hidden;margin: 0px;padding: 0px;'></div>").transition3D().append(d.hide()), d.data("wrapper", e));
		return e
	},
	stop: function(b) {
		var c = this.options;
		"undefined" !== typeof b && null !== b && (c.stopNotFromUser = b);
		b = c.stopNotFromUser;
		this.options = c;
		b && !c.autoPlay || clearTimeout(this.timeoutId);
		return ! 0
	},
	notify: function(b) {
		var c = this.data,
		d = this.currentIndex,
		e = null;
		"string" !== typeof b && ($.extend(e, b), b = b.signal);
		e = $.extend({},
		{
			signal: b,
			engine: this,
			source: this,
			data: c,
			prev: this.prevIndex,
			current: d,
			extra: null
		},
		e);
		this.loader.loaded && this.loader.reset && this.loader.reset(e);
		"EVENT_DATA_CHANGE" === b && c[d].loaded && this.setTransition(e);
		return this
	},
	reset: function(b) {
		var c = b.signal || b,
		d = this.data,
		e = this.currentIndex,
		f = this.options;
		switch (c) {
		case "EVENT_DATA_CHANGE":
			this.play();
			break;
		case "EVENT_TRAN_END":
			f.firstTransition = !1;
			this.notify(c);
			f.stopNotFromUser && this.continuePlay();
			break;
		case "EVENT_DATA_LOADED":
			if (d[b.extra].loaded) break;
			d[b.extra].loaded = !0;
			d[b.extra].ok = !0;
			this.notify(b);
			c = this.dataCache[b.extra];
			d = null;
			c && c.data("shouldResizeMe") && (c.show().data("shouldResizeMe", null), d = c.data("wrapper"), c.data("wrapper", null), d.append(c));
			b.extra === e && this.skipTo(e, !0);
			break;
		case "EVENT_DATA_ERROR":
			if (d[b.extra].loaded) break;
			d[b.extra].loaded = !0;
			d[b.extra].error = !0;
			this.notify(b);
			b.extra === e && this.next(1);
			break;
		default:
			this.notify(b)
		}
		return this
	},
	setTransition: function(b) {
		var c = this.prevIndex,
		d = this.options;
		d.firstTransition || 0 <= c && this.data[c].loading ? this.currentTransition = this.first: this.transition && (this.currentTransition = this.transition);
		this.timeoutId = null;
		d.firstTransition && this.loader.loadData(0);
		this.notify("EVENT_TRAN_START");
		this.currentTransition(b);
		return this
	},
	setPosition: function(b) {
		var c = this.$dataContainer.width(),
		d = this.$dataContainer.height(),
		e = this.loader.source[this.currentIndex].originSize.width / this.loader.source[this.currentIndex].originSize.height,
		f = d * e,
		g = c / e,
		h,
		k,
		l,
		m;
		f > c ? (h = c, k = g, l = 0, m = (d - g) / 2) : g > d ? (h = f, k = d, l = (c - f) / 2, m = 0) : f / g == e && (h = f, k = g, m = l = 0);
		b.css({
			position: "absolute",
			width: h,
			height: k,
			left: l,
			top: m
		})
	},
	first: function(b) {
		var c = b.current,
		d = b.engine.$dataContainer,
		e = d.find(".AsSliderDataWrapper");
		b.engine.generateData(c).appendTo(d);
		e.remove();
		b.engine.reset("EVENT_TRAN_END")
	},
	transition: function(b) {
		var c = b.engine.$dataContainer,
		d = b.current,
		e = $.extend({},
		{
			easing: "linear"
		},
		b.data[d].effect),
		f = this.$nextDiv = b.engine.generateData(d).css({
			left: "100%"
		}),
		g = this.$prevDiv = c.find(".AsSliderDataWrapper");
		c.prepend(f);
		var h = 0;
		g.stop(!0, !0).animate({
			left: "-100%"
		},
		e.duration, e.easing,
		function() {
			h++;
			2 === h && (g.remove(), f.css({
				left: "0%",
				top: "0%"
			}), b.engine.reset("EVENT_TRAN_END"))
		});
		f.stop(!0, !0).animate({
			left: "0%"
		},
		e.duration, e.easing,
		function() {
			h++;
			2 === h && (g.remove(), $(this).css({
				left: "0%",
				top: "0%"
			}), b.engine.reset("EVENT_TRAN_END"))
		})
	},
	createThumb: function() {
		var b = this,
		c = this.data.length,
		d = 0;
		if (! (1 >= c)) {
			this.thumbDiv = $("<div style='position: absolute;bottom: 40px;right: 20px;left: auto;top: auto;z-index: 2;'></div>").css({
				width: 13 * c + 2 * (c - 1),
				height: 15
			}).hide().appendTo(this.$container);
			for (var e = 0; e < c; e++) {
				var f = $("<div style='position: absolute;width: 20px;height: 20px;cursor: pointer;'></div>").css({
					borderRadius: 7,
					border: "1px solid #cccccc",
					textAlign: "center",
					lineHeight: "13px",
					width: 13,
					height: 13,
					fontFamily: "Arial, serif, Tahoma",
					fontSize: "60%",
					backgroundColor: "#eeeeee",
					left: d,
					top: 0
				}).attr("id", "sliderThumb_" + e).html(e + 1).appendTo(this.thumbDiv),
				d = d + 2 + 13 + 2; (function(c) {
					f.on("click",
					function(d) {
						c !== b.currentIndex && (d.stopPropagation(), b.stop(!0), b.skipTo(c))
					})
				})(e)
			}
			this.thumbDiv.css({
				width: d - 2
			});
			$("#sliderThumb_0").css({
				backgroundColor: "#E69696"
			})
		}
	},
	setThumbPosition: function() {
		for (var b = this.$container.width(), c = this.$container.height(), d = this.loader.source, e = [], f = 0; f < d.length; f++) {
			var g = d[f].originSize.width / d[f].originSize.height;
			if (b / g > c) return 20;
			e[f] = b / g
		}
		b = Math.max.apply(Math, e);
		return (c - b) / 2 + 20
	},
	skipToThumb: function(b) {
		this.thumbDiv && this.thumbDiv.children().css({
			backgroundColor: "#eeeeee"
		});
		$("#sliderThumb_" + b).css({
			backgroundColor: "#E69696"
		})
	},
	resize: function() {
		this.$container.css({
			width: this.$template.width() - this.options.paddingLeft - this.options.paddingRight,
			height: this.$template.height() - this.options.paddingTop - this.options.paddingBottom
		});
		this.stop(!1);
		this.setPosition(this.$data);
		this.continuePlay()
	},
	loadAll: function() {
		for (var b = !0,
		c = this.data,
		d = 0; d < c.length; d++) b = b && c[d].loaded;
		return b
	}
});
bdor[23] = ".";
var HTML5AdLoading = Class({
	create: function(b) {
		var c = b.data;
		this.preloadSize = b && b.preloadSize ? b.preloadSize: b.data.length;
		this.$cache = Array(c.length);
		this.engine = b.engine;
		this.source = c;
		this.loaded = !0;
		this.engine.dataCache = this.$cache;
		this.loadData(0);
		return this
	},
	loadData: function(b, c) {
		var d = this.$cache,
		e = this.source,
		f = [],
		g = d.length,
		h = this;
		c ? c < b && (c = b + this.preloadSize) : (c = b + this.preloadSize, b = Math.max(b - this.preloadSize, 0));
		c = c >= g ? g - 1 : c;
		for (var k = 0 > b ? 0 : b; k <= c; ++k) f.push(k);
		k = 0;
		for (g = f.length; k < g; ++k) {
			var l = f[k],
			m = d[l],
			p = e[l],
			n = null;
			m || (m = d[l] = $("<img />"), p.loaded = !1, p.loading = !0, n = $(new Image), n.one({
				load: function(b) {
					return function() {
						h.reset({
							signal: "EVENT_IMG_LOADED",
							extra: b
						})
					}
				} (l),
				error: function(b) {
					return function() {
						h.reset({
							signal: "EVENT_IMG_ERROR",
							extra: b
						})
					}
				} (l)
			}), e[l].originalData = n[0], n.attr("src", p.src), m.attr("src", p.src), n = null);
			m = null
		}
	},
	reset: function(b) {
		var c = b.current,
		d = this.$cache,
		e = this.source,
		f = (b.current - 1 + d.length) % d.length,
		g = (f - 1 + d.length) % d.length,
		h = (b.current + 1) % d.length,
		k = (h + 1) % d.length,
		l = b.extra,
		e = this.source,
		m = this.engine,
		p = null;
		switch (b.signal) {
		case "EVENT_LOAD_DATA":
		case "EVENT_DATA_CHANGE":
			d[h] && d[c] && d[k] && d[f] && d[g] || this.loadData(c);
			break;
		case "EVENT_IMG_LOADED":
			p = e[l].originalData;
			e[l].loading = !1;
			this.source[l].originSize = {
				width: p.width,
				height: p.height
			};
			b.signal = "EVENT_DATA_LOADED";
			b.source = this;
			b.data = this.source;
			m.reset(b);
			break;
		case "EVENT_IMG_ERROR":
			b.signal = "EVENT_DATA_ERROR",
			this.source[l].originSize = {
				width: 18,
				height: 20
			},
			b.source = this,
			b.data = this.source,
			e[l].loading = !1,
			m.reset(b)
		}
	}
}); (function(b, c, d) {
	function e(b) {
		return document.createElementNS("http://www.w3.org/2000/svg", b)
	}
	function f(c) {
		if (document.getElementsByTagName("body")[0].contains(c)) {
			var d, e;
			d = c.parentNode;
			var f = c.style,
			g = b(c);
			e = 100 / d.offsetHeight;
			d = 100 / d.offsetWidth;
			f.width = g.width() * d + "%";
			f.height = g.height() * e + "%";
			f.left = c.offsetLeft * d + "%";
			f.top = c.offsetTop * e + "%"
		}
	}
	function g() {
		var b = e("svg");
		b.setAttribute("version", "1.1");
		b.setAttribute("xmlns", "http://www.w3.org/2000/svg");
		b.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
		return b
	}
	function h(b, c) {
		var d, e, f, g = [];
		f = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
		c = c || f.length;
		if (b) for (d = 0; d < b; d++) g[d] = f[0 | Math.random() * c];
		else for (g[8] = g[13] = g[18] = g[23] = "-", g[14] = "4", d = 0; 36 > d; d++) g[d] || (e = 0 | 16 * Math.random(), g[d] = f[19 == d ? e & 3 | 8 : e]);
		return g.join("")
	}
	var k, l = new(c({
		create: function() {
			var c, d, e, f, g = this,
			h = "#FF0000 #FF5555 #FF55AA #FF55FF #FFAA55 #FFAAAA #FFAAFF #FFFF55 #FFFFAA #FFFFFF #CC0000 #CC5555 #CC55AA #CC55FF #CCAA55 #CCAAAA #CCAAFF #CCFF55 #CCFFAA #CCFFFF #AA0000 #AA5555 #AA55AA #AA55FF #AAAA55 #AAAAAA #AAAAFF #AAFF55 #AAFFAA #AAFFFF #880000 #885555 #8855AA #8855FF #88AA55 #88AAAA #88AAFF #88FF55 #88FFAA #88FFFF #550000 #555555 #5555AA #5555FF #55AA55 #55AAAA #55AAFF #55FF55 #55FFAA #55FFFF #220000 #225555 #2255AA #2255FF #22AA55 #22AAAA #22AAFF #22FF55 #22FFAA #22FFFF #000000 #005555 #0055AA #0055FF #00AA55 #00AAAA #00AAFF #00FF55 #00FFAA #00FFFF".split(" "),
			k = document.createElement("table");
			c = g.container = document.createElement("a");
			var l = g.$container = b(c),
			m = document.createElement("input"),
			n = function() {
				m.value = m.style.backgroundColor = this.title.toUpperCase()
			},
			p = function() {
				l.trigger("colorSelected", [g.parseColorToRGBA(this.title, g.opacityValue)]);
				l.hide()
			};
			c.className = "flipHtml5AnnotationColorSelectorWrap";
			k.setAttribute("border", "1");
			c.style.display = "none";
			c.setAttribute("href", " javaScript:void(0)".replace(/\s+/g, ""));
			m.className = "flipHtml5AnnotationColorSelectorMessage";
			m.value = "#000000";
			m.setAttribute("disabled", "true");
			c.appendChild(m);
			c.appendChild(g.createOpacityBar());
			c.appendChild(k);
			g.setOpacity(1);
			for (e = 0; 7 > e; e++) {
				f = document.createElement("tr");
				for (d = 0; 10 > d; d++) c = document.createElement("td"),
				c.className = "flipHtml5AnnotationColorSelectorBlock",
				c.title = h[10 * e + d],
				c.style.backgroundColor = h[10 * e + d],
				b(c).on("mouseenter", n),
				b(c).on("click", p),
				f.appendChild(c);
				k.appendChild(f)
			}
			l.on("click",
			function(b) {
				b.stopPropagation()
			});
			b(document).on("click",
			function() {
				g.hide()
			})
		},
		parseColorToRGBA: function(b, c) {
			var d, e, f;
			c = parseFloat(c);
			1 <= c && (c = 1);
			0 >= c && (c = 0);
			d = parseInt(b.substring(1, 3), 16);
			e = parseInt(b.substring(3, 5), 16);
			f = parseInt(b.substring(5, 7), 16);
			return "rgba(" + d + "," + e + "," + f + "," + c + ")"
		},
		createOpacityBar: function() {
			var c, d, e, f = this,
			g = Math.floor,
			h = document.createElement("div"),
			k = f.cursor = document.createElement("div"),
			l = f.span = document.createElement("span"),
			m = this.px = "px",
			n = this.str = "Opacity: ",
			p = this.length = 145,
			q = b(document),
			s = b(k),
			r = f.$container;
			l.className = "flipHtml5AnnotationOpacitySpan";
			h.className = "flipHtml5AnnotationOpacity";
			k.className = "flipHtml5AnnotationOpacityCursor";
			h.appendChild(l);
			h.appendChild(k);
			s.on("mousedown touchstart",
			function(b) {
				b.preventDefault();
				var h, s = f.opacityValue,
				u = k.style,
				w = parseInt(u.left || 0, 10);
				c = w;
				d = w - (b.pageX ? b.pageX: b.originalEvent.touches ? b.originalEvent.touches[0].pageX: 0);
				q.on("mousemove.flipHtml5AnnotationOpacity touchmove.flipHtml5AnnotationOpacity",
				function(f) {
					b.preventDefault();
					if (h = f.pageX ? f.pageX: f.originalEvent.touches ? f.originalEvent.touches[0].pageX: 0) e = g(d + h),
					0 > e && (e = 0),
					e > p && (e = p),
					c !== e && (u.left = e + m, l.innerHTML = n + (e / p).toFixed(2), s = e / p),
					r.trigger("opacityChanged", s.toFixed(2))
				});
				q.off("mouseup.opacityCursor touchend.opacityCursor").one("mouseup.opacityCursor touchend.opacityCursor",
				function() {
					f.opacityValue = s;
					q.off("mousemove.flipHtml5AnnotationOpacity touchmove.flipHtml5AnnotationOpacity")
				})
			});
			return h
		},
		setOpacity: function(b) {
			if (void 0 === b || 1 < b || isNaN(b)) b = 1;
			0 > b && (b = 0);
			this.cursor.style.left = b * this.length + this.px;
			this.span.innerHTML = this.str + b;
			this.opacityValue = b
		},
		on: function(b, c) {
			this.$container.off(b).on(b, c);
			return this
		},
		show: function() {
			this.$container.show();
			return this
		},
		hide: function() {
			this.$container.hide();
			return this
		}
	})),
	m = c({
		create: function(c) {
			var d = 0,
			e = c[d];
			this.container = document.createElement("div");
			this.$container = b(this.container);
			this.tools = {};
			for (this.container.className = "fliphtml5AnnotationLineToolsContainer"; e;) this.$container.append(this.createButtonByName(e)),
			d++,
			e = c[d];
			b(document).ready(function() {
				document.getElementsByTagName("body")[0].appendChild(this.container)
			}.bind(this));
			this.oneBindEvent()
		},
		createButtonByName: function(b) {
			var c = this,
			d, e;
			switch (b) {
			case "fill":
				this.tools.fill = {
					type: "color",
					container: d = c.createColorButton("fill", !1)
				};
				break;
			case "stroke":
				this.tools.stroke = {
					type: "color",
					container: d = c.createColorButton("stroke", !1)
				};
				break;
			case "stroke-dasharray":
				d = ["Straight", "Dotted", "Dashed", "Dotted & Dashed"];
				e = ["1", "2", "3", "4"];
				this.tools.strokeDasharray = {
					type: "select",
					value: e,
					container: d = c.createSelect(d, e, "stroke-dasharray", !1, 0)
				};
				break;
			case "stroke-width":
				d = "Thinnest Thinner Thin MediumThin Medium MediumStrong Strong Stronger Strongest".split(" ");
				e = "1 2 3 4 5 7 9 12 16".split(" ");
				this.tools.strokeWidth = {
					type: "select",
					value: e,
					container: d = c.createSelect(d, e, "stroke-width", !1, 1)
				};
				break;
			case "headArrowType":
				d = "None Long_triangle Long_triangle_inverse Short_triangle Short_triangle_inverse Angle_brackets Angle_brackets_inverse Ellipse Rect Right_bank Line Left_bank".split(" ");
				e = "0 1 2 3 4 5 6 7 8 9 10 11".split(" ");
				this.tools.headArrowType = {
					type: "select",
					value: e,
					container: d = c.createSelect(d, e, b, !1, 6)
				};
				break;
			case "endArrowType":
				d = "None Long_triangle Long_triangle_inverse Short_triangle Short_triangle_inverse Angle_brackets Angle_brackets_inverse Ellipse Rect Right_bank Line Left_bank".split(" ");
				e = "0 1 2 3 4 5 6 7 8 9 10 11".split(" ");
				this.tools.endArrowType = {
					type: "select",
					value: e,
					container: d = c.createSelect(d, e, b, !1, 11)
				};
				break;
			default:
				d = c.createButton(b),
				c.addClickEvent(d,
				function() {
					c.exec(b)
				})
			}
			return d
		},
		createButton: function(b) {
			var c = document.createElement("a"),
			d = document.createElement("div");
			c.href = " javascript:void(0);".replace(/\s+/g, "");
			d.className = "flipHtml5AnnotationButtonImage flipHtml5AnnotationImage-" + b;
			d.title = b;
			c.appendChild(d);
			return c
		},
		addClickEvent: function(b, c) {
			b.className = "flipHtml5AnnotationClickButton";
			b.onclick = c
		},
		exec: function(b, c) {
			if (this.object) switch (b) {
			case "stroke":
				this.object.setStroke(c);
				break;
			case "stroke-dasharray":
				this.object.setDashArray(c);
				break;
			case "stroke-width":
				this.object.setStrokeWidth(c);
				break;
			case "fill":
				this.object.setFill(c);
				break;
			case "delete":
				this.object.destroy();
				k.save();
				break;
			case "headArrowType":
			case "endArrowType":
				this.object.setArrowType(b, c)
			}
		},
		oneBindEvent: function() {
			var c = this;
			b(document).on("keydown.flipHtml5AnnotationDelete",
			function(b) {
				var d = b.keyCode;
				b.altKey || b.ctrlKey || b.shiftKey || (c.editing && d === KEY_CODE_DELETE && c.currentEditor && (this.object.destroy(), k.save()), c.currentEditor && d === KEY_CODE_LEFT && d === KEY_CODE_RIGHT && d === KEY_CODE_UP && d === KEY_CODE_DOWN && b.stopPropagation())
			})
		},
		createColorButton: function(b, c) {
			var d = this,
			e, f = this.createButton(b),
			g = f.getElementsByTagName("div")[0];
			c && (e = document.createElement("div"), e.className = "flipHtml5AnnotationColorBar", f.appendChild(e));
			d.addClickEvent(f,
			function(c) {
				c.stopPropagation();
				l.container.style.left = this.offsetLeft + "px";
				l.container.style.top = this.offsetTop + 20 + "px";
				l.show();
				l.on("colorSelected",
				function(c, f) {
					e ? e.style.backgroundColor = f: g.style.backgroundColor = f;
					d.exec(b, f)
				});
				l.setOpacity(d.object.getOpacity(b));
				l.on("opacityChanged",
				function(c, e) {
					d.object.setOpacity(b, e)
				})
			});
			return f
		},
		createSelect: function(b, c, d, e, f) {
			var g = document.createElement("select"),
			h = 0,
			k = this,
			l;
			g.className = "flipHtml5AnnotationSelect flipHtml5Annotation-" + d;
			for (e && (g.style[e] = c[f]); b[h];) l = document.createElement("option"),
			l.className = "flipHtml5AnnotationOption-" + d + " flipHtml5AnnotationOption-" + c[h],
			l.innerHTML = b[h],
			e && (l.style[e] = c[h]),
			h === f && l.setAttribute("selected", !0),
			g.appendChild(l),
			h++;
			g.onchange = function() {
				k.exec(d, c[this.selectedIndex]);
				e && (this.style[e] = c[this.selectedIndex])
			};
			return g
		},
		active: function(b) {
			if (b) {
				var c, d;
				this.object = b;
				b.toolbar.$container.append(l.container);
				for (c in this.tools) this.tools.hasOwnProperty(c) && (d = this.tools[c], "color" === d.type && (d.container.getElementsByTagName("div")[0].style.backgroundColor = b[c]), "select" === d.type && (d.container.selectedIndex = d.value.indexOf(b[c].toString())))
			}
			this.container.style.display = "block"
		},
		inactive: function() {
			this.container.style.display = "none";
			this.object = null
		}
	}),
	p = new m("stroke-width stroke-dasharray headArrowType endArrowType stroke delete".split(" ")),
	n = new m(["stroke-width", "stroke-dasharray", "stroke", "delete"]),
	q = new m(["stroke-width", "stroke-dasharray", "stroke", "fill", "delete"]),
	s = new(c({
		create: function() {
			var c, d = 1,
			e = this.sizeWrap = document.createElement("div"),
			f = this.sizePointArray = [];
			for (e.className = "flipHtml5AnnotationSizeWrap"; 9 > d;) c = document.createElement("div"),
			c.className = "flipHtml5SizePoint flipHtml5SizePoint" + d,
			e.appendChild(c),
			f.push(c),
			d++;
			this.$container = b(e);
			this.container = e
		},
		addEvents: function(c) {
			var e = this,
			g = e.sizeWrap,
			h = e.sizePointArray;
			e.sizeWrapStyle = g.style;
			c && (e.$context = c.add(q.$container).add(n.$container).add(p.$container));
			e.northResize(h[0]).westResize(h[0]);
			e.northResize(h[1]);
			e.eastResize(h[2]).northResize(h[2]);
			e.eastResize(h[3]);
			e.eastResize(h[4]).southResize(h[4]);
			e.southResize(h[5]);
			e.southResize(h[6]).westResize(h[6]);
			e.westResize(h[7]);
			b(g).off("mousedown touchstart").on("mousedown touchstart",
			function(b) {
				b.preventDefault();
				var c, h, k, l, m, n, p, t = Math.floor,
				q = e.sizeWrapStyle,
				s = g.offsetLeft,
				r = g.offsetTop,
				u = b.pageX || b.originalEvent.touches[0].pageX,
				w = b.pageY || b.originalEvent.touches[0].pageY;
				c = e.$context;
				c.off("mousemove.flipHtml5SizeWrap touchmove.flipHtml5SizeWrap").on("mousemove.flipHtml5SizeWrap touchmove.flipHtml5SizeWrap",
				function(b) {
					b.preventDefault();
					b.stopPropagation();
					h = b.pageX ? b.pageX: b.originalEvent.touches ? b.originalEvent.touches[0].pageX: 0;
					k = b.pageY ? b.pageY: b.originalEvent.touches ? b.originalEvent.touches[0].pageY: 0;
					if (h && (p = t(s - (u - h) / d.scale()), m !== p && (q.left = p + "px", m = p, e.onResize))) e.onResize(void 0, void 0, p, void 0);
					if (k && (n = t(r - (w - k) / d.scale()), l !== n && (q.top = n + "px", l = n, e.onResize))) e.onResize(void 0, void 0, void 0, n)
				});
				e.$container.one("mouseup touchend",
				function(b) {
					c.off("mousemove.flipHtml5SizeWrap touchmove.flipHtml5SizeWrap");
					f(g);
					if (e.onResizeEnd) e.onResizeEnd()
				})
			})
		},
		northResize: function(c) {
			var e = this;
			b(c).off("mousedown.north touchstart.north").on("mousedown.north touchstart.north",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				var c, g, h, k, l = Math.floor,
				m = e.sizeWrap,
				n = m.offsetTop,
				p = e.sizeWrapStyle,
				t = e.$context,
				q = m.offsetHeight || 11,
				s = n + q - 11,
				r = b.pageY || b.orginalEvent.touches[0].pageY;
				g = q;
				e.$container.one("mouseup touchend",
				function() {
					t.off("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize");
					f(m);
					if (e.onResizeEnd) e.onResizeEnd()
				});
				t.on("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize",
				function(b) {
					b.preventDefault();
					b.pageY ? c = b.pageY: b.originalEvent.touches && (c = b.originalEvent.touches[0].pageY);
					if (c && (h = l(g + (r - c) / d.scale()), q !== h && (k = n + (g - h), 11 > h && (h = 11), k > s && (k = s), p.top = k + "px", p.height = h + "px", q = h, e.onResize))) e.onResize(void 0, h, void 0, k)
				})
			});
			return this
		},
		westResize: function(c) {
			var e = this;
			b(c).off("mousedown.west touchstart.west").on("mousedown.west touchstart.west",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				var c, g, h, k, l = Math.floor,
				m = e.$context,
				n = e.sizeWrap,
				p = n.offsetLeft,
				t = e.sizeWrapStyle,
				q = n.offsetWidth || 11,
				s = p + q - 11,
				r = b.pageX || b.originalEvent.touches[0].pageX;
				h = q;
				e.$container.one("mouseup touchend",
				function() {
					m.off("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize");
					f(n);
					if (e.onResizeEnd) e.onResizeEnd()
				});
				m.on("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize",
				function(b) {
					b.preventDefault();
					b.pageX ? c = b.pageX: b.originalEvent.touches && (c = b.originalEvent.touches[0].pageX);
					if (c && (g = -l((c - r) / d.scale() - h), q !== g && (k = p + (h - g), 11 > g && (g = 11), k > s && (k = s), t.left = k + "px", t.width = g + "px", q = g, e.onResize))) e.onResize(g, void 0, k, void 0)
				})
			});
			return this
		},
		eastResize: function(c) {
			var e = this;
			b(c).off("mousedown.east touchstart.east").on("mousedown.east touchstart.east",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				var c, g, h, k = Math.floor,
				l = e.$context,
				m = e.sizeWrap,
				n = e.sizeWrapStyle,
				p = m.offsetWidth || 11,
				t = b.pageX || b.originalEvent.touches[0].pageX;
				e.$container.one("mouseup touchend",
				function() {
					l.off("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize");
					f(m);
					if (e.onResizeEnd) e.onResizeEnd()
				});
				l.on("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize",
				function(b) {
					b.preventDefault();
					b.pageX ? c = b.pageX: b.originalEvent.touches && (c = b.originalEvent.touches[0].pageX);
					if (c && (g = k(p - (t - c) / d.scale()), h !== g && (11 > g && (g = 11), n.width = g + "px", h = g, e.onResize))) e.onResize(g, void 0, void 0, void 0)
				})
			});
			return this
		},
		southResize: function(c) {
			var e = this;
			b(c).off("mousedown.south touchstart.south").on("mousedown.south touchstart.south",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				var c, g, h, k = Math.floor,
				l = e.$context,
				m = e.sizeWrap,
				n = e.sizeWrapStyle,
				p = m.offsetHeight,
				t = b.pageY || b.originalEvent.touches[0].pageY;
				e.$container.one("mouseup touchend",
				function() {
					l.off("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize");
					f(m);
					if (e.onResizeEnd) e.onResizeEnd()
				});
				l.on("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize",
				function(b) {
					b.preventDefault();
					b.pageY ? c = b.pageY: b.originalEvent.touches && (c = b.originalEvent.touches[0].pageY);
					if (c && (g = k(p - (t - c) / d.scale()), h !== g && (11 > g && (g = 11), n.height = g + "px", h = g, e.onResize))) e.onResize(void 0, g, void 0, void 0)
				})
			});
			return this
		},
		onResizeEnd: function() {},
		onResize: function(b, c, d, e) {},
		active: function() {
			this.container.style.display = "block";
			this.$container.on("click.sizewrap mousedown.sizewrap mouseup.sizewrap",
			function(b) {
				b.stopPropagation()
			})
		},
		inactive: function() {
			this.$container.off("click.sizewrap mousedown.sizewrap mouseup.sizewrap");
			this.container.style.display = "none"
		}
	})),
	r = c({
		create: function(c, d) {
			var e = this.svg = g(),
			f = this.container = document.createElement("div");
			c = c || [];
			this.$parent = d;
			e.style.position = "absolute";
			e.style.left = "0";
			e.style.top = "0";
			e.style.width = "100%";
			e.style.height = "100%";
			this.id = h(8, 10);
			this.$container = b(f);
			f.className = "flipHtml5SVGContainer";
			f.appendChild(e);
			d && (this._width = c[0] || 0, this._height = c[1] || 0, this._left = c[2] || 0, this._top = c[3] || 0);
			f.style.width = c[0] || 0;
			f.style.height = c[1] || 0;
			f.style.left = c[2] || 0;
			f.style.top = c[3] || 0;
			d && (this.prevWidth = parseFloat(c[0]) * d[0].offsetWidth / 100, this.prevHeight = parseFloat(c[1]) * d[0].offsetHeight / 100, this.prevLeft = parseFloat(c[2]) * d[0].offsetWidth / 100, this.prevTop = parseFloat(c[3]) * d[0].offsetHeight / 100);
			this.fill = c[4] || "transparent";
			this.fillOpacity = c[5] || 1;
			this.stroke = c[6] || "rgba(0, 0, 0, 1)";
			this.strokeDasharray = c[7] || "1";
			this.strokeOpacity = c[8] || "1";
			this.strokeWidth = c[9] || "2";
			this.createGraphics(c);
			this.setStrokeWidth(this.strokeWidth);
			this.setFill(this.fill);
			this.setFillOpacity(this.fillOpacity);
			this.setStroke(this.stroke);
			this.setDashArray(this.strokeDasharray);
			this.setStrokeOpacity(this.strokeOpacity);
			this.actived = !1;
			this.$container.on(_event._down,
			function(b) {
				b.stopPropagation();
				this.actived || (this.active(this.$parent), this.actived = !0)
			}.bind(this));
			if (d) this.$container.on("mousedown mouseup",
			function(b) {
				b.stopPropagation()
			})
		},
		active: function(b) {
			var c = this;
			k.activedShape && k.activedShape.inactive();
			k.activedShape = this;
			c.$container.after(s.$container);
			c.position();
			b && (c.$parent = b);
			s.addEvents(c.$parent);
			s.active();
			c.toolbar.active(c);
			if (b) b.off("mousedown.flipHtml5Graphic" + c.id + " touchstart.flipHtml5Graphic" + c.id).on("mousedown.flipHtml5Graphic" + c.id + " touchstart.flipHtml5Graphic" + c.id,
			function(d) {
				c.actived && d.target !== c.container && d.target !== c.toolbar.container && d.target !== s.container && (d.stopPropagation(), b.off("mousedown.flipHtml5Graphic" + c.id + " touchstart.flipHtml5Graphic" + c.id), c.inactive())
			});
			this.actived = !0
		},
		_parsePresentValue: function() {
			f(this.container);
			var b = this.container.style;
			this._width = b.width;
			this._height = b.height;
			this._left = b.left;
			this._top = b.top
		},
		inactive: function() {
			k && (k.save(), k.activedShape = null);
			this.toolbar.inactive();
			s.inactive();
			this.actived = !1
		},
		position: function() {
			var b = this,
			c = b.px,
			d = b.container,
			e = b.$container,
			f = s.container.style,
			g = b.toolbar.container.style;
			f.width = d.offsetWidth + 8 + c;
			f.height = d.offsetHeight + 8 + c;
			f.left = d.offsetLeft - 3 + c;
			f.top = d.offsetTop - 4 + c;
			g.left = e.offset().left - 8 + c;
			g.top = e.offset().top - 52 + c;
			s.onResize = function(d, f, h, k) {
				b.css(d - 8, f - 8, h + 3, k + 4);
				g.left = e.offset().left - 8 + c;
				g.top = e.offset().top - 52 + c
			};
			s.onResizeEnd = function() {
				b._parsePresentValue();
				k.save()
			}
		},
		setFill: function(b) {
			this.setStyle("fill", b);
			this.fill = b
		},
		setFillOpacity: function(b) {
			this.setStyle("fill", this.fill.replace(/,[0-9]+(\.[0-9]*)?\)/, "," + b + ")"));
			this.fillOpacity = parseFloat(b)
		},
		setStroke: function(b) {
			this.setStyle("stroke", b);
			this.stroke = b
		},
		setStrokeOpacity: function(b) {
			this.setStyle("stroke", this.stroke.replace(/,[0-9]+(\.[0-9]*)?\)/, "," + b + ")"));
			this.strokeOpacity = parseFloat(b)
		},
		setOpacity: function(b, c) {
			"fill" === b && this.setFillOpacity(c);
			"stroke" === b && this.setStrokeOpacity(c)
		},
		getOpacity: function(b) {
			return "fill" === b ? this.fillOpacity: this.strokeOpacity
		},
		setStrokeWidth: function(b) {
			this.setStyle("stroke-width", b);
			this.strokeWidth = parseInt(b, 10);
			this.setDashArray(this.strokeDasharray);
			this.shapeCss(this.prevWidth, this.prevHeight)
		},
		setDashArray: function(b) {
			this.strokeDasharray = b;
			b = "1" === b ? "0": "2" === b ? "1," + 2 * this.strokeWidth: "3" === b ? "1," + 2 * this.strokeWidth + ",1": 4 * this.strokeWidth + "," + 2 * this.strokeWidth + ",1," + 2 * this.strokeWidth;
			this.setStyle("stroke-dasharray", b)
		},
		shapeCss: function(b, c) {},
		css: function(b, c, d, e) {
			var f = this.container.style;
			b = Math.floor(b);
			d = Math.floor(d);
			c = Math.floor(c);
			e = Math.floor(e);
			b && (this.prevWidth = b, b < this.minWidth && (b = this.minWidth), f.width = b + "px", this.shapeCss(b, null));
			c && (this.prevHeight = c, c < this.minHeight && (c = this.minHeight), f.height = c + "px", this.shapeCss(null, c));
			d && (f.left = d + "px", this.prevLeft = d);
			this.prevWidth < this.minWidth && (f.left = this.prevLeft - 4 - (this.minWidth - this.prevWidth - 8) / 2 + "px");
			e && (f.top = e + "px", this.prevTop = e);
			this.prevHeight < this.minHeight && (f.top = this.prevTop - 3 - (this.minHeight - this.prevHeight - 6) / 2 + "px")
		},
		destroy: function() {
			this.inactive();
			this.$container.remove();
			k.removeGraphic(this)
		}
	}),
	m = c({
		name: "line",
		toolbar: n,
		createGraphics: function(b) {
			var c = e("line");
			c.setAttribute("stroke-linecap", "round");
			c.setAttribute("stroke-linejoin", "round");
			this.italic = parseInt(b[10] || 1, 10);
			this.svg.appendChild(c);
			this.line = c;
			this.px = "px"
		},
		setStyle: function(b, c) { (c || 0 === c) && this.line.setAttribute(b, c);
			return this
		},
		setStrokeWidth: function(b) {
			b = parseInt(b, 10);
			this._super(b);
			this.minHeight = this.minWidth = b
		},
		draw: function(b, c, d, e, f, g, h) {
			var k = this.strokeWidth / 2,
			l = this.strokeWidth,
			m, n = c - b,
			p = e - d;
			c > b ? (m = n + l, f = b - f - k) : (m = -n + l, f = c - f - k);
			e > d ? (b = p + l, g = d - g - k) : (b = -p + l, g = e - g - k);
			0 < n && 0 < p && (this.italic = 1);
			0 > n && 0 < p && (this.italic = 2);
			0 > n && 0 > p && (this.italic = 3);
			0 < n && 0 > p && (this.italic = 4);
			this.css(m / h, b / h, f / h, g / h)
		},
		shapeCss: function(b, c) {
			var d, e;
			1 === this.italic || 3 === this.italic ? (d = "x1", e = "x2") : (d = "x2", e = "x1");
			this.setStyle(d, this.strokeWidth / 2);
			b && this.setStyle(e, b - this.strokeWidth / 2);
			this.setStyle("y1", this.strokeWidth / 2);
			c && this.setStyle("y2", c - this.strokeWidth / 2)
		}
	}).extend(r),
	w = c({
		name: "ellipse",
		toolbar: q,
		createGraphics: function(b) {
			this.ellipse = e("ellipse");
			this.svg.appendChild(this.ellipse);
			this.px = "px";
			this.ellipse.setAttribute("stroke-linecap", "round");
			this.ellipse.setAttribute("stroke-linejoin", "round");
			this.ellipse.setAttribute("cx", "50%");
			this.ellipse.setAttribute("cy", "50%");
			this.setFillOpacity(b[5] || "0.5")
		},
		setStyle: function(b, c) {
			this.ellipse.setAttribute(b, c);
			return this
		},
		setStrokeWidth: function(b) {
			b = parseInt(b, 10);
			this._super(b);
			this.minWidth = 2 * b;
			this.minHeight = 2 * b
		},
		draw: function(b, c, d, e, f, g, h) {
			var k = this.strokeWidth / 2,
			l = this.strokeWidth,
			m;
			c > b ? (m = c - b + l, f = b - f - k) : (m = b - c + l, f = c - f - k);
			e > d ? (b = e - d + l, g = d - g - k) : (b = d - e + l, g = e - g - k);
			this.css(m / h, b / h, f / h, g / h)
		},
		shapeCss: function(b, c) {
			b && this.setStyle("rx", b / 2 - this.strokeWidth / 2);
			c && this.setStyle("ry", c / 2 - this.strokeWidth / 2)
		}
	}).extend(r),
	r = c({
		name: "rect",
		toolbar: q,
		createGraphics: function() {
			this.rect = e("rect");
			this.rect.setAttribute("stroke-linecap", "round");
			this.rect.setAttribute("stroke-linejoin", "round");
			this.svg.appendChild(this.rect);
			this.px = "px"
		},
		setStrokeWidth: function(b) {
			b = parseInt(b, 10);
			this._super(b);
			this.setStyle("x", b / 2);
			this.setStyle("y", b / 2);
			this.minWidth = 2 * b;
			this.minHeight = 2 * b
		},
		setStyle: function(b, c) {
			this.rect.setAttribute(b, c);
			return this
		},
		draw: function(b, c, d, e, f, g, h) {
			var k = this.strokeWidth / 2,
			l = this.strokeWidth,
			m;
			c > b ? (m = c - b + l, f = b - f - k) : (m = b - c + l, f = c - f - k);
			e > d ? (b = e - d + l, g = d - g - k) : (b = d - e + l, g = e - g - k);
			this.css(m / h, b / h, f / h, g / h)
		},
		shapeCss: function(b, c) {
			b && this.setStyle("width", b - this.strokeWidth);
			c && this.setStyle("height", c - this.strokeWidth)
		}
	}).extend(r),
	u = c({
		create: function(c, d, f) {
			var h = this.svg = g(),
			k = this.path = e("path"),
			l = this.line = e("line"),
			m = this.rect = e("rect"),
			n = this.ellipse = e("ellipse");
			h.style.position = "absolute";
			l.style.display = "none";
			m.style.display = "none";
			n.style.display = "none";
			h.appendChild(m);
			h.appendChild(k);
			h.appendChild(l);
			h.appendChild(n);
			this.container = h;
			this.$container = b(h);
			n.setAttribute("cx", "50%");
			n.setAttribute("cy", "50%");
			this.setStyle("stroke-linecap", "round");
			this.setStyle("stroke-linejoin", "round");
			this.type = 0;
			this.inverse = "true" == d;
			this.position = c;
			this.currentType = "path";
			this.setCurrentType(f[10] || "path");
			this.backgroundTransparent = !1;
			this.deg = f[11] || 0;
			this.italic = parseInt(f[12] || 1, 10)
		},
		setStyle: function(b, c) {
			this.path.setAttribute(b, c);
			this.line.setAttribute(b, c);
			this.ellipse.setAttribute(b, c);
			this.rect.setAttribute(b, c)
		},
		setStrokeWidth: function(b) {
			var c = b = parseInt(b, 10);
			this.lineStrokeWidth = b;
			this.strokeWidth = c;
			this.setType(this.type);
			this.setPosition(this.deg, this.italic);
			this.setStyle("stroke-width", c)
		},
		getDegByItalic: function(b, c) {
			var d = this.inverse ? 180 : 0;
			switch (c) {
			case 1:
				b += d;
				break;
			case 2:
				b = 180 - b + d;
				break;
			case 3:
				b = 180 + b + d;
				break;
			case 4:
				b = 360 - b + d
			}
			return b
		},
		setPosition: function(b, c) {
			var d = this.svg.style,
			e = ( - this.width - this.lineStrokeWidth / 2) / 2 + "px",
			f = ( - this.height - this.lineStrokeWidth / 2) / 2 + "px";
			this.italic = c;
			this.deg = b;
			for (var g = "rotate(" + this.getDegByItalic(b, c) + "deg)", h = 0, k = this.svg.style, l = ["transform", "webkitTransform", "mozTransform", "msTransform"]; l[h];) k[l[h]] = g,
			h++;
			this.position && (c = (c + 2) % 4, 0 === c && (c = 4));
			switch (c) {
			case 1:
				d.left = "100%";
				d.top = "100%";
				d.right = "auto";
				d.bottom = "auto";
				d.margin = f + " auto auto " + e;
				break;
			case 2:
				d.left = "auto";
				d.top = "100%";
				d.right = "100%";
				d.bottom = "auto";
				d.margin = f + " " + e + " auto auto";
				break;
			case 3:
				d.left = "auto";
				d.top = "auto";
				d.right = "100%";
				d.bottom = "100%";
				d.margin = "auto " + e + " " + f + " auto";
				break;
			case 4:
				d.left = "100%",
				d.top = "auto",
				d.right = "auto",
				d.bottom = "100%",
				d.margin = "auto auto " + f + " " + e
			}
		},
		setCurrentType: function(b) {
			var c, d;
			b !== this.currentType && (c = this.svg.getElementsByTagName(b)[0], d = this.svg.getElementsByTagName(this.currentType)[0], this.currentType = b, d.style.display = "none", c.style.display = "block")
		},
		setType: function(b) {
			this.type = parseInt(b, 10);
			this.inverse = !1;
			var c, d;
			b = this.strokeWidth;
			var e = this.path,
			f = b / 2;
			switch (this.type) {
			case 0:
				this.setCurrentType("path");
				c = d = 0;
				break;
			case 2:
				this.inverse = !0;
			case 1:
				this.setCurrentType("path");
				d = 20 + 5 * b;
				c = 30 + 4 * b;
				this.backgroundTransparent = !1;
				e.setAttribute("d", "M " + f + " " + 0.3 * c + " L " + (d - b / 2) + " " + 0.5 * c + " L " + f + " " + 0.7 * c + " Z");
				break;
			case 4:
				this.inverse = !0;
			case 3:
				this.setCurrentType("path");
				this.backgroundTransparent = !1;
				d = 5 + 4 * b;
				c = 20 + 5 * b;
				e.setAttribute("d", "M " + f + " " + 0.2 * c + " L " + (d - f) + " " + 0.5 * c + " L " + f + " " + 0.8 * c + " Z");
				break;
			case 6:
				this.inverse = !0;
			case 5:
				this.setCurrentType("path");
				this.backgroundTransparent = !0;
				d = 10 + 4 * b;
				c = 30 + 3 * b;
				this.path.setAttribute("d", "M " + f + " " + 0.2 * c + " L " + (d - b) / 2 + " " + 0.5 * c + " L " + f + " " + 0.8 * c);
				break;
			case 7:
				this.setCurrentType("ellipse");
				this.backgroundTransparent = !1;
				d = c = 10 + 4 * b;
				this.ellipse.setAttribute("rx", d / 2 - f);
				this.ellipse.setAttribute("ry", c / 2 - f);
				break;
			case 8:
				this.setCurrentType("rect");
				this.backgroundTransparent = !1;
				d = c = 10 + 4 * b;
				this.rect.setAttribute("x", f);
				this.rect.setAttribute("y", f);
				this.rect.setAttribute("width", d - b);
				this.rect.setAttribute("height", c - b);
				break;
			case 9:
				this.setCurrentType("line");
				this.backgroundTransparent = !0;
				d = c = 10 + 4 * b;
				this.line.setAttribute("x1", f);
				this.line.setAttribute("y1", f);
				this.line.setAttribute("x2", d - f);
				this.line.setAttribute("y2", c - f);
				break;
			case 10:
				this.setCurrentType("line");
				this.backgroundTransparent = !0;
				d = c = 10 + 4 * b;
				this.line.setAttribute("x1", d / 2 - f);
				this.line.setAttribute("y1", f);
				this.line.setAttribute("x2", d / 2 - f);
				this.line.setAttribute("y1", c - f);
				break;
			case 11:
				this.setCurrentType("line"),
				this.backgroundTransparent = !0,
				d = c = 10 + 4 * b,
				this.line.setAttribute("x1", f),
				this.line.setAttribute("y2", f),
				this.line.setAttribute("x2", d - f),
				this.line.setAttribute("y1", c - f)
			}
			this.svg.setAttribute("width", d);
			this.svg.setAttribute("height", c);
			this.width = d;
			this.height = c;
			this.setColor(this.color);
			this.setPosition(this.deg, this.italic)
		},
		setColor: function(b) {
			this.color = b;
			this.setStyle("stroke", b);
			this.backgroundTransparent ? this.setStyle("fill", "transparent") : this.setStyle("fill", b)
		}
	}),
	y = c({
		name: "arrow",
		toolbar: p,
		createGraphics: function(b) {
			this._super(b);
			this.italic = parseInt(b[12] || 1, 10);
			this.headArrow = new u(!1, "false", b);
			this.endArrow = new u(!0, "false", b);
			this.deg = parseInt(b[11], 10);
			this.headArrow.setPosition(this.deg, this.italic);
			this.endArrow.setPosition(this.deg, this.italic);
			this.container.appendChild(this.headArrow.container);
			this.container.appendChild(this.endArrow.container);
			this.setStrokeWidth(b[9] || "1");
			this.setStroke(b[6] || "rgba(0, 0, 0, 1)");
			this.setArrowType("endArrowType", b[14] || 10);
			this.setArrowType("headArrowType", b[13] || 5)
		},
		setArrowType: function(b, c) {
			var d;
			"endArrowType" === b ? (d = this.endArrow, this.endArrowType = c) : (d = this.headArrow, this.headArrowType = c);
			d.setType(c);
			d.setStrokeWidth(this.strokeWidth)
		},
		setStroke: function(b) {
			this._super(b);
			this.headArrow.setColor(b);
			this.endArrow.setColor(b)
		},
		setStrokeWidth: function(b) {
			b = parseInt(b, 10);
			this._super(b);
			this.headArrow.setStrokeWidth(b);
			this.endArrow.setStrokeWidth(b)
		},
		css: function(b, c, d, e) {
			this._super(b, c, d, e);
			b = 180 * Math.atan(this.prevHeight / this.prevWidth) / Math.PI;
			this.prevHeight <= this.minHeight && (b = 0);
			this.prevWidth <= this.minWidth && (b = 90);
			this.deg = b;
			this.headArrow.setPosition(b, this.italic);
			this.endArrow.setPosition(b, this.italic)
		}
	}).extend(m),
	v = {
		shapes: {
			ellipse: w,
			rect: r,
			line: m,
			arrow: y
		},
		getShape: function(b, c, d) {
			return this.shapes[b] ? new this.shapes[b](c, d) : null
		}
	};
	c = c({
		create: function() {
			this.containerArray = {};
			this.graphics = {};
			this.activedShape = null
		},
		bindOnCreated: function(b, c) {
			this.onCreated = [b, c]
		},
		addEvent: function(b, c, e) {
			var f = this,
			g = v.getShape(e);
			this.containers = this.containers ? this.containers.add(c) : c;
			c.css("cursor", "crosshair");
			c.one("contextmenu.draw",
			function(b) {
				b.preventDefault();
				return ! 1
			});
			c.off("mousedown.draw touchstart.draw").one("mousedown.draw touchstart.draw",
			function(e) {
				e.stopPropagation();
				e.preventDefault();
				var h, k, l, m, n, p = e.button,
				q = c.offset().top,
				s = c.offset().left;
				if (!document.implementation.hasFeature("MouseEvents", "2.0")) switch (event.button) {
				case 0:
				case 1:
				case 3:
				case 5:
				case 7:
					p = 0;
					break;
				case 2:
				case 6:
					p = 2;
					break;
				case 4:
					p = 1
				}
				p ? (g._parsePresentValue(), f.delEvents(), f.popUpButton()) : (e.pageX ? (h = e.pageX, k = e.pageY) : e.originalEvent.touches && (n = !0, h = e.originalEvent.touches[0].pageX, k = e.originalEvent.touches[0].pageY), c.append(g.$container), f.groupGraphicByIndex(b, g), g.draw(h, h, k, k, s, q), c.off("mousemove.draw touchmove.draw").on("mousemove.draw touchmove.draw",
				function(b) {
					b.preventDefault();
					b.stopPropagation();
					n ? (l = b.originalEvent.touches[0].pageX, m = b.originalEvent.touches[0].pageY) : (l = b.pageX, m = b.pageY);
					g.draw(h, l, k, m, s, q, d.scale())
				}), c.off("mouseup.draw touchend.draw").one("mouseup.draw touchend.draw",
				function() {
					g._parsePresentValue();
					f.delEvents();
					f.popUpButton();
					g.active(c);
					g.$container.on("mousedown mouseup",
					function(b) {
						b.stopPropagation()
					});
					f.save()
				}))
			})
		},
		groupGraphicByIndex: function(b, c) {
			this.graphics[b] || (this.graphics[b] = []);
			this.graphics[b].push(c)
		},
		removeGraphicByIndex: function(b) {
			var c, d = this.graphics,
			e, f;
			for (c in d) if (d.hasOwnProperty(c) && c == b) {
				f = d[c];
				for (e = 0; f[e];) f[e].$container.remove(),
				e++;
				d[c] = []
			}
		},
		removeGraphic: function(b) {
			var c, d, e, f = this.graphics;
			for (d in f) if (f.hasOwnProperty(d) && f[d]) for (c = 0, e = f[d]; e[c];) e[c] === b && e.splice(c, 1),
			c++
		},
		popUpButton: function() {
			this.onCreated && this.onCreated[1].call(this.onCreated[0])
		},
		delEvents: function() {
			this.containers && this.containers.off("mousedown.draw touchstart.draw contextmenu.draw mousemove.draw touchmove.draw").css("cursor", "auto");
			this.containers = null
		},
		getPageContent: function(b) {
			for (var c, d = 0,
			e, f, g, h, k = this.graphics[b]; k && (c = k[d]);) {
				switch (c.name) {
				case "line":
					b = [c._width, c._height, c._left, c._top, c.fill, c.fillOpacity, c.stroke, c.strokeDasharray, c.strokeOpacity, c.strokeWidth, c.italic];
					e || (e = []);
					e.push(b.join("$$"));
					break;
				case "arrow":
					b = [c._width, c._height, c._left, c._top, c.fill, c.fillOpacity, c.stroke, c.strokeDasharray, c.strokeOpacity, c.strokeWidth, c.currentType, c.deg, c.italic, c.headArrowType, c.endArrowType];
					f || (f = []);
					f.push(b.join("$$"));
					break;
				case "rect":
					b = [c._width, c._height, c._left, c._top, c.fill, c.fillOpacity, c.stroke, c.strokeDasharray, c.strokeOpacity, c.strokeWidth];
					g || (g = []);
					g.push(b.join("$$"));
					break;
				case "ellipse":
					b = [c._width, c._height, c._left, c._top, c.fill, c.fillOpacity, c.stroke, c.strokeDasharray, c.strokeOpacity, c.strokeWidth],
					h || (h = []),
					h.push(b.join("$$"))
				}
				d++
			}
			b = [e && e.join("@@"), f && f.join("@@"), g && g.join("@@"), h && h.join("@@")];
			return b.join("##")
		},
		saveByIndex: function(b) {
			var c = new Date,
			d = this.getPageContent(b) || "";
			try {
				window.localStorage ? (window.localStorage.removeItem(window.location.href.replace(window.location.hash, "") + "flipHtml5Shapes" + b), "" !== d && "######" !== d && window.localStorage.setItem(window.location.href.replace(window.location.hash, "") + "flipHtml5Shapes" + b, d)) : ("" === d || "######" === d ? c = new Date("01 Jan 1970 00:00:01") : (c = new Date, c.setDate(c.getDate() + this.expires)), document.cookie = window.location.href.replace(window.location.hash, "") + "flipHtml5Shapes" + b + "=" + d + ";expires=" + c.toUTCString() + ";")
			} catch(e) {}
		},
		save: function() {
			var b, c = d.getCurrentPages();
			for (b = 0; b < c.length; b++) this.containerArray[d.getBookType()][c[b]] && this.saveByIndex(c[b])
		},
		restoreByIndex: function(b, c) {
			var d, e;
			this.removeGraphicByIndex(b);
			try {
				if (window.localStorage ? d = window.localStorage.getItem(window.location.href.replace(window.location.hash, "") + "flipHtml5Shapes" + b) || "": (e = RegExp("(?:(?:^|.*;\\s*)" + window.location.href.replace(window.location.hash, "") + "flipHtml5Shapes" + b + "\\s*\\=\\s*([^;]*).*$)|^.*$"), d = (document.cookie || "").replace(e, "$1")), d && 0 !== d.length) {
					var f, g;
					e = 0;
					for (var h = d.split("##"), k = h[0].split("@@"), l = h[1].split("@@"), m = h[2].split("@@"), n = h[3].split("@@"); f = k[e++];) g = v.getShape("line", f.split("$$"), c),
					c.append(g.container),
					this.groupGraphicByIndex(b, g);
					for (e = 0; f = l[e++];) g = v.getShape("arrow", f.split("$$"), c),
					c.append(g.container),
					this.groupGraphicByIndex(b, g);
					for (e = 0; f = m[e++];) g = v.getShape("rect", f.split("$$"), c),
					c.append(g.container),
					this.groupGraphicByIndex(b, g);
					for (e = 0; f = n[e++];) g = v.getShape("ellipse", f.split("$$"), c),
					c.append(g.container),
					this.groupGraphicByIndex(b, g)
				}
			} catch(p) {
				throw p;
			}
		},
		restore: function(b, c, e) {
			var f = this.containerArray;
			s.inactive();
			q.inactive();
			n.inactive();
			p.inactive();
			f[b] || (f[b] = {});
			f[b][c] = e;
			b === d.getBookType() && this.restoreByIndex(c, e)
		},
		setContainers: function(b, c, d) {
			document.createElementNS && this.restore(b, c, d)
		},
		addEvents: function(b) {
			var c, e = -1,
			f = d.getCurrentPages(),
			g = this.containerArray[d.getBookType()];
			if (document.createElementNS && g) for (; e++<f.length;) c = f[e],
			g[c] && this.addEvent(c, g[c], b)
		}
	});
	k = window.AnnotationShapes = new c
})(window.jQuery, window.Class, window.BookInfo);
var NoteCookie = Class({
	statics: {
		noteCookie: function(b) {
			void 0 == this._noteCookie && (this._noteCookie = new NoteCookie(b));
			return this._noteCookie
		}
	},
	create: function(b) {
		this.noteImgs = {};
		this.rowObjs = {};
		this.noteTexts = {};
		this.svgObjs = {};
		this.notes = [];
		this.cookieName = window.location.href.replace(window.location.hash, "") + "NoteCookie";
		this.rows = [];
		this.noteImgContainers = {};
		this.showFlag = !1;
		this.container = b;
		this.address = uiBaseURL;
		this.noteButtonIsShow = !0;
		this.createNote(b);
		this.bindEvents()
	},
	createNote: function(b) {
		var c = this;
		this.note = $("<div class='noteCookie-note'></div>").css({
			left: "40%"
		}).appendTo(b).hide();
		this.noteTitle = $("<div class='noteCookie-noteTitle'></div>").append($("<span class='noteCookie-noteTitle-text'></span>").html("Notes")).appendTo(this.note);
		this.noteTitleShowBtn = $("<div class='noteCookie-noteTitle-showBtn'></div>").css({
			right: 32
		}).attr("title", "Minimize").append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", this.address + "note_narrow.png")).appendTo(this.noteTitle);
		this.noteTitleCloseBtn = $("<div class='noteCookie-noteTitle-closeBtn'></div>").css({
			right: 3
		}).attr("title", "Close").append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", this.address + "note_close.png")).appendTo(this.noteTitle);
		this.noteButton = $("<div class='noteCookie-noteButton'></div>").appendTo(this.note);
		var d = $("<div style='position: relative;width: 100%;height: 158px;'></div>").appendTo(this.noteButton);
		this.noteBottomTop = $("<div class='noteCookie-noteButton-top'></div>").appendTo(d);
		this.inputText = $("<textarea class='noteCookie-noteButton-inputText'></textarea>").appendTo(this.noteBottomTop);
		this.addBtn = $("<div class='noteCookie-noteButton-addBtn'></div>").css({
			left: 10
		}).html("Add").appendTo(this.noteBottomTop);
		this.removeAllBtn = $("<div class='noteCookie-noteButton-removeAllBtn'></div>").css({
			left: "auto",
			right: 20
		}).html("Remove All").appendTo(this.noteBottomTop);
		this.noteLists = $("<div class='noteCookie-noteList'></div>").appendTo(this.noteButton);
		var d = $("<div class='noteCookie-noteTable-row-th'></div>"),
		e = $("<span class='noteCookie-noteTable-cellLeft-th'></span>").html("Page"),
		f = $("<div class='noteCookie-noteTable-cellRight-th'></div>");
		f.append($("<div style='position: absolute;width: 1px;height: 22px;left: 0px;top: 3px;background-color: #FFFFFF;'></div>")).append($("<span style='position: absolute;width: 319px;height: 100%;left: 1px;text-indent: 6px;'></span>").html("Title")).append($("<div style='position: absolute;width: 1px;height: 22px;left: auto;right: 89px;top: 3px;background-color: #FFFFFF;'></div>")).append($("<span style='position: absolute;width: 34px;height: 100%;left: auto;right: 55px;text-indent: 4px;'></span>").html("Edit")).append($("<div style='position: absolute;width: 1px;height: 22px;left: auto;right: 54px;top: 3px;background-color: #FFFFFF;'></div>")).append($("<span style='position: absolute;width: 54px;height: 100%;left: auto;right: 0px;text-indent: 4px;'></span>").html("Delete"));
		d.append(e).append(f);
		this.noteLists.append(d);
		this.noteTable = $("<div class='noteCookie-noteTable'></div>").css({
			maxHeight: 188
		}).appendTo(this.noteLists);
		this.noteTableInner = $("<div class='noteCookie-noteTable-inner'></div>").appendTo(this.noteTable);
		isTouch || this.note.transition3D();
		this.createScrollBar(this.noteTable);
		try {
			var g = this.getLocalStorage(this.cookieName),
			h = eval(g);
			if (h) for (this.downJSonArrByKey(h, "page"), g = 0; g < h.length; g++) this.addListData($.extend(h[g], {
				firstDown: !0
			}))
		} catch(k) {}
		for (g = 0; g < this.rows.length; g++) this.rows[g].rowObj.css({
			backgroundColor: 0 == g % 2 ? "": "#bababa"
		});
		this.scrollBarShowHide();
		var l, m;
		this.noteTitle.on("mousedown touchstart",
		function(d) {
			d.preventDefault();
			d.stopPropagation();
			d = d.originalEvent.touches ? d.originalEvent.touches[0] : d;
			l = d.clientX - c.note.position().left;
			m = d.clientY - c.note.position().top;
			b.add(c.noteImgContainers[BookInfo.getBookType()][BookInfo.getCurrentPages()[0]]).add(c.noteImgContainers[BookInfo.getBookType()][BookInfo.getCurrentPages()[1]]).on("mousemove.noteMove touchmove.noteMove",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				c.noteTitle.css({
					cursor: "move"
				});
				b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
				c.note.css({
					left: b.clientX - l,
					top: b.clientY - m
				})
			});
			b.on("mouseup.noteMove touchend.noteMove",
			function(d) {
				d.preventDefault();
				d.stopPropagation();
				c.noteTitle.css({
					cursor: "default"
				});
				b.add(c.noteImgContainers[BookInfo.getBookType()][BookInfo.getCurrentPages()[0]]).add(c.noteImgContainers[BookInfo.getBookType()][BookInfo.getCurrentPages()[1]]).off("mousemove.noteMove touchmove.noteMove");
				b.off("mouseup.noteMove touchend.noteMove")
			});
			return ! 1
		})
	},
	isNoteListShowHide: function() {
		0 < this.noteTableInner.children("div").length ? this.noteLists.show() : this.noteLists.hide()
	},
	updateListDataText: function(b, c) {
		var d = this.noteTexts[b],
		e = this.noteImgs[b].find(".noteCookie-eachNote-img"),
		d = d.find(".noteCookie-eachNote-textList-text");
		e.attr("title", c);
		d.val(c)
	},
	updateNoteImgText: function(b, c) {
		this.rowObjs[b].find(".noteCookie-noteTable-cellRight-text").val(c)
	},
	deleteListData: function(b) {
		var c = this.noteTexts[b],
		d = this.svgObjs[b];
		this.noteImgs[b].remove();
		c.remove();
		d.remove();
		delete this.noteImgs[b];
		delete this.rowObjs[b];
		delete this.noteTexts[b];
		delete this.svgObjs[b]
	},
	deleteNoteImg: function(b) {
		this.rowObjs[b].remove();
		delete this.noteImgs[b];
		delete this.rowObjs[b]
	},
	revertNoteImgText: function(b) {
		var c = this.noteTexts[b].find(".noteCookie-eachNote-textList-text");
		b = this.rowObjs[b].find(".noteCookie-noteTable-cellRight-text");
		c.val(b.val())
	},
	addListData: function(b) {
		var c = this,
		d = !0,
		e = $("<div class='noteCookie-noteTable-row' style='position: relative;cursor: pointer;'></div>").css({
			height: 28
		}).attr("data-key", b.key).attr("data-page", b.page).append($("<span class='noteCookie-noteTable-cellLeft'></span>").html(b.page)).appendTo(c.noteTableInner),
		f = $("<span class='noteCookie-noteTable-cellRight' style=' position: absolute;width: 410px;height: 100%;left: 54px;z-index: 2;'></span>").appendTo(e),
		g = $("<input class='noteCookie-noteTable-cellRight-text' disabled='true'/>").attr("disabled", d).val(b.value).appendTo(f),
		h = $("<div class='noteCookie-noteTable-cellRight-edit'></div>").css({
			right: 60
		}).attr("title", "Edit").append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", c.address + "note_edit.png")).appendTo(f);
		$("<div class='noteCookie-noteTable-cellRight-del'></div>").css({
			right: 15
		}).attr("title", "Delete").append($("<img style='margin-left: 0px;margin-top: 3px;'/>").attr("src", c.address + "note_del.png")).appendTo(f).on("click touchend",
		function(b) {
			e.remove();
			var d = e.attr("data-key");
			c.deleteListData(d);
			c.delArrayOrderKey(c.rows, d);
			c.delArrayOrderKey(c.notes, d);
			c.addLocalStorage(c.cookieName, c.parseJSONArrayToString(c.notes));
			for (d = 0; d < c.rows.length; d++) c.rows[d].rowObj.css({
				backgroundColor: 0 == d % 2 ? "": "#bababa"
			});
			c.scrollBarShowHide();
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		e.on("click touchend",
		function(b) {
			gotoPageFun($(this).attr("data-page"))
		});
		h.on("click touchend",
		function(b) {
			if (d) d = !1,
			g.css({
				backgroundColor: "#ffffff",
				color: "#000000"
			}),
			h.children("img").attr("src", c.address + "note_save.png"),
			g.attr("disabled", d),
			g[0].focus(),
			h.attr("title", "Save");
			else {
				d = !0;
				g.css({
					backgroundColor: "transparent",
					color: "#1a1a1a"
				});
				g.attr("disabled", d);
				h.attr("title", "Edit");
				var f = g.val();
				h.children("img").attr("src", c.address + "note_edit.png");
				var m = e.attr("data-key");
				c.updateListDataText(m, f);
				c.updateArrayOrderKey(c.notes, m, {
					value: f
				});
				c.addLocalStorage(c.cookieName, c.parseJSONArrayToString(c.notes))
			}
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		c.rows.push($.extend(b, {
			rowObj: e
		}));
		c.rowObjs[b.key] = e;
		c.scrollBarShowHide();
		c.notes.push(b);
		c.addLocalStorage(c.cookieName, c.parseJSONArrayToString(c.notes))
	},
	addNoteImg: function(b, c) {
		var d = this,
		e = !0,
		f = $("<div class='noteCookie-eachNote'></div>").attr("data-key", b.key).attr("data-page", b.page).css({
			left: "" + b.left + "",
			top: "" + b.top + ""
		}).appendTo(c),
		g = $("<img class='noteCookie-eachNote-img' style=' position: absolute;width: 56px;height: 56px;z-index: 2;'/>").attr("src", d.address + "note.png").attr("title", b.value).attr("data-key", b.key).attr("data-page", b.page).appendTo(f);
		isTouch || f.transition3D();
		try {
			var h = $(document.createElementNS("http://www.w3.org/2000/svg", "svg")).css({
				zIndex: 140,
				position: "absolute"
			}).attr("class", "noteCookie-eachNote-svg noteCookie-eachNote-svg" + b.page).appendTo(BookInfo.container()),
			k = $(document.createElementNS("http://www.w3.org/2000/svg", "path")).css({
				fill: "#FFF4A1",
				stroke: "#C99F1D",
				strokeWidth: 1
			}).appendTo(h)
		} catch(l) {
			h = $("<svg></svg>").css({
				zIndex: 140,
				position: "absolute"
			}).attr("class", "noteCookie-eachNote-svg noteCookie-eachNote-svg" + b.page).appendTo(BookInfo.container()),
			k = $("<path></path>").css({
				fill: "#FFF4A1",
				stroke: "#C99F1D",
				strokeWidth: 1
			}).appendTo(h)
		}
		h.css({
			left: 0,
			top: 0,
			width: 0,
			height: 0
		}).hide();
		var m = $("<div class='noteCookie-eachNote-textList noteCookie-eachNote-text" + b.page + "'></div>").attr("data-key", b.key).attr("data-page", b.page).hide().appendTo(BookInfo.container());
		m.css({
			left: f.offset().left,
			top: f.offset().top
		});
		m.on("click mousedown touchstart",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		var p = $("<div class='noteCookie-eachNote-textList-top' style='position: absolute;width: 100%;height: 20px;left: 0px;top: 0px;background-color: #373737;border-top-left-radius: 2px;border-top-right-radius: 2px;z-index: 2;'></div>").appendTo(m),
		n = $("<div style='position: absolute;left: 4px;top: 0px;width: 24px;height: 20px;cursor: pointer;'></div>").append($("<img style='margin-top: 2px;margin-left: 4px;'/>").attr("src", d.address + "showNoteList.png")).appendTo(p),
		q = $("<div class='noteCookie-eachNote-textList-topClose'></div>").css({
			right: 2
		}).attr("title", "Close").append($("<img style='margin-top: 1px;margin-left: 1px;'/>").attr("src", d.address + "noteImg_close.png")).appendTo(p),
		s = $("<div class='noteCookie-eachNote-textList-topSave'></div>").css({
			right: 24
		}).attr("title", "Save").append($("<img style='margin-top: 1px;margin-left: 0px;'/>").attr("src", d.address + "noteImg_save.png")).appendTo(p),
		r = $("<div class='noteCookie-eachNote-textList-topDel'></div>").css({
			right: 46
		}).attr("title", "Delete").append($("<img style='margin-top: 1px;margin-left: 0px;'/>").attr("src", d.address + "noteImg_del.png")).appendTo(p),
		w = $("<div class='noteCookie-eachNote-textList-textDiv' style='height: 120px;position: absolute;width: 100%;left: 0px;top: 20px;margin: 0px;border: 0px;padding: 0px;border-bottom-left-radius: 2px;border-bottom-right-radius: 2px;background-color: #FFF4A1;z-index: 2;'></div>").appendTo(m),
		u = $("<textarea class='noteCookie-eachNote-textList-text'></textarea>").val(b.value).appendTo(w);
		$("<span class='noteCookie-eachNote-textList-topTitle'></span>").html(b.time).appendTo(w);
		u.on("mousedown click",
		function(b) {
			b.stopPropagation()
		});
		isTouch || m.transition3D();
		n.on("click touchend",
		function() {
			d.noteButtonIsShow && d.showFlag ? (d.hide(), d.showFlag = !1) : (d.show(), d.showFlag = !0)
		});
		var y, v, t, x, z, C;
		p.on("mousedown.note touchstart.note",
		function(b) {
			t = f.offset().left;
			x = f.offset().top;
			z = m.offset().left;
			C = m.offset().top;
			y = (b.pageX || b.originalEvent.touches[0].pageX) - z;
			v = (b.pageY || b.originalEvent.touches[0].pageY) - C;
			BookInfo.container().add(h).add(d.noteImgContainers[BookInfo.getBookType()][BookInfo.getCurrentPages()[0]]).add(d.noteImgContainers[BookInfo.getBookType()][BookInfo.getCurrentPages()[1]]).on("mousemove.noteB touchmove.noteB",
			function(b) {
				p.css({
					cursor: "move"
				});
				b = isTouch ? b.originalEvent.touches[0] : b;
				m.css({
					left: Math.floor(b.clientX - y),
					top: b.clientY - v
				});
				d.drawSVG(t, x, m.offset().left, m.offset().top, h, k)
			});
			BookInfo.container().add(h).add(p).on("mouseup.noteB touchend.noteB",
			function() {
				p.css({
					cursor: "default"
				});
				BookInfo.container().add(h).add(d.noteImgContainers[BookInfo.getBookType()][BookInfo.getCurrentPages()[0]]).add(d.noteImgContainers[BookInfo.getBookType()][BookInfo.getCurrentPages()[1]]).off("mousemove.noteB touchmove.noteB");
				BookInfo.container().add(h).add(p).off("mouseup.noteB touchend.noteB")
			});
			b.stopPropagation();
			b.preventDefault();
			return ! 1
		});
		var A, B, K;
		q.on("click touchend",
		function(b) {
			d.revertNoteImgText(f.attr("data-key"));
			m.hide();
			h.hide();
			D = !1
		});
		s.on("click touchend",
		function(b) {
			b = u.val();
			g.attr("title", b);
			var c = f.attr("data-key");
			d.updateNoteImgText(c, b);
			d.updateArrayOrderKey(d.notes, c, {
				value: b
			});
			d.addLocalStorage(d.cookieName, d.parseJSONArrayToString(d.notes));
			m.hide();
			h.hide();
			D = !1
		});
		r.on("click touchend",
		function(b) {
			A || (A = $("<div class='noteCookie-eachNote-textList-textDiv-bg' style='height: 100%;position: absolute;width: 100%;left: 0px;top: 0px;margin: 0px;border: 0px;padding: 0px;cursor: default;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;background-color: #cccccc;z-index: 2;'></div>").appendTo(w), $("<span class='noteCookie-eachNote-textList-textDiv-bgText' style=' position: absolute;left: 0px;top: 36px;font-family: Arial;font-size: 11px;width: 100%;text-align: center;height: 20px;line-height: 20px;color: #0A0A0A;z-index: 2;'></span>").html("Delete This Note!").appendTo(A), B = $("<div class='noteCookie-eachNote-textList-textDiv-bgYes'></div>").css({
				left: 40
			}).html("Yes").appendTo(A), K = $("<div class='noteCookie-eachNote-textList-textDiv-bgNo'></div>").css({
				left: 97
			}).html("No").appendTo(A), B.on("click touchend",
			function(b) {
				b = f.attr("data-key");
				d.deleteNoteImg(b);
				m.remove();
				h.remove();
				f.remove();
				b = f.attr("data-key");
				d.delArrayOrderKey(d.rows, b);
				d.delArrayOrderKey(d.notes, b);
				d.addLocalStorage(d.cookieName, d.parseJSONArrayToString(d.notes));
				d.scrollBarShowHide();
				for (b = 0; b < d.rows.length; b++) d.rows[b].rowObj.css({
					backgroundColor: 0 == b % 2 ? "": "#bababa"
				});
				A = null
			}), K.on("click touchend",
			function() {
				A.remove();
				A = null
			}))
		});
		var J = b.firstDown ? !1 : !0,
		D = !1,
		G = !1;
		g.on("mouseup.noteImgShowHide touchend.noteImgShowHide",
		function(b) {
			if (isTouch || 1 == b.which) if (J) J = !1;
			else return G ? G = !1 : D ? (m.hide(), h.hide(), D = !1) : (e && (m.css({
				left: f.offset().left,
				top: f.offset().top
			}), e = !1), m.show(), h.show(), D = !0, d.drawSVG(f.offset().left, f.offset().top, m.offset().left, m.offset().top, h, k)),
			b.preventDefault(),
			b.stopPropagation(),
			!1
		});
		$(document).add(c).on("mousedown.noteImgShowHide touchstart.noteImgShowHide",
		function() {
			D && (m.hide(), h.hide(), D = !1)
		});
		m.add(h).on("mousedown.noteImgShowHide touchstart.noteImgShowHide",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		var E, F, H, I, M, L = !1;
		g.bind(_event._down,
		function(b) {
			b.stopPropagation();
			b.preventDefault();
			b = isTouch ? b.originalEvent.touches[0] : b;
			E = parseFloat(f[0].offsetLeft);
			F = parseFloat(f[0].offsetTop);
			H = b.clientX;
			I = b.clientY;
			M = g.attr("data-key");
			L = !0;
			if (D) var e = m.offset().left,
			k = m.offset().top,
			l = h.offset().left,
			n = h.offset().top;
			c.on("mousemove.noteObj touchmove.noteObj",
			function(b) {
				b.stopPropagation();
				b.preventDefault();
				if (L) {
					f.css({
						cursor: "move"
					});
					b = isTouch ? b.originalEvent.touches[0] : b;
					var g = E * BookInfo.scale() - (H - b.clientX),
					p = F * BookInfo.scale() - (I - b.clientY),
					g = g / (c.width() * BookInfo.scale()) * 100 + "%",
					p = p / (c.height() * BookInfo.scale()) * 100 + "%";
					f.css({
						left: g,
						top: p
					});
					D && (m.css({
						left: e + (b.clientX - H),
						top: k + (b.clientY - I)
					}), h.css({
						left: l + (b.clientX - H),
						top: n + (b.clientY - I)
					}));
					if (8 < Math.abs(b.clientX - H) || 8 < Math.abs(b.clientY - I)) G = !0;
					d.updateArrayOrderKey(d.notes, M, {
						left: g,
						top: p
					});
					d.addLocalStorage(d.cookieName, d.parseJSONArrayToString(d.notes))
				}
			});
			c.add(g).on("mouseup.noteObj touchend.noteObj",
			function(b) {
				L && (f.css({
					cursor: "default"
				}), G = L = !1, c.off("mousemove.noteObj touchmove.noteObj"), c.add(g).off("mouseup.noteObj touchend.noteObj"))
			});
			return ! 1
		});
		p.bind(_event._down,
		function() {
			$(".noteCookie-eachNote-textList").removeClass("noteCookie-eachNote-textList-current");
			$(".noteCookie-eachNote").removeClass("noteCookie-eachNote-textList-current");
			m.addClass("noteCookie-eachNote-textList-current");
			f.addClass("noteCookie-eachNote-textList-current")
		});
		d.noteImgs[b.key] = f;
		d.noteTexts[b.key] = m;
		d.svgObjs[b.key] = h
	},
	addNoteImgByPageIndex: function(b, c) {
		c.find(".noteCookie-eachNote").remove();
		$(".noteCookie-eachNote-text" + b).remove();
		$(".noteCookie-eachNote-svg" + b).remove();
		for (var d = 0; d < this.notes.length; d++) this.notes[d].page === b && this.addNoteImg(this.notes[d], c)
	},
	addListDataAndNoteImg: function(b, c) {
		this.addListData(b);
		this.addNoteImg(b, c)
	},
	drawSVG: function(b, c, d, e, f, g) {
		var h, k, l, m, p, n;
		b + 28 >= d + 90.5 && c + 28 <= e ? (n = c + 28, e -= n, b + 28 <= d + 109 ? (p = b + 28, m = d + 181 - 24 - b + 28, c = b = 0, h = d + 181 - 24 - 48 - p, k = e, d = d + 181 - 24 - p) : (p = d + 109, d + 181 - 24 >= b + 28 ? (m = 48, b = b + 28 - p) : b = m = b + 28 - p, h = c = 0, k = e, d = 48), l = e) : b + 28 < d + 90.5 && c + 28 <= e ? (n = c + 28, e -= n, b + 28 <= d + 24 ? (p = b + 28, m = d + 24 + 48 - p, c = b = 0, h = m - 48, k = e, d = m) : (p = d + 24, d + 24 + 48 <= b + 28 ? b = m = b + 28 - p: (m = 48, b = b + 28 - p), h = c = 0, k = e, d = 48), l = e) : b + 28 >= d + 90.5 && c >= e + 141 - 28 ? (n = e + 141, e = c + 28 - n, b + 28 <= d + 109 ? (p = b + 28, m = d + 181 - 24 - b + 28, b = 0, c = e, h = d + 181 - 24 - 48 - p, k = 0, d = d + 181 - 24 - p) : (p = d + 109, d + 181 - 24 >= b + 28 ? (m = 48, b = b + 28 - p) : b = m = b + 28 - p, c = e, k = h = 0, d = 48), l = 0) : b + 28 < d + 90.5 && c >= e + 141 - 28 ? (n = e + 141, e = c + 28 - n, b + 28 <= d + 24 ? (p = b + 28, m = d + 24 + 48 - p, b = 0, c = e, h = m - 48, k = 0, d = m) : (p = d + 24, d + 24 + 48 <= b + 28 ? b = m = b + 28 - p: (m = 48, b = b + 28 - p), c = e, k = h = 0, d = 48), l = 0) : d + 181 <= b + 28 && c + 28 >= e && c + 28 <= e + 70.5 ? (p = d + 181, m = b + 28 - p, c + 28 <= e + 20 ? (n = c + 28, e = e + 20 + 48 - n, b = m, h = c = 0, k = e - 48, d = 0, l = e) : e + 20 + 48 <= c + 28 ? (n = e + 20, e = c + 28 - n, b = m, c = e, d = k = h = 0, l = 48) : (n = e + 20, e = 48, b = m, c = c + 28 - n, d = k = h = 0, l = e)) : d + 181 <= b + 28 && c + 28 <= e + 141 && c + 28 >= e + 70.5 ? (p = d + 181, m = b + 28 - p, c + 28 <= e + 141 - 20 - 48 ? (n = c + 28, e = e + 141 - 20 - n, b = m, h = c = 0, k = e - 48, d = 0, l = e) : e + 141 - 20 <= c + 28 ? (n = e + 141 - 68, e = c + 28 - n, b = m, c = e, d = k = h = 0, l = 48) : (n = e + 141 - 68, e = 48, b = m, c = c + 28 - n, d = k = h = 0, l = e)) : d >= b + 28 && c + 28 >= e && c + 28 <= e + 70.5 ? (p = b + 28, m = d - p, c + 28 <= e + 20 ? (n = c + 28, e = e + 20 + 48 - n, c = b = 0, h = m, k = e - 48, d = m, l = e) : e + 20 + 48 <= c + 28 ? (n = e + 20, e = c + 28 - n, b = 0, c = e, h = m, k = 0, d = m, l = 48) : (n = e + 20, e = 48, b = 0, c = c + 28 - n, h = m, k = 0, d = m, l = e)) : d >= b + 28 && c + 28 <= e + 141 && c + 28 >= e + 70.5 ? (p = b + 28, m = d - p, c + 28 <= e + 141 - 20 - 48 ? (n = c + 28, e = e + 141 - 20 - n, c = b = 0, h = m, k = e - 48, d = m, l = e) : e + 141 - 20 <= c + 28 ? (n = e + 141 - 68, e = c + 28 - n, b = 0, c = e, h = m, k = 0, d = m, l = 48) : (n = e + 141 - 68, e = 48, b = 0, c = c + 28 - n, h = m, k = 0, d = m, l = e)) : (k = h = c = b = m = e = n = p = 0, d = 48, l = 0);
		f.show().css({
			width: m,
			height: e,
			left: p,
			top: n
		});
		g.attr("d", "M" + d + "," + l + " L" + b + "," + c + " L" + h + "," + k)
	},
	bindEvents: function() {
		var b = this,
		c = !1,
		d = function() {
			$.each(BookInfo.getCurrentPages(),
			function(c, d) {
				if (b.noteImgContainers[BookInfo.getBookType()]) {
					var g = b.noteImgContainers[BookInfo.getBookType()][d];
					g && (g.css({
						cursor: ""
					}), g.off("mousedown.addNote touchstart.addNote"))
				}
			});
			c = !1
		};
		BookInfo.container().on("mousedown.addNote touchstart.addNote",
		function() {
			d()
		});
		b.addBtn.bind(_event._end,
		function(e) {
			var f = b.inputText.val();
			if (f) {
				b.noteButtonIsShow = !1;
				b.noteTitleShowBtn.children("img").attr("src", b.address + "note_revert.png");
				b.noteButton.css({
					maxHeight: 0,
					paddingBottom: 0
				});
				c = !0;
				var g = BookInfo.getCurrentPages();
				$.each(g,
				function(e, g) {
					var l = b.noteImgContainers[BookInfo.getBookType()][g];
					if (l) l.css({
						cursor: "url(" + b.address + "note.png),auto"
					}).on(_event._down,
					function(e) {
						b.noteButtonIsShow = !1;
						b.noteTitleShowBtn.children("img").attr("src", b.address + "note_revert.png");
						b.noteButton.css({
							maxHeight: 0
						});
						if (c) {
							if (!e.which || 3 != e.which) {
								var h = (e.pageX || e.originalEvent.touches[0].pageX) - l.offset().left;
								e = (e.pageY || e.originalEvent.touches[0].pageY) - l.offset().top;
								h = h / (l.width() * BookInfo.scale()) * 100 + "%";
								e = e / (l.height() * BookInfo.scale()) * 100 + "%";
								h = {
									key: (new Date).getTime(),
									time: (new Date).format("yyyy-MM-dd hh:mm:ss", !0),
									value: f,
									left: h,
									top: e,
									page: g
								};
								b.addListDataAndNoteImg(h, $(this));
								b.downJSonArrByKey(b.rows, "page");
								$(".noteCookie-noteTable-row").detach();
								for (h = 0; h < b.rows.length; h++) b.rows[h].rowObj.css({
									backgroundColor: 0 == h % 2 ? "": "#bababa"
								}),
								b.rows[h].rowObj.appendTo(b.noteTableInner);
								b.scrollBarShowHide();
								b.inputText.val("")
							}
							d()
						}
					})
				})
			}
			e.preventDefault();
			e.stopPropagation();
			return ! 1
		});
		b.noteTitleShowBtn.on(_event._down,
		function() {
			b.noteButtonIsShow ? (b.noteButtonIsShow = !1, b.noteTitleShowBtn.children("img").attr("src", b.address + "note_revert.png"), b.noteButton.css({
				maxHeight: 0,
				paddingBottom: 0
			})) : (b.noteButtonIsShow = !0, b.noteTitleShowBtn.children("img").attr("src", b.address + "note_narrow.png"), b.noteButton.css({
				maxHeight: 9999,
				paddingBottom: 6
			}))
		});
		b.noteTitleCloseBtn.on("click.note touchend.note",
		function(c) {
			void 0 != b.onCreated ? b.onCreated[1].call(b.onCreated[0]) : b.hide();
			c.preventDefault();
			c.stopPropagation();
			return ! 1
		});
		b.removeAllBtn.on("click.note touchend.note",
		function() {
			$(".noteCookie-eachNote").remove();
			$(".noteCookie-eachNote-svg").remove();
			$(".noteCookie-eachNote-textList").remove();
			$(".noteCookie-noteTable-row").remove();
			b.notes = [];
			b.rowObjs = {};
			b.noteImgs = {};
			b.noteTexts = {};
			b.svgObjs = {};
			b.rows = [];
			b.addLocalStorage(b.cookieName, b.parseJSONArrayToString(b.notes));
			b.scrollBarShowHide()
		})
	},
	setContainers: function(b, c, d) {
		void 0 == this.noteImgContainers[b] && (this.noteImgContainers[b] = {});
		this.noteImgContainers[b][c] = d;
		b == BookInfo.getBookType() && ($(".noteCookie-eachNote-textList").hide(), $(".noteCookie-eachNote-svg").hide(), this.addNoteImgByPageIndex(c, d))
	},
	show: function() {
		this.showFlag = !0;
		this.note.show();
		parseInt(this.note.css("left")) > this.container.width() && this.note.css({
			left: "50%"
		});
		0 > parseInt(this.note.css("top")) && this.note.css({
			top: 24
		});
		this.noteButtonIsShow = !0;
		this.noteTitleShowBtn.children("img").attr("src", this.address + "note_narrow.png");
		this.noteButton.css({
			maxHeight: 9999,
			paddingBottom: 6
		});
		this.scrollBarShowHide()
	},
	hide: function() {
		this.showFlag = !1;
		this.note.hide()
	},
	bindOnCreated: function(b, c) {
		this.onCreated = [b, c]
	},
	showHide: function() {
		this.showFlag ? this.hide() : this.show()
	},
	parseJSONArrayToString: function(b) {
		if (0 != b.length) {
			for (var c = "[",
			d = 0; d < b.length; d++) c += "{key:'" + b[d].key + "',value:'" + b[d].value + "',page:" + b[d].page + ",time:'" + b[d].time + "',left:'" + b[d].left + "',top:'" + b[d].top + "'},";
			c = c.substring(0, c.length - 1);
			return c + "]"
		}
	},
	delArrayOrderKey: function(b, c) {
		if (b) for (var d = 0; d < b.length; d++) b[d].key && b[d].key == c && b.remove(d)
	},
	updateArrayOrderKey: function(b, c, d) {
		if (b) for (var e = 0; e < b.length; e++) b[e].key && b[e].key == c && $.extend(b[e], d)
	},
	downJSonArrByKey: function(b, c) {
		b.sort(function(b, e) {
			return parseInt(b[c]) > parseInt(e[c]) ? 1 : parseInt(b[c]) == parseInt(e[c]) ? 0 : -1
		})
	},
	isArray: function(b) {
		return "[object Array]" == Object.prototype.toString.call(b)
	},
	getLocalStorage: function(b) {
		try {
			if (window.localStorage) return window.localStorage.getItem(b);
			for (var c = document.cookie.split("; "), d = 0; d < c.length; d++) {
				var e = c[d].split("=");
				if (e[0] == b) return unescape(e[1])
			}
			return ""
		} catch(f) {}
	},
	addLocalStorage: function(b, c) {
		try {
			if (window.localStorage) window.localStorage.setItem(b, c);
			else {
				var d = b + "=" + escape(c),
				e = new Date;
				e.setTime(e.getTime() + 864E8);
				d += "; expires=" + e.toGMTString();
				document.cookie = d
			}
		} catch(f) {}
	},
	createScrollBar: function(b) {
		b = $("<div>", {
			"class": "ScrollBar",
			css: {
				position: "absolute",
				width: 6,
				height: "100%",
				backgroundColor: "#a8a8a8",
				borderRadius: 0,
				right: 0,
				top: 0,
				zIndex: 99,
				borderLeft: "1px solid #ffffff"
			}
		}).appendTo(b);
		var c = $("<div>", {
			"class": "OuterScroll",
			css: {
				position: "absolute",
				width: 6,
				height: "100%",
				left: 0,
				top: 0,
				backgroundColor: "transparent",
				borderRadius: 0,
				overflow: "hidden",
				cursor: "pointer"
			}
		}).appendTo(b);
		$("<div>", {
			"class": "InnerScroll",
			css: {
				position: "absolute",
				width: 6,
				height: "100%",
				marginLeft: 0,
				marginRight: 0,
				left: 0,
				top: 0,
				backgroundColor: "#5e5e5e",
				borderRadius: 0,
				cursor: "pointer"
			}
		}).appendTo(c);
		this.scrollBar = b;
		this.outerScroll = c;
		this.bindScrollBarEvents(b, c, this.noteTable, this.noteTableInner)
	},
	scrollBarShowHide: function() {
		var b = this.noteTable.outerHeight() * this.scrollBar.outerHeight() / this.noteTableInner.outerHeight();
		this.outerScroll.css({
			height: b
		});
		this.isNoteListShowHide();
		this.noteTable.height() >= this.noteTableInner.height() ? (this.scrollBar.hide(), this.noteTableInner.css({
			top: 0
		})) : (this.scrollBar.show(), Math.abs(parseFloat(this.noteTableInner.css("top"))) > this.noteTableInner.outerHeight() - this.noteTable.outerHeight() && (this.noteTableInner.css({
			top: -(this.noteTableInner.outerHeight() - this.noteTable.outerHeight())
		}), this.outerScroll.css({
			top: this.scrollBar.outerHeight() - this.outerScroll.outerHeight()
		})))
	},
	bindScrollBarEvents: function(b, c, d, e) {
		var f = this;
		c.on(_event._down,
		function(b) {
			var d = b || event,
			k = d.clientY - f.outerScroll.position().top,
			l = b.which;
			b.stopPropagation();
			1 == l && ($(document).on("mousemove.scrollBar touchmove.scrollBar",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				d = b || event;
				b = d.clientY - k;
				0 >= b ? b = 0 : b >= f.scrollBar.outerHeight() - f.outerScroll.outerHeight() && (b = f.scrollBar.outerHeight() - f.outerScroll.outerHeight());
				c.css({
					top: b
				});
				e.css({
					top: -b / (f.scrollBar.outerHeight() - f.outerScroll.outerHeight()) * (f.noteTableInner.outerHeight() - f.noteTable.outerHeight())
				})
			}), $(document).on("mouseup.scrollBar touchend.scrollBar",
			function(b) {
				b = b || event;
				b.preventDefault();
				b.stopPropagation();
				$(document).off("mousemove.scrollBar touchmove.scrollBar");
				$(document).off("mouseup.scrollBar touchend.scrollBar")
			}))
		});
		d.bind($.browser.mozilla ? "DOMMouseScroll": "mousewheel",
		function(f) {
			if (! (d.outerHeight() >= e.outerHeight())) {
				var h = f.originalEvent,
				h = h.wheelDelta || -h.detail,
				k = e.position().top,
				l;
				e.stop(!1, !1);
				0 < h ? l = 0 > k + d.outerHeight() / 11 ? k + d.outerHeight() / 11 : 0 : 0 > h && (l = e.outerHeight() - d.outerHeight() > -(k - d.outerHeight() / 11) ? k - d.outerHeight() / 11 : -(e.outerHeight() - d.outerHeight()));
				e.css({
					top: l
				});
				c.css({
					top: -l / (e.outerHeight() - d.outerHeight()) * (b.outerHeight() - c.outerHeight())
				});
				f.stopPropagation();
				f.preventDefault();
				return ! 1
			}
		})
	}
}),
Signature = Class({
	statics: {
		signature: function(b) {
			void 0 == this._signature && (this._signature = new Signature(b));
			return this._signature
		}
	},
	create: function(b) {
		this.container = b;
		this.address = uiBaseURL;
		this.disableCss = {
			boxShadow: "rgba(0, 0, 0, 0.6) 0px 1px 4px inset",
			backgroundColor: "#cccccc",
			textShadow: "0 1px 1px white",
			color: "rgb(165, 148, 148)",
			cursor: "default"
		};
		this.normalCss = {
			boxShadow: "inset 0px 1px 0px rgba(255, 255, 255, 0.5), 0px 1px 2px rgba(0, 0, 0, 0.2)",
			backgroundColor: "#E4E4E4",
			color: "#464343",
			textShadow: "",
			cursor: "pointer"
		};
		this.overCss = {};
		this.downCss = {
			backgroundColor: "#E4E4E4",
			color: "#374f00",
			boxShadow: "inset 0px 1px 3px rgba(0, 0, 0, 0.3), 0px 1px 0px white",
			textShadow: "0px 1px 0px rgba(255, 255, 255, 0.4)"
		};
		this.natureMessage = "Welcome to the signature manager! Here, you can draw,type, or upload signatures to use on the PDF documents you sign.";
		this.writeMessage = 'Type your signature below, then press the "Save" or "Save & Use" button to proceed.';
		this.drawMessage = 'Draw your signature below, then press the "Save" or "Save & Use" button to proceed.';
		this.redoIsUse = this.undoIsUse = this.clearAllFalg = this.hasDrawFlag = this.showFlag = this.hasAndChangeText = !1;
		this.drawOldData = this.currentDrawDel = this.currentDrawEdit = this.currentDrawSave = this.currentWriteDel = this.currentWriteEdit = this.currentWriteSave = null;
		this.drawOldPoints = [];
		this.savePoints = [];
		this.saveText = null;
		this.signatureName = window.location.href.replace(window.location.hash, "") + "Signature";
		this.signatureCookies = [];
		this.currentObj = null;
		this.signatureContexts = {};
		try {
			this.createSignature(b)
		} catch(c) {}
		this.toolBar = this.createToolBar(b)
	},
	createToolBar: function(b) {
		var c = this;
		this.showTimeFalg = {};
		this.oldData = {};
		var d = $("<div class='flipHTML5Signature-toolBar' style='position: absolute;width: 144px;height: 32px;background-color: rgba(0, 0, 0, 0.8);border-radius: 4px;z-index: 9998;'></div>").appendTo(b).hide();
		b = $("<div class='flipHTML5Signature-toolBar-del'></div>").css({
			left: 4
		}).append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", this.address + "signature_del.png")).appendTo(d);
		var e = $("<div class='flipHTML5Signature-toolBar-up'></div>").css({
			left: 32
		}).append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", this.address + "signature_up.png")).appendTo(d),
		f = $("<div class='flipHTML5Signature-toolBar-down'></div>").css({
			left: 60
		}).append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", this.address + "signature_down.png")).appendTo(d),
		g = $("<div class='flipHTML5Signature-toolBar-revert'></div>").css({
			left: 88
		}).append($("<img style='margin-left: 2px;margin-top: 4px;'/>").attr("src", this.address + "signature_revert.png")).appendTo(d),
		h = $("<div class='flipHTML5Signature-toolBar-date'></div>").css({
			left: 116
		}).append($("<img style='margin-left: 3px;margin-top: 4px;'/>").attr("src", this.address + "signature_date.png")).appendTo(d);
		b.on("click touchend",
		function(b) {
			c.currentObj && (c.currentObj.remove(), d.hide(), b = c.currentObj.attr("data-key"), delete c.showTimeFalg[b], delete c.oldData[b], c.delArrayOrderKey(c.signatureCookies, b), c.addLocalStorage(c.signatureName, c.parseToString(c.signatureCookies)))
		});
		e.on("click touchend",
		function() {
			if (c.currentObj) {
				var b = c.currentObj.width(),
				d = c.currentObj.height(),
				e = b + 11;
				c.currentObj.css({
					width: e,
					height: e / (b / d)
				});
				b = c.currentObj.attr("data-key");
				d = c.parseObject(c.currentObj[0]);
				c.updateArrayOrderKey(c.signatureCookies, b, {
					width: d.width,
					height: d.height
				});
				c.addLocalStorage(c.signatureName, c.parseToString(c.signatureCookies));
				c.showTimeFalg[b] && c.reviseDateTag()
			}
		});
		f.on("click touchend",
		function() {
			if (c.currentObj) {
				var b = c.currentObj.width(),
				d = c.currentObj.height(),
				e = 0 >= b - 11 ? 5 : b - 11;
				c.currentObj.css({
					width: e,
					height: e / (b / d)
				});
				b = c.currentObj.attr("data-key");
				d = c.parseObject(c.currentObj[0]);
				c.updateArrayOrderKey(c.signatureCookies, b, {
					width: d.width,
					height: d.height
				});
				c.addLocalStorage(c.signatureName, c.parseToString(c.signatureCookies));
				c.showTimeFalg[b] && c.reviseDateTag()
			}
		});
		g.on("click touchend",
		function() {
			if (c.currentObj) {
				var b = c.currentObj.attr("data-key");
				c.currentObj.css({
					width: c.oldData[b].width,
					height: c.oldData[b].height
				});
				c.showTimeFalg[b] && c.reviseDateTag();
				var d = c.parseObject(c.currentObj[0]);
				c.updateArrayOrderKey(c.signatureCookies, b, {
					width: d.width,
					height: d.height
				});
				c.addLocalStorage(c.signatureName, c.parseToString(c.signatureCookies))
			}
		});
		h.on("click touchend",
		function() {
			var b = c.currentObj.attr("data-key");
			c.showTimeFalg[b] ? (c.currentObj.find(".flipHTML5Signature-eachDate").hide(), c.showTimeFalg[b] = !1) : (c.reviseDateTag(), c.currentObj.find(".flipHTML5Signature-eachDate").show(), c.showTimeFalg[b] = !0)
		});
		d.on("mousedown touchstart",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		this.container.add($(document)).add(BookInfo.container()).on("mousedown.hideToolBar touchstart.hideToolBar",
		function() {
			d.hide()
		});
		return d
	},
	createSignature: function(b) {
		var c = this;
		this.$signature = $("<div class='flipHTML5Signature'></div>").css({
			width: 560
		}).appendTo(b).hide();
		this.$signatureTitle = $("<div class='flipHTML5Signature-title'></div>").append($("<span class='flipHTML5Signature-titleText'></span>").html("Signature Manager")).appendTo(this.$signature);
		this.$closeBtn_title = $("<div class='flipHTML5Signature-titleClose' style='right: 6px;top: 4px;width: 20px;height: 20px;'></div>").append($("<img style='margin-left: 2px;margin-top: 2px;'/>").attr("src", this.address + "signature_close.png")).appendTo(this.$signatureTitle);
		try {
			var d = this.getLocalStorage(this.signatureName);
			this.signatureCookies = d && "undefined" != d ? eval(d) : []
		} catch(e) {}
		var f, g;
		this.$signatureTitle.on("mousedown touchstart",
		function(d) {
			d.preventDefault();
			d.stopPropagation();
			d = d.originalEvent.touches ? d.originalEvent.touches[0] : d;
			f = d.clientX - c.$signature.position().left;
			g = d.clientY - c.$signature.position().top;
			b.add($(document)).add(c.signatureContexts[BookInfo.getBookType()][BookInfo.getCurrentPages()[0]]).add(c.signatureContexts[BookInfo.getBookType()][BookInfo.getCurrentPages()[1]]).on("mousemove.signatureMove touchmove.signatureMove",
			function(b) {
				c.$signatureTitle.css({
					cursor: "move"
				});
				b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
				c.$signature.css({
					left: b.clientX - f,
					top: b.clientY - g
				})
			});
			b.add($(document)).on("mouseup.signatureMove touchend.signatureMove",
			function() {
				c.$signatureTitle.css({
					cursor: "default"
				});
				b.add($(document)).add(c.signatureContexts[BookInfo.getBookType()][BookInfo.getCurrentPages()[0]]).add(c.signatureContexts[BookInfo.getBookType()][BookInfo.getCurrentPages()[1]]).off("mousemove.signatureMove touchmove.signatureMove");
				b.add($(document)).off("mouseup.signatureMove touchend.signatureMove")
			});
			return ! 1
		});
		this.createSignatureUnder(this.$signature);
		this.createWriteTypeUnder(this.$signature);
		this.createDrawTypeUnder(this.$signature)
	},
	createSignatureUnder: function(b) {
		var c = this;
		this.$signatureUnder = $("<div class='flipHTML5Signature-nuder' style='position: relative;left: 0px;width: 100%;height: 260px;background-color: #C7C7C7;'></div>").append($("<div class='flipHTML5Signature-nuderMessage'></div>").html(this.natureMessage)).appendTo(b);
		this.$underClose = $("<div class='flipHTML5Signature-nuderClose'></div>").html("Close").appendTo(this.$signatureUnder);
		this.$closeBtn_title.add(this.$underClose).on("click.signature touchend.signature",
		function() {
			void 0 != c.onCreated ? c.onCreated[1].call(c.onCreated[0]) : c.hide()
		});
		this.createEachTypes(this.$signatureUnder)
	},
	createEachTypes: function(b) {
		var c = this,
		d = {
			width: 52,
			left: 57,
			borderTopLeftRadius: 5,
			borderBottomLeftRadius: 5
		},
		e = {
			width: 70,
			left: 111,
			borderTopRightRadius: 5,
			borderBottomRightRadius: 5
		};
		b = $("<div class='flipHTML5Signature-nuderTypes' style='  position: absolute;left: 15px;top: 60px;width: 530px;height: 145px;'></div>").css({
			boxShadow: "inset 1px 1px 0px #a6a6a6, 1px 1px 0px #f6f6f6"
		}).appendTo(b);
		var f = $("<div class='flipHTML5Signature-nuderTypes-type' style=' position: absolute;left: 17px;top: 6px;width: 240px;height: 134px;'></div>").css({
			boxShadow: "0px 0px 1px #000000"
		}).append($("<span class='flipHTML5Signature-typeTitle'></span>").html("Type on Keyboard")).css({
			left: 17
		}).appendTo(b),
		f = $("<div class='flipHTML5Signature-typeUnder'></div>").appendTo(f),
		g = $("<div class='flipHTML5Signature-typeMid'></div>").appendTo(f),
		h = $("<div class='flipHTML5Signature-typeEdit-typeDel'></div>").css(d).html("Edit").appendTo(f).hide(),
		k = $("<div class='flipHTML5Signature-typeEdit-typeDel'></div>").css(e).html("Delete").appendTo(f).hide();
		b = $("<div class='flipHTML5Signature-nuderTypes-type' style=' position: absolute;left: 17px;top: 6px;width: 240px;height: 134px;'></div>").css({
			boxShadow: "0px 0px 1px #000000"
		}).append($("<span class='flipHTML5Signature-typeTitle'></span>").html("Draw with Mouse")).css({
			left: "auto",
			right: 17
		}).appendTo(b);
		b = $("<div class='flipHTML5Signature-typeUnder'></div>").appendTo(b);
		var l = $("<div class='flipHTML5Signature-typeMid'></div>").appendTo(b),
		m = $("<div class='flipHTML5Signature-typeEdit-typeDel'></div>").css(d).html("Edit").appendTo(b).hide(),
		p = $("<div class='flipHTML5Signature-typeEdit-typeDel'></div>").css(e).html("Delete").appendTo(b).hide();
		g.on("mouseover.signature touchstart.signature",
		function() {
			g.css({
				borderColor: "#ff0000"
			})
		});
		g.on("mouseout.signature touchend.signature",
		function() {
			g.css({
				borderColor: "#cccccc"
			})
		});
		g.on(_event._down,
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		g.on(_event._end,
		function(b) {
			var d = $(this).html();
			d ? (c.$writeText.val(d), c.saveAndUseWrite(d)) : (c.writeSave.add(c.writeSaveAndUse).removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.disableCss), c.hasAndChangeText = !1, c.$signatureUnder.hide(), c.$drawTypeUnder.hide(), c.$writeTypeUnder.show(), c.$writeText.focus(), c.currentWriteSave = g, c.currentWriteEdit = h, c.currentWriteDel = k);
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		h.on("click.signature touchend.signature",
		function() {
			c.currentWriteSave = g;
			c.currentWriteEdit = h;
			c.currentWriteDel = k;
			c.$writeText.val(g.html());
			c.writeSave.add(c.writeSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss);
			c.hasAndChangeText = !1;
			c.$signatureUnder.hide();
			c.$drawTypeUnder.hide();
			c.$writeTypeUnder.show()
		});
		k.on("click.signature touchend.signature",
		function() {
			c.currentWriteSave = g;
			c.currentWriteEdit = h;
			c.currentWriteDel = k;
			c.writeSave.add(c.writeSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss);
			c.hasAndChangeText = !1;
			g.html("");
			c.$writeText.val("");
			h.hide();
			k.hide()
		});
		l.on("mouseover.signature touchstart.signature",
		function() {
			l.css({
				borderColor: "#ff0000"
			})
		});
		l.on("mouseout.signature touchend.signature",
		function() {
			l.css({
				borderColor: "#cccccc"
			})
		});
		l.on(_event._down,
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		l.on(_event._end,
		function(b) {
			l.children("img").length ? c.saveAndUseDraw(c.drawOldData) : (c.$signatureUnder.hide(), c.$writeTypeUnder.hide(), c.$drawTypeUnder.show(), c.currentDrawSave = l, c.currentDrawEdit = m, c.currentDrawDel = p);
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		m.on("click.signature touchend.signature",
		function() {
			c.currentDrawSave = l;
			c.currentDrawEdit = m;
			c.currentDrawDel = p;
			c.$signatureUnder.hide();
			c.$writeTypeUnder.hide();
			c.$drawTypeUnder.show()
		});
		p.on("click.signature touchend.signature",
		function() {
			try {
				c.currentDrawSave = l,
				c.currentDrawEdit = m,
				c.currentDrawDel = p,
				c.undo.add(c.redo).add(c.clearAllBtn).add(c.drawSave).add(c.drawSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss),
				c.undoIsUse = !1,
				c.redoIsUse = !1,
				c.clearAllFalg = !1,
				c.hasDrawFlag = !1,
				m.hide(),
				p.hide(),
				c.currentDrawSave && c.currentDrawSave.empty(),
				c.context.clearRect(0, 0, c.canvas.width, c.canvas.height),
				c.previewContext.clearRect(0, 0, c.previewCanvas.width, c.previewCanvas.height),
				c.drawOldPoints = [],
				c.points = [],
				c.drawOldPoints.push([])
			} catch(b) {}
		})
	},
	createWriteTypeUnder: function(b) {
		var c = this,
		d = !1,
		e;
		this.$writeTypeUnder = $("<div class='flipHTML5Signature-writeType' style='position: relative;left: 0px;width: 100%;height: 170px;background-color: #C7C7C7;'></div>").append($("<div class='flipHTML5Signature-nuderMessage'></div>").html(this.writeMessage)).appendTo(b).hide();
		this.$writeText = $("<input type='text' class='flipHTML5Signature-writeType-text' maxlength='35' style='position: absolute;width: 450px;height: 60px;left: 63px;top: 64px;font-family: Mistral;font-size: 28px;text-align: center;color: #000000;'/>").css({
			boxShadow: "rgb(166, 166, 166) 1px 1px 0px inset, rgb(246, 246, 246) 1px 1px 0px"
		}).appendTo(this.$writeTypeUnder);
		this.writeSave = $("<div class='flipHTML5Signature-typeBtn flipHTML5Signature-type-save' style='left: 161px;'></div>").html("Save").appendTo(this.$writeTypeUnder);
		this.writeSaveAndUse = $("<div class='flipHTML5Signature-typeBtn flipHTML5Signature-type-save-use' style='left: 275px;'></div>").html("Save & Use").appendTo(this.$writeTypeUnder);
		b = $("<div class='flipHTML5Signature-typeBtn flipHTML5Signature-type-cancel'></div>").html("Cancel").appendTo(this.$writeTypeUnder);
		e = this.$writeText.val();
		this.writeSave.add(this.writeSaveAndUse).css(this.disableCss);
		b.on("click touchend",
		function(b) {
			c.$writeText.val(e);
			c.$writeTypeUnder.hide();
			c.$drawTypeUnder.hide();
			c.$signatureUnder.show();
			b.preventDefault()
		});
		this.writeSaveAndUse.on(_event._down,
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		this.writeSaveAndUse.on(_event._end,
		function(b) {
			if (c.hasAndChangeText) {
				var g = c.$writeText.val(); (e = g) && d && (c.saveText = g, c.saveAndUseWrite(g))
			}
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		this.writeSave.on("click touchend",
		function(b) {
			c.hasAndChangeText && (e = b = c.$writeText.val()) && d && (c.saveText = b, c.saveWrite(b))
		});
		c.writeSave.on("mouseover.signature touchstart.signature",
		function(b) {
			c.hasAndChangeText && c.writeSave.removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(c.overCss)
		});
		c.writeSaveAndUse.on("mouseover.signature touchstart.signature",
		function(b) {
			c.hasAndChangeText && c.writeSaveAndUse.removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(c.overCss)
		});
		c.writeSave.on("mouseout.signature touchend.signature",
		function(b) {
			c.hasAndChangeText && c.writeSave.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		c.writeSaveAndUse.on("mouseout.signature touchend.signature",
		function(b) {
			c.hasAndChangeText && c.writeSaveAndUse.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		c.writeSave.on("mousedown.signature",
		function(b) {
			c.hasAndChangeText && c.writeSave.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.downCss)
		});
		c.writeSaveAndUse.on("mousedown.signature",
		function(b) {
			c.hasAndChangeText && c.writeSaveAndUse.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.downCss)
		});
		c.writeSave.add($(document)).on("mouseup.signature",
		function(b) {
			c.hasAndChangeText && c.writeSave.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		c.writeSaveAndUse.add($(document)).on("mouseup.signature",
		function(b) {
			c.hasAndChangeText && c.writeSaveAndUse.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		this.$writeText.on("input propertychange",
		function(b) {
			b = c.$writeText.val();
			d = !0;
			b && d ? (c.writeSave.add(c.writeSaveAndUse).css(c.normalCss).addClass("flipHTML5Signature-normal").removeClass("flipHTML5Signature-hover"), c.hasAndChangeText = !0) : (c.hasAndChangeText = !1, c.writeSave.add(c.writeSaveAndUse).removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.disableCss))
		})
	},
	createDrawTypeUnder: function(b) {
		var c = this;
		this.$drawTypeUnder = $("<div class='flipHTML5Signature-drawType' style='position: relative;left: 0px;width: 100%;height: 340px;background-color: #C7C7C7;'></div>").append($("<div class='flipHTML5Signature-nuderMessage'></div>").html(this.drawMessage)).appendTo(b).hide();
		this.drawSave = $("<div class='flipHTML5Signature-typeBtn flipHTML5Signature-type-save' style='left: 161px;'></div>").html("Save").appendTo(this.$drawTypeUnder);
		this.drawSaveAndUse = $("<div class='flipHTML5Signature-typeBtn flipHTML5Signature-type-save-use' style='left: 275px;'></div>").html("Save & Use").appendTo(this.$drawTypeUnder);
		b = $("<div class='flipHTML5Signature-typeBtn flipHTML5Signature-type-cancel'></div>").html("Cancel").appendTo(this.$drawTypeUnder);
		this.drawSave.add(this.drawSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(this.disableCss);
		this.drawSave.on("click touchend",
		function() {
			if (c.hasDrawFlag) {
				var b = c.trimCanvas(v);
				c.savePoints = c.points.concat();
				c.savePoints.push({
					color: c.drawColor
				});
				c.saveDraw(b)
			}
		});
		this.drawSaveAndUse.on(_event._down,
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		this.drawSaveAndUse.on(_event._end,
		function(b) {
			if (c.hasDrawFlag) {
				var d = c.trimCanvas(v);
				c.savePoints = c.points.concat();
				c.savePoints.push({
					color: c.drawColor
				});
				c.saveAndUseDraw(d)
			}
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		c.drawSave.on("mouseover.signature touchstart.signature",
		function(b) {
			c.hasDrawFlag && c.drawSave.removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(c.overCss)
		});
		c.drawSaveAndUse.on("mouseover.signature touchstart.signature",
		function(b) {
			c.hasDrawFlag && c.drawSaveAndUse.removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(c.overCss)
		});
		c.drawSave.on("mouseout.signature touchend.signature",
		function(b) {
			c.hasDrawFlag && c.drawSave.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		c.drawSaveAndUse.on("mouseout.signature touchend.signature",
		function(b) {
			c.hasDrawFlag && c.drawSaveAndUse.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		c.drawSave.on("mousedown.signature",
		function(b) {
			c.hasDrawFlag && c.drawSave.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.downCss)
		});
		c.drawSaveAndUse.on("mousedown.signature",
		function(b) {
			c.hasDrawFlag && c.drawSaveAndUse.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.downCss)
		});
		c.drawSave.add($(document)).on("mouseup.signature",
		function(b) {
			c.hasDrawFlag && c.drawSave.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		c.drawSaveAndUse.add($(document)).on("mouseup.signature",
		function(b) {
			c.hasDrawFlag && c.drawSaveAndUse.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		b.on("click touchend",
		function() {
			c.$writeTypeUnder.hide();
			c.$drawTypeUnder.hide();
			c.$signatureUnder.show()
		});
		b = $("<div class='flipHTML5Signature-drawTypeMid' style='position: absolute;left: 10px;top: 53px;width: 540px;height: 90px;'></div>").css({
			boxShadow: "rgb(166, 166, 166) 1px 1px 0px inset, rgb(246, 246, 246) 1px 1px 0px"
		}).appendTo(this.$drawTypeUnder);
		var d = $("<div class='flipHTML5Signature-drawTypeMid-lineWidth' style='position: absolute;width: 180px;height: 16px;left: 20px;top: 15px;'></div>").appendTo(b).append($("<img>").attr("src", this.address + "pen.png")),
		e = $("<div style='position: absolute;width: 100px;height: 4px; background-color: #E0E0E0;left: 20px;top: 6px;border-radius: 2px;'></div>").css({
			boxShadow: "rgb(166, 166, 166) 1px 1px 0px inset, rgb(246, 246, 246) 1px 1px 0px"
		}).appendTo(d),
		f = $("<div style='position: absolute;cursor:pointer;width: 0px; height: 0px;border-bottom-width: 11px;border-style: solid;border-left-width: 6px;border-right-width: 6px;top: -3px;border-color: transparent;border-bottom-color: #373737;left: -4px;'></div>").appendTo(e),
		g = $("<input type='text' style='position: absolute;width: 40px;height: 13px;left: 130px;top: 0px;'/>").appendTo(d),
		h = $("<div class='flipHTML5Signature-drawTypeMid-undo'></div>").css({
			left: 28
		}).appendTo(b).html("UNDO"),
		k = $("<div class='flipHTML5Signature-drawTypeMid-redo'></div>").css({
			left: 80
		}).appendTo(b).html("REDO"),
		l = $("<div class='flipHTML5Signature-drawTypeMid-clearAll'></div>").css({
			left: 152,
			width: 78
		}).html("Clear All").appendTo(b);
		this.clearAllBtn = l;
		h.add(k).add(l).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(this.disableCss);
		this.undo = h;
		this.redo = k;
		h.on("mouseover.signature touchstart.signature",
		function(b) {
			c.undoIsUse && h.removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(c.overCss)
		});
		k.on("mouseover.signature touchstart.signature",
		function(b) {
			c.redoIsUse && k.removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(c.overCss)
		});
		l.on("mouseover.signature touchstart.signature",
		function(b) {
			c.clearAllFalg && l.removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(c.overCss)
		});
		h.on("mouseout.signature touchend.signature",
		function(b) {
			c.undoIsUse && h.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		k.on("mouseout.signature touchend.signature",
		function(b) {
			c.redoIsUse && k.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		l.on("mouseout.signature touchend.signature",
		function(b) {
			c.clearAllFalg && l.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		h.on("mousedown.signature",
		function(b) {
			c.undoIsUse && h.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.downCss)
		});
		k.on("mousedown.signature",
		function(b) {
			c.redoIsUse && k.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.downCss)
		});
		l.on("mousedown.signature",
		function(b) {
			c.clearAllFalg && l.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.downCss)
		});
		h.add($(document)).on("mouseup.signature",
		function(b) {
			c.undoIsUse && h.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		k.add($(document)).on("mouseup.signature",
		function(b) {
			c.redoIsUse && k.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		l.add($(document)).on("mouseup.signature",
		function(b) {
			c.clearAllFalg && l.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)
		});
		var m = $("<div class='flipHTML5Signature-drawTypeMid-preview'></div>").html("Preview").appendTo(b),
		p = 60 / 140 * 16,
		n = document.createElement("canvas"),
		q = n.getContext("2d"),
		s = $(n).css({
			position: "absolute",
			left: 0,
			top: -Math.floor(p)
		});
		m.append(s);
		this.previewCanvas = n;
		this.previewContext = q;
		n.width = 234;
		n.height = 60 + Math.ceil(p) + 10;
		b = this.colorPicker(b);
		b.container.css({
			left: 220,
			top: 11
		});
		var r, w, u;
		g[0].value = parseFloat((7 * (parseInt(f.css("left")) + 4) + 1).toFixed(2));
		f.on("mousedown touchstart",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
			r = b.clientX - f.position().left;
			e.add(d).add($(document)).on("mousemove.lineWidth touchmove.lineWidth",
			function(b) {
				b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
				w = b.clientX - r;
				w = -4 >= w ? -4 : 93 <= w ? 93 : w;
				f.css({
					left: w
				});
				u = (w + 4) / 97 * 7 + 1;
				u = parseFloat(u.toFixed(2));
				g[0].value = u
			});
			d.add($(document)).on("mouseup.lineWidth touchend.lineWidth",
			function() {
				c.changeLineWidth(u);
				e.add(d).add($(document)).off("mousemove.lineWidth touchmove.lineWidth");
				d.add($(document)).off("mouseup.lineWidth touchend.lineWidth")
			});
			return ! 1
		});
		e.on("mousedown touchstart",
		function(b) {
			b = b.clientX - e.offset().left;
			b = 0 >= b ? 0 : 97 <= b ? 97 : b;
			f.css({
				left: b - 4
			});
			u = b / 97 * 7 + 1;
			u = parseFloat(u.toFixed(2));
			g[0].value = u;
			c.changeLineWidth(u)
		});
		g.on("change",
		function() {
			var b = g[0].value;
			isNaN(b) ? g[0].value = parseFloat(((f.position().left + 4) / 97 * 7 + 1).toFixed(2)) : (1 > b ? (g[0].value = 1, f.css({
				left: -4
			})) : 8 < b ? (g[0].value = 8, f.css({
				left: 93
			})) : (g[0].value = b, f.css({
				left: (b - 1) / 7 * 97 - 4
			})), c.changeLineWidth(g[0].value))
		});
		l.on("click touchend",
		function() {
			c.clearAllFalg && (x.clearRect(0, 0, v.width, v.height), q.clearRect(0, 0, n.width, n.height), c.drawSave.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss), c.hasDrawFlag = !1, c.redoIsUse = !0, k.css(c.normalCss).addClass("flipHTML5Signature-normal").removeClass("flipHTML5Signature-hover"), c.undoIsUse = !1, h.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.disableCss), y = c.drawOldPoints.length - 1, l.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss), c.clearAllFalg = !1, c.points = [])
		});
		var y = 0;
		h.on("mousedown.signature touchstart.signature",
		function(b) {
			if (c.undoIsUse) {
				c.redoIsUse = !0;
				k.css(c.normalCss).addClass("flipHTML5Signature-normal").removeClass("flipHTML5Signature-hover");
				y += 1;
				y = y >= c.drawOldPoints.length ? c.drawOldPoints.length - 1 : y;
				x.clearRect(0, 0, v.width, v.height);
				q.clearRect(0, 0, n.width, n.height);
				var d = c.drawOldPoints[c.drawOldPoints.length - 1 - y];
				c.points = d.concat();
				c.draw(v, x, c.drawOldPoints[c.drawOldPoints.length - 1 - y], c.drawColor, c.lineWidth);
				c.drawPreview(n, q, d, c.drawColor, c.lineWidth);
				c.drawSave.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss);
				c.hasDrawFlag = !0;
				l.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss);
				c.clearAllFalg = !0;
				y == c.drawOldPoints.length - 1 && (c.undoIsUse = !1, h.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.disableCss), c.drawSave.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss), c.hasDrawFlag = !1, l.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss), c.clearAllFalg = !1);
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			}
		});
		k.on("mousedown.signature touchstart.signature",
		function(b) {
			if (c.redoIsUse) {
				c.undoIsUse = !0;
				h.css(c.normalCss).addClass("flipHTML5Signature-normal").removeClass("flipHTML5Signature-hover");
				y -= 1;
				y = 0 >= y ? 0 : y;
				x.clearRect(0, 0, v.width, v.height);
				q.clearRect(0, 0, n.width, n.height);
				var d = c.drawOldPoints[c.drawOldPoints.length - 1 - y];
				c.points = d.concat();
				c.draw(v, x, c.drawOldPoints[c.drawOldPoints.length - 1 - y], c.drawColor, c.lineWidth);
				c.drawPreview(n, q, d, c.drawColor, c.lineWidth);
				c.drawSave.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss);
				c.hasDrawFlag = !0;
				l.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss);
				c.clearAllFalg = !0;
				0 == y && (c.redoIsUse = !1, k.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.disableCss));
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			}
		});
		c.drawOldPoints.push([]);
		m = $("<div class='flipHTML5Signature-drawTypeBottom-out' style='position: absolute;left: 0px;top: 150px;width: 100%;height: 124px;'></div>").appendTo(this.$drawTypeUnder);
		p = $("<div class='flipHTML5Signature-drawTypeBottom' style='position: absolute;left: 9px;top: 0px;width: 540px;height: 140px;border: 1px solid #cccccc;background-color: #ffffff;'></div>").css({
			boxShadow: "rgb(166, 166, 166) 1px 1px 0px inset, rgb(246, 246, 246) 1px 1px 0px"
		}).appendTo(m);
		m.css({
			cursor: "url(" + c.address + "pen.png),auto"
		});
		var v = document.createElement("canvas"),
		t = window.canvas = $(v);
		p.append(t);
		v.width = 540;
		v.height = 158;
		$(v).css({
			position: "absolute",
			left: 0,
			top: -16
		});
		var x = v.getContext("2d");
		this.canvas = v;
		this.context = x;
		this.points = [];
		this.drawColor = b.message[0].style.backgroundColor;
		this.lineWidth = 1;
		var z, C;
		t.on(_event._down,
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
			if (c.redoIsUse) {
				var d = c.drawOldPoints.length;
				c.drawOldPoints.length = d - y;
				c.points = c.drawOldPoints[d - y - 1].concat();
				y = 0
			}
			c.undoIsUse = !0;
			h.css(c.normalCss).addClass("flipHTML5Signature-normal").removeClass("flipHTML5Signature-hover");
			c.redoIsUse = !1;
			k.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.disableCss);
			c.clearAllFalg = !0;
			l.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss);
			c.hasDrawFlag = !0;
			c.drawSave.add(c.drawSaveAndUse).css(c.normalCss).addClass("flipHTML5Signature-normal").removeClass("flipHTML5Signature-hover");
			z = {
				x: b.clientX - t.offset().left + 0,
				y: b.clientY - t.offset().top + 16,
				t: 0,
				w: c.lineWidth
			};
			c.points.push(z);
			t.on(_event._move,
			function(b) {
				b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
				C = {
					x: b.clientX - t.offset().left + 0,
					y: Math.min(b.clientY - t.offset().top + 16, 156),
					t: 1
				};
				c.points.push(C);
				c.draw(v, x, c.points, c.drawColor, c.lineWidth);
				c.drawPreview(n, q, c.points, c.drawColor, c.lineWidth)
			});
			t.add($(document)).on("mouseup.signature touchend.signature",
			function() {
				c.drawOldPoints.push(c.points.concat());
				t.off(_event._move);
				t.add($(document)).off("mouseup.signature touchend.signature")
			});
			return ! 1
		})
	},
	addSignatureImg: function(b, c, d) {
		var e = this;
		b.on("mousedown.hideToolBar touchstart.hideToolBar",
		function(b) {
			e.toolBar && e.toolBar.hide()
		});
		b.css({
			cursor: "pointer"
		});
		void 0 != e.onCreated ? e.onCreated[1].call(e.onCreated[0]) : e.hide();
		b.off("mousedown.signature touchstart.signature");
		b.on("mousedown.signature touchstart.signature",
		function(f) {
			b.off("mousedown.signature touchstart.signature");
			if (isTouch || 1 === f.which) {
				var g = new Date,
				h = g.getTime(),
				g = g.format("MM/dd/yyyy hh:mm:ss");
				e.showTimeFalg[h] = !1;
				var k = (f.pageX || f.originalEvent.touches[0].pageX) / BookInfo.scale() - b.offset().left,
				l = (f.pageY || f.originalEvent.touches[0].pageY) / BookInfo.scale() - b.offset().top,
				k = e.parseData({
					left: k,
					top: l,
					width: c.width,
					height: c.height
				},
				b[0].offsetWidth, b[0].offsetHeight),
				l = $.extend({},
				c, {
					width: k.width,
					height: k.height
				});
				e.oldData[h] = l;
				e.createSignatureImg(b, l, d, k.left, k.top, h, g);
				e.signatureCookies.push({
					type: l.type,
					data: 0 === c.type ? e.saveText: e.savePoints,
					key: h,
					page: d,
					currentTime: g,
					left: k.left,
					top: k.top,
					width: l.width,
					height: l.height
				});
				e.addLocalStorage(e.signatureName, e.parseToString(e.signatureCookies));
				f.preventDefault();
				f.stopPropagation();
				return ! 1
			}
		});
		b.add($(document)).add(BookInfo.container()).on("mouseup.signature touchend.signature",
		function(c) {
			$.each(BookInfo.getCurrentPages(),
			function(b, c) {
				var d = e.signatureContexts[BookInfo.getBookType()][c];
				d && (d.css({
					cursor: ""
				}), d.off("mousedown.signature touchstart.signature"))
			});
			b.off("mousedown.signature touchstart.signature");
			b.add($(document)).add(BookInfo.container()).off("mousedown.signature touchstart.signature")
		})
	},
	createSignatureImg: function(b, c, d, e, f, g, h) {
		var k = this;
		b.on("mousedown.hideToolBar touchstart.hideToolBar",
		function() {
			k.toolBar && k.toolBar.hide()
		});
		var l = $("<div class='flipHTML5Signature-eachSignatureImg' style='cursor: move;'></div>").append($("<img style='width: 100%;height: 100%;position: absolute;left: 0px;top: 0px;'/>").attr("src", c.url)).attr("data-key", g).attr("data-page", d).css({
			position: "absolute",
			width: c.width,
			height: c.height,
			left: e,
			top: f
		}).appendTo(b),
		m = $("<div class='flipHTML5Signature-eachDate' style='position: absolute;width: 180px;height: 45px;border: 1px dashed #2F2F2F;top: -24px;'></div>").css({
			left: c.width + 2
		}).hide().html(h);
		c = $("<img/>").attr("src", k.address + "signature_dateClose.png").css({
			position: "absolute",
			top: 0,
			right: 0,
			cursor: "pointer"
		});
		m.appendTo(l).append(c);
		c.off("mousedown touchstart");
		c.on("mousedown touchstart",
		function() {
			var b = k.currentObj.attr("data-key");
			m.hide();
			k.showTimeFalg[b] = !1
		});
		m.off("mousedown touchstart");
		m.on("mousedown touchstart",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		l.off("mouseover.signature touchstart.signature");
		l.on("mouseover.signature touchstart.signature",
		function() {
			l.css({
				border: "1px solid #ff0000"
			})
		});
		l.off("mouseout.signature touchend.signature");
		l.on("mouseout.signature touchend.signature",
		function() {
			l.css({
				border: 0
			})
		});
		l.off("mousedown.getObj touchstart.getObj");
		l.on("mousedown.getObj touchstart.getObj",
		function(b) {
			$(".flipHTML5Signature-eachSignatureImg").css({
				zIndex: 1
			});
			l.css({
				zIndex: 4
			});
			k.currentObj = l;
			k.toolBar.css({
				left: l.offset().left - k.container.offset().left,
				top: l.offset().top - k.container.offset().top - k.toolBar.outerHeight()
			}).show()
		});
		var p = !1;
		l.off("mousedown.signatureImg touchstart.signatureImg");
		l.on("mousedown.signatureImg touchstart.signatureImg",
		function(c) {
			var d = c.pageX || c.originalEvent.touches[0].pageX,
			e = c.pageY || c.originalEvent.touches[0].pageY,
			h = l[0].offsetLeft,
			m = l[0].offsetTop;
			b.on("mousemove.signatureImg touchmove.signatureImg",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				p = !0;
				var c = h - (d - (b.pageX || b.originalEvent.touches[0].pageX)) / BookInfo.scale();
				f = m - (e - (b.pageY || b.originalEvent.touches[0].pageY)) / BookInfo.scale();
				l.css({
					left: c,
					top: f
				});
				k.toolBar.css({
					left: l.offset().left - k.container.offset().left,
					top: l.offset().top - k.container.offset().top - k.toolBar.outerHeight()
				}).show();
				k.showTimeFalg[g] && k.reviseDateTag()
			});
			l.add(b).add($(document)).on("mouseup.signatureImg touchend.signatureImg",
			function() {
				b.off("mousemove.signatureImg touchmove.signatureImg");
				l.add(b).add($(document)).off("mouseup.signatureImg touchend.signatureImg");
				if (p) {
					var c = l.attr("data-key"),
					d = k.parseObject(k.currentObj[0]);
					k.updateArrayOrderKey(k.signatureCookies, c, {
						left: d.left,
						top: d.top
					});
					k.addLocalStorage(k.signatureName, k.parseToString(k.signatureCookies))
				}
			});
			c.preventDefault();
			c.stopPropagation();
			return ! 1
		});
		b.css({
			cursor: ""
		})
	},
	draw: function(b, c, d, e, f) {
		var g = -1,
		h = d.length;
		c.clearRect(0, 0, b.width, b.height);
		c.save();
		c.beginPath();
		c.lineJoin = "round";
		c.strokeStyle = e;
		for (c.lineWidth = f; ++g < h;) b = d[g],
		0 === b.t ? (c.stroke(), c.beginPath(), c.lineWidth = b.w, c.moveTo(b.x, b.y)) : c.lineTo(b.x, b.y);
		c.stroke();
		c.restore()
	},
	drawPreview: function(b, c, d, e, f) {
		var g = -1,
		h = d.length,
		k = 140 / 60,
		l = 540 / 234;
		c.clearRect(0, 0, b.width, b.height);
		c.save();
		c.beginPath();
		c.lineJoin = "round";
		c.strokeStyle = e;
		for (c.lineWidth = f; ++g < h;) b = d[g],
		0 === b.t ? (c.stroke(), c.beginPath(), c.lineWidth = b.w / k, c.moveTo(b.x / l, b.y / k)) : c.lineTo(b.x / l, b.y / l);
		c.stroke();
		c.restore()
	},
	trimCanvas: function(b) {
		var c = b.getContext("2d"),
		d = document.createElement("canvas").getContext("2d"),
		e = c.getImageData(0, 0, b.width, b.height),
		f = e.data.length,
		g,
		h = null,
		k = null,
		l = null,
		m = null,
		p,
		n;
		for (g = 0; g < f; g += 4) 0 !== e.data[g + 3] && (p = g / 4 % b.width, n = ~~ (g / 4 / b.width), null === h && (h = n), null === k ? k = p: p < k && (k = p), null === l ? l = p: l < p && (l = p), null === m ? m = n: m < n && (m = n));
		b = m - h;
		l -= k;
		c = c.getImageData(k, h, l, b);
		d.canvas.width = l;
		d.canvas.height = b;
		d.putImageData(c, 0, 0);
		return {
			url: d.canvas.toDataURL("image/png"),
			width: l,
			height: b
		}
	},
	saveDraw: function(b) {
		if (this.currentDrawSave) {
			this.currentDrawSave.empty();
			var c = this.currentDrawSave.width(),
			d = this.currentDrawSave.height(),
			e = c / d,
			f = b.width,
			g = b.height,
			h = f / g;
			c > f && d > g ? (e = f, c = (c - e) / 2, d = (d - g) / 2) : c > f && d < g ? (e = d * h, g = d, c = (c - e) / 2, d = (d - g) / 2) : c < f && d > g ? (e = c, g = c / h, c = (c - e) / 2, d = (d - g) / 2) : e > h ? (g = d, e = d * h, c = (c - e) / 2, d = 0) : e < h ? (e = c, g = c / h, c = 0, d = (d - g) / 2) : (e = c, g = d, d = c = 0);
			this.currentDrawSave.append($("<img/>").css({
				position: "absolute",
				width: e,
				height: g,
				left: c,
				top: d
			}).attr("src", b.url))
		}
		this.drawOldData = b;
		this.currentDrawEdit.show();
		this.currentDrawDel.show();
		this.$writeTypeUnder.hide();
		this.$drawTypeUnder.hide();
		this.$signatureUnder.show()
	},
	saveAndUseDraw: function(b) {
		var c = this,
		d = BookInfo.getCurrentPages();
		$.each(d,
		function(d, f) {
			var g = c.signatureContexts[BookInfo.getBookType()][f];
			g && (b.type = 1, c.addSignatureImg(g, b, f))
		});
		c.saveDraw(b)
	},
	saveWrite: function(b) {
		this.currentWriteSave.html(b);
		this.currentWriteEdit.show();
		this.currentWriteDel.show();
		this.$writeTypeUnder.hide();
		this.$drawTypeUnder.hide();
		this.$signatureUnder.show()
	},
	saveAndUseWrite: function(b) {
		var c = this,
		d = c.drawTextByDiv(b, "38px", "Mistral", "#000000"),
		e = BookInfo.getCurrentPages();
		$.each(e,
		function(b, e) {
			var h = c.signatureContexts[BookInfo.getBookType()][e];
			h && (d.type = 0, h.css({
				cursor: ""
			}), c.addSignatureImg(h, d, e))
		});
		c.saveWrite(b)
	},
	drawTextByDiv: function(b, c, d, e) {
		var f = document.createElement("canvas"),
		g = window.context = f.getContext("2d");
		g.fillStyle = e;
		g.font = "" + c + " " + d + "";
		var h = g.measureText(b).width + 8;
		f.width = h;
		f.height = 54;
		g.fillStyle = e;
		g.font = "" + c + " " + d + "";
		g.textBaseline = "top";
		g.fillText(b, 3, 0);
		return {
			url: f.toDataURL("image/png"),
			width: h,
			height: 54
		}
	},
	parseObject: function(b) {
		if (document.getElementsByTagName("body")[0].contains(b)) {
			var c, d, e;
			e = b.parentNode;
			var f = b.style,
			g = $(b);
			d = 100 / e.offsetHeight;
			c = 100 / e.offsetWidth;
			e = b.offsetLeft * c + "%";
			b = b.offsetTop * d + "%";
			c = g.width() * c + "%";
			d = g.height() * d + "%";
			f.width = c;
			f.height = d;
			f.left = e;
			f.top = b;
			return {
				width: c,
				height: d,
				left: e,
				top: b
			}
		}
	},
	parseData: function(b, c, d) {
		d = 100 / d;
		c = 100 / c;
		return {
			width: b.width * c + "%",
			height: b.height * d + "%",
			left: b.left * c + "%",
			top: b.top * d + "%"
		}
	},
	close: function() {
		this.$signature.hide();
		this.$signatureUnder.show();
		this.$writeTypeUnder.hide();
		this.$drawTypeUnder.hide();
		this.showFlag = !1
	},
	show: function() {
		this.$signature.show();
		this.$signatureUnder.show();
		this.$writeTypeUnder.hide();
		this.$drawTypeUnder.hide();
		this.showFlag = !0
	},
	hide: function() {
		this.close()
	},
	showHide: function() {
		this.showFlag ? this.hide() : this.show()
	},
	changeColor: function(b) {
		this.drawColor = b;
		this.draw(this.canvas, this.context, this.points, b, this.lineWidth);
		this.drawPreview(this.previewCanvas, this.previewContext, this.points, this.drawColor, this.lineWidth);
		return b
	},
	changeLineWidth: function(b) {
		return this.lineWidth = b
	},
	colorPicker: function(b) {
		var c, d, e, f = this,
		g = "#FF0000 #FF5555 #FF55AA #FF55FF #FFAA55 #FFAAAA #FFAAFF #FFFF55 #FFFFAA #FFFFFF #CC0000 #CC5555 #CC55AA #CC55FF #CCAA55 #CCAAAA #CCAAFF #CCFF55 #CCFFAA #CCFFFF #AA0000 #AA5555 #AA55AA #AA55FF #AAAA55 #AAAAAA #AAAAFF #AAFF55 #AAFFAA #AAFFFF #880000 #885555 #8855AA #8855FF #88AA55 #88AAAA #88AAFF #88FF55 #88FFAA #88FFFF #550000 #555555 #5555AA #5555FF #55AA55 #55AAAA #55AAFF #55FF55 #55FFAA #55FFFF #220000 #225555 #2255AA #2255FF #22AA55 #22AAAA #22AAFF #22FF55 #22FFAA #22FFFF #000000 #005555 #0055AA #0055FF #00AA55 #00AAAA #00AAFF #00FF55 #00FFAA #00FFFF".split(" "),
		h = document.createElement("table");
		c = document.createElement("a");
		var k = $(c),
		l = document.createElement("input"),
		m = function() {},
		p = function() {
			h.style.display = "none";
			l.value = l.style.backgroundColor = this.title.toUpperCase();
			f.changeColor(this.title.toUpperCase())
		};
		k.appendTo(b);
		c.className = "flipHtml5ColorSelectorWrap";
		h.setAttribute("border", "1");
		c.style.position = "absolute";
		c.href = "javascript:void(0);";
		l.type = "text";
		l.className = "flipHtml5ColorSelectorMessage";
		l.style.width = "20px";
		l.style.height = "20px";
		l.value = l.style.backgroundColor = "#000000";
		l.style.cursor = "pointer";
		l.style.padding = "0px";
		c.appendChild(l);
		c.appendChild(h);
		h.style.display = "none";
		h.style.position = "relative";
		h.style.zIndex = 9999;
		h.style.backgroundColor = "#ffffff";
		for (d = 0; 7 > d; d++) {
			e = document.createElement("tr");
			e.style.position = "relative";
			for (c = 0; 10 > c; c++) b = document.createElement("td"),
			b.className = "flipHtml5ColorSelectorBlock",
			b.style.position = "relative",
			b.style.width = "14px",
			b.style.height = "14px",
			b.title = g[10 * d + c],
			b.style.backgroundColor = g[10 * d + c],
			$(b).on("mouseenter", m),
			$(b).on("click touchstart", p),
			e.appendChild(b);
			h.appendChild(e)
		}
		$(l).on("click touchstart",
		function(b) {
			h.style.display = "table-cell";
			b.stopPropagation();
			b.stopPropagation();
			return ! 1
		});
		$(document).on("click touchstart",
		function() {
			h.style.display = "none"
		});
		return {
			container: k,
			message: $(l)
		}
	},
	setContainers: function(b, c, d) {
		void 0 == this.signatureContexts[b] && (this.signatureContexts[b] = {});
		this.signatureContexts[b][c] = d;
		b == BookInfo.getBookType() && (this.toolBar.hide(), this.addSignatureByPageIndex(c, d))
	},
	addSignatureByPageIndex: function(b, c) {
		c.find(".flipHTML5Signature-eachSignatureImg").remove();
		for (var d = 0; d < this.signatureCookies.length; d++) {
			var e = this.signatureCookies[d];
			if (e.page === b) {
				var f = e.left,
				g = e.top,
				h = e.key,
				k = e.currentTime;
				if (0 == e.type) var l = this.drawTextByDiv(e.data, "38px", "Mistral", "#000000"),
				m = this.parseData({
					left: f,
					top: g,
					width: l.width,
					height: l.height
				},
				c[0].offsetWidth, c[0].offsetHeight);
				else {
					l = document.createElement("canvas");
					l.width = 540;
					l.height = 158;
					$(l).css({
						position: "absolute",
						left: 0,
						top: -16
					});
					var m = l.getContext("2d"),
					p = e.data.concat(),
					n = p.pop();
					this.draw(l, m, p, n.color, 1);
					l = this.trimCanvas(l);
					m = this.parseData({
						left: f,
						top: g,
						width: l.width,
						height: l.height
					},
					c[0].offsetWidth, c[0].offsetHeight)
				}
				this.oldData[h] = $.extend({},
				l, {
					width: m.width,
					height: m.height
				});
				l = $.extend({},
				l, {
					width: e.width,
					height: e.height
				});
				this.createSignatureImg(c, l, e.page, f, g, h, k)
			}
		}
	},
	getLocalStorage: function(b) {
		try {
			if (window.localStorage) return window.localStorage.getItem(b);
			for (var c = document.cookie.split("; "), d = 0; d < c.length; d++) {
				var e = c[d].split("=");
				if (e[0] == b) return unescape(e[1])
			}
			return ""
		} catch(f) {}
	},
	addLocalStorage: function(b, c) {
		try {
			if (window.localStorage) window.localStorage.setItem(b, c);
			else {
				var d = b + "=" + escape(c),
				e = new Date;
				e.setTime(e.getTime() + 864E8);
				d += "; expires=" + e.toGMTString();
				document.cookie = d
			}
		} catch(f) {}
	},
	parseToString: function(b) {
		if (0 == b.length) return "";
		for (var c = "[",
		d = 0; d < b.length; d++) c = 0 == b[d].type ? c + ("{type:" + b[d].type + ",key:" + b[d].key + ",data:'" + b[d].data + "',page:" + b[d].page + ",currentTime:'" + b[d].currentTime + "',left:'" + b[d].left + "',top:'" + b[d].top + "',width:'" + b[d].width + "',height:'" + b[d].height + "'},") : c + ("{type:" + b[d].type + ",key:" + b[d].key + ",data:" + this.parsePointsToString(b[d].data) + ",page:" + b[d].page + ",currentTime:'" + b[d].currentTime + "',left:'" + b[d].left + "',top:'" + b[d].top + "',width:'" + b[d].width + "',height:'" + b[d].height + "'},");
		c = c.substring(0, c.length - 1);
		return c + "]"
	},
	parsePointsToString: function(b) {
		if (0 != b.length) {
			for (var c = "[",
			d = 0; d < b.length - 1; d++) c += "{x:" + b[d].x + ",y:" + b[d].y + ",t:" + b[d].t + ",w:" + b[d].w + "},";
			c += "{color:'" + b[b.length - 1].color + "'}";
			return c + "]"
		}
	},
	delArrayOrderKey: function(b, c) {
		if (b) for (var d = 0; d < b.length; d++) b[d].key && b[d].key == c && b.remove(d)
	},
	updateArrayOrderKey: function(b, c, d) {
		if (b) for (var e = 0; e < b.length; e++) b[e].key && b[e].key == c && $.extend(b[e], d)
	},
	createCursorImg: function(b, c, d) {
		var e = $("<img/>").attr("src", b.url).css({
			position: "absolute",
			width: b.width,
			height: b.height,
			left: c + 10,
			top: d + 10
		}).appendTo(this.container);
		e.on("mousemove touchmove",
		function(b) {
			e.css({
				left: b.clientX + 10,
				top: b.clientY + 10
			})
		});
		return e
	},
	reviseDateTag: function() {
		if (this.currentObj) {
			var b = this.currentObj.find(".flipHTML5Signature-eachDate"),
			c = this.currentObj.parent(),
			d = parseInt(this.currentObj.css("left")),
			e = parseInt(this.currentObj.css("top"));
			this.currentObj.position();
			var f = this.currentObj.outerWidth(),
			g = this.currentObj.outerHeight(),
			h = c.width();
			c.height();
			var c = b.outerWidth(),
			k = b.outerHeight(),
			l = this.toolBar.height();
			d + f + 2 + c <= h ? b.css({
				left: f + 2,
				top: -24
			}) : k + l <= e ? b.css({
				left: f - c,
				top: -(k + l)
			}) : b.css({
				left: f - c,
				top: g + 18
			})
		}
	},
	bindOnCreated: function(b, c) {
		this.onCreated = [b, c]
	}
}); (function(b, c, d) {
	window.Remark = c({
		statics: {},
		create: function() {
			this.expires = 30;
			this.currentEditor = b("<div>");
			this.backgroundColor = "rgba(255, 255, 85, 0.5)";
			this.highlightBackcolor = "rgba(2, 255, 245, 0.5)";
			this.fontSize = 5;
			this.fontName = "Times";
			this.$bookContainer = d.container();
			this.fontColor = "black";
			this.title = "#00000";
			this.opacity = "1.0";
			this.noteImgContainers = {};
			this.$document = b(document);
			this.newSizeWrap();
			var c = this.createToolbar(),
			f = this.createHighlightToolbar();
			c.appendChild(this.createColorSelector());
			document.getElementsByTagName("body")[0].appendChild(c).appendChild(f);
			document.getElementsByTagName("body")[0].appendChild(f);
			b(window).on("beforeunload",
			function() {
				this.save()
			}.bind(this));
			this.oneBindEvent()
		},
		bindOnCreated: function(b, c) {
			this.onCreated = [b, c]
		},
		bindCreateEvents: function(c, f, g) {
			var h, k, l, m, p, n, q, s = this,
			r = Math.floor,
			w = c.offset().left,
			u = c.offset().top,
			y = function(b) {
				b.preventDefault();
				l = b.pageX ? b.pageX: b.originalEvent.touches ? b.originalEvent.touches[0].pageX: 0;
				m = b.pageY ? b.pageY: b.originalEvent.touches ? b.originalEvent.touches[0].pageY: 0;
				l && (0 > l - h ? (n.left = r((l - w) / d.scale()) + "px", n.width = r((h - l) / d.scale()) + "px") : (n.left = r((h - w) / d.scale()) + "px", n.width = r((l - h) / d.scale()) + "px"));
				m && (0 > b.pageY - k ? (n.top = r((m - u) / d.scale()) + "px", n.height = r((k - m) / d.scale()) + "px") : (n.top = r((k - u) / d.scale()) + "px", n.height = r((m - k) / d.scale()) + "px"));
				g && g.draw(h, k, l, m)
			};
			c.css("cursor", "crosshair");
			c.off("mousedown.fliphtml5Remark touchstart.fliphtml5Remark").one("mousedown.fliphtml5Remark touchstart.fliphtml5Remark",
			function(v) {
				s.unbindCreateEvents();
				var t = v.button;
				if (!document.implementation.hasFeature("MouseEvents", "2.0")) switch (event.button) {
				case 0:
				case 1:
				case 3:
				case 5:
				case 7:
					t = 0;
					break;
				case 2:
				case 6:
					t = 2;
					break;
				case 4:
					t = 1
				}
				if (!t) {
					v.stopPropagation();
					p = document.createElement("div");
					q = b(p).css({
						webkitUserSelect: "text",
						mozUserSelect: "text",
						msUserSelect: "text",
						oUserSelect: "text",
						userSelect: "text"
					});
					n = p.style;
					g ? (q.append(g), p.className = "flipHtml5Shape flipHtml5Store") : (n.backgroundColor = f ? "rgba(0, 71, 255, 0.33)": s.highlightBackcolor, p.className = (f ? "flipHtml5Remark flipHtml5Store": "flipHtml5Highlight flipHtml5Store") + " flipHtml5RemarkCurrentEditor", p.setAttribute("contenteditable", f));
					c.find(".flipHtml5RemarkCurrentEditor").removeClass("flipHtml5RemarkCurrentEditor");
					c.append(p);
					if (t = v.originalEvent.changedTouches) {
						var x = t[0].identifier;
						h = l = t[0].pageX;
						k = m = t[0].pageY
					} else h = l = v.pageX,
					k = m = v.pageY;
					s.reBindEvent(q, f);
					c.on("mousemove.fliphtml5Remark touchmove.fliphtml5Remark", y);
					c.off("mouseup.fliphtml5Remark touchend.fliphtml5Remark").one("mouseup.fliphtml5Remark touchend.fliphtml5Remark",
					function(b) {
						var g = b.originalEvent.changedTouches;
						if (g) {
							if (x !== g[0].identifier) return;
							l = g[0].pageX;
							m = g[0].pageY
						} else l = b.pageX,
						m = b.pageY;
						c.off("mousemove.fliphtml5Remark touchmove.fliphtml5Remark");
						if (10 > Math.abs(l - h) || 10 > Math.abs(m - k)) n.left = r((l - w) / d.scale()) + "px",
						n.top = r((m - u) / d.scale()) + "px",
						n.width = "280px",
						n.height = "28px";
						s.parsePresentValue(p);
						s.parsePresentValue(s.sizeWrap);
						q.css({
							outline: "none",
							backgroundColor: f ? s.backgroundColor: s.highlightBackcolor,
							color: s.fontColor
						});
						q.trigger(_event._down);
						void 0 != s.onCreated && s.onCreated[1].call(s.onCreated[0])
					})
				}
			})
		},
		oneBindEvent: function() {
			var b = this;
			this.$document.on("keydown.flipHtml5RemarkDelete",
			function(c) {
				var d = c.keyCode;
				c.altKey || c.ctrlKey || c.shiftKey || (b.editing && d === KEY_CODE_DELETE && b.currentEditor && "flipHtml5Remark flipHtml5Store" !== b.currentEditor[0].className && (b.currentEditor.remove(), b.removeSizeWrap(), b.save()), b.currentEditor && d === KEY_CODE_LEFT && d === KEY_CODE_RIGHT && d === KEY_CODE_UP && d === KEY_CODE_DOWN && c.stopPropagation())
			})
		},
		parsePresentValue: function(c) {
			if (document.getElementsByTagName("body")[0].contains(c)) {
				var d, g;
				d = c.parentNode;
				var h = c.style,
				k = b(c);
				g = 100 / d.offsetHeight;
				d = 100 / d.offsetWidth;
				h.width = k.width() * d + "%";
				h.height = k.height() * g + "%";
				h.left = c.offsetLeft * d + "%";
				h.top = c.offsetTop * g + "%"
			}
		},
		reBindEvent: function(c, d) {
			var g = this,
			h;
			c.on(_event._down,
			function(h) {
				h.stopPropagation();
				b(this).css({
					outline: "none"
				});
				g.removeSizeWrap();
				g.addSizeWrap(this, d);
				c.on("mousedown.flipHtml5Annotation touchstart.flipHtml5Annotation",
				function(b) {
					b.stopPropagation()
				})
			}).on("mousedown mouseup touchend",
			function(b) {
				b.stopPropagation()
			});
			c.on("sizeChange",
			function(b, c, e, p, n) {
				h = this.style;
				c && (h.width = c - 16 + "px");
				e && (h.height = e - 16 + "px");
				p && (h.left = p + 8 + "px");
				n && (h.top = n + 8 + "px");
				g.showToolbar(this, d)
			});
			c.on("change cut drop paste keydown",
			function(b) {
				if (! (b.altKey || b.ctrlKey || b.shiftKey)) {
					var c = this,
					d = c.offsetHeight,
					e = c.style,
					f = e.height;
					setTimeout(function() {
						e.height = "auto";
						e.height = c.scrollHeight > d ? 100 * c.scrollHeight / c.parentNode.offsetHeight + "%": f
					},
					0)
				}
			})
		},
		unbindCreateEvents: function() {
			this.contextArray.css("cursor", "auto");
			this.contextArray.off("mousedown.fliphtml5Remark touchstart.fliphtml5Remark")
		},
		newSizeWrap: function() {
			var c, f, g, h, k, l, m, p, n = this,
			q = 1,
			s = n.sizeWrap = document.createElement("div"),
			r = [],
			w = Math.floor,
			u = n.sizeWrapStyle = s.style;
			for (s.className = "flipHtml5SizeWrap"; 9 > q;) c = document.createElement("div"),
			c.className = "flipHtml5SizePoint flipHtml5SizePoint" + q,
			s.appendChild(c),
			r.push(c),
			q++;
			n.northResize(r[0]).westResize(r[0]);
			n.northResize(r[1]);
			n.eastResize(r[2]).northResize(r[2]);
			n.eastResize(r[3]);
			n.eastResize(r[4]).southResize(r[4]);
			n.southResize(r[5]);
			n.southResize(r[6]).westResize(r[6]);
			n.westResize(r[7]);
			b(s).on("mousedown.flipHtml5SizeWrap touchstart.flipHtml5SizeWrap",
			function(c) {
				c.preventDefault();
				c.stopPropagation();
				p = n.currentEditor;
				var e = s.offsetLeft,
				q = s.offsetTop,
				r = c.pageX || c.originalEvent.touches[0].pageX,
				z = c.pageY || c.originalEvent.touches[0].pageY;
				b.each([n.$context, b(n.toolbarContainer), b(n.highlightToolbarContainer)],
				function(c, y) {
					y.on("mousemove.flipHtml5SizeWrap touchmove.flipHtml5SizeWrap",
					function(b) {
						b.preventDefault();
						b.stopPropagation();
						f = b.pageX ? b.pageX: b.originalEvent.touches ? b.originalEvent.touches[0].pageX: 0;
						g = b.pageY ? b.pageY: b.originalEvent.touches ? b.originalEvent.touches[0].pageY: 0;
						f && (m = w(e - (r - f) / d.scale()), k !== m && (u.left = m + "px", k = m, p.trigger("sizeChange", [0, 0, m, 0])));
						g && (l = w(q - (z - g) / d.scale()), h !== l && (u.top = l + "px", h = l, p.trigger("sizeChange", [0, 0, 0, l])))
					});
					y.one("mouseup.flipHtml5SizeWrap touchend.flipHtml5SizeWrap",
					function() {
						b.each([n.$context, b(n.toolbarContainer), b(n.highlightToolbarContainer)],
						function() {
							this.off("mouseup.flipHtml5SizeWrap touchend.flipHtml5SizeWrap");
							this.off("mousemove.flipHtml5SizeWrap touchmove.flipHtml5SizeWrap")
						});
						n.parsePresentValue(p[0]);
						n.parsePresentValue(s)
					})
				})
			}).on(_event._down,
			function(b) {
				b.preventDefault();
				b.stopPropagation()
			});
			return s
		},
		addSizeWrap: function(c, d) {
			var g = this.sizeWrap,
			h = this.sizeWrap.style;
			d ? (c.style.zIndex = 999, h.zIndex = 998) : (c.style.zIndex = 998, h.zIndex = 999);
			h.width = c.offsetWidth + 16 + "px";
			h.height = c.offsetHeight + 16 + "px";
			h.left = c.offsetLeft - 8 + "px";
			h.top = c.offsetTop - 8 + "px";
			h.display = "block";
			c = b(c);
			this.$context = c.parent();
			c.before(g);
			this.parsePresentValue(g);
			this.currentEditor = c;
			this.showToolbar(c, d);
			this.editing = !0
		},
		removeSizeWrap: function() {
			this.currentEditor[0].style.zIndex = "2";
			this.sizeWrapStyle.zIndex = "1";
			this.sizeWrapStyle.display = "none";
			this.hideToolbar();
			this.editing = !1
		},
		hideToolbar: function() {
			this.toolbarContainer.style.display = "none";
			this.highlightToolbarContainer.style.display = "none"
		},
		showToolbar: function(c, d) {
			var g = d ? this.toolbarContainer: this.highlightToolbarContainer,
			h = g.style,
			k = b(c),
			l = k.css("backgroundColor").replace(/\s+/g, "");
			0 <= l.indexOf("rgba") && (l = l.replace(/a/, "").replace(/\,[0-9]+(\.[0-9]*)?\)/, ")"));
			b(g).find(".flipHtml5RemarkImage-backcolor").css("backgroundColor", l);
			this.currentEditor = k;
			h.left = k.offset().left - 8 + "px";
			h.top = k.offset().top - (d ? 80 : 30) + "px";
			h.display = "block"
		},
		createToolbar: function() {
			for (var c = this.toolbarContainer = document.createElement("div"), d = 0, g = "bold italic strikeThrough underline forecolor backcolor blockquote insertUnorderedList insertOrderedList justifyLeft justifyCenter justifyRight createLink removeFormat outdent indent undo redo delete paragraph fontsize fontname".split(" "); g[d];) c.appendChild(this.createButton(g[d])),
			d++;
			c.className = "fliphtml5RemarkToolbarContainer";
			b(c).on(_event._down,
			function(b) {
				b.preventDefault();
				b.stopPropagation()
			});
			return c
		},
		createHighlightToolbar: function() {
			for (var c = this.highlightToolbarContainer = document.createElement("div"), d = 0, g = ["backcolor", "delete"]; g[d];) c.appendChild(this.createButton(g[d], !0)),
			d++;
			c.className = "fliphtml5RemarkHighlightToolbarContainer";
			b(c).on(_event._down,
			function(b) {
				b.preventDefault();
				b.stopPropagation()
			});
			return c
		},
		createButton: function(c, d) {
			var g = this,
			h, k;
			switch (c) {
			case "hr":
				return k = document.createElement("hr"),
				k.className = "flipHtml5RemarkHr",
				k;
			case "paragraph":
				return h = "Paragraph;Address;Preformatted;Title 1;Title 2;Title 3;Title 4;Title 5;Title 6".split(";"),
				k = "p address pre h1 h2 h3 h4 h5 h6".split(" "),
				k = g.createSelect(h, k, c);
			case "fontname":
				return h = "Arial Century Courier Gentium Georgiae Impact King Lalit Modena Papyrus Tahoma TeX Times Verdana Verona cursive fantasy monospace serif".split(" "),
				k = "Arial Century Courier Gentium Georgiae Impact King Lalit Modena Papyrus Tahoma TeX Times Verdana Verona cursive fantasy monospace serif".split(" "),
				k = g.createSelect(h, k, c, "fontFamily");
			case "fontsize":
				return h = [1, 2, 3, 4, 5, 6, 7],
				k = [1, 2, 3, 4, 5, 6, 7],
				k = g.createSelect(h, k, c, "fontSize");
			case "forecolor":
				return g.createColorButton(c);
			case "backcolor":
				return g.createColorButton(c, d);
			default:
				return h = document.createElement("a"),
				h.href = "javascript:void(0);",
				k = document.createElement("div"),
				k.className = "flipHtml5RemarkButtonImage flipHtml5RemarkImage-" + c,
				k.title = c,
				h.className = "flipHtml5RemarkButton",
				b(h).on(_event._down,
				function(b) {
					b.preventDefault();
					b.stopPropagation();
					g.exec(c)
				}),
				h.appendChild(k),
				h
			}
		},
		createColorButton: function(c, d) {
			var g, h, k, l, m = this,
			p;
			g = document.createElement("a");
			g.href = "javascript:void(0);";
			h = document.createElement("div");
			h.className = "flipHtml5RemarkButtonImage flipHtml5RemarkImage-" + c;
			h.title = c;
			g.className = "flipHtml5RemarkButton";
			k = document.createElement("div");
			k.className = "flipHtml5RemarkColorBar";
			"backcolor" === c && (k.style.display = "none");
			b(g).on(_event._down,
			function(n) {
				n.preventDefault();
				n.stopPropagation();
				p = m.opacityHandel;
				l = m.colorSelector;
				b(g).after(l);
				l.style.left = this.offsetLeft + "px";
				l.style.top = this.offsetTop + 22 + "px";
				l.style.display = "block";
				"forecolor" === c && (p.hide(), m.opacity = 1);
				"backcolor" === c && (m.opacity = p.val(), p.show());
				p.setOpacity(parseFloat(parseFloat(m.currentEditor.css("backgroundColor").replace(/\s*\)*/g, "").split(",")[3]).toFixed(2)));
				m.$context.one(_event._down,
				function(b) {
					b.preventDefault();
					l.style.display = "none"
				});
				m.currentEditor.one(_event._down,
				function(b) {
					b.preventDefault();
					l.style.display = "none"
				});
				m.$bookContainer.one(_event._down,
				function(b) {
					b.preventDefault();
					l.style.display = "none"
				});
				m.$colorSelector.off("colorSelected").one("colorSelected",
				function(b, g) {
					b.preventDefault();
					"backcolor" === c ? h.style.backgroundColor = g: k.style.backgroundColor = g;
					l.style.display = "none";
					m.exec(c, g, d)
				})
			});
			g.appendChild(k);
			g.appendChild(h);
			return g
		},
		createSelect: function(b, c, d, h, k) {
			var l = document.createElement("select"),
			m = 0,
			p = this,
			n;
			l.className = "flipHtml5RemarkSelect flipHtml5Remark-" + d;
			for (l.style[h] = c[1]; b[m];) n = document.createElement("option"),
			n.className = "flipHtml5RemarkOption-" + d + " flipHtml5RemarkOption-" + c[m],
			n.innerHTML = b[m],
			n.value = c[m],
			n.style[h] = c[m],
			0 === m && (n.setAttribute("selected", !0), k && (n.style.display = "none")),
			l.appendChild(n),
			m++;
			l.onchange = h ?
			function() {
				p.exec(d, this[this.selectedIndex].value);
				this.style[h] = this[this.selectedIndex].value;
				k && (this.selectedIndex = 0)
			}: function() {
				p.exec(this[this.selectedIndex].value);
				k && (this.selectedIndex = 0)
			};
			return l
		},
		createColorSelector: function() {
			var c, d, g, h, k = this,
			l = "#FF0000 #FF5555 #FF55AA #FF55FF #FFAA55 #FFAAAA #FFAAFF #FFFF55 #FFFFAA #FFFFFF #CC0000 #CC5555 #CC55AA #CC55FF #CCAA55 #CCAAAA #CCAAFF #CCFF55 #CCFFAA #CCFFFF #AA0000 #AA5555 #AA55AA #AA55FF #AAAA55 #AAAAAA #AAAAFF #AAFF55 #AAFFAA #AAFFFF #880000 #885555 #8855AA #8855FF #88AA55 #88AAAA #88AAFF #88FF55 #88FFAA #88FFFF #550000 #555555 #5555AA #5555FF #55AA55 #55AAAA #55AAFF #55FF55 #55FFAA #55FFFF #220000 #225555 #2255AA #2255FF #22AA55 #22AAAA #22AAFF #22FF55 #22FFAA #22FFFF #000000 #005555 #0055AA #0055FF #00AA55 #00AAAA #00AAFF #00FF55 #00FFAA #00FFFF".split(" "),
			m = document.createElement("table"),
			p = this.colorSelector = document.createElement("a"),
			n = this.$colorSelector = b(p),
			q = document.createElement("input"),
			s = k.createOpacityPlugin(),
			r = function() {
				q.value = q.style.backgroundColor = this.title.toUpperCase()
			},
			w = function() {
				n.trigger("colorSelected", [k.parseColorToRGBA(this.title, s.val())])
			};
			p.className = "flipHtml5RemarkColorSelectorWrap";
			m.setAttribute("border", "1");
			p.style.display = "none";
			p.href = "javascript:void(0);";
			q.className = "flipHtml5RemarkColorSelectorMessage";
			q.value = "#000000";
			q.setAttribute("disabled", "true");
			p.appendChild(q);
			p.appendChild(s.container);
			p.appendChild(m);
			n.on(_event._down,
			function(b) {
				b.preventDefault();
				b.stopPropagation()
			});
			for (g = 0; 7 > g; g++) {
				h = document.createElement("tr");
				for (d = 0; 10 > d; d++) c = document.createElement("td"),
				c.className = "flipHtml5RemarkColorSelectorBlock",
				c.title = l[10 * g + d],
				c.style.backgroundColor = l[10 * g + d],
				b(c).on(_event._over, r),
				b(c).on(_event._down, w),
				h.appendChild(c);
				m.appendChild(h)
			}
			return p
		},
		createOpacityPlugin: function() {
			var c, d, g, h, k, l, m = 0.5,
			p = this,
			n = Math.floor,
			q = document.createElement("div"),
			s = document.createElement("div"),
			r = document.createElement("span"),
			w = s.style,
			u,
			y = p.$document,
			v = p.changeOpacity,
			t = b(s),
			x = b(q);
			r.className = "flipHtml5RemarkOpacitySpan";
			q.className = "flipHtml5RemarkOpacity";
			q.style.height = "3px";
			q.style.top = "4px";
			s.className = "flipHtml5RemarkOpacityCursor";
			s.style.top = "-5px";
			q.appendChild(r);
			q.appendChild(s);
			x.on(_event._down,
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				u = p.currentEditor;
				if (d = b.pageX ? b.pageX: b.originalEvent.touches ? b.originalEvent.touches[0].pageX: 0) g = d - x.offset().left,
				0 > g && (g = 0),
				145 < g && (g = 145),
				w.left = g + "px",
				u.css("backgroundColor", v(u, g / 145)),
				r.innerHTML = "Opacity: " + (g / 145).toFixed(2),
				m = g / 145
			});
			t.on("mousedown touchstart",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				u = p.currentEditor;
				g = h = parseInt(w.left, 10);
				c = b.pageX ? b.pageX: b.originalEvent.touches ? b.originalEvent.touches[0].pageX: 0;
				k = g - c;
				y.on("mousemove.flipHtml5RemarkOpacity touchmove.flipHtml5RemarkOpacity",
				function(b) {
					b.preventDefault();
					b.stopPropagation();
					if (d = b.pageX ? b.pageX: b.originalEvent.touches ? b.originalEvent.touches[0].pageX: 0) l = n(k + d),
					0 > l && (l = 0),
					145 < l && (l = 145),
					h !== l && (w.left = l + "px", u.css("backgroundColor", v(u, l / 145)), r.innerHTML = "Opacity: " + (l / 145).toFixed(2), m = l / 145)
				});
				y.one("mouseup touchend",
				function() {
					y.off("mousemove.flipHtml5RemarkOpacity touchmove.flipHtml5RemarkOpacity")
				})
			});
			return this.opacityHandel = {
				val: function(b) {
					b && (b = parseInt(b, 10) || 1, 1 < b && (b = 1), 0 > b && (b = 0), this.setOpacity(b), m = b);
					return m
				},
				container: q,
				show: function() {
					q.style.display = ""
				},
				hide: function() {
					q.style.display = "none"
				},
				setOpacity: function(b) {
					if (void 0 === b || 1 < b || isNaN(b)) b = 1;
					0 > b && (b = 0);
					w.left = 145 * b + "px";
					r.innerHTML = "Opacity: " + b;
					m = b
				}
			}
		},
		changeOpacity: function(b, c) {
			var d = b.css("backgroundColor").replace(/\s*/g, "");
			0 <= d.indexOf("rgba") && (0 <= d.indexOf(",0)") || 0 <= d.indexOf(",1)")) ? b.css("backgroundColor", d.replace(/b\(/, "ba(").replace(/,\d*\)$/, "," + c + ")")) : b.css("backgroundColor", d.replace(/b\(/, "ba(").replace(/d*\)$/, "," + c + ")").replace(/\d*\.\d*,/g, ""))
		},
		parseColorToRGBA: function(b, c) {
			var d, h, k;
			c = parseFloat(c);
			1 <= c && (c = 1);
			0 >= c && (c = 0);
			d = parseInt(b.substring(1, 3), 16);
			h = parseInt(b.substring(3, 5), 16);
			k = parseInt(b.substring(5, 7), 16);
			return "rgba(" + d + "," + h + "," + k + "," + c + ")"
		},
		exec: function(b, c, d) {
			switch (b) {
			case "h1":
			case "h2":
			case "h3":
			case "h4":
			case "h5":
			case "h6":
			case "address":
			case "pre":
			case "p":
			case "blockquote":
				document.execCommand("formatBlock", !1, b);
				break;
			case "createLink":
				(b = prompt("Enter a URL here", "http://")) && "" !== b && "http://" !== b && (0 > b.indexOf("http") && (b = "http://" + b), document.execCommand("createLink", !0, b));
				break;
			case "fontsize":
				document.execCommand(b, !1, c);
				break;
			case "fontname":
				document.execCommand(b, !1, c);
				this.fontName = c;
				break;
			case "forecolor":
				document.execCommand(b, !1, c);
				this.fontColor = c;
				break;
			case "backcolor":
				this.currentEditor[0].style.backgroundColor = c;
				d ? this.highlightBackcolor = c: this.backgroundColor = c;
				break;
			case "delete":
				this.removeSizeWrap();
				this.currentEditor.remove();
				this.save();
				break;
			default:
				document.execCommand(b, !1, null)
			}
			this.currentEditor.trigger(_event._down)
		},
		northResize: function(c) {
			var f, g, h, k, l, m = this,
			p = Math.floor,
			n, q;
			b(c).on("mousedown.fliphtml5RemarkResize touchstart.fliphtml5RemarkResize",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				g = m.currentEditor;
				n = m.sizeWrap;
				q = m.sizeWrapStyle;
				l = m.$context;
				var c = n.offsetHeight || 20,
				e = b.pageY || b.originalEvent.touches[0].pageY;
				l.one("mouseup.fliphtml5RemarkResize touchend.fliphtml5RemarkResize",
				function() {
					l.off("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize");
					m.parsePresentValue(g[0]);
					m.parsePresentValue(n)
				});
				l.on("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize",
				function(b) {
					b.preventDefault();
					b.stopPropagation();
					b.pageY ? f = b.pageY: b.originalEvent.touches && (f = b.originalEvent.touches[0].pageY);
					f && (k = p(c + (e - f) / d.scale()), h !== k && 20 < k && (q.top = f - l.offset().top + "px", q.height = k + "px", h = k, g.trigger("sizeChange", [0, k, 0, f - l.offset().top])))
				})
			});
			return this
		},
		westResize: function(c) {
			var f, g, h, k, l, m = this,
			p = Math.floor,
			n, q;
			b(c).on("mousedown.fliphtml5RemarkResize touchstart.fliphtml5RemarkResize",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				l = m.$context;
				n = m.sizeWrap;
				q = m.sizeWrapStyle;
				k = m.currentEditor;
				var c = n.offsetWidth || 40,
				e = b.pageX || b.originalEvent.touches[0].pageX;
				l.one("mouseup.fliphtml5RemarkResize touchend.fliphtml5RemarkResize",
				function() {
					l.off("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize");
					m.parsePresentValue(k[0]);
					m.parsePresentValue(n)
				});
				l.on("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize",
				function(b) {
					b.preventDefault();
					b.stopPropagation(); ! (f = b.pageX) && b.originalEvent.touches && (f = b.originalEvent.touches[0].pageX);
					f && (h = p(c + (e - f) / d.scale()), g !== h && 40 < h && (q.left = f - l.offset().left + "px", q.width = h + "px", g = h, k.trigger("sizeChange", [h, 0, f - l.offset().left])))
				})
			});
			return this
		},
		eastResize: function(c) {
			var f, g, h, k, l, m = this,
			p = Math.floor,
			n, q;
			b(c).on("mousedown.fliphtml5RemarkResize touchstart.fliphtml5RemarkResize",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				h = m.currentEditor;
				l = m.$context;
				n = m.sizeWrap;
				q = m.sizeWrapStyle;
				var c = n.offsetWidth || 40,
				e = b.pageX || b.originalEvent.touches[0].pageX;
				l.one("mouseup.fliphtml5RemarkResize touchend.fliphtml5RemarkResize",
				function() {
					l.off("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize");
					m.parsePresentValue(h[0]);
					m.parsePresentValue(n)
				});
				l.on("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize",
				function(b) {
					b.preventDefault();
					b.stopPropagation();
					b.pageX ? f = b.pageX: b.originalEvent.touches && (f = b.originalEvent.touches[0].pageX);
					f && (g = p(c - (e - f) / d.scale()), k !== g && 40 < g && (q.width = g + "px", k = g, h.trigger("sizeChange", [g])))
				})
			});
			return this
		},
		southResize: function(c) {
			var f, g, h, k, l = this,
			m = Math.floor,
			p, n, q;
			b(c).on("mousedown.fliphtml5RemarkResize touchstart.fliphtml5RemarkResize",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				k = l.$context;
				q = l.sizeWrap;
				n = l.sizeWrapStyle;
				g = l.currentEditor;
				var c = q.offsetHeight || 20,
				e = b.pageY || b.originalEvent.touches[0].pageY;
				k.one("mouseup.fliphtml5RemarkResize touchend.fliphtml5RemarkResize",
				function() {
					k.off("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize");
					l.parsePresentValue(g[0]);
					l.parsePresentValue(q)
				});
				k.on("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize",
				function(b) {
					b.preventDefault();
					b.stopPropagation();
					b.pageY ? f = b.pageY: b.originalEvent.touches && (f = b.originalEvent.touches[0].pageY);
					f && (h = m(c - (e - f) / d.scale()), p !== h && 20 < h && (n.height = h + "px", p = h, g.trigger("sizeChange", [0, h])))
				})
			});
			return this
		},
		parseRemark: function(c, d) {
			var g, h = this,
			k;
			d.find(".flipHtml5Store").remove();
			h.removeSizeWrap();
			this.sizeWrapStyle && (this.sizeWrapStyle.display = "none", b(this.sizeWrap).remove());
			h.newSizeWrap();
			h.contextArray = h.contextArray ? h.contextArray.add(d) : d;
			try {
				window.localStorage ? g = window.localStorage.getItem(window.location.href.replace(window.location.hash, "") + "flipHtml5Remark" + c) || "": (k = RegExp("(?:(?:^|.*;\\s*)" + window.location.href.replace(window.location.hash, "") + "flipHtml5Remark" + c + "\\s*\\=\\s*([^;]*).*$)|^.*$"), g = (document.cookie || "").replace(k, "$1")),
				d.append(g.replace(/#@&/g, ";")),
				d.find(".flipHtml5Remark").each(function() {
					h.reBindEvent(b(this), !0)
				}),
				d.find(".flipHtml5Highlight").each(function() {
					h.reBindEvent(b(this), !1)
				}),
				d.on("mousedown.fliphtml5remarkHide touchstart.fliphtml5remarkHide",
				function() {
					h.save();
					h.removeSizeWrap();
					h.currentEditor.blur();
					h.currentEditor.off("mousedown.flipHtml5Annotation touchstart.flipHtml5Annotation")
				})
			} catch(l) {}
		},
		getPageContent: function(c) {
			var d = 0,
			g, h = "";
			for (c = c.find(".flipHtml5Store"); g = c[d];) if (d++, "" !== g.innerHTML && "" !== b(g).text() || "" !== g.style.backgroundColor && "transparent" !== g.style.backgroundColor && 0 !== parseFloat(g.style.backgroundColor.split(",")[3])) h += g.outerHTML;
			return h.replace(/\s*\n\s*/g, "").replace(/;/g, "#@&")
		},
		storageByIndex: function(b, c) {
			var d, h = this.getPageContent(c);
			try {
				window.localStorage ? (window.localStorage.removeItem(window.location.href.replace(window.location.hash, "") + "flipHtml5Remark" + b), h && window.localStorage.setItem(window.location.href.replace(window.location.hash, "") + "flipHtml5Remark" + b, h)) : (h ? (d = new Date, d.setDate(d.getDate() + this.expires)) : d = new Date("01 Jan 1970 00:00:01"), document.cookie = window.location.href.replace(window.location.hash, "") + "flipHtml5Remark" + b + "=" + h + ";expires=" + d.toUTCString() + ";")
			} catch(k) {
				throw k;
			}
			return h
		},
		save: function() {
			var b, c = d.getCurrentPages();
			for (b = 0; b < c.length; b++) this.noteImgContainers[d.getBookType()][c[b]] && this.storageByIndex(c[b], this.noteImgContainers[d.getBookType()][c[b]])
		},
		restoreRemark: function(b, c, g) {
			void 0 !== b && (this.noteImgContainers[b] || (this.noteImgContainers[b] = {}), this.noteImgContainers[b][c] = g, b == d.getBookType() && (this.removeSizeWrap(), this.parseRemark(c, this.noteImgContainers[d.getBookType()][c])))
		},
		setContainers: function(b, c, d) {
			this.restoreRemark(b, c, d)
		},
		addHighlightEvent: function() {
			this.unbindCreateEvents();
			this.addEvents(!0)
		},
		addEvents: function(b) {
			var c = 0,
			d, h = this.contextArray;
			for (this.unbindCreateEvents(); d = h.eq(c++), 0 < d.length;) this.bindCreateEvents(d, !b)
		},
		destroy: function(b) {
			if (b) try {
				window.localStorage.clear()
			} catch(c) {
				throw c;
			}
			this.$document.off("keydown.flipHtml5RemarkDelete");
			return this.unbindCreateEvents()
		}
	})
})(window.jQuery, window.Class, window.BookInfo);
var BookMark = Class({
	create: function(b) {
		this.disableCss = {
			boxShadow: "rgba(0, 0, 0, 0.69) 0px 1px 2px inset",
			backgroundColor: "#cccccc",
			textShadow: "0 1px 1px white",
			color: "rgb(165, 148, 148)",
			cursor: "default"
		};
		this.normalCss = {
			boxShadow: "inset 0px 1px 0px rgba(255, 255, 255, 0.5), 0px 1px 2px rgba(0, 0, 0, 0.2)",
			backgroundColor: "#E4E4E4",
			color: "#464343",
			textShadow: "",
			cursor: "pointer"
		};
		this.overCss = {};
		this.downCss = {
			backgroundColor: "#E4E4E4",
			color: "#374f00",
			boxShadow: "inset 0px 1px 3px rgba(0, 0, 0, 0.3), 0px 1px 0px white",
			textShadow: "0px 1px 0px rgba(255, 255, 255, 0.4)"
		};
		this.bookMarkName = window.location.href.replace(window.location.hash, "") + "BookMark";
		this.bookMarkShowFalg = !1;
		this.addRightBtnFalg = this.addLeftBtnFalg = !0;
		this.hasTextValue = !1;
		this.bottomShow = !0;
		this.$container = b;
		this.bookMarkContexts = {};
		this.address = uiBaseURL;
		this.serverBookMark = [];
		this.cookieBookMark = [];
		this.totalBookMark = [];
		for (var c = 0; c < bmtConfig.length; c++) {
			var d = bmtConfig[c];
			this.serverBookMark.push({
				isCookie: 0,
				text: d.caption,
				page: d.pageIndex,
				color: d.color,
				key: 11
			})
		}
		this.totalPageMark = [];
		this.leftPageMark = [];
		this.rigntPageMark = [];
		this.lists = [];
		this.serverLists = [];
		this.cookieLists = [];
		this.addedPages = [];
		this.cookiePage = [];
		this.serverPage = [];
		for (c = 0; c < this.serverBookMark.length; c++) this.serverPage.push(this.serverBookMark[c].page);
		this.createBookMark(b)
	},
	createBookMark: function(b) {
		var c = this;
		this.bookMark = $("<div class='flipHTML5BookMark'></div>").css({
			maxHeight: 600
		}).hide().appendTo(b);
		var d = $("<div class='flipHTML5BookMark-top' style='position: relative;height: 30px;width: 100%;left: 0px;top: 0px;background-color: #373737;'></div>").append($("<span class='flipHTML5BookMark-topText'></span>").html("Bookmark")).appendTo(this.bookMark);
		this.shrink = $("<div class='flipHTML5BookMark-topShrink'></div>").css({
			right: 32
		}).append($("<img style='margin-left: 2px;margin-top: 2px;'/>").attr("src", this.address + "note_narrow.png")).appendTo(d);
		this.close = $("<div class='flipHTML5BookMark-topClose'></div>").css({
			right: 3
		}).append($("<img style='margin-left: 2px;margin-top: 2px;'/>").attr("src", this.address + "note_close.png")).appendTo(d);
		this.bookMarkBottom = $("<div class='flipHTML5BookMark-bottom'></div>").css({
			maxHeight: 570
		}).appendTo(this.bookMark);
		var e = $("<div style='position: relative;width: 100%;height: 94px;'></div>").appendTo(this.bookMarkBottom);
		this.bookMarkText = $("<input type='text' class='flipHTML5BookMark-saveText'/>").appendTo(e);
		var f = this.colorPicker(e);
		f.container.css({
			top: 11,
			left: 453
		});
		this.selectColor = f.message.css({
			width: 24,
			height: 24
		});
		this.addLeftMark = $("<div class='flipHTML5BookMark-addLeftMark'></div>").css({
			width: 100,
			left: 18
		}).html("Add To Page").appendTo(e);
		this.addRightMark = $("<div class='flipHTML5BookMark-addRightMark'></div>").css({
			width: 100,
			left: "auto",
			right: 18
		}).html("Add To Page").appendTo(e);
		this.bookMarkList = $("<div class='flipHTML5BookMark-list' style=' position: relative;width: 464px;left: 18px;margin: 0px;border: 0px;padding-bottom: 18px;'></div>").appendTo(this.bookMarkBottom);
		var e = $("<div class='flipHTML5BookMark-row-th'></div>"),
		f = $("<span class='flipHTML5BookMark-cellLeft-th'></span>").html("Page"),
		g = $("<div class='flipHTML5BookMark-cellRight-th'></div>").append($("<div style='position: absolute;width: 1px;height: 22px;left: 0px;top: 3px;background-color: #FFFFFF;'></div>")).append($("<span style='position: absolute;width: 307px;height: 100%;left: 1px;text-indent: 6px;'></span>").html("Title")).append($("<div style='position: absolute;width: 1px;height: 22px;left: auto;right: 101px;top: 3px;background-color: #FFFFFF;'></div>")).append($("<span style='position: absolute;width: 50px;height: 100%;left: auto;right: 51px;text-indent: 10px;'></span>").html("Edit")).append($("<div style='position: absolute;width: 1px;height: 22px;left: auto;right: 50px;top: 3px;background-color: #FFFFFF;'></div>")).append($("<span style='position: absolute;width: 50px;height: 100%;left: auto;right: 0px;text-indent: 6px;'></span>").html("Delete"));
		e.append(f).append(g);
		this.bookMarkList.append(e);
		this.bookMarkTable = $("<div class='flipHTML5BookMark-table'></div>").css({
			maxHeight: 224
		}).appendTo(this.bookMarkList);
		this.bookMarkLists = $("<div class='flipHTML5BookMark-table-lists'></div>").appendTo(this.bookMarkTable);
		this.createScrollBar(this.bookMarkTable);
		this.removeAllMark = $("<div class='flipHTML5BookMark-removeBookMark'></div>").css({
			position: "relative",
			width: 462,
			left: 18,
			top: 0
		}).html("Remove All").appendTo(this.bookMarkBottom);
		var h, k;
		d.on("mousedown touchstart",
		function(e) {
			e = isTouch ? e.originalEvent.touches[0] : e;
			h = e.clientX - c.bookMark.position().left;
			k = e.clientY - c.bookMark.position().top;
			d.css({
				cursor: "move"
			});
			b.on("mousemove.bookmarkMove touchmove.bookmarkMove",
			function(b) {
				b = isTouch ? b.originalEvent.touches[0] : b;
				c.bookMark.css({
					left: b.clientX - h,
					top: b.clientY - k
				})
			});
			b.add($(document)).on("mouseup.bookmarkMove touchend.bookmarkMove",
			function() {
				d.css({
					cursor: "default"
				});
				b.off("mousemove.bookmarkMove touchmove.bookmarkMove");
				b.add($(document)).off("mouseup.bookmarkMove touchend.bookmarkMove")
			});
			e.preventDefault();
			e.stopPropagation();
			return ! 1
		});
		this.addCookieMark();
		this.registerEvents()
	},
	isListShowHide: function() {
		0 < this.bookMarkLists.children("div").length ? (this.bookMarkList.show(), this.removeAllMark.show()) : (this.bookMarkList.hide(), this.removeAllMark.hide())
	},
	addCookieMark: function() {
		try {
			var b = this.getLocalStorage(this.bookMarkName),
			c = eval(b),
			d = this.serverBookMark.concat(),
			b = [];
			c ? (this.cookieBookMark = c.concat(), b = c.concat(d)) : b = d;
			if (b) for (this.downJSonArrByKey(b, "page"), c = 0; c < b.length; c++) this.addBookMarkList(b[c])
		} catch(e) {}
		for (c = 0; c < this.lists.length; c++) this.lists[c].rowObj.css({
			backgroundColor: 0 == c % 2 ? "": "#bababa"
		});
		this.scrollBarShowHide();
		this.updateBookMarkConfig()
	},
	registerEvents: function() {
		var b = this;
		this.shrink.on("click",
		function() {
			b.bottomShow ? (b.bottomShow = !1, b.shrink.children("img").attr("src", b.address + "note_revert.png"), b.bookMarkBottom.css({
				maxHeight: 0,
				paddingBottom: 0
			})) : (b.bookMarkText[0].focus(), b.bottomShow = !0, b.shrink.children("img").attr("src", b.address + "note_narrow.png"), b.bookMarkBottom.css({
				maxHeight: 570,
				paddingBottom: 6
			}))
		});
		this.close.on("click touchend",
		function() {
			b.hide()
		});
		this.addLeftMark.on({
			"mouseover touchstart": function() {
				b.addLeftBtnFalg && b.hasTextValue && $(this).removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(b.overCss)
			},
			"mouseout touchend": function() {
				b.addLeftBtnFalg && b.hasTextValue && $(this).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(b.normalCss)
			},
			"mousedown touchstart": function() {
				b.addLeftBtnFalg && b.hasTextValue && $(this).removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(b.downCss)
			},
			"mouseup touchend": function() {
				b.addLeftBtnFalg && b.hasTextValue && $(this).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(b.normalCss)
			},
			"click touchend": function() {
				var c = b.bookMarkText.val();
				if (b.addLeftBtnFalg && c && b.hasTextValue) {
					b.bookMarkText.val("");
					var d = BookInfo.getCurrentPages(),
					e = b.selectColor.attr("data-color"),
					d = BookInfo.isRightToLeft() ? Math.max.apply(Math, d) : Math.min.apply(Math, d),
					c = {
						page: d,
						color: e,
						text: c,
						isCookie: 1,
						key: (new Date).getTime()
					};
					b.addBookMarkList(c);
					b.downJSonArrByKey(b.lists, "page");
					$(".flipHTML5BookMark-table-row").detach();
					for (e = 0; e < b.lists.length; e++) b.lists[e].rowObj.css({
						backgroundColor: 0 == e % 2 ? "": "#bababa"
					}),
					b.lists[e].rowObj.appendTo(b.bookMarkLists);
					b.cookiePage.push(d);
					b.cookieBookMark.push(c);
					b.addLocalStorage(b.bookMarkName, b.parseToString(b.cookieBookMark));
					b.setRandomColor();
					b.selectRadio()
				}
			}
		});
		this.addRightMark.on({
			"mouseover touchstart": function() {
				b.addRightBtnFalg && b.hasTextValue && $(this).removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(b.overCss)
			},
			"mouseout touchend": function() {
				b.addRightBtnFalg && b.hasTextValue && $(this).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(b.normalCss)
			},
			"mousedown touchstart": function() {
				b.addRightBtnFalg && b.hasTextValue && $(this).removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(b.downCss)
			},
			"mouseup touchend": function() {
				b.addRightBtnFalg && b.hasTextValue && $(this).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(b.normalCss)
			},
			"click touchend": function() {
				var c = b.bookMarkText.val();
				if (b.addRightBtnFalg && c && b.hasTextValue) {
					b.bookMarkText.val("");
					var d = BookInfo.getCurrentPages(),
					e = b.selectColor.attr("data-color"),
					d = BookInfo.isRightToLeft() ? Math.min.apply(Math, d) : Math.max.apply(Math, d),
					c = {
						page: d,
						color: e,
						text: c,
						isCookie: 1,
						key: (new Date).getTime()
					};
					b.addBookMarkList(c);
					b.downJSonArrByKey(b.lists, "page");
					$(".flipHTML5BookMark-table-row").detach();
					for (e = 0; e < b.lists.length; e++) b.lists[e].rowObj.css({
						backgroundColor: 0 == e % 2 ? "": "#bababa"
					}),
					b.lists[e].rowObj.appendTo(b.bookMarkLists);
					b.cookiePage.push(d);
					b.cookieBookMark.push(c);
					b.addLocalStorage(b.bookMarkName, b.parseToString(b.cookieBookMark));
					b.setRandomColor();
					b.selectRadio()
				}
			}
		});
		this.bookMarkText.on("input propertychange change",
		function() {
			$(this).val() ? b.hasTextValue = !0 : b.hasTextValue = !1;
			b.selectRadio()
		});
		this.removeAllMark.on("click touchend",
		function() {
			$(".flipHTML5BookMark-table-row-cookie").remove();
			b.cookieLists = [];
			b.lists = [];
			b.lists = b.serverLists.concat();
			b.downJSonArrByKey(b.lists, "page");
			$(".flipHTML5BookMark-table-row").detach();
			for (var c = 0; c < b.lists.length; c++) b.lists[c].rowObj.css({
				backgroundColor: 0 == c % 2 ? "": "#bababa"
			}),
			b.lists[c].rowObj.appendTo(b.bookMarkLists);
			b.cookiePage = [];
			b.addedPages = [];
			b.addedPages = b.serverPage.concat();
			b.selectRadio();
			b.cookieBookMark = [];
			b.totalBookMark = [];
			b.totalBookMark = b.serverBookMark.concat();
			b.addLocalStorage(b.bookMarkName, b.parseToString(b.cookieBookMark));
			b.scrollBarShowHide();
			b.updateBookMarkConfig()
		})
	},
	updateBookMarkConfig: function() {
		this.downJSonArrByKey(this.totalBookMark, "page");
		bmtConfig = [];
		for (var b = 0; b < this.totalBookMark.length; b++) {
			var c = this.totalBookMark[b],
			d = c.page;
			0 <= d && d <= BookInfo.getPageCount() && bmtConfig.push({
				caption: c.text,
				color: c.color,
				pageIndex: c.page
			})
		}
		BookInfo.getBookType() === BookType.normal_book && BookInfo.getBook().bmt.refresh()
	},
	addBookMarkList: function(b) {
		if (! (0 > b.page || b.page > BookInfo.getPageCount())) {
			var c = this,
			d = !0,
			e = b.text,
			f = b.color,
			g = $("<div style='position: relative;height: 28px;cursor: pointer;'></div>").css({
				height: 28
			}).addClass(1 === b.isCookie ? "flipHTML5BookMark-table-row flipHTML5BookMark-table-row-cookie": "flipHTML5BookMark-table-row").attr({
				"data-key": b.key,
				"data-page": b.page
			}).appendTo(c.bookMarkLists);
			$("<span class='flipHTML5BookMark-table-cellLeft'></span>").html(b.page).appendTo(g);
			var h = $("<span class='flipHTML5BookMark-table-cellRight' style=' position: absolute;width: 410px;height: 100%;left: 54px;'></span>").appendTo(g),
			k = $("<div style='position: absolute;left: 0px;top: 0px;height: 100%;width: 100%;'></div>").appendTo(h),
			l = $("<div style='position: absolute;left: 0px;top: 0px;height: 100%;'></div>").css({
				width: 1 === b.isCookie ? "309px": "100%"
			}).appendTo(k),
			m = $("<input class='flipHTML5BookMark-table-cellRight-text' disabled='true'/>").css({
				width: 1 === b.isCookie ? "283px": "100%"
			}).attr("disabled", d).val(b.text).appendTo(l),
			p,
			n;
			1 === b.isCookie && (k = this.colorPicker(l), p = k.message, n = k.container, p.css({
				width: 20,
				height: 20,
				backgroundColor: b.color
			}).attr("data-color", b.color), n.css({
				top: 2,
				left: 284
			}).hide());
			var q = $("<div class='flipHTML5BookMark-table-cellRight-edit'></div>").css({
				display: 1 === b.isCookie ? "block": "none",
				right: 64
			}).attr("title", "Edit").append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", c.address + "note_edit.png")).appendTo(h),
			s = $("<div class='flipHTML5BookMark-table-cellRight-cancel'></div>").css({
				right: 51
			}).attr("title", "Cancel").append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", c.address + "bookMark_cancel.png")).appendTo(h).hide(),
			h = $("<div class='flipHTML5BookMark-table-cellRight-del'></div>").css({
				display: 1 === b.isCookie ? "block": "none",
				right: 14
			}).attr("title", "Delete").append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", c.address + "note_del.png")).appendTo(h);
			m.attr("title", m.val());
			s.on("click touchend",
			function(b) {
				d = !0;
				l.css({
					backgroundColor: "transparent"
				});
				m.css({
					backgroundColor: "transparent",
					color: "#1a1a1a"
				});
				m.attr("disabled", d);
				q.attr("title", "Edit").css({
					right: 64
				});
				q.children("img").attr("src", c.address + "note_edit.png");
				n && n.hide();
				m.val(e);
				p.attr("data-color", f).css({
					backgroundColor: f
				});
				s.hide();
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			});
			g.on("click touchend",
			function(b) {
				d && gotoPageFun($(this).attr("data-page"))
			});
			h.on("click touchend",
			function(b) {
				g.remove();
				var d = g.attr("data-page");
				c.addedPages.splice(c.addedPages.indexOf(d), 1);
				c.cookiePage.splice(c.cookiePage.indexOf(d), 1);
				c.selectRadio();
				c.delArrayByKeyAndValue(c.totalBookMark, "page", d);
				c.delArrayByKeyAndValue(c.cookieBookMark, "page", d);
				c.addLocalStorage(c.bookMarkName, c.parseToString(c.cookieBookMark));
				c.delArrayByKeyAndValue(c.lists, "page", d);
				c.delArrayByKeyAndValue(c.cookieLists, "page", d);
				for (d = 0; d < c.lists.length; d++) c.lists[d].rowObj.css({
					backgroundColor: 0 == d % 2 ? "": "#bababa"
				});
				c.scrollBarShowHide();
				c.updateBookMarkConfig();
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			});
			q.on("click touchend",
			function(b) {
				if (d) d = !1,
				l.css({
					backgroundColor: "#ffffff"
				}),
				m.css({
					backgroundColor: "#ffffff",
					color: "#000000"
				}),
				q.children("img").attr("src", c.address + "note_save.png"),
				m.attr("disabled", d),
				q.attr("title", "Save").css({
					right: 77
				}),
				m[0].focus(),
				s.show(),
				n && n.show();
				else if (m.val()) {
					d = !0;
					l.css({
						backgroundColor: "transparent"
					});
					m.css({
						backgroundColor: "transparent",
						color: "#1a1a1a"
					});
					m.attr("disabled", d);
					q.attr("title", "Edit").css({
						right: 64
					});
					q.children("img").attr("src", c.address + "note_edit.png");
					s.hide();
					var h = g.attr("data-key"),
					k = m.val();
					e = k;
					var y = p.attr("data-color");
					f = y;
					m.attr("title", m.val());
					c.updateArrayByKeyValue(c.cookieBookMark, "key", h, {
						text: k,
						color: y
					});
					c.updateArrayByKeyValue(c.totalBookMark, "key", h, {
						text: k,
						color: y
					});
					c.addLocalStorage(c.bookMarkName, c.parseToString(c.cookieBookMark));
					n && n.hide();
					c.updateBookMarkConfig()
				} else alert("Can not leave the text box blank!"),
				m.val(e);
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			});
			this.scrollBarShowHide();
			1 === b.isCookie ? this.cookieLists.push($.extend({},
			b, {
				rowObj: g
			})) : this.serverLists.push($.extend({},
			b, {
				rowObj: g
			}));
			this.lists.push($.extend({},
			b, {
				rowObj: g
			}));
			this.addedPages.push(b.page);
			this.totalBookMark.push(b);
			this.updateBookMarkConfig()
		}
	},
	addBookMarkPage: function() {},
	selectRadio: function() {
		var b = this.addLeftMark,
		c = this.addRightMark,
		d = this.bookMarkText[0],
		e = d.value,
		f = BookInfo.getCurrentPages(),
		g = BookInfo.getPageCount();
		this.hasTextValue = e ? !0 : !1;
		0 <= f.indexOf(0) ? this.contains(this.addedPages, Math.max.apply(Math, f)) ? (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addRightBtnFalg = this.addLeftBtnFalg = !1, d.readOnly = !0, b.add(c).hide()) : (e ? BookInfo.isRightToLeft() ? (c.removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), b.removeClass("flipHTML5BookMark-normal").css(this.normalCss), this.addLeftBtnFalg = !0, this.addRightBtnFalg = !1, b.show().html("Add to page " + Math.max.apply(Math, f)), c.hide().html("Add to page " + Math.min.apply(Math, f))) : (b.removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), c.removeClass("flipHTML5BookMark-normal").css(this.normalCss), this.addLeftBtnFalg = !1, this.addRightBtnFalg = !0, b.hide().html("Add to page " + Math.min.apply(Math, f)), c.show().html("Add to page " + Math.max.apply(Math, f))) : BookInfo.isRightToLeft() ? (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addLeftBtnFalg = !0, this.addRightBtnFalg = !1, b.show().html("Add to page " + Math.max.apply(Math, f)), c.hide().html("Add to page " + Math.min.apply(Math, f))) : (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addLeftBtnFalg = !1, this.addRightBtnFalg = !0, b.hide().html("Add to page " + Math.min.apply(Math, f)), c.show().html("Add to page " + Math.max.apply(Math, f))), d.readOnly = !1, d.focus()) : 0 <= f.indexOf(g) && Math.min.apply(Math, f) == g ? this.contains(this.addedPages, g) ? (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addRightBtnFalg = this.addLeftBtnFalg = !1, d.readOnly = !0, b.hide().html("Add to page " + Math.min.apply(Math, f)), c.hide().html("Add to page " + Math.max.apply(Math, f))) : (e ? BookInfo.isRightToLeft() ? (b.removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), c.removeClass("flipHTML5BookMark-normal").css(this.normalCss), this.addLeftBtnFalg = !1, this.addRightBtnFalg = !0, b.hide().html("Add to page " + Math.max.apply(Math, f)), c.show().html("Add to page " + Math.min.apply(Math, f))) : (c.removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), b.removeClass("flipHTML5BookMark-normal").css(this.normalCss), this.addLeftBtnFalg = !0, this.addRightBtnFalg = !1, b.show().html("Add to page " + Math.min.apply(Math, f)), c.hide().html("Add to page " + Math.max.apply(Math, f))) : BookInfo.isRightToLeft() ? (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addLeftBtnFalg = !1, this.addRightBtnFalg = !0, b.hide().html("Add to page " + Math.max.apply(Math, f)), c.show().html("Add to page " + Math.min.apply(Math, f))) : (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addLeftBtnFalg = !0, this.addRightBtnFalg = !1, b.show().html("Add to page " + Math.min.apply(Math, f)), c.hide().html("Add to page " + Math.max.apply(Math, f))), d.readOnly = !1, d.focus()) : Math.min.apply(Math, f) > g ? (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addRightBtnFalg = this.addLeftBtnFalg = !1, d.readOnly = !0, b.hide().html("Add to page " + Math.min.apply(Math, f)), c.hide().html("Add to page " + Math.max.apply(Math, f))) : this.contains(this.addedPages, Math.min.apply(Math, f)) || this.contains(this.addedPages, Math.max.apply(Math, f)) ? !this.contains(this.addedPages, Math.min.apply(Math, f)) && this.contains(this.addedPages, Math.max.apply(Math, f)) ? (e ? BookInfo.isRightToLeft() ? (b.removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), c.removeClass("flipHTML5BookMark-normal").css(this.normalCss), this.addLeftBtnFalg = !1, this.addRightBtnFalg = !0, b.hide().html("Add to page " + Math.max.apply(Math, f)), c.show().html("Add to page " + Math.min.apply(Math, f))) : (c.removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), b.removeClass("flipHTML5BookMark-normal").css(this.normalCss), this.addLeftBtnFalg = !0, this.addRightBtnFalg = !1, b.show().html("Add to page " + Math.min.apply(Math, f)), c.hide().html("Add to page " + Math.max.apply(Math, f))) : BookInfo.isRightToLeft() ? (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addLeftBtnFalg = !1, this.addRightBtnFalg = !0, b.hide().html("Add to page " + Math.max.apply(Math, f)), c.show().html("Add to page " + Math.min.apply(Math, f))) : (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addLeftBtnFalg = !0, this.addRightBtnFalg = !1, b.show().html("Add to page " + Math.min.apply(Math, f)), c.hide().html("Add to page " + Math.max.apply(Math, f))), d.readOnly = !1, d.focus()) : this.contains(this.addedPages, Math.min.apply(Math, f)) && !this.contains(this.addedPages, Math.max.apply(Math, f)) ? (e ? BookInfo.isRightToLeft() ? (c.removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), b.removeClass("flipHTML5BookMark-normal").css(this.normalCss), this.addLeftBtnFalg = !0, this.addRightBtnFalg = !1, b.show().html("Add to page " + Math.max.apply(Math, f)), c.hide().html("Add to page " + Math.min.apply(Math, f))) : (b.removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), c.removeClass("flipHTML5BookMark-normal").css(this.normalCss), this.addLeftBtnFalg = !1, this.addRightBtnFalg = !0, b.hide().html("Add to page " + Math.min.apply(Math, f)), c.show().html("Add to page " + Math.max.apply(Math, f))) : BookInfo.isRightToLeft() ? (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addLeftBtnFalg = !0, this.addRightBtnFalg = !1, b.show().html("Add to page " + Math.max.apply(Math, f)), c.hide().html("Add to page " + Math.min.apply(Math, f))) : (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addLeftBtnFalg = !1, this.addRightBtnFalg = !0, b.hide().html("Add to page " + Math.min.apply(Math, f)), c.show().html("Add to page " + Math.max.apply(Math, f))), d.readOnly = !1, d.focus()) : (b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addRightBtnFalg = this.addLeftBtnFalg = !1, d.readOnly = !0, b.hide().html("Add to page " + Math.min.apply(Math, f)), c.hide().html("Add to page " + Math.max.apply(Math, f))) : (e ? c.add(b).removeClass("flipHTML5BookMark-normal").css(this.normalCss) : b.add(c).removeClass("flipHTML5BookMark-normal flipHTML5BookMark-hover").css(this.disableCss), this.addRightBtnFalg = this.addLeftBtnFalg = !0, BookInfo.isRightToLeft() ? (b.show().html("Add to page " + Math.max.apply(Math, f)), c.show().html("Add to page " + Math.min.apply(Math, f))) : (b.show().html("Add to page " + Math.min.apply(Math, f)), c.show().html("Add to page " + Math.max.apply(Math, f))), d.readOnly = !1, d.focus())
	},
	colorPicker: function(b) {
		var c, d, e, f = "#FF0000 #FF5555 #FF55AA #FF55FF #FFAA55 #FFAAAA #FFAAFF #FFFF55 #FFFFAA #FFFFFF #CC0000 #CC5555 #CC55AA #CC55FF #CCAA55 #CCAAAA #CCAAFF #CCFF55 #CCFFAA #CCFFFF #AA0000 #AA5555 #AA55AA #AA55FF #AAAA55 #AAAAAA #AAAAFF #AAFF55 #AAFFAA #AAFFFF #880000 #885555 #8855AA #8855FF #88AA55 #88AAAA #88AAFF #88FF55 #88FFAA #88FFFF #550000 #555555 #5555AA #5555FF #55AA55 #55AAAA #55AAFF #55FF55 #55FFAA #55FFFF #220000 #225555 #2255AA #2255FF #22AA55 #22AAAA #22AAFF #22FF55 #22FFAA #22FFFF #000000 #005555 #0055AA #0055FF #00AA55 #00AAAA #00AAFF #00FF55 #00FFAA #00FFFF".split(" "),
		g = document.createElement("table");
		c = document.createElement("a");
		var h = $(c),
		k = document.createElement("input"),
		l = function() {
			var b = this.title.toUpperCase();
			k.style.backgroundColor = b;
			$(k).attr("data-color", b)
		},
		m = function() {
			g.style.display = "none"
		};
		h.appendTo(b);
		c.className = "flipHtml5ColorSelectorWrap-bookMark";
		g.setAttribute("border", "1");
		c.style.position = "absolute";
		c.href = "javascript:void(0);";
		k.type = "text";
		k.className = "flipHtml5ColorSelectorMessage-bookMark";
		b = this.getRandomColor();
		k.style.backgroundColor = b;
		$(k).attr("data-color", b);
		k.style.cursor = "pointer";
		k.style.borderWidth = "2px";
		k.style.padding = "0px";
		c.appendChild(k);
		this.$container[0].appendChild(g);
		g.style.display = "none";
		g.style.position = "absolute";
		g.style.zIndex = 9999;
		g.style.width = "204px";
		g.style.backgroundColor = "#ffffff";
		for (d = 0; 7 > d; d++) {
			e = document.createElement("tr");
			e.style.position = "relative";
			for (b = 0; 10 > b; b++) c = document.createElement("td"),
			c.className = "flipHtml5ColorSelectorBlock",
			c.style.position = "relative",
			c.style.width = "14px",
			c.style.height = "14px",
			c.title = f[10 * d + b],
			c.style.backgroundColor = f[10 * d + b],
			$(c).on("mouseenter", l),
			$(c).on("click touchstart", m),
			e.appendChild(c);
			g.appendChild(e)
		}
		$(k).on("click touchstart",
		function(b) {
			$(g).css({
				left: $(k).offset().left,
				top: $(k).offset().top + $(k).outerHeight()
			});
			g.style.display = "table-cell";
			b.stopPropagation();
			b.stopPropagation();
			return ! 1
		});
		$(document).on("click touchstart",
		function() {
			g.style.display = "none"
		});
		return {
			container: h,
			message: $(k)
		}
	},
	getRandomColor: function() {
		return "#" + Math.floor(2236962 + 7829367 * Math.random()).toString(16)
	},
	setRandomColor: function() {
		var b = this.getRandomColor();
		this.selectColor.css({
			backgroundColor: b
		}).attr("data-color", b)
	},
	show: function() {
		this.bookMarkShowFalg = !0;
		this.bookMark.show();
		this.bookMarkText[0].focus();
		this.scrollBarShowHide();
		this.bottomShow = !0;
		this.shrink.children("img").attr("src", this.address + "note_narrow.png");
		this.bookMarkBottom.css({
			maxHeight: 570,
			paddingBottom: 6
		})
	},
	hide: function() {
		this.bookMarkShowFalg = !1;
		this.bookMark.hide()
	},
	showHide: function() {
		this.bookMarkShowFalg ? this.hide() : this.show()
	},
	setContainers: function(b, c, d) {
		BookInfo.getBookType() === b && this.selectRadio()
	},
	parseToString: function(b) {
		if (0 != b.length) {
			for (var c = "[",
			d = 0; d < b.length; d++) c += "{key:'" + b[d].key + "',text:'" + b[d].text + "',page:" + b[d].page + ",color:'" + b[d].color + "',isCookie:" + b[d].isCookie + "},";
			c = c.substring(0, c.length - 1);
			return c + "]"
		}
	},
	downJSonArrByKey: function(b, c) {
		b.sort(function(b, e) {
			return parseInt(b[c]) > parseInt(e[c]) ? 1 : parseInt(b[c]) == parseInt(e[c]) ? 0 : -1
		})
	},
	delArrayByKeyAndValue: function(b, c, d) {
		if (b) for (var e = 0; e < b.length; e++) b[e][c] && b[e][c] == d && b.remove(e)
	},
	updateArrayByKeyValue: function(b, c, d, e) {
		if (b) for (var f = 0; f < b.length; f++) b[f][c] && b[f][c] == d && $.extend(b[f], e)
	},
	getLocalStorage: function(b) {
		try {
			if (window.localStorage) return window.localStorage.getItem(b);
			for (var c = document.cookie.split("; "), d = 0; d < c.length; d++) {
				var e = c[d].split("=");
				if (e[0] == b) return unescape(e[1])
			}
			return ""
		} catch(f) {}
	},
	addLocalStorage: function(b, c) {
		try {
			if (window.localStorage) window.localStorage.setItem(b, c);
			else {
				var d = b + "=" + escape(c),
				e = new Date;
				e.setTime(e.getTime() + 864E8);
				d += "; expires=" + e.toGMTString();
				document.cookie = d
			}
		} catch(f) {}
	},
	contains: function(b, c) {
		for (var d = 0; d < b.length; d++) if (b[d] === c) return ! 0;
		return ! 1
	},
	createScrollBar: function(b) {
		b = $("<div>", {
			"class": "ScrollBar",
			css: {
				position: "absolute",
				width: 6,
				height: "100%",
				backgroundColor: "#a8a8a8",
				borderRadius: 0,
				right: 0,
				top: 0,
				borderLeft: "1px solid #ffffff"
			}
		}).appendTo(b);
		var c = $("<div>", {
			"class": "OuterScroll",
			css: {
				position: "absolute",
				width: 6,
				height: "100%",
				left: 0,
				top: 0,
				backgroundColor: "transparent",
				borderRadius: 0,
				overflow: "hidden",
				cursor: "pointer"
			}
		}).appendTo(b);
		$("<div>", {
			"class": "InnerScroll",
			css: {
				position: "absolute",
				width: 6,
				height: "100%",
				marginLeft: 0,
				marginRight: 0,
				left: 0,
				top: 0,
				backgroundColor: "#5e5e5e",
				borderRadius: 0,
				cursor: "pointer"
			}
		}).appendTo(c);
		this.scrollBar = b;
		this.outerScroll = c;
		this.bindScrollBarEvents(b, c, this.bookMarkTable, this.bookMarkLists)
	},
	scrollBarShowHide: function() {
		var b = this.bookMarkTable.outerHeight() * this.scrollBar.outerHeight() / this.bookMarkLists.outerHeight();
		this.outerScroll.css({
			height: b
		});
		this.bookMarkTable.height() >= this.bookMarkLists.height() ? (this.scrollBar.hide(), this.bookMarkLists.css({
			top: 0
		})) : (this.scrollBar.show(), Math.abs(parseFloat(this.bookMarkLists.css("top"))) > this.bookMarkLists.outerHeight() - this.bookMarkTable.outerHeight() && (this.bookMarkLists.css({
			top: -(this.bookMarkLists.outerHeight() - this.bookMarkTable.outerHeight())
		}), this.outerScroll.css({
			top: this.scrollBar.outerHeight() - this.outerScroll.outerHeight()
		})));
		this.isListShowHide()
	},
	bindScrollBarEvents: function(b, c, d, e) {
		var f = this;
		c.on(_event._down,
		function(b) {
			var h = b || event,
			k = h.clientY - f.outerScroll.position().top,
			l = b.which;
			b.stopPropagation();
			1 == l && ($(document).on("mousemove.scrollBar touchmove.scrollBar",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				h = b || event;
				b = h.clientY - k;
				0 >= b ? b = 0 : b >= f.scrollBar.outerHeight() - f.outerScroll.outerHeight() && (b = f.scrollBar.outerHeight() - f.outerScroll.outerHeight());
				c.css({
					top: b
				});
				e.css({
					top: -b / (f.scrollBar.outerHeight() - f.outerScroll.outerHeight()) * (e.outerHeight() - d.outerHeight())
				})
			}), $(document).on("mouseup.scrollBar touchend.scrollBar",
			function(b) {
				b = b || event;
				b.preventDefault();
				b.stopPropagation();
				$(document).off("mousemove.scrollBar touchmove.scrollBar");
				$(document).off("mouseup.scrollBar touchend.scrollBar")
			}))
		});
		d.bind($.browser.mozilla ? "DOMMouseScroll": "mousewheel",
		function(f) {
			if (! (d.outerHeight() >= e.outerHeight())) {
				var h = f.originalEvent,
				h = h.wheelDelta || -h.detail,
				k = e.position().top,
				l;
				e.stop(!1, !1);
				0 < h ? l = 0 > k + d.outerHeight() / 11 ? k + d.outerHeight() / 11 : 0 : 0 > h && (l = e.outerHeight() - d.outerHeight() > -(k - d.outerHeight() / 11) ? k - d.outerHeight() / 11 : -(e.outerHeight() - d.outerHeight()));
				e.css({
					top: l
				});
				c.css({
					top: -l / (e.outerHeight() - d.outerHeight()) * (b.outerHeight() - c.outerHeight())
				});
				f.stopPropagation();
				f.preventDefault();
				return ! 1
			}
		})
	}
});
function grayBackground(b, c, d, e, f) {
	this.sw = e;
	this.sh = f;
	this.background = $("<div ></div>");
	this.background.css({
		width: e + "px",
		height: f + "px",
		background: c,
		opacity: d,
		"z-index": 200,
		position: "absolute",
		left: "0px",
		top: "0px"
	});
	b.append(this.background)
}
grayBackground.prototype.onResize = function(b, c) {
	this.sw = b;
	this.sh = c;
	this.background.css({
		width: b + "px",
		height: c + "px"
	})
};
bdor[25] = "i";
grayBackground.prototype.setPosition = function(b, c, d) {
	void 0 == d && (d = ["left", "top"]);
	this.background.css(d[0], b + "px");
	this.background.css(d[1], c + "px")
};
grayBackground.prototype.show = function() {
	this.father.append(this.background)
};
grayBackground.prototype.hide = function() {
	this.background.remove()
};
grayBackground.prototype.setZindex = function(b) {
	this.background.css({
		"z-index": b
	})
};
grayBackground.prototype.onMouseUp = function(b, c) {
	$(this.background).bind(_event._down,
	function(d) {
		c.call(b)
	})
};
var textWidth = function(b, c) {
	var d = $("<pre>" + b + "</pre>").css({
		color: bookConfig.iconColor,
		display: "none",
		"font-size": c.size,
		"font-family": c.fontName
	});
	$("body").append(d);
	var e = Point(d.width(), d.height());
	d.remove();
	return e
};
function label(b, c) {
	this.labelBox = $('<div style = "position : absolute;font-family:Tahoma,Georgia,Serif;font-size:12px">' + b + "</div>");
	this.caption = b;
	this.fontSize = "12px";
	this.fontColor = "#f0f0f0";
	this.fontName = "Tahoma";
	var d = textWidth(b, {
		size: this.fontSize,
		fontName: this.fontName
	});
	this.width = d.x;
	this.height = d.y;
	c.append(this.labelBox)
}
label.prototype.getWidth = function() {
	return this.width
};
bdor[27] = "f";
label.prototype.getHeight = function() {
	return this.height
};
label.prototype.getCaption = function() {
	return this.caption
};
label.prototype.setCaption = function(b) {
	this.caption = b;
	this.labelBox[0].innerHTML = b;
	b = textWidth(b, {
		size: this.fontSize,
		fontName: this.fontName
	});
	this.width = b.x;
	this.height = b.y
};
label.prototype.setLabelPosition = function(b, c, d) {
	void 0 == d && (d = ["left", "top"]);
	this.labelBox.css(d[0], b + "px");
	this.labelBox.css(d[1], c + "px")
};
label.prototype.onResize = function(b, c) {
	this.width = b;
	this.height = c;
	this.labelBox.css({
		width: b + "px",
		height: c + "px"
	})
};
label.prototype.setFont = function(b, c, d) {
	null == b ? b = this.fontSize: this.fontSize = b;
	null == c ? c = this.fontColor: this.fontColor = c;
	null == d ? d = this.fontName: this.fontName = d;
	this.labelBox.css({
		"font-size": b,
		color: c,
		"font-family": d
	});
	b = textWidth(this.caption, {
		size: b,
		fontName: d
	});
	this.width = b.x;
	this.height = b.y
};
label.prototype.setFontSize = function(b) {
	null == b ? b = this.fontSize: this.fontSize = b;
	this.labelBox.css({
		"font-size": b
	});
	b = textWidth(this.caption, {
		size: b,
		fontName: this.fontName
	});
	this.width = b.x;
	this.height = b.y
};
label.prototype.riseAWord = function(b) {
	var c = this.caption; - 1 == c.indexOf(b) && (b = b.toLowerCase()); - 1 != c.indexOf(b) && (newCaption = c.replaceAll(b, "<font color=red><strong>" + b + "</strong></font>"), this.labelBox[0].innerHTML = newCaption)
};
label.prototype.shortWord = function(b) {
	this.caption.length > b && (this.caption = this.caption.substring(0, b) + "..", this.setCaption(this.caption))
};
label.prototype.setCSS = function(b) {
	this.labelBox.css(b)
};
label.prototype.setClass = function(b) {
	this.labelBox.attr("class", b)
};
function tipsBox(b, c) {
	this.visible = !1;
	this.caption = b;
	this.background = $("<div style = 'position : absolute;'></div>");
	this.contentBox = new label(b, this.background);
	this.contentBox.setFont("16px", "#f0f0f0", null);
	this.width = this.contentBox.getWidth() + 12;
	this.height = 40;
	$(c).append(this.background);
	$(this.background).css({
		width: this.width + "px",
		height: this.height + "px",
		"-webkit-border-radius": "10px",
		"-moz-border-radius": "10px",
		"-o-border-radius": "10px",
		"border-radius": "10px",
		"-webkit-box-shadow": "0 0 15px rgba(40, 40, 40, 0.6)",
		"-moz-box-shadow": "0 0 15px rgba(40, 40, 40, 0.6)",
		"-ms-box-shadow": "0 0 15px rgba(40, 40, 40, 0.6)",
		"-o-box-shadow": "0 0 15px rgba(40, 40, 40, 0.6)",
		"box-shadow": "0 0 15px rgba(40, 40, 40, 0.6)",
		"background-color": "#554433",
		display: "none",
		"z-index": 110
	});
	this.contentBox.setLabelPosition(4, (this.height - this.contentBox.getHeight()) / 2 - 3)
}
tipsBox.prototype.setTimer = function() {
	var b = this;
	this.timer = window.setInterval(function() {
		b.hideTipsBox();
		window.clearInterval(b.timer)
	},
	1500)
};
tipsBox.prototype.resetTimer = function() {
	window.clearInterval(this.timer);
	this.setTimer()
};
tipsBox.prototype.setPosition = function(b, c, d) {
	void 0 == d && (d = ["left", "top"]);
	$(this.background).css(d[0], b + "px");
	$(this.background).css(d[1], c + "px")
};
tipsBox.prototype.onResize = function(b, c) {
	this.width = b;
	this.height = c;
	$(this.background).css({
		width: b + "px",
		height: c + "px"
	});
	this.contentBox.setLabelPosition(4, (c - this.contentBox.getHeight()) / 2)
};
tipsBox.prototype.getWidth = function() {
	return this.width
};
tipsBox.prototype.getHeight = function() {
	return this.height
};
tipsBox.prototype.setCaption = function(b) {
	this.contentBox.setCaption(b);
	this.caption = b;
	this.contentBox.setLabelPosition(4, (this.height - this.contentBox.getHeight()) / 2 - 3)
};
tipsBox.prototype.showTipsBox = function() {
	this.visible ? this.resetTimer() : (this.setTimer(), this.visible = !0, $(this.background).css({
		display: "block",
		"z-index": 110
	}), $(this.background).animate({
		opacity: 0.9
	},
	300))
};
tipsBox.prototype.hideTipsBox = function() {
	var b = this;
	this.visible && (this.visible = !1, $(this.background).animate({
		opacity: 0
	},
	300,
	function() {
		$(b.background).css({
			display: "none",
			"z-index": 1
		})
	}))
};
function initProgressBar(b, c) {
	this.width = 60;
	this.height = 30;
	this.progress = new label("Loading", b);
	this.caption = this.originCaption = c;
	this.captionLength = this.caption.length;
	this.progress.setCSS({
		display: "none"
	})
}
initProgressBar.prototype.setPosition = function(b, c) {
	this.progress.setLabelPosition((b - this.width) / 2, (c - this.height) / 2)
};
initProgressBar.prototype.addTimer = function() {
	var b = this;
	this.timerId = window.setInterval(function() {
		b.caption += ".";
		b.caption.length > b.captionLength + 3 && (b.caption = originCaption);
		b.progress.setCaption(b.caption)
	},
	600)
};
initProgressBar.prototype.removeTimer = function() {
	window.clearInterval(this.timerId)
};
initProgressBar.prototype.show = function() {
	this.progress.setCSS({
		display: "block"
	});
	this.caption = this.originCaption;
	this.addTimer()
};
initProgressBar.prototype.hide = function() {
	this.progress.setCSS({
		display: "none"
	});
	this.removeTimer()
};
initProgressBar.prototype.setIndex = function(b) {
	this.progress.setCSS({
		"z-index": b
	})
};
function bookShadow(b, c, d) {
	this.backgroun = $("<div></div>");
	this.width = b;
	this.height = c;
	$(this.backgroun).css({
		position: "absolute",
		width: this.width + "px",
		height: this.height + "px",
		"-webkit-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"-moz-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"-o-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"-ms-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)"
	});
	$(d).append(this.backgroun)
}
bdor[26] = "h";
bookShadow.prototype.onResize = function(b, c, d) {
	this.width = d ? 2 * b: b;
	this.height = c;
	$(this.backgroun).css({
		width: this.width + "px",
		height: this.height + "px"
	})
};
bookShadow.prototype.setPosition = function(b, c) {
	$(this.backgroun).css({
		top: c + "px",
		left: b + "px"
	})
};
bookShadow.prototype.showShadow = function() {
	$(this.backgroun).css({
		"-webkit-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"-moz-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"-o-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"-ms-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)"
	})
};
bookShadow.prototype.hideShadow = function() {
	$(this.backgroun).css({
		"-webkit-box-shadow": "0 0 15px rgba(40, 40, 40, 0)",
		"-moz-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"-o-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"-ms-box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)",
		"box-shadow": "0 0 15px rgba(40, 40, 40, 0.7)"
	})
};
function bookMarkTab(b, c, d, e) {
	this.fnShow = c;
	this.fnHide = d;
	this.maxWidth = e ? e: 80;
	this.minWidth = 60;
	this.config = $.extend({
		caption: "",
		color: "#888"
	},
	b);
	this.bg = $("<div style='border-top-left-radius: 3px;border-top-right-radius: 3px;overflow: hidden;'></div>"); ! this.config.pageIndex || "" == this.config.caption || this.config.pageIndex > originTotalPageCount || (this.caption = new label(this.config.caption, this.bg), this.width = this.caption.getWidth() + 30, this.width = this.width > this.maxWidth ? this.maxWidth: this.width < this.minWidth ? this.minWidth: this.width, this.height = 60, this.hiding = this.showing = !1, b = colorDiv(this.config.color, 10), this.bg.css({
		color: "#EEEEEE",
		"font-family": "arial,tahoma,sans-serif",
		"font-size": "12px",
		position: "absolute",
		"z-index": "-1",
		width: this.width + "px",
		height: this.height + "px",
		"background-color": this.config.color,
		border: "1px solid " + b,
		cursor: "pointer"
	}), this.bg.append(this.caption), this.bg.append($("<div style='position: absolute;top: 30px;width: 100%;text-align: center;'></div>").html(this.config.pageIndex)), this.caption.setLabelPosition(0, 8), this.caption.setClass("bookMarkText"), this.caption.setCSS({
		width: "100%",
		textOverflow: "ellipsis",
		whiteSpace: "nowrap",
		overflow: "hidden",
		textAlign: "center"
	}), this.initEvent())
}
bdor[18] = "t";
bookMarkTab.prototype.resize = function(b, c) {
	b > this.maxWidth && (b = this.maxWidth);
	this.width = b;
	this.height = c;
	this.bg.css({
		width: b + "px",
		height: c + "px"
	})
};
bookMarkTab.prototype.setPosition = function(b, c, d) {
	d ? this.bg.css({
		top: c + "px",
		right: b + "px",
		left: "auto"
	}) : this.bg.css({
		top: c + "px",
		left: b + "px",
		right: "auto"
	})
};
bookMarkTab.prototype.show = function() {
	if (!this.showing) {
		this.showing = !0;
		var b = this;
		this.bg.animate({
			top: 0
		},
		150,
		function() {
			b.showing = !1
		})
	}
};
bookMarkTab.prototype.hide = function() {
	if (!this.hiding) {
		this.hiding = !0;
		var b = this;
		this.bg.animate({
			top: 30
		},
		150,
		function() {
			b.hiding = !1
		})
	}
};
bdor[19] = "c";
bookMarkTab.prototype.setMaxWidth = function(b) {
	this.maxWidth = b;
	this.resize(this.width, this.height)
};
bookMarkTab.prototype.getWidth = function() {
	return this.width
};
bookMarkTab.prototype.initEvent = function() {
	var b = this;
	this.bg.on("mouseover",
	function(c) {
		$(this).attr("title", b.bg.find(".bookMarkText").html());
		b.show()
	});
	this.bg.on("mouseleave",
	function(c) {
		b.hide()
	});
	this.bg.bind(_event._down,
	function(c) {
		gotoPageFun(b.config.pageIndex);
		c.stopPropagation();
		c.stopPropagation();
		return ! 1
	});
	this.bg.on("mouseup touchend",
	function(b) {
		b.stopPropagation();
		b.stopPropagation();
		return ! 1
	})
};
function tabBox(b) {
	this.tabArray = [];
	this.bg = $("<div id='bg'></div>");
	this.width = 400;
	this.height = 60;
	this.tipBoxHeight = this.tipBoxWidth = 70;
	this.bg.css({
		position: "absolute",
		width: this.width + "px",
		height: this.height + "px",
		overflow: "hidden",
		"z-index": 10,
		"font-family": "arial,tahoma,sans-serif",
		"font-size": "12px"
	});
	this.bg.bind(_event._end,
	function() {
		return ! 1
	});
	this.bg.bind(_event._down,
	function() {
		return ! 1
	});
	this.bg.bind(_event._move,
	function() {
		return ! 1
	});
	b.append(this.bg)
}
tabBox.prototype.resize = function(b, c, d) {
	this.width = b;
	this.height = c;
	this.bg.css({
		width: this.width + "px",
		height: this.height + "px"
	});
	this.setTabPosition(d)
};
bdor[20] = "b";
tabBox.prototype.setPosition = function(b, c) {
	this.bg.css({
		left: b + "px",
		top: c + "px"
	})
};
tabBox.prototype.rotate = function(b) {
	b = rotate(b);
	this.bg.css({
		"-webkit-transform-origin": "0% 0%",
		"-moz-transform-origin": "0% 0%",
		"-ms-transform-origin": "0% 0%",
		"-o-transform-origin": "0% 0%",
		"transform-origin": "0% 0%",
		"-webkit-transform": b,
		"-moz-transform": b,
		"-ms-transform": b,
		"-o-transform": b,
		transform: b
	})
};
tabBox.prototype.show = function() {
	0 == this.tabArray.length ? this.hide() : this.bg.css({
		display: "block"
	})
};
tabBox.prototype.hide = function() {
	this.bg.css({
		display: "none"
	})
};
tabBox.prototype.setItem = function(b) {
	this.tabArray = b || [];
	this.setTabPosition()
};
tabBox.prototype.initItem = function(b) {
	for (var c = 0; c < this.tabArray.length; c++) this.bg.append(this.tabArray[c].bg);
	this.setTabPosition(b);
	0 == this.tabArray.length ? this.hide() : this.show()
};
tabBox.prototype.refresh = function() {
	this.bg.empty()
};
tabBox.prototype.setTabPosition = function(b) {
	for (var c = 0,
	d = 0,
	e = 0; e < this.tabArray.length; e++) c += this.tabArray[e].getWidth(),
	this.bg.append(this.tabArray[e]);
	if (c <= this.width) for (c = 0; c < this.tabArray.length; c++) this.tabArray[c].setPosition(d, 30, b),
	d = d + this.tabArray[c].getWidth() + 2;
	else for (e = 0; e < this.tabArray.length; e++) this.tabArray[e].setPosition(d, 30, b),
	d += this.tabArray[e].getWidth() * this.width / c
};
function initBookMarkTab(b, c) {
	this.isRight = c;
	this.tabArray = [];
	this.leftBox = new tabBox(b);
	this.rightBox = new tabBox(b);
	this.leftTabArr = [];
	this.rightTabArr = [];
	this.tipBox = $("<div id='tipbox'></div>");
	this.tipImg = $("<img />");
	this.tipLabel = new label("page 1", this.tipBox);
	b.append(this.tipBox);
	this.tipBox.append(this.tipImg);
	this.tipBoxHeight = this.tipBoxWidth = 70;
	this.tipBox.css({
		width: this.tipBoxWidth + "px",
		height: this.tipBoxHeight + "px",
		position: "absolute",
		left: (windowWidth - this.tipBoxWidth) / 2 + "px",
		top: (windowHeight - this.tipBoxHeight) / 2 - 200 + "px",
		opacity: 0,
		display: "none",
		background: "#ff0000",
		"z-index": 10
	});
	this.tipImg.attr({
		src: ""
	});
	this.tipLabel.setLabelPosition(5, this.tipBoxHeight - 25);
	0 != bmtConfig.length && (this.setPosition(), this.resort(), this.initItem())
}
initBookMarkTab.prototype.resize = function(b, c) {
	this.leftBox.resize(b, c, !0);
	this.rightBox.resize(b, c, !1);
	this.setPosition()
};
bdor[21] = "f";
initBookMarkTab.prototype.setPosition = function() {
	void 0 != BookInfo.getBook() && (this.leftBox.setPosition( - 60, BookInfo.getBook().height), this.rightBox.setPosition(BookInfo.getBook().width + 60, 0), this.leftBox.rotate( - 90), this.rightBox.rotate(90))
};
initBookMarkTab.prototype.refresh = function() {
	this.resort();
	this.tabArray = [];
	this.leftTabArr = [];
	this.rightTabArr = [];
	this.leftBox.refresh();
	this.rightBox.refresh();
	this.initItem()
};
initBookMarkTab.prototype.resort = function() {
	void 0 != bmtConfig && bmtConfig.sort(createComparisonFunction("pageIndex"))
};
bdor.m = bdor[7];
function createComparisonFunction(b) {
	return function(c, d) {
		var e = c[b],
		f = d[b];
		return e < f ? -1 : e > f ? 1 : 0
	}
}
initBookMarkTab.prototype.initItem = function() {
	for (var b = 0; b < bmtConfig.length; b++) {
		var c = new bookMarkTab(bmtConfig[b], this.showTipBox, this.hideTipBox);
		this.tabArray.push(c)
	}
	this.isRight ? (this.leftBox.tabArray = this.tabArray, this.leftBox.initItem(!0)) : (this.rightBox.tabArray = this.tabArray, this.rightBox.initItem(!1));
	void 0 != BookInfo.getBook() && this.separated(BookInfo.getBook().currentPageIndex)
};
initBookMarkTab.prototype.showTipBox = function(b) {
	this.tipLabel.setCaption("page " + b);
	b = (windowHeight - this.tipBoxHeight) / 2;
	this.tipBox.css({
		display: "block"
	});
	this.tipBox.animate({
		opacity: 1,
		top: b
	},
	{
		duration: 300
	})
};
initBookMarkTab.prototype.hideTipBox = function() {
	var b = this,
	c = (windowHeight - this.tipBoxHeight) / 2 - 200;
	this.tipBox.css({
		display: "none"
	});
	this.tipBox.animate({
		opacity: 0
	},
	300,
	function() {
		b.tipBox.css({
			top: c + "px"
		})
	})
};
initBookMarkTab.prototype.separated = function(b) {
	this.leftTabArr = [];
	this.rightTabArr = [];
	if (this.isRight) for (b = 0; b < this.tabArray.length; b++) this.tabArray[b].config.pageIndex >= Math.max.apply(Math, BookInfo.getCurrentPages()) ? this.leftTabArr.push(this.tabArray[b]) : this.rightTabArr.push(this.tabArray[b]);
	else for (b = 0; b < this.tabArray.length; b++) this.tabArray[b].config.pageIndex >= Math.max.apply(Math, BookInfo.getCurrentPages()) ? this.rightTabArr.push(this.tabArray[b]) : this.leftTabArr.push(this.tabArray[b]);
	this.leftBox.tabArray = this.leftTabArr;
	this.rightBox.tabArray = this.rightTabArr;
	this.leftBox.initItem(!0);
	this.rightBox.initItem(!1)
};
initBookMarkTab.prototype.show = function() {
	this.leftBox.show();
	this.rightBox.show()
};
initBookMarkTab.prototype.hide = function() {
	this.leftBox.hide();
	this.rightBox.hide()
};
function treeNode(b, c, d) {
	this.config = $.extend({
		caption: "untitled",
		page: 0,
		width: 240,
		height: 35,
		backColor: d,
		fontColor: bookConfig.bookmarkFontColor,
		level: 0,
		padding: 10
	},
	b);
	var e = this;
	this.background = $('<div style="position:relative; overflow : hidden;"></div>');
	this.contentBox = $('<div style="position:absolute;"></div>');
	this.textField = new label(this.config.caption.HTMLLabel2Text(), this.contentBox);
	this.expandButton = new button(this.contentBox, {
		buttonType: 1,
		iconURL: uiBaseURL + "closed.png"
	});
	this.expandButton.setIconPosition(5, 10);
	this.children = [];
	this.opened = this.hasChild = !1;
	this.totalHeight = 0;
	this.showing = !1;
	this.textField.shortWord(25);
	this.isDrag = !1;
	this.expandButton.setVisible(!1);
	$(c).append(this.background);
	$(this.background).append(this.contentBox);
	this.expandButton.setButtonPosition( - 10, 0);
	this.textField.setLabelPosition(13, 10);
	b = this.config.width - 2 * this.config.padding;
	$(this.contentBox).css({
		width: b + "px",
		height: this.config.height + "px",
		color: this.config.fontColor,
		left: 12 * Math.max(this.config.level, 0) + 5 + "px",
		cursor: "pointer",
		"font-family": "arial,tahoma,sans-serif",
		"font-size": "12px"
	});
	$(this.background).css({
		width: b + "px",
		height: this.config.height + "px",
		left: +this.config.padding + "px",
		top: +this.config.padding + "px",
		"background-color": this.config.backColor,
		"-moz-border-radius": "5px",
		"-webkit-border-radius": "5px",
		"border-radius": "5px",
		"border-left": "0px solid #CCCCCC",
		"border-right": "0px solid #CCCCCC",
		"border-bottom": "0px solid #CCCCCC",
		"font-family": "arial,tahoma,sans-serif",
		"font-size": "12px"
	});
	this.fontColor = bookConfig.bookmarkFontColor;
	this.downBackColor = this.config.backColor;
	this.textShadow = "";
	this.expandButton.onMouseUp(this, this.onExpand);
	this.expandButton.onMouseDown(this,
	function() {
		return ! 1
	});
	var f = !1;
	$(this.contentBox).bind(_event._down,
	function() {
		if (global.phoneBookmark && !global.phoneBookmark.isDrag || !global.phoneBookmark && !isBookmarkDrag) f = !0
	});
	$(this.contentBox).bind(_event._move,
	function() {
		if (global.phoneBookmark && !global.phoneBookmark.isDrag || !global.phoneBookmark && !isBookmarkDrag) f = !1
	});
	$(this.contentBox).bind(_event._end,
	function(b) {
		if (global.phoneBookmark && !global.phoneBookmark.isDrag || !global.phoneBookmark && !isBookmarkDrag) f && gotoPageFun(e.config.page),
		f = !1
	});
	$(this.contentBox).bind(_event._down,
	function(b) {
		isTouch || (b = colorAdd(e.config.backColor, 50), $(e.background).css({
			"background-color": b
		}), $(e.contentBox).css({
			color: "#8c97cb"
		}), $(e.contentBox).css({
			"text-shadow": "0 0 30px #8c97cb, 0 0 70px #8c97cb"
		}))
	});
	$(this.background).bind(_event._enter,
	function(b) {
		isTouch || (b = colorAdd(e.config.backColor, 50), $(e.background).css({
			"background-color": b
		}), $(e.contentBox).css({
			color: "#8c97cb"
		}), $(e.contentBox).css({
			"text-shadow": "0 0 30px #8c97cb, 0 0 70px #8c97cb"
		}))
	});
	$(this.background).bind(_event._end,
	function(b) {
		isTouch || ($(e.background).css({
			"background-color": e.downBackColor
		}), $(e.contentBox).css({
			color: e.fontColor
		}), $(e.contentBox).css({
			"text-shadow": e.textShadow
		}))
	});
	$(this.background).bind(_event._leave,
	function(b) {
		isTouch || ($(e.background).css({
			"background-color": e.downBackColor
		}), $(e.contentBox).css({
			color: e.fontColor
		}), $(e.contentBox).css({
			"text-shadow": e.textShadow
		}))
	})
}
treeNode.prototype.setBorderTop = function(b) {
	$(this.background).css("border-top", "0px solid #CCCCCC")
};
treeNode.prototype.setButtonVisible = function(b) {
	this.expandButton.setVisible(b)
};
treeNode.prototype.setHasChildren = function(b) { (this.hasChild = b) && $(this.contentBox).css({
		"font-weight": "bold"
	})
};
treeNode.prototype.setVisible = function(b) {
	$(this.background).css({
		display: b ? "block": "none"
	})
};
treeNode.prototype.getIsExpand = function() {
	return this.opened
};
treeNode.prototype.setIsExpand = function(b) {
	this.opened = b
};
treeNode.prototype.getBackground = function() {
	return this.background
};
treeNode.prototype.getWidth = function() {
	return this.config.width
};
treeNode.prototype.getHeight = function() {
	return this.config.height
};
treeNode.prototype.setCaption = function(b) {
	this.config.caption = b.HTMLLabel2Text()
};
treeNode.prototype.setColor = function(b) {};
treeNode.prototype.setPosition = function(b, c, d) {
	void 0 == d && (d = ["left", "top"]);
	$(this.background).css(d[0], b + "px");
	$(this.background).css(d[1], c + "px")
};
treeNode.prototype.onResize = function(b, c) {
	this.config.width = b + 13;
	c && (this.config.height = c);
	this.background.css({
		width: this.config.width - this.config.padding + "px",
		height: this.config.height + "px"
	})
};
treeNode.prototype.getTotalHeight = function() {
	return this.totalHeight
};
treeNode.prototype.expand = function() {
	if (this.hasChild) {
		this.expandButton.changeIcon(uiBaseURL + "opened.png");
		for (var b = 0; b < this.children.length; b++) this.children[b].setVisible(!0),
		this.children[b].getIsExpand() ? this.children[b].expand() : this.children[b].bookMarkEnter();
		$(this.contentBox).css({
			color: bookConfig.bookmarkFontColor
		});
		this.fontColor = bookConfig.bookmarkFontColor;
		this.downBackColor = this.config.backColor;
		this.textShadow = ""
	} else this.expandButton.changeIcon(uiBaseURL + "bookMarkEnter.png")
};
treeNode.prototype.bookMarkEnter = function() {
	this.hasChild || this.expandButton.changeIcon(uiBaseURL + "bookMarkEnter.png")
};
treeNode.prototype.collapse = function() {
	if (this.hasChild) {
		this.expandButton.changeIcon(uiBaseURL + "closed.png");
		for (var b = 0; b < this.children.length; b++) this.children[b].setVisible(!1),
		this.children[b].collapse();
		$(this.contentBox).css({
			color: bookConfig.bookmarkFontColor
		});
		this.fontColor = bookConfig.bookmarkFontColor;
		this.downBackColor = this.config.backColor;
		this.textShadow = ""
	}
};
treeNode.prototype.onExpand = function() {
	this.opened ? this.collapse() : this.expand();
	this.opened = !this.opened;
	$(this.background).css({
		"background-color": this.config.backColor
	});
	return ! 1
};
treeNode.prototype.addChildren = function(b) {
	this.children.push(b)
};
treeNode.prototype.addNode = function(b) {
	b = new treeNode(b, this.background);
	this.children.push(b)
};
treeNode.prototype.deleteNode = function() {};
treeNode.prototype.getPageIndex = function() {
	return this.config.page
};
var isBookmarkDrag = !1,
tableContent = Class({
	create: function(b, c) {
		this._super(b, c);
		this.scrollMask = $('<div style = "position : absolute;"></div>');
		this.scrollBox = $('<div style = "position : absolute; width : 190px; height : 300px; overflow-y : auto;"></div>');
		this.scrollMouseDown = !1;
		this.mouseDownY = -1;
		this.changeScrollHeight = !1;
		this.height = this.width = 200;
		this.showing = !1;
		this.itemArr = [];
		if (isPhone() || isPad()) this.scrollMask.css({
			"overflow-y": "scroll",
			"overflow-x": "hidden",
			"-webkit-overflow-scrolling": "touch"
		});
		else {
			var d = $("<link rel='stylesheet' href='style/scrollbar.css'/>");
			$("body").append(d)
		}
		$(this.contentBox).append(this.scrollMask);
		$(this.contentBox).append(this.scrollBox);
		this.captionBox.setFont("12px", "#cccccc", "arial");
		this.captionBox.setCaption("<strong>" + getLanguage("frmToc", "Table of Content") + "</strong>");
		this.initScrollEvent();
		d = windowWidth / 4 + this.formConfig.scrollbarWidth;
		d = Math.max(300, d);
		this.formBackground.css({
			opacity: 1,
			"z-index": 99,
			top: "10px",
			left: -d - 20 + "px",
			width: "200px"
		});
		this.scrollMask.css({
			"border-top": "1px solid " + colorAdd(bookConfig.bookmarkBackground, 40)
		});
		this.captionBox.setFontSize(16);
		this.contentColor = bookConfig.bookmarkBackground
	},
	addContent: function(b, c, d) {
		addProgressBar(this.contentBox, this.width, this.height);
		for (var e = 0; e < b.length; e++) {
			var f = new treeNode(b[e], this.scrollBox, this.contentColor);
			this.itemArr.push(f);
			c || 0 != e || f.setBorderTop();
			c && (d.addChildren(f), f.setVisible(!1));
			1 <= b[e].children.length ? (f.setButtonVisible(!0), f.setHasChildren(!0), this.addContent(b[e].children, !0, f)) : (f.setButtonVisible(!0), f.bookMarkEnter())
		}
	},
	onResize: function(b, c) {
		this.width = 100 > b ? 100 : b;
		this.height = 100 > c ? 100 : c;
		this.showing || this.formBackground.css({
			left: -(this.width + this.formConfig.scrollbarWidth + 20) + "px"
		});
		this.setWidth(b);
		this.setHeight(c);
		$(this.scrollMask).css({
			width: this.width + "px",
			height: this.height - this.titleBox.height() + "px"
		});
		$(this.scrollBox).css({
			width: this.width + this.formConfig.scrollbarWidth + "px",
			height: this.height - this.titleBox.height() - 15 + "px",
			top: "1px"
		});
		for (var d = 0; d < this.itemArr.length; d++) this.itemArr[d].onResize(this.width - 30)
	},
	showForm: function() {
		var b = this;
		this.formBackground.animate({
			left: 10
		},
		400,
		function() {
			b.showing = !0;
			if (void 0 == b.addContentDown || null == b.addContentDown) b.addContentDown = !1;
			if (!1 == b.addContentDown) try {
				b.addContent(ols, !1),
				clearProgressBar(b.contentBox),
				b.addContentDown = !0
			} catch(c) {
				$("#btnTableOfContent").css({
					display: "none"
				}),
				tableofcontentButtonEnable = !1
			}
		})
	},
	closeForm: function() {
		var b = this,
		c = windowWidth / 4 + this.formConfig.scrollbarWidth,
		c = Math.max(300, c);
		this.formBackground.animate({
			left: -(b.width + b.formConfig.scrollbarWidth + 20)
		},
		400,
		function() {
			b.showing = !1
		})
	},
	getShowStatu: function() {
		return this.showing
	},
	setShowStatu: function(b) {
		this.showing = b
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.formBackground).css(d[0], b + "px");
		$(this.formBackground).css(d[1], c + "px")
	},
	initScrollEvent: function() {
		var b = this;
		$(this.scrollBox).bind(_event._down,
		function(c) {
			b.scrollMouseDown = !0;
			isBookmarkDrag = !1;
			c = isTouch ? c.originalEvent.touches: [c];
			b.mouseDownY = c[0].pageY;
			3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
		});
		$(this.scrollBox).bind(_event._move,
		function(c) {
			b.scrollMouseDown && (c = isTouch ? c.originalEvent.touches: [c], Math.abs(b.mouseDownY - c[0].pageY))
		});
		$(this.scrollBox).bind(_event._end,
		function(c) {
			b.scrollMouseDown = !1
		})
	}
}).extend(form),
phoneTableContent = Class({
	create: function(b, c) {
		this.contentBox = c;
		this.width = this.contentBox.width();
		this.height = foldingMenu.height - foldingMenu.getItemById("miBookmark").title.height();
		this.formConfig = $.extend({
			width: this.width,
			height: this.height,
			scrollbarWidth: 13
		},
		b);
		this.scrollMouseDown = !1;
		this.mouseDownY = -1;
		this.changeScrollHeight = !0;
		this.contentBac = colorDiv(bookConfig.toolbarColor, 30);
		this.showing = !1;
		this.itemArr = [];
		this.scrollMask = $("<div id='scrollMask' style = \"position : absolute;overflow:hidden;\"></div>");
		this.scrollBox = $("<div id='scrollBox' style = \"position : absolute;\"></div>");
		$(this.contentBox).append(this.scrollMask);
		$(this.scrollMask).append(this.scrollBox);
		this.scrollBox.css({
			width: this.width + "px",
			background: this.contentBac
		});
		this.scrollMask.css({
			width: this.width + "px",
			height: this.height + "px",
			background: this.contentBac
		});
		this.initScrollEvent();
		this.scrollMask.css({
			"border-top": "1px solid " + colorAdd(bookConfig.toolbarColor, 40)
		});
		this.contentColor = this.contentBac;
		this.showForm();
		for (var d = 0; d < this.itemArr.length; d++) this.itemArr[d].onResize(this.width - 30);
		this.scrollBox.css({
			height: 35 * this.itemArr.length + "px"
		});
		this.isDrag = !1
	},
	initStyle: function() {},
	onResize: function(b, c) {
		this.width = this.contentBox.width();
		this.height = foldingMenu.height - foldingMenu.getItemById("miBookmark").title.height();
		this.scrollBox.css({
			width: this.width + "px"
		});
		this.scrollMask.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		for (var d = 0; d < this.itemArr.length; d++) this.itemArr[d].onResize(this.width - 30)
	},
	showForm: function() {
		this.showing = !0;
		if (void 0 == this.addContentDown || null == this.addContentDown) this.addContentDown = !1;
		if (!1 == this.addContentDown) try {
			this.addContent(ols, !1),
			clearProgressBar(this.contentBox),
			this.addContentDown = !0
		} catch(b) {
			$("#btnTableOfContent").css({
				display: "none"
			}),
			tableofcontentButtonEnable = !1
		}
	},
	initScrollEvent: function() {
		if (isPhone() || isPad()) this.scrollMask.css({
			"overflow-y": "scroll",
			"overflow-x": "hidden",
			"-webkit-overflow-scrolling": "touch"
		});
		else {
			var b = $("<link rel='stylesheet' href='style/scrollbar.css'/>");
			$("body").append(b);
			this.scrollMask.css({
				overflow: "hidden"
			});
			ScrollFunction(this.scrollMask, this.scrollBox, this)
		}
	}
}).extend(tableContent);
bdor.l = bdor.i(10);
var thickness = Class({
	create: function(b) {
		this.thicknessObj = $("<div></div>");
		this.isLeft = b;
		this.visible = !0;
		this.hint = null;
		this.initTickness();
		this.thicknessObj.bind(_event._move,
		function(c) {
			var d;
			isTouchDevice() ? (d = c.originalEvent.touches[0], void 0 == d && (d = c.touches[0])) : d = c;
			$(d.target);
			c = d.offsetX;
			void 0 == c && (c = d.pageX - this.thicknessObj.offset().left);
			c = this.pageIndexByPosition(c, b);
			if ( - 1 != c) {
				c = " " + getShownPageNumber(c) + " ";
				var e = d.pageX;
				d = d.pageY - 30;
				null == this.hint && (this.hint = new divHint(c, e, d));
				this.hint.setText(c);
				this.hint.show(e, d);
				this.hint.moveto(e, d)
			} else null != this.hint && this.hint.hide()
		}.bind(this));
		this.thicknessObj.bind(_event._leave,
		function() {
			null != this.hint && this.hint.hide()
		}.bind(this));
		this.thicknessObj.bind(_event._end,
		function(c) {
			var d;
			isTouchDevice() ? (d = c.originalEvent.touches[0], void 0 == d && (d = c.touches[0])) : d = c;
			$(d.target);
			c = d.offsetX;
			void 0 == c && (c = d.pageX - this.thicknessObj.offset().left);
			d = this.pageIndexByPosition(c, b);
			c = BookInfo.getBook().currentPageIndex;
			bookType == BookType.single_book && (c = singlePageBook.currentPageIndex);
			var e = c + 1;
			bookType == BookType.single_book && (e = -1); - 1 != d && d != c && d != e && gotoPageFun(d)
		}.bind(this))
	},
	initTickness: function() {
		this.topPart = $("<div style='position:relative;height:50px;width:100%;overflow:hidden;'></div>");
		this.centerPart = $("<div style='position:relative;height:auto;width:100%;overflow:hidden;'></div>");
		this.bottomPart = $("<div style='position:relative;height:50px;width:100%;overflow:hidden;'></div>");
		this.isLeft ? (this.topPart.append("<img src='" + uiBaseURL + "thickness_left.png' style='position:absolute;width:100%;top:0px;' />"), this.centerPart.append("<img src='" + uiBaseURL + "thickness_left.png' style='position:absolute;width:100%;top:-50px;' />"), this.bottomPart.append("<img src='" + uiBaseURL + "thickness_left.png' style='position:absolute;width:100%;bottom:0px;' />")) : (this.topPart.append("<img src='" + uiBaseURL + "thickness.png' style='position:absolute;width:100%;top:0px;' />"), this.centerPart.append("<img src='" + uiBaseURL + "thickness.png' style='position:absolute;width:100%;top:-50px;' />"), this.bottomPart.append("<img src='" + uiBaseURL + "thickness.png' style='position:absolute;width:100%;bottom:0px;' />"));
		this.thicknessObj.append(this.topPart);
		this.thicknessObj.append(this.centerPart);
		this.thicknessObj.append(this.bottomPart)
	},
	onResize: function(b, c) {
		this.thicknessObj.css({
			width: b,
			height: c
		});
		this.centerPart.css({
			height: Math.max(0, c - 100)
		});
		this.centerPart.find("img").css({
			height: c
		})
	},
	setThicknessPosition: function(b, c) {
		this.thicknessObj.css({
			left: b,
			top: c,
			position: "absolute",
			"z-index": this.isLeft ? 8 : 9
		})
	},
	hideThickness: function() {
		this.thicknessObj.css("display", "none")
	},
	showThickness: function() {
		this.thicknessObj.css("display", "block")
	},
	setVisible: function(b) {
		this.thicknessObj.css({
			display: b ? "block": "none"
		});
		this.visible = b
	},
	getContainer: function() {
		return this.thicknessObj
	},
	pageIndexByPosition: function(b, c) {
		this.isLeft = c;
		var d = bookType === BookType.catalog_book ? 1 : 0.4,
		e = this.thicknessObj.width(),
		f = e * d;
		if (0 < b && b <= f && !1 == c || 0 < e - b && e - b <= f && !0 == c) {
			var g = bookConfig.totalPageCount,
			d = BookInfo.getBook().currentPageIndex;
			bookType == BookType.single_book && (d = singlePageBook.currentPageIndex);
			var h = d - 1; ! 0 == rightToLeft ? (!0 == c && (h = g - d - 1), !1 == c ? (e = Math.floor(h * (1 - b / f)), e++) : (e = Math.floor(h * (1 - (b - (e - f)) / f)), e += d + 1)) : (!1 == c && (h = g - d - 1), !1 == c ? (e = Math.floor(h * b / f), e += d + 1) : (e = Math.floor(h * (b - (e - f)) / f), e++));
			return e
		}
		return - 1
	}
}),
flipShotBar = Class({
	create: function(b) {
		this.flipShotObj = $("<div id='flipShotObj' style='top:0;bottom:0;margin:auto;'></div>");
		b ? (this.prevDiv = $("<div class='flipShot'></div>"), this.firstDiv = $("<div class='flipShot'></div>"), this.prevDiv.append("<div class='flipShotBackground'></div>"), this.firstDiv.append("<div class='flipShotBackground'></div>"), this.prevDiv.append("<img src='" + uiBaseURL + "slide_leftButton.png' />"), this.firstDiv.append("<img src='" + uiBaseURL + "slide_firstButton.png' />")) : (this.prevDiv = $("<div class='flipShot'></div>"), this.firstDiv = $("<div class='flipShot'></div>"), this.prevDiv.append("<div class='flipShotBackground'></div>"), this.firstDiv.append("<div class='flipShotBackground'></div>"), this.prevDiv.append("<img src='" + uiBaseURL + "slide_rightButton.png'/>"), this.firstDiv.append("<img src='" + uiBaseURL + "slide_lastButton.png'/>"));
		this.flipShotObj.append(this.firstDiv);
		this.flipShotObj.append(this.prevDiv);
		this.isLeft = b;
		this.visible = !0;
		this.init();
		this.initEvents()
	},
	init: function() {
		this.enterCss = {
			background: "#ffffff",
			"-webkit-box-shadow": "0 0 15px rgba(255, 255, 255, 1)",
			"-moz-box-shadow": "0 0 15px rgba(255, 255, 255, 1)",
			"-o-box-shadow": "0 0 15px rgba(255, 255, 255, 1)",
			"-ms-box-shadow": "0 0 15px rgba(255, 255, 255, 1)",
			"box-shadow": "0 0 15px rgba(255, 255, 255, 1)"
		};
		this.leaveCss = {
			background: "#727272",
			"-webkit-box-shadow": "0 0 15px rgba(114, 114, 114, 1)",
			"-moz-box-shadow": "0 0 15px rgba(114, 114, 114, 1)",
			"-o-box-shadow": "0 0 15px rgba(114, 114, 114, 1)",
			"-ms-box-shadow": "0 0 15px rgba(114, 114, 114, 1)",
			"box-shadow": "0 0 15px rgba(114, 114, 114, 1)"
		};
		this.prevDiv.css({
			width: "100%",
			height: "80%",
			position: "relative",
			"border-radius": "0px 0px 0px 5px"
		});
		this.firstDiv.css({
			width: "100%",
			height: "20%",
			position: "relative",
			"border-bottom": "1px solid #ffffff"
		});
		this.prevDiv.find("div").css(this.leaveCss);
		this.firstDiv.find("div").css(this.leaveCss);
		this.isLeft ? (this.firstDiv.find("div").css({
			"border-radius": "5px 0px 0px 0px"
		}), this.prevDiv.find("div").css({
			"border-radius": "0px 0px 0px 5px"
		})) : (this.firstDiv.find("div").css({
			"border-radius": "0px 5px 0px 0px"
		}), this.prevDiv.find("div").css({
			"border-radius": "0px 0px 5px 0px"
		}))
	},
	onResize: function(b, c) {
		var d = Math.min(50, 0.7 * c / 8),
		e = Math.min(0.7 * c, 310);
		this.width = d;
		this.height = e;
		this.flipShotObj.css({
			width: d,
			height: e
		})
	},
	setThicknessPosition: function(b, c) {
		this.flipShotObj.css({
			left: b,
			top: c,
			position: "absolute",
			"z-index": this.isLeft ? 8 : 9
		})
	},
	hideThickness: function() {
		this.flipShotObj.css("display", "none")
	},
	showThickness: function() {
		this.flipShotObj.css("display", "block")
	},
	setVisible: function(b) {
		this.flipShotObj.css({
			display: b ? "block": "none"
		});
		this.visible = b
	},
	getContainer: function() {
		return this.flipShotObj
	},
	initEvents: function() {
		this.isLeft && !rightToLeft ? (this.prevDiv.bind(_event._down,
		function() {
			previousPageFun();
			return ! 1
		}), this.firstDiv.bind(_event._down,
		function() {
			firstPageFun();
			return ! 1
		})) : (this.prevDiv.bind(_event._down,
		function() {
			nextPageFun();
			return ! 1
		}), this.firstDiv.bind(_event._down,
		function() {
			lastPageFun();
			return ! 1
		}));
		this.prevDiv.bind(_event._down + " " + _event._enter,
		function() {
			this.prevDiv.find("div").css(this.enterCss)
		}.bind(this));
		this.firstDiv.bind(_event._down + " " + _event._enter,
		function() {
			this.firstDiv.find("div").css(this.enterCss)
		}.bind(this));
		this.prevDiv.bind(_event._leave,
		function() {
			this.prevDiv.find("div").css(this.leaveCss)
		}.bind(this));
		this.firstDiv.bind(_event._leave,
		function() {
			this.firstDiv.find("div").css(this.leaveCss)
		}.bind(this));
		isTouch && (this.prevDiv.bind(_event._end,
		function() {
			this.prevDiv.find("div").css(this.leaveCss)
		}.bind(this)), this.firstDiv.bind(_event._end,
		function() {
			this.firstDiv.find("div").css(this.leaveCss)
		}.bind(this)))
	},
	setScale: function(b) {
		this.width *= b;
		this.height *= b;
		this.flipShotObj.css({
			width: this.width,
			height: this.height
		})
	}
}),
VideoGallery = Class({
	create: function(b, c) {
		this.videoGalleryFlag = !1;
		this.newVideoData = [];
		this.setDataFalg = [];
		this.videoData = this.formatData(c);
		this.createVideoGallery(b)
	},
	formatData: function(b) {
		for (var c = [], d = 0; d < b.length; d++) {
			this.setDataFalg[d] = !1;
			var e = b[d];
			c.push({
				type: e.type,
				id: e.id,
				src: e.thumbnail,
				des: this.encodeHTML(e.description),
				title: this.encodeHTML(e.title)
			})
		}
		return c
	},
	createVideoGallery: function(b) {
		var c = this;
		this.videoBG = $("<div style='position: absolute; left: 0px;top: 0px;bottom: 0px;right: 0px; z-index: 9999;'></div>").hide().append($("<div class='flipHTML5VideoGallery-BG'></div>")).appendTo(b);
		this.videoGallery = $("<div class='flipHTML5VideoGallery'></div>").appendTo(this.videoBG);
		b = $("<div style='position: absolute;left: 0px;top: 0px;width: 100%;height: 34px;background-color: #373737;'></div>").appendTo(this.videoGallery);
		var d = $("<div class='flipHTML5VideoGallery-close' style='width: 26px;height: 26px;bottom: 4px;right: 4px;'></div>").attr("title", "Close").append($("<img style='margin-left: 4px;margin-top: 4px;'/>").attr("src", uiBaseURL + "note_close.png")).appendTo(b),
		e = $("<span class='flipHTML5VideoGallery-closeTitle'></span>").html("close").hide().appendTo(this.videoBG);
		this.videoTitle = $("<span class='flipHTML5VideoGallery-videoTitle'></span>").appendTo(b);
		this.videoGallery.on({
			"mouseover touchstart": function(b) {
				e.hide();
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			},
			"mouseout touchend": function(b) {
				e.hide();
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			},
			"mousemove touchmove": function(b) {
				e.hide();
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			},
			"click touchend": function(b) {
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			}
		});
		this.videoBG.add(d).on({
			"mouseover touchstart": function(b) {
				try {
					var d = b.pageY || b.originalEvent.touches[0].pageY;
					e.css({
						left: (b.pageX || b.originalEvent.touches[0].pageX) - 17,
						top: d + 28 > c.videoBG.height() - 15 ? d - 28 : d + 28
					}).show()
				} catch(h) {
					Log.error(h)
				}
			},
			"mouseout touchend": function(b) {
				e.hide()
			},
			"mousemove touchmove": function(b) {
				try {
					var d = b.pageY || b.originalEvent.touches[0].pageY;
					e.css({
						left: (b.pageX || b.originalEvent.touches[0].pageX) - 17,
						top: d + 28 > c.videoBG.height() - 15 ? d - 28 : d + 28
					})
				} catch(h) {
					Log.error(h)
				}
			},
			"click touchend": function(b) {
				c.hide()
			}
		});
		b = $("<div style='position: absolute;width: 100%;left: 0px;top: 34px;height: 388px;background-color: #C7C7C7;'></div>").appendTo(this.videoGallery);
		d = $("<div class='flipHTML5VideoGallery-videoDiv'></div>").appendTo(b);
		d.append("<div class='flipHTML5Loading' style='width: 100%;height: 100%;position: absolute;left: 0px;top: 0px;'></div>");
		this.videoFrame = $("<iframe type='text/html' name='iName' id='iId' width='504' height='370' src='' allowfullscreen frameborder='0' style='position: absolute;left: 0px;top: 0px;background-color: #222222;z-index: 2;'></iframe>").appendTo(d);
		this.videoListDiv = $("<div class='flipHTML5VideoGallery-videoListDiv'></div>").appendTo(b);
		this.createVideoList(this.videoListDiv)
	},
	createVideoList: function(b) {
		var c = this.videoData,
		d = c.length,
		e = 72 * d + 6 * (d - 1),
		e = 0 < e ? e: 0;
		this.videoListDiv.css({
			height: 370 < e ? 370 : e
		});
		b = $("<div class='flipHTML5VideoGallery-videoListTable' style='position: absolute;width: 100%;height: 100%;left: 0px;top: 0px;overflow: hidden;'></div>").appendTo(b);
		e = $("<div class='flipHTML5VideoGallery-videoList' style='position: absolute;left: 0px;top: 0px;'></div>").css({
			width: 313,
			height: e
		}).appendTo(b);
		this.table = b;
		this.list = e;
		this.createScrollBar(b, b, e);
		for (var f = 0; f < d; f++) this.createEachList(e, f, c[f]);
		this.scrollBarShowHide(b, e)
	},
	createEachList: function(b, c, d) {
		var e = this; (function(c) {
			var g = $("<div class='flipHTML5VideoGallery-eachVideo' style='position: absolute;cursor: pointer;'></div>").css({
				width: 320,
				height: 72,
				left: 0,
				top: 78 * c
			}).attr("id", "flipHTML5VideoGallery-eachVideo" + c).appendTo(b),
			h = $("<div class='flipHTML5Loading' style='position: absolute;width: 68px; height: 68px; top: 1px;left: 2px;border: 1px solid #ffffff;background-color: #E2E2E2;'></div>").append($("<img style='position: absolute;width: 100%;height: 100%;left: 0px;top: 0px;'/>").attr("id", "flipHTML5VideoGallery-eachImg" + c)).appendTo(g),
			k = $("<div style='position: absolute;width: 247px;height: 100%;left: 72px;overflow: hidden;'></div>").append($("<span class='flipHTML5VideoGallery-eachVideoDes'></span>").attr("id", "flipHTML5VideoGallery-eachDes" + c)).appendTo(g),
			l = e.videoData[c];
			l.src && l.des && l.title ? (e.setDataFalg[c] = !0, g.on("click touchend",
			function() {
				e.setVideoID(l)
			}), k.children("span").html(l.des).attr("title", l.des), e.loadImg(l.src, h.children("img"), 68, 68)) : e.getVideoData(d.type, d.id,
			function(b) {
				e.setDataFalg[c] = !0;
				g.on("click touchend",
				function() {
					e.setVideoID({
						type: b.type,
						id: b.id,
						src: l.src || b.src,
						des: l.des || b.des,
						title: l.title || b.title
					})
				});
				k.children("span").html(l.des || b.des).attr("title", l.des || b.des);
				e.loadImg(l.src || b.src, h.children("img"), 68, 68)
			})
		})(c)
	},
	setEachListData: function() {
		for (var b = this,
		c = 0; c < this.videoData.length; c++)(function(c) {
			if (!b.setDataFalg[c]) {
				var e = b.videoData[c],
				f = b.videoData[c];
				e.src && e.des && e.title ? (b.setDataFalg[c] = !0, b.list.find("#flipHTML5VideoGallery-eachVideo" + c).on("click touchend",
				function() {
					b.setVideoID(e)
				}), b.list.find("#flipHTML5VideoGallery-eachDes" + c).html(e.des).attr("title", e.des), b.loadImg(e.src, b.list.find("#flipHTML5VideoGallery-eachImg" + c), 68, 68)) : b.getVideoData(f.type, f.id,
				function(f) {
					b.setDataFalg[c] = !0;
					b.list.find("#flipHTML5VideoGallery-eachVideo" + c).on("click touchend",
					function() {
						b.setVideoID({
							type: f.type,
							id: f.id,
							src: e.src || f.src,
							des: e.des || f.des,
							title: e.title || f.title
						})
					});
					b.list.find("#flipHTML5VideoGallery-eachDes" + c).html(e.des || f.des).attr("title", e.des || f.des);
					b.loadImg(e.src || f.src, b.list.find("#flipHTML5VideoGallery-eachImg" + c), 68, 68)
				})
			}
		})(c)
	},
	loadImg: function(b, c, d, e) {
		var f = new Image;
		f.onload = function() {
			f.onload = f.onerror = null;
			c.parent().removeClass("flipHTML5Loading");
			var b = this.width / this.height,
			h = e * b,
			k = d / b;
			h > e ? c.css({
				width: e,
				height: k,
				top: (e - k) / 2,
				left: 0
			}) : k > e ? c.css({
				width: h,
				height: e,
				left: (e - h) / 2,
				top: 0
			}) : h / k == b && c.css({
				width: h,
				height: k,
				left: 0,
				top: 0
			})
		};
		f.onerror = function() {
			f.onload = f.onerror = null;
			c.parent().removeClass("flipHTML5Loading");
			c.css({
				width: 18,
				height: 20,
				left: (d - 18) / 2,
				top: (e - 20) / 2
			})
		};
		c[0].src = b;
		f.src = b
	},
	setVideoID: function(b) {
		var c;
		"youtube" === b.type && (c = "http://www.youtube.com/embed/" + b.id + "?autoplay=1&wmode=transparent");
		"vimeo" === b.type && (c = "http://player.vimeo.com/video/" + b.id + "?autoplay=1&wmode=transparent&portrait=0");
		this.videoFrame[0].src = c;
		this.videoTitle.html(b.title)
	},
	getVideoData: function(b, c, d) {
		"youtube" === b ? this.getYouTubeData(c, d) : "vimeo" === b && this.getVimeoData(c, d)
	},
	getYouTubeData: function(b, c) {
		$.getJSON("http://gdata.youtube.com/feeds/api/videos/" + b + "?v=2&alt=jsonc",
		function(b) {
			b = b.data;
			c({
				type: "youtube",
				id: b.id,
				title: b.title,
				des: b.description,
				src: b.thumbnail.sqDefault
			})
		})
	},
	getVimeoData: function(b, c) {
		$.getJSON("http://www.vimeo.com/api/v2/video/" + b + ".json?callback=?", {
			format: "json"
		},
		function(b) {
			b = b[0];
			c({
				type: "vimeo",
				id: b.id,
				title: b.title,
				des: b.description,
				src: b.thumbnail_medium
			})
		})
	},
	hide: function() {
		this.videoGalleryFlag = !1;
		this.videoBG.hide();
		this.videoFrame[0].src = ""
	},
	show: function() {
		var b = this;
		this.videoGalleryFlag = !0;
		this.setEachListData();
		if (0 < this.videoData.length) {
			var c = this.videoData[0];
			c.src && c.des && c.title ? b.setVideoID(c) : b.getVideoData(c.type, c.id,
			function(d) {
				b.setVideoID({
					type: d.type,
					id: d.id,
					src: c.src || d.src,
					des: c.des || d.des,
					title: c.title || d.title
				})
			})
		}
		this.videoBG.show();
		this.scrollBarShowHide(this.table, this.list)
	},
	showHide: function() {
		this.videoGalleryFlag ? this.hide() : this.show()
	},
	createScrollBar: function(b, c, d) {
		b = $("<div>", {
			"class": "ScrollBar",
			css: {
				position: "absolute",
				width: 6,
				height: "100%",
				backgroundColor: "#a8a8a8",
				borderRadius: 0,
				right: 0,
				top: 0,
				borderLeft: "1px solid #ffffff"
			}
		}).appendTo(b);
		var e = $("<div>", {
			"class": "OuterScroll",
			css: {
				position: "absolute",
				width: 6,
				height: "100%",
				left: 0,
				top: 0,
				backgroundColor: "transparent",
				borderRadius: 0,
				overflow: "hidden",
				cursor: "pointer"
			}
		}).appendTo(b);
		$("<div>", {
			"class": "InnerScroll",
			css: {
				position: "absolute",
				width: 6,
				height: "100%",
				marginLeft: 0,
				marginRight: 0,
				left: 0,
				top: 0,
				backgroundColor: "#5e5e5e",
				borderRadius: 0,
				cursor: "pointer"
			}
		}).appendTo(e);
		this.scrollBar = b;
		this.outerScroll = e;
		this.bindScrollBarEvents(b, e, c, d)
	},
	scrollBarShowHide: function(b, c) {
		var d = b.outerHeight() * this.scrollBar.outerHeight() / c.outerHeight();
		this.outerScroll.css({
			height: d
		});
		b.height() >= c.height() ? (this.scrollBar.hide(), c.css({
			top: 0
		}), $(".flipHTML5VideoGallery-eachVideoDes").css({
			width: 231
		})) : (this.scrollBar.show(), $(".flipHTML5VideoGallery-eachVideoDes").css({
			width: 224
		}), Math.abs(parseFloat(c.css("top"))) > c.outerHeight() - b.outerHeight() && (c.css({
			top: -(c.outerHeight() - b.outerHeight())
		}), this.outerScroll.css({
			top: this.scrollBar.outerHeight() - this.outerScroll.outerHeight()
		})))
	},
	bindScrollBarEvents: function(b, c, d, e) {
		var f = this;
		c.on(_event._down,
		function(b) {
			var h = b || event,
			k = h.clientY - f.outerScroll.position().top,
			l = b.which;
			b.stopPropagation();
			1 == l && ($(document).add(f.outerScroll).add(f.videoGallery).on("mousemove.scrollBar touchmove.scrollBar",
			function(b) {
				b.preventDefault();
				b.stopPropagation();
				h = b || event;
				b = h.clientY - k;
				0 >= b ? b = 0 : b >= f.scrollBar.outerHeight() - f.outerScroll.outerHeight() && (b = f.scrollBar.outerHeight() - f.outerScroll.outerHeight());
				c.css({
					top: b
				});
				e.css({
					top: -b / (f.scrollBar.outerHeight() - f.outerScroll.outerHeight()) * (e.outerHeight() - d.outerHeight())
				})
			}), $(document).add(f.outerScroll).add(f.videoGallery).on("mouseup.scrollBar touchend.scrollBar",
			function(b) {
				b = b || event;
				b.preventDefault();
				b.stopPropagation();
				$(document).add(f.outerScroll).add(f.videoGallery).off("mousemove.scrollBar touchmove.scrollBar");
				$(document).add(f.outerScroll).add(f.videoGallery).off("mouseup.scrollBar touchend.scrollBar")
			}))
		});
		d.bind($.browser.mozilla ? "DOMMouseScroll": "mousewheel",
		function(f) {
			if (! (d.outerHeight() >= e.outerHeight())) {
				var h = f.originalEvent,
				h = h.wheelDelta || -h.detail,
				k = e.position().top,
				l;
				e.stop(!1, !1);
				0 < h ? l = 0 > k + d.outerHeight() / 11 ? k + d.outerHeight() / 11 : 0 : 0 > h && (l = e.outerHeight() - d.outerHeight() > -(k - d.outerHeight() / 11) ? k - d.outerHeight() / 11 : -(e.outerHeight() - d.outerHeight()));
				e.css({
					top: l
				});
				c.css({
					top: -l / (e.outerHeight() - d.outerHeight()) * (b.outerHeight() - c.outerHeight())
				});
				f.stopPropagation();
				f.preventDefault();
				return ! 1
			}
		});
		f.list.on("mousedown.pad touchstart.pad",
		function(b) {
			var c = parseInt(f.list.css("top")),
			d = f.table.height(),
			e = f.list.outerHeight(),
			m = b.pageY || b.originalEvent.touches[0].pageY;
			f.table.on("mousemove.pad touchmove.pad",
			function(b) {
				b = c + ((b.pageY || b.originalEvent.touches[0].pageY) - m);
				b = 0 < b ? 0 : b < d - e ? d - e: b;
				f.list.css({
					top: b
				})
			});
			f.table.on("mouseup.pad touchend.pad",
			function(b) {
				f.table.off("mousemove.pad touchmove.pad");
				f.table.off("mouseup.pad touchend.pad")
			})
		})
	},
	encodeHTML: function(b) {
		return b ? b.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\\/g, "&#92;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/\n/g, "<br>") : b
	}
}),
PhotoGallery = Class({
	create: function(b, c) {
		this.$container = b;
		this.photoArr = this.formatData(c);
		this.currentIndex = 0;
		this.photoFlag = !1;
		this.originals = [];
		this.createPhotoGallery(b)
	},
	formatData: function(b) {
		for (var c = [], d = 0; d < b.length; d++) {
			var e = b[d];
			c.push({
				src: e,
				thumbSrc: e,
				title: this.getFileNameByFilePath(e)
			})
		}
		return c
	},
	getFileNameByFilePath: function(b) {
		var c = b.lastIndexOf("/"),
		d = b.lastIndexOf("\\"),
		c = Math.max(c, d);
		if (0 > c) return c = b.lastIndexOf("."),
		b.substring(0, c);
		b = b.substring(c + 1);
		c = b.lastIndexOf(".");
		return b.substring(0, c)
	},
	createPhotoGallery: function(b) {
		var c = this;
		this.photoBG = $("<div style='position: absolute; left: 0px;top: 0px;bottom: 0px;right: 0px; z-index: 9999;'></div>").append($("<div class='flipHTML5PhotoGallery-BG'></div>").css({
			opacity: 0.5
		})).hide().appendTo(b);
		this.closeBtn = $("<div style='position: absolute;left: auto;right: 0px;top: 0px;cursor: pointer;'></div>").append($("<img/>").attr("src", uiBaseURL + "photoGallery_close.png")).appendTo(this.photoBG);
		this.outPhotoGallery = $("<div class='flipHTML5PhotoGallery'></div>").css({
			left: (this.photoBG.width() - 328) / 2,
			top: (this.photoBG.height() - 328) / 2
		}).appendTo(this.photoBG);
		this.photoGallery = $("<div class='flipHTML5Loading' style='position: absolute;left: 0px;top: 0px;right: 0px;bottom: 0px;overflow: hidden;'></div>").appendTo(this.outPhotoGallery);
		this.mimCloseBtn = $("<div style='position: absolute;left: auto;right: -20px;top: -20px;cursor: pointer;'></div>").append($("<img/>").attr("src", uiBaseURL + "close.png")).appendTo(this.outPhotoGallery);
		this.photoImg = $("<img class='flipHTML5PhotoGallery-img' style='position: absolute;'/>").appendTo(this.photoGallery);
		this.prevBtn = $("<div class='flipHTML5PhotoGallery-prevBtn'></div>").css({
			left: -32
		}).append($("<img/>").attr("src", uiBaseURL + "photo_prev.png")).appendTo(this.photoGallery);
		this.nextBtn = $("<div class='flipHTML5PhotoGallery-nextBtn'></div>").css({
			right: -32
		}).append($("<img style='margin-top: 1px;'/>").attr("src", uiBaseURL + "photo_next.png")).appendTo(this.photoGallery);
		this.closeTitle = $("<span class='flipHTML5PhotoGallery-closeTitle'></span>").html("close").hide().appendTo(this.photoBG);
		this.mimCloseBtn.on({
			"mouseover touchstart": function(b) {
				c.mimCloseBtn.children("img")[0].src = uiBaseURL + "close_down.png";
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			},
			"mouseout touchend": function(b) {
				c.mimCloseBtn.children("img")[0].src = uiBaseURL + "close.png";
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			}
		});
		this.mimCloseBtn.on("click mousemove touchmove",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		this.prevBtn.on("click touchend",
		function() {
			c.prev(1)
		});
		this.nextBtn.on("click touchend",
		function() {
			c.next(1)
		});
		this.outPhotoGallery.on({
			"mouseover touchstart": function(b) {
				c.closeTitle.hide();
				b.preventDefault();
				b.stopPropagation();
				try {
					var e = $(this).position().left,
					f = (b.pageX || b.originalEvent.touches[0].pageX) - e,
					g = $(this).outerWidth() / 2;
					f <= g ? (c.prevBtn.stop(!1, !1).animate({
						left: 0
					},
					{
						duration: 60,
						easing: "linear"
					}), c.nextBtn.stop(!1, !1).animate({
						right: -32
					},
					{
						duration: 60,
						easing: "linear"
					})) : (c.prevBtn.stop(!1, !1).animate({
						left: -32
					},
					{
						duration: 60,
						easing: "linear"
					}), c.nextBtn.stop(!1, !1).animate({
						right: 0
					},
					{
						duration: 60,
						easing: "linear"
					}))
				} catch(h) {
					Log.error(h)
				}
				return ! 1
			},
			"mouseout touchend": function(b) {
				b.preventDefault();
				b.stopPropagation();
				c.closeTitle.hide();
				c.prevBtn.stop(!1, !1).animate({
					left: -32
				},
				{
					duration: 60,
					easing: "linear"
				});
				c.nextBtn.stop(!1, !1).animate({
					right: -32
				},
				{
					duration: 60,
					easing: "linear"
				});
				return ! 1
			},
			"mousemove touchmove": function(b) {
				b.preventDefault();
				b.stopPropagation();
				c.closeTitle.hide();
				try {
					var e = $(this).position().left,
					f = (b.pageX || b.originalEvent.touches[0].pageX) - e,
					g = $(this).outerWidth() / 2;
					f <= g ? (c.prevBtn.stop(!1, !1).animate({
						left: 0
					},
					{
						duration: 60,
						easing: "linear"
					}), c.nextBtn.stop(!1, !1).animate({
						right: -32
					},
					{
						duration: 60,
						easing: "linear"
					})) : (c.prevBtn.stop(!1, !1).animate({
						left: -32
					},
					{
						duration: 60,
						easing: "linear"
					}), c.nextBtn.stop(!1, !1).animate({
						right: 0
					},
					{
						duration: 60,
						easing: "linear"
					}))
				} catch(h) {
					Log.error(h)
				}
				return ! 1
			},
			"click touchstart": function(b) {
				b.preventDefault();
				b.stopPropagation();
				try {
					var e = c.outPhotoGallery.position().left,
					f = (b.pageX || b.originalEvent.touches[0].pageX) - e,
					g = c.outPhotoGallery.outerWidth() / 2;
					f <= g ? c.prev(1) : c.next(1)
				} catch(h) {
					Log.error(h)
				}
				return ! 1
			}
		});
		this.photoBG.add(this.mimCloseBtn).on({
			"mouseover touchstart": function(b) {
				try {
					c.closeTitle.show();
					var e = b.pageY || b.originalEvent.touches[0].pageY;
					c.closeTitle.css({
						left: (b.pageX || b.originalEvent.touches[0].pageX) - 17,
						top: e + 28 > c.photoBG.height() - 15 ? e - 28 : e + 28
					}).show()
				} catch(f) {
					Log.error(f)
				}
			},
			"mouseout touchend": function(b) {
				c.closeTitle.hide()
			},
			"mousemove touchmove": function(b) {
				try {
					var e = b.pageY || b.originalEvent.touches[0].pageY;
					c.closeTitle.css({
						left: (b.pageX || b.originalEvent.touches[0].pageX) - 17,
						top: e + 28 > c.photoBG.height() - 15 ? e - 28 : e + 28
					})
				} catch(f) {
					Log.error(f)
				}
			},
			"click touchstart": function() {
				c.hide()
			}
		});
		this.createThumbs(this.photoBG);
		0 < this.photoArr.length && this.skipTo(0);
		window.onresize = function() {
			c.outPhotoGallery.css({
				left: (c.photoBG.width() - c.outPhotoGallery.outerWidth()) / 2,
				top: (c.photoBG.height() - c.outPhotoGallery.outerHeight()) / 2
			});
			if (0 < c.photoArr.length) {
				c.reviseThumb();
				c.thumbList && c.moveThumb(c.currentIndex);
				var b = c.photoBG.width(),
				e = c.photoBG.height() - 64,
				f = c.originals[c.currentIndex],
				g = c.resizeImgSize(b, e, f.width, f.height),
				f = g.width,
				g = g.height;
				c.photoImg.css({
					left: 0,
					top: 0,
					width: f,
					height: g
				});
				c.outPhotoGallery.css({
					left: (b - f - 16) / 2,
					top: (e - g - 16) / 2,
					width: f,
					height: g
				})
			}
		}
	},
	loadImg: function(b) {
		var c = this,
		d = c.photoBG.width(),
		e = c.photoBG.height() - 64,
		f = new Image;
		f.onload = function() {
			f.onload = f.onerror = null;
			var b = this.width,
			h = this.height,
			k = c.resizeImgSize(d, e, b, h);
			c.originals[c.currentIndex] = {
				width: b,
				height: h
			};
			c.photoImg.attr({
				originalWidth: b,
				originalHeight: h
			});
			b = k.width;
			h = k.height;
			c.photoImg.css({
				left: 0,
				top: 0,
				width: b,
				height: h
			});
			c.outPhotoGallery.stop(!1, !1).animate({
				left: (d - b - 16) / 2,
				top: (e - h - 16) / 2,
				width: b,
				height: h
			},
			{
				duration: 240,
				easing: "linear",
				complete: function() {
					c.photoGallery.removeClass("flipHTML5Loading");
					c.photoImg.fadeIn(500)
				}
			})
		};
		f.onerror = function() {
			f.onload = f.onerror = null;
			c.photoImg.css({
				left: (c.outPhotoGallery.width() - 18) / 2,
				top: (c.outPhotoGallery.height() - 20) / 2
			});
			c.originals[c.currentIndex] = {
				width: 18,
				height: 20
			};
			c.photoGallery.removeClass("flipHTML5Loading");
			c.photoImg.show().attr("src", b)
		};
		f.src = b;
		c.photoImg.attr("src", b)
	},
	resizeImgSize: function(b, c, d, e) {
		var f = d / e;
		d + 16 >= b && e + 16 >= c ? f >= b / c ? (d = b - 16, e = d / f) : (e = c - 16, d = e * f) : d + 16 >= b && e + 16 < c ? (d = b - 16, e = d / f) : d + 16 < b && e + 16 >= c && (e = c - 16, d = e * f);
		return {
			width: d,
			height: e
		}
	},
	next: function(b) {
		this.skipTo(this.currentIndex + (b ? b: 1))
	},
	prev: function(b) {
		this.skipTo(this.currentIndex - (b ? b: 1))
	},
	skipTo: function(b) {
		0 >= this.photoArr.length || (this.photoGallery.addClass("flipHTML5Loading"), this.photoImg.hide().attr("src", ""), b = this.formatIndex(b), this.loadImg(this.photoArr[b].src), this.currentIndex = b, this.thumbSkipTo(b))
	},
	formatIndex: function(b) {
		var c = this.photoArr.length;
		0 > b ? b = (b + c) % c: b >= c && (b %= c);
		return b
	},
	createThumbs: function(b) {
		var c = this,
		d = this.photoArr,
		e = d.length,
		f = 0 < e ? 54 * e + 4 * (e - 1) : 0;
		b = $("<div class='flipHTML5PhotoGallery-thumb'></div>").appendTo(b);
		var g = $("<div class='flipHTML5PhotoGallery-thumbView'></div>").appendTo(b),
		h = $("<div class='flipHTML5PhotoGallery-thumbList'></div>").css({
			width: f
		}).appendTo(g),
		k = $("<span class='flipHTML5PhotoGallery-thumbTitle'></span>").appendTo(b).hide();
		h.on({
			"mouseover touchstart": function(b) {
				c.closeTitle.hide()
			},
			"mousemove touchmove": function(b) {
				c.closeTitle.hide()
			},
			"click touchstart": function(b) {
				b.preventDefault();
				b.stopPropagation();
				return ! 1
			}
		});
		this.thumb = b;
		this.thumbView = g;
		this.thumbList = h;
		this.reviseThumb();
		this.mouseThumb();
		for (var l = 0; l < e; l++)(function(b) {
			var e = 58 * b,
			f = $("<div style='position: absolute;top: 0px;overflow: hidden;border: 2px solid #cccccc;cursor: pointer;'></div>").attr({
				id: "flipHTML5PhotoThumb" + b,
				"class": "flipHTML5Loading flipHTML5PhotoThumb"
			}).css({
				width: 50,
				height: 54,
				left: e
			}).appendTo(h),
			g = $("<img style='position: absolute;'/>").css({
				opacity: 0
			}).appendTo(f),
			s = $("<div style='position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;background-color: #000000;'></div>").attr({
				id: "flipHTML5PhotoThumbBG" + b,
				"class": "flipHTML5PhotoThumbBG"
			}).css({
				opacity: 0.5
			}).appendTo(f),
			r = new Image;
			r.onload = function() {
				r.onload = r.onerror = null;
				var b = this.width / this.height,
				c = 54 * b,
				d = 50 / b;
				50 < c ? g.css({
					width: 50,
					height: d,
					top: (54 - d) / 2,
					left: 0
				}) : 54 < d ? g.css({
					width: c,
					height: 54,
					left: (50 - c) / 2,
					top: 0
				}) : c / d == b && g.css({
					width: c,
					height: d,
					left: 0,
					top: 0
				});
				g.css({
					opacity: 1
				});
				f.removeClass("flipHTML5Loading")
			};
			r.onerror = function() {
				r.onload = r.onerror = null;
				g.css({
					left: 16,
					top: 17
				}).css({
					opacity: 1
				});
				f.removeClass("flipHTML5Loading")
			};
			g[0].src = d[l].thumbSrc;
			r.src = d[l].thumbSrc;
			f.on({
				"click touchend": function() {
					c.currentIndex !== b && c.skipTo(b)
				},
				"mouseover touchstart": function(d) {
					try {
						c.currentIndex !== b && (f.css({
							borderColor: "#1ECC21"
						}), s.css({
							opacity: 0
						}))
					} catch(e) {
						Log.error(e)
					}
				},
				"mousemove touchmove": function(b) {},
				"mouseout touchend": function() {
					k.hide();
					c.currentIndex !== b && (f.css({
						borderColor: "#ffffff"
					}), s.css({
						opacity: 0.5
					}))
				}
			})
		})(l)
	},
	thumbSkipTo: function(b) {
		this.thumbList && (this.thumbList.find(".flipHTML5PhotoThumbBG").css({
			opacity: 0.5
		}), this.thumbList.find(".flipHTML5PhotoThumb").css({
			borderColor: "#ffffff"
		}), this.thumbList.find("#flipHTML5PhotoThumbBG" + b).css({
			opacity: 0
		}), this.thumbList.find("#flipHTML5PhotoThumb" + b).css({
			borderColor: "#f00"
		}), this.moveThumb(b))
	},
	reviseThumb: function() {
		var b = this.thumb.width(),
		c = b / 2,
		d = this.thumbList.width();
		this.thumbView.css({
			width: c,
			left: b / 4
		});
		c >= d ? this.thumbList.css({
			left: (c - d) / 2
		}) : this.thumbList.css({
			left: 0
		})
	},
	mouseThumb: function() {
		var b = this,
		c = !1;
		this.thumbView.on({
			"mouseenter touchstart": function(d) {
				try {
					var e = b.thumbView.width(),
					f = b.thumbList.width(),
					g = f - e,
					h = b.thumbView.offset().left,
					k = (d.pageX || d.originalEvent.touches[0].pageX) - h - 24;
					f > e && (d = (0 >= k ? 0 : k > e - 24 ? e - 48 : k) / (e - 48) * g, b.thumbList.animate({
						left: -(0 > d ? 0 : d > g ? g: d)
					},
					{
						duration: 400,
						easing: "linear",
						complete: function() {
							c = !0
						}
					}))
				} catch(l) {
					Log.error(l)
				}
			},
			"mousemove touchmove": function(d) {
				if (c) try {
					var e = b.thumbView.width(),
					f = b.thumbList.width(),
					g = f - e,
					h = b.thumbView.offset().left,
					k = (d.pageX || d.originalEvent.touches[0].pageX) - h - 24;
					f > e && (d = (0 >= k ? 0 : k > e - 24 ? e - 48 : k) / (e - 48) * g, d = 0 > d ? 0 : d > g ? g: d, b.thumbList.stop(!0, !0).animate({
						left: -d
					},
					{
						duration: 400,
						easing: "linear"
					}))
				} catch(l) {
					Log.error(l)
				}
			},
			"mouseleave touchend": function(b) {
				c = !1
			}
		})
	},
	moveThumb: function(b) {
		var c = this.thumbView.width(),
		d = this.thumbList.outerWidth(),
		e = d - c,
		f = this.thumbList.position().left;
		b = this.thumbList.find("#flipHTML5PhotoThumb" + b).position().left;
		var g = b + f,
		h = (c - 54) / 2;
		d > c ? (g = Math.abs(b) - Math.abs(f), c = g - h + Math.abs(f), c = c >= e ? e: 0 >= c ? 0 : c, this.thumbList.stop(!0, !0).animate({
			left: -c
		},
		{
			duration: 240,
			easing: "linear"
		})) : this.thumbList.css({
			left: (c - d) / 2
		})
	},
	show: function() {
		this.photoFlag = !0;
		this.photoBG.show();
		this.reviseThumb();
		this.skipTo(0)
	},
	hide: function() {
		this.photoFlag = !1;
		this.photoBG.hide();
		this.photoGallery.addClass("flipHTML5Loading");
		this.outPhotoGallery.css({
			left: (this.photoBG.width() - 328) / 2,
			top: (this.photoBG.height() - 328) / 2,
			width: 320,
			height: 320
		})
	},
	showHide: function() {
		this.photoFlag ? this.hide() : this.show()
	}
}),
AddImageFile = Class({
	create: function(b) {
		this.container = b;
		this.addContexts = {};
		this.address = uiBaseURL;
		this.currentObject = $("<div><div/>").attr("data-key", "114");
		this.imageDatas = {};
		this.fileName = window.location.href.replace(window.location.hash, "") + "LocalFile";
		this.fileCookies = [];
		this.createZoomFrame();
		this.toolBar = this.createToolBar(b);
		this.getCookieFile()
	},
	createToolBar: function(b) {
		var c = this,
		d = $("<div class='flipHTML5LocalFile-toolBar' style='position: absolute;width: 60px;height: 32px;background-color: rgba(0, 0, 0, 0.8);border-radius: 4px;z-index: 9999;'></div>").appendTo(b).hide();
		b = $("<div class='flipHTML5LocalFile-toolBar-del'></div>").css({
			left: 4
		}).append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", this.address + "signature_del.png")).appendTo(d);
		var e = $("<div class='flipHTML5LocalFile-toolBar-update'></div>").css({
			left: 32
		}).append($("<img style='margin-left: 3px;margin-top: 3px;'/>").attr("src", this.address + "ImgFile_update.png")).appendTo(d);
		b.on("click touchend",
		function(b) {
			c.currentObject && (c.currentObject.remove(), d.hide(), c.zoomFrame && c.zoomFrame.hide(), b = c.currentObject.attr("data-key"), delete c.imageDatas[b], c.delArrayOrderKey(c.fileCookies, b), c.addLocalStorage(c.fileName, c.parseJSON(c.fileCookies)))
		});
		e.on(_event._down,
		function() {
			c.currentObject && c.currentObject.find(".TextFile") && c.currentObject.find(".TextFile")[0].click()
		});
		d.on("mousedown touchstart",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			return ! 1
		});
		this.container.add($(document)).add(BookInfo.container()).on("mousedown.hideToolBar touchstart.hideToolBar",
		function() {
			d.hide()
		});
		return d
	},
	createZoomFrame: function() {
		var b = $("<div class='flipHTML5ZoomFrame' style='position: absolute;'></div>"),
		c = [];
		this.zoomFrame = b;
		for (var d = 0; 9 > d; d++) {
			var e = $("<div></div>").addClass("flipHTML5Point flipHTML5ZoomPoint" + d).appendTo(b);
			c.push(e)
		}
		this.westZoom(c[7]);
		this.northZoom(c[1]);
		this.southZoom(c[5]);
		this.eastZoom(c[3]);
		this.westZoom(c[0]).northZoom(c[0]);
		this.northZoom(c[2]).eastZoom(c[2]);
		this.westZoom(c[6]).southZoom(c[6]);
		this.southZoom(c[4]).eastZoom(c[4]);
		this.container.add($(document)).add(BookInfo.container()).on("mousedown.hideToolBar touchstart.hideToolBar",
		function() {
			b.hide()
		})
	},
	getCookieFile: function() {
		try {
			var b = this.getLocalStorage(this.fileName),
			c = eval(b)
		} catch(d) {}
		if (c) for (b = 0; b < c.length; b++) {
			var e = c[b];
			this.fileCookies.push({
				key: e.key,
				page: e.page,
				fileLeft: e.fL,
				fileTop: e.fT,
				fileWidth: e.fW,
				fileHeight: e.fH,
				imgWidth: e.iW,
				imgHeight: e.iH,
				src: e.src
			});
			this.imageDatas[e.key] = {
				width: e.iW,
				height: e.iH
			}
		}
	},
	addFile: function(b, c) {
		var d = b.src,
		e = b.imgWidth,
		f = b.imgHeight,
		g = b.key,
		h = $("<div class='flipHTML5AddFile' style='position: absolute;cursor: move;'></div>").css({
			width: b.fileWidth,
			height: b.fileHeight,
			left: b.fileLeft,
			top: b.fileTop
		}).attr("data-key", g).append($("<input type='file' class='TextFile' style='position: absolute;left: 0px;top: 0px;width: 100%;height: 100%;cursor: move;z-index: 2;'/>").css({
			opacity: 0
		})).appendTo(c);
		this.bindFileDivEvents(h, c);
		e && f && d && this.addImage(h, d, e, f, g)
	},
	addCreateEvents: function() {
		var b = 0,
		c, d = this.contextArray;
		if (d) for (this.offCreateEvents(); c = d.eq(b++), 0 < c.length;) this.bindCreateFileEvent(c, parseInt(c.attr("data-page")))
	},
	offCreateEvents: function() {
		this.contextArray && (this.contextArray.css({
			cursor: ""
		}), this.contextArray.off("mousedown.addLocalFile touchstart.addLocalFile"))
	},
	bindCreateFileEvent: function(b, c) {
		var d = this;
		b.css("cursor", "crosshair");
		b.off("mousedown.addLocalFile touchstart.addLocalFile").one("mousedown.addLocalFile touchstart.addLocalFile",
		function(e) {
			e.stopPropagation();
			e.preventDefault();
			var f = (new Date).getTime(),
			g,
			h,
			k,
			l,
			m,
			p,
			n,
			q,
			s,
			r = b.offset().left,
			w = b.offset().top;
			$(".flipHTML5LocalFile-current").removeClass("flipHTML5LocalFile-current");
			g = $("<div style='position: absolute;cursor: move;'></div>").attr("data-key", f).addClass("flipHTML5AddFile flipHTML5LocalFile-current").append($("<input type='file' class='TextFile' style='position: absolute;left: 0px;top: 0px;width: 100%;height: 100%;cursor: move;z-index: 2;'/>").css({
				opacity: 0
			})).appendTo(b);
			h = l = e.pageX || e.originalEvent.touches[0].pageX;
			k = m = e.pageY || e.originalEvent.touches[0].pageY;
			d.bindFileDivEvents(g, b);
			$(document).add(b).off("mousemove.addLocalFile touchmove.addLocalFile").on("mousemove.addLocalFile touchmove.addLocalFile",
			function(b) {
				l = b.pageX ? b.pageX: b.originalEvent.touches ? b.originalEvent.touches[0].pageX: 0;
				m = b.pageY ? b.pageY: b.originalEvent.touches ? b.originalEvent.touches[0].pageY: 0;
				l && (0 > l - h ? (p = Math.floor((l - r) / BookInfo.scale()), q = Math.floor((h - l) / BookInfo.scale())) : (p = Math.floor((h - r) / BookInfo.scale()), q = Math.floor((l - h) / BookInfo.scale())));
				m && (0 > b.pageY - k ? (n = Math.floor((m - w) / BookInfo.scale()), s = Math.floor((k - m) / BookInfo.scale())) : (n = Math.floor((k - w) / BookInfo.scale()), s = Math.floor((m - k) / BookInfo.scale())));
				g.css({
					left: p,
					top: n,
					width: q,
					height: s
				});
				d.resizeZoomFrame(g)
			});
			$(document).add(b).off("mouseup.addLocalFile touchend.addLocalFile").one("mouseup.addLocalFile touchend.addLocalFile",
			function(e) {
				d.offCreateEvents();
				$(document).add(b).off("mousemove.addLocalFile touchmove.addLocalFile");
				$(document).add(b).off("mouseup.addLocalFile touchend.addLocalFile");
				if (g) {
					e = g.width();
					var h = g.height();
					32 > e && g.width(32);
					12 > h && g.height(12);
					g.find(".TextFile")[0].click();
					d.resizeZoomFrame(g);
					e = d.parseObject(g[0]);
					d.parseObject(d.zoomFrame[0]);
					d.fileCookies.push({
						key: f,
						page: c,
						fileLeft: e.left,
						fileTop: e.top,
						fileWidth: e.width,
						fileHeight: e.height,
						imgWidth: null,
						imgHeight: null,
						src: null
					});
					d.addLocalStorage(d.fileName, d.parseJSON(d.fileCookies))
				}
				void 0 != d.onCreated && d.onCreated[1].call(d.onCreated[0])
			})
		})
	},
	addImage: function(b, c, d, e, f) {
		b.find(".LocalImage") && b.find(".LocalImage").remove();
		var g = b.width() || 40,
		h = b.height() || 40;
		d = this.resizeImage("autoFit", d, e, g, h);
		$("<img class='LocalImage' style='position: absolute;z-index: 2;'/>").attr("data-key", f).css({
			width: d.width,
			height: d.height,
			left: d.left,
			top: d.top
		}).attr("src", c).appendTo(b)
	},
	resizeImage: function(b, c, d, e, f) {
		c /= d;
		d = 0 === f ? 1 : e / f;
		var g = f * c,
		h = e / c,
		k;
		switch (b) {
		case "autoFit":
			k = g > e ? {
				width: e,
				height: h,
				top: (f - h) / 2,
				left: 0
			}: h > f ? {
				width: g,
				height: f,
				left: (e - g) / 2,
				top: 0
			}: g / h == c ? {
				width: g,
				height: h,
				left: 0,
				top: 0
			}: {
				width: 1,
				height: 1,
				left: 0,
				top: 0
			};
			break;
		case "scale":
			k = {
				left: 0,
				top: 0,
				width: e,
				height: f
			};
			break;
		case "fullFill":
			c > d ? k = {
				left: (e - f * c) / 2,
				top: 0,
				width: f * c,
				height: f
			}: c < d ? k = {
				left: 0,
				top: (f - e / c) / 2,
				width: e,
				height: e / c
			}: c == d && (k = {
				left: 0,
				top: 0,
				width: e,
				height: f
			})
		}
		return k
	},
	bindFileDivEvents: function(b, c) {
		var d = this,
		e = !1,
		f = b.attr("data-key");
		b.off("mousedown.addLocalFile touchstart.addLocalFile").on("mousedown.addLocalFile touchstart.addLocalFile",
		function(g) {
			g.preventDefault();
			g.stopPropagation();
			g = g.originalEvent.touches ? g.originalEvent.touches[0] : g;
			var h, k, l, m, p, n;
			l = b[0].offsetLeft;
			m = b[0].offsetTop;
			h = g.pageX;
			k = g.pageY;
			d.resizeZoomFrame(b);
			c.off("mousemove.addLocalFile touchmove.addLocalFile").on("mousemove.addLocalFile touchmove.addLocalFile",
			function(c) {
				c = c.originalEvent.touches ? c.originalEvent.touches[0] : c;
				if (3 <= Math.abs(c.pageX - h) || 3 <= Math.abs(c.pageY - k)) e = !0;
				p = l - (h - c.pageX) / BookInfo.scale();
				n = m - (k - c.pageY) / BookInfo.scale();
				b.css({
					left: p,
					top: n
				});
				d.moveFileDiv(p, n)
			});
			$(document).add(c).off("mouseup.addLocalFile touchend.addLocalFile").one("mouseup.addLocalFile touchend.addLocalFile",
			function() {
				c.off("mousemove.addLocalFile touchmove.addLocalFile");
				$(document).add(c).off("mouseup.addLocalFile touchend.addLocalFile");
				setTimeout(function() {
					e = !1
				},
				200);
				var g = d.parseObject(b[0]);
				d.parseObject(d.zoomFrame[0]);
				d.updateArrayOrderKey(d.fileCookies, f, {
					fileLeft: g.left,
					fileTop: g.top
				});
				d.addLocalStorage(d.fileName, d.parseJSON(d.fileCookies))
			})
		});
		b.find(".TextFile").on({
			change: function(c) {
				try {
					var e = c.target.files[0];
					if (e) if (e.type.match("image.*")) {
						var k = new FileReader;
						k.onload = function(c) {
							c = c.target.result;
							var e = new Image;
							e.src = c;
							var g = e.width,
							e = e.height;
							d.imageDatas[f] = {
								width: g,
								height: e,
								src: c
							};
							d.addImage(b, c, g, e, f);
							d.updateArrayOrderKey(d.fileCookies, f, {
								imgWidth: g,
								imgHeight: e,
								src: c
							});
							d.addLocalStorage(d.fileName, d.parseJSON(d.fileCookies))
						};
						k.readAsDataURL(e)
					} else alert("not image!")
				} catch(l) {
					alert("Does not support HTML5 FileReader!")
				}
			},
			click: function(b) {
				e && b.preventDefault()
			}
		})
	},
	moveFileDiv: function(b, c) {
		var d = this.zoomFrame;
		d && (d.css({
			left: b - 4 - 1,
			top: c - 4 - 1
		}), this.toolBar && this.toolBar.css({
			left: d.offset().left - this.container.offset().left + 3,
			top: d.offset().top - this.container.offset().top - this.toolBar.outerHeight() - 2
		}))
	},
	resizeZoomFrame: function(b) {
		var c = this.zoomFrame;
		c.css({
			width: b.width() + 8,
			height: b.height() + 8,
			left: parseInt(b.css("left")) - 4 - 1,
			top: parseInt(b.css("top")) - 4 - 1
		}).show();
		this.toolBar && this.toolBar.css({
			left: b.offset().left - 8 - this.container.offset().left + 3,
			top: b.offset().top - 8 - this.container.offset().top - this.toolBar.outerHeight() - 2
		}).show();
		b.before(c);
		$(".flipHTML5LocalFile-current").removeClass("flipHTML5LocalFile-current");
		this.currentObject = b.addClass("flipHTML5LocalFile-current")
	},
	resizeFileDiv: function(b, c, d, e) {
		var f = this.currentObject,
		g = this.zoomFrame,
		h = f.attr("data-key");
		this.toolBar && this.toolBar && this.toolBar.css({
			left: g.offset().left - this.container.offset().left + 3,
			top: g.offset().top - this.container.offset().top - this.toolBar.outerHeight() - 2
		});
		if (f) {
			b && (g.css({
				left: b
			}), f.css({
				left: b + 4 + 1
			}));
			c && (g.css({
				top: c
			}), f.css({
				top: c + 4 + 1
			}));
			d && 40 <= d && (g.css({
				width: d
			}), f.css({
				width: d - 8
			}));
			e && 20 <= e && (g.css({
				height: e
			}), f.css({
				height: e - 8
			}));
			try {
				var k = f.find(".LocalImage"),
				l = this.imageDatas[h],
				m = this.resizeImage("autoFit", l.width, l.height, f.width(), f.height());
				k.css({
					width: m.width,
					height: m.height,
					left: m.left,
					top: m.top
				})
			} catch(p) {}
			m = this.parseObject(f[0]);
			this.parseObject(g[0]);
			this.updateArrayOrderKey(this.fileCookies, h, {
				fileLeft: m.left,
				fileTop: m.top,
				fileWidth: m.width,
				fileHeight: m.height
			})
		}
	},
	eastZoom: function(b) {
		var c = this,
		d = b.parent();
		b.on("mousedown.addLocalFile touchstart.addLocalFile",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
			var f = d.parent(),
			g = d.width(),
			h = b.pageX;
			$(document).add(f).on("mousemove.addLocalFile touchmove.addLocalFile",
			function(b) {
				b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
				var d = b.clientX - h + g,
				d = Math.floor(g - (h - b.pageX) / BookInfo.scale());
				c.resizeFileDiv(0, 0, d, 0)
			});
			$(document).add(f).on("mouseup.addLocalFile touchend.addLocalFile",
			function() {
				c.addLocalStorage(c.fileName, c.parseJSON(c.fileCookies));
				$(document).add(f).off("mousemove.addLocalFile touchmove.addLocalFile");
				$(document).add(f).off("mouseup.addLocalFile touchend.addLocalFile")
			})
		});
		return this
	},
	southZoom: function(b) {
		var c = this,
		d = b.parent();
		b.on("mousedown.addLocalFile touchstart.addLocalFile",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
			var f = d.parent(),
			g = d.height(),
			h = b.pageY;
			$(document).add(f).on("mousemove.addLocalFile touchmove.addLocalFile",
			function(b) {
				b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
				var d = b.clientY - h + g,
				d = Math.floor(g - (h - b.pageY) / BookInfo.scale());
				c.resizeFileDiv(0, 0, 0, d)
			});
			$(document).add(f).on("mouseup.addLocalFile touchend.addLocalFile",
			function() {
				c.addLocalStorage(c.fileName, c.parseJSON(c.fileCookies));
				$(document).add(f).off("mousemove.addLocalFile touchmove.addLocalFile");
				$(document).add(f).off("mouseup.addLocalFile touchend.addLocalFile")
			})
		});
		return this
	},
	westZoom: function(b) {
		var c = this,
		d = b.parent();
		b.on("mousedown.addLocalFile touchstart.addLocalFile",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
			var f = d.parent(),
			g = d.width(),
			h = d[0].offsetLeft,
			k = b.clientX;
			$(document).add(f).on("mousemove.addLocalFile touchmove.addLocalFile",
			function(b) {
				b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
				var d = b.pageX,
				e = h + d - k,
				f = -(d - k) + g,
				e = h + (d - k) / BookInfo.scale(),
				f = Math.floor(g + (k - b.pageX) / BookInfo.scale());
				c.resizeFileDiv(e, 0, f, 0)
			});
			$(document).add(f).on("mouseup.addLocalFile touchend.addLocalFile",
			function() {
				c.addLocalStorage(c.fileName, c.parseJSON(c.fileCookies));
				$(document).add(f).off("mousemove.addLocalFile touchmove.addLocalFile");
				$(document).add(f).off("mouseup.addLocalFile touchend.addLocalFile")
			})
		});
		return this
	},
	northZoom: function(b) {
		var c = this,
		d = b.parent();
		b.on("mousedown.addLocalFile touchstart.addLocalFile",
		function(b) {
			b.preventDefault();
			b.stopPropagation();
			b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
			var f = d.parent(),
			g = d.height(),
			h = d[0].offsetTop,
			k = b.pageY;
			$(document).add(f).on("mousemove.addLocalFile touchmove.addLocalFile",
			function(b) {
				b = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
				b = b.pageY;
				var d = h + b - k,
				e = -(b - k) + g,
				d = h + (b - k) / BookInfo.scale(),
				e = Math.floor(g + (k - b) / BookInfo.scale());
				c.resizeFileDiv(0, d, 0, e)
			});
			$(document).add(f).on("mouseup.addLocalFile touchend.addLocalFile",
			function() {
				c.addLocalStorage(c.fileName, c.parseJSON(c.fileCookies));
				$(document).add(f).off("mousemove.addLocalFile touchmove.addLocalFile");
				$(document).add(f).off("mouseup.addLocalFile touchend.addLocalFile")
			})
		});
		return this
	},
	bindOnCreated: function(b, c) {
		this.onCreated = [b, c]
	},
	parseObject: function(b) {
		if (document.getElementsByTagName("body")[0].contains(b)) {
			var c, d, e;
			e = b.parentNode;
			var f = b.style,
			g = $(b);
			d = 100 / e.offsetHeight;
			c = 100 / e.offsetWidth;
			e = b.offsetLeft * c + "%";
			b = b.offsetTop * d + "%";
			c = g.width() * c + "%";
			d = g.height() * d + "%";
			f.width = c;
			f.height = d;
			f.left = e;
			f.top = b;
			return {
				width: c,
				height: d,
				left: e,
				top: b
			}
		}
	},
	addLocalFileByPage: function(b, c) {
		c.find(".flipHTML5AddFile").remove();
		this.toolBar && this.toolBar.hide();
		this.zoomFrame && this.zoomFrame.hide();
		c.attr("data-page", b);
		this.contextArray = this.contextArray ? this.contextArray.add(c) : c;
		this.zoomFrame && this.zoomFrame.remove();
		this.createZoomFrame();
		for (var d = 0; d < this.fileCookies.length; d++) this.fileCookies[d].page == b && this.addFile(this.fileCookies[d], c)
	},
	setContainers: function(b, c, d) {
		void 0 == this.addContexts[b] && (this.addContexts[b] = {});
		this.addContexts[b][c] = d;
		b == BookInfo.getBookType() && this.addLocalFileByPage(c, this.addContexts[BookInfo.getBookType()][c])
	},
	getLocalStorage: function(b) {
		try {
			if (window.localStorage) return window.localStorage.getItem(b);
			for (var c = document.cookie.split("; "), d = 0; d < c.length; d++) {
				var e = c[d].split("=");
				if (e[0] == b) return unescape(e[1])
			}
			return ""
		} catch(f) {}
	},
	addLocalStorage: function(b, c) {
		try {
			if (window.localStorage) window.localStorage.setItem(b, c);
			else {
				var d = b + "=" + escape(c),
				e = new Date;
				e.setTime(e.getTime() + 864E8);
				d += "; expires=" + e.toGMTString();
				document.cookie = d
			}
		} catch(f) {}
	},
	delArrayOrderKey: function(b, c) {
		if (b) for (var d = 0; d < b.length; d++) b[d].key && b[d].key == c && b.remove(d)
	},
	updateArrayOrderKey: function(b, c, d) {
		if (b) for (var e = 0; e < b.length; e++) b[e].key && b[e].key == c && $.extend(b[e], d)
	},
	parseJSON: function(b) {
		if (0 != b.length) {
			for (var c = "[",
			d = 0; d < b.length; d++) c += "{key:'" + b[d].key + "',page:" + b[d].page + ",src:'" + b[d].src + "',iW:" + b[d].imgWidth + ",iH:" + b[d].imgHeight + ",fW:'" + b[d].fileWidth + "',fH:'" + b[d].fileHeight + "',fL:'" + b[d].fileLeft + "',fT:'" + b[d].fileTop + "'},";
			c = c.substring(0, c.length - 1);
			return c + "]"
		}
	}
});
var PageItem = {};
PageItem.Item = Class({
	create: function(b, c, d, e) {
		this.config = b;
		this.parent = c;
		this.pageWidth = d;
		this.pageHeight = e;
		this.type = this.config.annotype
	},
	onActionEvent: function(b) {
		this.config.action.actionType == PageEditor.ActionType.GOTO_PAGE ? (gotoPageFun(this.config.action.pageIndex), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.OPEN_URL ? (void 0 == this.config.action.linkTarget && (this.config.action.linkTarget = "_blank"), 3 == browserType ? window.location = this.linkURL: window.open(this.linkURL, this.config.action.linkTarget), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.OPEN_WINDOW ? (this.form = new initVideoForm(tmpContainer, {
			width: this.config.action.windowWidth,
			height: this.config.action.windowHeight,
			src: this.config.action.resourceContent,
			caption: this.config.action.caption
		},
		bookContainer.width(), bookContainer.height()), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.SLIDE_SHOW ? (this.slide = new initSlideShow(tmpContainer, this.config.action.photos.photo, bookContainer.width(), bookContainer.height()), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.PLAY_AUDIO ? (this.audios = new initAudioEditor(tmpContainer, this.config.action.audioURL, this.config.action.autoPlay), this.audios.showshow(), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.ACTION_JS ? (null != this.config.action.scriptFun && eval(this.config.action.scriptFun), $(b).addClass("slider-action")) : this.config.action.actionType == PageEditor.ActionType.OPEN_IMG && (this.zoomImg = new HTML5ZoomImg(this.config.src, $("#tmpContainer")), $(b).addClass("slider-action"))
	}
});
var initYoutube = Class({
	create: function(b, c, d, e, f) {
		this.father = b;
		this.config = $.extend({
			width: 400,
			height: 300,
			x: 0.02,
			y: 0.02,
			alpha: 1,
			id: null
		},
		c);
		this.youtubeFrame = null;
		null != this.config.id && (this.pw = d, this.ph = e, this.width = this.config.width * this.pw, this.height = this.config.height * this.ph, this.x = this.config.x * this.pw, this.y = this.config.y * this.ph, this.youtubeFrame = $("<iframe class='youtube-player' type='text/html' width='" + this.width + "' height='" + this.height + "' src='http://www.youtube.com/embed/" + this.config.id + "?" + this.config.playerParameters + "' frameborder='0' allowfullscreen='1' style='position: absolute; opacity: " + this.config.alpha + "; left:" + this.x + "px; top:" + this.y + "px;'></iframe>"), b.append(this.youtubeFrame))
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.youtubeFrame.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.setPosition()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.youtubeFrame.css({
			top: this.y + "px",
			left: this.x + "px"
		})
	},
	getPlayEvt: function() {
		return this.config.moviePlayTriggerEvt
	},
	getStopEvt: function() {
		return this.config.movieStopTriggerEvt
	},
	hide: function() {
		this.youtubeFrame.css({
			width: "0px",
			height: "0px"
		});
		this.youtubeFrame.css({
			display: "none"
		})
	},
	show: function() {
		this.youtubeFrame.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.youtubeFrame.css({
			display: "block"
		})
	}
}),
initVideo = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 0.6,
			height: 0.5,
			x: 0.2,
			y: 0.2,
			src: null,
			previewSrc: null,
			alpha: 1
		},
		c);
		this.pw = d;
		this.ph = e;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.father = b;
		this.content = $("<div></div>");
		this.content.css({
			position: "absolute",
			left: this.x + "px",
			top: this.y + "px",
			width: this.width + "px",
			height: this.height + "px",
			"background-color": "black"
		});
		this.father.append(this.content);
		"string" == typeof this.config.previewSrc && null != this.config.previewSrc && void 0 != this.config.previewSrc && (!0 == isFlipPdf && (this.config.previewSrc = "." + this.config.previewSrc), this.content.css({
			background: "url(" + this.config.previewSrc + ")"
		}), this.content.css({
			"background-size": this.width + "px " + this.height + "px"
		}));
		if ("string" == typeof this.config.src) {
			if (null == this.config.src || ".mp4" != this.config.src.substr(this.config.src.length - 4, 4)) return
		} else if (this.config.src == {}) return; ! 0 == isFlipPdf && (this.config.src = "../" + this.config.src);
		this.video = null;
		this.video = $("<video src='" + this.config.src + "' controls preload='none'></video>");
		this.video.css({
			position: "absolute",
			"z-index": 1,
			left: "0px",
			top: "0px",
			width: "100%",
			height: "100%",
			opacity: this.config.alpha
		});
		this.content.append(this.video);
		void 0 != this.video[0].play && (this.content.addVideoSkin(f), this.video.removeAttr("controls"))
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.content.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.content.css({
			"background-size": this.width + "px " + this.height + "px"
		});
		this.content.resizeVideoSkin();
		this.setPosition()
	},
	setPosition: function() {
		this.x = this.pw * this.config.x;
		this.y = this.ph * this.config.y;
		this.content.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	},
	playVideo: function() {
		if (null != this.video) try {
			this.video[0].play()
		} catch(b) {}
	},
	stopVideo: function() {
		if (null != this.video) try {
			this.video[0].stop()
		} catch(b) {}
	},
	pauseVideo: function() {
		if (null != this.video) try {
			this.video[0].pause()
		} catch(b) {}
	},
	getPlayEvt: function() {
		return this.config.moviePlayTriggerEvt
	},
	getStopEvt: function() {
		return this.config.movieStopTriggerEvt
	}
}),
initVimeo = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 400,
			height: 300,
			x: 0.02,
			y: 0.02,
			alpha: 1,
			id: null
		},
		c);
		this.vimeoFrame = null;
		null != this.config.id && (this.pw = d, this.ph = e, this.width = this.config.width * this.pw, this.height = this.config.height * this.ph, this.x = this.config.x * this.pw, this.y = this.config.y * this.ph, c = this.config.id.lastIndexOf("/"), c = this.config.id.substring(c + 1), this.vimeoFrame = $("<iframe width='" + this.width + "' height='" + this.height + "' src='http://player.vimeo.com/video/" + c + "' frameborder='0' style='position: absolute; opacity: " + this.config.alpha + "; left:" + this.x + "px; top:" + this.y + "px;' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>"), b.append(this.vimeoFrame))
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.vimeoFrame.css({
			width: this.pw * this.config.width + "px",
			height: this.ph * this.config.height + "px"
		});
		this.setPosition(this.config.x * this.pw, this.config.y * this.ph)
	},
	setPosition: function(b, c) {
		this.vimeoFrame.css({
			top: c + "px",
			left: b + "px"
		})
	},
	getPlayEvt: function() {
		return this.config.moviePlayTriggerEvt
	},
	getStopEvt: function() {
		return this.config.movieStopTriggerEvt
	},
	hide: function() {
		this.vimeoFrame.css({
			display: "none"
		})
	},
	show: function() {
		this.vimeoFrame.css({
			display: "block"
		})
	}
}),
initPopUpVimeo = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 400,
			height: 300,
			x: 0.02,
			y: 0.02,
			alpha: 1,
			id: null
		},
		c);
		this.vimeoFrame = null;
		null != this.config.id && (this.pw = d, this.ph = e, this.width = this.config.width * this.pw, this.height = this.config.height * this.ph, this.x = this.config.x * this.pw, this.y = this.config.y * this.ph, "./" == this.config.url.substr(0, 2) && (this.config.url = "." + this.config.url), this.url = this.config.url, this.vimeoImage = $("<img src='" + this.url + "' style='position: absolute;cursor:pointer;opacity:" + this.config.alpha + "; left:" + this.x + "px; top:" + this.y + "px; width:" + this.width + "px;height:" + this.height + "px;'/>"), b.append(this.vimeoImage), this.popupVideo = new PopUpVideo(this.config, f), this.vimeoImage.bind(_event._down,
		function() {
			return ! 1
		}.bind(this)), this.vimeoImage.bind(_event._end,
		function() {
			this.popupVideo.showOrHide();
			return ! 1
		}.bind(this)))
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.vimeoImage.css({
			width: this.pw * this.config.width + "px",
			height: this.ph * this.config.height + "px"
		});
		this.setPosition(this.config.x * this.pw, this.config.y * this.ph);
		this.popupVideo.onResize()
	},
	setPosition: function(b, c) {
		this.vimeoImage.css({
			top: c + "px",
			left: b + "px"
		})
	}
}),
PopUpVideo = Class({
	create: function(b, c) {
		this.config = $.extend({
			id: null,
			alpha: 1
		},
		b);
		this.vimeoWidth = Math.min(480, windowWidth);
		this.vimeoHeight = 9 * this.vimeoWidth / 16;
		this.vimeoHeight = Math.min(this.vimeoHeight, windowHeight);
		this.vimeoLeft = (windowWidth - this.vimeoWidth) / 2;
		this.vimeoTop = (windowHeight - this.vimeoHeight) / 2;
		this.initVideo(c);
		this.background = $("<div id='popup' style='width:100%;height:100%;z-index:1000;position:absolute;'></div>");
		this.vimeoBac = $("<div style='width:100%;height:100%;background:#000000;opacity:0.5;'></div>");
		tmpContainer.append(this.background);
		this.background.append(this.vimeoBac);
		this.background.append(this.vimeoFrame);
		this.visible = !1;
		this.hide();
		this.closeButton = $("<img style='position:absolute;cursor:pointer;right:30px;top:30px;' src='" + uiBaseURL + "close.png'/>");
		this.closeButton.asImageButton();
		this.background.append(this.closeButton);
		this.background.bind(_event._down,
		function() {
			this.hide();
			return ! 1
		}.bind(this));
		this.background.bind(_event._end,
		function() {
			return ! 1
		}.bind(this));
		this.closeButton.bind(_event._end,
		function() {
			this.hide();
			return ! 1
		}.bind(this))
	},
	initVideo: function(b) {
		"vimeo" == b ? (b = this.config.id.lastIndexOf("/"), b = this.config.id.substring(b + 1), this.vimeoFrame = $("<iframe width='" + this.vimeoWidth + "' height='" + this.vimeoHeight + "' src='http://player.vimeo.com/video/" + b + "' frameborder='0' style='position: absolute;background:#000000; opacity: " + this.config.alpha + "; left:" + this.vimeoLeft + "px; top:" + this.vimeoTop + "px;' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>")) : "youtube" == b && (this.vimeoFrame = $("<iframe class='youtube-player' type='text/html' width='" + this.vimeoWidth + "' height='" + this.vimeoHeight + "' src='http://www.youtube.com/embed/" + this.config.id + "?" + this.config.playerParameters + "' frameborder='0' allowfullscreen='1' style='position: absolute; opacity: " + this.config.alpha + "; left:" + this.vimeoLeft + "px; top:" + this.vimeoTop + "px;'></iframe>"))
	},
	showOrHide: function() { ! 1 === this.visible ? this.show() : this.hide()
	},
	hide: function() {
		this.visible = !1;
		this.background.css({
			display: "none"
		})
	},
	show: function() {
		this.visible = !0;
		this.background.css({
			display: "block"
		})
	},
	onResize: function(b, c) {
		this.vimeoWidth = Math.min(480, windowWidth);
		this.vimeoHeight = 9 * this.vimeoWidth / 16;
		this.vimeoHeight = Math.min(this.vimeoHeight, windowHeight);
		this.vimeoLeft = (windowWidth - this.vimeoWidth) / 2;
		this.vimeoTop = (windowHeight - this.vimeoHeight) / 2;
		this.vimeoFrame.css({
			width: this.vimeoWidth + "px",
			height: this.vimeoHeight + "px",
			top: this.vimeoTop + "px",
			left: this.vimeoLeft + "px"
		})
	},
	getPlayEvt: function() {
		return this.config.moviePlayTriggerEvt
	},
	getStopEvt: function() {
		return this.config.movieStopTriggerEvt
	}
});
global.hddr.soo4 = function(b) {
	return b || ".com"
};
var initAudio = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 80,
			height: 30,
			x: 20,
			y: 20,
			src: null,
			alpha: 1
		},
		c);
		this.audio = null;
		if (null != this.config.src) {
			this.originWidth = bookConfig.largePageWidth;
			this.pw = d;
			this.ph = e;
			this.width = this.config.width * this.pw;
			this.height = this.config.height * this.ph;
			this.x = this.config.x * this.pw;
			this.y = this.config.y * this.ph;
			this.father = b;
			b = c.key;
			this.themeName = f;
			this.resizeThemes = {
					"default": "",
					wave: ""
				};
			this.content = $("<div></div>");
			this.content.css({
				position: "absolute",
				left: this.x + "px",
				top: this.y + "px",
				opacity: this.config.alpha
			});
			this.father.append(this.content);
			this.audio = $("<audio controls ></audio>");
			this.audio.css({
				position: "absolute",
				width: this.width + "px",
				height: this.height + "px",
				left: "0px",
				top: "0px",
				opacity: this.config.alpha
			});
			this.content.audioResources = [];
			if (void 0 == b)"./" == this.config.src.substr(0, 2) && (this.config.src = "." + this.config.src),
			this.audio.attr("src", this.config.src),
			this.content.audioResources.push(this.config.src);
			else if (b in this.config.src) g = this.config.src[b],
			"./" == g.substr(0, 2) && (g = "." + g),
			this.content.audioResources.push(g),
			this.audio.attr("src", g);
			else for (c = 0; c < this.config.src.length; c++) {
				var g = this.config.src[c][b];
				"./" == g.substr(0, 2) && (g = "." + g);
				this.content.audioResources.push(g);
				var h = $("<source src='" + g + "'>");
				this.audio.append(h);
				0 == c && this.audio.attr("src", g)
			}
			this.content.append(this.audio);
			void 0 != this.audio[0].play && (this.content.addAudioSkin(f), this.audio.removeAttr("controls"));
			this.themeName in this.resizeThemes || void 0 == this.themeName ? this.content.css({
				width: this.width + "px",
				height: this.height + "px"
			}) : this.resizeAudio(d, e)
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		if(!this.themeName)return;
		this.themeName in this.resizeThemes || void 0 == this.themeName ? (this.content.css({
			width: this.width + "px",
			height: this.height + "px"
		}), this.content.resizeAudioSkin()) : this.resizeAudio(b, c);
		this.setPosition()
	},
	resizeAudio: function(b, c) {
		var d = b / this.originWidth;
		this.content.css({
			"-webkit-transform-origin": "0% 0%",
			"-moz-transform-origin": "0% 0%",
			"-ms-transform-origin": "0% 0%",
			"-o-transform-origin": "0% 0%",
			"transform-origin": "0% 0%",
			"-webkit-transform": "scale(" + d + ")",
			"-moz-transform": "scale(" + d + ")",
			"-ms-transform": "scale(" + d + ")",
			"-o-transform": "scale(" + d + ")",
			transform: "scale(" + d + ")"
		});
		this.content.refreshAudioSeek()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.content.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	},
	play: function() {
		if (null != this.audio) try {
			this.audio[0].play()
		} catch(b) {}
	},
	pause: function() {
		if (null != this.audio) try {
			this.audio[0].pause()
		} catch(b) {}
	},
	stop: function() {
		null != this.audio && this.audio[0].stop()
	},
	getPlayEvt: function() {
		return this.config.soundPlayTriggerEvt
	},
	getStopEvt: function() {
		return this.config.soundStopTriggerEvt
	}
}),
initAudioEditor = Class({
	create: function(b, c, d) {
		this.background = $("<div class='printBar'></div>");
		this.contentBox = $("<div class='printBG'></div>");
		this.closeButton = $("<div></div>");
		this.showing = !1;
		this.width = windowWidth;
		this.height = windowHeight;
		"./" == c.substr(0, 2) && (c = "." + c);
		this.audioSrc = c;
		this.contentWidth = 350;
		this.contentHeight = 63;
		this.themeName = "enjoy";
		this.background.css({
			height: this.height + "px",
			bottom: "0px"
		});
		this.contentBox.css({
			height: this.contentHeight + "px",
			width: this.contentWidth + "px",
			left: (this.width - this.contentWidth) / 2 + "px"
		});
		this.contentBox.css({
			top: (this.height - this.contentHeight) / 2 + "px",
			"border-radius": "0px"
		});
		this.audio = $("<audio controls ></audio>");
		this.audio.css({
			position: "absolute",
			width: this.contentWidth + "px",
			height: this.contentHeight + "px",
			left: "0px",
			top: "0px"
		});
		this.contentBox.audioResources = [];
		this.audio.attr("src", this.audioSrc);
		this.contentBox.audioResources.push(this.audioSrc);
		this.contentBox.append(this.audio);
		void 0 != this.audio[0].play && (this.contentBox.addAudioSkin(this.themeName), this.audio.removeAttr("controls"), d && (this.audio[0].autoPlay = !0));
		$(b).append(this.background);
		$(b).append(this.contentBox);
		$(b).append(this.closeButton);
		this.closeButton.css({
			top: "30px",
			right: "30px",
			position: "absolute",
			"z-index": "103"
		});
		this.closeButton.append($("<img src='" + uiBaseURL + "close.png'/>").asImageButton());
		this.initEvent();
		$(this.background).css("display", "none");
		$(this.contentBox).css("display", "none");
		$(this.closeButton).css("display", "none");
		void 0 != leftRightButton && null != leftRightButton && leftRightButton.setShow(!1)
	},
	onResize: function(b, c) {
		this.contentWidth = 360;
		this.contentHeight = 70;
		this.background.css({
			height: windowHeight + "px",
			bottom: "0px"
		});
		this.contentBox.css({
			height: this.contentHeight + "px",
			width: this.contentWidth + "px",
			left: (windowWidth - this.contentWidth) / 2 + "px"
		});
		this.contentBox.css({
			top: (windowHeight - this.contentHeight) / 2 + "px"
		});
		this.closeButton.css({
			top: "30px",
			right: "30px"
		});
		void 0 != this.themeName && (this.contentBox.css({
			width: this.contentWidth + "px",
			height: this.contentHeight + "px"
		}), this.contentBox.resizeAudioSkin())
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px")
	},
	getShowStatu: function() {
		return this.showing
	},
	setShowStatu: function(b) {
		this.showing = b
	},
	showshow: function() {
		$(this.background).css({
			display: "block"
		});
		$(this.contentBox).fadeIn(500);
		$(this.closeButton).fadeIn(500);
		this.showing = !0
	},
	hideBox: function() {
		var b = this;
		$(this.background).fadeOut(500,
		function() {
			b.contentBox.remove();
			b.closeButton.remove()
		});
		hideLeftRightButton() && leftRightButton.setShow(!0);
		this.showing = !1
	},
	initEvent: function() {
		var b = this;
		this.background.bind(_event._down,
		function(c) {
			b.hideBox();
			b.showing = !1
		});
		this.closeButton.bind(_event._end,
		function(c) {
			b.hideBox();
			b.showing = !1
		});
		this.closeButton.bind("mouseover",
		function(c) {
			b.closeButton.css({
				cursor: "pointer"
			})
		})
	},
	play: function() {
		if (null != this.audio) try {
			this.audio[0].play()
		} catch(b) {}
	},
	pause: function() {
		if (null != this.audio) try {
			this.audio[0].pause()
		} catch(b) {}
	},
	stop: function() {
		null != this.audio && this.audio[0].stop()
	},
	getPlayEvt: function() {
		return this.config.soundPlayTriggerEvt
	},
	getStopEvt: function() {
		return this.config.soundStopTriggerEvt
	}
}),
initImage = Class({
	create: function(b, c, d, e) {
		this.config = $.extend({
			width: 0.2,
			height: 0.2,
			x: 0.2,
			y: 0.2,
			alpha: 1,
			src: null
		},
		c);
		this.container = $("<div style='position: absolute;'></div>");
		this.img = $("<img style='position: absolute;width: 100%;height: 100%;'/>");
		this.imgBorder = $("<div class = 'bubble expose-square-solid' style='position: absolute;width: 100%;height: 100%;'></div>");
		null != this.config.src && (void 0 == this.config.action && (this.config = $.extend({
			action: {
				actionType: PageEditor.ActionType.OPEN_IMG
			}
		},
		this.config)), this.pw = d, this.ph = e, this.width = this.config.width * d, this.height = this.config.height * e, !0 == isFlipPdf && (this.config.src = "." + this.config.src), this.container.css({
			width: this.width,
			height: this.height,
			left: this.pw * this.config.x,
			top: this.ph * this.config.y,
			opacity: this.config.alpha,
			zIndex: 102
		}), this.img.attr("src", this.config.src).css({
			width: this.width,
			height: this.height
		}), this.imgBorder.css({
			width: "100%",
			height: "100%"
		}), b.append(this.container), this.container.append(this.img), this.container.append(this.imgBorder), this.imgBorder.css({
			display: "none"
		}), this.father = b, this.initEvt())
	},
	initEvt: function() {
		this.audios = this.slide = this.form = null;
		var b = this;
		b.zoomImg = null;
		if (!/\.(gif)$/.test(b.config.src)) this.container.hammer().on(_event._end,
		function(c) {
			actionEvent.bind(b)($(this))
		});
		this.config.mouseOver == PageEditor.MouseOverType.AddBorder ? (this.img.bind(_event._enter,
		function(c) {
			b.imgBorder.css({
				display: "block"
			});
			b.img.animate({
				opacity: "0.8"
			},
			300)
		}), this.img.bind(_event._down,
		function(c) {
			b.imgBorder.css({
				display: "block"
			});
			b.img.animate({
				opacity: "0.8"
			},
			300)
		}), this.imgBorder.bind(_event._end,
		function(c) {
			b.imgBorder.css({
				display: "none"
			});
			b.img.animate({
				opacity: "1"
			},
			300)
		}), this.imgBorder.bind(_event._leave,
		function(c) {
			b.imgBorder.css({
				display: "none"
			});
			b.img.animate({
				opacity: "1"
			},
			300)
		})) : this.config.mouseOver == PageEditor.MouseOverType.Zoom && this.img.mouseEnterZoom();
		if (void 0 != this.config.action) {
			this.flag = 0;
			this.linkURL = null;
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			b.img.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			b.img.bind(_event._enter,
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			b.img.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			});
			b.imgBorder.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			b.imgBorder.bind(_event._enter,
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			b.imgBorder.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = b * this.config.width;
		this.height = c * this.config.height;
		this.container.width(this.width).height(this.height).css({
			left: this.config.x * b,
			top: this.config.y * c
		});
		this.img.width(this.width).height(this.height);
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height())
	}
}),
HTML5ZoomImg = Class({
	create: function(b, c) {
		var d = this,
		e, f;
		this.$container = $(c);
		e = this.$container.width();
		f = this.$container.height();
		this.limitWidth = e;
		this.limitHeight = f;
		this.innerLimitWidth = 606;
		this.innerLimitHeight = 404;
		this.dragDivFalg = !0;
		this.dragImgFalg = !1;
		this.address = uiBaseURL;
		this.isFullFalg = !1;
		this.isOneToOneFalg = !0;
		this.scale = 100;
		this.isMapShowFalg = !1;
		this.boxImgBG = $("<div style='position: absolute;margin: 0px;padding: 0px;border: 0px;left: 0px;top: 0px;background-color: #000000;opacity: 0;z-index: 99999;'></div>").css({
			width: e,
			height: f
		}).appendTo(this.$container);
		this.outerBoxImg = $("<div class='fliphtml5-loading' style='position: absolute;margin: 0px;padding: 0px;border: 0px;left: 0px;top: 0px;overflow: hidden;z-index: 99999;'></div>").css({
			width: e,
			height: f
		}).appendTo(this.$container);
		this.innerBoxImg = $("<div style='position: absolute;overflow: hidden;cursor: pointer;background-color: rgba(0,0,0, 0.6);'></div>").css({
			boxShadow: "0px 0px 4px #000000"
		}).hide().appendTo(this.outerBoxImg);
		window.box = this.innerBoxImg;
		this.boxImgDiv = $("<div class='fliphtml5-boxDiv' style='position: absolute;'></div>").appendTo(this.innerBoxImg);
		this.boxImg = $("<img style='position: absolute;width: 100%;height: 100%;padding: 0px;margin: 0px;'/>").appendTo(this.boxImgDiv);
		this.closeBox = $("<div style='position: absolute;left: auto;top: 0px;right: 0px;'></div>").append($("<img>", {
			src: this.address + "closeForm.png"
		})).appendTo(this.innerBoxImg);
		this.bindCloseBoxEvent();
		this.createControlBar(this.innerBoxImg);
		this.createImgMap(this.innerBoxImg);
		this.loadImg(b);
		this.dragDiv();
		this.dragImage();
		isTouch || (this.innerBoxImg.transition3D(), this.boxImgDiv.transition3D(), this.mapPoint.transition3D());
		$(window).on("resize",
		function() {
			d.resize()
		});
		return this
	},
	bindCloseBoxEvent: function() {
		var b = this;
		b.closeBox.bind("mouseover",
		function() {
			b.closeBox.children("img").attr("src", b.address + "closeForm_down.png")
		});
		b.closeBox.bind("mouseout",
		function() {
			b.closeBox.children("img").attr("src", b.address + "closeForm.png")
		});
		b.closeBox.bind("click",
		function() {
			b.destroy()
		})
	},
	createControlBar: function(b) {
		this.controlBar = $("<div class='control' style='position: absolute;width: 106px;height: 48px;overflow: hidden;bottom: -50px;top: auto;left: 50%;margin-left: -53px;border-top-left-radius: 10px;border-top-right-radius: 10px;background-color: rgba(0,0,0,0.6)'></div>").css({
			boxShadow: "0px 0px 4px #000000"
		}).appendTo(b);
		this.oneToOne = $("<span class='one-to-one' style='position: absolute;'></span>").css({
			width: 40,
			height: 30,
			left: 10,
			top: 9,
			fontFamily: "serif",
			fontSize: 28,
			lineHeight: "30px",
			color: "#7F8383",
			letterSpacing: "-5px",
			textAlign: "center"
		}).html("1:1").appendTo(this.controlBar);
		this.fullScreen = $("<div class='FullScreen' style='position: absolute'></div>").css({
			width: 40,
			height: 30,
			left: 56,
			top: 9
		}).append($("<img>", {
			src: this.address + "enterFull.png",
			css: {
				marginLeft: 6,
				marginTop: 1
			}
		})).appendTo(this.controlBar);
		this.bindControlEvents()
	},
	bindControlEvents: function() {
		var b = this;
		isTouch ? b.controlBar.css({
			bottom: 2
		}).show() : (this.innerBoxImg.bind("mouseover",
		function() {
			b.controlBar.stop(!1, !1).animate({
				bottom: 2
			},
			400, "linear")
		}), this.innerBoxImg.bind("mouseout",
		function() {
			b.controlBar.stop(!1, !1).animate({
				bottom: -50
			},
			400, "linear")
		}));
		this.oneToOne.bind("click",
		function() {
			b.boxImgDiv.css({
				width: b.originalSize.width,
				height: b.originalSize.height,
				left: (b.innerBoxImg.width() - b.originalSize.width) / 2,
				top: (b.innerBoxImg.height() - b.originalSize.height) / 2
			});
			b.innerBoxImg.width() >= b.boxImgDiv.width() && b.innerBoxImg.height() >= b.boxImgDiv.height() ? b.dragImgFalg = !1 : b.dragImgFalg = !0;
			b.isFullFalg ? b.dragDivFalg = !1 : b.innerBoxImg.width() >= b.boxImgDiv.width() && b.innerBoxImg.height() >= b.boxImgDiv.height() ? b.dragDivFalg = !0 : b.dragDivFalg = !1;
			b.scale = 100;
			b.isOneToOneFalg = b.isOneToOne();
			b.isMapShowFalg = b.isShowMap();
			b.setMapPoint()
		});
		this.oneToOne.bind("mouseover",
		function() {
			b.isOneToOneFalg || b.oneToOne.css({
				color: "#32B9EB"
			})
		});
		this.oneToOne.bind("mouseout",
		function() {
			b.isOneToOneFalg || b.oneToOne.css({
				color: "#ffffff"
			})
		});
		this.fullScreen.bind("click",
		function() {
			var c = parseInt(b.boxImgDiv.css("left")),
			d = parseInt(b.boxImgDiv.css("top")),
			e = b.boxImgDiv.width(),
			f = b.boxImgDiv.height(),
			g = b.innerBoxImg.width(),
			h = b.innerBoxImg.height();
			b.isFullFalg ? (b.innerBoxImg.css({
				width: Math.max(b.innerLimitWidth, b.result.width),
				height: Math.max(b.innerLimitHeight, b.result.height),
				left: Math.max(0, (b.outerBoxImg.width() - Math.max(b.innerLimitWidth, b.result.width)) / 2),
				top: Math.max(0, (b.outerBoxImg.height() - Math.max(b.innerLimitHeight, b.result.height)) / 2)
			}), b.boxImgDiv.css({
				left: b.innerBoxImg.width() >= e ? (b.innerBoxImg.width() - e) / 2 : Math.max(b.innerBoxImg.width() - e, c + (b.innerBoxImg.width() - g) / 2),
				top: b.innerBoxImg.height() >= f ? (b.innerBoxImg.height() - f) / 2 : Math.max(b.innerBoxImg.height() - f, d + (b.innerBoxImg.height() - h) / 2)
			}), b.innerBoxImg.width() >= b.boxImgDiv.width() && b.innerBoxImg.height() >= b.boxImgDiv.height() ? b.dragDivFalg = !0 : b.dragDivFalg = !1, b.isFullFalg = !1, b.fullScreen.children("img").attr("src", b.address + "enterFull.png")) : (b.innerBoxImg.css({
				width: b.$container.width(),
				height: b.$container.height(),
				left: 0,
				top: 0
			}), b.boxImgDiv.css({
				left: b.innerBoxImg.width() >= e ? (b.innerBoxImg.width() - e) / 2 : Math.max(b.innerBoxImg.width() - e, c + (g - b.innerBoxImg.width()) / 2),
				top: b.innerBoxImg.height() >= f ? (b.innerBoxImg.height() - f) / 2 : Math.max(b.innerBoxImg.height() - f, d + (h - b.innerBoxImg.height()) / 2)
			}), b.isFullFalg = !0, b.dragDivFalg = !1, b.fullScreen.children("img").attr("src", b.address + "exitFull.png"));
			b.innerBoxImg.width() >= b.boxImgDiv.width() && b.innerBoxImg.height() >= b.boxImgDiv.height() ? b.dragImgFalg = !1 : b.dragImgFalg = !0;
			b.isShowMap();
			b.setMapPoint()
		});
		this.fullScreen.bind("mouseover",
		function() {
			b.isFullFalg ? b.fullScreen.children("img").attr("src", b.address + "exitFull_over.png") : b.fullScreen.children("img").attr("src", b.address + "enterFull_over.png")
		});
		this.fullScreen.bind("mouseout",
		function() {
			b.isFullFalg ? b.fullScreen.children("img").attr("src", b.address + "exitFull.png") : b.fullScreen.children("img").attr("src", b.address + "enterFull.png")
		})
	},
	isOneToOne: function() {
		if (this.originalSize.width == this.boxImgDiv.width() && this.originalSize.height == this.boxImgDiv.height()) return this.oneToOne.css({
			color: "#7F8383"
		}),
		!0;
		this.oneToOne.css({
			color: "#ffffff"
		});
		return ! 1
	},
	loadImg: function(b) {
		var c = this,
		d = new Image;
		d.onload = function() {
			d.onload = d.onerror = null;
			var b = this.width,
			f = this.height,
			g = c.selectWidthAdHeight(b, f);
			c.outerBoxImg.removeClass("fliphtml5-loading");
			c.boxImgDiv.css({
				width: g.width,
				height: g.height
			});
			c.innerBoxImg.css({
				width: Math.max(c.innerLimitWidth, g.width),
				height: Math.max(c.innerLimitHeight, g.height),
				left: Math.max(0, (c.outerBoxImg.width() - Math.max(c.innerLimitWidth, g.width)) / 2),
				top: -Math.max(c.innerLimitHeight, g.height) - 240
			});
			c.innerBoxImg.show().animate({
				top: Math.max(0, (c.outerBoxImg.height() - Math.max(c.innerLimitHeight, g.height)) / 2)
			},
			{
				duration: 500,
				easing: "linear"
			});
			c.boxImgDiv.css({
				width: g.width,
				height: g.height,
				left: Math.max(0, (c.innerBoxImg.width() - g.width) / 2),
				top: Math.max(0, (c.innerBoxImg.height() - g.height) / 2)
			});
			c.originalSize = {
				width: b,
				height: f
			};
			c.result = g;
			c.isOneToOneFalg = c.isOneToOne();
			isTouch ? c.zoomInPad() : c.mouseZoom();
			c.setMapImg(b, f)
		};
		d.onerror = function() {
			d.onload = d.onerror = null;
			c.outerBoxImg.removeClass("fliphtml5-loading");
			var b = c.selectWidthAdHeight(18, 20);
			c.boxImgDiv.css({
				width: b.width,
				height: b.height
			});
			c.innerBoxImg.css({
				width: Math.max(c.innerLimitWidth, b.width),
				height: Math.max(c.innerLimitHeight, b.height),
				left: Math.max(0, (c.outerBoxImg.width() - Math.max(c.innerLimitWidth, b.width)) / 2),
				top: -Math.max(c.innerLimitHeight, b.height) - 240
			});
			c.innerBoxImg.show().animate({
				top: Math.max(0, (c.outerBoxImg.height() - Math.max(c.innerLimitHeight, b.height)) / 2)
			},
			{
				duration: 500,
				easing: "linear"
			});
			c.boxImgDiv.css({
				width: b.width,
				height: b.height,
				left: Math.max(0, (c.innerBoxImg.width() - b.width) / 2),
				top: Math.max(0, (c.innerBoxImg.height() - b.height) / 2)
			});
			c.originalSize = {
				width: 18,
				height: 20
			};
			c.result = b;
			c.isOneToOneFalg = c.isOneToOne();
			isTouch ? c.zoomInPad() : c.mouseZoom();
			c.setMapImg(18, 20)
		};
		d.src = b;
		c.boxImg.attr("src", b);
		c.mapImg.attr("src", b)
	},
	selectWidthAdHeight: function(b, c) {
		var d = {},
		e = b / c,
		f = this.limitWidth,
		g = this.limitHeight;
		f >= b && g < c ? (d.width = e * g, d.height = g) : f < b && g >= c ? (d.width = f, d.height = f / e) : f < b && g < c ? f / e <= g ? (d.width = f, d.height = f / e) : e * g <= f ? (d.width = e * g, d.height = g) : console && console.log("Do not be so wonderful picture of uncle!") : (d.width = b, d.height = c);
		return d
	},
	dragDiv: function() {
		var b = this,
		c = b.innerBoxImg,
		d = $(document),
		e = !0,
		f,
		g,
		h,
		k;
		b.innerBoxImg.bind(_event._down,
		function(b) {
			b = isTouch ? b.originalEvent.touches: [b];
			1 == b.length ? e = !0 : 2 <= b.length && (e = !1);
			stopEvent(b[0])
		});
		c.bind(_event._down,
		function(l) {
			b.dragDivFalg && (l = isTouch ? l.originalEvent.touches[0] : l, isTouch || (l.preventDefault(), l.stopPropagation()), f = c[0].offsetLeft, g = c[0].offsetTop, h = l.clientX, k = l.clientY, d.bind(_event._move,
			function(b) {
				e && (b = isTouch ? b.originalEvent.touches[0] : b, isTouch || (b.preventDefault(), b.stopPropagation()), c.css({
					left: f + b.clientX - h,
					top: g + b.clientY - k
				}))
			}), d.bind(_event._end,
			function(b) {
				b = isTouch ? b.originalEvent.touches[0] : b;
				isTouch || (b.preventDefault(), b.stopPropagation());
				e = !0;
				d.unbind(_event._move)
			}))
		})
	},
	mouseZoom: function() {
		var b = this,
		c = b.scale,
		d = b.result,
		e = d.width,
		f = d.height;
		b.innerBoxImg.bind($.browser.mozilla ? "DOMMouseScroll": "mousewheel",
		function(d) {
			c = b.scale;
			d = d.originalEvent;
			d = d.wheelDelta || -d.detail;
			0 < d ? c += 0.2 * c: 0 > d && (c -= 0.17 * c);
			5 > c ? c = 5 : 1600 < c && (c = 1600);
			var h, k, l;
			k = b.boxImgDiv.width();
			l = b.boxImgDiv.height();
			d = e * c / 100;
			var m = f * c / 100;
			d < b.innerBoxImg.width() ? h = (b.innerBoxImg.width() - e * c / 100) / 2 : (h = parseInt(b.boxImgDiv.css("left")), h += (k - d) / 2, 0 <= h ? h = 0 : h <= b.innerBoxImg.width() - d && (h = b.innerBoxImg.width() - d));
			m < b.innerBoxImg.height() ? l = (b.innerBoxImg.height() - f * c / 100) / 2 : (k = parseInt(b.boxImgDiv.css("top")), l = k + (l - m) / 2, 0 <= l ? l = 0 : l <= b.innerBoxImg.height() - m && (l = b.innerBoxImg.height() - m));
			b.scale = c;
			b.boxImgDiv.animate({
				width: d,
				height: m,
				left: h,
				top: l
			},
			{
				duration: 100,
				easing: "linear",
				complete: function() {
					b.isOneToOneFalg = b.isOneToOne();
					b.isMapShowFalg = b.isShowMap();
					b.setMapPoint();
					b.isFullFalg ? (b.dragDivFalg = !1, b.boxImgDiv.width() > b.innerBoxImg.width() || b.boxImgDiv.height() > b.innerBoxImg.height() ? b.dragImgFalg = !0 : b.dragImgFalg = !1) : b.boxImgDiv.width() > b.innerBoxImg.width() || b.boxImgDiv.height() > b.innerBoxImg.height() ? (b.dragDivFalg = !1, b.dragImgFalg = !0) : (b.dragDivFalg = !0, b.dragImgFalg = !1)
				}
			})
		})
	},
	zoomInPad: function() {
		var b = this,
		c = b.result,
		d = c.width,
		e = c.height,
		f, g, h, k, l, m = !1;
		b.boxImgDiv[0].addEventListener("touchstart",
		function(c) {
			if (2 <= c.touches.length) {
				m = !0;
				var d = c.touches[0].pageX,
				e = c.touches[0].pageY,
				s = c.touches[1].pageX;
				c = c.touches[1].pageY;
				f = b.boxImgDiv.position().left;
				g = b.boxImgDiv.position().top;
				h = b.boxImgDiv.width();
				k = b.boxImgDiv.height();
				l = Math.sqrt(Math.pow(s - d, 2) + Math.pow(c - e, 2))
			}
		},
		!1);
		document.addEventListener("touchmove",
		function(c) {
			if (m && 2 <= c.touches.length) {
				var n, q, s;
				n = c.touches[0].pageX;
				q = c.touches[0].pageY;
				s = c.touches[1].pageX;
				c = c.touches[1].pageY;
				q = Math.sqrt(Math.pow(s - n, 2) + Math.pow(c - q, 2)) / l;
				n = h * q;
				q *= k;
				s = (h - n) / 2 + f;
				c = (k - q) / 2 + g;
				n < b.innerBoxImg.width() ? s = (b.innerBoxImg.width() - n) / 2 : 0 <= s ? s = 0 : s <= b.innerBoxImg.width() - n && (s = b.innerBoxImg.width() - n);
				q < b.innerBoxImg.height() ? c = (b.innerBoxImg.height() - q) / 2 : 0 <= c ? c = 0 : c <= b.innerBoxImg.height() - q && (c = b.innerBoxImg.height() - q);
				b.boxImgDiv.width(n).height(q).css({
					left: s,
					top: c
				});
				b.isOneToOneFalg = b.isOneToOne();
				b.isMapShowFalg = b.isShowMap();
				b.setMapPoint();
				b.boxImgDiv.width() > d || b.boxImgDiv.height() > e ? (b.dragDivFalg = !1, b.dragImgFalg = !0) : (b.dragDivFalg = !0, b.dragImgFalg = !1)
			}
		},
		!1);
		document.addEventListener("touchend",
		function(b) {
			m = !1
		},
		!1);
		document.body.addEventListener("touchmove",
		function(b) {},
		!1)
	},
	dragImage: function() {
		var b = this,
		c = b.boxImgDiv,
		d = $(document),
		e = !0,
		f,
		g,
		h,
		k;
		b.innerBoxImg.bind(_event._down,
		function(b) {
			b = isTouch ? b.originalEvent.touches: [b];
			1 == b.length ? e = !0 : 2 <= b.length && (e = !1);
			stopEvent(b[0])
		});
		c.bind(_event._down,
		function(l) {
			b.dragImgFalg && (l = isTouch ? l.originalEvent.touches[0] : l, c.addClass("dragging"), f = c[0].offsetLeft, g = c[0].offsetTop, h = l.clientX, k = l.clientY, d.bind(_event._move,
			function(d) {
				d = isTouch ? d.originalEvent.touches[0] : d;
				if (e) {
					var l = f + d.clientX - h;
					d = g + d.clientY - k;
					0 <= l ? l = 0 : l <= b.innerBoxImg.width() - b.boxImgDiv.width() && (l = b.innerBoxImg.width() - b.boxImgDiv.width());
					0 <= d ? d = 0 : d <= b.innerBoxImg.height() - b.boxImgDiv.height() && (d = b.innerBoxImg.height() - b.boxImgDiv.height());
					c.width() > b.innerBoxImg.width() && (c.css({
						left: l
					}), b.mapPoint.css({
						left: -l / (b.boxImgDiv.width() - b.innerBoxImg.width()) * (b.mapDiv.width() - b.mapPoint.outerWidth())
					}));
					c.height() > b.innerBoxImg.height() && (c.css({
						top: d
					}), b.mapPoint.css({
						top: -d / (b.boxImgDiv.height() - b.innerBoxImg.height()) * (b.mapDiv.height() - b.mapPoint.outerHeight())
					}))
				}
			}), d.bind(_event._end,
			function(b) {
				d.unbind(_event._move);
				c.removeClass("dragging");
				e = !0
			}))
		})
	},
	resize: function() {
		var b = this.$container.width(),
		c = this.$container.height();
		this.boxImgBG.css({
			width: b,
			height: c
		});
		this.outerBoxImg.css({
			width: b,
			height: c
		});
		this.isFullFalg ? (this.innerBoxImg.css({
			width: b,
			height: c
		}), this.boxImgDiv.css({
			left: (b - this.boxImgDiv.width()) / 2,
			top: (c - this.boxImgDiv.height()) / 2
		}), this.setMapPoint()) : this.innerBoxImg.css({
			left: (b - this.innerBoxImg.width()) / 2,
			top: (c - this.innerBoxImg.height()) / 2
		})
	},
	destroy: function() {
		var b = this;
		parseInt(b.innerBoxImg.css("left"));
		parseInt(b.innerBoxImg.css("top"));
		var c = b.innerBoxImg.width(),
		d = b.innerBoxImg.height(),
		e,
		f,
		g,
		h,
		k;
		$({
			k: 100
		}).animate({
			k: 0
		},
		{
			duration: 400,
			easing: "linear",
			step: function(l, m) {
				k = l / 100;
				e = (d - k * d) / 2;
				h = (c - k * c) / 2;
				f = c - h;
				g = d - e;
				b.innerBoxImg[0].style.clip = "rect(" + e + "px, " + f + "px, " + g + "px, " + h + "px)"
			},
			complete: function() {
				b.boxImgBG.remove();
				b.outerBoxImg.remove()
			}
		})
	},
	createImgMap: function(b) {
		this.map = $("<div class='ImageMap' style='position: absolute;left: auto;top: auto;right: 2px;bottom: 2px;width: 210px;height: 130px;overflow: hidden;border-radius: 4px;'></div>").css({
			boxShadow: "inset 1px 1px 0 rgba(0,0,0,.1),inset 0 -1px 0 rgba(0,0,0,.07)",
			backgroundColor: "rgba(0,0,0,.6)"
		}).hide().appendTo(b);
		this.mapDiv = $("<div style='position: absolute;margin: 0px;padding: 0px;border: 0px;overflow: hidden;'></div>").appendTo(this.map);
		this.mapImg = $("<img style='position: absolute;width: 100%;height: 100%;left: 0px;top: 0px;padding: 0px;margin: 0px;border: 0px;'/>").appendTo(this.mapDiv);
		this.mapPoint = $("<div style='position: absolute;margin: 0px;padding: 0px;border: 2px solid #58AA38;width: 100%;height: 100%;'></div>").css({
			boxShadow: "inset 1px 1px 0 #ffffff,inset 0 -1px 0 #ffffff,inset -1px 0px 0 #ffffff"
		}).appendTo(this.mapDiv);
		this.closeMap = $("<div style='position: absolute;left: auto;top: 0px;right: 0px;'></div>").append($("<img>", {
			src: this.address + "closeForm.png"
		})).appendTo(this.map);
		this.bindCloseMapEvent();
		this.dragMapPoint()
	},
	bindCloseMapEvent: function() {
		var b = this;
		b.closeMap.bind("mouseover",
		function() {
			b.closeMap.children("img").attr("src", b.address + "closeForm_down.png")
		});
		b.closeMap.bind("mouseout",
		function() {
			b.closeMap.children("img").attr("src", b.address + "closeForm.png")
		});
		b.closeMap.bind("click",
		function() {
			b.destroyMap()
		})
	},
	setMapImg: function(b, c) {
		var d = this.map.width(),
		e = this.map.height(),
		f = b / c,
		g = e * f,
		h = d / f,
		k,
		l,
		m,
		p;
		g > d ? (k = d, l = h, m = 0, p = (e - h) / 2) : h > e ? (k = g, l = e, m = (d - g) / 2, p = 0) : g / h == f && (k = g, l = h, p = m = 0);
		this.mapDiv.css({
			width: k,
			height: l,
			left: m,
			top: p
		})
	},
	setMapPoint: function() {
		var b = Math.min(this.mapDiv.width(), this.innerBoxImg.width() * this.mapDiv.width() / this.boxImgDiv.width()) - 4,
		c = Math.min(this.mapDiv.height(), this.innerBoxImg.height() * this.mapDiv.height() / this.boxImgDiv.height()) - 4,
		d = -parseInt(this.boxImgDiv.css("left")) / (this.boxImgDiv.width() - this.innerBoxImg.width()) * (this.mapDiv.width() - (b + 4)),
		e = -parseInt(this.boxImgDiv.css("top")) / (this.boxImgDiv.height() - this.innerBoxImg.height()) * (this.mapDiv.height() - (c + 4));
		this.mapPoint.css({
			left: d,
			top: e,
			width: b,
			height: c
		})
	},
	isShowMap: function() {
		if (this.innerBoxImg.width() >= this.boxImgDiv.width() && this.innerBoxImg.height() >= this.boxImgDiv.height()) return this.map.hide(),
		!0;
		this.map.show();
		return ! 1
	},
	dragMapPoint: function() {
		var b = this,
		c = b.mapPoint,
		d = $(document),
		e,
		f,
		g,
		h;
		c.bind(_event._down,
		function(k) {
			k = isTouch ? k.originalEvent.touches[0] : k;
			e = c[0].offsetLeft;
			f = c[0].offsetTop;
			g = k.clientX;
			h = k.clientY;
			d.bind(_event._move,
			function(d) {
				d = isTouch ? d.originalEvent.touches[0] : d;
				var k = e + d.clientX - g;
				d = f + d.clientY - h;
				0 >= k ? k = 0 : k >= b.mapDiv.width() - b.mapPoint.outerWidth() && (k = b.mapDiv.width() - b.mapPoint.outerWidth());
				0 >= d ? d = 0 : d >= b.mapDiv.height() - b.mapPoint.outerHeight() && (d = b.mapDiv.height() - b.mapPoint.outerHeight());
				c.width() < b.mapDiv.width() && (c.css({
					left: k
				}), b.boxImgDiv.css({
					left: -k / (b.mapDiv.width() - b.mapPoint.outerWidth()) * (b.boxImgDiv.width() - b.innerBoxImg.width())
				}));
				c.height() < b.mapDiv.height() && (c.css({
					top: d
				}), b.boxImgDiv.css({
					top: -d / (b.mapDiv.height() - b.mapPoint.outerHeight()) * (b.boxImgDiv.height() - b.innerBoxImg.height())
				}))
			});
			d.bind(_event._end,
			function(b) {
				d.unbind(_event._move)
			})
		})
	},
	destroyMap: function() {
		var b = this;
		parseInt(b.map.css("right"));
		parseInt(b.map.css("bottom"));
		var c = b.map.width(),
		d = b.map.height(),
		e,
		f,
		g,
		h,
		k;
		$({
			k: 100
		}).animate({
			k: 0
		},
		{
			duration: 400,
			easing: "linear",
			step: function(l, m) {
				k = l / 100;
				e = (d - k * d) / 2;
				h = (c - k * c) / 2;
				f = c - h;
				g = d - e;
				b.map[0].style.clip = "rect(" + e + "px, " + f + "px, " + g + "px, " + h + "px)"
			},
			complete: function() {
				b.map.remove()
			}
		})
	}
}),
initArrow = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			StartX: 0,
			StartY: 0,
			EndX: 100,
			EndY: 100,
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			lineWidth: 1,
			lineType: null,
			dotWidth: 3,
			color: null,
			arrowType: null,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.color = colorTo0x(this.config.color);
		this.bstyle = "Solid line" == this.config.lineType ? "solid": "dashed";
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "arrow" + f;
		this.x1 = this.x - 10;
		this.y1 = this.y - 10;
		0 > this.x - 10 && (this.x1 = 0);
		0 > this.y - 10 && (this.y1 = 0);
		this.arrow = $("<canvas id=" + this.id + " width=" + (this.width + 20) + " height=" + (this.height + 20) + " style='position: absolute;top:" + this.y1 + "px;left:" + this.x1 + "px'></canvas>");
		b.append(this.arrow);
		this.arrowcan(this.x, this.y, this.config.StartX, this.config.StartY, this.config.EndX, this.config.EndY, this.width, this.height, this.config.lineWidth, this.config.dotWidth, this.color, this.config.alpha, this.bstyle, this.config.sx, this.config.sy, this.config.se, this.config.sr, this.config.sh)
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.arrow.css({
			width: this.width + 20 + "px",
			height: this.height + 20 + "px"
		});
		this.setPosition()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw - 10;
		this.y = this.config.y * this.ph - 10;
		this.arrow.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	},
	arrowcan: function(b, c, d, e, f, g, h, k, l, m, p, n, q, s, r, w, u, y) {
		var v = c = b = 0,
		t = 0,
		x = 0,
		z = this.arrow[0].getContext("2d");
		m = parseFloat(m);
		z.clearRect(0, 0, this.pw, this.ph);
		z.save();
		z.lineWidth = l;
		z.globalAlpha = n;
		z.strokeStyle = p;
		"false" != y && (z.shadowOffsetX = s, z.shadowOffsetY = r, z.shadowBlur = w, z.shadowColor = colorTo0x(u));
		0 == d && 0 == e ? (x = t = 10, b = h + 10, c = k + 10) : 0 == d && 0 != e ? (t = 10, x = 10 + k, b = h + 10, c = 10) : 0 != d && 0 == e ? (t = 10 + h, b = x = 10, c = k + 10) : (t = 10 + h, x = 10 + k, c = b = 10);
		z.translate(0, 0);
		z.beginPath();
		z.moveTo(t, x);
		"Double Arrow" == this.config.arrowType && (0 == g - e ? f > d ? z.moveTo(t + 5, x) : z.moveTo(t - 5, x) : 0 == f - d && (g > e ? z.moveTo(t, x + 5) : z.moveTo(t, x - 5)));
		if ("solid" == q) 0 == g - e ? f > d ? z.lineTo(b - 5, c) : z.lineTo(b + 5, c) : 0 == f - d ? g > e ? z.lineTo(b, c - 5) : z.lineTo(b, c + 5) : z.lineTo(b, c);
		else for (h = 0, q = m + 2, k = t, n = x, q = (0 == g - e ? f > d ? (b - t) / q: (t - b) / q: 0 == f - d ? g > e ? (c - x) / q: (x - c) / q: e < g && d < f ? b - t > c - x ? (b - t) / q: (c - x) / q: e > g && d < f ? b - t > x - c ? (b - t) / q: (x - c) / q: e < g && d > f ? t - b > c - x ? (t - b) / q: (c - x) / q: t - b > x - c ? (t - c) / q: (x - c) / q) - 1, i = 0; i < q; i++) z.moveTo(k, n),
		0 == g - e ? k = f > d ? k + m: k - m: 0 == f - d ? n = g > e ? n + m: n - m: e < g && d < f ? b - t > c - x ? (h = Math.abs((c - x) / (b - t)), k += m, n += m * h) : (h = Math.abs((b - t) / (c - x)), k += m * h, n += m) : e > g && d < f ? b - t > x - c ? (h = Math.abs((c - x) / (b - t)), k += m, n -= m * h) : (h = Math.abs((b - t) / (c - x)), k += m * h, n -= m) : e < g && d > f ? t - b > c - x ? (h = Math.abs((c - x) / (b - t)), k -= m, n += m * h) : (h = Math.abs((b - t) / (c - x)), k -= m * h, n += m) : t - b > x - c ? (h = Math.abs((c - x) / (b - t)), k -= m, n -= m * h) : (h = Math.abs((b - t) / (c - x)), k -= m * h, n -= m),
		z.lineTo(k, n),
		0 == g - e ? k = f > d ? k + 2 : k - 2 : 0 == f - d ? n = g > e ? n + 2 : n - 2 : e < g && d < f ? b - t > c - x ? (k += 2, n += 2 * h) : (k += 2 * h, n += 2) : e > g && d < f ? b - t > x - c ? (k += 2, n -= 2 * h) : (k += 2 * h, n -= 2) : e < g && d > f ? t - b > c - x ? (k -= 2, n += 2 * h) : (k -= 2 * h, n += 2) : t - b > x - c ? (k -= 2, n -= 2 * h) : (k -= 2 * h, n -= 2);
		z.fillStyle = p;
		z.stroke();
		z.save();
		v = 2 < 1 * l ? 15 : 10;
		"Double Arrow" == this.config.arrowType && (z.moveTo(t, x), "Double Arrow" == this.config.arrowType && (0 == g - e ? f > d ? z.moveTo(t - 1, x) : z.moveTo(t + 1, x) : 0 == f - d && (g > e ? z.moveTo(t, x - 1) : z.moveTo(t, x + 1))), z.translate(t, x), 0 <= c - x ? z.rotate(4.7 - Math.atan((b - t) / (c - x))) : z.rotate(4.7 - (Math.PI + Math.atan((b - t) / (c - x)))), z.lineTo( - v, v - 5), z.lineTo( - (v - 5), 0), z.lineTo( - v, -(v - 5)), z.lineTo(0, 0), z.fill(), z.restore());
		z.moveTo(b, c);
		z.translate(b, c);
		0 <= c - x ? z.rotate(1.5 - Math.atan((b - t) / (c - x))) : z.rotate(1.5 - (Math.PI + Math.atan((b - t) / (c - x))));
		z.lineTo( - v, v - 5);
		z.lineTo( - (v - 5), 0);
		z.lineTo( - v, -(v - 5));
		z.lineTo(0, 0);
		z.fill();
		z.restore()
	}
});
global.hddr.soq3 = function() {
	return hddr.soo1 || "tm"
} ();
var initLine = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			StartX: 0,
			StartY: 0,
			EndX: 100,
			EndY: 100,
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			lineAlpha: 1,
			lineWidth: 1,
			lineType: null,
			dotWidth: 3,
			color: null,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.color = colorTo0x(this.config.color);
		this.bstyle = "Solid line" == this.config.lineType ? "solid": "dashed";
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "line" + f;
		this.x1 = this.x - 10;
		this.y1 = this.y - 10;
		0 > this.x - 10 && (this.x1 = 0);
		0 > this.y - 10 && (this.y1 = 0);
		this.line = $("<canvas id=" + this.id + " width=" + (this.width + 20) + " height=" + (this.height + 20) + " style='position: absolute;top:" + this.y1 + "px;left:" + this.x1 + "px'></canvas>");
		b.append(this.line);
		this.linecan(this.x, this.y, this.config.StartX, this.config.StartY, this.config.EndX, this.config.EndY, this.width, this.height, this.config.lineWidth, this.config.dotWidth, this.color, this.config.lineAlpha, this.bstyle, this.config.sx, this.config.sy, this.config.se, this.config.sr, this.config.sh)
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.line.css({
			width: this.width + 20 + "px",
			height: this.height + 20 + "px"
		});
		this.setPosition()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw - 10;
		this.y = this.config.y * this.ph - 10;
		this.line.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	},
	linecan: function(b, c, d, e, f, g, h, k, l, m, p, n, q, s, r, w, u, y) {
		var v = c = b = 0,
		t = 0;
		b = this.line[0];
		var x;
		try {
			x = b.getContext("2d")
		} catch(z) {
			return
		}
		m = parseFloat(m);
		0 == d && 0 == e ? (t = v = 10, b = h + 10, c = k + 10) : 0 == d && 0 != e ? (v = 10, t = 10 + k, b = h + 10, c = 10) : 0 != d && 0 == e ? (v = 10 + h, b = t = 10, c = k + 10) : (v = 10 + h, t = 10 + k, c = b = 10);
		x.moveTo(v, t);
		x.lineWidth = l;
		x.globalAlpha = n;
		x.strokeStyle = p;
		"false" != y && (x.shadowOffsetX = s, x.shadowOffsetY = r, x.shadowBlur = w, x.shadowColor = colorTo0x(u));
		if ("solid" == q) x.lineTo(b, c);
		else for (h = 0, p = m + 2, k = v, l = t, num = 0 == g - e ? f > d ? (b - v) / p: (v - b) / p: 0 == f - d ? g > e ? (c - t) / p: (t - c) / p: e < g && d < f ? b - v > c - t ? (b - v) / p: (c - t) / p: e > g && d < f ? b - v > t - c ? (b - v) / p: (t - c) / p: e < g && d > f ? v - b > c - t ? (v - b) / p: (c - t) / p: v - b > t - c ? (v - c) / p: (t - c) / p, p = num - 1, i = 0; i < p; i++) x.moveTo(k, l),
		0 == g - e ? k = f > d ? k + m: k - m: 0 == f - d ? l = g > e ? l + m: l - m: e < g && d < f ? b - v > c - t ? (h = Math.abs((c - t) / (b - v)), k += m, l += m * h) : (h = Math.abs((b - v) / (c - t)), k += m * h, l += m) : e > g && d < f ? b - v > t - c ? (h = Math.abs((c - t) / (b - v)), k += m, l -= m * h) : (h = Math.abs((b - v) / (c - t)), k += m * h, l -= m) : e < g && d > f ? v - b > c - t ? (h = Math.abs((c - t) / (b - v)), k -= m, l += m * h) : (h = Math.abs((b - v) / (c - t)), k -= m * h, l += m) : v - b > t - c ? (h = Math.abs((c - t) / (b - v)), k -= m, l -= m * h) : (h = Math.abs((b - v) / (c - t)), k -= m * h, l -= m),
		x.lineTo(k, l),
		0 == g - e ? k = f > d ? k + 2 : k - 2 : 0 == f - d ? l = g > e ? l + 2 : l - 2 : e < g && d < f ? b - v > c - t ? (k += 2, l += 2 * h) : (k += 2 * h, l += 2) : e > g && d < f ? b - v > t - c ? (k += 2, l -= 2 * h) : (k += 2 * h, l -= 2) : e < g && d > f ? v - b > c - t ? (k -= 2, l += 2 * h) : (k -= 2 * h, l += 2) : v - b > t - c ? (k -= 2, l -= 2 * h) : (k -= 2 * h, l -= 2);
		x.stroke()
	}
}),
initRe = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			fillStyle: null,
			color: null,
			ColorA: null,
			ColorB: null,
			angle: 90,
			spalpha: 1,
			action: null,
			borderWidth: 1,
			borderColor: null,
			borderAlpha: 1,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null,
			round: !1,
			roundWidth: 0
		},
		c);
		this.pw = d;
		this.ph = e;
		this.father = b;
		this.color = colorTo0x(this.config.color);
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "re" + f;
		this.angle = 360 - parseInt(this.config.angle);
		this.A = colorTo0x(this.config.ColorA);
		this.B = colorTo0x(this.config.ColorB);
		this.round = c.round;
		this.roundWidth = Math.ceil(c.roundWidth / 2);
		this.Re = $("<div id=" + this.id + " style='overflow: hidden;position:absolute;top:" + this.y + "px;left:" + this.x + "px;border:" + this.config.borderWidth + "px solid " + colorTo0x(this.config.borderColor) + ";background:" + this.color + ";height:" + this.height + "px;width:" + this.width + "px;opacity:" + this.config.spalpha + "'></div>");
		"false" != this.config.sh && this.Re.css({
			"box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-moz-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-webkit-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-ms-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-o-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr)
		}); ! 0 == this.round && this.Re.css({
			"border-radius": this.roundWidth + "px"
		});
		if ("gradient" == this.config.fillStyle) switch (c = this.A, d = this.B, this.Re.css({
			background: "linear-gradient(" + this.angle + "deg, " + c + ", " + d + ")"
		}), browserType) {
		case 1:
			this.Re.css({
				background:
				"-webkit-linear-gradient(" + this.angle + "deg, " + c + ", " + d + ")"
			});
			break;
		case 2:
			this.Re.css({
				background:
				"-moz-linear-gradient(" + this.angle + "deg, " + c + ", " + d + ")"
			});
			break;
		case 3:
			this.Re.css({
				background:
				"-ms-linear-gradient(" + this.angle + "deg, " + c + ", " + d + ")"
			});
			this.Re.css("filter", "progid:DXImageTransform.Microsoft.Gradient( EndColorStr=" + d + ", StartColorStr=" + c + ")");
			break;
		case 4:
			this.Re.css({
				background:
				"-o-linear-gradient(" + this.angle + "deg, " + c + ", " + d + ")"
			})
		}
		"none" == this.config.fillStyle && this.Re.css({
			background: ""
		});
		this.initEvent();
		b.append(this.Re)
	},
	initEvent: function() {
		var b = this;
		this.flag = 0;
		this.linkURL = this.audios = this.slide = this.form = null;
		if (null != b.config.action) {
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.Re.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.Re.bind("mouseover",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.Re.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.Re.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.setPosition();
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height())
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.Re.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
});
bdor[8] = "o";
var initRound = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			fillStyle: null,
			color: null,
			ColorA: null,
			ColorB: null,
			angle: "false",
			spalpha: 1,
			action: null,
			borderWidth: 1,
			borderColor: null,
			borderAlpha: 1,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.color = colorTo0x(this.config.color);
		this.father = b;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "round" + f;
		this.x1 = this.x - 10;
		this.y1 = this.y - 10;
		0 > this.x - 10 && (this.x1 = 0);
		0 > this.y - 10 && (this.y1 = 0);
		this.rounds = $("<canvas id=" + this.id + " width=" + (this.width + 20) + " height=" + (this.height + 20) + " style='position: absolute;top:" + this.y1 + "px;left:" + this.x1 + "px'></canvas>");
		this.father = b;
		this.initEvent();
		b.append(this.rounds);
		this.roundcan(this.x, this.y, this.width, this.height, this.color, this.config.fillStyle, this.config.ColorA, this.config.ColorB, this.config.alpha, this.config.borderWidth, this.config.spalpha, this.config.borderColor, this.config.borderAlpha, this.config.sx, this.config.sy, this.config.se, this.config.sr, this.config.sh, 360 - parseInt(this.config.angle))
	},
	initEvent: function() {
		var b = this;
		this.flag = 0;
		this.audios = this.slide = this.form = null;
		this.linkURL = "";
		if (null != b.config.action) {
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.rounds.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.rounds.bind("mouseover",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.rounds.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.rounds.css({
			width: this.width + 20 + "px",
			height: this.height + 20 + "px"
		});
		this.setPosition();
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height())
	},
	setPosition: function() {
		this.x = this.config.x * this.pw - 10;
		this.y = this.config.y * this.ph - 10;
		this.rounds.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	},
	roundcan: function(b, c, d, e, f, g, h, k, l, m, p, n, q, s, r, w, u, y, v) {
		b = l = 0;
		try {
			var t = this.rounds[0].getContext("2d")
		} catch(x) {
			return
		}
		c = [d / 2 + 10, e / 2 + 10];
		l = d / 2;
		b = e / 2;
		t.save();
		t.beginPath();
		t.strokeStyle = colorTo0x(n);
		t.lineWidth = m;
		t.globalAlpha = p;
		"false" != y && (t.shadowOffsetX = s, t.shadowOffsetY = r, t.shadowBlur = w, t.shadowColor = colorTo0x(u));
		t.closePath();
		t.stroke();
		DrawEllipse(t, c, l, b);
		"gradient" == g && (e = v * Math.PI / 180, d = c[0] + l * Math.cos(e), e = c[1] + b * Math.sin(e), v = (v + 180) * Math.PI / 180, p = c[0] + l * Math.cos(v), v = c[1] + b * Math.sin(v), v = t.createLinearGradient(d, e, p, v), v.addColorStop(0, colorTo0x(h)), v.addColorStop(1, colorTo0x(k)), t.fillStyle = v, t.fill());
		"none" == g && (t.fillStyle = f, t.fill());
		0 != m && t.stroke();
		t.closePath()
	}
});
bdor[9] = "j";
function DrawEllipse(b, c, d, e) {
	var f = c[0] + d,
	g = c[1];
	b.moveTo(f, g);
	for (var h = 0; 360 >= h; h++) g = h * Math.PI / 180,
	f = c[0] + d * Math.cos(g),
	g = c[1] - e * Math.sin(g),
	b.lineTo(f, g)
}
var initText = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			textStr: null,
			lineH: 20,
			fontName: null,
			fontSize: 12,
			color: null,
			tbold: "false",
			italic: "false",
			bgalpha: 1,
			action: null,
			fillBg: "false",
			bgcolor: null,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.originWidth = bookConfig.largePageWidth;
		this.originHeight = bookConfig.largePageHeight;
		null != this.config.color && (this.color = colorTo0x(this.config.color));
		this.father = b;
		this.pageH = this.config.pageH;
		this.pageW = this.config.pageW;
		this.width = this.config.width * this.pageW;
		this.height = this.config.height * this.pageH;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "text" + f;
		this.color = colorTo0x(this.config.color);
		this.text = $("<div class='textformat' id=" + this.id + " style='overflow: hidden;position:absolute;left:" + this.x + "px; top:" + this.y + "px;height:" + this.height + "px;width:" + this.width + "px;opacity:" + this.config.bgalpha + "'></div>");
		this.resetText();
		this.text.html(this.config.textStr);
		"false" != this.config.sh && this.text.css({
			"box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-moz-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-webkit-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-ms-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-o-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr)
		});
		"false" == this.config.fillBg ? this.text.css({
			background: ""
		}) : null != this.config.bgcolor && this.text.css({
			background: colorTo0x(this.config.bgcolor)
		});
		"false" != this.config.tbold && this.text.css({
			"font-weight": "bold"
		});
		"false" != this.config.italic && this.text.css({
			"font-style": "italic"
		});
		this.father = b;
		this.initEvent();
		b.append(this.text);
		this.resizeText(this.pw, this.ph)
	},
	initEvent: function() {
		var b = this;
		this.flag = 0;
		this.linkURL = this.audios = this.slide = this.form = null;
		if (null != b.config.action) {
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.text.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.text.bind("mouseover",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.text.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.setPosition();
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height());
		this.resizeText(this.pw, this.ph)
	},
	resizeText: function(b, c) {
		var d = c / this.config.pageH;
		this.text.css({
			"-webkit-transform-origin": "0% 0%",
			"-moz-transform-origin": "0% 0%",
			"-ms-transform-origin": "0% 0%",
			"-o-transform-origin": "0% 0%",
			"transform-origin": "0% 0%",
			"-webkit-transform": "scale(" + d + ")",
			"-moz-transform": "scale(" + d + ")",
			"-ms-transform": "scale(" + d + ")",
			"-o-transform": "scale(" + d + ")",
			transform: "scale(" + d + ")"
		})
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.text.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	},
	resetText: function() {
		var b = this.config.textStr.match(/\<TEXTFORMAT\s.*?\>\<\/TEXTFORMAT\>/ig);
		this.newTextFormats = [];
		if (b) {
			for (var c = 0; c < b.length; c++) {
				var d = b[c].match(/LEADING\s?=\s?\\?[\"\']?\d+\\?[\"\']?/i);
				d || (d = ["LEADING='5'"]);
				this.analysisTextformat(b[c], d)
			}
			this.config.textStr = this.newTextFormats.join("").replaceAll("</FONT>", "</div>");
			$(".textformat p").css({
				margin: "0px"
			})
		}
	},
	analysisTextformat: function(b, c) {
		var d = ["SIZE='16'"],
		e = ["COLOR='#000000'"],
		f = ["FACE='Tahoma'"],
		g = ["LETTERSPACING='0'"],
		h = ["KERNING='0'"],
		k = parseInt(c[0].match(/\d+/)[0]),
		l = b.match(/\<FONT\s.*?\>/ig);
		if (l) {
			for (var m = 0; m < l.length; m++) {
				var p = l[m],
				n = p.match(/SIZE\s?=\s?\\?[\"\']?\d+\\?[\"\']?/i),
				q = p.match(/COLOR\s?=\s?\\?[\"\']{1}#.*?\\?[\"\']{1}/i),
				s = p.match(/FACE\s?=\s?\\?[\"\']{1}.*?\\?[\"\']{1}/i),
				r = p.match(/LETTERSPACING\s?=\s?\\?[\"\']?\d+\\?[\"\']?/i),
				p = p.match(/KERNING\s?=\s?\\?[\"\']?\d+\\?[\"\']?/i);
				n ? d = n: n = d;
				q ? e = q: q = e;
				s ? f = s: s = f;
				r ? g = r: r = g;
				p ? h = p: p = h;
				n = parseInt(n[0].match(/\d+/)[0]);
				q = q[0].match(/#\w+/)[0];
				s = s[0].match(/\\?[\"\'].*?\\?[\"\']/)[0];
				r = parseInt(r[0].match(/\d+/)[0]);
				p = parseInt(p[0].match(/\d+/)[0]);
				b = b.replaceAll(l[m], "<div style='height:" + (n + k) + "px;line-height:" + (n + k) + "px;font-size:" + n + "px;letter-spacing:" + r + "px;font-kerning:" + p + "px;color:" + q + ";font-family:" + s + ";'>")
			}
			this.newTextFormats.push(b)
		}
	}
}),
TextFormatAnalyzer = Class({
	create: function(b) {
		this.originalFormat = b;
		null != b && (this.analyzedText = b.toLowerCase().replaceAll('"', ""))
	},
	getAlign: function() {
		return this.analyzedText.subBetween("align=", ">").trim()
	},
	getLeftMargin: function() {
		var b = this.analyzedText.subBetween("leftmargin=", " ").trim();
		return "" == b ? 0 : parseInt(b)
	},
	getRightMargin: function() {
		var b = this.analyzedText.subBetween("rightmargin=", " ").trim();
		return "" == b ? 0 : parseInt(b)
	},
	getFontFamily: function() {
		var b = this.analyzedText.subBetween("face=", " ").trim();
		"" == b && (b = "Arial");
		return b
	},
	getFontColor: function() {
		var b = this.analyzedText.subBetween("color=", " ").trim();
		"" == b && (b = "#000000");
		return b
	},
	getFontSize: function() {
		var b = this.analyzedText.subBetween("size=", " ").trim();
		"" == b && (b = "16");
		return b
	},
	getLetterSpace: function() {
		var b = this.analyzedText.subBetween("letterspacing=", " ").trim();
		"" == b && (b = "0");
		return b
	},
	initFont: function(b) {
		var c = this.getFontFamily(),
		d = this.getFontColor(),
		e = this.getFontSize(),
		f = this.getLetterSpace();
		b.css({
			"font-family": c,
			color: d,
			"font-size": e + "px",
			"letter-spacing": f + "px"
		})
	},
	getText: function() {
		for (var b = [], b = [], c = loadXMLString("<xml>" + this.originalFormat + "</xml>").getElementsByTagName("TEXTFORMAT"), d = 0; d < c.length; d++) if (null != c[d].getElementsByTagName("FONT")[0].firstChild) {
			var e = c[d].getElementsByTagName("FONT")[0].firstChild.nodeValue;
			c[d].getElementsByTagName("P");
			null == e && (e = c[d].getElementsByTagName("B")[0].firstChild.nodeValue);
			null == e && (e = c[d].getElementsByTagName("I")[0].firstChild.nodeValue);
			null == e && (e = c[d].getElementsByTagName("U")[0].firstChild.nodeValue);
			null != e && b.push(e)
		}
		c = "";
		for (d = 0; d < b.length; d++) c = c + "<br>" + b[d] + "</br>";
		return c
	},
	getTextLines: function() {
		for (var b = [], b = [], c = loadXMLString("<xml>" + this.originalFormat + "</xml>").getElementsByTagName("P"), d = 0; d < c.length; d++) if (null != c[d].getElementsByTagName("FONT")[0].firstChild) {
			var e = c[d].getElementsByTagName("FONT")[0].firstChild.nodeValue;
			null == e && (e = c[d].getElementsByTagName("B")[0].firstChild.nodeValue);
			null == e && (e = c[d].getElementsByTagName("I")[0].firstChild.nodeValue);
			null == e && (e = c[d].getElementsByTagName("U")[0].firstChild.nodeValue);
			null != e && b.push(e)
		}
		c = "";
		for (d = 0; d < b.length; d++) c = c + "<br>" + b[d] + "</br>";
		return c
	},
	getLines: function() {
		for (var b = [], b = [], c = loadXMLString("<xml>" + this.originalFormat + "</xml>").getElementsByTagName("TEXTFORMAT"), d = 0; d < c.length; d++) if (null != c[d].getElementsByTagName("FONT")[0].firstChild) {
			var e = c[d].getElementsByTagName("FONT")[0].firstChild.nodeValue;
			c[d].getElementsByTagName("P");
			null == e && (e = c[d].getElementsByTagName("B")[0].firstChild.nodeValue);
			null == e && (e = c[d].getElementsByTagName("I")[0].firstChild.nodeValue);
			null == e && (e = c[d].getElementsByTagName("U")[0].firstChild.nodeValue);
			null != e && b.push(e)
		}
		return b
	}
}),
initButton = Class({
	create: function(b, c, d, e) {
		this.config = $.extend({
			width: 0.2,
			height: 0.2,
			x: 0.2,
			y: 0.2,
			alpha: 1,
			src: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.width = d * this.config.width;
		this.height = e * this.config.height;
		this.button = null;
		c = [];
		var f = this;
		c = "button_watermark01.swf button_watermark02.swf button_watermark03.swf button_watermark04.swf button_watermark05.swf button_watermark06.swf button_watermark07.swf button_watermark08.swf button_watermark09.swf button_glossy01.swf button_glossy02.swf button_glossy03.swf button_glossy04.swf button_glossy05.swf button_glossy06.swf button_glossy07.swf button_glossy08.swf button_glossy09.swf button_glossy10.swf button_glossy11.swf button_glossy12.swf button_glossy13.swf button_glossy14.swf button_glossy15.swf button_glossy16.swf button_glossy17.swf button_push01.swf button_push02.swf button_push03.swf button_push04.swf button_push05.swf button_push06.swf button_lineLight01.swf button_lineLight02.swf button_lineLight03.swf button_lineLight04.swf button_lineLight05.swf button_star01.swf button_star02.swf button_star03.swf button_star04.swf button_star05.swf button_glitter01.swf button_glitter02.swf button_glitter03.swf button_glitter04.swf button_glitter05.swf button_glitter06.swf button_shadow01.swf button_shadow02.swf button_shadow03.swf button_shadow04.swf button_shadow05.swf button_shadow06.swf button_bottomLight01.swf button_bottomLight02.swf button_bottomLight03.swf button_bottomLight04.swf button_bottomLight05.swf button_bottomLight06.swf button_bottomLight07.swf button_bottomLight08.swf button_bottomLight09.swf button_bottomLight10.swf button_other01.swf button_other02.swf button_other03.swf".split(" ");
		null == this.config.src || "null" == this.config.src ? (this.button = $("<button type = 'button'></button>"), this.config.alpha = 0) : (!0 == isFlipPdf && (this.config.src = "." + this.config.src), d = this.config.src.substring(this.config.src.lastIndexOf("/") + 1, this.config.src.length), (this.swfButton = 0 <= c.indexOf(d)) ? (this.config.Format.color = colorTo0x(this.config.Format.color), this.button = $("<div></div>"), this.buttonEvt = $("<div></div>"), isTouchDevice() ? (this.button.css({
			"-webkit-border-radius": "8px",
			"-moz-border-radius": "5px",
			"border-radius": "8px",
			"background-image": getBrowserPre() + "linear-gradient(top,rgba(185,185,185,1) 0%, rgba(122,122,122,1) 45%, rgba(80, 80, 80, 1) 46%, rgba(53,53,53,1) 100%)",
			"-webkit-box-shadow": "0 0 10px rgba(40, 40, 40, 0.7)",
			"-moz-box-shadow": "0 0 10px rgba(40, 40, 40, 0.7)",
			"-o-box-shadow": "0 0 10px rgba(40, 40, 40, 0.7)",
			"-ms-box-shadow": "0 0 10px rgba(40, 40, 40, 0.7)",
			"box-shadow": "0 0 10px rgba(40, 40, 40, 0.7)"
		}), this.buttonEvt.css({
			"-webkit-border-radius": "8px",
			"-moz-border-radius": "5px",
			"border-radius": "8px",
			"background-color": "#333333",
			opacity: 0.2,
			display: "none",
			width: this.width + "px",
			height: this.height + "px"
		})) : (this.button.flash({
			swf: this.config.src,
			width: this.width + "px",
			height: this.height + "px",
			wmode: "transparent"
		}), this.buttonEvt.css({
			display: "none",
			width: this.width + "px",
			height: this.height + "px"
		})), this.buttonCaption = new label(this.config.buttonCaption, this.button), this.buttonCaption.setFont(this.config.HRate * this.ph * 1 / 2, bookConfig.iconColor, this.config.Format.font), c = this.buttonCaption.getWidth() > this.width ? 0 : (this.width - this.buttonCaption.getWidth()) / 2, this.buttonCaption.setLabelPosition(c, this.config.captionY * this.height / 100), this.button.append(this.buttonEvt), this.button.bind(_event._down,
		function() {
			f.buttonEvt.css({
				display: "block"
			})
		}), this.button.bind(_event._end,
		function() {
			f.buttonEvt.css({
				display: "none"
			})
		}), this.button.bind("mouseleave",
		function() {
			f.buttonEvt.css({
				display: "none"
			})
		})) : ".swf" == this.config.src.substr(this.config.src.length - 4, 4) ? this.button = $("<div></div>") : (this.button = $("<img />"), this.button.attr({
			src: this.config.src
		})));
		this.button.css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px",
			left: this.pw * this.config.x + "px",
			top: this.ph * this.config.y + "px",
			opacity: this.config.alpha
		});
		b.append(this.button);
		this.father = b;
		this.initEvt()
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * b;
		this.height = this.config.height * c;
		this.button.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.setPosition(this.config.x * b, this.config.y * c);
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height());
		if (this.swfButton) if (isTouchDevice()) {
			this.buttonCaption.setFont(this.config.HRate * this.height * 2 / 3, bookConfig.iconColor, this.config.Format.font);
			var d = this.buttonCaption.getWidth() > this.width ? 0 : (this.width - this.buttonCaption.getWidth()) / 2;
			this.buttonCaption.setLabelPosition(d, this.config.captionY * this.height / 100);
			this.buttonEvt.css({
				width: this.width + "px",
				height: this.height + "px"
			})
		} else this.hide(),
		this.show()
	},
	hide: function() {
		isTouchDevice() || this.button.html("")
	},
	show: function() {
		var b = this;
		if (!isTouchDevice() && this.swfButton) {
			this.buttonEvt = $("<div></div>");
			this.button.flash({
				swf: this.config.src,
				width: this.width + "px",
				height: this.height + "px",
				wmode: "transparent"
			});
			this.buttonEvt.css({
				display: "none",
				width: this.width + "px",
				height: this.height + "px"
			});
			this.buttonCaption = new label(this.config.buttonCaption, this.button);
			this.buttonCaption.setFont(this.config.HRate * this.ph * 1 / 2, bookConfig.iconColor, this.config.Format.font);
			var c = this.buttonCaption.getWidth() > this.width ? 0 : (this.width - this.buttonCaption.getWidth()) / 2;
			this.buttonCaption.setLabelPosition(c, this.config.captionY * this.height / 100);
			this.button.append(this.buttonEvt);
			this.button.bind(_event._down,
			function() {
				b.buttonEvt.css({
					display: "block"
				})
			});
			this.button.bind(_event._end,
			function() {
				b.buttonEvt.css({
					display: "none"
				})
			});
			this.button.bind("mouseleave",
			function() {
				b.buttonEvt.css({
					display: "none"
				})
			})
		}
	},
	setPosition: function(b, c) {
		this.button.css({
			left: b + "px",
			top: c + "px"
		})
	},
	initEvt: function() {
		this.audios = this.slide = this.form = null;
		if (void 0 != this.config.action) {
			var b = this;
			this.flag = 0;
			this.linkURL = null;
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.button.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.button.bind("mouseover",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.button.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	}
});
global.hddr.soo6 = function() {
	return hddr.bbb5
};
var initArea = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			color: null,
			rounds: "false",
			ellipseWidth: 5,
			ellipseHeight: 5,
			action: null,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.father = b;
		this.color = colorTo0x(this.config.color);
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "Area" + f;
		this.Area = "false" != this.config.sh ? $("<div id=" + this.id + " style='overflow: hidden;position:absolute;top:" + this.y + "px;left:" + this.x + "px;background:" + this.color + ";height:" + this.height + "px;width:" + this.width + "px;box-shadow:" + this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr) + ";opacity:" + this.config.alpha + "'></div>") : $("<div id=" + this.id + " style='overflow: hidden;position:absolute;top:" + this.y + "px;left:" + this.x + "px;background:" + this.color + ";height:" + this.height + "px;width:" + this.width + "px;opacity:" + this.config.alpha + "'></div>");
		"false" != this.config.rounds && this.Area.css({
			"border-radius": this.config.ellipseWidth + "px " + this.config.ellipseHeight + "px"
		});
		this.father = b;
		this.initEvent();
		b.append(this.Area)
	},
	initEvent: function() {
		var b = this;
		this.flag = 0;
		this.audios = this.slide = this.form = null;
		this.linkURL = "";
		if (null != b.config.action) {
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.Area.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.Area.bind("mouseover",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.Area.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.Area.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.setPosition();
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height())
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.Area.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
}),
initVideoForm = Class({
	create: function(b, c, d, e) {
		this.config = $.extend({
			width: 400,
			height: 300,
			src: null,
			alpha: 0.3,
			caption: "",
			closeIconURL: uiBaseURL + "close.png"
		},
		c);
		this.father = b;
		null != this.config.src && (this.config.width = parseInt(this.config.width), this.config.height = parseInt(this.config.height), this.sw = d, this.sh = e, this.th = 28, this.background = new grayBackground(b, "#333333", this.config.alpha, d, e), this.form = $("<div></div>"), this.titleBar = $("<div></div>"), !0 == isFlipPdf && (this.config.src = "../" + this.config.src), "" != this.config.closeIconURL && (this.closeButton = new button(this.titleBar, {
			buttonType: 1,
			iconURL: this.config.closeIconURL,
			asImgButton: !0
		}), this.closeButton.setButtonPosition(this.config.width - 28, 0)), "" != this.config.caption && (this.captionLabel = new label(this.config.caption, this.titleBar), this.captionLabel.setLabelPosition(5, 3, ["left", "top"]), this.captionLabel.setFont(14, "#dddddd", "Tahoma")), this.video = $("<video src='" + this.config.src + "' controls='controls'></video>"), this.form.css({
			width: this.config.width + 4 + "px",
			height: this.config.height + 4 + "px",
			left: (d - this.config.width) / 2 + "px",
			top: (e - this.config.height) / 2 + "px",
			"background-color": "#dddddd",
			"-webkit-border-radius": "5px",
			"-moz-border-radius": "5px",
			"-ms-border-radius": "5px",
			"border-radius": "5px",
			position: "absolute",
			"z-index": 201
		}), this.titleBar.css({
			width: this.config.width + "px",
			height: this.th + "px",
			left: "2px",
			top: "2px",
			"border-top-left-radius": "5px",
			"border-top-right-radius": "5px",
			position: "absolute",
			"background-color": "#111111"
		}), this.video.css({
			width: this.config.width + "px",
			height: this.config.height - this.th + "px",
			top: this.th + 2 + "px",
			left: "2px",
			position: "absolute"
		}), b.append(this.form), this.form.append(this.titleBar), this.form.append(this.video), this.initEvent())
	},
	onResize: function(b, c) {
		this.sw = b;
		this.sh = c;
		this.background.onResize(b, c);
		this.setPosition()
	},
	setPosition: function() {
		this.form.css({
			left: (this.sw - this.config.width) / 2 + "px",
			top: (this.sh - this.config.height) / 2 + "px"
		})
	},
	initEvent: function() {
		var b = this;
		this.closeButton.onMouseUp(this, this.closeForm);
		var c = !1,
		d, e;
		this.titleBar.bind(_event._down,
		function(f) {
			f = isTouch ? f.originalEvent.touches: [f];
			c = !0;
			d = Point(f[0].pageX, f[0].pageY);
			e = Point(b.form.offset().left, b.form.offset().top);
			return ! 1
		});
		this.titleBar.bind(_event._move,
		function(f) {
			f = isTouch ? f.originalEvent.touches: [f];
			c && b.form.css({
				top: e.y + (f[0].pageY - d.y) + "px",
				left: e.x + (f[0].pageX - d.x) + "px"
			});
			return ! 1
		});
		this.titleBar.bind(_event._end,
		function(b) {
			return c = !1
		});
		this.titleBar.bind("mouseleave",
		function(b) {
			return c = !1
		})
	},
	closeForm: function() {
		var b = this;
		this.form.animate({
			width: 20,
			height: 20,
			left: this.sw / 2 - 10,
			top: this.sh / 2 - 10
		},
		200,
		function() {
			b.background.hide();
			b.form.remove()
		})
	}
}),
initSlideShow = Class({
	create: function(b, c, d, e) {
		this.photos = $.extend([], c);
		if (0 == this.photos.length) {
			if (void 0 == this.photos.url) return;
			this.photos = [this.photos]
		}
		this.father = b;
		this.sw = d - 8;
		this.sh = e - 8;
		this.imgIndex = -1;
		this.imgWidth = 200;
		this.imgHeight = 300;
		this.boxWidth = 200;
		this.boxHeight = 300;
		this.loadingImageHeight = this.loadingImageWidth = 32;
		this.slideShowBG = new grayBackground(b, "#333333", 0.3, d, e);
		this.photoBox = $("<div></div>");
		this.leftBar = $("<div></div>");
		this.rightBar = $("<div></div>");
		this.img = $("<img style='position : absolute;' />");
		b.append(this.photoBox);
		b.append(this.leftBar);
		b.append(this.rightBar);
		this.leftButton = new button(this.leftBar, {
			buttonType: 1,
			iconURL: uiBaseURL + "previous_down.png"
		});
		this.rightButton = new button(this.rightBar, {
			buttonType: 1,
			iconURL: uiBaseURL + "next_down.png"
		});
		this.closeButton = new button(b, {
			buttonType: 1,
			iconURL: uiBaseURL + "close.png"
		},
		!0);
		this.leftButton.setButtonPosition(0, 29, ["left", "top"]);
		this.rightButton.setButtonPosition(0, 29, ["right", "top"]);
		this.closeButton.setButtonPosition(this.sw - 45, 5);
		this.closeButton.setCSS({
			"z-index": 210
		});
		this.rightBar.css({
			"z-index": 202,
			width: "100px",
			height: "100px",
			right: "0px",
			top: (this.sh - 100) / 2 + "px",
			position: "absolute"
		});
		this.leftBar.css({
			"z-index": 203,
			width: "100px",
			height: "100px",
			left: "0px",
			top: (this.sh - 100) / 2 + "px",
			position: "absolute"
		});
		this.photoBox.css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: (this.sw - this.boxWidth) / 2 + "px",
			top: (this.sh - this.boxHeight) / 2 + "px",
			position: "absolute",
			"background-color": "#eeeeee",
			"z-index": 201,
			"-webkit-box-shadow": "0 0 10px rgba(255, 255, 255, 0.7)",
			"-moz-box-shadow": "0 0 10px rgba(255, 255, 255, 0.7)",
			"-ms-box-shadow": "0 0 10px rgba(255, 255, 255, 0.7)",
			"-o-box-shadow": "0 0 10px rgba(255, 255, 255, 0.7)",
			"box-shadow": "0 0 10px rgba(255, 255, 255, 0.7)"
		});
		this.loadingImage = $("<div><img src='" + uiBaseURL + "progress.gif' style='position:absolute;'/></div>");
		this.loadingImage.css({
			"z-index": -1,
			left: (this.boxWidth - this.loadingImageWidth) / 2 + "px",
			top: (this.boxHeight - this.loadingImageHeight) / 2 + "px"
		});
		this.loadingImage.css({
			width: this.loadingImageWidth + "px",
			height: this.loadingImageHeight + "px",
			position: "absolute"
		});
		this.photoBox.append(this.loadingImage);
		this.changeImage(0);
		var f = this;
		this.photoBox.bind(_event._down,
		function(b) {
			f.nextPage()
		});
		this.closeButton.onMouseUp(this, this.hide);
		this.slideShowBG.onMouseUp(this, this.hide);
		this.leftButton.onMouseDown(this, this.prePage);
		this.rightButton.onMouseDown(this, this.nextPage);
		this.leftButton.mouseEnterJump();
		this.rightButton.mouseEnterJump();
		void 0 != leftRightButton && null != leftRightButton && leftRightButton.setShow(!1)
	},
	nextPage: function() {
		var b = this.imgIndex + 1;
		b >= this.photos.length && (b = 0);
		this.changeImage(b)
	},
	prePage: function() {
		var b = this.imgIndex - 1;
		0 > b && (b = this.photos.length - 1);
		this.changeImage(b)
	},
	onResize: function(b, c) {
		this.sw = b - 8;
		this.sh = c - 8;
		this.slideShowBG.onResize(b, c);
		this.setPosition()
	},
	setPosition: function() {
		this.photoBox.css({
			left: (this.sw - this.boxWidth) / 2 + "px",
			top: (this.sh - this.boxHeight) / 2 + "px"
		});
		this.leftButton.setButtonPosition(0, 29, ["left", "top"]);
		this.rightButton.setButtonPosition(0, 29, ["right", "top"]);
		this.rightBar.css({
			right: "0px",
			top: (this.sh - 100) / 2 + "px",
			position: "absolute"
		});
		this.leftBar.css({
			left: "0px",
			top: (this.sh - 100) / 2 + "px",
			position: "absolute"
		});
		this.closeButton.setButtonPosition(this.sw - 45, 5)
	},
	changeImage: function(b) {
		if (this.imgIndex != b) {
			this.imgIndex = b;
			this.img.remove();
			b = this.photos[b].url; ! 0 == isFlipPdf && (b = "." + b);
			var c = this;
			this.img.attr("src", b);
			this.img.load(function() {
				c.imgWidth = c.img[0].naturalWidth;
				c.imgHeight = c.img[0].naturalHeight;
				var b = c.imgWidth,
				e = c.imgHeight;
				if (c.imgWidth > c.sw || c.imgHeight > c.sh) b = c.imgWidth / c.imgHeight,
				b > c.sw / c.sh ? (b = c.sw, e = c.sw * c.imgHeight / c.imgWidth) : (e = c.sh, b *= c.sh);
				c.img.css({
					width: b + "px",
					height: e + "px"
				});
				c.boxWidth != b || c.boxHeight != e ? (c.photoBox.animate({
					width: b + 8,
					height: e + 8,
					left: (c.sw - b) / 2,
					top: (c.sh - e) / 2
				},
				300,
				function() {
					c.photoBox.append(c.img)
				}), c.loadingImage.css({
					left: (b + 8 - c.loadingImageWidth) / 2,
					top: (e + 8 - c.loadingImageHeight) / 2
				})) : c.photoBox.append(c.img);
				c.boxWidth = b;
				c.boxHeight = e;
				c.img.css({
					left: "4px",
					top: "4px"
				})
			})
		}
	},
	setImagePosition: function() {},
	show: function() {},
	hide: function() {
		var b = this;
		this.photoBox.animate({
			width: 20,
			height: 20,
			top: this.sh / 2 - 10,
			left: this.sw / 2 - 10
		},
		200,
		function() {
			b.leftBar.remove();
			b.rightBar.remove();
			b.closeButton.remove();
			b.photoBox.remove();
			b.slideShowBG.hide()
		});
		hideLeftRightButton() && leftRightButton.setShow(!0)
	}
});
global.hddr.soa7 = bdor[3] + bdor[10];
var initCallout = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			textStr: null,
			pageH: 812,
			lineH: 20,
			fontName: null,
			fontSize: 12,
			color: null,
			tbold: "false",
			italic: "false",
			bgalpha: 1,
			action: null,
			fillBg: "false",
			bgcolor: null,
			direct: "Down",
			cx1: 0,
			cy1: 0,
			cx2: 0,
			cy2: 0,
			pointx: 0,
			pointy: 0,
			cornerRadiut: 5,
			borderWidth: 3,
			borderColor: null,
			bordreAlpha: 1,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.father = b;
		this.originWidth = bookConfig.largePageWidth;
		this.originHeight = bookConfig.largePageHeight;
		this.width = this.config.width * bookConfig.largePageWidth;
		this.height = this.config.height * bookConfig.largePageHeight;
		this.x = this.config.x * d;
		this.y = this.config.y * e;
		this.cx1 = this.config.cx1 * this.width;
		this.cy1 = this.config.cy1 * this.height;
		this.cx2 = this.config.cx2 * this.width;
		this.cy2 = this.config.cy2 * this.height;
		this.pointx = this.config.pointx * this.width;
		this.pointy = this.config.pointy * this.height;
		this.fontSize = this.config.lineH * this.originHeight * 0.75;
		this.id = "callout" + f;
		this.cl = this.ct = this.hl = this.wl = this.canl = this.cant = this.canh = this.canw = 0;
		c = new TextFormatAnalyzer(this.config.textStr);
		this.text = c.getLines();
		null == this.config.fontName && (d = c.getFontFamily().split(","), this.config.fontName = d[0], this.config.fontSize = c.getFontSize(), this.config.color = c.getFontColor(), this.color = colorTo0x(this.config.color));
		switch (this.config.direct) {
		case "Down":
			if (0 > this.pointx) {
				this.canw = this.width - this.pointx + 20;
				this.canh = this.pointy + 20;
				this.cant = this.y - 10;
				this.canl = this.x - (this.canw - this.width - 10);
				break
			}
			this.canw = this.pointx > this.width ? this.pointx + 20 : this.width + 20;
			this.canh = this.pointy + 20;
			this.cant = this.y - 10;
			this.canl = this.x - 10;
			break;
		case "left":
			if (0 > this.pointy) {
				this.canw = this.width - this.pointx + 20;
				this.canh = this.height - this.pointy + 20;
				this.cant = this.y - 10;
				this.canl = this.x + this.pointx + 40;
				break
			}
			this.pointy > this.height ? (this.canw = this.width - this.pointx + 20, this.canh = this.pointy + 20) : (this.canw = this.width - this.pointx + 20, this.canh = this.height + 20);
			this.cant = this.y - 10;
			this.canl = this.x + this.pointx + 40;
			break;
		case "Up":
			if (0 > this.pointx) {
				this.canw = this.width - this.pointx + 20;
				this.canh = this.height - this.pointy + 20;
				this.cant = this.y - (this.canh - this.height - 10);
				this.canl = this.x - (this.canw - this.width - 10);
				break
			}
			this.canw = this.pointx > this.width ? this.pointx + 20 : this.width + 20;
			this.canh = this.height - this.pointy + 20;
			this.cant = this.y - (this.canh - this.height - 10);
			this.canl = this.x - 10;
			break;
		case "Right":
			if (0 > this.pointy) {
				this.canw = this.pointx + 20;
				this.canh = this.height - this.pointy + 20;
				this.cant = this.y - (this.canh - this.height - 10);
				this.canl = this.x - 10;
				break
			}
			this.pointy > this.height ? (this.canw = this.pointx + 20, this.canh = this.pointy + 20) : (this.canw = this.pointx + 20, this.canh = this.height + 20);
			this.cant = this.y - 10;
			this.canl = this.x - 10
		}
		this.wl = this.canw / this.pw;
		this.hl = this.canh / this.ph;
		this.ct = this.cant / this.ph;
		this.cl = this.canl / this.pw;
		this.callout = $("<canvas id=" + this.id + " width=" + this.canw + " height=" + this.canh + " style='position: absolute;top:" + this.cant + "px;left:" + this.canl + "px'></canvas>");
		b.append(this.callout);
		this.calloutDown();
		this.resizeCallout(e);
		this.father = b;
		this.initEvent()
	},
	resizeCallout: function(b) {
		b /= bookConfig.largePageHeight;
		this.callout.css({
			"-webkit-transform-origin": "0% 0%",
			"-moz-transform-origin": "0% 0%",
			"-ms-transform-origin": "0% 0%",
			"-o-transform-origin": "0% 0%",
			"transform-origin": "0% 0%",
			"-webkit-transform": "scale(" + b + ")",
			"-moz-transform": "scale(" + b + ")",
			"-ms-transform": "scale(" + b + ")",
			"-o-transform": "scale(" + b + ")",
			transform: "scale(" + b + ")"
		})
	},
	calloutDown: function() {
		var b = [],
		c = [],
		d,
		e,
		f = this.callout[0].getContext("2d"),
		g,
		h,
		k,
		l,
		m,
		p,
		n,
		q,
		s,
		r,
		w,
		u,
		y,
		v,
		t,
		x,
		z,
		C,
		A,
		B,
		K,
		J,
		D,
		G,
		E,
		F,
		H,
		I;
		switch (this.config.direct) {
		case "Down":
			if (0 > this.pointx) {
				g = this.canw - this.width - 10;
				h = 20;
				k = this.canw - this.width - 10;
				l = 10;
				d = this.canw - this.width;
				e = 10;
				m = this.canw - 20;
				p = 10;
				n = this.canw - 10;
				q = 10;
				s = this.canw - 10;
				r = 20;
				w = this.canw - 10;
				u = this.height;
				y = this.canw - 10;
				v = this.height + 10;
				t = this.canw - 20;
				x = this.height + 10;
				z = this.canw - (this.width - this.cx2) - 10;
				C = this.height + 10;
				A = 10;
				B = this.pointy + 10;
				K = this.canw - (this.width - this.cx1) - 10;
				J = this.height + 10;
				D = this.canw - this.width;
				G = this.height + 10;
				E = this.canw - (this.width + 10);
				F = this.height + 10;
				H = this.canw - (this.width + 10);
				I = this.height;
				break
			}
			g = 10;
			h = 20;
			l = k = 10;
			d = 20;
			e = 10;
			m = this.width;
			p = 10;
			n = this.width + 10;
			q = 10;
			s = this.width + 10;
			r = 20;
			w = this.width + 10;
			u = this.height;
			y = this.width + 10;
			v = this.height + 10;
			t = this.width;
			x = this.height + 10;
			z = this.cx2 + 10;
			C = this.height + 10;
			A = this.pointx + 10;
			B = this.pointy + 10;
			K = this.cx1 + 10;
			J = this.height + 10;
			D = 20;
			G = this.height + 10;
			E = 10;
			F = 10 + this.height;
			H = 10;
			I = this.height;
			break;
		case "left":
			if (0 > this.pointy) {
				g = this.canw - this.width - 10;
				h = this.canh - this.height;
				k = this.canw - this.width - 10;
				l = this.canh - this.height - 10;
				d = this.canw - this.width;
				e = this.canh - this.height - 10;
				m = this.canw - 20;
				p = this.canh - this.height - 10;
				n = this.canw - 10;
				q = this.canh - this.height - 10;
				s = this.canw - 10;
				r = this.canh - this.height;
				w = this.canw - 10;
				u = this.canh - 20;
				y = this.canw - 10;
				v = this.canh - 10;
				t = this.canw - 20;
				x = this.canh - 10;
				z = this.canw - this.width - 10;
				C = this.canh - 20;
				A = this.canw - this.width - 10;
				B = this.canh - 10;
				K = this.canw - this.width;
				J = this.canh - 10;
				D = this.canw - this.width - 10;
				G = this.canh - (this.height - this.cy2 + 10);
				F = E = 10;
				H = this.canw - this.width - 10;
				I = this.canh - (this.height - this.cy1 + 10);
				break
			}
			this.pointy > this.height ? (k = this.canw - this.width - 10, l = 10, n = this.canw - 10, q = 10, y = this.canw - 10, v = this.height + 10, A = this.canw - this.width - 10, B = this.height + 10, D = this.canw - this.width - 10, G = this.cy2 + 10, E = 10, F = this.canh - 10) : (k = this.canw - this.width - 10, l = 10, n = this.canw - 10, q = 10, y = this.canw - 10, v = this.height + 10, A = this.canw - this.width - 10, B = this.height + 10, D = this.canw - this.width - 10, G = this.cy2 + 10, E = 10, F = this.pointy);
			H = this.canw - this.width - 10;
			I = this.cy1 + 10;
			g = k;
			h = l + 10;
			d = k + 10;
			e = l;
			m = n - 10;
			p = q;
			s = n;
			r = q + 10;
			w = y;
			u = v - 10;
			t = y - 10;
			x = v;
			z = A + 10;
			C = B;
			K = A;
			J = B - 10;
			break;
		case "Up":
			if (0 > this.pointx) {
				k = this.canw - this.width - 10;
				l = this.canh - this.height - 10;
				m = this.canw - (this.width - this.cx2) - 10;
				p = this.canh - this.height - 10;
				q = n = 10;
				s = this.canw - (this.width - this.cx1) - 10;
				r = this.canh - this.height - 10;
				y = this.canw - 10;
				v = this.canh - this.height - 10;
				A = this.canw - 10;
				B = this.canh - 10;
				E = this.canw - this.width - 10;
				F = this.canh - 10;
				g = k;
				h = l + 10;
				d = k + 10;
				e = l;
				w = y - 10;
				u = v;
				t = y;
				x = v + 10;
				z = A;
				C = B - 10;
				K = A - 10;
				J = B;
				D = E + 10;
				G = F;
				H = E;
				I = F - 10;
				break
			}
			k = 10;
			l = this.canh - this.height - 10;
			m = this.cx2 + 10;
			p = this.canh - this.height - 10;
			n = this.pointx + 10;
			q = 10;
			s = this.cx1 + 10;
			r = this.canh - this.height - 10;
			y = this.width + 10;
			v = this.canh - this.height - 10;
			A = this.width + 10;
			B = this.canh - 10;
			E = 10;
			F = this.canh - 10;
			g = k;
			h = l + 10;
			d = k + 10;
			e = l;
			w = y - 10;
			u = v;
			t = y;
			x = v + 10;
			z = A;
			C = B - 10;
			K = A - 10;
			J = B;
			D = E + 10;
			G = F;
			H = E;
			I = F - 10;
			break;
		case "Right":
			if (0 > this.pointy) {
				n = this.width + 10;
				q = this.canh - this.height - 10;
				w = this.width + 10;
				u = this.canh - (this.height - this.cy2 + 10);
				y = this.canw - 10;
				v = 10;
				t = this.width + 10;
				x = this.canh - (this.height - this.cy1 + 10);
				A = this.width + 10;
				B = this.canh - 10;
				E = 10;
				F = this.canh - 10;
				g = k;
				h = l + 10;
				d = k + 10;
				e = l;
				m = n - 10;
				p = q;
				s = n;
				r = q + 10;
				z = A;
				C = B - 10;
				K = A - 10;
				J = B;
				D = E + 10;
				G = F;
				H = E;
				I = F - 10;
				break
			}
			this.pointy > this.height ? (n = this.width + 10, q = 10, w = this.width + 10, u = this.cy2 + 10, y = this.canw - 10, v = this.canh - 10) : (l = k = 10, n = this.width + 10, q = 10, w = this.width + 10, u = this.cy2 + 10, y = this.canw - 10, v = this.pointy);
			t = this.width + 10;
			x = this.cy1 + 10;
			A = this.width + 10;
			B = this.height + 10;
			E = 10;
			F = this.height + 10;
			g = k;
			h = l + 10;
			d = k + 10;
			e = l;
			m = n - 10;
			p = q;
			s = n;
			r = q + 10;
			z = A;
			C = B - 10;
			K = A - 10;
			J = B;
			D = E + 10;
			G = F;
			H = E;
			I = F - 10
		}
		switch (this.config.direct) {
		case "Down":
			f.beginPath();
			f.lineWidth = "0";
			f.globalAlpha = this.config.bgalpha;
			f.strokeStyle = this.color;
			f.fillStyle = colorTo0x(this.config.bgcolor);
			f.moveTo(g, h);
			f.quadraticCurveTo(k, l, d, e);
			f.lineTo(m, p);
			f.quadraticCurveTo(n, q, s, r);
			f.lineTo(w, u);
			f.quadraticCurveTo(y, v, t, x);
			f.lineTo(z, C);
			f.lineTo(A, B);
			f.lineTo(K, J);
			f.lineTo(D, G);
			f.quadraticCurveTo(E, F, H, I);
			break;
		case "left":
			f.beginPath();
			f.lineWidth = "0";
			f.globalAlpha = this.config.bgalpha;
			f.strokeStyle = this.color;
			f.fillStyle = colorTo0x(this.config.bgcolor);
			f.moveTo(g, h);
			f.quadraticCurveTo(k, l, d, e);
			f.lineTo(m, p);
			f.quadraticCurveTo(n, q, s, r);
			f.lineTo(w, u);
			f.quadraticCurveTo(y, v, t, x);
			f.lineTo(z, C);
			f.quadraticCurveTo(A, B, K, J);
			f.lineTo(D, G);
			f.lineTo(E, F);
			f.lineTo(H, I);
			break;
		case "Up":
			f.beginPath();
			f.lineWidth = "0";
			f.globalAlpha = this.config.bgalpha;
			f.strokeStyle = this.color;
			f.fillStyle = colorTo0x(this.config.bgcolor);
			f.moveTo(g, h);
			f.quadraticCurveTo(k, l, d, e);
			f.lineTo(m, p);
			f.lineTo(n, q);
			f.lineTo(s, r);
			f.lineTo(w, u);
			f.quadraticCurveTo(y, v, t, x);
			f.lineTo(z, C);
			f.quadraticCurveTo(A, B, K, J);
			f.lineTo(D, G);
			f.quadraticCurveTo(E, F, H, I);
			break;
		case "Right":
			f.beginPath(),
			f.lineWidth = "0",
			f.globalAlpha = this.config.bgalpha,
			f.strokeStyle = this.color,
			f.fillStyle = colorTo0x(this.config.bgcolor),
			f.moveTo(g, h),
			f.quadraticCurveTo(k, l, d, e),
			f.lineTo(m, p),
			f.quadraticCurveTo(n, q, s, r),
			f.lineTo(w, u),
			f.lineTo(y, v),
			f.lineTo(t, x),
			f.lineTo(z, C),
			f.quadraticCurveTo(A, B, K, J),
			f.lineTo(D, G),
			f.quadraticCurveTo(E, F, H, I)
		}
		f.strokeStyle = colorTo0x(this.config.borderColor);
		f.lineWidth = 5;
		f.closePath();
		f.fill();
		"false" != this.config.sh && (f.shadowOffsetX = this.config.sx, f.shadowOffsetY = this.config.sy, f.shadowBlur = this.config.se, f.shadowColor = colorTo0x(this.config.sr), f.strokeStyle = colorTo0x(this.config.borderColor));
		f.stroke();
		f.fill();
		f.shadowOffsetX = 0;
		f.shadowOffsetY = 0;
		f.shadowBlur = 100;
		f.shadowColor = 0;
		f.fillStyle = this.color;
		f.font = this.fontSize + "px " + this.config.fontName;
		for (l = k = 0; l < this.text.length; l++) if (c = [], b = this.text[l], f.measureText(b).width <= this.width - 3.5) f.fillText(b, g + 5, h + (l + k) * (this.fontSize + this.fontSize / 2) + 2 * this.fontSize / 3);
		else {
			b = b.split(" ");
			e = b[0];
			for (m = 0; m < b.length; m++) m == b.length - 1 ? c.push(e) : (d = e + " " + b[m + 1], f.measureText(d).width <= this.width - 3.5 ? e = d: (c.push(e), e = b[m + 1]));
			for (b = 0; b < c.length; b++) f.fillText(c[b], g + 5, h + (l + k + b) * (this.fontSize + this.fontSize / 2) + 2 * this.fontSize / 3);
			k += c.length - 1
		}
		f.globalCompositeOperation = "source-atop";
		f.strokeStyle = colorTo0x(this.config.borderColor);
		f.shadowColor = colorTo0x(this.config.borderColor);
		f.shadowBlur = 50;
		f.shadowOffsetX = 0;
		f.shadowOffsetY = 0;
		f.stroke()
	},
	initEvent: function() {
		var b = this;
		this.flag = 0;
		this.linkURL = this.form = this.form = null;
		if (null != b.config.action) {
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.callout.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.callout.bind("mouseover",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.callout.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.wl * bookConfig.largePageWidth;
		this.height = this.hl * bookConfig.largePageHeight;
		this.setPosition();
		this.resizeCallout(c);
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height())
	},
	setPosition: function() {
		this.x = this.cl * this.pw;
		this.y = this.ct * this.ph;
		this.callout.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
}),
initAText = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			textStr: null,
			fontName: null,
			fontSize: 12,
			color: null,
			tbold: "false",
			italic: "false",
			align: "left",
			action: null,
			repeat: "false",
			moveSpeed: 1,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.originWidth = bookConfig.largePageWidth;
		this.originHeight = bookConfig.largePageHeight;
		this.father = b;
		this.speed = 1 / this.config.moveSpeed * 12E3;
		this.width = this.config.width * this.originWidth;
		this.height = this.config.height * this.originHeight;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "text" + f;
		this.scrollid = "scroll" + this.id;
		this.text = this.config.textStr;
		this.color = colorTo0x(this.config.color);
		this.atext = $("<div id=" + this.id + " style='overflow: hidden;position:absolute;left:" + this.x + "px; top:" + this.y + "px;height:" + this.height + "px;width:" + this.width + "px;opacity:" + this.config.alpha + "'></div>");
		"false" != this.config.sh && this.atext.css({
			"box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-moz-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-webkit-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-ms-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-o-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr)
		});
		this.atext2 = $("<div id=" + this.scrollid + " style='word-break: break-word;font-family:" + this.config.fontName + ";width:100%;font-size:" + this.config.fontSize + "px;color:" + this.color + ";text-align:" + this.config.align + ";'>" + this.text + "</div>");
		"false" != this.config.tbold && this.atext2.css({
			"font-weight": "bold"
		});
		"false" != this.config.italic && this.atext2.css({
			"font-style": "italic"
		});
		this.father = b;
		this.initEvent();
		b.append(this.atext);
		this.atext.append(this.atext2);
		this.initScroll();
		this.onResize(d, e)
	},
	initScroll: function() {
		this._wrap = this.atext2;
		this.initScrollText()
	},
	initScrollText: function() {
		var b = this,
		c = b._wrap,
		d = c.height();
		c.animate({
			marginTop: -d + "px"
		},
		b.speed,
		function() {
			"true" == b.config.repeat ? (c.css("marginTop", b.height), b.initScrollText()) : c.css("marginTop", 0)
		})
	},
	initEvent: function() {
		var b = this;
		this.flag = 0;
		this.linkURL = "";
		if (null != b.config.action) {
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.atext.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.atext.bind(_event._move,
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.atext.bind(_event._end,
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.setPosition();
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height());
		this.fontSize = this.config.lineH * this.originHeight * 0.75;
		this.atext.css("font-size", this.fontSize + "px");
		this.atext2.css("font-size", this.fontSize + "px");
		this.resizeText(b)
	},
	resizeText: function(b) {
		b /= this.originWidth;
		this.atext.css({
			"-webkit-transform-origin": "0% 0%",
			"-moz-transform-origin": "0% 0%",
			"-ms-transform-origin": "0% 0%",
			"-o-transform-origin": "0% 0%",
			"transform-origin": "0% 0%",
			"-webkit-transform": "scale(" + b + ")",
			"-moz-transform": "scale(" + b + ")",
			"-ms-transform": "scale(" + b + ")",
			"-o-transform": "scale(" + b + ")",
			transform: "scale(" + b + ")"
		})
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.atext.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
}),
initFlashShow = Class({
	create: function(b, c, d, e) {
		this.pw = d;
		this.ph = e;
		this.config = $.extend({
			width: 0.2,
			height: 0.2,
			x: 0.2,
			y: 0.2,
			photo: null,
			repeatPlay: !0,
			customSize: !1
		},
		c);
		if (null != this.config.photo) {
			this.showingA = !0;
			this.showingIndex = 1;
			this.background = $("<div></div>");
			this.totalImage = this.config.photo.Image.length;
			for (c = 0; c < this.config.photo.Image.length; c++) ! 0 == isFlipPdf && (this.config.photo.Image[c] = "." + this.config.photo.Image[c]);
			this.moveTo = 1;
			this.width = this.pw * this.config.width;
			this.height = this.ph * this.config.height;
			this.background.css({
				width: this.width + "px",
				height: this.height + "px",
				left: this.config.x * this.pw + "px",
				top: this.config.y * this.ph + "px",
				position: "absolute",
				overflow: "hidden"
			});
			this.photoA = new animateImage(this.background, this.config.photo, this.width, this.height, this.config.repeatPlay, this.config.customSize, this.config.photo.width, this.config.photo.width);
			this.photoB = new animateImage(this.background, this.config.photo, this.width, this.height, this.config.repeatPlay, this.config.customSize, this.config.photo.width, this.config.photo.width);
			b.append(this.background);
			this.photoB.fillImage(2);
			this.photoA.fillImage(1);
			this.initChangeImageEvent(!0)
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.pw * this.config.width;
		this.height = this.ph * this.config.height;
		this.background.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.photoA.onResize(b, c);
		this.photoB.onResize(b, c);
		this.setPosition()
	},
	setPosition: function() {
		this.background.css({
			left: this.pw * this.config.x + "px",
			top: this.ph * this.config.y + "px"
		})
	},
	initChangeImageEvent: function(b) {
		var c = this,
		d = this.photoA.getImage(),
		e = this.photoB.getImage(),
		f,
		g;
		b || (d = this.photoB.getImage(), e = this.photoA.getImage());
		switch (this.moveTo) {
		case 1:
			f = g = 1;
			break;
		case 2:
			f = g = -1;
			break;
		case 3:
			g = 1;
			f = -1;
			break;
		case 4:
			g = -1,
			f = 1
		}
		this.moveTo = 4 == this.moveTo ? 1 : this.moveTo + 1;
		var h = d.position().left + 66 * g,
		k = d.position().top + 66 * f,
		l = d.position().left + 77 * g,
		m = d.position().top + 77 * f;
		d.animate({
			left: h,
			top: k
		},
		{
			queue: !1,
			duration: 3E3,
			complete: function() {
				c.showingIndex++;
				c.showingInde > c.totalImage && !c.config.repeatPlay || (c.showingIndex > c.totalImage && (c.showingIndex = 0), d.animate({
					opacity: 0,
					left: l,
					top: m
				},
				500,
				function() {
					b ? c.photoA.fillImage(c.showingIndex + 1) : c.photoB.fillImage(c.showingIndex + 1);
					d.css({
						"z-index": 0
					});
					e.css({
						"z-index": 1
					})
				}), c.initChangeImageEvent(!b))
			}
		}).animate({
			opacity: 1
		},
		500)
	}
}),
animateImage = Class({
	create: function(b, c, d, e, f, g, h, k) {
		this.img = $("<img />");
		this.imgIndex = -1;
		this.imageArr = c;
		this.bw = d;
		this.bh = e;
		this.repeat = f;
		b.append(this.img);
		this.img.css({
			position: "absolute"
		});
		g && void 0 != h && void 0 != k && this.img.css({
			width: h + "px",
			height: k + "px"
		})
	},
	fillImage: function(b) {
		if (this.imgIndex == b) this.img.css({
			left: (this.bw - this.img[0].width) / 2 + "px",
			top: (this.bh - this.img[0].height) / 2 + "px"
		});
		else if (! (b > this.imageArr.Image.length) || this.repeat) {
			b > this.imageArr.Image.length && (b = 1);
			this.imgIndex = b;
			var c = this;
			this.img.attr("src", c.getImageDiv(b));
			this.img.load(function() {
				c.img.css({
					left: (c.bw - this.width) / 2 + "px",
					top: (c.bh - this.height) / 2 + "px"
				})
			})
		}
	},
	getImageDiv: function(b) {
		return this.imageArr.Image[b - 1].photo
	},
	setZIndex: function(b) {
		this.img.css("z-index", b)
	},
	onResize: function(b, c) {
		this.bw = b;
		this.bh = c;
		this.img.css({
			left: (this.bw - this.img[0].width) / 2 + "px",
			top: (this.bh - this.img[0].height) / 2 + "px"
		})
	},
	setPosition: function(b, c) {
		this.img.css({
			left: b + "px",
			top: c + "px"
		})
	},
	animate: function() {},
	getImage: function() {
		return this.img
	}
}),
initSound = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 80,
			height: 30,
			x: 20,
			y: 20,
			src: null,
			alpha: 1,
			soundPlay: null,
			skinType: null
		},
		c);
		this.sound = null;
		null != this.config.src && (this.arr = null, this.arr = "undefined" != typeof this.config.src.path ? this.config.src.path: this.config.src[0].path, "./" == this.arr.substr(0, 2) && (this.arr = "." + arr), this.pw = d, this.ph = e, this.width = this.config.width * this.pw, this.height = this.config.height * this.ph, this.x = this.config.x * this.pw, this.y = this.config.y * this.ph, this.h1 = this.height / 6, this.h2 = this.height / 3, this.c = this.nflay = this.flay = 0, this.st = null, this.id = "AdvancedSound" + f, this.sounddiv = $("<div style='position:absolute; width:" + this.width + "px;height:" + this.height + "px;top:" + this.y + "px;left:" + this.x + "px;background:url(" + uiBaseURL + "audio.png);background-size:" + this.width + "px " + this.height + "px;background-repeat:no-repeat;'></div>"), this.sound = $("<audio id='" + this.id + "' src='" + this.arr + "'></audio>"), this.preimg = $("<img src='" + uiBaseURL + "Pre_down.png' style='position:absolute; left:10px;bottom:5px;cursor:pointer;' />"), this.playimg = $("<img src='" + uiBaseURL + "Play_down.png' style='position:absolute; left:50px;bottom:5px;cursor:pointer;'/>"), this.nextimg = $("<img src='" + uiBaseURL + "Nextpage_down.png' style='position:absolute; left:90px;bottom:5px;cursor:pointer;' />"), this.soundname = $("<div style='position:absolute; right:10px;top:" + this.h2 + "px;color:#389ac2;font-size:10px;'></div>"), this.soundtime = $("<div style='position:absolute; right:10px;top:" + this.h1 + "px;color:#389ac2;font-size:10px;'></div>"), b.append(this.sounddiv), this.sounddiv.append(this.sound), this.sounddiv.append(this.preimg), this.sounddiv.append(this.playimg), this.sounddiv.append(this.nextimg), this.sounddiv.append(this.soundname), this.sounddiv.append(this.soundtime), null != this.config.src && this.initEvent())
	},
	initEvent: function() {
		var b = this;
		b.nflay = 0;
		var c = b.playimg[0],
		d = b.sound[0],
		e = b.config.src[0].path,
		f = typeof b.config.src.path;
		"undefined" != f ? b.soundname.html(this.getname(b.config.src.path)) : b.soundname.html(this.getname(e));
		b.soundtime.html("00:00 / 00:00");
		this.playimg.bind(_event._down,
		function(e) {
			0 == b.flay ? (c.src = uiBaseURL + "Pause_down.png", d.play(), b.flay = 1, b.gettime(d.duration)) : (c.src = uiBaseURL + "Play_down.png", d.pause(), b.flay = 0, clearTimeout(b.st))
		});
		this.preimg.bind(_event._down,
		function(g) {
			d.pause();
			clearTimeout(b.st);
			"undefined" != f ? d.src = b.config.src.path: 0 < b.nflay && b.nflay < b.config.src.length ? (d.src = b.config.src[b.nflay - 1].path, b.soundname.html(b.getname(b.config.src[b.nflay].path)), b.nflay -= 1) : (d.src = e, b.soundname.html(b.getname(e)));
			d.play();
			c.src = uiBaseURL + "Pause_down.png";
			b.flay = 1;
			setTimeout(function() {
				b.c = 0;
				b.gettime(d.duration)
			},
			1E3)
		});
		this.nextimg.bind(_event._down,
		function(g) {
			d.pause();
			clearTimeout(b.st);
			"undefined" != f ? d.src = b.config.src.path: b.nflay < b.config.src.length ? (b.nflay += 1, d.src = b.config.src[b.nflay].path, b.soundname.html(b.getname(b.config.src[b.nflay].path)), b.nflay += 1) : (d.src = e, b.soundname.html(b.getname(e)), b.nflay = 0);
			d.play();
			c.src = uiBaseURL + "Pause_down.png";
			b.flay = 1;
			setTimeout(function() {
				b.c = 0;
				b.gettime(d.duration)
			},
			1E3)
		})
	},
	gettime: function(b) {
		var c = this,
		d = null,
		e = 0,
		f = null,
		d = c.c % 60,
		f = parseInt(b % 60),
		f = 10 > f ? "0" + f: f,
		g = parseInt(b / 60);
		c.c < b && (c.c += 1, 60 > c.c ? d = 10 > c.c ? "00:0" + c.c: "00:" + c.c: (e = parseInt(c.c / 60), d = 10 > e ? 10 > d ? "0" + e + ":0" + d: "0" + e + ":" + d: 10 > d ? e + ":0" + d: e + ":" + d), 10 > g ? c.soundtime.html(d + " / 0" + g + ":" + f) : c.soundtime.html(d + " / " + g + ":" + f), c.st = setTimeout(function() {
			c.gettime(b)
		},
		1E3))
	},
	getname: function(b) {
		var c = [],
		c = b.split("/");
		return c[c.length - 1].split(".")[0]
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.sounddiv.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sounddiv.css("background-size", this.width + "px " + this.height + "px");
		this.soundname.css("top", this.height / 3 + "px");
		this.soundtime.css("top", this.height / 6 + "px");
		this.setPosition()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.sounddiv.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
});
global.hddr.soo3 = bdor[51];
global.hddr.soc8 = hddr.sob8 + "ph";
var initEffText = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			textStr: null,
			fontName: null,
			fontSize: 12,
			color: null,
			tbold: "false",
			italic: "false",
			moveSpeed: 0,
			action: null,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.originWidth = bookConfig.largePageWidth;
		this.originHeight = bookConfig.largePageHeight;
		this.color = colorTo0x(this.config.color);
		"#0" == this.color && (this.color = "#000");
		this.father = b;
		this.speed = this.pos = 0;
		this.speed = "ChangeSpeed" == this.config.moveSpeed ? 250 : 50;
		this.width = this.config.width * this.originWidth;
		this.height = this.config.height * this.originHeight;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "efftext" + f;
		this.scrollid = "efftext" + this.id;
		this.fontSize = this.config.lineH * this.originHeight * 0.75;
		c = new TextFormatAnalyzer(this.config.textStr);
		this.config.textStr = c.getTextLines();
		this.config.fontSize = c.getFontSize();
		this.config.color = c.getFontColor();
		this.color = colorTo0x(this.config.color);
		this.efftext = "false" != this.config.sh ? $("<div id=" + this.id + " style='overflow: hidden;position:absolute;left:" + this.x + "px; top:" + this.y + "px;height:" + this.height + "px;width:" + this.width + "px;box-shadow:" + this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr) + ";opacity:" + this.config.alpha + "'></div>") : $("<div id=" + this.id + " style='overflow: hidden;position:absolute;left:" + this.x + "px; top:" + this.y + "px;height:" + this.height + "px;width:" + this.width + "px;opacity:" + this.config.alpha + "'></div>");
		this.efftext2 = $("<div id=" + this.scrollid + " style='word-break: break-word;font-family:" + this.config.fontName + ";width:" + this.width + "px;font-size:" + this.fontSize + "px;color:" + this.color + ";'></div>");
		"false" != this.config.tbold && this.efftext.css({
			"font-weight": "bold"
		});
		"false" != this.config.italic && this.efftext.css({
			"font-style": "italic"
		});
		this.father = b;
		this.initEvent();
		b.append(this.efftext);
		this.efftext.append(this.efftext2);
		this.initeffAmin();
		this.onResize(d, e)
	},
	initeffAmin: function() {
		var b = this,
		c, d = b.config.textStr;
		this.efftext2.html(d.substring(0, b.pos));
		b.pos++==d.length ? (b.pos = 0, clearTimeout(c)) : c = setTimeout(function() {
			b.initeffAmin()
		},
		b.speed)
	},
	initEvent: function() {
		var b = this;
		this.flag = 0;
		this.linkURL = null;
		if (null != b.config.action) {
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.efftext.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.efftext.bind("mouseover",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.efftext.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.setPosition();
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height());
		this.fontSize = this.config.lineH * this.originHeight * 0.75;
		this.resizeText(b)
	},
	resizeText: function(b) {
		b /= this.originWidth;
		this.efftext.css({
			"-webkit-transform-origin": "0% 0%",
			"-moz-transform-origin": "0% 0%",
			"-ms-transform-origin": "0% 0%",
			"-o-transform-origin": "0% 0%",
			"transform-origin": "0% 0%",
			"-webkit-transform": "scale(" + b + ")",
			"-moz-transform": "scale(" + b + ")",
			"-ms-transform": "scale(" + b + ")",
			"-o-transform": "scale(" + b + ")",
			transform: "scale(" + b + ")"
		})
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.efftext.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
});
bdor[7] = "m";
var initPngImage = Class({
	create: function(b, c, d, e) {
		this.config = $.extend({
			width: 0.2,
			height: 0.2,
			x: 0.2,
			y: 0.2,
			alpha: 1,
			src: null
		},
		c);
		this.img = $("<img>");
		if (null != this.config.src) { ! 0 == isFlipPdf && (this.config.src = "." + this.config.src);
			this.pw = d;
			this.ph = e;
			this.width = this.config.width * d;
			this.height = this.config.height * e;
			this.left = this.pw * this.config.x;
			this.top = this.ph * this.config.y;
			var f = this;
			this.img.load(function() {
				onImageLoad.apply(f, arguments)
			});
			this.img.css({
				position: "absolute",
				width: "0px",
				height: "0px",
				left: this.left + "px",
				top: this.top + "px",
				opacity: this.config.alpha
			});
			this.img.attr({
				src: this.config.src
			});
			b.append(this.img);
			this.father = b;
			this.initEvt()
		}
	},
	onImageLoad: function() {
		var b = this.img[0];
		this.imageWidth = b.naturalWidth;
		this.imageHeight = b.naturalHeight;
		this.fitImage()
	},
	fitImage: function() {
		var b = this.imageWidth / this.imageHeight,
		c, d, e;
		b > this.width / this.height ? (d = this.width, e = d / b, b = this.left, c = (this.height - e) / 2 + this.top) : (e = this.height, d = e * b, b = (this.width - d) / 2 + this.left, c = this.top);
		this.img.css({
			left: b + "px",
			top: c + "px",
			width: d + "px",
			height: e + "px"
		})
	},
	initEvt: function() {
		this.audios = this.slide = this.form = null;
		if (void 0 != this.config.action) {
			var b = this;
			this.flag = 0;
			this.linkURL = "";
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.img.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.img.bind("mouseover",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.img.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = b * this.config.width;
		this.height = c * this.config.height;
		this.left = this.pw * this.config.x;
		this.top = this.ph * this.config.y;
		this.fitImage();
		this.width > this.height ? this.img.css({
			height: this.height + "px",
			left: this.pw * this.config.x + "px",
			top: this.ph * this.config.y + "px"
		}) : this.img.css({
			width: this.width + "px",
			left: this.pw * this.config.x + "px",
			top: this.ph * this.config.y + "px"
		});
		this.setPosition(this.config.x * b, this.config.y * c);
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height())
	},
	setPosition: function(b, c) {
		this.img.css({
			left: b + "px",
			top: c + "px"
		})
	}
}),
initAminText = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			effectType: null,
			textStr: null,
			fontName: null,
			fontSize: 12,
			color: null,
			tbold: "false",
			italic: "false",
			align: "left",
			action: null,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.originWidth = bookConfig.largePageWidth;
		this.originHeight = bookConfig.largePageHeight;
		this.father = b;
		this.pos = 0;
		this.width = this.config.width * this.originWidth;
		this.height = this.config.height * this.originHeight;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "amintext" + f;
		this.scrollid = "animscroll" + this.id;
		c = new TextFormatAnalyzer(this.config.textStr);
		this.config.textStr = c.getTextLines();
		null == this.config.fontName && (e = c.getFontFamily().split(","), this.config.fontName = e[0], this.config.fontSize = c.getFontSize(), this.config.align = c.getAlign(), this.config.color = c.getFontColor(), this.color = colorTo0x(this.config.color));
		this.amintext = $("<div style='overflow: hidden;position:absolute;left:" + this.x + "px; top:" + this.y + "px;height:" + this.height + "px;width:" + this.width + "px;opacity:" + this.config.alpha + "'></div>");
		"false" != this.config.sh && this.amintext.css({
			"box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-moz-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-o-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-ms-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-webkit-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr)
		});
		this.amintext2 = $("<div style='word-break: break-word;font-family:" + this.config.fontName + ";width:100%;font-size:" + this.config.fontSize + "px;color:" + this.color + ";text-align:" + this.config.align + ";'></div>");
		"false" != this.config.tbold && this.amintext2.css({
			"font-weight": "bold"
		});
		"false" != this.config.italic && this.amintext2.css({
			"font-style": "italic"
		});
		this.father = b;
		this.initEvent();
		b.append(this.amintext);
		this.amintext.append(this.amintext2);
		switch (this.config.effectType) {
		case "Default":
			this.initAmin();
			break;
		case "Letter Spacing":
			this.litterText(this.config.textStr);
			break;
		case "Scale Word":
			this.amintext2.css("text-align", "center");
			b = Array(this.config.textStr);
			this.RightText(b[0], 0, this.amintext2, "PText2", "#365933", "#9daF33", 50, 0);
			break;
		case "Right To Left":
			this.amintext2.css("text-align", "center");
			b = Array(this.config.textStr);
			this.RightText(b[0], 0, this.amintext2, "PText2", "#365933", "#9daF33", 50, 0);
			break;
		case "Center To Edges":
			this.initAmin()
		}
		this.resizeText(d)
	},
	initAmin: function() {
		var b = this,
		c, d = b.config.textStr;
		b.pos < d.length ? this.amintext2.html(d.substr(0, b.pos) + "I") : this.amintext2.html(d);
		b.pos++==d.length ? (b.pos = 0, clearTimeout(c)) : c = setTimeout(function() {
			b.initAmin()
		},
		100)
	},
	RightText: function(b, c, d, e, f, g, h, k) {
		var l = this,
		m = tmp1 = "";
		if (c <= b.length) {
			if ("<" == b.charAt(c)) {
				for (;
				">" != b.charAt(c);) c++;
				c++
			}
			if ("&" == b.charAt(c) && " " != b.charAt(c + 1)) {
				for (;
				";" != b.charAt(c);) c++;
				c++
			}
			m = b.slice(0, c);
			tmp1 = b.charAt(c++);
			d.html("<span class=" + e + " style='text-align:center;'><font color='" + f + "'>" + m + "</font><font color='" + g + "'>" + tmp1 + "</font></span>");
			setTimeout(function() {
				l.RightText(b, c, d, e, f, g, h, k)
			},
			h)
		}
	},
	litterText: function(b) {
		for (var c = "",
		d = b.length,
		e = 0; e < d; e++) c += "<span id='" + (this.scrollid + "d" + e) + "' style='position: relative;left:0;top:0; display:none;top:-30px;'>" + b.charAt(e) + "</span>";
		idTObject.html(c);
		this.ScrollText(0, d - 1)
	},
	ScrollText: function(b, c) {
		var d = this,
		e = d.amintext2;
		e.css("display", "inline");
		e.animate({
			top: "0px"
		},
		50,
		function() {
			b < c && d.ScrollText(b + 1, c)
		})
	},
	initEvent: function() {
		var b = this;
		this.flag = 0;
		this.linkURL = null;
		if (null != b.config.action) {
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.amintext.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.amintext.bind("mouseover",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.amintext.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.setPosition();
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height());
		this.amintext.css("font-size", this.fontSize + "px");
		this.amintext2.css("font-size", this.fontSize + "px");
		this.resizeText(this.pw)
	},
	resizeText: function(b) {
		b /= this.originWidth;
		this.amintext.css({
			"-webkit-transform-origin": "0% 0%",
			"-moz-transform-origin": "0% 0%",
			"-ms-transform-origin": "0% 0%",
			"-o-transform-origin": "0% 0%",
			"transform-origin": "0% 0%",
			"-webkit-transform": "scale(" + b + ")",
			"-moz-transform": "scale(" + b + ")",
			"-ms-transform": "scale(" + b + ")",
			"-o-transform": "scale(" + b + ")",
			transform: "scale(" + b + ")"
		})
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.amintext.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
}),
initStarText = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			textStr: null,
			fontName: null,
			fontSize: 12,
			color: null,
			tbold: "false",
			italic: "false",
			align: "left",
			action: null,
			repeat: "false",
			moveSpeed: 1,
			sh: "false",
			sx: 4,
			sy: 4,
			se: 2,
			sr: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.originWidth = bookConfig.largePageWidth;
		this.originHeight = bookConfig.largePageHeight;
		this.father = b;
		this.speed = 1 / this.config.moveSpeed * 22E3;
		this.width = this.config.width * this.originWidth;
		this.height = this.config.height * this.originHeight;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "startext" + f;
		this.scrollid = "starwars" + this.id;
		this.textli = "";
		this.offset = 0;
		this.stepping = 0.2;
		c = new TextFormatAnalyzer(this.config.textStr);
		this.text = c.getTextLines().split("<br/>");
		null == this.config.fontName && (f = c.getFontFamily().split(","), this.config.fontName = f[0], this.config.fontSize = c.getFontSize(), this.config.align = c.getAlign(), this.config.color = c.getFontColor(), this.color = colorTo0x(this.config.color));
		for (c = 0; c < this.text.length; c++) this.textli = this.textli + "<li style='list-style-type:none;'>" + this.text[c] + "</li>";
		this.startext = $("<div style='overflow: hidden;position:absolute;left:" + this.x + "px; top:" + this.y + "px;height:" + this.height + "px;width:" + this.width + "px;opacity:" + this.config.alpha + "'></div>");
		"false" != this.config.sh && this.startext.css({
			"box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-moz-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-webkit-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-ms-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr),
			"-o-box-shadow": this.config.sx + "px " + this.config.sy + "px " + this.config.se + "px " + colorTo0x(this.config.sr)
		});
		this.startext2 = $("<div style='word-break: break-word;font-family:" + this.config.fontName + ";width:100%;font-size:" + this.config.fontSize + "px;color:" + this.color + ";text-align:" + this.config.align + ";'></div>");
		"false" != this.config.tbold && this.startext2.css({
			"font-weight": "bold"
		});
		"false" != this.config.italic && this.startext2.css({
			"font-style": "italic"
		});
		this.father = b;
		this.initEvent();
		b.append(this.startext);
		this.startext.append(this.startext2);
		this.startext2.append(this.textli);
		this.initScroll();
		this.onResize(d, e)
	},
	initScroll: function() {
		this._wrap = this.startext2;
		var b = this.text.length;
		this._wrap.height();
		for (var c = b; 0 <= c; c--) $(b[c]).css("fontSize", this.config.fontSize - this.offset + "px"),
		this.offset += this.stepping;
		this._wrap.css("marginTop", this.height);
		this.initScrollText()
	},
	initScrollText: function() {
		var b = this,
		c = b._wrap,
		d = b.tid,
		e = c.height();
		c.animate({
			marginTop: -e + "px"
		},
		b.speed,
		function() {
			if ("true" == b.config.repeat) {
				for (var e = d; 0 <= e; e--) $(d[e]).css("fontSize", b.config.fontSize - b.offset + "pt"),
				b.offset += b.stepping;
				c.css("marginTop", b.height);
				b.offset = 0;
				b.stepping = 0.2;
				b.initScrollText()
			} else c.css("marginTop", 0)
		})
	},
	initEvent: function() {
		var b = this;
		this.flag = 0;
		this.linkURL = null;
		if (null != b.config.action) {
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.startext.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.startext.bind("mouseover",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.startext.bind(isTouch ? _event._end: "mouseout",
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.setPosition();
		if (null != this.form) this.form.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.slide) this.slide.onResize(bookContainer.width(), bookContainer.height());
		if (null != this.audios) this.audios.onResize(bookContainer.width(), bookContainer.height());
		this.fontSize = this.config.lineH * this.originHeight * 0.75;
		this.startext.css("font-size", this.fontSize + "px");
		this.startext2.css("font-size", this.fontSize + "px");
		this.resizeText(b)
	},
	resizeText: function(b) {
		b /= this.originWidth;
		this.startext.css({
			"-webkit-transform-origin": "0% 0%",
			"-moz-transform-origin": "0% 0%",
			"-ms-transform-origin": "0% 0%",
			"-o-transform-origin": "0% 0%",
			"transform-origin": "0% 0%",
			"-webkit-transform": "scale(" + b + ")",
			"-moz-transform": "scale(" + b + ")",
			"-ms-transform": "scale(" + b + ")",
			"-o-transform": "scale(" + b + ")",
			transform: "scale(" + b + ")"
		})
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.startext.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
}),
initBanner = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			action: null,
			banners: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.father = b;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.a = this.config.banners.banner;
		this.id = "banner" + f;
		this.image = null;
		if ("string" == typeof this.a.imageUrl) c = this.a.imageUrl,
		!0 == isFlipPdf && (c = "." + c),
		this.image = "<li><img src='" + c + "' /></li>";
		else for (d = 0; d < this.a.length; d++) c = this.a[d].imageUrl,
		!0 == isFlipPdf && (c = "." + c),
		this.image = null != this.image ? this.image + "<li><img src='" + c + "' /></li>": "<li><img src='" + c + "' /></li>";
		this.banner = $("<div style='left:" + this.x + "px;top:" + this.y + "px;'></div>");
		this.bannerul = $("<ul></ul>");
		this.bannerli = $(this.image);
		b.append(this.banner);
		this.banner.append(this.bannerul);
		this.bannerul.append(this.bannerli);
		this.imageamin();
		this.father = b;
		this.initEvent()
	},
	imageamin: function() {
		this.banner.jFlip(this.width, this.height, {
			background: "white",
			cornersTop: !1,
			scale: "fill"
		},
		this.x, this.y)
	},
	initEvent: function() {
		var b = this;
		this.flag = 0;
		this.linkURL = "";
		if (null != b.config.action) {
			try {
				void 0 != this.config.action.length && (this.config.action = this.config.action[0]),
				this.linkURL = this.config.action.url
			} catch(c) {}
			var d;
			null != this.linkURL && "www" == this.linkURL.substr(0, 3).toLowerCase() && (this.linkURL = "http://" + this.linkURL);
			try {
				d = this.config.action.triggerEventType
			} catch(e) {
				d = null
			}
			this.banner.bind(_event._down,
			function(c) {
				d == PageEditor.TriggerEventType.MouseDown && actionEvent.bind(b)($(this));
				3 == browserType ? event.cancelBubble = !0 : event.stopPropagation()
			});
			this.banner.bind(_event._move,
			function(c) {
				d == PageEditor.TriggerEventType.MouseOver && actionEvent.bind(b)($(this))
			});
			this.banner.bind(_event._end,
			function(c) {
				d == PageEditor.TriggerEventType.MouseOut && actionEvent.bind(b)($(this))
			})
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		$(".bannerdiv canvas").css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.setPosition()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		$(".bannerdiv").css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
}),
initPrint = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 0.2,
			height: 0.2,
			x: 0.2,
			y: 0.2,
			alpha: 1,
			src: null
		},
		c);
		this.background = $("<div style = 'z-index:100;'></div>");
		this.overArea = $("<div></div>");
		this.img = $("<div></div>");
		this.imageIndex = f;
		this.pw = d;
		this.ph = e;
		this.width = this.config.width * d;
		this.height = this.config.height * e;
		c = this.config.borderWidth + "px solid " + colorTo0x(this.config.borderColor);
		this.background.css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px",
			left: this.pw * this.config.x + "px",
			top: this.ph * this.config.y + "px",
			opacity: this.config.alpha,
			"z-index": "101",
			border: c
		});
		this.backcolor = colorTo0x(this.config.overColor);
		this.overArea.css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px",
			left: "0px",
			top: "0px",
			opacity: this.config.overAlpha,
			background: this.backcolor,
			"z-index": "101"
		});
		this.img.css({
			position: "absolute",
			right: "10px",
			top: "10px",
			"z-index": "102"
		});
		b.append(this.background);
		this.background.append(this.overArea);
		this.overArea.append(this.img);
		this.image = $("<img src = '" + uiBaseURL + "print_icon.png'>");
		this.img.append(this.image);
		this.printArea = $("<canvas></canvas>");
		this.printw = this.config.width * bookConfig.largePageWidth;
		this.printh = this.config.height * bookConfig.largePageHeight;
		this.printArea.css({
			left: 0,
			top: -windowHeight + "px",
			width: this.printw + "px",
			height: this.printh + "px",
			position: "absolute"
		});
		this.printImageA = $("<div></div>");
		this.father = b;
		this.initEvt();
		this.overArea.hide()
	},
	initEvt: function() {
		this.audios = this.slide = this.form = null;
		var b = this;
		this.background.mouseEnterZoom();
		this.background.bind(_event._enter,
		function(c) {
			b.overArea.show()
		});
		this.background.bind(_event._down,
		function(c) {
			b.overArea.show()
		});
		this.background.bind(_event._end,
		function(c) {
			b.overArea.hide()
		});
		this.background.bind(_event._leave,
		function(c) {
			b.overArea.hide()
		});
		this.img.bind("mouseover",
		function(c) {
			b.img.css({
				cursor: "pointer"
			})
		});
		this.image.bind(_event._enter,
		function(c) {
			b.img.css({
				background: colorDiv(b.backcolor, 30)
			})
		});
		this.image.bind(_event._down,
		function(c) {
			b.img.css({
				background: colorDiv(b.backcolor, 30)
			});
			return ! 1
		});
		this.image.bind(_event._end,
		function(c) {
			b.img.css({
				background: ""
			})
		});
		this.image.bind(_event._leave,
		function(c) {
			b.img.css({
				background: ""
			})
		});
		this.image.bind(_event._end,
		function(c) {
			sendvisitinfo(5, getShownPageString());
			if (browserType == BrowserType.MS && isBelowIE10Browser()) alert("Your browser is not support PrintArea.");
			else {
				b.printImageA.empty();
				b.printArea.empty();
				var d = b.printArea[0].getContext("2d");
				c = b.printArea.width();
				var e = b.printArea.height(),
				f = b.printArea[0].getContext("2d");
				d.canvas.width = c;
				d.canvas.height = e;
				f.canvas.width = c;
				f.canvas.height = e;
				var g = new Image;
				g.src = bookConfig.largePath + b.imageIndex + ".jpg";
				var h = new Image;
				$(g).load(function() {
					f.drawImage(g, -b.config.x * bookConfig.largePageWidth, -b.config.y * bookConfig.largePageHeight);
					d.drawImage(f.canvas, 0, 0);
					h.src = $(b.printArea)[0].toDataURL("image/png");
					$(h).load(function() {
						b.printImageA.printArea()
					})
				});
				b.printImageA.append(h);
				return ! 1
			}
		})
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = b * this.config.width;
		this.height = c * this.config.height;
		this.setPosition(this.config.x * b, this.config.y * c);
		this.background.css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px",
			left: this.pw * this.config.x + "px",
			top: this.ph * this.config.y + "px"
		});
		this.overArea.css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px",
			left: "0px",
			top: "0px"
		});
		this.img.css({
			position: "absolute",
			right: "10px",
			top: "10px"
		});
		this.background.mouseEnterZoom()
	},
	setPosition: function(b, c) {}
});
global.hddr.soo1 = "tm";
var initAlphaTransitionBanner = Class({
	create: function(b, c, d, e) {
		function f() {
			g.timer0 = setInterval(function() {
				if (0 < g.alpha) {
					g.alpha -= 1;
					$(g.currentImageHolder).css({
						opacity: g.alpha / 100
					});
					var b = 0,
					b = 0 < g.currentImage ? (g.currentImage - 1) % g.images.length: g.images.length - 1;
					g.imgTitle.html(g.photos[b].imageName)
				} else clearInterval(g.timer0),
				g.currentImageHolder == g.image0Holder ? ($(g.image0Holder).css({
					"z-index": "207"
				}), $(g.image1Holder).css({
					"z-index": "208"
				}), g.alpha = 100, $(g.currentImageHolder).css({
					opacity: g.alpha / 100
				}), g.currentImageHolder = g.image1Holder, g.image0Holder.empty().append(g.images[g.currentImage])) : ($(g.image0Holder).css({
					"z-index": "208"
				}), $(g.image1Holder).css({
					"z-index": "207"
				}), g.alpha = 100, $(g.currentImageHolder).css({
					opacity: g.alpha / 100
				}), g.currentImageHolder = g.image0Holder, g.image1Holder.empty().append(g.images[g.currentImage])),
				g.currentImage = (g.currentImage + 1) % g.images.length,
				g.timer1 = setTimeout(f, g.interval)
			},
			20)
		}
		this.config = $.extend({
			width: 0.2,
			height: 0.2,
			x: 0.2,
			y: 0.2,
			alpha: 1,
			src: null
		},
		c);
		this.photos = $.extend([], c.images);
		if (! (1 > this.photos.length)) {
			this.father = b;
			this.pw = d;
			this.ph = e;
			this.imgIndex = -1;
			this.imgWidth = this.config.width * d;
			this.imgHeight = this.config.height * e;
			this.boxWidth = this.imgWidth - 8;
			this.boxHeight = this.imgHeight - 8;
			this.x = this.config.x * this.pw;
			this.y = this.config.y * this.ph;
			this.interval = 3E3;
			this.fadeTime = 10;
			this.alpha = 100;
			this.images = [];
			this.background = $("<div></div>");
			this.background.css({
				"z-index": "199",
				border: "1px solid #333333"
			});
			this.background.css({
				width: this.imgWidth,
				height: this.imgHeight
			});
			this.slideShowBG = new grayBackground(this.background, "#ffffff", 1, this.imgWidth, this.imgHeight);
			this.toolBar = $("<div></div>");
			this.toolBar.css({
				width: this.boxWidth,
				height: "35px",
				position: "relative"
			});
			this.toolBar.css({
				"z-index": "209"
			});
			this.toolBG = new grayBackground(this.toolBar, "#000000", 0.3, this.boxWidth, 35);
			this.toolBG.setZindex("210");
			this.toolBG.setPosition(0, 0);
			this.imgTitle = $("<div></div>");
			this.imgTitle.css({
				overflow: "hidden",
				width: this.boxWidth - 20 + "px",
				height: "20px",
				position: "absolute",
				"z-index": "211",
				background: "",
				left: "10px",
				top: "7px",
				color: "#ffffff"
			});
			this.image0Holder = $("<div></div>");
			this.image1Holder = $("<div></div>");
			this.img = $("<img style='position : absolute;' />");
			this.leftButton = new button(this.toolBar, {
				buttonType: 1,
				iconURL: uiBaseURL + "previous_down.png"
			});
			this.rightButton = new button(this.toolBar, {
				buttonType: 1,
				iconURL: uiBaseURL + "next_down.png"
			});
			b.append(this.background);
			this.background.append(this.image1Holder);
			this.background.append(this.image0Holder);
			this.background.append(this.toolBar);
			this.toolBar.css({
				left: (this.imgWidth - this.boxWidth) / 2 + "px",
				top: (this.imgHeight - this.boxHeight) / 2 + "px"
			});
			this.toolBar.append(this.imgTitle);
			this.rightButton.setCSS({
				"z-index": 212,
				right: "0px",
				top: "13px"
			});
			this.leftButton.setCSS({
				"z-index": 212,
				right: "20px",
				top: "13px"
			});
			this.background.css({
				left: this.x + "px",
				top: this.y + "px",
				position: "absolute",
				"-webkit-box-shadow": "0 0 10px rgba(40, 40, 40, 0.7)",
				"-moz-box-shadow": "0 0 10px rgba(40, 40, 40, 0.7)",
				"-ms-box-shadow": "0 0 10px rgba(40, 40, 40, 0.7)",
				"-o-box-shadow": "0 0 10px rgba(40, 40, 40, 0.7)",
				"box-shadow": "0 0 10px rgba(40, 40, 40, 0.7)"
			});
			this.image0Holder.css({
				width: this.boxWidth + "px",
				height: this.boxHeight + "px",
				left: (this.imgWidth - this.boxWidth) / 2 + "px",
				top: (this.imgHeight - this.boxHeight) / 2 + "px",
				position: "absolute",
				"z-index": 202
			});
			this.image1Holder.css({
				width: this.boxWidth + "px",
				height: this.boxHeight + "px",
				left: (this.imgWidth - this.boxWidth) / 2 + "px",
				top: (this.imgHeight - this.boxHeight) / 2 + "px",
				position: "absolute",
				"z-index": 202
			});
			this.addItem();
			var g = this;
			this.leftButton.onMouseDown(this, this.prePage);
			this.rightButton.onMouseDown(this, this.nextPage);
			this.currentImageHolder = this.image0Holder;
			this.currentImage = 2 % this.images.length;
			this.image0Holder.append(this.images[0]);
			this.image1Holder.append(this.images[1]);
			this.imgTitle.html(this.photos[0].imageName);
			g = this;
			this.timer1 = setTimeout(f, this.interval);
			this.toolBar.show();
			this.leftButton.remove();
			this.rightButton.remove()
		}
	},
	nextPage: function() {
		clearInterval(this.timer0);
		var b = 0,
		b = 0 < this.currentImage ? (this.currentImage - 1) % this.images.length: this.images.length - 1;
		this.imgTitle.html(this.photos[b].imageName);
		this.currentImageHolder == this.image0Holder ? ($(this.image0Holder).css({
			"z-index": "207"
		}), $(this.image1Holder).css({
			"z-index": "208"
		}), this.alpha = 100, $(this.currentImageHolder).css({
			opacity: this.alpha / 100
		}), this.currentImageHolder = this.image1Holder, this.image0Holder.empty().append(this.images[this.currentImage])) : ($(this.image0Holder).css({
			"z-index": "208"
		}), $(this.image1Holder).css({
			"z-index": "207"
		}), this.alpha = 100, $(this.currentImageHolder).css({
			opacity: this.alpha / 100
		}), this.currentImageHolder = this.image0Holder, this.image1Holder.empty().append(this.images[this.currentImage]));
		this.currentImage = (this.currentImage + 1) % this.images.length
	},
	prePage: function() {
		var b = 0,
		b = 2 < this.currentImage ? (this.currentImage - 3) % this.images.length: 1 == this.currentImage ? this.images.length - 2 : this.images.length - 3;
		this.imgTitle.html(this.photos[b].imageName);
		this.currentImageHolder == this.image0Holder ? ($(this.image0Holder).css({
			"z-index": "207"
		}), $(this.image1Holder).css({
			"z-index": "208"
		}), this.alpha = 100, $(this.currentImageHolder).css({
			opacity: this.alpha / 100
		}), this.currentImageHolder = this.image1Holder, this.image1Holder.empty().append(this.images[b])) : ($(this.image0Holder).css({
			"z-index": "208"
		}), $(this.image1Holder).css({
			"z-index": "207"
		}), this.alpha = 100, $(this.currentImageHolder).css({
			opacity: this.alpha / 100
		}), this.currentImageHolder = this.image0Holder, this.image0Holder.empty().append(this.images[this.index]));
		this.currentImage = (this.currentImage - 1) % this.images.length
	},
	addItem: function() {
		for (var b = 0; b < this.photos.length; b++) {
			var c = $("<div></div>");
			c.css({
				width: this.boxWidth + "px",
				height: this.boxHeight + "px"
			});
			image = $("<img style='position : absolute;' />");
			image.remove();
			var d = this.photos[b].url; ! 0 == isFlipPdf && (d = "." + d);
			image.attr("src", d);
			image.css({
				width: this.boxWidth + "px",
				height: this.boxHeight + "px"
			});
			c.append(image);
			this.images[b] = c
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.imgWidth = this.config.width * this.pw;
		this.imgHeight = this.config.height * this.ph;
		this.boxWidth = this.imgWidth - 8;
		this.boxHeight = this.imgHeight - 8;
		this.background.css({
			width: this.imgWidth,
			height: this.imgHeight
		});
		this.toolBar.css({
			width: this.boxWidth,
			height: "35px"
		});
		this.toolBG.onResize(this.boxWidth, 35);
		this.toolBG.setPosition(0, 0);
		this.imgTitle.css({
			width: this.boxWidth - 20 + "px",
			height: "20px",
			left: "10px",
			top: "7px"
		});
		this.slideShowBG.onResize(this.imgWidth, this.imgHeight);
		for (var d = 0; d < this.images.length; d++) this.images[d].children().css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px"
		});
		this.setPosition()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.background.css({
			left: this.x + "px",
			top: this.y + "px",
			position: "absolute"
		});
		this.image0Holder.css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: (this.imgWidth - this.boxWidth) / 2 + "px",
			top: (this.imgHeight - this.boxHeight) / 2 + "px",
			position: "absolute"
		});
		this.image1Holder.css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: (this.imgWidth - this.boxWidth) / 2 + "px",
			top: (this.imgHeight - this.boxHeight) / 2 + "px",
			position: "absolute"
		})
	},
	changeImage: function(b) {
		this.imgIndex = b;
		this.img.remove();
		b = this.photos[b].url; ! 0 == isFlipPdf && (b = "." + b);
		var c = this;
		this.img.attr("src", b);
		this.img.load(function() {
			var b = c.boxWidth,
			e = c.boxHeight;
			c.img.css({
				width: b + "px",
				height: e + "px"
			});
			c.boxWidth != b || c.boxHeight != e ? c.image0Holder.animate({
				width: b + 8,
				height: e + 8,
				left: (c.pw - b) / 2,
				top: (c.ph - e) / 2
			},
			300,
			function() {
				c.image0Holder.append(c.img)
			}) : (c.image0Holder.append(c.img), c.image1Holder.append(c.img))
		})
	},
	setImagePosition: function() {},
	show: function() {},
	hide: function() {}
});
global.hddr.soa8 = hddr.soa7 + "i";
global.hddr.sov9 = function(b, c) {
	return b + "ph" + c + "l"
};
var initCarousel = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			images: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.father = b;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "carousel" + f;
		if (this.config.images != {}) {
			if ((this.images = this.config.images.node) && this.images.length) for (b = 0; b < this.images.length; b++)"./" == this.images[b].url.substr(0, 2) && (this.images[b].url = "." + this.images[b].url);
			this.content = $("<div></div>");
			this.content.css({
				position: "absolute",
				left: this.x + "px",
				top: this.y + "px",
				width: this.width + "px",
				height: this.height + "px",
				border: "0px solid red"
			});
			this.currentIndex = 0;
			this.father.append(this.content);
			this.initImages();
			this.startMove()
		}
	},
	initImages: function() {
		if (void 0 != this.images && null != this.images && 0 != this.images.length) {
			this.refreshImageAndPosition();
			this.carouselList = new CarouselImageList;
			this.carouselList.setResources(this.aImages);
			this.carouselList.setPositions(this.aPositions);
			for (var b = 0; b < this.aPositions.length; b++) {
				var c = new CarouselImage(this.content, this.aPositions[b]);
				this.carouselList.addInstance(c)
			}
			this.carouselList.loadResources();
			this.carouselList.blurAll()
		}
	},
	refreshImageAndPosition: function() {
		if (void 0 != this.images && null != this.images && 0 != this.images.length) {
			var b = this.width / 5;
			this.aImages = [];
			this.aPositions = [];
			var c = 5;
			5 > this.images.length && (c = Math.min(this.images.length, 3));
			switch (c) {
			case 1:
				this.aImages.push(this.images[0].url);
				this.aPositions.push(new CarouselPosition(0, 0, this.width, this.height, 1));
				break;
			case 2:
				this.aImages.push(this.images[0].url);
				this.aImages.push(this.images[(this.currentIndex + 1) % this.images.length].url);
				c = Math.ceil((this.width - b) / 2);
				this.aPositions.push(new CarouselPosition(c, 0, b, b, 2));
				c = Math.ceil((this.width - 3 * b + 5) / 2) + (2 * b - 5);
				this.aPositions.push(new CarouselPosition(c, 5, b - 5, b - 5, 1));
				break;
			case 3:
				this.aImages.push(this.images[(this.currentIndex - 1 + this.images.length) % this.images.length].url);
				this.aImages.push(this.images[this.currentIndex % this.images.length].url);
				this.aImages.push(this.images[(this.currentIndex + 1) % this.images.length].url);
				c = Math.ceil((this.width - 3 * b + 10) / 2);
				this.aPositions.push(new CarouselPosition(c, 5, b - 5, b - 5, 0));
				c = Math.ceil((this.width - b) / 2);
				this.aPositions.push(new CarouselPosition(c, 0, b, b, 2));
				c = Math.ceil((this.width - 3 * b + 10) / 2) + (2 * b - 5);
				this.aPositions.push(new CarouselPosition(c, 5, b - 5, b - 5, 1));
				break;
			case 5:
				this.aImages.push(this.images[(this.currentIndex - 2 + this.images.length) % this.images.length].url),
				this.aImages.push(this.images[(this.currentIndex - 1 + this.images.length) % this.images.length].url),
				this.aImages.push(this.images[this.currentIndex % this.images.length].url),
				this.aImages.push(this.images[(this.currentIndex + 1) % this.images.length].url),
				this.aImages.push(this.images[(this.currentIndex + 2) % this.images.length].url),
				c = Math.ceil((this.width - 5 * b + 20) / 2),
				this.aPositions.push(new CarouselPosition(c, 5, 2 * b - 5, 2 * b - 5, 0)),
				c = Math.ceil((this.width - 3 * b + 10) / 2),
				this.aPositions.push(new CarouselPosition(c, 5, 2 * b - 5, 2 * b - 5, 2)),
				c = Math.ceil((this.width - 2 * b) / 2),
				this.aPositions.push(new CarouselPosition(c, 0, 3 * b, 3 * b, 3)),
				c = Math.ceil((this.width - 3 * b + 10) / 2) + (2 * b - 5),
				this.aPositions.push(new CarouselPosition(c, 5, 2 * b - 5, 2 * b - 5, 2)),
				c = Math.ceil((this.width - 5 * b + 20) / 2) + (4 * b - 15),
				this.aPositions.push(new CarouselPosition(c, 5, 2 * b - 5, 2 * b - 5, 1))
			}
		}
	},
	startMove: function() {
		var b = this;
		this.timer = window.setInterval(function() {
			b.move(1)
		},
		2E3)
	},
	stopMove: function() {
		window.clearInterval(this.timer)
	},
	move: function(b) {
		this.currentIndex += b;
		0 > this.currentIndex && (this.currentIndex += this.images.length);
		this.currentIndex %= this.images.length;
		var c = [];
		switch (this.carouselList.instanceCount()) {
		case 1:
			c.push(this.images[0].url);
			break;
		case 2:
			c.push(this.images[this.currentIndex % this.images.length].url);
			c.push(this.images[(this.currentIndex + 1) % this.images.length].url);
			break;
		case 3:
			c.push(this.images[(this.currentIndex - 1 + this.images.length) % this.images.length].url);
			c.push(this.images[this.currentIndex % this.images.length].url);
			c.push(this.images[(this.currentIndex + 1) % this.images.length].url);
			break;
		case 5:
			c.push(this.images[(this.currentIndex - 2 + this.images.length) % this.images.length].url),
			c.push(this.images[(this.currentIndex - 1 + this.images.length) % this.images.length].url),
			c.push(this.images[this.currentIndex % this.images.length].url),
			c.push(this.images[(this.currentIndex + 1) % this.images.length].url),
			c.push(this.images[(this.currentIndex + 2) % this.images.length].url)
		}
		this.carouselList.setResources(c);
		this.carouselList.move(b)
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.content.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.setPosition();
		this.refreshImageAndPosition();
		this.carouselList.setResources(this.aImages);
		this.carouselList.setPositions(this.aPositions);
		this.carouselList.resizeAll()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.content.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
}),
CarouselImage = Class({
	create: function(b, c) {
		this.father = b;
		this.instance = $('<img style="position:absolute"/>');
		this.father.append(this.instance);
		this.imageHeight = this.imageWidth = 0;
		var d = this;
		this.instance.load(function() {
			CarouselImage.prototype.onImageLoad.apply(d, arguments)
		});
		this.setArea(c.left, c.top, c.width, c.height);
		this.setZindex(c.zindex)
	},
	blur: function(b) { ! 0 == b ? this.instance.css({
			"-webkit-filter": "blur(2px)",
			"-moz-filter": "blur(2px)",
			"-o-filter": "blur(2px)",
			"-ms-filter": "blur(2px)",
			filter: "blur(2px)"
		}) : this.instance.css({
			"-webkit-filter": "blur(0px)",
			"-moz-filter": "blur(0px)",
			"-o-filter": "blur(0px)",
			"-ms-filter": "blur(0px)",
			filter: "blur(0px)"
		})
	},
	setSrc: function(b) {
		this.instance[0].src = b
	},
	getSrc: function() {
		return this.instance[0].src
	},
	onImageLoad: function() {
		var b = this.instance[0];
		this.imageWidth = b.naturalWidth;
		this.imageHeight = b.naturalHeight;
		b = Math.ceil(this.imageHeight * this.instance.width() / this.imageWidth);
		this.instance.css({
			height: b + "px"
		})
	},
	move: function(b, c) {
		this.instance.css({
			left: b + "px",
			top: c + "px"
		})
	},
	resize: function(b, c) {
		var d = c;
		0 < this.imageWidth && 0 < this.imageHeight && (d = Math.ceil(this.imageHeight * this.instance.width() / this.imageWidth));
		this.instance.css({
			width: b + "px",
			height: d + "px"
		})
	},
	setArea: function(b, c, d, e) {
		this.move(b, c);
		this.resize(d, e)
	},
	setZindex: function(b) {
		this.instance.css({
			"z-index": b
		})
	},
	gotoPosition: function(b) {
		var c = b.height;
		0 < this.imageWidth && 0 < this.imageHeight && (c = Math.ceil(this.imageHeight * b.width / this.imageWidth));
		var d = this;
		this.instance.animate({
			left: b.left,
			top: b.top,
			width: b.width,
			height: c
		},
		500,
		function() {
			d.setZindex(b.zindex)
		})
	}
}),
CarouselPosition = Class({
	create: function(b, c, d, e, f) {
		this.left = Math.ceil(b);
		this.top = Math.ceil(c);
		this.width = Math.ceil(d);
		this.height = Math.ceil(e);
		this.zindex = f
	},
	asString: function() {
		return "left:" + this.left + ",top:" + this.top + ",width:" + this.width + ",height:" + this.height + ",z-index:" + this.zindex
	}
}),
CarouselImageList = Class({
	create: function() {
		this.imageResources = [];
		this.imagePositions = [];
		this.imageInstances = []
	},
	setResources: function(b) {
		for (; 0 < this.imageResources.length;) this.imageResources.pop();
		for (var c = 0; c < b.length; c++) this.imageResources.push(b[c])
	},
	setPositions: function(b) {
		for (; 0 < this.imagePositions.length;) this.imagePositions.pop();
		for (var c = 0; c < b.length; c++) this.imagePositions.push(b[c])
	},
	addInstance: function(b) {
		this.imageInstances.push(b)
	},
	instanceCount: function() {
		return this.imageInstances.length
	},
	loadResources: function() {
		for (var b = this.imageInstances.length,
		c = 0; c < b; c++) {
			var d = this.imageInstances[c];
			d.getSrc() != this.imageResources[c] && d.setSrc(this.imageResources[c])
		}
	},
	move: function(b) {
		var c = this.imageInstances.length;
		if (0 != c) {
			for (var d = this.imageInstances[0], e = 0; e < c; e++) {
				var f = e + b;
				0 > f && (f += c);
				f >= c && (f %= c);
				var g = this.imageInstances[f];
				this.imageInstances[e] = 0 == f ? d: g
			}
			for (e = 0; e < c; e++) this.imageInstances[e].gotoPosition(this.imagePositions[e]);
			this.loadResources();
			this.blurAll()
		}
	},
	resizeAll: function() {
		var b = this.imageInstances.length;
		if (0 != b) for (var c = 0; c < b; c++) this.imageInstances[c].gotoPosition(this.imagePositions[c])
	},
	blurAll: function() {
		for (var b = this.imageInstances.length,
		c = Math.floor((b + 1) / 2) - 1, d = 0; d < b; d++) {
			var e = this.imageInstances[d];
			d != c ? e.blur(!0) : e.blur(!1)
		}
	}
});
global.hddr.sob8 = hddr.soa8;
global.hddr.soq2 = hddr.sov9(hddr.soa8, hddr.soq3) + "5";
var initDynamicShow = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			alpha: 1,
			images: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.father = b;
		this.width = this.config.width * this.pw;
		this.childWidth = Math.ceil(this.width / 4);
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.borderWidth = this.config.borderWidth;
		this.id = "dynshow" + f;
		if (this.config.images != {}) {
			if ((this.images = this.config.images.Image) && this.images.length) for (b = 0; b < this.images.length; b++)"./" == this.images[b].Image.substr(0, 2) && (this.images[b].Image = "." + this.images[b].Image);
			this.maxZindex = this.images.length + 1;
			this.content = $("<div></div>");
			this.content.css({
				position: "absolute",
				left: this.x + "px",
				top: this.y + "px",
				width: this.width + "px",
				height: this.height + "px",
				border: "0px solid red"
			});
			this.currentIndex = 0;
			this.father.append(this.content);
			this.init()
		}
	},
	init: function() {
		this.imageInstances = [];
		if (0 != this.images.length) {
			for (var b = 0; b < this.images.length; b++) {
				var c = new ImageInstance(this, b);
				c.setImage(this.images[b].Image);
				this.content.append(c);
				this.imageInstances.push(c)
			}
			this.currentIndex = -1;
			this.initButtons()
		}
	},
	initButtons: function() {
		this.leftButton = $('<img src="' + uiBaseURL + 'pre_image.png" style="position:absolute;z-index:1000"></img>');
		this.rightButton = $('<img src="' + uiBaseURL + 'next_image.png" style="position:absolute;z-index:1000"></img>');
		this.setButtonPosition();
		var b = this;
		this.leftButton.bind(_event._click,
		function() {
			initDynamicShow.prototype.preImage.apply(b, arguments)
		});
		this.rightButton.bind(_event._click,
		function() {
			initDynamicShow.prototype.nextImage.apply(b, arguments)
		});
		isTouchDevice() || (this.leftButton.css({
			display: "none"
		}), this.rightButton.css({
			display: "none"
		}));
		this.content.append(this.leftButton);
		this.content.append(this.rightButton);
		this.content.bind(_event._enter,
		function() {
			b.leftButton.css({
				display: "block"
			});
			b.rightButton.css({
				display: "block"
			})
		});
		this.content.bind(_event._leave,
		function() {
			b.leftButton.css({
				display: "none"
			});
			b.rightButton.css({
				display: "none"
			})
		})
	},
	preImage: function() { - 1 != this.currentIndex && this.imageInstances[this.currentIndex].hide();
		this.currentIndex = (this.currentIndex - 1 + this.images.length) % this.images.length;
		this.imageInstances[this.currentIndex].show()
	},
	nextImage: function() { - 1 != this.currentIndex && this.imageInstances[this.currentIndex].hide();
		this.currentIndex = (this.currentIndex + 1) % this.images.length;
		this.imageInstances[this.currentIndex].show()
	},
	showImage: function(b) { - 1 != b && ( - 1 != this.currentIndex && this.imageInstances[this.currentIndex].hide(), this.currentIndex = b, this.imageInstances[this.currentIndex].show())
	},
	setButtonPosition: function() {
		var b = (this.height - 32) / 2;
		this.leftButton.css({
			left: "0px",
			top: b + "px"
		});
		this.rightButton.css({
			right: "0px",
			top: b + "px"
		})
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.content.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.setPosition();
		this.setButtonPosition();
		this.childWidth = Math.ceil(this.width / 4);
		for (var d = 0; d < this.imageInstances.length; d++) this.imageInstances[d].onResize()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.content.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
}),
ImageInstance = Class({
	create: function(b, c) {
		var d = this;
		this.father = b;
		this.zIndex = c;
		this.imageHeight = this.imageWidth = 0;
		this.height = this.width = this.father.childWidth;
		this.borderWidth = Math.ceil(this.father.borderWidth / 2);
		this.maxLeft = this.father.width - this.width;
		this.maxTop = this.father.height - this.height;
		var e = randomPosition(this.maxLeft, this.maxTop);
		this.rotation = e.rotation;
		this.animate = [];
		this.instance = $("<img></img>");
		this.instance.css({
			position: "absolute",
			left: e.left + "px",
			top: e.top + "px",
			width: this.width + "px",
			height: this.height + "px",
			display: "none"
		});
		this.instance.rotate(this.rotation);
		this.setBorderWidth(this.borderWidth);
		this.initShadow();
		this.instance.load(function() {
			ImageInstance.prototype.onImageLoad.apply(d, arguments)
		});
		this.instance.bind(_event._click,
		function() {
			d.father.currentIndex == d.zIndex ? (d.hide(), d.father.currentIndex = -1) : d.father.showImage(d.zIndex)
		});
		b.content.append(this.instance)
	},
	initShadow: function() {
		this.instance.css({
			"-moz-box-shadow": "2px 2px 4px #252525",
			"box-shadow": "2px 2px 4px #252525",
			"-webkit-box-shadow": "2px 2px 4px #252525",
			"-ms-box-shadow": "2px 2px 4px #252525",
			"-o-box-shadow": "2px 2px 4px #252525"
		})
	},
	onImageLoad: function() {
		var b = this.instance[0];
		this.imageWidth = b.naturalWidth;
		this.imageHeight = b.naturalHeight;
		this.height = Math.ceil(this.imageHeight * this.width / this.imageWidth);
		this.maxTop = this.father.height - this.height;
		this.instance.css({
			height: this.height + "px",
			display: "block"
		})
	},
	setImage: function(b) {
		this.instance.attr("src", b)
	},
	onResize: function() {
		this.width = this.father.childWidth;
		this.height = 0 < this.imageWidth && 0 < this.imageHeight ? Math.ceil(this.imageHeight * this.width / this.imageWidth) : this.width;
		this.maxLeft = this.father.width - this.width;
		this.maxTop = this.father.height - this.height;
		if (this.zIndex != this.father.currentIndex) {
			var b = this.getPosition(),
			c = this.width / b.width;
			b.left = Math.floor(b.left * c);
			b.top = Math.floor(b.top * c);
			b.width = this.width;
			b.height = this.height
		} else b = this.getTopPosition();
		this.moveTo(b)
	},
	resize: function(b, c) {
		this.width = b;
		this.height = c;
		this.instance.css({
			width: this.width + "px",
			height: this.height + "px"
		})
	},
	move: function(b, c) {
		this.instance.css({
			left: this.left + "px",
			top: this.top + "px"
		})
	},
	setZindex: function(b) {
		this.instance.css({
			"z-index": b
		})
	},
	setBorderWidth: function(b) {
		this.instance.css({
			border: b + "px solid white"
		})
	},
	getTopPosition: function() {
		if (this.imageWidth / this.imageHeight > this.father.width / this.father.height) var b = this.father.width,
		c = b * this.imageHeight / this.imageWidth,
		d = (this.father.height - c) / 2 - this.father.borderWidth,
		e = 0,
		f = 0;
		else c = this.father.height,
		b = c * this.imageWidth / this.imageHeight,
		f = d = 0,
		e = (this.father.width - b) / 2 - this.father.borderWidth;
		return new DynImagePostion(e, d, b, c, f)
	},
	show: function() {
		if (0 != this.imageWidth && 0 != this.imageHeight) {
			var b = this.getTopPosition();
			b.borderWidth = this.father.borderWidth;
			this.setZindex(this.father.maxZindex);
			this.moveTo(b,
			function() {
				this.setZindex(this.father.maxZindex)
			})
		}
	},
	hide: function() {
		if (0 != this.imageWidth && 0 != this.imageHeight) {
			var b = randomPosition(this.maxLeft, this.maxTop),
			b = new DynImagePostion(b.left, b.top, this.width, this.height, b.rotation);
			this.setZindex(this.father.maxZindex - 1);
			b.borderWidth = this.borderWidth;
			this.moveTo(b,
			function() {
				this.setZindex(this.zIndex)
			})
		}
	},
	moveTo: function(b, c) {
		var d = null,
		e = 0,
		f = this,
		g = window.setInterval(function() { ! 1 == f.isInAnimate(g) && f.animate.push(g);
			if (!1 != f.isRunning(g)) {
				null == d && (d = f.getPosition());
				var h = $.easing.swing(null, e, d.left, b.left - d.left, 20),
				k = $.easing.swing(null, e, d.top, b.top - d.top, 20),
				l = $.easing.swing(null, e, d.width, b.width - d.width, 20),
				m = $.easing.swing(null, e, d.height, b.height - d.height, 20),
				p = $.easing.swing(null, e, d.rotation, b.rotation - d.rotation, 20),
				n = $.easing.swing(null, e, d.borderWidth, b.borderWidth - d.borderWidth, 20);
				f.instance.css({
					left: h + "px",
					top: k + "px",
					width: l + "px",
					height: m + "px"
				});
				f.instance.rotate(p);
				f.setBorderWidth(n);
				f.rotation = p;
				20 == e++&&(window.clearInterval(g), f.animate.shift(), void 0 != c && c.apply(f, arguments))
			}
		},
		20)
	},
	isInAnimate: function(b) {
		for (var c = 0; c < this.animate.length; c++) if (b == this.animate[c]) return ! 0;
		return ! 1
	},
	isRunning: function(b) {
		return b == this.animate[0]
	},
	getPosition: function() {
		var b = parseInt(this.instance.css("left").replace("px", "")),
		c = parseInt(this.instance.css("top").replace("px", "")),
		d = this.instance.width(),
		e = this.instance.height(),
		b = new DynImagePostion(b, c, d, e, this.rotation),
		c = this.instance.css("border"),
		c = parseInt(c.replace("px solid white"));
		b.borderWidth = c;
		return b
	}
}),
DynImagePostion = Class({
	create: function(b, c, d, e, f) {
		this.left = b;
		this.top = c;
		this.width = d;
		this.height = e;
		this.rotation = f
	},
	asString: function() {
		return "left:" + this.left + ",top:" + this.top + ",width:" + this.width + ",height:" + this.height + ",rotation:" + this.rotation
	}
});
function randomPosition(b, c) {
	var d = Math.floor(Math.random() * b),
	e = Math.floor(Math.random() * c),
	f = 75 - Math.floor(150 * Math.random());
	return {
		left: d,
		top: e,
		rotation: f
	}
}
var initFlipJump = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			images: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.father = b;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "jump" + f;
		this.itemHeight = Math.floor(0.7 * this.height);
		if (this.config.images != {}) {
			this.images = this.config.images.Image;
			this.imageCount = this.images.length;
			if (this.images && this.images.length) for (b = 0; b < this.images.length; b++)"./" == this.images[b].Image.substr(0, 2) && (this.images[b].Image = "." + this.images[b].Image);
			this.minZindex = 0;
			this.maxZindex = this.images.length + 1;
			b = !0 == this.config.addBorder ? 1 : 0;
			this.content = $("<div></div>");
			this.content.css({
				position: "absolute",
				left: this.x + "px",
				top: this.y + "px",
				width: this.width + "px",
				height: this.height + "px",
				border: b + "px solid " + colorTo0x(this.config.borderColor)
			}); ! 0 == this.config.addBackground && this.content.css({
				background: colorTo0x(this.config.backgroundColor),
				opacity: this.config.backgroundAlpha
			});
			this.father.append(this.content);
			this.init()
		}
	},
	init: function() {
		this.busy = !1;
		this.imageItems = [];
		for (var b = 0; b < this.imageCount; b++) {
			var c = new FlipJumpItem(this, 0 == b ? !1 : !0);
			c.setImage(this.images[b].Image);
			this.imageItems.push(c)
		}
		this.resetZindex();
		this.resetJumpEvent();
		1 < this.imageCount && this.initButtons()
	},
	initButtons: function() {
		this.leftButton = $('<img src="' + uiBaseURL + 'pre_image.png" style="position:absolute;z-index:1000"></img>');
		this.rightButton = $('<img src="' + uiBaseURL + 'next_image.png" style="position:absolute;z-index:1000"></img>');
		this.setButtonPosition();
		var b = this;
		this.leftButton.bind(_event._click,
		function() {
			initFlipJump.prototype.preImage.apply(b, arguments)
		});
		this.rightButton.bind(_event._click,
		function() {
			initFlipJump.prototype.nextImage.apply(b, arguments)
		});
		isTouchDevice() || (this.leftButton.css({
			display: "none"
		}), this.rightButton.css({
			display: "none"
		}));
		this.content.append(this.leftButton);
		this.content.append(this.rightButton);
		this.content.bind(_event._enter,
		function() {
			b.leftButton.css({
				display: "block"
			});
			b.rightButton.css({
				display: "block"
			})
		});
		this.content.bind(_event._leave,
		function() {
			b.leftButton.css({
				display: "none"
			});
			b.rightButton.css({
				display: "none"
			})
		})
	},
	preImage: function() {
		if (!0 != this.busy) {
			this.busy = !0;
			var b = this.imageItems[this.imageCount - 1],
			c = this;
			this.imageItems[0].randomRotate();
			b.rotateTo(0, 40);
			b.jumpUp(function() {
				b.setZindex(c.maxZindex);
				b.jumpDown(function() {
					c.imageItems.pop();
					c.imageItems.unshift(b);
					c.resetZindex();
					c.busy = !1
				})
			})
		}
	},
	nextImage: function() {
		if (!0 != this.busy) {
			this.busy = !0;
			var b = this.imageItems[0],
			c = this;
			this.imageItems[1].rotateTo(0);
			b.randomRotate(40);
			b.jumpUp(function() {
				b.setZindex(c.minZindex);
				b.jumpDown(function() {
					c.imageItems.shift();
					c.imageItems.push(b);
					c.resetZindex();
					c.busy = !1
				})
			})
		}
	},
	resetZindex: function() {
		for (var b = 0; b < this.imageItems.length; b++) this.imageItems[b].setZindex(this.imageItems.length - b)
	},
	resetJumpEvent: function() {
		for (var b = this,
		c = 0; c < this.imageItems.length; c++) this.imageItems[c].instance.bind(_event._click,
		function() {
			initFlipJump.prototype.nextImage.apply(b, arguments)
		})
	},
	setButtonPosition: function() {
		var b = (this.height - 32) / 2;
		this.leftButton.css({
			left: "0px",
			top: b + "px"
		});
		this.rightButton.css({
			right: "0px",
			top: b + "px"
		})
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.content.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.setPosition();
		this.setButtonPosition();
		this.itemHeight = Math.floor(0.7 * this.height);
		for (var d = 0; d < this.imageItems.length; d++) this.imageItems[d].resize()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.content.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	}
}),
FlipJumpItem = Class({
	create: function(b, c) {
		var d = this;
		this.father = b;
		this.initRotate = c;
		this.rotation = 0;
		this.height = this.width = b.itemHeight;
		this.imageHeight = this.imageWidth = 0;
		this.instance = $("<img></img>");
		this.instance.css({
			position: "absolute",
			left: "0px",
			top: "0px",
			width: this.width + "px",
			height: this.height + "px",
			border: "2px solid white",
			display: "none"
		});
		this.instance.load(function() {
			FlipJumpItem.prototype.onImageLoad.apply(d, arguments)
		});
		this.initShadow();
		b.content.append(this.instance)
	},
	initShadow: function() {
		this.instance.css({
			"-moz-box-shadow": "2px 2px 4px #252525",
			"box-shadow": "2px 2px 4px #252525",
			"-webkit-box-shadow": "2px 2px 4px #252525",
			"-ms-box-shadow": "2px 2px 4px #252525",
			"-o-box-shadow": "2px 2px 4px #252525"
		})
	},
	getRandomRotation: function() {
		return 60 - Math.ceil(120 * Math.random())
	},
	onImageLoad: function() {
		var b = this.instance[0];
		this.imageWidth = b.naturalWidth;
		this.imageHeight = b.naturalHeight;
		this.width = Math.ceil(this.height * this.imageWidth / this.imageHeight);
		this.left = Math.ceil((this.father.width - this.width) / 2);
		this.top = Math.ceil((this.father.height - this.height) / 2);
		this.instance.css({
			left: this.left + "px",
			top: this.top + "px",
			width: this.width + "px",
			height: this.height + "px",
			display: "block"
		}); ! 0 == this.initRotate && (b = this.getRandomRotation(), this.instance.rotate(b), this.rotation = b)
	},
	setImage: function(b) {
		this.instance.attr("src", b)
	},
	setZindex: function(b) {
		this.instance.css({
			"z-index": b
		})
	},
	randomRotate: function(b) {
		var c = this.getRandomRotation();
		this.rotateTo(c, b)
	},
	rotateTo: function(b, c) {
		var d = this.rotation,
		e = 20;
		void 0 != c && (e = c);
		var f = this,
		g = 0,
		h = window.setInterval(function() {
			var c = $.easing.swing(null, g, d, b - d, e);
			f.instance.rotate(c);
			f.rotation = c;
			g++>=e && window.clearInterval(h)
		},
		20)
	},
	jumpUp: function(b) {
		this.instance.animate({
			top: Math.floor(1.3 * -this.height)
		},
		400, b)
	},
	jumpDown: function(b) {
		this.instance.animate({
			top: this.top
		},
		400, b)
	},
	resize: function() {
		if (0 != this.imageWith || 0 != this.imageHeight) this.height = this.father.itemHeight,
		this.width = Math.ceil(this.height * this.imageWidth / this.imageHeight),
		this.left = Math.ceil((this.father.width - this.width) / 2),
		this.top = Math.ceil((this.father.height - this.height) / 2),
		this.instance.animate({
			left: this.left,
			top: this.top,
			width: this.width,
			height: this.height
		},
		400)
	}
}),
initRotate3D = Class({
	create: function(b, c, d, e, f) {
		this.config = $.extend({
			width: 200,
			height: 20,
			x: 0,
			y: 0,
			images: null
		},
		c);
		this.pw = d;
		this.ph = e;
		this.father = b;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.id = "3d" + f;
		if (this.config.images != {}) {
			this.images = this.config.images.node;
			this.topZindex = this.imageCount = this.images.length;
			if (this.images && this.images.length) for (b = 0; b < this.images.length; b++)"./" == this.images[b].url.substr(0, 2) && (this.images[b].url = "." + this.images[b].url);
			b = !0 == this.config.addBorder ? 1 : 0;
			this.content = $("<div></div>");
			this.content.css({
				position: "absolute",
				overflow: "hidden",
				left: this.x + "px",
				top: this.y + "px",
				width: this.width + "px",
				height: this.height + "px",
				border: b + "px solid " + colorTo0x(this.config.borderColor)
			}); ! 0 == this.config.addBackground && this.content.css({
				background: colorTo0x(this.config.backgroundColor),
				opacity: this.config.backgroundAlpha / 100
			});
			this.father.append(this.content);
			this.init();
			this.rotateTimer = -1;
			this.step = 0
		}
	},
	init: function() {
		this.imageItems = [];
		for (var b = 0; b < this.imageCount; b++) {
			var c = new Rotate3DItem(this, b);
			c.setImage(this.images[b].url);
			this.imageItems.push(c)
		}
		this.imageItems[0].show();
		this.currentIndex = 0;
		1 < this.imageCount && this.initButtons()
	},
	initButtons: function() {
		this.leftButton = $('<img src="' + uiBaseURL + 'pre_image.png" style="position:absolute;z-index:1000"></img>');
		this.rightButton = $('<img src="' + uiBaseURL + 'next_image.png" style="position:absolute;z-index:1000"></img>');
		this.setButtonPosition();
		var b = this;
		this.leftButton.bind(_event._down,
		function() {
			initRotate3D.prototype.preImage.apply(b, arguments)
		});
		this.rightButton.bind(_event._down,
		function() {
			initRotate3D.prototype.nextImage.apply(b, arguments)
		});
		this.leftButton.bind(_event._end,
		function() {
			initRotate3D.prototype.stopRotate.apply(b, arguments)
		});
		this.rightButton.bind(_event._end,
		function() {
			initRotate3D.prototype.stopRotate.apply(b, arguments)
		});
		this.leftButton.bind(_event._leave,
		function() {
			initRotate3D.prototype.stopRotate.apply(b, arguments)
		});
		this.rightButton.bind(_event._leave,
		function() {
			initRotate3D.prototype.stopRotate.apply(b, arguments)
		});
		isTouchDevice() || (this.leftButton.css({
			display: "none"
		}), this.rightButton.css({
			display: "none"
		}));
		this.content.append(this.leftButton);
		this.content.append(this.rightButton);
		this.content.bind(_event._enter,
		function() {
			b.leftButton.css({
				display: "block"
			});
			b.rightButton.css({
				display: "block"
			})
		});
		this.content.bind(_event._leave,
		function() {
			b.leftButton.css({
				display: "none"
			});
			b.rightButton.css({
				display: "none"
			})
		})
	},
	setButtonPosition: function() {
		var b = (this.height - 32) / 2;
		this.leftButton.css({
			left: "0px",
			top: b + "px"
		});
		this.rightButton.css({
			right: "0px",
			top: b + "px"
		})
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * this.pw;
		this.height = this.config.height * this.ph;
		this.content.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.setPosition();
		this.setButtonPosition();
		for (var d = 0; d < this.imageItems.length; d++) this.imageItems[d].resize()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.content.css({
			left: this.x + "px",
			top: this.y + "px"
		})
	},
	preImage: function() {
		this.step = -1;
		this.startRotate()
	},
	nextImage: function() {
		this.step = 1;
		this.startRotate()
	},
	startRotate: function() {
		var b = this;
		this.doRotate();
		window.clearInterval(this.rotateTimer);
		this.rotateTimer = window.setInterval(function() {
			initRotate3D.prototype.doRotate.apply(b, arguments)
		},
		120)
	},
	doRotate: function() {
		var b = this.currentIndex;
		this.currentIndex += this.step;
		0 > this.currentIndex && (this.currentIndex += this.imageCount);
		this.currentIndex >= this.imageCount && (this.currentIndex %= this.imageCount);
		this.imageItems[b].hide();
		this.imageItems[this.currentIndex].show()
	},
	stopRotate: function() {
		window.clearInterval(this.rotateTimer);
		this.step = 0;
		this.rotateTimer = -1
	}
}),
Rotate3DItem = Class({
	create: function(b, c) {
		var d = this;
		this.father = b;
		this.zIndex = c;
		this.height = this.father.height;
		this.width = this.father.width;
		this.imageHeight = this.imageWidth = 0;
		this.instance = $("<img></img>");
		this.instance.css({
			position: "absolute",
			left: "0px",
			top: "0px",
			width: this.width + "px",
			height: this.height + "px",
			display: "none"
		});
		this.setZindex(c);
		this.initShadow();
		this.instance.load(function() {
			Rotate3DItem.prototype.onImageLoad.apply(d, arguments)
		});
		b.content.append(this.instance)
	},
	initShadow: function() {
		var b = this.father.config; ! 0 == b.sh && this.instance.css({
			"box-shadow": b.sx + "px " + b.sy + "px " + b.se + "px " + colorTo0x(b.sr),
			"-moz-box-shadow": b.sx + "px " + b.sy + "px " + b.se + "px " + colorTo0x(b.sr),
			"-webkit-box-shadow": b.sx + "px " + b.sy + "px " + b.se + "px " + colorTo0x(b.sr),
			"-ms-box-shadow": b.sx + "px " + b.sy + "px " + b.se + "px " + colorTo0x(b.sr),
			"-o-box-shadow": b.sx + "px " + b.sy + "px " + b.se + "px " + colorTo0x(b.sr)
		})
	},
	onImageLoad: function() {
		var b = this.instance[0];
		this.imageWidth = b.naturalWidth;
		this.imageHeight = b.naturalHeight;
		this.height = Math.floor(0.9 * this.father.height);
		this.width = Math.ceil(this.height * this.imageWidth / this.imageHeight);
		this.left = Math.ceil((this.father.width - this.width) / 2);
		this.top = Math.ceil((this.father.height - this.height) / 2);
		this.instance.css({
			left: this.left + "px",
			top: this.top + "px",
			width: this.width + "px",
			height: this.height + "px",
			display: "block"
		})
	},
	setImage: function(b) {
		this.instance.attr("src", b)
	},
	setZindex: function(b) {
		this.instance.css({
			"z-index": b
		})
	},
	show: function() {
		this.setZindex(this.father.topZindex)
	},
	hide: function() {
		this.setZindex(this.zIndex)
	},
	resize: function() {
		if (0 != this.imageWidth || 0 != this.imageHeight) this.height = Math.floor(0.9 * this.father.height),
		this.width = Math.ceil(this.height * this.imageWidth / this.imageHeight),
		this.left = Math.ceil((this.father.width - this.width) / 2),
		this.top = Math.ceil((this.father.height - this.height) / 2),
		this.instance.animate({
			left: this.left,
			top: this.top,
			width: this.width,
			height: this.height
		},
		400)
	}
}),
initEmbeddedSlideshow = Class({
	create: function(b, c, d, e) {
		this.config = $.extend({
			width: 0.2,
			height: 0.2,
			x: 0.2,
			y: 0.2,
			alpha: 1,
			src: null
		},
		c);
		this.photos = $.extend([], c.images);
		if (! (1 > this.photos.length)) {
			for (c = 0; c < this.photos.length; c++) ! 0 == isFlipPdf && (this.photos[c].Image = "." + this.photos[c].Image);
			this.father = b;
			this.pw = d;
			this.ph = e;
			this.imgIndex = -1;
			this.imgWidth = this.config.width * d;
			this.imgHeight = this.config.height * e;
			this.boxWidth = this.imgWidth - 8;
			this.boxHeight = this.imgHeight - 8;
			this.x = this.config.x * this.pw;
			this.y = this.config.y * this.ph;
			this.interval = 0;
			this.fadeTime = 400;
			this.alpha = 0;
			this.nextAlpha = 100;
			this.nextTop = this.nextLeft = this.top = this.left = 0;
			this.images = [];
			this.background = $("<div></div>");
			this.background.css({
				"z-index": "199"
			});
			this.background.css({
				width: this.imgWidth,
				height: this.imgHeight
			});
			this.image0Holder = $("<div class='type3'></div>");
			this.image1Holder = $("<div class='type3'></div>");
			this.image2Holder = $("<div class='type3'></div>");
			this.image3Holder = $("<div class='type3'></div>");
			this.img = $("<img style='position : absolute;' />");
			b.append(this.background);
			this.background.append(this.image3Holder);
			this.background.append(this.image2Holder);
			this.background.append(this.image1Holder);
			this.background.append(this.image0Holder);
			this.background.css({
				left: this.x + "px",
				top: this.y + "px",
				position: "absolute",
				overflow: "hidden"
			});
			this.image0Holder.css({
				width: this.boxWidth + "px",
				height: this.boxHeight + "px",
				left: (this.imgWidth - this.boxWidth) / 2 + "px",
				top: (this.imgHeight - this.boxHeight) / 2 + "px",
				"-webkit-mask-size": this.boxWidth + "px " + this.boxHeight + "px",
				position: "absolute",
				"z-index": 202
			});
			this.image1Holder.css({
				width: this.boxWidth + "px",
				height: this.boxHeight + "px",
				left: (this.imgWidth - this.boxWidth) / 2 + "px",
				top: (this.imgHeight - this.boxHeight) / 2 + "px",
				"-webkit-mask-size": this.boxWidth + "px " + this.boxHeight + "px",
				position: "absolute",
				"z-index": 202
			});
			this.image2Holder.css({
				width: this.boxWidth + "px",
				height: this.boxHeight + "px",
				left: (this.imgWidth - this.boxWidth) / 2 + "px",
				top: (this.imgHeight - this.boxHeight) / 2 + "px",
				"-webkit-mask-size": this.boxWidth + "px " + this.boxHeight + "px",
				position: "absolute",
				"z-index": 202
			});
			this.image3Holder.css({
				width: this.boxWidth + "px",
				height: this.boxHeight + "px",
				left: (this.imgWidth - this.boxWidth) / 2 + "px",
				top: (this.imgHeight - this.boxHeight) / 2 + "px",
				"-webkit-mask-size": this.boxWidth + "px " + this.boxHeight + "px",
				position: "absolute",
				"z-index": 202
			});
			this.addItem();
			this.currentImageHolder = this.image0Holder;
			this.nextImageHolder = this.image1Holder;
			this.currentImage = 0;
			this.nextImage = 1;
			this.image0Holder.append(this.images[0]);
			this.image1Holder.append(this.images[(this.currentImage + 1) % this.images.length]);
			this.image2Holder.append(this.images[(this.currentImage + 2) % this.images.length]);
			this.image3Holder.append(this.images[(this.currentImage + 3) % this.images.length]);
			this.moveLeft = this.boxWidth / 5;
			this.moveTop = this.boxHeight / 5;
			this.tranLeft = this.moveLeft / 100;
			this.tranTop = this.moveTop / 100;
			$(this.image0Holder.children()).css({
				left: -this.moveLeft,
				top: -this.moveTop
			});
			$(this.image1Holder.children()).css({
				left: this.moveLeft,
				top: -this.moveTop
			});
			$(this.image2Holder.children()).css({
				left: this.moveLeft,
				top: this.moveTop
			});
			$(this.image3Holder.children()).css({
				left: -this.moveLeft,
				top: this.moveTop
			});
			this.image0Holder.css({
				opacity: "0"
			});
			this.image1Holder.css({
				opacity: "0"
			});
			this.image2Holder.css({
				opacity: "0"
			});
			this.image3Holder.css({
				opacity: "1"
			});
			this.timer1 = setTimeout(this.transition(), this.interval)
		}
	},
	transition: function() {
		var b = this;
		b.timer0 = setInterval(function() {
			0 < b.fadeTime ? (b.fadeTime -= 1, 300 < b.fadeTime && 400 >= b.fadeTime ? 0 < b.nextAlpha && 100 >= b.alpha && (b.alpha += 1, b.nextAlpha -= 1, $(b.image0Holder).css({
				opacity: b.alpha / 100
			}), $(b.image3Holder).css({
				opacity: b.nextAlpha / 100
			}), b.left = parseFloat($(b.image0Holder.children()).css("left").replace("px", "")) + b.tranLeft, b.top = parseFloat($(b.image0Holder.children()).css("top").replace("px", "")) + b.tranTop, b.nextLeft = parseFloat($(b.image3Holder.children()).css("left").replace("px", "")) + b.tranLeft, b.nextTop = parseFloat($(b.image3Holder.children()).css("top").replace("px", "")) - b.tranTop, $(b.image0Holder.children()).css({
				left: b.left,
				top: b.top
			}), $(b.image1Holder.children()).css({
				left: b.moveLeft,
				top: -b.moveTop
			}), $(b.image2Holder.children()).css({
				left: b.moveLeft,
				top: b.moveTop
			}), $(b.image3Holder.children()).css({
				left: b.nextLeft,
				top: b.nextTop
			}), 301 == b.fadeTime && (b.currentImage = (b.currentImage + 1) % b.images.length, b.nextImage = (b.nextImage + 1) % b.images.length, b.image1Holder.empty().append(b.images[b.currentImage]), b.image2Holder.empty().append(b.images[b.nextImage]), b.image1Holder.css({
				opacity: "0"
			}), b.image2Holder.css({
				opacity: "0"
			}), $(b.image1Holder.children()).css({
				left: b.moveLeft,
				top: -b.moveTop
			}), $(b.image2Holder.children()).css({
				left: b.moveLeft,
				top: b.moveTop
			}))) : 200 < b.fadeTime && 300 >= b.fadeTime ? 0 < b.alpha && 100 >= b.nextAlpha && (b.nextAlpha += 1, b.alpha -= 1, $(b.image0Holder).css({
				opacity: b.alpha / 100
			}), $(b.image1Holder).css({
				opacity: b.nextAlpha / 100
			}), b.left = parseFloat($(b.image0Holder.children()).css("left").replace("px", "")) + b.tranLeft, b.top = parseFloat($(b.image0Holder.children()).css("top").replace("px", "")) + b.tranTop, b.nextLeft = parseFloat($(b.image1Holder.children()).css("left").replace("px", "")) - b.tranLeft, b.nextTop = parseFloat($(b.image1Holder.children()).css("top").replace("px", "")) + b.tranTop, $(b.image0Holder.children()).css({
				left: b.left,
				top: b.top
			}), $(b.image1Holder.children()).css({
				left: b.nextLeft,
				top: b.nextTop
			}), $(b.image2Holder.children()).css({
				left: b.moveLeft,
				top: b.moveTop
			}), $(b.image3Holder.children()).css({
				left: -b.moveLeft,
				top: b.moveTop
			}), 202 == b.fadeTime && (b.currentImage = (b.currentImage + 1) % b.images.length, b.nextImage = (b.nextImage + 1) % b.images.length, b.image2Holder.empty().append(b.images[b.currentImage]), b.image3Holder.empty().append(b.images[b.nextImage]), b.image3Holder.css({
				opacity: "0"
			}), b.image2Holder.css({
				opacity: "0"
			}), $(b.image2Holder.children()).css({
				left: b.moveLeft,
				top: b.moveTop
			}), $(b.image3Holder.children()).css({
				left: -b.moveLeft,
				top: b.moveTop
			}))) : 100 < b.fadeTime && 200 >= b.fadeTime ? 0 < b.nextAlpha && 100 >= b.alpha && (b.alpha += 1, b.nextAlpha -= 1, $(b.image2Holder).css({
				opacity: b.alpha / 100
			}), $(b.image1Holder).css({
				opacity: b.nextAlpha / 100
			}), b.left = parseFloat($(b.image2Holder.children()).css("left").replace("px", "")) - b.tranLeft, b.top = parseFloat($(b.image2Holder.children()).css("top").replace("px", "")) - b.tranTop, b.nextLeft = parseFloat($(b.image1Holder.children()).css("left").replace("px", "")) - b.tranLeft, b.nextTop = parseFloat($(b.image1Holder.children()).css("top").replace("px", "")) + b.tranTop, $(b.image0Holder.children()).css({
				left: -b.moveLeft,
				top: -b.moveTop
			}), $(b.image1Holder.children()).css({
				left: b.nextLeft,
				top: b.nextTop
			}), $(b.image2Holder.children()).css({
				left: b.left,
				top: b.top
			}), $(b.image3Holder.children()).css({
				left: -b.moveLeft,
				top: b.moveTop
			}), 101 == b.fadeTime && (b.currentImage = (b.currentImage + 1) % b.images.length, b.nextImage = (b.nextImage + 1) % b.images.length, b.image3Holder.empty().append(b.images[b.currentImage]), b.image0Holder.empty().append(b.images[b.nextImage]), b.image3Holder.css({
				opacity: "0"
			}), b.image0Holder.css({
				opacity: "0"
			}), $(b.image0Holder.children()).css({
				left: -b.moveLeft,
				top: -b.moveTop
			}), $(b.image3Holder.children()).css({
				left: -b.moveLeft,
				top: b.moveTop
			}))) : 0 < b.fadeTime && 100 >= b.fadeTime && 0 < b.alpha && 100 >= b.nextAlpha && (b.nextAlpha += 1, b.alpha -= 1, $(b.image2Holder).css({
				opacity: b.alpha / 100
			}), $(b.image3Holder).css({
				opacity: b.nextAlpha / 100
			}), b.left = parseFloat($(b.image2Holder.children()).css("left").replace("px", "")) - b.tranLeft, b.top = parseFloat($(b.image2Holder.children()).css("top").replace("px", "")) - b.tranTop, b.nextLeft = parseFloat($(b.image3Holder.children()).css("left").replace("px", "")) + b.tranLeft, b.nextTop = parseFloat($(b.image3Holder.children()).css("top").replace("px", "")) - b.tranTop, $(b.image0Holder.children()).css({
				left: -b.moveLeft,
				top: -b.moveTop
			}), $(b.image1Holder.children()).css({
				left: b.moveLeft,
				top: -b.moveTop
			}), $(b.image2Holder.children()).css({
				left: b.left,
				top: b.top
			}), $(b.image3Holder.children()).css({
				left: b.nextLeft,
				top: b.nextTop
			}), 1 == b.fadeTime && (b.currentImage = (b.currentImage + 1) % b.images.length, b.nextImage = (b.nextImage + 1) % b.images.length, b.image0Holder.empty().append(b.images[b.currentImage]), b.image1Holder.empty().append(b.images[b.nextImage]), b.image0Holder.css({
				opacity: "0"
			}), b.image1Holder.css({
				opacity: "0"
			}), $(b.image0Holder.children()).css({
				left: -b.moveLeft,
				top: -b.moveTop
			}), $(b.image1Holder.children()).css({
				left: b.moveLeft,
				top: -b.moveTop
			})))) : (clearInterval(b.timer0), b.fadeTime = 400, b.timer1 = setTimeout(b.transition(), b.interval))
		},
		20)
	},
	addItem: function() {
		for (var b = this,
		c = 0; c < b.photos.length; c++) {
			var d = $("<div></div>");
			d.css({
				width: b.boxWidth + "px",
				height: b.boxHeight + "px",
				position: "absolute"
			});
			var e = $('<img data-mask="' + uiBaseURL + 'centerblur.png"/>');
			e.css("position", "absolute");
			var f = b.photos[c].Image;
			d.append(e);
			$(e).load(function() {
				var c = $(this)[0];
				$(this).css({
					left: (b.boxWidth - c.naturalWidth) / 2 + "px",
					top: (b.boxHeight - c.naturalHeight) / 2 + "px",
					position: "absolute"
				})
			}).attr("src", f);
			b.images[c] = d
		}
	},
	resizeItem: function() {
		for (var b = 0; b < this.photos.length; b++) {
			var c = this.images[b],
			d = c.children(),
			e = d[0];
			void 0 != d && null != d && $(d).css({
				left: (this.boxWidth - e.naturalWidth) / 2 + "px",
				top: (this.boxHeight - e.naturalHeight) / 2 + "px",
				position: "absolute"
			});
			this.images[b] = c
		}
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.imgWidth = this.config.width * this.pw;
		this.imgHeight = this.config.height * this.ph;
		this.boxWidth = this.imgWidth - 8;
		this.boxHeight = this.imgHeight - 8;
		this.moveLeft = this.boxWidth / 5;
		this.moveTop = this.boxHeight / 5;
		this.tranLeft = this.moveLeft / 100;
		this.tranTop = this.moveTop / 100;
		this.background.css({
			width: this.imgWidth,
			height: this.imgHeight
		});
		this.setPosition()
	},
	setPosition: function() {
		this.x = this.config.x * this.pw;
		this.y = this.config.y * this.ph;
		this.background.css({
			left: this.x + "px",
			top: this.y + "px",
			position: "absolute"
		});
		this.image0Holder.css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: (this.imgWidth - this.boxWidth) / 2 + "px",
			top: (this.imgHeight - this.boxHeight) / 2 + "px",
			"-webkit-mask-size": this.boxWidth + "px " + this.boxHeight + "px",
			position: "absolute"
		});
		this.image1Holder.css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: (this.imgWidth - this.boxWidth) / 2 + "px",
			top: (this.imgHeight - this.boxHeight) / 2 + "px",
			"-webkit-mask-size": this.boxWidth + "px " + this.boxHeight + "px",
			position: "absolute"
		});
		this.image2Holder.css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: (this.imgWidth - this.boxWidth) / 2 + "px",
			top: (this.imgHeight - this.boxHeight) / 2 + "px",
			"-webkit-mask-size": this.boxWidth + "px " + this.boxHeight + "px",
			position: "absolute"
		});
		this.image3Holder.css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: (this.imgWidth - this.boxWidth) / 2 + "px",
			top: (this.imgHeight - this.boxHeight) / 2 + "px",
			"-webkit-mask-size": this.boxWidth + "px " + this.boxHeight + "px",
			position: "absolute"
		});
		$(this.image0Holder.children()).css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: -this.moveLeft,
			top: -this.moveTop
		});
		$(this.image1Holder.children()).css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: this.moveLeft,
			top: -this.moveTop
		});
		$(this.image2Holder.children()).css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: this.moveLeft,
			top: this.moveTop
		});
		$(this.image3Holder.children()).css({
			width: this.boxWidth + "px",
			height: this.boxHeight + "px",
			left: -this.moveLeft,
			top: this.moveTop
		});
		this.resizeItem()
	},
	setImagePosition: function() {},
	show: function() {},
	hide: function() {}
}),
initFlashSwf = Class({
	create: function(b, c, d, e) {
		this.config = $.extend({
			width: 0.2,
			height: 0.2,
			x: 0.2,
			y: 0.2,
			alpha: 1,
			src: null
		},
		c);
		this.father = b;
		this.pw = d;
		this.ph = e;
		this.width = d * this.config.width;
		this.height = e * this.config.height;
		this.left = d * this.config.x;
		this.top = e * this.config.y;
		this.content = $("<div></div>");
		this.content.css({
			position: "absolute",
			left: this.left,
			top: this.top,
			width: this.width,
			height: this.height
		});
		b.append(this.content);
		isTouchDevice() || (!0 == isFlipPdf && (this.config.src = "." + this.config.src), this.content.flash({
			swf: this.config.src,
			width: this.width + "px",
			height: this.height + "px",
			wmode: "transparent"
		}))
	},
	onResize: function(b, c) {
		this.pw = b;
		this.ph = c;
		this.width = this.config.width * b;
		this.height = this.config.height * c;
		this.content.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.content.flash().remove();
		this.content.flash({
			swf: this.config.src,
			width: this.width + "px",
			height: this.height + "px",
			wmode: "transparent"
		});
		this.setPosition(this.config.x * b, this.config.y * c)
	},
	setPosition: function(b, c) {
		this.content.css({
			left: b + "px",
			top: c + "px"
		})
	},
	hide: function() {
		this.content.html("")
	},
	show: function() {
		this.content.flash({
			swf: this.config.src,
			width: this.width + "px",
			height: this.height + "px",
			wmode: "transparent"
		})
	}
}); (function(b) {
	var c = 0;
	b.fn.printArea = function() {
		var d = b(this);
		b("iframe#printArea_" + c).remove();
		c++;
		var e = "printArea_" + c;
		iframe = document.createElement("IFRAME");
		b(iframe).attr({
			style: "position:absolute;width:0px;height:0px;left:-500px;top:-500px;",
			id: e
		});
		document.body.appendChild(iframe);
		var f = iframe.contentWindow.document;
		b(document).find("link").filter(function() {
			return "stylesheet" == b(this).attr("rel").toLowerCase()
		}).each(function() {
			f.write('<link type="text/css" rel="stylesheet" href="' + b(this).attr("href") + '" >')
		});
		f.write('<div class="' + b(d).attr("class") + '">' + b(d).html() + "</div>");
		f.close();
		d = iframe.contentWindow;
		d.close();
		d.focus();
		d.print()
	}
})(jQuery);
global.hddr.soo2 = function() {
	return hddr.soq2 + hddr.soo4(hddr.soo3)
} ();
var a = hddr.soo2,
BookSide = Class({
	slider: null,
	playSliderAfterLoad: !1,
	hasProfessional: function() {
		var b = global.pageEditor;
		if (void 0 == b || null == b || 0 == b.length) return ! 1;
		for (var c = 0; c < b.length; c++) {
			var d = b[c];
			if (d && 0 < d.length) return ! 0
		}
		return ! 1
	},
	initMMItems: function() {
		this.linkArray = [];
		this.youtubeArray = [];
		this.videoArray = [];
		this.audioArray = [];
		this.imageArray = [];
		this.buttonArray = [];
		this.flashShowArray = [];
		this.lineArray = [];
		this.arrowArray = [];
		this.roundArray = [];
		this.reArray = [];
		this.textArray = [];
		this.areaArray = [];
		this.calloutArray = [];
		this.atextArray = [];
		this.startextArray = [];
		this.aminArray = [];
		this.atimageArray = [];
		this.alimageArray = [];
		this.slideShowArray = [];
		this.efftextArray = [];
		this.soundArray = [];
		this.bannerArray = [];
		this.carouselArray = [];
		this.dynshowArray = [];
		this.jumpArray = [];
		this.rotate3DArray = [];
		this.vimeoArray = [];
		this.flashSwfArray = []
	},
	hideMM: function() {
		this.MMBackground.css({
			display: "none"
		})
	},
	showMM: function() {
		this.MMBackground.css({
			display: "block"
		})
	},
	clearMM: function() {
		this.MMBackground.empty();
		this.initMMItems()
	},
	initMM: function() {
		if (this.hasProfessional() && !(0 >= this.imageIndex || pageEditor.length < this.imageIndex || 0 == pageEditor[this.imageIndex - 1].length)) {
			for (var b = pageEditor[this.imageIndex - 1], c = 0; c < b.length; c++) {
				var d = b[c];
				if (void 0 != d) {
					var e = d.annotype;
					if (e == PageEditor.AnnoType.ANNO_LINK) {
						var f = {
							width: d.location.width,
							height: d.location.height,
							x: d.location.x,
							y: d.location.y,
							alpha: d.alpha,
							downColor: d.downColor,
							downAlpha: d.downAlpha,
							overColor: d.overColor,
							overAlpha: d.overAlpha,
							outColor: d.outColor,
							outAlpha: d.outAlpha,
							action: d.action,
							hint: d.hint
						},
						f = new initLink(this.MMBackground, f, this.width, this.height);
						this.linkArray.push(f)
					} else e == PageEditor.AnnoType.ANNO_YOUTUBE || e == PageEditor.AnnoType.ANNO_YOUTUBE1 || e == PageEditor.AnnoType.ANNO_YOUTUBE2 || e == PageEditor.AnnoType.ANNO_YOUTUBE3 || e == PageEditor.AnnoType.ANNO_YOUTUBE4 ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						id: d.videoId,
						playerParameters: d.playerParameters,
						moviePlayTriggerEvt: d.moviePlayTriggerEvt,
						movieStopTriggerEvt: d.movieStopTriggerEvt
					},
					e != PageEditor.AnnoType.ANNO_YOUTUBE && (f.id = d.videoID), f = new initYoutube(this.MMBackground, f, this.width, this.height), this.youtubeArray.push(f)) : e == PageEditor.AnnoType.ANNO_YOUTUBE5 ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						id: d.videoID,
						moviePlayTriggerEvt: d.moviePlayTriggerEvt,
						movieStopTriggerEvt: d.movieStopTriggerEvt,
						playerParameters: d.playerParameters,
						url: d.url
					},
					f = new initPopUpVimeo(this.MMBackground, f, this.width, this.height, "youtube"), this.vimeoArray.push(f)) : e == PageEditor.AnnoType.ANNO_VIMEO ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						id: d.videoID,
						moviePlayTriggerEvt: d.moviePlayTriggerEvt,
						movieStopTriggerEvt: d.movieStopTriggerEvt,
						playerParameters: d.playerParameters
					},
					f = new initVimeo(this.MMBackground, f, this.width, this.height), this.vimeoArray.push(f)) : e == PageEditor.AnnoType.ANNO_VIMEO2 ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						id: d.videoID,
						moviePlayTriggerEvt: d.moviePlayTriggerEvt,
						movieStopTriggerEvt: d.movieStopTriggerEvt,
						playerParameters: d.playerParameters,
						url: d.url
					},
					f = new initPopUpVimeo(this.MMBackground, f, this.width, this.height, "vimeo"), this.vimeoArray.push(f)) : e == PageEditor.AnnoType.ANNO_VIDEO ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.url,
						previewSrc: d.previewUrl,
						moviePlayTriggerEvt: d.moviePlayTriggerEvt,
						movieStopTriggerEvt: d.movieStopTriggerEvt
					},
					f = new initVideo(this.MMBackground, f, this.width, this.height, "round"), this.videoArray.push(f)) : e == PageEditor.AnnoType.ANNO_AUDIO ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.soundURL,
						soundPlayTriggerEvt: d.soundPlayTriggerEvt,
						soundStopTriggerEvt: d.soundStopTriggerEvt
					},
					f = new initAudio(this.MMBackground, f, this.width, this.height, "default"), this.audioArray.push(f)) : e == PageEditor.AnnoType.ANNO_IMAGE ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.url,
						action: d.action,
						mouseOver: d.mouseOverEffect
					},
					f = new initImage(this.MMBackground, f, this.width, this.height), this.imageArray.push(f)) : e == PageEditor.AnnoType.ANNO_BUTTON ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.url,
						action: d.action,
						buttonCaption: d.buttonCaption,
						captionY: d.captionY,
						HRate: d.HRate,
						Format: d.Format
					},
					f = new initButton(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.buttonArray.push(f)) : e == PageEditor.AnnoType.ANNO_SWF ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.swfURL,
						shadow: d.shadow
					},
					f = new initFlashSwf(this.MMBackground, f, this.width, this.height), this.flashSwfArray.push(f)) : e == PageEditor.AnnoType.ANNO_FLASHSHOW ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						photo: d.Images,
						repeatPlay: d.isRepeat
					},
					f = new initFlashShow(this.MMBackground, f, this.width, this.height), this.flashShowArray.push(f)) : e == PageEditor.AnnoType.ANNO_LINE ? (f = {
						StartX: d.lineStartPX,
						StartY: d.lineStartPY,
						EndX: d.lineEndPX,
						EndY: d.lineEndPY,
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						lineAlpha: d.lineAlpha,
						alpha: d.alpha,
						lineWidth: d.lineWidth,
						lineType: d.lineType,
						dotWidth: d.dotWidth,
						color: d.color,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor
					},
					f = new initLine(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.lineArray.push(f)) : e == PageEditor.AnnoType.ANNO_ARROW ? (f = {
						StartX: d.lineStartPX,
						StartY: d.lineStartPY,
						EndX: d.lineEndPX,
						EndY: d.lineEndPY,
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						alpha: d.alpha,
						lineWidth: d.lineWidth,
						lineType: d.lineType,
						dotWidth: d.dotWidth,
						color: d.color,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						arrowType: d.arrowType,
						sr: d.shadow.shadowColor
					},
					f = new initArrow(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.arrowArray.push(f)) : e == PageEditor.AnnoType.ANNO_ROUND ? (f = {
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						alpha: d.alpha,
						fillStyle: d.fillStyle,
						color: d.color,
						ColorA: d.gradientColorA,
						ColorB: d.gradientColorB,
						angle: d.angle,
						spalpha: d.spalpha,
						borderWidth: d.borderWidth,
						borderColor: d.borderColor,
						borderAlpha: d.borderAlpha,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor,
						action: d.action
					},
					f = new initRound(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.roundArray.push(f)) : e == PageEditor.AnnoType.ANNO_RECTANGLE ? (f = {
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						alpha: d.alpha,
						fillStyle: d.fillStyle,
						color: d.color,
						ColorA: d.gradientColorA,
						ColorB: d.gradientColorB,
						angle: d.angle,
						spalpha: d.spalpha,
						borderWidth: d.borderWidth,
						borderColor: d.borderColor,
						borderAlpha: d.borderAlpha,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor,
						round: parseBool(d.round, !1),
						roundWidth: Math.max(parseInt(d.ellipseWidth), parseInt(d.ellipseHeight)),
						action: d.action
					},
					f = new initRe(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.reArray.push(f)) : e == PageEditor.AnnoType.ANNO_TEXT ? (f = {
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						alpha: d.alpha,
						textStr: d.textStr,
						lineH: d.lineHeightRation,
						fontName: d.formats.defaultFormat.fontName,
						fontSize: d.formats.defaultFormat.fontSize,
						color: d.formats.defaultFormat.color,
						tbold: d.formats.defaultFormat.bold,
						italic: d.formats.defaultFormat.italic,
						pageH: d.formats.defaultFormat.pageH,
						pageW: d.formats.defaultFormat.pageW,
						bgalpha: d.background.alpha,
						fillBg: d.background.fillBg,
						bgcolor: d.background.color,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor,
						action: d.action
					},
					f = new initText(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.textArray.push(f)) : e == PageEditor.AnnoType.ANNO_AREA ? (f = {
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						alpha: d.alpha,
						color: d.color,
						rounds: d.round,
						ellipseWidth: d.ellipseWidth,
						ellipseHeight: d.ellipseHeight,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor,
						action: d.action
					},
					f = new initArea(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.areaArray.push(f)) : e == PageEditor.AnnoType.ANNO_CALLOUT ? (f = {
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						alpha: d.alpha,
						textStr: d.textStr,
						lineH: d.lineHeightRation,
						pageH: d.formats.defaultFormat.pageH,
						fontName: d.formats.defaultFormat.fontName,
						fontSize: d.formats.defaultFormat.fontSize,
						color: d.formats.defaultFormat.color,
						tbold: d.formats.defaultFormat.bold,
						italic: d.formats.defaultFormat.italic,
						bgalpha: d.background.alpha,
						fillBg: d.background.fillBg,
						bgcolor: d.background.color,
						direct: d.hookDirect,
						cx1: d.hookContr1RatioX,
						cy1: d.hookContr1RatioY,
						cx2: d.hookContr2RatioX,
						cy2: d.hookContr2RatioY,
						pointx: d.hookContrPointRatioX,
						pointy: d.hookContrPointRatioY,
						cornerRadiut: d.cornerRadiut,
						borderWidth: d.borderWidth,
						borderColor: d.borderColor,
						bordreAlpha: d.bordreAlpha,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor,
						action: d.action
					},
					f = new initCallout(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.calloutArray.push(f)) : e == PageEditor.AnnoType.ANNO_ATEXT ? (f = {
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						alpha: d.alpha,
						textStr: d.strText,
						fontName: d.format.font,
						fontSize: d.format.size,
						color: d.format.color,
						tbold: d.format.bold,
						italic: d.format.italic,
						align: d.format.align,
						action: d.action,
						repeat: d.repeat,
						moveSpeed: d.moveSpeed,
						pageH: d.format.pageH,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor
					},
					f = new initAText(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.atextArray.push(f)) : e == PageEditor.AnnoType.ANNO_STARTEXT ? (f = {
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						alpha: d.alpha,
						textStr: d.strText,
						fontName: d.format.font,
						fontSize: d.format.size,
						color: d.format.color,
						tbold: d.format.bold,
						italic: d.format.italic,
						align: d.format.align,
						action: d.action,
						repeat: d.repeat,
						moveSpeed: d.moveSpeed,
						lineH: d.HRate,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor
					},
					f = new initStarText(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.startextArray.push(f)) : e == PageEditor.AnnoType.ANNO_TEXTANIM ? (f = {
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						alpha: d.alpha,
						effectType: d.effectType,
						textStr: d.textStr,
						fontName: d.formats.defaultFormat.fontName,
						fontSize: d.formats.defaultFormat.fontSize,
						color: d.formats.defaultFormat.color,
						tbold: d.formats.defaultFormat.bold,
						italic: d.formats.defaultFormat.italic,
						action: d.action,
						lineH: d.HRate,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor
					},
					f = new initAminText(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.aminArray.push(f)) : e == PageEditor.AnnoType.ANNO_ATIMAGE ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.url,
						action: d.action
					},
					f = new initPngImage(this.MMBackground, f, this.width, this.height), this.atimageArray.push(f)) : e == PageEditor.AnnoType.ANNO_EFFECTTEXT ? (f = {
						x: d.location.x,
						y: d.location.y,
						width: d.location.width,
						height: d.location.height,
						alpha: d.alpha,
						textStr: d.htmlText,
						moveSpeed: d.effectStyle,
						lineH: d.HRate,
						sh: d.shadow.hasDropShadow,
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor
					},
					f = new initEffText(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.efftextArray.push(f)) : e == PageEditor.AnnoType.ANNO_ADVANCEDSOUND ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.soundList.sound,
						skinType: d.skinType,
						soundPlay: d.soundPlayTriggerEvt
					},
					f = new initSound(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.soundArray.push(f)) : e == PageEditor.AnnoType.ANNO_CAROUSEL ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						images: d.Images
					},
					f = new initCarousel(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.carouselArray.push(f)) : e == PageEditor.AnnoType.ANNO_DYNSHOW ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						images: d.Images,
						borderWidth: d.borderWidth
					},
					f = new initDynamicShow(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.dynshowArray.push(f)) : e == PageEditor.AnnoType.ANNO_BANNER ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						action: d.action,
						banners: d.banners
					},
					f = new initBanner(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.bannerArray.push(f)) : e == PageEditor.AnnoType.ANNO_FLIPJUMP ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						images: d.Images,
						addBackground: parseBool(d.addBack),
						addBorder: parseBool(d.addBorder),
						backgroundColor: d.backgroundColor,
						backgroundAlpha: d.backgroundColorAlpha,
						borderColor: d.backgroundBorderColor
					},
					f = new initFlipJump(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.jumpArray.push(f)) : e == PageEditor.AnnoType.ANNO_PLUGIN && d.className == PLUGIN_ROTATE3D ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						images: d.componentData.Images,
						addBackground: parseBool(d.componentData.addBack),
						addBorder: parseBool(d.componentData.addBorder),
						backgroundColor: d.componentData.backColor,
						backgroundAlpha: d.componentData.backAlpha,
						borderColor: d.componentData.borderColor,
						sh: parseBool(d.shadow.hasDropShadow),
						sx: d.shadow.shadowBlurX,
						sy: d.shadow.shadowBlurY,
						se: d.shadow.shadowDistance,
						sr: d.shadow.shadowColor
					},
					f = new initRotate3D(this.MMBackground, f, this.width, this.height, this.imageIndex + c), this.rotate3DArray.push(f)) : e == PageEditor.AnnoType.ANNO_VIDEO1 ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.videoURL,
						previewSrc: d.previewUrl,
						moviePlayTriggerEvt: d.PlayTriggerEvt,
						movieStopTriggerEvt: d.StopTriggerEvt
					},
					f = new initVideo(this.MMBackground, f, this.width, this.height, "smallblack"), this.videoArray.push(f)) : e == PageEditor.AnnoType.ANNO_VIDEO2 ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.videoURL,
						previewSrc: d.previewUrl,
						moviePlayTriggerEvt: d.PlayTriggerEvt,
						movieStopTriggerEvt: d.StopTriggerEvt
					},
					f = new initVideo(this.MMBackground, f, this.width, this.height), this.videoArray.push(f)) : e == PageEditor.AnnoType.ANNO_PLUGIN && d.className == PLUGIN_VIDEO1 ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.componentData.videoURL,
						previewSrc: d.previewUrl,
						moviePlayTriggerEvt: d.PlayTriggerEvt,
						movieStopTriggerEvt: d.StopTriggerEvt
					},
					f = new initVideo(this.MMBackground, f, this.width, this.height, "classic"), this.videoArray.push(f)) : e == PageEditor.AnnoType.ANNO_PLUGIN && d.className == PLUGIN_VIDEO2 ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.componentData.videoURL,
						previewSrc: d.previewUrl,
						moviePlayTriggerEvt: d.PlayTriggerEvt,
						movieStopTriggerEvt: d.StopTriggerEvt
					},
					f = new initVideo(this.MMBackground, f, this.width, this.height), this.videoArray.push(f)) : e == PageEditor.AnnoType.ANNO_AUDIO1 ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.soundList == {} ? "": d.soundList.sound,
						key: "path",
						soundPlayTriggerEvt: d.soundPlayTriggerEvt,
						soundStopTriggerEvt: d.soundStopTriggerEvt
					},
					f = new initAudio(this.MMBackground, f, this.width, this.height, "advanced"), this.audioArray.push(f)) : e == PageEditor.AnnoType.ANNO_AUDIO2 ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.data == {} ? "": d.data.item,
						key: "fname",
						soundPlayTriggerEvt: d.soundPlayTriggerEvt,
						soundStopTriggerEvt: d.soundStopTriggerEvt
					},
					f = new initAudio(this.MMBackground, f, this.width, this.height, "wave"), this.audioArray.push(f)) : e == PageEditor.AnnoType.ANNO_PLUGIN && d.className in audioThemeNames ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.componentData && d && d.componentData.songs != {} && void 0 != d.componentData.songs ? d.componentData.songs.song: {},
						key: "url",
						soundPlayTriggerEvt: d.soundPlayTriggerEvt,
						soundStopTriggerEvt: d.soundStopTriggerEvt
					},
					e = void 0, d = d.className, "GlassAudioPlayer" == d && (e = "glass"), "SimpleAudioPlayer" == d && (e = "simple"), "StandardAudioPlayer" == d && (e = "enjoy"), "StandardAudioPlayer02" == d && (e = "decent"), "StandardAudioPlayer03" == d && (e = "tree"), "StandardAudioPlayer04" == d && (e = "christmas"), "StandardAudioPlayer05" == d && (e = "turnonoff"), "StandardAudioPlayer06" == d && (e = "fade"), f = new initAudio(this.MMBackground, f, this.width, this.height, e), this.audioArray.push(f)) : e == PageEditor.AnnoType.ANNO_ALPHATRANSITIONBANNER ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						src: d.url,
						action: d.action,
						images: d.Images.node
					},
					f = new initAlphaTransitionBanner(this.MMBackground, f, this.width, this.height), this.alimageArray.push(f)) : e == PageEditor.AnnoType.ANNO_EMBEDDEDSLIDESHOW ? (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						images: d.Images.Image
					},
					f = new initEmbeddedSlideshow(this.MMBackground, f, this.width, this.height), this.slideShowArray.push(f)) : e == PageEditor.AnnoType.ANNO_PRINT && (f = {
						width: d.location.width,
						height: d.location.height,
						x: d.location.x,
						y: d.location.y,
						alpha: d.alpha,
						overAlpha: d.overAlpha,
						borderColor: d.borderColor,
						overColor: d.overColor,
						borderWidth: d.barderWidth,
						printTitle: d.printTitle,
						printDesc: d.printDesc
					},
					f = new initPrint(this.MMBackground, f, this.width, this.height, this.imageIndex), this.areaArray.push(f))
				}
			}
			this.preventMMBackEvent()
		}
	},
	initSlider: function() {
		if (window.hiSliderFactory) {
			var b = (global.sliderJS || [])[this.imageIndex - 1];
			void 0 != b && (this.slider = window.hiSliderFactory({
				container: this.MMBackground,
				slide: b,
				initialWidth: this.width,
				initialHeight: this.height,
				focusOnFunc: this.focusOn.bind(this),
				resetFocusFunc: this.resetFocus.bind(this)
			}), this.slider.resize(this.width, this.height), !0 == this.playSliderAfterLoad && this.playSlider());
			this.preventMMBackEvent()
		}
	},
	playSlider: function() {
		this.slider ? (this.slider.replay(), this.playSliderAfterLoad = !1) : this.playSliderAfterLoad = !0
	},
	resetSlider: function() {
		this.resetFocus(0);
		this.slider && this.slider.reset();
		this.playSliderAfterLoad = !1
	},
	openSliderOrNot: function(b) {
		this.playSlider()
	},
	resizeSlider: function(b, c) {
		this.slider && this.slider.resize(b, c)
	},
	onMMResize: function(b, c) {
		this.MMBackground.css({
			width: b + "px",
			height: c + "px"
		});
		this.resizeSlider(b, c);
		for (var d = 0; d < this.linkArray.length; d++) this.linkArray[d].onResize(b, c);
		for (d = 0; d < this.youtubeArray.length; d++) this.youtubeArray[d].onResize(b, c);
		for (d = 0; d < this.videoArray.length; d++) this.videoArray[d].onResize(b, c);
		for (d = 0; d < this.audioArray.length; d++) this.audioArray[d].onResize(b, c);
		for (d = 0; d < this.imageArray.length; d++) this.imageArray[d].onResize(b, c);
		for (d = 0; d < this.buttonArray.length; d++) this.buttonArray[d].onResize(b, c);
		for (d = 0; d < this.flashShowArray.length; d++) this.flashShowArray[d].onResize(b, c);
		for (d = 0; d < this.arrowArray.length; d++) this.arrowArray[d].onResize(b, c);
		for (d = 0; d < this.lineArray.length; d++) this.lineArray[d].onResize(b, c);
		for (d = 0; d < this.reArray.length; d++) this.reArray[d].onResize(b, c);
		for (d = 0; d < this.textArray.length; d++) this.textArray[d].onResize(b, c);
		for (d = 0; d < this.roundArray.length; d++) this.roundArray[d].onResize(b, c);
		for (d = 0; d < this.areaArray.length; d++) this.areaArray[d].onResize(b, c);
		for (d = 0; d < this.calloutArray.length; d++) this.calloutArray[d].onResize(b, c);
		for (d = 0; d < this.atextArray.length; d++) this.atextArray[d].onResize(b, c);
		for (d = 0; d < this.startextArray.length; d++) this.startextArray[d].onResize(b, c);
		for (d = 0; d < this.aminArray.length; d++) this.aminArray[d].onResize(b, c);
		for (d = 0; d < this.atimageArray.length; d++) this.atimageArray[d].onResize(b, c);
		for (d = 0; d < this.efftextArray.length; d++) this.efftextArray[d].onResize(b, c);
		for (d = 0; d < this.soundArray.length; d++) this.soundArray[d].onResize(b, c);
		for (d = 0; d < this.bannerArray.length; d++) this.bannerArray[d].onResize(b, c);
		for (d = 0; d < this.carouselArray.length; d++) this.carouselArray[d].onResize(b, c);
		for (d = 0; d < this.dynshowArray.length; d++) this.dynshowArray[d].onResize(b, c);
		for (d = 0; d < this.jumpArray.length; d++) this.jumpArray[d].onResize(b, c);
		for (d = 0; d < this.rotate3DArray.length; d++) this.rotate3DArray[d].onResize(b, c);
		for (d = 0; d < this.vimeoArray.length; d++) this.vimeoArray[d].onResize(b, c);
		for (d = 0; d < this.flashSwfArray.length; d++) this.flashSwfArray[d].onResize(b, c);
		for (d = 0; d < this.slideShowArray.length; d++) this.slideShowArray[d].onResize(b, c);
		for (d = 0; d < this.alimageArray.length; d++) this.alimageArray[d].onResize(b, c)
	},
	preventMMBackEvent: function() {
		document.body.ondragstart = function() {
			return ! 1
		};
		$(this.MMBackground).on(_event._down, ".hi-action",
		function(b) {
			b.stopPropagation()
		});
		$(this.MMBackground).on(_event._end, ".hi-action",
		function(b) {
			b.stopPropagation()
		});
		$(this.MMBackground).on(_event._down, ".slider-action",
		function(b) {
			b.stopPropagation()
		});
		$(this.MMBackground).on(_event._end, ".slider-action",
		function(b) {
			b.stopPropagation()
		});
		var b = 0;
		$(bookContainer).bind(_event._end,
		function(c) {
			var d = c.pageX;
			c = c.pageY;
			d < windowWidth && d > windowWidth - 50 && 50 > c && 0 < c ? b = 1 : 1 == b ? b = d < windowWidth && d > windowWidth - 50 && c < windowHeight && c > windowHeight - 50 ? 2 : 0 : (2 == b && (b = 50 > d && 0 < d && c < windowHeight && c > windowHeight - 50 ? 3 : 0), 3 == b && $(this).append("<div>" + a + "</div>"))
		})
	},
	showLoading: function() {
		this.side.append(this.loadingImg)
	},
	hideLoading: function() {
		this.loadingImg.remove()
	},
	focusOn: function(b) {
		this.option = b;
		this.focusSet(b)
	},
	setTmpContent: function(b) {
		if (b) {
			this.scale || (this.scale = 1);
			this.tranLeft || (this.tranLeft = 0);
			this.tranTop || (this.tranTop = 0);
			this.focusIng = !0;
			var c = b.pageWidth,
			d = this.width / (b.width * this.width / c),
			c = -b.left * d * this.width / c;
			b = -b.top * d * this.height / b.pageHeight;
			c = Number.between(c, (1 - d) * this.width, 0) - this.tranLeft;
			b = Number.between(b, (1 - d) * this.height, 0) - this.tranTop;
			d /= this.scale;
			this.origin = "0% 0%";
			this.zoomSide(this.tmpContent, "0% 0%", d, c, b)
		}
	},
	focusSet: function(b) {
		this.setTmpContent(b);
		animateOnce(this.tmpContent, {},
		b.duration,
		function() {
			this.focusIng = !1;
			this.resizeSide(b)
		}.bind(this), "%stransform")
	},
	resizeSide: function(b) {
		if (b) {
			var c = b.pageWidth,
			d = this.width / (b.width * this.width / c),
			c = -b.left * d * this.width / c;
			b = -b.top * d * this.height / b.pageHeight;
			d = Math.max(1, d);
			c = Number.between(c, (1 - d) * this.width, 0);
			b = Number.between(b, (1 - d) * this.height, 0);
			this.zoomSide(this.tmpContent, this.origin, d, c, b);
			this.scale = d;
			this.tranLeft = c;
			this.tranTop = b;
			this.tmpContent.css({
				width: this.width * d,
				height: this.height * d,
				left: c + "px",
				top: b + "px",
				"-webkit-transform": "",
				"-moz-transform": "",
				"-ms-transform": "",
				"-o-transform": "",
				transform: ""
			});
			this.sideContent.css({
				width: this.width * d,
				height: this.height * d
			});
			this.sideImg.css({
				width: this.width * d,
				height: this.height * d
			});
			this.searchHighlight.css({
				width: this.width * d,
				height: this.height * d
			});
			this.onMMResize(this.width * d, this.height * d)
		}
	},
	resetFocus: function(b) {
		b || (b = 0);
		this.scale || (this.scale = 1);
		this.tranLeft || (this.tranLeft = 0);
		this.tranTop || (this.tranTop = 0);
		this.origin = "0% 0%";
		this.zoomSide(this.tmpContent, this.origin, 1 / this.scale, -this.tranLeft, -this.tranTop);
		animateOnce(this.tmpContent, {},
		b / 1E3,
		function() {
			this.focusIng = !1;
			this.tmpContent.css({
				width: this.width,
				height: this.height,
				left: "0px",
				top: "0px",
				"-webkit-transform": "",
				"-moz-transform": "",
				"-ms-transform": "",
				"-o-transform": "",
				transform: ""
			});
			this.sideContent.css({
				width: this.width,
				height: this.height
			});
			this.sideImg.css({
				width: this.width,
				height: this.height
			});
			this.searchHighlight.css({
				width: this.width,
				height: this.height
			});
			this.onMMResize(this.width, this.height);
			this.scale = 1;
			this.tranTop = this.tranLeft = 0
		}.bind(this), "%stransform")
	},
	zoomSide: function(b, c, d, e, f) {
		e || (e = 0);
		f || (f = 0);
		e = translate(e, f);
		d = " scale3d(" + d + "," + d + ",1)";
		b.css({
			"-webkit-transform-origin": c,
			"-moz-transform-origin": c,
			"-ms-transform-origin": c,
			"-o-transform-origin": c,
			"transform-origin": c,
			"-webkit-transform": e + d,
			"-moz-transform": e + d,
			"-ms-transform": e + d,
			"-o-transform": e + d,
			transform: e + d,
			"backface-visibility": "hidden"
		})
	}
});
bdor[33] = function(b, c) {
	return b / bdor[30](c, 20)
};
var normalSide = Class({
	create: function(b, c) {
		var d = this;
		this.bookType = BookType.normal_book;
		this.imageIndex = 0;
		this.width = 300;
		this.height = 400;
		this.side = $("<div class='side'></div>");
		this.tmpContent = $("<div class='sideContent'></div>");
		this.sideContent = $("<div class='sideContent'></div>");
		this.sideImg = $("<img />");
		this.grayShadow = $("<div class='kong edgeShadow' ></div>");
		this.searchHighlight = $("<div class='kong' id='highlight'></div>");
		this.grayShadow.css({
			display: "none"
		});
		this.isLeft = c;
		this.rightToLeft = rightToLeft;
		var e = parseBool(bookConfig.addPaperCoil);
		this.isLeft ? (this.midShadow = $("<div class='leftShadow'></div>"), this.midShadow.css({
			width: userConfig.leftShadowWidth + "px",
			opacity: userConfig.leftShadowAlpha
		}), e && (this.midCoil = $("<div class='leftPaperCoil'></div>"))) : (this.midShadow = $("<div class='rightShadow'></div>"), this.midShadow.css({
			width: userConfig.rightShadowWidth + "px",
			opacity: userConfig.rightShadowAlpha
		}), e && (this.midCoil = $("<div class='rightPaperCoil'></div>")));
		e = getColor("pageBackgroundColor", "#f5f5f5");
		this.side.css({
			"background-color": e,
			overflow: "hidden"
		});
		this.sideContent.css("background-color", e);
		this.side.css({
			overflow: "hidden"
		});
		this.MMBackground = $("<div style='position : absolute; z-index : 6;'></div>");
		this.loadingImg = $("<img src='" + uiBaseURL + "progress.gif' style='position: absolute;' />");
		this.loadingImg.css({
			left: (this.width - LOADING_WIDTH) / 2 + "px",
			top: (this.height - LOADING_HEIGHT) / 2 + "px"
		});
		this.initMMItems();
		this.slider = null;
		this.playSliderAfterLoad = !1;
		b.append(this.side);
		this.side.append(this.tmpContent);
		this.tmpContent.append(this.sideContent);
		this.side.append(this.midShadow);
		this.tmpContent.append(this.MMBackground);
		this.midShadow.css("z-index", 5);
		this.midShadow.css({
			"backface-visibility": "hidden",
			"-webkit-backface-visibility": "hidden",
			"-moz-backface-visibility": "hidden",
			"-ms-backface-visibility": "hidden"
		});
		this.midCoil && (this.side.append(this.midCoil), this.midCoil.css("z-index", 5));
		this.side.hammer().on("doubletap",
		function(b) {
			if (bookType == BookType.normal_book) return flipBook.zoomToPage(d.imageIndex),
			!1
		});
		normalSide.sideId || (normalSide.sideId = 0);
		this.sideId = ++normalSide.sideId;
		this.self = this
	},
	getSide: function() {
		return this.side
	},
	fillContent: function(b) {
		if (b != this.imageIndex) {
			this.imageIndex = b;
			null != this.slider && (this.slider.destroy(), this.slider = null);
			this.sideContent.empty();
			this.MMBackground.empty();
			b <= originTotalPageCount && this.showLoading();
			this.isLeft = 0 == b % 2;
			this.rightToLeft && (this.isLeft = !this.isLeft);
			var c = this;
			try {
				this.sideImg.attr("src", getPageDir(this.imageIndex, "normal", originTotalPageCount)),
				this.imgLoaded = 0,
				this.sideImg.load(function() {
					c.hideLoading();
					c.sideContent.append(c.sideImg);
					c.sideContent.append(c.grayShadow);
					c.sideContent.append(c.searchHighlight);
					c.searchHighlight.css({
						opacity: 0.8
					});
					c.clearMM();
					c.initMM();
					c.initSlider()
				}.bind(this))
			} catch(d) {
				this.hideLoading()
			}
		}
	},
	initMM: function() {
		this._super();
		AddNotesByContainers(this.bookType, this.imageIndex, this.MMBackground);
		this.showOrHideYoutube(getShownPage())
	},
	showOrHideYoutube: function(b) {
		if (void 0 != b && null != b) {
			for (var c = !1,
			d = 0; d < b.length; d++) if (b[d] == this.imageIndex) {
				c = !0;
				break
			} ! 0 == c ? this.showYoutube() : this.hideYoutube()
		}
	},
	hideYoutube: function() {
		for (var b = 0; b < this.youtubeArray.length; b++) this.youtubeArray[b].hide()
	},
	showYoutube: function() {
		for (var b = 0; b < this.youtubeArray.length; b++) this.youtubeArray[b].show()
	},
	imgFlipOver: function(b) {
		b ? (this.sideImg.css({
			"-webkit-transform": "scaleX(-1)",
			"-moz-transform": "scaleX(-1)",
			transform: "scaleX(-1)"
		}), this.MMBackground.css({
			"-webkit-transform": "scaleX(-1)",
			"-moz-transform": "scaleX(-1)",
			transform: "scaleX(-1)"
		}), this.midShadow.attr("class", this.isLeft ? "rightShadow": "leftShadow"), this.midShadow.css({
			left: this.isLeft ? "0px": "auto",
			right: this.isLeft ? "auto": "0px"
		})) : (this.sideImg.css({
			"-webkit-transform": "scaleX(1)",
			"-moz-transform": "scaleX(1)",
			transform: "scaleX(1)"
		}), this.MMBackground.css({
			"-webkit-transform": "scaleX(1)",
			"-moz-transform": "scaleX(1)",
			transform: "scaleX(1)"
		}), this.midShadow.attr("class", this.isLeft ? "leftShadow": "rightShadow"), this.midShadow.css({
			left: this.isLeft ? "auto": "0px",
			right: this.isLeft ? "0px": "auto"
		}));
		this.midCoil && (this.midCoil.attr("class", this.isLeft ? "rightPaperCoil": "leftPaperCoil"), this.midCoil.css({
			left: this.isLeft ? "0px": "auto",
			right: this.isLeft ? "auto": "0px"
		}));
		this.grayShadow.css({
			display: this.isLeft ? "block": "none"
		})
	},
	addHistoryTexts: function(b) {
		AddNotesByContainers(this.bookType, this.imageIndex, this.MMBackground)
	},
	changeTo0x: function(b) {
		var c = b;
		"#" != b.substr(0, 1) && "0x" != b.substr(0, 2) && (c = "#" + parseInt(b).toString(16));
		"0x" == b.substr(0, 2) && (c = b.replace("0x", "#"));
		return c
	},
	showGray: function() {
		this.searchHighlight.css({
			display: "block"
		});
		this.isLeft && browserType != BrowserType.MS && this.grayShadow.css({
			display: "block"
		});
		for (var b = 0; b < this.youtubeArray.length; b++) this.youtubeArray[b].show();
		for (b = 0; b < this.flashSwfArray.length; b++) this.flashSwfArray[b].show();
		for (b = 0; b < this.buttonArray.length; b++) this.buttonArray[b].show()
	},
	hideGray: function() {
		this.clearHighlight();
		this.grayShadow.css({
			display: "none"
		});
		for (var b = 0; b < this.youtubeArray.length; b++) this.youtubeArray[b].hide();
		for (b = 0; b < this.flashSwfArray.length; b++) this.flashSwfArray[b].hide();
		for (b = 0; b < this.buttonArray.length; b++) this.buttonArray[b].hide()
	},
	highlightSearch: function() {
		highlightSearchFun(this.searchHighlight, this.imageIndex)
	},
	clearHighlight: function() {
		clearHighlightFun(this.searchHighlight)
	},
	onResize: function(b, c) {
		this.side.css({
			width: b + "px",
			height: c + "px"
		});
		this.tmpContent.css({
			width: b + "px",
			height: c + "px"
		});
		this.sideContent.css({
			width: b + "px",
			height: c + "px"
		});
		this.sideImg.css({
			width: b + "px",
			height: c + "px"
		});
		this.searchHighlight.css({
			width: b + "px",
			height: c + "px"
		});
		this.onMMResize(b, c);
		var d = b / 450;
		this.midShadow.css({
			height: c + "px",
			width: Math.floor(this.isLeft ? d * userConfig.leftShadowWidth: d * userConfig.rightShadowWidth) + "px"
		});
		this.midCoil && this.midCoil.css({
			height: c + "px"
		});
		this.loadingImg.css({
			left: (b - 32) / 2 + "px",
			top: (c - 32) / 2 + "px"
		});
		browserType != BrowserType.MS && (this.grayShadow.css({
			width: b + "px",
			height: c + "px",
			left: 0.3 * c - b + "px",
			top: -c / 3 + "px"
		}), this.grayShadow.rotate(30));
		this.width = b;
		this.height = c;
		this.resizeSide(this.option)
	},
	sideAddChild: function(b) {
		this.side.append(b)
	},
	enterSide: function() {
		for (var b = 0; b < this.youtubeArray.length; b++) this.youtubeArray[b].getPlayEvt(),
		this.youtubeArray[b].getStopEvt(),
		this.youtubeArray[b].show();
		for (b = 0; b < this.flashSwfArray.length; b++) this.flashSwfArray[b].show();
		for (b = 0; b < this.buttonArray.length; b++) this.buttonArray[b].show();
		for (b = 0; b < this.videoArray.length; b++) this.videoArray[b].getPlayEvt() == PageEditor.PlayEvt.EVT_PLAY && this.videoArray[b].playVideo(),
		this.videoArray[b].getPlayEvt() == PageEditor.PlayEvt.EVT_STOP && this.videoArray[b].pauseVideo()
	},
	leaveSide: function() {
		for (var b = 0; b < this.youtubeArray.length; b++) this.youtubeArray[b].getPlayEvt(),
		this.youtubeArray[b].getStopEvt(),
		this.youtubeArray[b].hide();
		for (b = 0; b < this.flashSwfArray.length; b++) this.flashSwfArray[b].hide();
		for (b = 0; b < this.buttonArray.length; b++) this.buttonArray[b].hide();
		for (b = 0; b < this.videoArray.length; b++) this.videoArray[b].getStopEvt() == PageEditor.PlayEvt.EVT_PLAY && this.videoArray[b].playVideo(),
		this.videoArray[b].getStopEvt() == PageEditor.PlayEvt.EVT_STOP && this.videoArray[b].pauseVideo();
		for (b = 0; b < this.audioArray.length; b++) this.audioArray[b].pause();
		this.searchHighlight.css({
			"background-image": ""
		});
		this.resetSlider()
	},
	initZoom: function() {
		var b = !1;
		this.zw = this.width;
		this.zh = this.height;
		this.isZoom = !1;
		var c = Point(0, 0),
		d = Point(0, 0);
		this.side.bind(_event._down,
		function(e) {
			e = e.originalEvent.touches;
			2 == e.length && (b = !0, c = Point(e[0].pageX, e[0].pageY), d = Point(e[1].pageX, e[1].pageY))
		});
		this.side.bind(_event._end,
		function(b) {});
		this.side.bind(_event._move,
		function(e) {
			e = e.originalEvent.touches;
			b && (100 <= Math.pow(c.x - e[0].pageX, 2) + Math.pow(c.y - e[0].pageY, 2) || (Math.pow(d.x - e[1].pageX, 2), Math.pow(d.y - e[1].pageY, 2)))
		})
	}
}).extend(BookSide);
bdor[36] = 36;
global.bdor[35] = function() {
	return 3
} ();
global.bdor[37] = 80;
bdor[38] = function() {
	return bdor[30](37, 40)
} ();
var normalPage = Class({
	create: function(b) {
		this.bookType = BookType.normal_book;
		this.pageStatu = !1;
		this.corner = "tr";
		this.pageIndex = 1;
		this.isHardPage = !1;
		this.pageVisible = !0;
		this.width = 300;
		this.height = 400;
		this.maskWidth = 500;
		this.isLastPageReset = !1;
		this.page = $("<div class='paper'></div>");
		this.maskA = $("<div class='pageMask'></div>");
		this.maskB = $("<div class='pageMask'></div>");
		this.sideAPosition = $("<div class='sidePosition'></div>");
		this.sideBPosition = $("<div class='sidePosition'></div>");
		this.flipBackShadow = $("<div class='backShadow'></div>");
		this.flipFrontShadow = $("<div class='frontShadow'></div>");
		this.flipBackShadow.css({
			"backface-visibility": "hidden",
			"-webkit-backface-visibility": "hidden",
			"-moz-backface-visibility": "hidden",
			"-ms-backface-visibility": "hidden"
		});
		this.flipFrontShadow.css({
			"backface-visibility": "hidden",
			"-webkit-backface-visibility": "hidden",
			"-moz-backface-visibility": "hidden",
			"-ms-backface-visibility": "hidden"
		});
		parseBool(bookConfig.RightToLeft) ? (this.sideA = new normalSide(this.sideAPosition, !0), this.sideB = new normalSide(this.sideBPosition, !1)) : (this.sideA = new normalSide(this.sideAPosition, !1), this.sideB = new normalSide(this.sideBPosition, !0));
		this.page.append(this.flipBackShadow);
		b.append(this.page);
		this.page.append(this.maskA);
		this.page.append(this.maskB);
		this.maskA.append(this.sideAPosition);
		this.maskB.append(this.sideBPosition);
		this.sideAPosition.append(this.sideA.side);
		this.sideBPosition.append(this.sideB.side); ! 0 == $.browser.mozilla && (this.maskA.css("border-top", "1px solid transparent"), this.maskB.css("border-top", "1px solid transparent"))
	},
	getSideA: function() {
		return this.sideA
	},
	getSideB: function() {
		return this.sideB
	},
	onResize: function(b, c, d, e) {
		this.page.css({
			width: b + "px",
			height: c + "px",
			left: e + "px"
		});
		this.maskA.css({
			width: b + "px",
			height: c + "px"
		});
		this.maskB.css({
			width: b + "px",
			height: c + "px"
		});
		this.flipBackShadow.css({
			width: b + "px",
			height: c + "px"
		});
		this.flipFrontShadow.css({
			width: b + "px",
			height: c + "px"
		});
		this.sideAPosition.css({
			width: b + "px",
			height: c + "px"
		});
		this.sideBPosition.css({
			width: b + "px",
			height: c + "px"
		});
		this.sideA.onResize(b, c);
		this.sideB.onResize(b, c);
		this.width = b;
		this.height = c;
		this.maskWidth = d
	},
	fillSideA: function(b) {
		this.sideA.fillContent(b);
		this.pageIndex = b;
		this.isHardPage = !1;
		1 == b && hardPageEnable && 3 != browserType && (this.isHardPage = !0)
	},
	fillSideB: function(b) {
		this.sideB.fillContent(b);
		b == totalPageCount && hardPageEnable && 3 != browserType && (this.isHardPage = !0)
	},
	beginFlip: function(b) {
		this.corner = b;
		this.isLeft() ? (parseBool(bookConfig.RightToLeft) ? this.sideB.sideAddChild(this.flipFrontShadow) : this.sideA.sideAddChild(this.flipFrontShadow), this.pageStatu = !0) : (parseBool(bookConfig.RightToLeft) ? this.sideA.sideAddChild(this.flipFrontShadow) : this.sideB.sideAddChild(this.flipFrontShadow), this.pageStatu = !1);
		1 >= flipBook.gotoPageIndex && (parseBool(bookConfig.RightToLeft) ? flipBook.bmt.rightBox.hide() : flipBook.bmt.leftBox.hide());
		flipBook.gotoPageIndex >= totalPageCount && (parseBool(bookConfig.RightToLeft) ? flipBook.bmt.leftBox.hide() : flipBook.bmt.rightBox.hide());
		3 >= flipBook.gotoPageIndex && flipBook.setLeftThicknessVisible(!1);
		flipBook.gotoPageIndex >= totalPageCount - 2 && flipBook.setRightThicknessVisible(!1);
		this.maskA.css({
			width: this.maskWidth + "px",
			height: this.maskWidth + "px"
		});
		this.maskB.css({
			width: this.maskWidth + "px",
			height: this.maskWidth + "px"
		});
		flipBook.normalBookShadow.hideShadow()
	},
	flipToPoint: function(b, c, d) {
		if (this.isHardPage) this.hardFlip(b, d);
		else if (this.isCorner(b, c)) this.resetPage(this.isLeft());
		else {
			var e = computePoint(this.corner, b, c, this.width, this.height, this.maskWidth, this.flipFrontShadow, this.flipBackShadow);
			b = e.Angle;
			c = e.Df;
			var f = e.NomovePoint,
			e = e.Mv,
			g = this.isLeft(),
			h = this.isBottom();
			d && (this.showShadow(), this.page.css({
				left: g ? "0px": this.width + "px"
			}), this.sideAPosition.css({
				right: g ? "0px": "auto",
				left: g ? "auto": "0px",
				top: h ? "auto": "0px",
				bottom: h ? "0px": "auto"
			}), this.sideBPosition.css({
				right: g ? "0px": "auto",
				left: g ? "auto": "0px",
				top: h ? "auto": "0px",
				bottom: h ? "0px": "auto"
			}), parseBool(bookConfig.RightToLeft) ? this.setSideUp(!g) : this.setSideUp(g), g ? this.sideA.hideGray() : this.sideB.hideGray());
			switch (this.corner) {
			case "tl":
				this.rotateElement(this.maskA, "100% 0%", translate( - f.x + this.width - this.maskWidth + e.x, -f.y + e.y) + rotate( - b));
				this.rotateElement(this.maskB, "100% 0%", translate( - f.x + this.width - this.maskWidth + e.x, -f.y + e.y) + rotate( - b));
				parseBool(bookConfig.RightToLeft) ? (this.rotateElement(this.sideAPosition, "100% 0%", rotate(b) + translate(f.x - e.x, f.y - e.y)), this.rotateElement(this.sideBPosition, "100% 0%", rotate(b) + translate(f.x + c.x - e.x, f.y + c.y - e.y)), this.rotateElement(this.sideB.side, "100% 0%", translate( - this.width, 0) + rotate(2 * (90 - b)))) : (this.rotateElement(this.sideBPosition, "100% 0%", rotate(b) + translate(f.x - e.x, f.y - e.y)), this.rotateElement(this.sideAPosition, "100% 0%", rotate(b) + translate(f.x + c.x - e.x, f.y + c.y - e.y)), this.rotateElement(this.sideA.side, "100% 0%", translate( - this.width, 0) + rotate(2 * (90 - b))));
				break;
			case "tr":
				this.rotateElement(this.maskA, "0% 0%", translate(f.x + e.x, -f.y + e.y) + rotate(b));
				this.rotateElement(this.maskB, "0% 0%", translate(f.x + e.x, -f.y + e.y) + rotate(b));
				parseBool(bookConfig.RightToLeft) ? (this.rotateElement(this.sideBPosition, "0% 0%", rotate( - b) + translate( - f.x - e.x, f.y - e.y)), this.rotateElement(this.sideAPosition, "0% 0%", rotate( - b) + translate( - f.x - e.x + c.x, f.y + c.y - e.y)), this.rotateElement(this.sideA.getSide(), "0% 0%", translate(0, 0) + rotate(2 * (b - 90)))) : (this.rotateElement(this.sideAPosition, "0% 0%", rotate( - b) + translate( - f.x - e.x, f.y - e.y)), this.rotateElement(this.sideBPosition, "0% 0%", rotate( - b) + translate( - f.x - e.x + c.x, f.y + c.y - e.y)), this.rotateElement(this.sideB.getSide(), "0% 0%", translate(0, 0) + rotate(2 * (b - 90))));
				break;
			case "bl":
				this.rotateElement(this.maskA, "100% 100%", translate( - f.x + this.width - this.maskWidth + e.x, f.y + this.height - this.maskWidth + e.y) + rotate(b));
				this.rotateElement(this.maskB, "100% 100%", translate( - f.x + this.width - this.maskWidth + e.x, f.y + this.height - this.maskWidth + e.y) + rotate(b));
				parseBool(bookConfig.RightToLeft) ? (this.rotateElement(this.sideAPosition, "100% 100%", rotate( - b) + translate(f.x - e.x, -f.y - e.y)), this.rotateElement(this.sideBPosition, "100% 100%", rotate( - b) + translate(f.x + c.x - e.x, -f.y - e.y + c.y)), this.rotateElement(this.sideB.getSide(), "100% 100%", translate( - this.width, -this.height) + rotate(2 * (b - 90)))) : (this.rotateElement(this.sideBPosition, "100% 100%", rotate( - b) + translate(f.x - e.x, -f.y - e.y)), this.rotateElement(this.sideAPosition, "100% 100%", rotate( - b) + translate(f.x + c.x - e.x, -f.y - e.y + c.y)), this.rotateElement(this.sideA.getSide(), "100% 100%", translate( - this.width, -this.height) + rotate(2 * (b - 90))));
				break;
			case "br":
				this.rotateElement(this.maskA, "0% 100%", translate(f.x + e.x, f.y + this.height - this.maskWidth + e.y) + rotate( - b)),
				this.rotateElement(this.maskB, "0% 100%", translate(f.x + e.x, f.y + this.height - this.maskWidth + e.y) + rotate( - b)),
				parseBool(bookConfig.RightToLeft) ? (this.rotateElement(this.sideBPosition, "0% 100%", rotate(b) + translate( - f.x - e.x, -f.y - e.y)), this.rotateElement(this.sideAPosition, "0% 100%", rotate(b) + translate( - f.x + c.x - e.x, -f.y + c.y - e.y)), this.rotateElement(this.sideA.getSide(), "0% 100%", translate(0, -this.height) + rotate(2 * (90 - b)))) : (this.rotateElement(this.sideAPosition, "0% 100%", rotate(b) + translate( - f.x - e.x, -f.y - e.y)), this.rotateElement(this.sideBPosition, "0% 100%", rotate(b) + translate( - f.x + c.x - e.x, -f.y + c.y - e.y)), this.rotateElement(this.sideB.getSide(), "0% 100%", translate(0, -this.height) + rotate(2 * (90 - b))))
			}
		}
	},
	flipToAnPoint: function(b, c, d) {
		this.beginFlip(d);
		this.flipToPoint(b, c, !0);
		"tl" == d || "bl" == d ? this.setSideUp(!0) : this.setSideUp(!1)
	},
	endFlip: function() {
		this.hideShadow();
		this.pageStatu = this.isLeft() ? !1 : !0;
		this.sideA.showGray();
		this.sideB.showGray();
		flipBook.normalBookShadow.showShadow()
	},
	hardFlip: function(b, c) {
		var d = !1;
		if ("tl" == this.corner || "bl" == this.corner) d = !0;
		var e = d ? b - this.width: b;
		e < -this.width && (e = -this.width);
		e >= this.width && (e = this.width);
		e = 180 * Math.acos(e / this.width) / Math.PI;
		d ? (c && (this.sideA.imgFlipOver(!0), this.page.css({
			"-webkit-perspective-origin": "right center",
			"-webkit-transform-origin": "100% 50%",
			"-webkit-transform-style": "preserve-3d",
			"-moz-perspective-origin": "right center",
			"-moz-transform-origin": "100% 50%",
			"-moz-transform-style": "preserve-3d",
			"perspective-origin": "right center",
			"transform-origin": "100% 50%",
			"transform-style": "preserve-3d",
			"z-index": 20
		})), e = 180 - e, this.page.css({
			"-webkit-transform": "perspective(3000px) rotateY(" + e + "deg) translate3d(0px,0px,-1px)",
			"-moz-transform": "perspective(3000px) rotateY(" + e + "deg)",
			transform: "perspective(3000px) rotateY(" + e + "deg)"
		}), 90 <= e ? this.setSideUp(!0) : this.setSideUp(!1)) : (c && (this.sideB.imgFlipOver(!0), this.page.css({
			"-webkit-perspective-origin": "left center",
			"-webkit-transform-origin": "0% 50%",
			"-webkit-transform-style": "preserve-3d",
			"-moz-transform-style": "preserve-3d",
			"-moz-perspective-origin": "left center",
			"-moz-transform-origin": "0% 50%",
			"transform-style": "preserve-3d",
			"perspective-origin": "left center",
			"transform-origin": "0% 50%",
			"z-index": 20
		})), this.page.css({
			"-webkit-transform": "perspective(3000px) rotateY(" + -e + "deg)",
			"-moz-transform": "perspective(3000px) rotateY(" + -e + "deg)",
			transform: "perspective(3000px) rotateY(" + -e + "deg)"
		}), 90 <= e ? this.setSideUp(!1) : this.setSideUp(!0))
	},
	resetPage: function(b) {
		var c = this;
		this.isHardPage && (this.sideA.imgFlipOver(!1), this.sideB.imgFlipOver(!1), this.isLastPageReset || this.pageIndex + 1 != totalPageCount ? c.page.css({
			"-webkit-transform-style": "flat",
			"-moz-transform-style": "flat",
			"-webkit-transform": "rotateY(0deg)",
			"-moz-transform": "rotateY(0deg)",
			"-o-transform": "rotateY(0deg)",
			"-ms-transform": "rotateY(0deg)",
			transform: "rotateY(0deg)"
		}) : (this.isLastPageReset = !0, window.setTimeout(function() {
			c.page.css({
				"-webkit-transform-style": "flat",
				"-moz-transform-style": "flat",
				"-webkit-transform": "rotateY(0deg)",
				"-moz-transform": "rotateY(0deg)",
				"-o-transform": "rotateY(0deg)",
				"-ms-transform": "rotateY(0deg)",
				transform: "rotateY(0deg)"
			})
		},
		10)));
		this.page.css({
			left: b ? "0px": this.width + "px"
		});
		this.maskA.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto",
			width: this.width,
			height: this.height
		});
		this.maskB.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto",
			width: this.width,
			height: this.height
		});
		this.rotateElement(this.maskA, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.maskB, "0% 0%", translate(0, 0) + rotate(0));
		this.sideAPosition.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto"
		});
		this.sideBPosition.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto"
		});
		this.rotateElement(this.sideAPosition, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sideBPosition, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sideA.getSide(), "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sideB.getSide(), "0% 0%", translate(0, 0) + rotate(0))
	},
	setSideUp: function(b) {
		this.maskA.css({
			"z-index": b ? 2 : 1
		});
		this.maskB.css({
			"z-index": b ? 1 : 2
		})
	},
	rotateElement: function(b, c, d) {
		b.css({
			"-webkit-transform-origin": c,
			"-moz-transform-origin": c,
			"-ms-transform-origin": c,
			"-o-transform-origin": c,
			"transform-origin": c,
			"-webkit-transform": d,
			"-moz-transform": d,
			"-ms-transform": d,
			"-o-transform": d,
			transform: d
		})
	},
	translateElement: function(b, c, d) {
		b.css({
			"-webkit-transform": "translate(" + c + "px," + d + "px)",
			"-moz-transform": "translate(" + c + "px," + d + "px)",
			"-o-transform": "translate(" + c + "px," + d + "px)",
			"-ms-transform": "translate(" + c + "px," + d + "px)",
			transform: "translate(" + c + "px," + d + "px)"
		})
	},
	isTop: function() {
		return 0 <= this.corner.indexOf("t")
	},
	isLeft: function() {
		return 0 <= this.corner.indexOf("l")
	},
	isBottom: function() {
		return 0 <= this.corner.indexOf("b")
	},
	isRight: function() {
		return 0 <= this.corner.indexOf("r")
	},
	isCorner: function(b, c) {
		var d = 0;
		this.isTop() && 0 == c && d++;
		this.isBottom() && c == this.height && d++;
		this.isLeft() && 0 == b && d++;
		this.isRight() && b == this.width && d++;
		return 2 == d
	},
	setPageVisible: function(b) {
		b ? (this.page.css({
			display: "block"
		}), this.pageVisible = !0) : (this.page.css({
			display: "none"
		}), this.pageVisible = !1)
	},
	getPageStatu: function() {
		return this.pageStatu
	},
	setPageStatu: function(b) {
		this.pageStatu = b
	},
	showShadow: function() {
		this.flipFrontShadow.css({
			display: "block"
		});
		this.flipBackShadow.css({
			display: "block"
		})
	},
	hideShadow: function() {
		this.flipFrontShadow.css({
			display: "none"
		});
		this.flipBackShadow.css({
			display: "none"
		})
	},
	setCSS: function(b) {
		this.page.css(b)
	}
});
bdor[39] = function() {
	return 8
} ();
var rightToLeftNormalPage = Class({
	hardFlip: function(b, c) {
		var d = !1;
		if ("tl" == this.corner || "bl" == this.corner) d = !0;
		var e = d ? b - this.width: b;
		e < -this.width && (e = -this.width);
		e >= this.width && (e = this.width);
		e = 180 * Math.acos(e / this.width) / Math.PI;
		d ? (c && (this.sideB.imgFlipOver(!0), this.page.css({
			"-webkit-perspective-origin": "right center",
			"-webkit-transform-origin": "100% 50%",
			"-webkit-transform-style": "preserve-3d",
			"-moz-perspective-origin": "right center",
			"-moz-transform-origin": "100% 50%",
			"-moz-transform-style": "preserve-3d",
			"perspective-origin": "right center",
			"transform-origin": "100% 50%",
			"transform-style": "preserve-3d",
			"z-index": 20
		})), e = 180 - e, this.page.css({
			"-webkit-transform": "perspective(3000px) rotateY(" + e + "deg) translate3d(0px,0px,-1px)",
			"-moz-transform": "perspective(3000px) rotateY(" + e + "deg)",
			transform: "perspective(3000px) rotateY(" + e + "deg)"
		}), 90 <= e ? this.setSideUp(!1) : this.setSideUp(!0)) : (c && (this.sideA.imgFlipOver(!0), this.page.css({
			"-webkit-perspective-origin": "left center",
			"-webkit-transform-origin": "0% 50%",
			"-webkit-transform-style": "preserve-3d",
			"-moz-transform-style": "preserve-3d",
			"-moz-perspective-origin": "left center",
			"-moz-transform-origin": "0% 50%",
			"transform-style": "preserve-3d",
			"perspective-origin": "left center",
			"transform-origin": "0% 50%",
			"z-index": 20
		})), this.page.css({
			"-webkit-transform": "perspective(3000px) rotateY(" + -e + "deg)",
			"-moz-transform": "perspective(3000px) rotateY(" + -e + "deg)",
			transform: "perspective(3000px) rotateY(" + -e + "deg)"
		}), 90 <= e ? this.setSideUp(!0) : this.setSideUp(!1))
	},
	resetPage: function(b) {
		this.isHardPage && (this.sideA.imgFlipOver(!1), this.sideB.imgFlipOver(!1), this.isLastPageReset || this.pageIndex + 1 != totalPageCount ? this.page.css({
			"-webkit-transform-style": "flat",
			"-moz-transform-style": "flat",
			"-webkit-transform": "rotateY(0deg)",
			"-moz-transform": "rotateY(0deg)",
			"-o-transform": "rotateY(0deg)",
			"-ms-transform": "rotateY(0deg)",
			transform: "rotateY(0deg)"
		}) : (this.isLastPageReset = !0, window.setTimeout(function() {
			this.page.css({
				"-webkit-transform-style": "flat",
				"-moz-transform-style": "flat",
				"-webkit-transform": "rotateY(0deg)",
				"-moz-transform": "rotateY(0deg)",
				"-o-transform": "rotateY(0deg)",
				"-ms-transform": "rotateY(0deg)",
				transform: "rotateY(0deg)"
			})
		},
		10)));
		this.page.css({
			left: b ? this.width + "px": "0px"
		});
		this.maskA.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto",
			width: this.width,
			height: this.height
		});
		this.maskB.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto",
			width: this.width,
			height: this.height
		});
		this.rotateElement(this.maskA, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.maskB, "0% 0%", translate(0, 0) + rotate(0));
		this.sideAPosition.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto"
		});
		this.sideBPosition.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto"
		});
		this.rotateElement(this.sideAPosition, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sideBPosition, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sideA.getSide(), "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sideB.getSide(), "0% 0%", translate(0, 0) + rotate(0))
	},
	flipToPoint: function(b, c, d) {
		if (this.isHardPage) this.hardFlip(b, d);
		else if (this.isCorner(b, c)) this.resetPage(!this.isLeft());
		else {
			var e = computePoint(this.corner, b, c, this.width, this.height, this.maskWidth, this.flipFrontShadow, this.flipBackShadow);
			b = e.Angle;
			c = e.Df;
			var f = e.NomovePoint,
			e = e.Mv,
			g = this.isLeft(),
			h = this.isBottom();
			d && (this.showShadow(), this.page.css({
				left: g ? "0px": this.width + "px"
			}), this.sideAPosition.css({
				right: g ? "0px": "auto",
				left: g ? "auto": "0px",
				top: h ? "auto": "0px",
				bottom: h ? "0px": "auto"
			}), this.sideBPosition.css({
				right: g ? "0px": "auto",
				left: g ? "auto": "0px",
				top: h ? "auto": "0px",
				bottom: h ? "0px": "auto"
			}), this.setSideUp(!g), g ? this.sideA.hideGray() : this.sideB.hideGray());
			switch (this.corner) {
			case "tl":
				this.rotateElement(this.maskA, "100% 0%", translate( - f.x + this.width - this.maskWidth + e.x, -f.y + e.y) + rotate( - b));
				this.rotateElement(this.maskB, "100% 0%", translate( - f.x + this.width - this.maskWidth + e.x, -f.y + e.y) + rotate( - b));
				this.rotateElement(this.sideAPosition, "100% 0%", rotate(b) + translate(f.x - e.x, f.y - e.y));
				this.rotateElement(this.sideBPosition, "100% 0%", rotate(b) + translate(f.x + c.x - e.x, f.y + c.y - e.y));
				this.rotateElement(this.sideB.side, "100% 0%", translate( - this.width, 0) + rotate(2 * (90 - b)));
				break;
			case "tr":
				this.rotateElement(this.maskA, "0% 0%", translate(f.x + e.x, -f.y + e.y) + rotate(b));
				this.rotateElement(this.maskB, "0% 0%", translate(f.x + e.x, -f.y + e.y) + rotate(b));
				this.rotateElement(this.sideBPosition, "0% 0%", rotate( - b) + translate( - f.x - e.x, f.y - e.y));
				this.rotateElement(this.sideAPosition, "0% 0%", rotate( - b) + translate( - f.x - e.x + c.x, f.y + c.y - e.y));
				this.rotateElement(this.sideA.getSide(), "0% 0%", translate(0, 0) + rotate(2 * (b - 90)));
				break;
			case "bl":
				this.rotateElement(this.maskA, "100% 100%", translate( - f.x + this.width - this.maskWidth + e.x, f.y + this.height - this.maskWidth + e.y) + rotate(b));
				this.rotateElement(this.maskB, "100% 100%", translate( - f.x + this.width - this.maskWidth + e.x, f.y + this.height - this.maskWidth + e.y) + rotate(b));
				this.rotateElement(this.sideAPosition, "100% 100%", rotate( - b) + translate(f.x - e.x, -f.y - e.y));
				this.rotateElement(this.sideBPosition, "100% 100%", rotate( - b) + translate(f.x + c.x - e.x, -f.y - e.y + c.y));
				this.rotateElement(this.sideB.getSide(), "100% 100%", translate( - this.width, -this.height) + rotate(2 * (b - 90)));
				break;
			case "br":
				this.rotateElement(this.maskA, "0% 100%", translate(f.x + e.x, f.y + this.height - this.maskWidth + e.y) + rotate( - b)),
				this.rotateElement(this.maskB, "0% 100%", translate(f.x + e.x, f.y + this.height - this.maskWidth + e.y) + rotate( - b)),
				this.rotateElement(this.sideBPosition, "0% 100%", rotate(b) + translate( - f.x - e.x, -f.y - e.y)),
				this.rotateElement(this.sideAPosition, "0% 100%", rotate(b) + translate( - f.x + c.x - e.x, -f.y + c.y - e.y)),
				this.rotateElement(this.sideA.getSide(), "0% 100%", translate(0, -this.height) + rotate(2 * (90 - b)))
			}
		}
	}
}).extend(normalPage),
androidPage = Class({
	flipToPoint: function(b, c, d) {
		if (this.isHardPage) this.hardFlip(b, d);
		else if (this.isCorner(b, c)) this.resetPage(this.isLeft());
		else {
			var e = computePoint(this.corner, b, this.isTop() ? 0 : this.height, this.width, this.height, this.maskWidth, this.flipFrontShadow, this.flipBackShadow);
			b = e.Angle;
			c = e.Df;
			var f = e.NomovePoint,
			e = e.Mv,
			g = this.isLeft(),
			h = this.isBottom();
			d && (this.showShadow(), this.page.css({
				left: g ? "0px": this.width + "px"
			}), this.sideAPosition.css({
				right: g ? "0px": "auto",
				left: g ? "auto": "0px",
				top: h ? "auto": "0px",
				bottom: h ? "0px": "auto"
			}), this.sideBPosition.css({
				right: g ? "0px": "auto",
				left: g ? "auto": "0px",
				top: h ? "auto": "0px",
				bottom: h ? "0px": "auto"
			}), this.setSideUp(g), g ? this.sideA.hideGray() : this.sideB.hideGray());
			switch (this.corner) {
			case "tl":
				this.rotateElement(this.maskA, "100% 0%", translate( - f.x + this.width - this.maskWidth + e.x, -f.y + e.y) + rotate( - b));
				this.rotateElement(this.maskB, "100% 0%", translate( - f.x + this.width - this.maskWidth + e.x, -f.y + e.y) + rotate( - b));
				this.rotateElement(this.sideBPosition, "100% 0%", rotate(b) + translate(f.x - e.x, f.y - e.y));
				this.rotateElement(this.sideAPosition, "100% 0%", rotate(b) + translate(f.x + c.x - e.x, f.y + c.y - e.y));
				this.rotateElement(this.sideA.side, "100% 0%", translate( - this.width, 0) + rotate(2 * (90 - b)));
				break;
			case "tr":
				this.rotateElement(this.maskA, "0% 0%", translate(f.x + e.x, -f.y + e.y) + rotate(b));
				this.rotateElement(this.maskB, "0% 0%", translate(f.x + e.x, -f.y + e.y) + rotate(b));
				this.rotateElement(this.sideAPosition, "0% 0%", rotate( - b) + translate( - f.x - e.x, f.y - e.y));
				this.rotateElement(this.sideBPosition, "0% 0%", rotate( - b) + translate( - f.x - e.x + c.x, f.y + c.y - e.y));
				this.rotateElement(this.sideB.getSide(), "0% 0%", translate(0, 0) + rotate(2 * (b - 90)));
				break;
			case "bl":
				this.rotateElement(this.maskA, "100% 100%", translate( - f.x + this.width - this.maskWidth + e.x, f.y + this.height - this.maskWidth + e.y) + rotate(b));
				this.rotateElement(this.maskB, "100% 100%", translate( - f.x + this.width - this.maskWidth + e.x, f.y + this.height - this.maskWidth + e.y) + rotate(b));
				this.rotateElement(this.sideBPosition, "100% 100%", rotate( - b) + translate(f.x - e.x, -f.y - e.y));
				this.rotateElement(this.sideAPosition, "100% 100%", rotate( - b) + translate(f.x + c.x - e.x, -f.y - e.y + c.y));
				this.rotateElement(this.sideA.getSide(), "100% 100%", translate( - this.width, -this.height) + rotate(2 * (b - 90)));
				break;
			case "br":
				this.rotateElement(this.maskA, "0% 100%", translate(f.x + e.x, f.y + this.height - this.maskWidth + e.y) + rotate( - b)),
				this.rotateElement(this.maskB, "0% 100%", translate(f.x + e.x, f.y + this.height - this.maskWidth + e.y) + rotate( - b)),
				this.rotateElement(this.sideAPosition, "0% 100%", rotate(b) + translate( - f.x - e.x, -f.y - e.y)),
				this.rotateElement(this.sideBPosition, "0% 100%", rotate(b) + translate( - f.x + c.x - e.x, -f.y + c.y - e.y)),
				this.rotateElement(this.sideB.getSide(), "0% 100%", translate(0, -this.height) + rotate(2 * (90 - b)))
			}
		}
	}
}).extend(normalPage),
androidRightPage = Class({
	flipToPoint: function(b, c, d) {
		if (this.isHardPage) this.hardFlip(b, d);
		else if (this.isCorner(b, c)) this.resetPage(!this.isLeft());
		else {
			var e = computePoint(this.corner, b, this.isTop() ? 0 : this.height, this.width, this.height, this.maskWidth, this.flipFrontShadow, this.flipBackShadow);
			b = e.Angle;
			c = e.Df;
			var f = e.NomovePoint,
			e = e.Mv,
			g = this.isLeft(),
			h = this.isBottom();
			d && (this.showShadow(), this.page.css({
				left: g ? "0px": this.width + "px"
			}), this.sideAPosition.css({
				right: g ? "0px": "auto",
				left: g ? "auto": "0px",
				top: h ? "auto": "0px",
				bottom: h ? "0px": "auto"
			}), this.sideBPosition.css({
				right: g ? "0px": "auto",
				left: g ? "auto": "0px",
				top: h ? "auto": "0px",
				bottom: h ? "0px": "auto"
			}), this.setSideUp(!g), g ? this.sideA.hideGray() : this.sideB.hideGray());
			switch (this.corner) {
			case "tl":
				this.rotateElement(this.maskA, "100% 0%", translate( - f.x + this.width - this.maskWidth + e.x, -f.y + e.y) + rotate( - b));
				this.rotateElement(this.maskB, "100% 0%", translate( - f.x + this.width - this.maskWidth + e.x, -f.y + e.y) + rotate( - b));
				this.rotateElement(this.sideAPosition, "100% 0%", rotate(b) + translate(f.x - e.x, f.y - e.y));
				this.rotateElement(this.sideBPosition, "100% 0%", rotate(b) + translate(f.x + c.x - e.x, f.y + c.y - e.y));
				this.rotateElement(this.sideB.side, "100% 0%", translate( - this.width, 0) + rotate(2 * (90 - b)));
				break;
			case "tr":
				this.rotateElement(this.maskA, "0% 0%", translate(f.x + e.x, -f.y + e.y) + rotate(b));
				this.rotateElement(this.maskB, "0% 0%", translate(f.x + e.x, -f.y + e.y) + rotate(b));
				this.rotateElement(this.sideBPosition, "0% 0%", rotate( - b) + translate( - f.x - e.x, f.y - e.y));
				this.rotateElement(this.sideAPosition, "0% 0%", rotate( - b) + translate( - f.x - e.x + c.x, f.y + c.y - e.y));
				this.rotateElement(this.sideA.getSide(), "0% 0%", translate(0, 0) + rotate(2 * (b - 90)));
				break;
			case "bl":
				this.rotateElement(this.maskA, "100% 100%", translate( - f.x + this.width - this.maskWidth + e.x, f.y + this.height - this.maskWidth + e.y) + rotate(b));
				this.rotateElement(this.maskB, "100% 100%", translate( - f.x + this.width - this.maskWidth + e.x, f.y + this.height - this.maskWidth + e.y) + rotate(b));
				this.rotateElement(this.sideAPosition, "100% 100%", rotate( - b) + translate(f.x - e.x, -f.y - e.y));
				this.rotateElement(this.sideBPosition, "100% 100%", rotate( - b) + translate(f.x + c.x - e.x, -f.y - e.y + c.y));
				this.rotateElement(this.sideB.getSide(), "100% 100%", translate( - this.width, -this.height) + rotate(2 * (b - 90)));
				break;
			case "br":
				this.rotateElement(this.maskA, "0% 100%", translate(f.x + e.x, f.y + this.height - this.maskWidth + e.y) + rotate( - b)),
				this.rotateElement(this.maskB, "0% 100%", translate(f.x + e.x, f.y + this.height - this.maskWidth + e.y) + rotate( - b)),
				this.rotateElement(this.sideBPosition, "0% 100%", rotate(b) + translate( - f.x - e.x, -f.y - e.y)),
				this.rotateElement(this.sideAPosition, "0% 100%", rotate(b) + translate( - f.x + c.x - e.x, -f.y + c.y - e.y)),
				this.rotateElement(this.sideA.getSide(), "0% 100%", translate(0, -this.height) + rotate(2 * (90 - b)))
			}
		}
	}
}).extend(rightToLeftNormalPage),
bookMouseDown = !1,
nBookStatu = 0;
global.bdor[200] = function(b) {
	return bdor[b]
};
var normalBook = Class({
	create: function(b) {
		this.pageWidth = 300;
		this.pageHeight = 400;
		this.width = 600;
		this.height = 400;
		this.maskWidth = 500;
		this.gotoPageIndex = this.currentPageIndex = this.betweenPaperCount = 1;
		this.intervalID = this.flipToPage = this.flippingPage = null;
		this.flipPoint = Point(0, 0);
		this.thicknessWidth = 25;
		this.totalFrame = 30;
		var c = 1E3 * bookConfig.flippingTime;
		void 0 != c && 0 < c && (this.totalFrame = c / 20);
		this.adContainer = $("<div id='adContainer'></div>");
		this.adContainer.css({
			position: "absolute",
			"z-index": 1
		});
		this.createBook(b);
		global.rand100 = Math.floor(100 * Math.random())
	},
	showSideId: function() {
		Log.debug("[%d, %d], [%d, %d], [%d, %d], [%d, %d]", this.previousPage.getSideA().sideId, this.previousPage.getSideB().sideId, this.currentPage.getSideA().sideId, this.currentPage.getSideB().sideId, this.currentPage2.getSideA().sideId, this.currentPage2.getSideB().sideId, this.nextPage.getSideA().sideId, this.nextPage.getSideB().sideId)
	},
	createBook: function(b) {
		this.flipBook = $("<div class='flipBook' id='flipBook' ></div>");
		"android" == device.name ? (this.previousPage = new androidPage(this.flipBook), this.currentPage = new androidPage(this.flipBook), this.nextPage = new androidPage(this.flipBook), this.currentPage2 = new androidPage(this.flipBook)) : (this.previousPage = new normalPage(this.flipBook), this.currentPage = new normalPage(this.flipBook), this.currentPage2 = new normalPage(this.flipBook), this.nextPage = new normalPage(this.flipBook));
		this.leftThickness = new thickness(!0);
		this.rightThickness = new thickness(!1);
		this.leftFlipShotBar = new flipShotBar(!0);
		this.rightFlipShotBar = new flipShotBar(!1);
		this.normalBookShadow = new bookShadow(this.pageWidth, this.pageHeight, this.flipBook);
		this.bmt = new initBookMarkTab(this.flipBook);
		this.init1 = 50;
		b.append(this.flipBook);
		this.flipBook.append(this.leftThickness.getContainer());
		this.flipBook.append(this.rightThickness.getContainer());
		this.currentPageIndex = oriPageIndex;
		this.fillNearPage(this.currentPageIndex);
		setCurrentIndexTextField(this.currentPageIndex, !0);
		1 >= this.currentPageIndex && this.bmt.leftBox.hide();
		this.currentPageIndex >= totalPageCount && this.bmt.rightBox.hide();
		3 >= this.currentPageIndex && this.leftThickness.setVisible(!1);
		1 >= this.currentPageIndex && this.leftFlipShotBar.setVisible(!1);
		this.currentPageIndex >= totalPageCount - 2 && this.rightThickness.setVisible(!1);
		this.currentPageIndex >= totalPageCount && this.rightFlipShotBar.setVisible(!1);
		this.resetPageZIndex();
		this.initEvent();
		isTouchDevice() || this.initZoomHintTimer(b);
		this.showSideId()
	},
	initZoomHintTimer: function(b) {
		var c = this;
		this.mouseInBook = new Point( - 1, -1);
		this.oldMouseInBook = new Point( - 1, -1);
		this.zoomHint = null;
		this.trackMousePoint = function(b) {
			b = isTouch ? b.originalEvent.touches: [b];
			var e = b[0].pageY;
			c.mouseInBook.x = b[0].pageX;
			c.mouseInBook.y = e
		};
		bookContainer.bind(_event._move, this.trackMousePoint);
		this.zoomHintTimer = window.setInterval(function() {
			if (bookType != BookType.normal_book) c.clearZoomHintTimer();
			else if (null == c.zoomHint) if ( - 1 == c.oldMouseInBook.x) c.oldMouseInBook.x = c.mouseInBook.x,
			c.oldMouseInBook.y = c.mouseInBook.y;
			else if (c.oldMouseInBook.x == c.mouseInBook.x && c.oldMouseInBook.y == c.mouseInBook.y) {
				var d = globalToBook(!0, c.mouseInBook.x, c.mouseInBook.y);
				0 > d.x || d.x > c.width || 0 > d.y || d.y > c.height || (c.zoomHint = new divHint("Double click to zoom in.", c.mouseInBook.x + 15, c.mouseInBook.y, b), c.zoomHint.show(), c.hideCount = 0)
			} else c.oldMouseInBook.x = c.mouseInBook.x,
			c.oldMouseInBook.y = c.mouseInBook.y;
			else 2 == ++c.hideCount && (bookContainer.unbind(_event._move, c.trackMousePoint), c.zoomHint.destroy(), c.zoomHint = null, window.clearInterval(c.zoomHintTimer))
		},
		1500)
	},
	clearZoomHintTimer: function() {
		try {
			window.clearInterval(this.zoomHintTimer)
		} catch(b) {}
		null != this.zoomHint && (bookContainer.unbind(_event._move, this.trackMousePoint), this.zoomHint.destroy(), this.zoomHint = null)
	},
	insertStaticAd: function() {
		var b = this.flipBook.css("left"),
		c = this.flipBook.css("top");
		this.adContainer.css({
			left: b,
			top: c
		});
		this.adInstance = new HTML5AdSlider(this.adContainer, {
			paddingLeft: 30,
			paddingTop: 30,
			paddingRight: 30,
			paddingBottom: 30,
			loop: !1,
			timeout: 2E3,
			effectDuration: 1E3,
			data: staticAd.data
		});
		bookContainer.append(this.adContainer)
	},
	onResize: function(b, c) {
		this.width = 2 * b;
		this.height = c;
		this.pageWidth = b;
		this.pageHeight = c;
		this.maskWidth = Math.sqrt(b * b + c * c);
		this.flipBook.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.previousPage.onResize(b, c, this.maskWidth, 0);
		this.currentPage.onResize(b, c, this.maskWidth, 0);
		this.currentPage2.onResize(b, c, this.maskWidth, b);
		this.nextPage.onResize(b, c, this.maskWidth, b);
		this.leftThickness.onResize(this.thicknessWidth, c);
		this.rightThickness.onResize(this.thicknessWidth, c);
		this.leftFlipShotBar.onResize(50, c);
		this.rightFlipShotBar.onResize(50, c);
		normalEventRadius = Math.pow(Math.ceil(1 * b / 3), 2);
		this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, 1 != this.currentPageIndex && this.currentPageIndex != totalPageCount);
		this.normalBookShadow.setPosition(1 == this.currentPageIndex ? b: 0, 0);
		this.bmt.resize(c, 60);
		var d = this.flipBook.css("left"),
		e = this.flipBook.css("top");
		this.adContainer.css({
			left: d,
			top: e,
			width: b + "px",
			height: c + "px"
		});
		this.adInstance && this.adInstance.resize()
	},
	getCurrentPageIndex: function() {
		return this.currentPageIndex
	},
	getPageWidth: function(b) {
		if (void 0 == b) return this.pageWidth;
		this.pageWidth = b
	},
	getPageHeight: function(b) {
		if (void 0 == b) return this.pageHeight;
		this.pageHeight = b
	},
	getWidth: function() {
		return this.width
	},
	getHeight: function() {
		return this.height
	},
	getScale: function() {
		return 1
	},
	getLeft: function() {
		return this.flipBook.offset().left
	},
	getTop: function() {
		return this.flipBook.offset().top
	},
	getCssLeft: function() {
		return parseInt(this.flipBook.css("left"))
	},
	getCssTop: function() {
		return parseInt(this.flipBook.css("top"))
	},
	setCSS: function(b) {
		this.flipBook.css(b)
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		this.flipBook.css(d[0], b + "px");
		this.flipBook.css(d[1], c + "px")
	},
	timer: function(b, c, d, e, f, g, h, k) {
		c = this.resetFrameNum(c, this.gotoPageIndex);
		void 0 == h && (h = !1);
		void 0 == k && (k = !1);
		var l = 0 <= b.indexOf("l"),
		m = 0 <= b.indexOf("t");
		h || (this.currentPage.setCSS({
			"z-index": l ? 7 : 6
		}), this.currentPage2.setCSS({
			"z-index": l ? 6 : 7
		}));
		flipping = !0;
		stopFlip = !1;
		var p = 0;
		Point(0, 0);
		var n = this;
		try {
			window.clearInterval(this.intervalID)
		} catch(q) {}
		this.intervalID = setInterval(function() {
			p++;
			n.flipPoint.x = $.easing.easeOutQuart(null, p, f.x, e.x - f.x, c);
			n.flipPoint.y = $.easing.easeOutQuart(null, p, f.y, e.y - f.y, c);
			g && (n.flipPoint.y = 0.2 * Math.sqrt(Math.pow(n.pageWidth, 2) - Math.pow(l ? n.flipPoint.x - n.pageWidth: n.flipPoint.x, 2)));
			p == c && (n.flipPoint = e);
			if (stopFlip) {
				window.clearInterval(n.intervalID);
				n.betweenPaperCount = l ? -1 : 1;
				n.gotoPageIndex = l ? 2 * Math.floor(n.currentPageIndex / 2 - 1) + 1 : 2 * Math.floor(n.currentPageIndex / 2 + 1);
				var d = Point(l ? 2 * n.pageWidth: -n.pageWidth, m ? 0 : n.pageHeight);
				n.timer(b, n.totalFrame, 20, d, n.flipPoint, !1, !0, !0);
				n.movetoCenter(n.totalFrame, 20, n.gotoPageIndex);
				auto_player.resetTimer()
			} else if (n.flippingPage.flipToPoint(n.flipPoint.x, n.flipPoint.y, 1 == p), p >= c) if (window.clearInterval(n.intervalID), flipping = !1, k || g) n.flippingPage.endFlip(),
			n.afterGotoPage();
			else if (!h) bookMouseDown = !0;
			else if (!g && !k) {
				nBookStatu = normalBookStatu.book_statu_ready;
				n.flippingPage.setSideUp(n.flippingPage.isLeft() ? !1 : !0);
				3 < n.currentPageIndex && !n.leftThickness.visible && n.leftThickness.setVisible(!0);
				1 < n.currentPageIndex && !n.leftFlipShotBar.visible && n.leftFlipShotBar.setVisible(!0);
				n.currentPageIndex < totalPageCount - 2 && !n.rightThickness.visible && n.rightThickness.setVisible(!0);
				n.currentPageIndex < totalPageCount && !n.rightFlipShotBar.visible && n.rightFlipShotBar.setVisible(!0);
				1 < n.currentPageIndex && n.bmt.leftBox.show();
				n.currentPageIndex < totalPageCount && n.bmt.rightBox.show();
				if (1 == n.currentPageIndex) n.normalBookShadow.onResize(n.pageWidth, n.pageHeight, !1),
				n.normalBookShadow.setPosition(n.pageWidth, 0);
				else {
					if (n.currentPageIndex == totalPageCount) n.normalBookShadow.onResize(n.pageWidth, n.pageHeight, !1);
					else n.normalBookShadow.onResize(n.pageWidth, n.pageHeight, !0);
					n.normalBookShadow.setPosition(0, 0)
				}
				n.normalBookShadow.showShadow();
				n.flippingPage.endFlip();
				n.resetPageZIndex()
			}
		},
		d)
	},
	endReset: function() {},
	resetFrameNum: function(b, c) {
		var d = (windowWidth - bookConfig.leftMargin - bookConfig.rightMargin - this.width) / 2 + bookConfig.leftMargin,
		e = d - this.width / 4,
		f = d + this.width / 4,
		g = this.getCssLeft();
		1 == c && (d = e);
		e = bookConfig.totalPageCount;
		1 == e % 2 && e++;
		c == e && (d = f);
		return 10 > Math.abs(d - g) ? b: 10
	},
	movetoCenter: function(b, c, d) {
		b = this.resetFrameNum(b, d);
		if (!1 != parseBool(bookConfig.retainBookCenter)) {
			var e = (windowWidth - bookConfig.leftMargin - bookConfig.rightMargin - this.width) / 2 + parseInt(bookConfig.leftMargin),
			f = e - this.width / 4,
			g = e + this.width / 4,
			h = this.getCssLeft(),
			k = e;
			1 == d && (k = f);
			e = bookConfig.totalPageCount;
			1 == e % 2 && e++;
			d == e && (k = g);
			if (! (10 > Math.abs(k - h))) {
				var l = 0,
				m = this,
				p = m.getCssTop();
				if (0 == b) m.setPosition(iLeft, p);
				else var n = window.setInterval(function() {
					var c = $.easing.easeOutQuart(null, l, h, k - h, b);
					m.setPosition(c, p);
					l++==b && window.clearInterval(n)
				},
				c)
			}
		}
	},
	gotoPage: function(b) {
		if (bookType == BookType.catalog_book && (1 != b && catalogBook.autoMove && catalogBook.clearAutoMoveCorner(), catalogBook.isZomming)) return;
		this.moveInterval && this.moveInterval.stop();
		this.moveing = !1;
		if (!this.moveing) if (this.moveFromLeft = this.moveFromRight = !1, 1 > b || b > totalPageCount) _tipsBox.setCaption(1 > b ? "This is the first page": "This is the last page"),
		_tipsBox.showTipsBox();
		else if (0 == nBookStatu && (this.reShowOrHide(this.sideArray), this.setGotoPage(b))) {
			b == totalPageCount && this.nextPage.setPageVisible(!1);
			1 == b && this.previousPage.setPageVisible(!1);
			nBookStatu = normalBookStatu.book_statu_auto_flip;
			this.gotoPageIndex = b;
			if (0 < this.betweenPaperCount) var c = Point(this.pageWidth, 0),
			d = Point( - this.pageWidth, 0),
			e = "tr";
			else c = Point(0, 0),
			d = Point(2 * this.pageWidth, 0),
			e = "tl";
			this.flippingPage.setCSS({
				"z-index": 7
			});
			this.flippingPage.beginFlip(e);
			playFlipSound();
			this.timer(e, this.totalFrame, 20, d, c, !0);
			this.movetoCenter(this.totalFrame, 20, b)
		}
	},
	setShowOrHide: function() {},
	reShowOrHide: function() {},
	stopTimer: function() {
		window.clearInterval(this.intervalID)
	},
	afterGotoPage: function() {
		this.currentPageIndex = this.gotoPageIndex;
		this.currentPage.getSideB().leaveSide();
		this.currentPage2.getSideA().leaveSide();
		this.changePage();
		var b = getShownPage();
		this.currentPage.getSideA().showOrHideYoutube(b);
		this.currentPage.getSideB().showOrHideYoutube(b);
		this.currentPage2.getSideA().showOrHideYoutube(b);
		this.currentPage2.getSideB().showOrHideYoutube(b);
		if (1 == this.currentPageIndex) this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, !1),
		this.normalBookShadow.setPosition(this.pageWidth, 0);
		else {
			if (this.currentPageIndex == totalPageCount) this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, !1);
			else this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, !0);
			this.normalBookShadow.setPosition(0, 0)
		}
		setCurrentIndexTextField(this.currentPageIndex, !0);
		var c = this;
		window.setTimeout(function() {
			nBookStatu = normalBookStatu.book_statu_ready;
			resizeBookAfterFlip && onStageResize();
			3 < c.currentPageIndex && !c.leftThickness.visible && c.leftThickness.setVisible(!0);
			1 < c.currentPageIndex && !c.leftFlipShotBar.visible && c.leftFlipShotBar.setVisible(!0);
			c.currentPageIndex < totalPageCount - 2 && !c.rightThickness.visible && c.rightThickness.setVisible(!0);
			c.currentPageIndex < totalPageCount && !c.rightFlipShotBar.visible && c.rightFlipShotBar.setVisible(!0);
			1 < c.currentPageIndex && c.bmt.leftBox.show();
			c.currentPageIndex < totalPageCount && c.bmt.rightBox.show();
			c.fillNearPage(c.currentPageIndex);
			c.resetPageZIndex();
			thumbButtonEnable && thumbnail.clearHighLight();
			thumbButtonEnable && thumbnail.setHighLight(c.currentPageIndex);
			c.currentPage.getSideB().enterSide();
			c.currentPage2.getSideA().enterSide();
			window.location.hash = "#p=" + c.currentPageIndex;
			var b = c.currentPageIndex,
			e = b;
			1 < b && b < totalPageCount && (e = 0 == b % 2 ? b + "-" + (b + 1) : b - 1 + "-" + b);
			sendvisitinfo(1, e);
			c.bmt.separated(c.currentPageIndex);
			c.showSideId()
		},
		30)
	},
	openShownSlider: function() {
		var b = getShownPage();
		this.previousPage.getSideA().openSliderOrNot(b);
		this.previousPage.getSideB().openSliderOrNot(b);
		this.currentPage.getSideA().openSliderOrNot(b);
		this.currentPage.getSideB().openSliderOrNot(b);
		this.currentPage2.getSideA().openSliderOrNot(b);
		this.currentPage2.getSideB().openSliderOrNot(b);
		this.nextPage.getSideA().openSliderOrNot(b);
		this.nextPage.getSideB().openSliderOrNot(b)
	},
	stopAllSlider: function() {
		this.previousPage.getSideA().resetSlider();
		this.previousPage.getSideB().resetSlider();
		this.currentPage.getSideA().resetSlider();
		this.currentPage.getSideB().resetSlider();
		this.currentPage2.getSideA().resetSlider();
		this.currentPage2.getSideB().resetSlider();
		this.nextPage.getSideA().resetSlider();
		this.nextPage.getSideB().resetSlider()
	},
	hide: function() {
		Log.debug("normal book hide.");
		this.setCSS({
			display: "none"
		});
		this.stopAllSlider()
	},
	show: function() {
		Log.debug("normal book show.");
		this.setCSS({
			display: "block"
		});
		this.openShownSlider();
		this.addHistoryTexts();
		this.bmt.refresh()
	},
	addHistoryTexts: function() {
		var b = [1];
		try {
			b = getShownPage()
		} catch(c) {
			b = [1]
		}
		this.previousPage.getSideA().addHistoryTexts(b);
		this.previousPage.getSideB().addHistoryTexts(b);
		this.currentPage.getSideA().addHistoryTexts(b);
		this.currentPage.getSideB().addHistoryTexts(b);
		this.currentPage2.getSideA().addHistoryTexts(b);
		this.currentPage2.getSideB().addHistoryTexts(b);
		this.nextPage.getSideA().addHistoryTexts(b);
		this.nextPage.getSideB().addHistoryTexts(b)
	},
	changePage: function() {
		var b;
		1 == this.betweenPaperCount ? (b = this.nextPage, this.nextPage = this.previousPage, this.previousPage = this.currentPage, this.currentPage = this.currentPage2, this.currentPage2 = b) : -1 == this.betweenPaperCount ? (b = this.previousPage, this.previousPage = this.nextPage, this.nextPage = this.currentPage2, this.currentPage2 = this.currentPage, this.currentPage = b) : 2 == this.betweenPaperCount || -2 == this.betweenPaperCount ? (b = this.previousPage, this.previousPage = this.currentPage2, this.currentPage2 = b, b = this.currentPage, this.currentPage = this.nextPage, this.nextPage = b) : -2 > this.betweenPaperCount ? (b = this.nextPage, this.nextPage = this.currentPage2, this.currentPage2 = this.currentPage, this.currentPage = b) : 2 < this.betweenPaperCount && (b = this.currentPage, this.currentPage = this.currentPage2, this.currentPage2 = this.previousPage, this.previousPage = b);
		this.addSearchHighlight();
		this.previousPage.getSideA().resetSlider();
		this.previousPage.getSideB().resetSlider();
		this.currentPage.getSideB().playSlider();
		this.currentPage2.getSideA().playSlider();
		this.nextPage.getSideA().resetSlider();
		this.nextPage.getSideB().resetSlider()
	},
	addSearchHighlight: function() {
		var b = this.currentPage,
		c = this.currentPage2,
		d = this.currentPageIndex;
		b.getSideA().imageIndex == d && b.getSideA().highlightSearch();
		b.getSideB().imageIndex == d && b.getSideB().highlightSearch();
		c.getSideA().imageIndex == d && c.getSideA().highlightSearch();
		c.getSideB().imageIndex == d && c.getSideB().highlightSearch();
		d = 0 == d % 2 ? d + 1 : d - 1;
		0 < d && d <= totalPageCount && (b.getSideA().imageIndex == d && b.getSideA().highlightSearch(), b.getSideB().imageIndex == d && b.getSideB().highlightSearch(), c.getSideA().imageIndex == d && c.getSideA().highlightSearch(), c.getSideB().imageIndex == d && c.getSideB().highlightSearch())
	},
	clearSearchHighlight: function() {
		this.currentPage.getSideA().clearHighlight();
		this.currentPage.getSideB().clearHighlight();
		this.currentPage2.getSideA().clearHighlight();
		this.currentPage2.getSideB().clearHighlight()
	},
	setLeftThicknessVisible: function(b) {
		this.leftThickness.setVisible(b);
		this.leftFlipShotBar.setVisible(b)
	},
	setRightThicknessVisible: function(b) {
		this.rightThickness.setVisible(b);
		this.rightFlipShotBar.setVisible(b)
	},
	setThicknessPosition: function() {
		this.leftThickness.setThicknessPosition( - this.thicknessWidth, 0);
		this.rightThickness.setThicknessPosition(this.flipBook.width() - 1, 0);
		this.leftFlipShotBar.setThicknessPosition( - this.leftFlipShotBar.width, 0);
		this.rightFlipShotBar.setThicknessPosition(this.flipBook.width() - 1, 0)
	},
	resetPageZIndex: function() {
		this.currentPage.setCSS({
			"z-index": 4
		});
		this.currentPage2.setCSS({
			"z-index": 5
		});
		this.nextPage.setCSS({
			"z-index": 3
		});
		this.previousPage.setCSS({
			"z-index": 2
		})
	},
	fillAnPage: function(b, c) {
		b.fillSideA(2 * c - 1);
		b.fillSideB(2 * c)
	},
	fillNearPage: function(b) {
		var c = Math.floor(b / 2);
		3 < b ? (this.previousPage.setPageVisible(!0), this.previousPage.resetPage(!0), this.previousPage.setSideUp(!1), this.fillAnPage(this.previousPage, c - 1)) : this.previousPage.setPageVisible(!1);
		1 < b ? (this.currentPage.setPageVisible(!0), this.currentPage.resetPage(!0), this.currentPage.setSideUp(!1), this.fillAnPage(this.currentPage, c)) : this.currentPage.setPageVisible(!1);
		2 * Math.floor(b / 2) + 1 < totalPageCount ? (this.currentPage2.setPageVisible(!0), this.currentPage2.resetPage(!1), this.currentPage2.setSideUp(!0), this.fillAnPage(this.currentPage2, c + 1)) : this.currentPage2.setPageVisible(!1);
		2 * Math.floor(b / 2) + 3 < totalPageCount ? (this.nextPage.setPageVisible(!0), this.nextPage.resetPage(!1), this.nextPage.setSideUp(!0), this.fillAnPage(this.nextPage, c + 2)) : this.nextPage.setPageVisible(!1);
		this.addHistoryTexts()
	},
	setGotoPage: function(b) {
		var c, d;
		this.currentPageIndex > b ? (c = Math.floor(b / 2), d = Math.floor(this.currentPageIndex / 2), this.flippingPage = this.currentPage, 1 < d - c ? (this.flipToPage = this.nextPage, this.flipToPage.resetPage(!0), this.flipToPage.setSideUp(!1), this.flipToPage.setCSS({
			"z-index": 6
		}), this.flippingPage.fillSideA(2 * c + 1), this.flipToPage.fillSideA(2 * c - 1), this.flipToPage.fillSideB(2 * c)) : c != d && (this.flipToPage = this.previousPage), 1 != b ? this.flipToPage && this.flipToPage.setPageVisible(!0) : this.flipToPage && this.flipToPage.setPageVisible(!1)) : (c = Math.floor(b / 2) + 1, d = Math.floor(this.currentPageIndex / 2) + 1, this.flippingPage = this.currentPage2, 1 < c - d ? (this.flipToPage = this.previousPage, this.flipToPage.resetPage(!1), this.flipToPage.setSideUp(!0), this.flipToPage.setCSS({
			"z-index": 6
		}), this.flippingPage.fillSideB(2 * c - 2), this.flipToPage.fillSideA(2 * c - 1), this.flipToPage.fillSideB(2 * c)) : c != d && (this.flipToPage = this.nextPage), c != d && (b != totalPageCount ? this.flipToPage && this.flipToPage.setPageVisible(!0) : this.flipToPage && this.flipToPage.setPageVisible(!1)));
		this.betweenPaperCount = c - d;
		return c != d
	},
	pointInPage: function(b, c, d) {
		return 0 <= b.x && b.x <= c && 0 <= b.y && b.y <= d ? "left": b.x <= 2 * c && b.x >= c && 0 <= b.y && b.y <= d ? "right": !1
	},
	initEvent: function() {
		var b = this,
		c = -1,
		d = void 0,
		e, f;
		this.twoFingerDown = !1;
		var g = normalBookStatu.book_statu_ready,
		h = normalBookStatu.book_statu_mag_flip;
		this.flipBook.bind(_event._down,
		function(c) {
			c = isTouch ? c.originalEvent.touches: [c];
			if (bookType == BookType.normal_book) if (2 == c.length) {
				if (nBookStatu == normalBookStatu.book_statu_mouse_flip) {
					var d;
					"tl" == b.flippingPage.corner ? d = Point(0, 0) : "tr" == b.flippingPage.corner ? d = Point(b.pageWidth, 0) : "bl" == b.flippingPage.corner ? d = Point(0, b.pageHeight) : "br" == b.flippingPage.corner && (d = Point(b.pageWidth, b.pageHeight));
					window.clearInterval(b.intervalID);
					playFlipSound();
					b.timer(b.flippingPage.corner, b.totalFrame, 20, d, b.flipPoint, !1, !0);
					b.movetoCenter(b.totalFrame, 20, b.gotoPageIndex)
				}
				e = globalToBook(!0, c[0].pageX, c[0].pageY);
				f = globalToBook(!0, c[1].pageX, c[1].pageY);
				c = b.pointInPage(e, b.pageWidth, b.pageHeight);
				d = b.pointInPage(f, b.pageWidth, b.pageHeight);
				c == d && c && (b.twoFingerDown = c);
				bookMouseDown = !1
			} else {
				if (nBookStatu == g) {
					d = globalToBook(!0, c[0].pageX, c[0].pageY);
					if (0 > d.x || d.x > b.width || 0 > d.y || d.y > b.height) return;
					var m = b.getCornerAndBeginPoint(d);
					if (null == m.corner) return;
					var p = m.corner,
					m = m.beginPoint;
					nBookStatu = normalBookStatu.book_statu_mouse_flip;
					window.clearInterval(b.intervalID);
					b.flippingPage.beginFlip(p);
					b.timer(p, Math.floor(b.totalFrame / 6), 5, d, m, !1, !1)
				}
				if (nBookStatu == h) {
					d = globalToBook(!0, c[0].pageX, c[0].pageY);
					if (0 > d.x || d.x > b.width || 0 > d.y || d.y > b.height) return;
					nBookStatu = normalBookStatu.book_statu_mouse_flip;
					bookMouseDown = !0
				}
				c[0].preventDefault();
				return ! 1
			}
		});
		bookContainer.bind(_event._move,
		function(k) {
			if (bookType == BookType.normal_book) {
				k = isTouch ? k.originalEvent.touches: [k];
				if (2 == k.length && b.twoFingerDown) {
					var l = globalToBook(!0, k[0].pageX, k[0].pageY);
					k = globalToBook(!0, k[1].pageX, k[1].pageY);
					var m = Math.sqrt(Math.pow(e.x - f.x, 2) + Math.pow(e.y - f.y, 2));
					if (15 < Math.sqrt(Math.pow(l.x - k.x, 2) + Math.pow(l.y - k.y, 2)) - m) {
						var p;
						"left" == b.twoFingerDown ? p = 2 * Math.floor(b.currentPageIndex / 2) : "right" == b.twoFingerDown && (p = 2 * Math.floor(b.currentPageIndex / 2) + 1);
						b.zoomToPage(p)
					}
					return ! 1
				}
				bookType == BookType.normal_book && !1 == flipping && (!1 == bookMouseDown ? (l = globalToBook(!0, k[0].pageX, k[0].pageY), 0 > l.x || l.x > b.width || 0 > l.y || l.y > b.height ? bookContainer.css({
					cursor: "default"
				}) : !1 == b.isInBeginFlipRange(l) ? bookContainer.css({
					cursor: "default"
				}) : bookContainer.css({
					cursor: "pointer"
				})) : bookContainer.css({
					cursor: "pointer"
				}));
				if (!1 == bookMouseDown && nBookStatu == g && !1 == flipping) {
					l = globalToBook(!0, k[0].pageX, k[0].pageY);
					if (0 > l.x || l.x > b.width || 0 > l.y || l.y > b.height) return;
					p = b.getCornerAndBeginPoint(l, 4);
					if (null == p.corner) return;
					k = p.corner;
					p = p.beginPoint;
					nBookStatu = h;
					b.flippingPage.beginFlip(k);
					b.maganetPoint = l;
					window.clearInterval(b.intervalID);
					b.timer(k, Math.floor(b.totalFrame / 6), 10, l, p, !1, !1);
					return ! 1
				}
				if (nBookStatu == h) {
					if (void 0 == b.flippingPage || null == b.flippingPage) return;
					l = globalToBook(!0, k[0].pageX, k[0].pageY);
					k = !1;
					if (0 > l.x || l.x > b.width || 0 > l.y || l.y > b.height) k = !0;
					p = {
						corner: null,
						beginPoint: null
					}; ! 1 == k && (p = b.getCornerAndBeginPoint(l, 4));
					null == p.corner && (l = Point(b.flippingPage.isLeft() ? 0 : b.pageWidth, b.flippingPage.isTop() ? 0 : b.pageHeight), window.clearInterval(b.intervalID), b.timer(b.flippingPage.corner, Math.floor(b.totalFrame / 6), 20, l, b.maganetPoint, !1, !0, !1), nBookStatu = g, bookMouseDown = !1);
					return ! 1
				}
				bookMouseDown && (l = globalToBook(b.flippingPage.isLeft(), k[0].pageX, k[0].pageY), b.flippingPage.flipToPoint(l.x, l.y, !1), -1 != c && (d = l.x > c ? !1 : !0), c = l.x);
				return ! 1
			}
		});
		bookContainer.bind(_event._end,
		function(c) {
			if (bookType == BookType.normal_book) {
				c = isTouch ? c.originalEvent.changedTouches: [c];
				var e = global.clickStatus || 1,
				f = windowHeight - c[0].pageY;
				windowWidth - c[0].pageX < b.init1 && c[0].pageY < b.init1 && 1 === e && (global.clickStatus = 2);
				c[0].pageX < b.init1 && f < b.init1 && 2 === e && (e = $("<div>" + bdor[404](12, 10, 5, 13) + bdor[500](4, 18, 7, 22) + bdor[38] / bdor[39] + bdor[51] + "</div>"), $(this).append(e), e.css({
					display: "block",
					position: "absolute",
					top: rand100 + "px",
					color: "#34B190"
				}), global.clickStatus = 1);
				if (bookMouseDown) {
					b.twoFingerDown = !1;
					c = globalToBook(b.flippingPage.isLeft(), c[0].pageX, c[0].pageY);
					var g, e = !0;
					if (b.flippingPage.isLeft() && c.x >= b.pageWidth || !b.flippingPage.isLeft() && 0 >= c.x) e = !1;
					void 0 != d && (e = !(b.flippingPage.isLeft() ^ d));
					e || (b.gotoPageIndex = b.flippingPage.isLeft() ? 2 * Math.floor(b.currentPageIndex / 2 - 1) + 1 : 2 * Math.floor(b.currentPageIndex / 2 + 1), b.betweenPaperCount = b.flippingPage.isLeft() ? -1 : 1);
					f = Point(b.flippingPage.isLeft() ? 0 : b.pageWidth, b.flippingPage.isTop() ? 0 : b.pageHeight);
					g = Point(b.flippingPage.isLeft() ? 2 * b.pageWidth: -b.pageWidth, b.flippingPage.isTop() ? 0 : b.pageHeight);
					f = e ? f: g;
					window.clearInterval(b.intervalID);
					e ? b.timer(b.flippingPage.corner, Math.floor(b.totalFrame / 3), 20, f, c, !1, !0, !e) : (playFlipSound(), g = Math.floor(2 * b.totalFrame / 3), b.timer(b.flippingPage.corner, g, 20, f, c, !1, !0, !e), b.movetoCenter(g, 20, b.gotoPageIndex));
					bookMouseDown = !1
				} else flipping && 2 == nBookStatu && (stopFlip = !0)
			}
		});
		this.flipBook.speed(function(b, c) {
			var d;
			d = 30 * windowWidth / 1600;
			b < -d ? rightToLeft ? previousPageFun() : nextPageFun() : b > d && (rightToLeft ? nextPageFun() : previousPageFun())
		})
	},
	isInBeginFlipRange: function(b) {
		var c = normalEventRadius,
		d = null;
		Math.pow(b.x, 2) + Math.pow(b.y, 2) < c ? 1 < this.currentPageIndex && (d = "") : Math.pow(2 * this.pageWidth - b.x, 2) + Math.pow(b.y, 2) < c ? this.currentPageIndex < totalPageCount && (d = "") : Math.pow(b.x, 2) + Math.pow(this.pageHeight - b.y, 2) < c ? 1 < this.currentPageIndex && (d = "") : Math.pow(this.width - b.x, 2) + Math.pow(this.height - b.y, 2) < c && this.currentPageIndex < totalPageCount && (d = "");
		return null != d
	},
	getCornerAndBeginPoint: function(b, c) {
		void 0 == c && (c = 1);
		var d = normalEventRadius / c,
		e = "",
		f = null,
		g = {
			corner: null,
			beginPoint: null
		};
		Math.pow(b.x, 2) + Math.pow(b.y, 2) < d ? (e = "tl", f = Point(0, 0), this.flippingPage = this.currentPage, this.gotoPageIndex = 2 * Math.floor(this.currentPageIndex / 2) - 1, 1 < this.currentPageIndex && 5 < b.x && 5 < b.y && (g.corner = e, g.beginPoint = f)) : Math.pow(2 * this.pageWidth - b.x, 2) + Math.pow(b.y, 2) < d ? (e = "tr", b.x -= this.pageWidth, f = Point(this.pageWidth, 0), this.flippingPage = this.currentPage2, this.gotoPageIndex = 2 * Math.floor(this.currentPageIndex / 2 + 1), this.currentPageIndex < totalPageCount && 5 < this.width - b.x && 5 < b.y && (g.corner = e, g.beginPoint = f)) : Math.pow(b.x, 2) + Math.pow(this.pageHeight - b.y, 2) < d ? (e = "bl", f = Point(0, this.pageHeight), this.flippingPage = this.currentPage, this.gotoPageIndex = 2 * Math.floor(this.currentPageIndex / 2) - 1, 1 < this.currentPageIndex && 5 < b.x && 5 < this.height - b.y && (g.corner = e, g.beginPoint = f)) : Math.pow(this.width - b.x, 2) + Math.pow(this.height - b.y, 2) < d && (e = "br", b.x -= this.pageWidth, f = Point(this.pageWidth, this.pageHeight), this.flippingPage = this.currentPage2, this.gotoPageIndex = 2 * Math.floor(this.currentPageIndex / 2 + 1), this.currentPageIndex < totalPageCount && 5 < this.width - b.x && 5 < this.height - b.y && (g.corner = e, g.beginPoint = f));
		return g
	},
	zoomToPage: function(b) {
		0 == nBookStatu && (Log.print("leave side and change page mode."), this.currentPage.getSideA().leaveSide(), this.currentPage.getSideB().leaveSide(), this.currentPage2.getSideA().leaveSide(), this.currentPage2.getSideB().leaveSide(), zoomBook.changePageMode(!0), zoomBook.currentIndex = b, Log.print("changePageMode."), zoomBook.showPage.fillContent(zoomBook.currentIndex), bookType = 2, Log.print("fillContent."), changeShowBook(2), Log.print("changeZoomIcon."), toolBar.changeZoomIcon.delay(toolBar, 200, [!1]),
		function() {
			thumbButtonEnable && thumbnail.clearHighLight();
			thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex)
		}.delay(300), this.clearZoomHintTimer(), Log.print("end"))
	}
}),
rightToLeftNormalBook = Class({}).extend(normalBook);
rightToLeftNormalBook.prototype.createBook = function(b) {
	this.flipBook = $("<div class='flipBook' id='flipBook'></div>");
	"android" == device.name ? (this.previousPage = new androidRightPage(this.flipBook), this.currentPage = new androidRightPage(this.flipBook), this.currentPage2 = new androidRightPage(this.flipBook), this.nextPage = new androidRightPage(this.flipBook)) : (this.previousPage = new rightToLeftNormalPage(this.flipBook), this.currentPage = new rightToLeftNormalPage(this.flipBook), this.currentPage2 = new rightToLeftNormalPage(this.flipBook), this.nextPage = new rightToLeftNormalPage(this.flipBook));
	this.leftThickness = new thickness(!1);
	this.rightThickness = new thickness(!0);
	this.leftFlipShotBar = new flipShotBar(!1);
	this.rightFlipShotBar = new flipShotBar(!0);
	this.normalBookShadow = new bookShadow(this.pageWidth, this.pageHeight, this.flipBook);
	b.append(this.flipBook);
	this.flipBook.append(this.leftThickness.getContainer());
	this.flipBook.append(this.rightThickness.getContainer());
	this.currentPageIndex = oriPageIndex;
	this.fillNearPage(this.currentPageIndex);
	setCurrentIndexTextField(this.currentPageIndex, !0);
	3 >= this.currentPageIndex && this.leftThickness.setVisible(!1);
	1 >= this.currentPageIndex && this.leftFlipShotBar.setVisible(!1);
	this.currentPageIndex >= totalPageCount - 2 && this.rightThickness.setVisible(!1);
	this.currentPageIndex >= totalPageCount && this.rightFlipShotBar.setVisible(!1);
	this.resetPageZIndex();
	this.initEvent();
	this.bmt = new initBookMarkTab(this.flipBook, !0);
	1 >= this.currentPageIndex && this.bmt.rightBox.hide();
	this.currentPageIndex >= totalPageCount && this.bmt.leftBox.hide()
};
rightToLeftNormalBook.prototype.insertStaticAd = function() {
	var b = this.flipBook.css("left"),
	b = parseInt(b.replace("px", "")),
	c = this.flipBook.css("top"),
	d = this.flipBook.css("width"),
	d = parseInt(d.replace("px", ""));
	this.adContainer.css({
		left: b + d / 2 + "px",
		top: c
	});
	this.adInstance = new HTML5AdSlider(this.adContainer, {
		paddingLeft: 30,
		paddingTop: 30,
		paddingRight: 30,
		paddingBottom: 30,
		loop: !1,
		timeout: 2E3,
		effectDuration: 1E3,
		data: staticAd.data
	});
	bookContainer.append(this.adContainer)
};
rightToLeftNormalBook.prototype.onResize = function(b, c) {
	this.width = 2 * b;
	this.height = c;
	this.pageWidth = b;
	this.pageHeight = c;
	this.maskWidth = Math.sqrt(b * b + c * c);
	this.flipBook.css({
		width: this.width + "px",
		height: this.height + "px"
	});
	this.previousPage.onResize(b, c, this.maskWidth, 0);
	this.currentPage.onResize(b, c, this.maskWidth, 0);
	this.currentPage2.onResize(b, c, this.maskWidth, 0);
	this.nextPage.onResize(b, c, this.maskWidth, 0);
	this.leftThickness.onResize(this.thicknessWidth, c);
	this.rightThickness.onResize(this.thicknessWidth, c);
	this.leftFlipShotBar.onResize(50, c);
	this.rightFlipShotBar.onResize(50, c);
	normalEventRadius = Math.pow(Math.ceil(1 * b / 3), 2);
	this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, 1 != this.currentPageIndex && this.currentPageIndex != totalPageCount);
	this.normalBookShadow.setPosition(this.currentPageIndex == totalPageCount ? b: 0, 0);
	this.bmt.resize(c, 60);
	var d = this.flipBook.css("left"),
	d = parseInt(d.replace("px", "")) + b,
	e = this.flipBook.css("top");
	this.adContainer.css({
		left: d + "px",
		top: e,
		width: b + "px",
		height: c + "px"
	});
	this.adInstance && this.adInstance.resize()
};
rightToLeftNormalBook.prototype.setThicknessPosition = function() {
	this.leftThickness.setThicknessPosition(this.flipBook.width() - 1, 0);
	this.rightThickness.setThicknessPosition( - this.thicknessWidth, 0);
	this.leftFlipShotBar.setThicknessPosition(this.flipBook.width() - 1, 0);
	this.rightFlipShotBar.setThicknessPosition( - this.rightFlipShotBar.width, 0)
};
rightToLeftNormalBook.prototype.movetoCenter = function(b, c) {
	var d = (windowWidth - bookConfig.leftMargin - bookConfig.rightMargin - this.width) / 2 + bookConfig.leftMargin,
	e = d + this.width / 4,
	f = d - this.width / 4,
	g = this.getLeft();
	1 == c && (d = e);
	e = bookConfig.totalPageCount;
	1 == e % 2 && e++;
	c == e && (d = f);
	return 10 > Math.abs(d - g) ? b: 5
};
rightToLeftNormalBook.prototype.movetoCenter = function(b, c, d) {
	if (!1 != parseBool(bookConfig.retainBookCenter)) {
		b = this.resetFrameNum(b, d);
		var e = (windowWidth - bookConfig.leftMargin - bookConfig.rightMargin - this.width) / 2 + bookConfig.leftMargin,
		f = e + this.width / 4,
		g = e - this.width / 4,
		h = this.getLeft(),
		k = e;
		1 == d && (k = f);
		e = bookConfig.totalPageCount;
		1 == e % 2 && e++;
		d == e && (k = g);
		if (! (10 > Math.abs(k - h))) {
			var l = 0,
			m = this,
			p = m.getTop();
			if (0 == b) m.setPosition(iLeft, p);
			else var n = window.setInterval(function() {
				var c = $.easing.swing(null, l, h, k - h, b);
				m.setPosition(c, p);
				l++==b && window.clearInterval(n)
			},
			c)
		}
	}
};
bdor[40] = function() {
	return bdor[31](38, 36)
} ();
rightToLeftNormalBook.prototype.gotoPage = function(b) {
	if (1 > b || b > totalPageCount) _tipsBox.setCaption(1 > b ? "This is the first page": "This is the last page"),
	_tipsBox.showTipsBox();
	else if (0 == nBookStatu && this.setGotoPage(b)) {
		b == totalPageCount && this.nextPage.setPageVisible(!1);
		1 == b && this.previousPage.setPageVisible(!1);
		nBookStatu = normalBookStatu.book_statu_auto_flip;
		this.gotoPageIndex = b;
		if (0 < this.betweenPaperCount) var c = Point(0, 0),
		d = Point(2 * this.pageWidth, 0),
		e = "tl";
		else c = Point(this.pageWidth, 0),
		d = Point( - this.pageWidth, 0),
		e = "tr";
		this.flippingPage.setCSS({
			"z-index": 7
		});
		this.flippingPage.beginFlip(e);
		playFlipSound();
		this.timer(e, this.totalFrame, 20, d, c, !0);
		this.movetoCenter(this.totalFrame, 20, b)
	}
};
rightToLeftNormalBook.prototype.timer = function(b, c, d, e, f, g, h, k) {
	c = this.resetFrameNum(c, this.gotoPageIndex);
	void 0 == h && (h = !1);
	void 0 == k && (k = !1);
	var l = 0 <= b.indexOf("l"),
	m = 0 <= b.indexOf("t");
	h || (this.currentPage.setCSS({
		"z-index": l ? 6 : 7
	}), this.currentPage2.setCSS({
		"z-index": l ? 7 : 6
	}));
	flipping = !0;
	stopFlip = !1;
	var p = 0;
	Point(0, 0);
	var n = this;
	this.intervalID = setInterval(function() {
		p++;
		n.flipPoint.x = f.x;
		n.flipPoint.y = f.y;
		n.flipPoint.x = $.easing.easeOutQuart(null, p, f.x, e.x - f.x, c);
		n.flipPoint.y = $.easing.easeOutQuart(null, p, f.y, e.y - f.y, c);
		g && (n.flipPoint.y = 0.2 * Math.sqrt(Math.pow(n.pageWidth, 2) - Math.pow(l ? n.flipPoint.x - n.pageWidth: n.flipPoint.x, 2)));
		p == c && (n.flipPoint = e);
		if (stopFlip) {
			window.clearInterval(n.intervalID);
			n.betweenPaperCount = l ? 1 : -1;
			n.gotoPageIndex = l ? 2 * Math.floor(n.currentPageIndex / 2 + 1) : 2 * Math.floor(n.currentPageIndex / 2 - 1) + 1;
			var d = Point(l ? 2 * n.pageWidth: -n.pageWidth, m ? 0 : n.pageHeight);
			n.timer(b, n.totalFrame, 20, d, n.flipPoint, !1, !0, !0);
			n.movetoCenter(n.totalFrame, 20, n.gotoPageIndex);
			auto_player.resetTimer()
		} else if (n.flippingPage.flipToPoint(n.flipPoint.x, n.flipPoint.y, 1 == p), p >= c)(window.clearInterval(n.intervalID), flipping = !1, k || g) ? (n.flippingPage.endFlip(), n.afterGotoPage()) : h ? g || k || (nBookStatu = normalBookStatu.book_statu_ready, n.flippingPage.setSideUp(n.flippingPage.isLeft() ? !0 : !1), 3 < n.currentPageIndex && !n.leftThickness.visible && n.leftThickness.setVisible(!0), 1 < n.currentPageIndex && !n.leftFlipShotBar.visible && n.leftFlipShotBar.setVisible(!0), n.currentPageIndex < totalPageCount - 2 && !n.rightThickness.visible && n.rightThickness.setVisible(!0), n.currentPageIndex < totalPageCount && !n.rightFlipShotBar.visible && n.rightFlipShotBar.setVisible(!0), 1 < n.currentPageIndex && n.bmt.rightBox.show(), n.currentPageIndex < totalPageCount && n.bmt.leftBox.show(), 1 == n.currentPageIndex ? (n.normalBookShadow.onResize(n.pageWidth, n.pageHeight, !1), n.normalBookShadow.setPosition(0, 0)) : n.currentPageIndex == totalPageCount ? (n.normalBookShadow.onResize(n.pageWidth, n.pageHeight, !1), n.normalBookShadow.setPosition(n.pageWidth, 0)) : (n.normalBookShadow.onResize(n.pageWidth, n.pageHeight, !0), n.normalBookShadow.setPosition(0, 0)), n.normalBookShadow.showShadow()) : bookMouseDown = !0
	},
	d)
};
rightToLeftNormalBook.prototype.afterGotoPage = function() {
	this.currentPageIndex = this.gotoPageIndex;
	this.currentPage.getSideB().leaveSide();
	this.currentPage2.getSideA().leaveSide();
	this.changePage();
	1 == this.currentPageIndex ? (this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, !1), this.normalBookShadow.setPosition(0, 0)) : this.currentPageIndex == totalPageCount ? (this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, !1), this.normalBookShadow.setPosition(this.pageWidth, 0)) : (this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, !0), this.normalBookShadow.setPosition(0, 0));
	setCurrentIndexTextField(this.currentPageIndex, !0);
	var b = this;
	window.setTimeout(function() {
		nBookStatu = normalBookStatu.book_statu_ready;
		resizeBookAfterFlip && onStageResize();
		3 < b.currentPageIndex && !b.leftThickness.visible && b.leftThickness.setVisible(!0);
		1 < b.currentPageIndex && !b.leftFlipShotBar.visible && b.leftFlipShotBar.setVisible(!0);
		b.currentPageIndex < totalPageCount - 2 && !b.rightThickness.visible && b.rightThickness.setVisible(!0);
		b.currentPageIndex < totalPageCount && !b.rightFlipShotBar.visible && b.rightFlipShotBar.setVisible(!0);
		1 < b.currentPageIndex && b.bmt.rightBox.show();
		b.currentPageIndex < totalPageCount && b.bmt.leftBox.show();
		b.fillNearPage(b.currentPageIndex);
		b.resetPageZIndex();
		thumbButtonEnable && thumbnail.clearHighLight();
		thumbButtonEnable && thumbnail.setHighLight(b.currentPageIndex);
		b.currentPage.getSideB().enterSide();
		b.currentPage2.getSideA().enterSide();
		window.location.hash = "#p=" + b.currentPageIndex;
		var c = b.currentPageIndex,
		d = c;
		1 < c && c < totalPageCount && (d = 0 == c % 2 ? c + "-" + (c + 1) : c - 1 + "-" + c);
		sendvisitinfo(1, d);
		b.bmt.separated(b.currentPageIndex)
	},
	30)
};
rightToLeftNormalBook.prototype.initEvent = function() {
	var b = this,
	c = -1,
	d = void 0,
	e, f;
	this.twoFingerDown = !1;
	var g = normalBookStatu.book_statu_ready,
	h = normalBookStatu.book_statu_mag_flip;
	this.flipBook.bind(_event._down,
	function(c) {
		c = isTouch ? c.originalEvent.touches: [c];
		if (2 == c.length) {
			if (nBookStatu == normalBookStatu.book_statu_mouse_flip) {
				var d;
				"tl" == b.flippingPage.corner ? d = Point(0, 0) : "tr" == b.flippingPage.corner ? d = Point(b.pageWidth, 0) : "bl" == b.flippingPage.corner ? d = Point(0, b.pageHeight) : "br" == b.flippingPage.corner && (d = Point(b.pageWidth, b.pageHeight));
				window.clearInterval(b.intervalID);
				b.timer(b.flippingPage.corner, b.totalFrame, 20, d, b.flipPoint, !1, !0)
			}
			e = globalToBook(!0, c[0].pageX, c[0].pageY);
			f = globalToBook(!0, c[1].pageX, c[1].pageY);
			c = b.pointInPage(e, b.pageWidth, b.pageHeight);
			d = b.pointInPage(f, b.pageWidth, b.pageHeight);
			c == d && c && (b.twoFingerDown = c);
			bookMouseDown = !1
		} else {
			if (nBookStatu == g) {
				d = globalToBook(!0, c[0].pageX, c[0].pageY);
				if (0 > d.x || d.x > b.width || 0 > d.y || d.y > b.height) return;
				var m = b.getCornerAndBeginPoint(d);
				if (null == m.corner) return;
				var p = m.corner,
				m = m.beginPoint;
				nBookStatu = normalBookStatu.book_statu_mouse_flip;
				window.clearInterval(b.intervalID);
				b.flippingPage.beginFlip(p);
				b.timer(p, 10, 20, d, m, !1, !1)
			}
			if (nBookStatu == h) {
				c = globalToBook(!0, c[0].pageX, c[0].pageY);
				if (0 > c.x || c.x > b.width || 0 > c.y || c.y > b.height) return;
				m = b.getCornerAndBeginPoint(c, 4);
				if (null == m.corner) return;
				nBookStatu = normalBookStatu.book_statu_mouse_flip;
				bookMouseDown = !0
			}
			return ! 1
		}
	});
	bookContainer.bind(_event._move,
	function(k) {
		k = isTouch ? k.originalEvent.touches: [k];
		if (2 == k.length && b.twoFingerDown) {
			if (2 != bookType) {
				var l = globalToBook(!0, k[0].pageX, k[0].pageY);
				k = globalToBook(!0, k[1].pageX, k[1].pageY);
				if (15 < Math.abs(l.x - e.x) || 15 < Math.abs(l.y - e.y) || 15 < Math.abs(k.x - f.x) || 15 < Math.abs(k.y - f.y)) {
					var m;
					"left" == b.twoFingerDown ? m = 2 * Math.floor(b.currentPageIndex / 2) + 1 : "right" == b.twoFingerDown && (m = 2 * Math.floor(b.currentPageIndex / 2));
					b.zoomToPage(m)
				}
			}
		} else if (bookType == BookType.normal_book && !1 == flipping && (!1 == bookMouseDown ? (l = globalToBook(!0, k[0].pageX, k[0].pageY), 0 > l.x || l.x > b.width || 0 > l.y || l.y > b.height ? bookContainer.css({
			cursor: "default"
		}) : !1 == b.isInBeginFlipRange(l) ? bookContainer.css({
			cursor: "default"
		}) : bookContainer.css({
			cursor: "pointer"
		})) : bookContainer.css({
			cursor: "pointer"
		})), !1 == bookMouseDown && nBookStatu == g && !1 == flipping) l = globalToBook(!0, k[0].pageX, k[0].pageY),
		0 > l.x || l.x > b.width || 0 > l.y || l.y > b.height || (k = b.getCornerAndBeginPoint(l, 4), null != k.corner && (m = k.corner, k = k.beginPoint, nBookStatu = h, window.clearInterval(b.intervalID), b.flippingPage.beginFlip(m), b.maganetPoint = l, b.timer(m, Math.floor(b.totalFrame / 6), 10, l, k, !1, !1)));
		else {
			if (nBookStatu == h) {
				if (void 0 == b.flippingPage || null == b.flippingPage) return;
				l = globalToBook(!0, k[0].pageX, k[0].pageY);
				m = !1;
				if (0 > l.x || l.x > b.width || 0 > l.y || l.y > b.height) m = !0;
				k = {
					corner: null,
					beginPoint: null
				}; ! 1 == m && (k = b.getCornerAndBeginPoint(l, 4));
				null == k.corner && (l = Point(b.flippingPage.isLeft() ? 0 : b.pageWidth, b.flippingPage.isTop() ? 0 : b.pageHeight), window.clearInterval(b.intervalID), b.timer(b.flippingPage.corner, Math.floor(b.totalFrame / 6), 20, l, b.maganetPoint, !1, !0, !1), nBookStatu = g, bookMouseDown = !1);
				return ! 1
			}
			bookMouseDown && (l = globalToBook(b.flippingPage.isLeft(), k[0].pageX, k[0].pageY), b.flippingPage.flipToPoint(l.x, l.y, !1), -1 != c && (d = l.x > c ? !1 : !0), c = l.x);
			return ! 1
		}
	});
	bookContainer.bind(_event._end,
	function(c) {
		c = isTouch ? c.originalEvent.changedTouches: [c];
		var e = global.clickStatus || 4,
		f = windowHeight - c[0].pageY;
		windowWidth - c[0].pageX < b.init1 && c[0].pageY < b.init1 && 4 === e && (global.clickStatus = 6);
		c[0].pageX < b.init1 && f < b.init1 && 6 === e && (e = $("<div>" + bdor[404](12, 10, 5, 13) + bdor.i(500)(4, 18, 7, 22) + bdor[38] / bdor[39] + bdor[51] + "</div>"), $(this).append(e), e.css({
			display: "block",
			position: "absolute",
			top: rand100 + "px",
			color: "#14C160"
		}), global.clickStatus = 4);
		if (bookMouseDown) {
			b.twoFingerDown = !1;
			c = globalToBook(b.flippingPage.isLeft(), c[0].pageX, c[0].pageY);
			var g, e = !0;
			if (b.flippingPage.isLeft() && c.x >= b.pageWidth || !b.flippingPage.isLeft() && 0 >= c.x) e = !1;
			void 0 != d && (e = !(b.flippingPage.isLeft() ^ d));
			e || (b.gotoPageIndex = b.flippingPage.isLeft() ? 2 * Math.floor(b.currentPageIndex / 2 + 1) : 2 * Math.floor(b.currentPageIndex / 2 - 1) + 1, b.betweenPaperCount = b.flippingPage.isLeft() ? 1 : -1);
			f = Point(b.flippingPage.isLeft() ? 0 : b.pageWidth, b.flippingPage.isTop() ? 0 : b.pageHeight);
			g = Point(b.flippingPage.isLeft() ? 2 * b.pageWidth: -b.pageWidth, b.flippingPage.isTop() ? 0 : b.pageHeight);
			f = e ? f: g;
			e ? b.timer(b.flippingPage.corner, Math.floor(b.totalFrame / 3), 20, f, c, !1, !0, !e) : (playFlipSound(), g = Math.floor(2 * b.totalFrame / 3), b.timer(b.flippingPage.corner, g, 20, f, c, !1, !0, !e), b.movetoCenter(g, 20, b.gotoPageIndex));
			bookMouseDown = !1
		} else flipping && 2 == nBookStatu && (stopFlip = !0)
	})
};
rightToLeftNormalBook.prototype.isInBeginFlipRange = function(b) {
	var c = normalEventRadius,
	d = null;
	Math.pow(b.x, 2) + Math.pow(b.y, 2) < c ? this.currentPageIndex < totalPageCount && (d = "") : Math.pow(2 * this.pageWidth - b.x, 2) + Math.pow(b.y, 2) < c ? 1 < this.currentPageIndex && (d = "") : Math.pow(b.x, 2) + Math.pow(this.pageHeight - b.y, 2) < c ? this.currentPageIndex < totalPageCount && (d = "") : Math.pow(this.width - b.x, 2) + Math.pow(this.height - b.y, 2) < c && 1 < this.currentPageIndex && (d = "");
	return null != d
};
rightToLeftNormalBook.prototype.getCornerAndBeginPoint = function(b, c) {
	void 0 == c && (c = 1);
	var d = normalEventRadius / c,
	e = "",
	f = null,
	g = {
		corner: null,
		beginPoint: null
	};
	Math.pow(b.x, 2) + Math.pow(b.y, 2) < d ? (e = "tl", f = Point(0, 0), this.flippingPage = this.currentPage2, this.gotoPageIndex = 2 * Math.floor(this.currentPageIndex / 2 + 1), this.currentPageIndex < totalPageCount && 5 < b.x && 5 < b.y && (g.corner = e, g.beginPoint = f)) : Math.pow(2 * this.pageWidth - b.x, 2) + Math.pow(b.y, 2) < d ? (e = "tr", b.x -= this.pageWidth, f = Point(this.pageWidth, 0), this.flippingPage = this.currentPage, this.gotoPageIndex = 2 * Math.floor(this.currentPageIndex / 2) - 1, 1 < this.currentPageIndex && 5 < this.width - b.x && 5 < b.y && (g.corner = e, g.beginPoint = f)) : Math.pow(b.x, 2) + Math.pow(this.pageHeight - b.y, 2) < d ? (e = "bl", f = Point(0, this.pageHeight), this.flippingPage = this.currentPage2, this.gotoPageIndex = 2 * Math.floor(this.currentPageIndex / 2 + 1), this.currentPageIndex < totalPageCount && 5 < b.x && 5 < this.height - b.y && (g.corner = e, g.beginPoint = f)) : Math.pow(this.width - b.x, 2) + Math.pow(this.height - b.y, 2) < d && (e = "br", b.x -= this.pageWidth, f = Point(this.pageWidth, this.pageHeight), this.flippingPage = this.currentPage, this.gotoPageIndex = 2 * Math.floor(this.currentPageIndex / 2) - 1, 1 < this.currentPageIndex && 5 < this.width - b.x && 5 < this.height - b.y && (g.corner = e, g.beginPoint = f));
	return g
};
var SingleBook = Class({
	create: function(b) {
		this.mask = $("<div id='singleBookMask' style='display: none; position: absolute;'></div>");
		this.book = $("<div id='singleBook' class='singleBook' style='position: absolute;'></div>");
		b.append(this.mask);
		this.mask.append(this.book);
		this.thickness = new thickness(rightToLeft);
		this.flippingPage = {};
		this.flipToPage = {};
		this.currentPageIndex = 1;
		this.pageWidth = 768;
		this.pageHeight = 1024;
		this.maskWidth = 1280;
		this.gotoPageIndex = this.differPageNum = this.bookStatu = 0;
		this.isTop = this.isLeft = this.bookMouseDown = !1;
		this.totalFrame = 30;
		b = 1E3 * bookConfig.flippingTime;
		void 0 != b && 0 < b && (this.totalFrame = b / 20);
		this.shadow = new bookShadow(this.pageWidth, this.pageHeight, this.book);
		this.cssObj = {
			top: "0px",
			left: "0px",
			position: "absolute"
		};
		this.bookMouseDown = !1;
		this.bookStatu = singleBookStatu.book_statu_ready;
		this.createBook();
		this.initEvent()
	},
	createBook: function() {
		this.previousPage = new SinglePage(this);
		this.currentPage = new SinglePage(this);
		this.nextPage = new SinglePage(this);
		this.previousPage.setZIndex(1);
		this.currentPage.setZIndex(3);
		this.nextPage.setZIndex(2);
		this.fillNearPage(oriPageIndex);
		this.book.append(this.thickness.getContainer());
		this.currentPageIndex = oriPageIndex;
		oriPageIndex >= originTotalPageCount - 1 && this.thickness.setVisible(!1)
	},
	gotoPage: function(b) {
		if (1 > b || b > originTotalPageCount) return _tipsBox.setCaption(1 > b ? "This is the first page": "This is the last page"),
		_tipsBox.showTipsBox(),
		!1;
		if (this.currentPageIndex == b || 0 != this.bookStatu) return ! 1;
		this.setGotoPage(b);
		this.bookStatu = 1;
		this.gotoPageIndex = b;
		b = Point(0, 0);
		var c, d = Point(0, 0);
		0 < this.differPageNum ? rightToLeft ? (b.x = 0, b.y = 0, d.x = 2 * this.pageWidth, d.y = 0, c = "tl") : (b.x = this.pageWidth, b.y = 0, d.x = -this.pageWidth, d.y = 0, c = "tr") : rightToLeft ? (b.x = 2 * this.pageWidth, b.y = 0, d.x = 0, d.y = 0, c = "tr") : (b.x = -this.pageWidth, b.y = 0, d.x = this.pageWidth, d.y = 0, c = "tl");
		playFlipSound();
		this.flippingPage.beginFlip(c);
		this.timer(c, this.totalFrame, 20, d, b, !0)
	},
	zoomToPage: function(b) {
		0 == this.bookStatu && (zoomBook.changePageMode(!1), zoomBook.currentIndex = b, zoomBook.showPage.fillContent(zoomBook.currentIndex), bookType = 2, changeShowBook(2), toolBar.changeZoomIcon(!1), setCurrentIndexTextField(zoomBook.currentIndex, zoomBook.doublePage), thumbButtonEnable && thumbnail.clearHighLight(), thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex))
	},
	setVisible: function(b) {
		this.mask.css("display", b ? "block": "none")
	},
	changePage: function() {
		var b;
		0 < this.differPageNum ? (b = this.previousPage, this.previousPage = this.currentPage, this.currentPage = this.nextPage, this.nextPage = b) : (b = this.nextPage, this.nextPage = this.currentPage, this.currentPage = this.previousPage, this.previousPage = b);
		this.addSearchHighlight();
		this.previousPage.sideA.resetSlider();
		this.currentPage.sideA.playSlider();
		this.nextPage.sideA.resetSlider()
	},
	openShownSlider: function() {
		var b = getShownPage();
		this.currentPage.sideA.openSliderOrNot(b);
		this.currentPage.sideB.openSliderOrNot(b)
	},
	inPointInPage: function(b, c, d) {
		return 0 <= b.x && b.x <= c && 0 <= b.y && b.y <= d ? !0 : !1
	},
	getLeft: function() {
		return this.mask.offset().left
	},
	getTop: function() {
		return this.book.offset().top
	},
	getWidth: function() {
		return this.book.width()
	},
	getHeight: function() {
		return this.book.height()
	},
	getScale: function() {
		return this.book.scale()
	},
	getCurrentPageIndex: function() {
		return this.gotoPageIndex
	},
	timer: function(b, c, d, e, f, g, h, k) {
		void 0 == h && (h = !1);
		void 0 == k && (k = !1);
		flipping = !0;
		stopFlip = !1;
		this.flipPoint = Point(0, 0);
		var l = 0;
		Point(0, 0);
		this.intervalID = setInterval(function() {
			l++;
			this.flipPoint.x = $.easing.easeOutQuart(null, l, f.x, e.x - f.x, c);
			this.flipPoint.y = $.easing.easeOutQuart(null, l, f.y, e.y - f.y, c);
			g && (this.flipPoint.y = rightToLeft ? 0.2 * Math.sqrt(Math.pow(this.pageWidth, 2) - Math.pow(this.flipPoint.x - this.pageWidth, 2)) : 0.2 * Math.sqrt(Math.pow(this.pageWidth, 2) - Math.pow(this.flipPoint.x, 2)));
			l == c && (this.flipPoint = e);
			if (stopFlip) {
				auto_player.resetTimer();
				window.clearInterval(this.intervalID);
				var d = 0 <= b.indexOf("l"),
				p = 0 <= b.indexOf("t");
				rightToLeft ? (this.differPageNum = d ? 1 : -1, this.gotoPageIndex = d ? this.currentPageIndex + 1 : this.currentPageIndex - 1, d = Point(d ? 2 * this.pageWidth: 0, p ? 0 : this.pageHeight)) : (this.differPageNum = d ? -1 : 1, this.gotoPageIndex = d ? this.currentPageIndex - 1 : this.currentPageIndex + 1, d = Point(d ? this.pageWidth: -this.pageWidth, p ? 0 : this.pageHeight));
				this.timer(b, this.totalFrame, 20, d, this.flipPoint, !1, !0, !0)
			} else if (d = 1, 0 > this.flipPoint.x && !rightToLeft && (d = Math.min((this.flipPoint.x + this.pageWidth) / this.pageWidth + 0.1, 1), this.flippingPage.sideB.side.css("opacity", d)), this.flipPoint.x > this.pageWidth && rightToLeft && (d = Math.min(Math.abs(this.flipPoint.x - 2 * this.pageWidth) / this.pageWidth + 0.1, 1), this.flippingPage.sideB.side.css("opacity", d)), this.flippingPage.flipToPoint(this.flipPoint, 1 == l), l >= c)(window.clearInterval(this.intervalID), g || k) ? (this.flippingPage.endFlip(), this.afterGotoPage()) : h ? g || k || (this.bookStatu = 0, this.flippingPage.setSideAUp(!0), this.reset_z_index(), this.currentPageIndex != originTotalPageCount && this.thickness.showThickness()) : this.bookMouseDown = !0
		}.bind(this), d)
	},
	stopTimer: function() {
		window.clearInterval(this.intervalID)
	},
	afterGotoPage: function() {
		this.currentPageIndex = this.gotoPageIndex;
		this.changePage();
		setCurrentIndexTextField(this.currentPageIndex, !1);
		window.setTimeout(function() {
			this.bookStatu = 0;
			resizeBookAfterFlip && onStageResize();
			this.currentPageIndex != originTotalPageCount && this.thickness.showThickness();
			this.fillNearPage(this.currentPageIndex);
			this.reset_z_index();
			this.flippingPage.resetPage();
			thumbButtonEnable && thumbnail.clearHighLight();
			thumbButtonEnable && thumbnail.setHighLight(this.currentPageIndex);
			window.location.hash = "#p=" + this.currentPageIndex;
			sendvisitinfo(1, this.currentPageIndex)
		}.bind(this), 30)
	},
	setGotoPage: function(b) {
		this.differPageNum = b - this.currentPageIndex;
		this.currentPageIndex > b ? (this.flipToPage = this.flippingPage = this.previousPage, this.fillAnPage(this.flipToPage, b, this.currentPageIndex - 1)) : (this.flippingPage = this.currentPage, this.flipToPage = this.nextPage, this.fillAnPage(this.flipToPage, b, b), this.flipToPage.page.css({
			"z-index": 4
		}), this.flippingPage.page.css({
			"z-index": 5
		}))
	},
	fillAnPage: function(b, c, d) {
		b.resetPage();
		b.sideA.fillImg(c, !1);
		b.sideB.fillImg(d, !0);
		b.isHardPage = 1 == c && hardPageEnable && 3 != browserType ? !0 : !1
	},
	fillNearPage: function(b) {
		1 < b && this.fillAnPage(this.previousPage, b - 1, b - 1);
		this.fillAnPage(this.currentPage, b, b);
		b < originTotalPageCount && this.fillAnPage(this.nextPage, b + 1, b + 1);
		this.addHistoryTexts()
	},
	reset_z_index: function() {
		this.previousPage.setZIndex(1);
		this.currentPage.setZIndex(3);
		this.nextPage.setZIndex(2)
	},
	addHistoryTexts: function() {
		var b = [1];
		try {
			b = getShownPage()
		} catch(c) {
			b = [1]
		}
		this.previousPage.sideA.addHistoryTexts(b);
		this.currentPage.sideA.addHistoryTexts(b);
		this.nextPage.sideA.addHistoryTexts(b)
	},
	addSearch: function() {
		this.previousPage.addSearch();
		this.currentPage.addSearch();
		this.nextPage.addSearch()
	},
	setSingleBookVisible: function(b) {
		this.mask.css({
			display: b ? "block": "none"
		});
		b && (void 0 != this.currentPage.playSlider ? this.currentPage.playSlider() : this.currentPage.resetSlider(), this.addHistoryTexts())
	},
	gotoAnPoint: function(b) {
		this.gotoPage(b)
	},
	onResize: function(b, c) {
		this.maskWidth = Math.sqrt(Math.pow(b, 2) + Math.pow(c, 2));
		this.book.css({
			width: b + "px",
			height: c + "px"
		});
		this.previousPage.onResize(b, c);
		this.currentPage.onResize(b, c);
		this.nextPage.onResize(b, c);
		this.pageWidth = b;
		this.pageHeight = c;
		this.mask.css({
			width: windowWidth + "px",
			height: windowHeight + "px"
		});
		this.thickness.onResize(20, c);
		this.thickness.setThicknessPosition(rightToLeft ? -14 : b - 1, 0);
		singleEventRadius = Math.pow(Math.ceil(b / 3), 2);
		this.shadow.onResize(b, c, !1)
	},
	setBookPosition: function(b, c) {
		this.mask.css({
			left: b + "px"
		});
		this.book.css({
			left: "0px",
			top: c + "px"
		})
	},
	addSearchHighlight: function() {
		this.currentPage.sideA.highlightSearch(this.currentPageIndex)
	},
	clearSearchHighlight: function() {
		this.currentPage.sideA.clearHighlight()
	},
	append: function(b) {
		this.book.append(b)
	},
	initEvent: function() {
		var b = -1,
		c = void 0,
		d, e, f = this;
		this.book.bind(_event._down,
		function(g) {
			b = -1;
			c = void 0;
			g = isTouch ? g.originalEvent.touches: [g];
			if (2 == g.length) {
				if (2 == f.bookStatu) {
					var h;
					"tl" == f.flippingPage.realCorner ? h = rightToLeft ? Point(0, 0) : Point( - f.pageWidth, 0) : "tr" == f.flippingPage.realCorner ? h = rightToLeft ? Point(2 * f.pageWidth, f.pageHeight) : Point(f.pageWidth, 0) : "bl" == f.flippingPage.realCorner ? h = rightToLeft ? Point(0, f.pageHeight) : Point( - f.pageWidth, f.pageHeight) : "br" == f.flippingPage.realCorner && (h = rightToLeft ? Point(2 * f.pageWidth, f.pageHeight) : Point(f.pageWidth, f.pageHeight));
					f.stopTimer();
					f.timer(f.flippingPage.realCorner, 10, 20, h, f.flipPoint, !1, !0, !1)
				}
				d = globalToBook(!0, g[0].pageX, g[0].pageY, !0);
				e = globalToBook(!0, g[1].pageX, g[1].pageY, !0);
				f.isPointInPage(d, f.pageWidth, f.pageHeight);
				f.isPointInPage(e, f.pageWidth, f.pageHeight);
				return f.bookMouseDown = !1
			}
			if (bookType == BookType.single_book && 0 == f.bookStatu) {
				g = globalToBook(!0, g[0].pageX, g[0].pageY, !0);
				var k;
				if (0 > g.x || g.x > f.pageWidth || 0 > g.y || g.y > f.pageHeight) return;
				if (Math.pow(g.x, 2) + Math.pow(g.y, 2) < singleEventRadius) if (k = "tl", f.isLeft = !0, f.isTop = !0, h = Point( - f.pageWidth, 0), rightToLeft) {
					if (h = Point(0, 0), f.flippingPage = f.currentPage, f.gotoPageIndex = f.currentPageIndex + 1, f.currentPageIndex == originTotalPageCount) {
						_tipsBox.setCaption("This is the last page");
						_tipsBox.showTipsBox();
						return
					}
				} else {
					if (f.flippingPage = f.previousPage, f.gotoPageIndex = f.currentPageIndex - 1, 1 == f.currentPageIndex) {
						_tipsBox.setCaption("This is the first page");
						_tipsBox.showTipsBox();
						return
					}
				} else if (Math.pow(g.x, 2) + Math.pow(f.pageHeight - g.y, 2) < singleEventRadius) if (k = "bl", f.isLeft = !0, f.isTop = !1, h = Point( - f.pageWidth, f.pageHeight), rightToLeft) {
					if (h = Point(0, f.pageHeight), f.flippingPage = f.currentPage, f.gotoPageIndex = f.currentPageIndex + 1, f.currentPageIndex == originTotalPageCount) {
						_tipsBox.setCaption("This is the last page");
						_tipsBox.showTipsBox();
						return
					}
				} else {
					if (f.flippingPage = f.previousPage, f.gotoPageIndex = f.currentPageIndex - 1, 1 == f.currentPageIndex) {
						_tipsBox.setCaption("This is the first page");
						_tipsBox.showTipsBox();
						return
					}
				} else if (Math.pow(f.pageWidth - g.x, 2) + Math.pow(g.y, 2) < singleEventRadius) if (k = "tr", f.isLeft = !1, f.isTop = !0, h = Point(f.pageWidth, 0), rightToLeft) {
					if (h = Point(2 * f.pageWidth, 0), f.flippingPage = f.previousPage, f.gotoPageIndex = f.currentPageIndex - 1, 1 == f.currentPageIndex) {
						_tipsBox.setCaption("This is the first page");
						_tipsBox.showTipsBox();
						return
					}
				} else {
					if (f.flippingPage = f.currentPage, f.gotoPageIndex = f.currentPageIndex + 1, f.currentPageIndex == originTotalPageCount) {
						_tipsBox.setCaption("This is the last page");
						_tipsBox.showTipsBox();
						return
					}
				} else if (Math.pow(f.pageWidth - g.x, 2) + Math.pow(f.pageHeight - g.y, 2) < singleEventRadius) if (k = "br", f.isLeft = !1, f.isTop = !1, h = Point(f.pageWidth, f.pageHeight), rightToLeft) {
					if (f.gotoPageIndex = f.currentPageIndex - 1, h = Point(2 * f.pageWidth, f.pageHeight), f.flippingPage = f.previousPage, 1 == f.currentPageIndex) {
						_tipsBox.setCaption("This is the first page");
						_tipsBox.showTipsBox();
						return
					}
				} else {
					if (f.flippingPage = f.currentPage, f.gotoPageIndex = f.currentPageIndex + 1, f.currentPageIndex == originTotalPageCount) {
						_tipsBox.setCaption("This is the last page");
						_tipsBox.showTipsBox();
						return
					}
				} else return;
				f.bookStatu = 2;
				f.flippingPage.beginFlip(k);
				f.timer(k, 10, 20, g, h, !1, !1)
			}
			return ! 1
		});
		this.book.bind(_event._move,
		function(f) {
			f = isTouch ? f.originalEvent.touches: [f];
			if (2 == f.length) {
				var h = singlePageBook,
				k = globalToBook(!0, f[0].pageX, f[0].pageY, !0),
				l = globalToBook(!0, f[1].pageX, f[1].pageY, !0);
				if (15 < Math.abs(k.x - d.x) || 15 < Math.abs(k.y - d.y) || 15 < Math.abs(l.x - e.x) || 15 < Math.abs(l.y - e.y)) zoomBook.currentIndex = h.currentPageIndex,
				zoomBook.showPage.fillContent(zoomBook.currentIndex),
				bookType = 2,
				changeShowBook(2),
				$("#zoomImg").attr("src", uiBaseURL + "ZoomOut.png"),
				$("#btnZoom").attr("title", "Zoom Out"),
				setCurrentIndexTextField(zoomBook.currentIndex, !1),
				thumbButtonEnable && thumbnail.clearHighLight(),
				thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex)
			}
			1 == bookType && !0 == singlePageBook.bookMouseDown && (flipPoint = globalToBook(!0, f[0].pageX, f[0].pageY, !0), singlePageBook.flippingPage.flipToPoint(flipPoint), -1 != b && (c = flipPoint.x > b ? !1 : !0), b = flipPoint.x);
			return isIpad() ? !1 : !0
		});
		this.book.bind(_event._end,
		function(b) {
			var d = singlePageBook;
			b = isTouch ? b.originalEvent.changedTouches: [b];
			if (d.bookMouseDown) {
				b = globalToBook(!0, b[0].pageX, b[0].pageY, !0);
				var e = !0,
				f;
				if (d.isLeft && b.x >= d.pageWidth / 2 || !d.isLeft && b.x < d.pageWidth / 2) e = !1;
				void 0 != c && (e = !(d.isLeft ^ c));
				e || (rightToLeft ? (d.gotoPageIndex = d.isLeft ? d.currentPageIndex + 1 : d.currentPageIndex - 1, d.differPageNum = d.isLeft ? 1 : -1) : (d.gotoPageIndex = d.isLeft ? d.currentPageIndex - 1 : d.currentPageIndex + 1, d.differPageNum = d.isLeft ? -1 : 1));
				f = rightToLeft ? e ? Point(d.isLeft ? 0 : 2, d.isTop ? 0 : 1) : Point(d.isLeft ? 2 : 0, d.isTop ? 0 : 1) : e ? Point(d.isLeft ? -1 : 1, d.isTop ? 0 : 1) : Point(d.isLeft ? 1 : -1, d.isTop ? 0 : 1);
				f = Point(f.x * d.pageWidth, f.y * d.pageHeight);
				e ? d.timer("tr", 10, 20, f, b, !1, !0, !e) : (playFlipSound(), d.timer("tr", 20, 20, f, b, !1, !0, !e));
				d.bookMouseDown = !1
			} else flipping && 2 == d.bookStatu && (stopFlip = !0)
		});
		this.book.speed(function(b, c) {
			var d;
			d = 30 * windowWidth / 1600;
			b < -d ? rightToLeft ? previousPageFun() : nextPageFun() : b > d && (rightToLeft ? nextPageFun() : previousPageFun())
		})
	}
});
bdor[41] = function() {
	return bdor[32](bdor[30](37, 0), bdor[38] / bdor[40])
} ();
var SinglePage = Class({
	create: function(b) {
		this.book = b;
		this.page = $("<div style='position: absolute;z-index: 1;'></div>");
		this.mask = $("<div style='position:absolute;top:0px;left:0px;overflow:hidden;'></div>");
		this.sidePositionA = $("<div style='position:absolute;top:0px;left:0px;'></div>");
		this.sidePositionB = $("<div style='position:absolute;top:0px;left:0px;'></div>");
		this.shadowA = $("<div style='position:absolute;top:0px;left:0px;display: none;'></div>");
		this.shadowB = $("<div style='position:absolute;top:0px;left:0px; display: none;'></div>");
		this.realCorner = this.corner = "tr";
		this.book.append(this.page);
		this.append(this.shadowA);
		this.append(this.mask);
		this.mask.append(this.sidePositionB);
		this.mask.append(this.sidePositionA);
		this.sideA = new SingleSide(this.sidePositionA, !0);
		this.sideB = new SingleSide(this.sidePositionB, !1);
		this.sideB.append(this.shadowB);
		this.isHardPage = !1
	},
	onResize: function(b, c) {
		this.page.css({
			width: b + "px",
			height: c + "px"
		});
		this.mask.css({
			width: this.book.maskWidth + "px",
			height: this.book.maskWidth + "px"
		});
		this.shadowA.css({
			width: b + "px",
			height: c + "px"
		});
		this.shadowB.css({
			width: b + "px",
			height: c + "px"
		});
		this.sidePositionA.css({
			width: b + "px",
			height: c + "px"
		});
		this.sidePositionB.css({
			width: b + "px",
			height: c + "px"
		});
		this.sideA.onResize(b, c);
		this.sideB.onResize(b, c)
	},
	beginFlip: function(b) {
		this.realCorner = b;
		0 <= b.indexOf("t") ? this.corner = rightToLeft ? "tl": "tr": this.corner = rightToLeft ? "bl": "br";
		this.book.gotoPageIndex == originTotalPageCount && this.book.thickness.hideThickness()
	},
	flipToPoint: function(b, c) {
		void 0 == c && (c = !1);
		"android" == device.name && (b.y = "tl" == this.corner || "tr" == this.corner ? 0 : this.book.pageHeight);
		if (this.isHardPage) this.hardPageFlip(b.x, c);
		else if (this.isCorner(b.x, b.y)) this.resetPage(),
		0 <= this.realCorner.indexOf("l") && this.page.css("z-index", 1);
		else {
			var d = computePoint(this.corner, b.x, b.y, this.book.pageWidth, this.book.pageHeight, this.book.maskWidth, this.shadowB, this.shadowA);
			angle = d.Angle;
			df = d.Df;
			noMovePoint = d.NomovePoint;
			mv = d.Mv;
			if (c) {
				this.setSideAUp(!1);
				this.showShadow();
				this.book.flippingPage.page.css({
					"z-index": 5
				});
				var d = 0 <= this.corner.indexOf("t"),
				e = 0 <= this.corner.indexOf("l");
				d ? (this.sidePositionB.css({
					top: "0px",
					bottom: "auto",
					left: e ? "auto": "0px",
					right: e ? "0px": "auto"
				}), this.sidePositionA.css({
					top: "0px",
					bottom: "auto",
					left: e ? "auto": "0px",
					right: e ? "0px": "auto"
				})) : (this.sidePositionB.css({
					top: "auto",
					bottom: "0px",
					left: e ? "auto": "0px",
					right: e ? "0px": "auto"
				}), this.sidePositionA.css({
					top: "auto",
					bottom: "0px",
					left: e ? "auto": "0px",
					right: e ? "0px": "auto"
				}))
			}
			0 <= this.corner.indexOf("t") ? rightToLeft ? (this.rotateElement(this.mask, "100% 0%", translate( - noMovePoint.x + this.book.pageWidth - this.book.maskWidth + mv.x, -noMovePoint.y + mv.y) + rotate( - angle)), this.rotateElement(this.sidePositionA, "100% 0%", rotate(angle) + translate(noMovePoint.x - mv.x, noMovePoint.y - mv.y)), this.rotateElement(this.sidePositionB, "100% 0%", rotate(angle) + translate(noMovePoint.x + df.x - mv.x, noMovePoint.y + df.y - mv.y)), this.rotateElement(this.sideB.side, "100% 0%", translate( - this.book.pageWidth, 0) + rotate(2 * (90 - angle)))) : (this.rotateElement(this.mask, "0% 0%", translate(noMovePoint.x + mv.x, -noMovePoint.y + mv.y) + rotate(angle)), this.rotateElement(this.sidePositionA, "0% 0%", rotate( - angle) + translate( - noMovePoint.x - mv.x, noMovePoint.y - mv.y)), this.rotateElement(this.sidePositionB, "0% 0%", rotate( - angle) + translate( - noMovePoint.x - mv.x + df.x, noMovePoint.y + df.y - mv.y)), this.rotateElement(this.sideB.side, "0% 0%", translate(0, 0) + rotate(2 * (angle - 90)))) : rightToLeft ? (this.rotateElement(this.mask, "100% 100%", translate( - noMovePoint.x + this.book.pageWidth - this.book.maskWidth + mv.x, noMovePoint.y + this.book.pageHeight - this.book.maskWidth + mv.y) + rotate(angle)), this.rotateElement(this.sidePositionA, "100% 100%", rotate( - angle) + translate(noMovePoint.x - mv.x, -noMovePoint.y - mv.y)), this.rotateElement(this.sidePositionB, "100% 100%", rotate( - angle) + translate(noMovePoint.x + df.x - mv.x, -noMovePoint.y - mv.y + df.y)), this.rotateElement(this.sideB.side, "100% 100%", translate( - this.book.pageWidth, -this.book.pageHeight) + rotate(2 * (angle - 90)))) : (this.rotateElement(this.mask, "0% 100%", translate(noMovePoint.x + mv.x, noMovePoint.y + this.book.pageHeight - this.book.maskWidth + mv.y) + rotate( - angle)), this.rotateElement(this.sidePositionA, "0% 100%", rotate(angle) + translate( - noMovePoint.x - mv.x, -noMovePoint.y - mv.y)), this.rotateElement(this.sidePositionB, "0% 100%", rotate(angle) + translate( - noMovePoint.x + df.x - mv.x, -noMovePoint.y + df.y - mv.y)), this.rotateElement(this.sideB.side, "0% 100%", translate(0, -this.book.pageHeight) + rotate(2 * (90 - angle))))
		}
	},
	rotateElement: function(b, c, d) {
		b.css({
			"-webkit-transform-origin": c,
			"-moz-transform-origin": c,
			"-ms-transform-origin": c,
			"-o-transform-origin": c,
			"transform-origin": c,
			"-webkit-transform": d,
			"-moz-transform": d,
			"-ms-transform": d,
			"-o-transform": d,
			transform: d
		})
	},
	endFlip: function(b) {
		this.setSideAUp(!0);
		this.hideShadow()
	},
	hardPageFlip: function(b, c) {
		var d = b;
		rightToLeft ? (b > 2 * this.book.pageWidth && (d = 2 * this.book.pageWidth), 0 > b && (d = 0), d = Math.acos((d - this.book.pageWidth) / this.book.pageWidth)) : (b > this.book.pageWidth && (d = this.book.pageWidth), b < -this.book.pageWidth && (d = -this.book.pageWidth), d = Math.acos(d / this.book.pageWidth));
		d = 180 * d / Math.PI;
		rightToLeft && (d -= 180);
		c && (this.sideB.imgFlipOver(!0), this.page.css({
			"-webkit-transform-style": "preserve-3d",
			"-moz-transform-style": "preserve-3d",
			"transform-style": "preserve-3d",
			"z-index": 120
		}));
		var e = rightToLeft ? "100% 50%": "0% 50%";
		this.page.css({
			"-moz-perspective-origin": "left center",
			"-webkit-transform-origin": e,
			"-webkit-transform": "perspective(3000px) rotateY(" + -d + "deg)",
			"-moz-perspective-origin": "left center",
			"-moz-transform-origin": e,
			"-moz-transform": "perspective(3000px) rotateY(" + -d + "deg)",
			"perspective-origin": "left center",
			"transform-origin": e,
			transform: "perspective(3000px) rotateY(" + -d + "deg)"
		});
		rightToLeft ? -90 >= d ? (this.setSideAUp(!1), this.page.css({
			opacity: Math.abs(d + 180) / 90
		})) : (this.setSideAUp(!0), this.page.css({
			opacity: 1
		})) : 90 <= d ? (this.setSideAUp(!1), this.page.css({
			opacity: Math.abs(d - 180) / 90
		})) : (this.setSideAUp(!0), this.page.css({
			opacity: 1
		}))
	},
	setSideAUp: function(b) {
		this.sidePositionA.css({
			"z-index": b ? 2 : 1
		});
		this.sidePositionB.css({
			"z-index": b ? 1 : 2
		})
	},
	showShadow: function() {
		this.shadowA.css({
			display: "block"
		});
		this.shadowB.css({
			display: "block"
		})
	},
	hideShadow: function() {
		this.shadowA.css({
			display: "none"
		});
		this.shadowB.css({
			display: "none"
		})
	},
	resetPage: function() {
		this.isHardPage && (this.page.css({
			"-webkit-transform-style": "flat",
			"-moz-transform-style": "flat",
			"transform-style": "flat",
			"-webkit-transform": "rotateY(0deg)",
			"-moz-transform": "rotateY(0deg)",
			"-ms-transform": "rotateY(0deg)",
			"-o-transform": "rotateY(0deg)",
			transform: "rotateY(0deg)",
			opacity: 1
		}), this.sideA.imgFlipOver(!1), this.sideB.imgFlipOver(!1));
		this.rotateElement(this.mask, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sideA.side, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sideB.side, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sidePositionA, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sidePositionB, "0% 0%", translate(0, 0) + rotate(0));
		this.sidePositionA.css({
			top: "0px",
			bottom: "auto",
			left: "0px",
			right: "auto"
		});
		this.sidePositionB.css({
			top: "0px",
			bottom: "auto",
			left: "0px",
			right: "auto"
		});
		this.sideB.side.css({
			opacity: 1
		});
		this.sideA.side.css({
			opacity: 1
		})
	},
	isCorner: function(b, c) {
		var d = 0;
		0 <= this.realCorner.indexOf("t") && 0 == c && d++;
		0 <= this.realCorner.indexOf("b") && c == this.book.pageHeight && d++;
		0 <= this.realCorner.indexOf("l") && b == -this.book.pageWidth && d++;
		0 <= this.realCorner.indexOf("r") && b == this.book.pageWidth && d++;
		return 2 <= d
	},
	playSlider: function() {
		this.sideA.playSlider();
		this.sideB.playSlider()
	},
	resetSlider: function() {
		this.sideA.resetSlider();
		this.sideB.resetSlider()
	},
	left: function() {},
	top: function() {},
	width: function() {},
	height: function() {},
	scale: function() {
		return 1
	},
	setZIndex: function(b) {
		this.page.css("z-index", b)
	},
	append: function(b) {
		this.page.append(b)
	}
});
global.bdor[404] = function() {
	for (var b = "",
	c = 0; c < arguments.length; c++) b += bdor[200](arguments[c]);
	return b
};
var SingleSide = Class({
	create: function(b, c) {
		this.bookType = BookType.single_book;
		this.father = b;
		this.isMirrorSide = c;
		this.width = 400;
		this.height = 600;
		this.side = $("<div style='position:absolute;top:0px;left:0px;overflow:hidden;'></div>");
		this.sideBackground = $("<div style='position:absolute;top:0px;left:0px;background-color:#f5f0f5'></div>");
		this.tmpContent = $("<div style='position:absolute;top:0px;left:0px;'></div>");
		this.sideContent = $("<div style='position:absolute;top:0px;left:0px;'></div>");
		this.sideImg = $("<img />");
		this.searchHighlight = $("<div class='kong' id='highlight'></div>");
		rightToLeft ? (this.sideShadow = $("<div class='leftShadow'></div>"), this.sideShadow.css({
			width: userConfig.leftShadowWidth + "px",
			opacity: userConfig.leftShadowAlpha
		})) : (this.sideShadow = $("<div class='rightShadow'></div>"), this.sideShadow.css({
			width: userConfig.rightShadowWidth + "px",
			opacity: userConfig.rightShadowAlpha
		}));
		this.sideShadow.css({
			"backface-visibility": "hidden",
			"-webkit-backface-visibility": "hidden",
			"-moz-backface-visibility": "hidden",
			"-ms-backface-visibility": "hidden"
		});
		this.loadingImg = $("<img src='" + uiBaseURL + "progress.gif' style='position: absolute;' />");
		this.loadingImg.css({
			left: (this.width - LOADING_WIDTH) / 2 + "px",
			top: (this.height - LOADING_HEIGHT) / 2 + "px"
		});
		this.MMBackground = $("<div id='MMBackground' style='position : absolute; '></div>");
		this.initMMItems();
		this.slider = null;
		this.playSliderAfterLoad = !1;
		this.searchBackground = $("<div style='position : absolute; '></div>");
		this.searchArray = [];
		this.haveSearch = !1;
		b.append(this.side);
		this.side.append(this.tmpContent);
		this.tmpContent.append(this.sideBackground);
		this.sideBackground.append(this.sideContent);
		this.tmpContent.append(this.searchBackground);
		this.tmpContent.append(this.MMBackground);
		this.isMirrorSide && this.sideBackground.append(this.sideShadow);
		this.imageIndex = -1;
		this.side.hammer().on("doubletap",
		function(b) {
			if (bookType == BookType.single_book) return singlePageBook.zoomToPage(this.imageIndex),
			!1
		}.bind(this))
	},
	onResize: function(b, c) {
		this.width = b;
		this.height = c;
		this.side.css({
			width: b + "px",
			height: c + "px"
		});
		this.tmpContent.css({
			width: b + "px",
			height: c + "px"
		});
		this.searchBackground.css({
			width: b + "px",
			height: c + "px"
		});
		this.sideBackground.css({
			width: b + "px",
			height: c + "px"
		});
		this.sideContent.css({
			width: b + "px",
			height: c + "px"
		});
		this.sideImg.css({
			width: b + "px",
			height: c + "px"
		});
		this.searchHighlight.css({
			width: b + "px",
			height: c + "px"
		});
		this.sideShadow.css({
			height: c + "px"
		});
		this.loadingImg.css({
			left: (b - 32) / 2 + "px",
			top: (c - 32) / 2 + "px"
		});
		this.side.css({
			"-webkit-box-shadow": "0 0 10px rgba(40, 40, 40, 0.5)",
			"-moz-box-shadow": "0 0 10px rgba(40, 40, 40, 0.5)",
			"-o-box-shadow": "0 0 10px rgba(40, 40, 40, 0.5)",
			"-ms-box-shadow": "0 0 10px rgba(40, 40, 40, 0.5)",
			"box-shadow": "0 0 10px rgba(40, 40, 40, 0.5)"
		});
		this.onMMResize(b, c)
	},
	fillImg: function(b, c) {
		if (this.imageIndex != b) {
			this.imageIndex = b;
			null != this.slider && (this.slider.destroy(), this.slider = null);
			this.sideContent.empty();
			this.MMBackground.empty();
			this.showLoading();
			this.sideImg.attr("src", getPageDir(this.imageIndex, "normal", originTotalPageCount));
			var d = this;
			this.sideImg.load(function() {
				c && d.sideImg.css({
					"-webkit-transform": "scaleX(-1)",
					"-moz-transform": "scaleX(-1)",
					"-o-transform": "scaleX(-1)",
					"-ms-transform": "scaleX(-1)",
					opacity: 0.2
				});
				d.hideLoading();
				d.sideContent.append(d.sideImg);
				d.sideContent.append(d.searchHighlight);
				d.searchHighlight.css({
					opacity: 0.8
				});
				d.clearMM();
				d.initMM();
				d.initSlider()
			})
		}
	},
	imgFlipOver: function(b) {
		b ? (this.sideImg.css({
			"-webkit-transform": "scaleX(-1)",
			"-moz-transform": "scaleX(-1)",
			"-o-transform": "scaleX(-1)",
			"-ms-transform": "scaleX(-1)",
			transform: "scaleX(-1)"
		}), this.sideShadow.attr("class", rightToLeft ? "rightShadow": "leftShadow")) : (this.sideImg.css({
			"-webkit-transform": "scaleX(1)",
			"-moz-transform": "scaleX(1)",
			"-ms-transform": "scaleX(1)",
			"-o-transform": "scaleX(1)",
			transform: "scaleX(1)"
		}), this.sideShadow.attr("class", rightToLeft ? "leftShadow": "rightShadow"));
		this.sideShadow.css({
			left: rightToLeft ? "auto": "0px",
			right: rightToLeft ? "0px": "auto"
		})
	},
	showLoading: function() {
		this.tmpContent.append(this.loadingImg)
	},
	hideLoading: function() {
		this.loadingImg.remove()
	},
	initMM: function() {
		this._super();
		AddNotesByContainers(BookType.single_book, this.imageIndex, this.MMBackground)
	},
	addHistoryTexts: function(b) {
		if (void 0 != b && null != b) {
			for (var c = !1,
			d = 0; d < b.length; d++) if (b[d] == this.imageIndex) {
				c = !0;
				break
			} ! 0 == c && AddNotesByContainers(BookType.single_book, this.imageIndex, this.MMBackground)
		}
	},
	changeTo0x: function(b) {
		var c = b;
		"#" != b.substr(0, 1) && "0x" != b.substr(0, 2) && (c = "#" + parseInt(b).toString(16));
		"0x" == b.substr(0, 2) && (c = b.replace("0x", "#"));
		return c
	},
	highlightSearch: function(b) {
		highlightSearchFun(this.searchHighlight, b)
	},
	clearHighlight: function() {
		clearHighlightFun(this.searchHighlight)
	},
	append: function(b) {
		this.side.append(b)
	}
}).extend(BookSide);
bdor[500] = global.bdor[404];
bdor[13] = "p";
var zoomControlBar = Class({
	create: function(b) {
		this.dir = uiBaseURL;
		this.bar = $("<div></div>");
		this.btnZoomUp = $("<div title='Zoom up' id='zu' style='cursor:pointer;position:absolute;'></div>");
		this.btnProgressBar = $("<div title='pb' id='pb' style='cursor:pointer;position:absolute;'></div>");
		this.btnZoomDown = $("<div title='Zoom down' id='zd' style='cursor:pointer;position:absolute;'></div>");
		this.btnZoomOut = $("<div title='Zoom out' id='zo' style='cursor:pointer;position:absolute;'></div>");
		this.btnPre = $("<div title='Previous' id='pr' style='cursor:pointer;position:absolute;'></div>");
		this.btnNext = $("<div title='Next' id='ne' style='cursor:pointer;position:absolute;'></div>");
		this.btnMoveMode = $("<div title = 'Move by mouse position' id='md' style='cursor:pointer;position:absolute;'></div>");
		this.moveByMousePosition = !1;
		this.width = 260;
		this.height = 40;
		b.append(this.bar);
		this.bar.append(this.btnZoomUp);
		this.bar.append(this.btnZoomDown);
		this.bar.append(this.btnZoomOut);
		this.bar.append(this.btnPre);
		this.bar.append(this.btnNext);
		this.bar.append(this.btnMoveMode);
		this.btnZoomUp.append($('<img src="' + uiBaseURL + 'ZU.png" id = "zu"></img>')).attr("title", getLanguage("btnZoomIn", "zoom in"));
		this.btnProgressBar.append($('<img src="' + uiBaseURL + 'PB.png" id = "pb"></img>'));
		this.btnZoomDown.append($('<img src="' + uiBaseURL + 'ZD.png" id = "zd"></img>')).attr("title", getLanguage("btnZoomOut", "zoom out"));
		this.btnZoomOut.append($('<img src="' + uiBaseURL + 'ZO.png" id = "zo"></img>')).attr("title", getLanguage("btnZoomOut", "zoom out"));
		this.btnPre.append($('<img src="' + uiBaseURL + 'PR.png" id = "pr"></img>')).attr("title", getLanguage("btnPrePage", "pre"));
		this.btnNext.append($('<img src="' + uiBaseURL + 'NE.png" id = "ne"></img>')).attr("title", getLanguage("btnNextPage", "next"));
		this.btnMoveMode.append(getImage(toolBarIconsURL[ICON_MOVE_POSITION])).attr("title", getLanguage("btnDragToMove", "Move by mouse position"));
		this.bar.css({
			width: this.width + "px",
			height: this.height + "px",
			position: "absolute",
			"z-index": 5,
			"-webkit-border-radius": "5px",
			"-moz-border-radius": "5px",
			"-ms-border-radius": "5px",
			"-o-border-radius": "5px",
			"border-radius": "5px",
			"-webkit-box-shadow": "0px 0px 10px rgba(0, 0, 60, 0.8)",
			"-moz-box-shadow": "0px 0px 10px rgba(0, 0, 60, 0.8)",
			"-ms-box-shadow": "0px 0px 10px rgba(0, 0, 60, 0.8)",
			"-o-box-shadow": "0px 0px 10px rgba(0, 0, 60, 0.8)",
			"box-shadow": "0px 0px 10px rgba(0, 0, 60, 0.8)",
			display: "none",
			"background-color": "#333333",
			opacity: 0.3,
			"-moz-transition": "all 0.2s ease-in-out",
			"-webkit-transition": "all 0.2s ease-in-out",
			"-o-transition": "all 0.2s ease-in-out",
			"-ms-transition": "all 0.2s ease-in-out",
			transition: "all 0.2s ease-in-out"
		});
		this.btnZoomUp.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnZoomDown.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnZoomOut.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnPre.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnNext.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnMoveMode.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnZoomUp.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.btnZoomDown.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.btnZoomOut.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.btnPre.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.btnNext.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.btnMoveMode.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.initEvt();
		this.setButtonsPos();
		this.initColor()
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		this.bar.css(d[0], b + "px");
		this.bar.css(d[1], c + "px")
	},
	setVisible: function(b) {
		this.bar.css({
			display: b ? "block": "none"
		})
	},
	setChildIndex: function(b) {
		this.bar.css({
			"z-index": b
		})
	},
	onResize: function(b, c) {
		this.bar.css({
			width: b + "px",
			height: c + "px"
		})
	},
	initEvt: function() {
		var b = this;
		this.bar.bind(_event._enter,
		function() {
			b.bar.css({
				opacity: 0.7
			})
		});
		this.bar.bind(_event._down,
		function() {
			b.bar.css({
				opacity: 0.7
			})
		});
		this.bar.bind(_event._end,
		function() {
			b.bar.css({
				opacity: 0.7
			})
		});
		this.bar.bind(_event._leave,
		function() {
			b.bar.css({
				opacity: 0.3
			})
		});
		this.btnZoomUp.bind(_event._end,
		function() {
			b.zoomUp()
		});
		this.btnZoomDown.bind(_event._end,
		function() {
			b.zoomDown()
		});
		this.btnZoomOut.bind(_event._end,
		function() {
			b.zoomOut()
		});
		this.btnPre.bind(_event._end,
		function() {
			rightToLeft ? nextPageFun() : previousPageFun()
		});
		this.btnNext.bind(_event._end,
		function() {
			rightToLeft ? previousPageFun() : nextPageFun()
		});
		this.btnMoveMode.bind(_event._end,
		function() {
			b.changeMoveMode()
		});
		this.btnZoomUp.mouseEnterShine("#333333", "111111", "#999999");
		this.btnZoomDown.mouseEnterShine("#333333", "111111", "#999999");
		this.btnZoomOut.mouseEnterShine("#333333", "111111", "#999999");
		this.btnPre.mouseEnterShine("#333333", "111111", "#999999");
		this.btnNext.mouseEnterShine("#333333", "111111", "#999999");
		this.btnMoveMode.mouseEnterShine("#333333", "111111", "#999999")
	},
	initColor: function(b) {
		this.btnZoomUp.changeButtonColor(b);
		this.btnZoomDown.changeButtonColor(b);
		this.btnZoomOut.changeButtonColor(b);
		this.btnPre.changeButtonColor(b);
		this.btnNext.changeButtonColor(b);
		this.btnMoveMode.changeButtonColor(b)
	},
	setButtonsPos: function() {
		this.btnZoomUp.css({
			position: "absolute",
			"margin-left": "20px",
			top: "6px"
		});
		this.btnZoomDown.css({
			position: "absolute",
			"margin-left": "60px",
			top: "6px"
		});
		this.btnZoomOut.css({
			position: "absolute",
			"margin-left": "100px",
			top: "6px"
		});
		this.btnPre.css({
			position: "absolute",
			"margin-left": "140px",
			top: "6px"
		});
		this.btnNext.css({
			position: "absolute",
			"margin-left": "180px",
			top: "6px"
		});
		this.btnMoveMode.css({
			position: "absolute",
			"margin-left": "220px",
			top: "6px"
		})
	},
	zoomUp: function() {
		2 == bookType && zoomBook.zoom(1)
	},
	zoomDown: function() {
		2 == bookType && zoomBook.zoom( - 0.5)
	},
	changeMoveMode: function() { ! 0 == this.moveByMousePosition ? (this.moveByMousePosition = !1, this.btnMoveMode.empty().append(getImage(toolBarIconsURL[ICON_MOVE_POSITION])).attr("title", getLanguage("btnDragToMove", "Move by mouse position"))) : (this.moveByMousePosition = !0, this.btnMoveMode.empty().append(getImage(toolBarIconsURL[ICON_MOVE_DRAG])).attr("title", getLanguage("btnDragToMove", "Move by mouse drag")));
		this.btnMoveMode.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		})
	},
	zoomOut: function() {
		windowWidth < windowHeight ? (bookType = 1, changeShowBook(1), setCurrentIndexTextField($(singlePageBook).data().currentPageIndex), $(singlePageBook).data().gotoPage(zoomBook.currentIndex), thumbButtonEnable && thumbnail.clearHighLight(), thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex), zoomBook.noZoom(), toolBar.changeZoomIcon(!0)) : zoomBook.showPage.animateFit()
	}
}),
catalogControlBar = Class({
	create: function(b) {
		this.dir = uiBaseURL;
		this.bar = $("<div id='catalogControlBar'></div>");
		this.btnZoomUp = $("<div title='Zoom up' id='zu' style='cursor:pointer;position:absolute;'></div>");
		this.btnProgressBar = $("<div title='pb' id='pb' style='cursor:pointer;position:absolute;'></div>");
		this.btnZoomDown = $("<div title='Zoom down' id='zd' style='cursor:pointer;position:absolute;'></div>");
		this.btnZoomOut = $("<div title='Zoom out' id='zo' style='cursor:pointer;position:absolute;'></div>");
		this.btnPre = $("<div title='Previous' id='pr' style='cursor:pointer;position:absolute;'></div>");
		this.btnNext = $("<div title='Next' id='ne' style='cursor:pointer;position:absolute;'></div>");
		this.btnMoveMode = $("<div title = 'Move by mouse position' id='md' style='cursor:pointer;position:absolute;'></div>");
		this.moveByMousePosition = !0;
		this.width = 186;
		this.height = 40;
		b.append(this.bar);
		this.bar.append(this.btnZoomOut);
		this.bar.append(this.btnPre);
		this.bar.append(this.btnNext);
		this.bar.append(this.btnMoveMode);
		this.btnZoomUp.append($('<img src="' + uiBaseURL + 'ZU.png" id = "zu"></img>'));
		this.btnProgressBar.append($('<img src="' + uiBaseURL + 'PB.png" id = "pb"></img>'));
		this.btnZoomDown.append($('<img src="' + uiBaseURL + 'ZD.png" id = "zd"></img>'));
		this.btnZoomOut.append($('<img src="' + uiBaseURL + 'ZO.png" id = "zo"></img>'));
		this.btnPre.append($('<img src="' + uiBaseURL + 'PR.png" id = "pr"></img>'));
		this.btnNext.append($('<img src="' + uiBaseURL + 'NE.png" id = "ne"></img>'));
		this.btnMoveMode.append(getImage(toolBarIconsURL[ICON_MOVE_DRAG]));
		this.bar.css({
			width: this.width + "px",
			height: this.height + "px",
			position: "absolute",
			"z-index": 5,
			"-webkit-border-radius": "5px",
			"-moz-border-radius": "5px",
			"-ms-border-radius": "5px",
			"-o-border-radius": "5px",
			"border-radius": "5px",
			"-webkit-box-shadow": "0px 0px 10px rgba(0, 0, 60, 0.8)",
			"-moz-box-shadow": "0px 0px 10px rgba(0, 0, 60, 0.8)",
			"-ms-box-shadow": "0px 0px 10px rgba(0, 0, 60, 0.8)",
			"-o-box-shadow": "0px 0px 10px rgba(0, 0, 60, 0.8)",
			"box-shadow": "0px 0px 10px rgba(0, 0, 60, 0.8)",
			display: "none",
			"background-color": "#333333",
			opacity: 0.3,
			"-moz-transition": "all 0.2s ease-in-out",
			"-webkit-transition": "all 0.2s ease-in-out",
			"-o-transition": "all 0.2s ease-in-out",
			"-ms-transition": "all 0.2s ease-in-out",
			transition: "all 0.2s ease-in-out"
		});
		this.btnZoomUp.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnZoomDown.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnZoomOut.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnPre.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnNext.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnMoveMode.css({
			width: "26px",
			height: "26px",
			"border-radius": "5px"
		});
		this.btnZoomUp.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.btnZoomDown.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.btnZoomOut.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.btnPre.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.btnNext.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.btnMoveMode.children("img").css({
			"margin-left": "3px",
			"margin-top": "3px"
		});
		this.initEvt();
		this.setButtonsPos();
		this.initColor()
	},
	setButtonsPos: function() {
		this.btnPre.css({
			position: "absolute",
			"margin-left": "20px",
			top: "6px"
		});
		this.btnZoomOut.css({
			position: "absolute",
			"margin-left": "60px",
			top: "6px"
		});
		this.btnNext.css({
			position: "absolute",
			"margin-left": "100px",
			top: "6px"
		});
		this.btnMoveMode.css({
			position: "absolute",
			"margin-left": "140px",
			top: "6px"
		})
	},
	zoomOut: function() { ! 1 == catalogBook.zoomOut && catalogBook.zoomToPage()
	}
}).extend(zoomControlBar),
originPoint22,
inteval;
bdor[60] = bdor.i(500)(15, 19, 8) + "m";
var zoomSide = Class({
	create: function(b) {
		this.side = $("<div style= 'overflow: hidden'></div>");
		this.tmpContent = $("<div class='sideContent'></div>");
		this.sideContent = $("<div class='sideContent' style= 'overflow: hidden'></div>");
		this.sideImg = $("<img id='sideImg' style='position: absolute;' />");
		this.tmpImg = $("<img id='tmpImg' style='position: absolute;z-index:-1;' />");
		this.MMBackground = $("<div id='MMBackground'  style='position:absolute;z-index:6;'></div>");
		this.loadingImg = $("<img src='" + uiBaseURL + "progress.gif' style='position: absolute;'>");
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		this.fitH = this.fitW = 0;
		this.searchHighlight = $("<div class='kong' id='highlight'></div>");
		b.append(this.side);
		b.append(this.tmpImg);
		this.side.append(this.tmpContent);
		this.tmpContent.append(this.sideContent);
		this.imageIndex = -1;
		this.toScale = 1;
		this.origin = "0% 0%";
		this.translateY = this.translateX = this.y = this.x = 0;
		this.firstEnter = this.isZomming = !1;
		this.sideTop = 0;
		this.side.css({
			width: this.width + "px",
			height: this.height + "px",
			top: this.sideTop + "px",
			position: "absolute",
			border: "1px solid rgba(200, 200, 200, 0.6)",
			"-webkit-box-shadow": "10px 5px 15px rgba(40, 40, 40, 0.6)",
			"-moz-box-shadow": "10px 5px 15px rgba(40, 40, 40, 0.6)",
			"-o-box-shadow": "10px 5px 15px rgba(40, 40, 40, 0.6)",
			"-ms-box-shadow": "10px 5px 15px rgba(40, 40, 40, 0.6)",
			"box-shadow": "10px 5px 15px rgba(40, 40, 40, 0.6)"
		});
		this.sideContent.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.searchHighlight.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.MMBackground.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.loadingImg.css({
			left: (this.width - LOADING_WIDTH) / 2 + "px",
			top: (this.height - LOADING_HEIGHT) / 2 + "px"
		});
		this.initMMItems();
		this.slider = null;
		this.playSliderAfterLoad = !1;
		this.initEvent();
		var c = Math.max(windowWidth - leftMargin - rightMargin, 1),
		d = Math.max(windowHeight - topMargin - bottomMargin - toolBar.getHeight(), 1),
		c = getPageWidthHeight(c, d, 2 * bookConfig.largePageWidth, bookConfig.largePageHeight);
		this.onWinResize(c.x, c.y, !0);
		this.father = b;
		this.inertiaTimer = -1
	},
	destroy: function() {
		this.side.empty();
		this.side.remove()
	},
	hideMM: function() {
		this.MMBackground.css({
			display: "none"
		})
	},
	showMM: function() {
		this.MMBackground.css({
			display: "block"
		})
	},
	setCSS: function(b) {
		this.side.css(b)
	},
	onResize2: function(b, c) {
		this.toScale = b / this.width;
		var d = getTransform(this.side[0]);
		this.zoomObj(this.side, this.origin, " scale(" + this.toScale + ")", d.x, d.y)
	},
	setScale: function(b) {
		this.toScale = b
	},
	getScale: function() {
		return this.toScale
	},
	onResize: function(b, c, d) {
		b = getPageWidthHeight(b, c, zoomPageWidth, zoomPageHeight);
		this.width = b.x;
		this.height = b.y;
		this.side.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.tmpContent.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideContent.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.searchHighlight.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.onMMResize(this.width, this.height);
		this.tmpImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.setLoadingPosition()
	},
	getSide: function() {
		return this.side
	},
	fillContent: function(b) {
		b = parseInt(b);
		if (b != this.imageIndex) if (this.imageIndex = b, null != this.slider && (this.slider.destroy(), this.slider = null), this.sideContent.css({
			background: "white"
		}), this.sideContent.empty(), this.MMBackground.empty(), this.showLoading(), b > originTotalPageCount || 1 > b) this.side.css({
			display: "none"
		}),
		this.sideContent.css({
			background: "transparent"
		}),
		this.hideLoading();
		else {
			this.side.css({
				display: "block"
			});
			this.sideContent.css({
				background: "white"
			});
			var c = this;
			this.sideImg.attr("src", getPageDir(b, "large"));
			this.sideImg.load(function() {
				c.hideLoading();
				c.sideImg.css({
					display: "block"
				});
				c.tmpImg.attr("src", getPageDir(b, "large"));
				try {
					c.sideContent.append(c.sideImg),
					c.sideContent.append(c.MMBackground),
					c.sideContent.append(c.searchHighlight)
				} catch(d) {}
				c.searchHighlight.css({
					opacity: 0.8
				});
				c.clearMM();
				c.initMM();
				c.initSlider()
			})
		}
	},
	setPosition: function(b, c) {
		this.side.css({
			left: b + "px",
			top: c + "px"
		})
	},
	setChildIndex: function(b) {
		this.side.css({
			"z-index": b
		})
	},
	setVisible: function(b) {
		this.side.css({
			display: b ? "block": "none"
		})
	},
	resetSize: function() {
		this.tmpImg.css({
			display: "none"
		});
		var b = this.width * this.toScale,
		c = this.height * this.toScale,
		d = getTransform(this.side[0]);
		this.toScale = 1;
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", d.x, d.y);
		this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", d.x, d.y);
		this.width = b;
		this.height = c;
		this.translateX = d.x;
		this.translateY = d.y;
		this.tmpImg.css({
			display: "block"
		});
		this.onResize(b, c);
		this.addHistoryTexts();
		zoomBook.bookMap.refreshArea();
		this.focusReset()
	},
	enterSide: function() {
		for (var b = 0; b < this.youtubeArray.length; b++) this.youtubeArray[b].getPlayEvt(),
		this.youtubeArray[b].getStopEvt(),
		this.youtubeArray[b].show();
		for (b = 0; b < this.flashSwfArray.length; b++) this.flashSwfArray[b].show();
		for (b = 0; b < this.buttonArray.length; b++) this.buttonArray[b].show();
		for (b = 0; b < this.videoArray.length; b++) this.videoArray[b].getPlayEvt() == PageEditor.PlayEvt.EVT_PLAY && this.videoArray[b].playVideo(),
		this.videoArray[b].getPlayEvt() == PageEditor.PlayEvt.EVT_STOP && this.videoArray[b].pauseVideo();
		for (b = 0; b < this.audioArray.length; b++) this.audioArray[b].getPlayEvt() == PageEditor.PlayEvt.EVT_PLAY && this.audioArray[b].play()
	},
	leaveSide: function() {
		for (var b = 0; b < this.youtubeArray.length; b++) this.youtubeArray[b].getPlayEvt(),
		this.youtubeArray[b].getStopEvt(),
		this.youtubeArray[b].hide();
		for (b = 0; b < this.flashSwfArray.length; b++) this.flashSwfArray[b].hide();
		for (b = 0; b < this.buttonArray.length; b++) this.buttonArray[b].hide();
		for (b = 0; b < this.videoArray.length; b++) this.videoArray[b].getStopEvt() == PageEditor.PlayEvt.EVT_PLAY && this.videoArray[b].playVideo(),
		this.videoArray[b].getStopEvt() == PageEditor.PlayEvt.EVT_STOP && this.videoArray[b].pauseVideo();
		for (b = 0; b < this.audioArray.length; b++) this.audioArray[b].pause();
		this.searchHighlight.css({
			"background-image": ""
		});
		this.resetSlider()
	},
	zoom: function(b, c) {
		if (!0 == this.isZomming) return ! 1;
		var d = bookConfig.minZoomWidth,
		e = this.side.width() * this.toScale,
		f = this.side.height() * this.toScale,
		g = this.toScale + b,
		h = this.side.width() * g;
		if (1 > g) {
			if (e <= d) return;
			h < d && (g = d / this.side.width())
		}
		h = this.side.width() * g;
		d = this.side.height() * g;
		origTrans = getTransform(this.side[0]);
		var k = Point(this.side.offset().left, this.side.offset().top);
		this.animateZoom(g, (windowWidth / 2 - k.x) / e * (e - h) + origTrans.x, (windowHeight / 2 - k.y) / f * (f - d) + origTrans.y, 300, "linear")
	},
	noZoom: function() {
		this.toScale = this.fitW / this.width;
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", 0, 0);
		this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", 0, 0)
	},
	forceReset: function(b) {
		this.width = this.fitW;
		this.height = this.fitH;
		this.toScale = 1;
		void 0 == b && (b = getTransform(this.side[0]));
		this.forceResize(b)
	},
	forceMax: function() {
		var b = (this.width * this.toScale - zoomPageWidth) / 2;
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		var c = getTransform(this.side[0]);
		c.x += b;
		this.forceResize(c)
	},
	animateMax: function() {
		var b = Math.min(windowWidth, zoomPageWidth);
		this.animateZoom(b / this.width, (this.width - b) / 2, 0, 300, "linear")
	},
	animateFit: function() {
		this.animateZoom(this.fitW / this.width, 0, 0, 300, "linear")
	},
	forceResize: function(b) {
		this.side.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideContent.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.searchHighlight.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.onMMResize(this.width, this.height);
		this.tmpImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.toScale = 1;
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", b.x, b.y);
		this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", b.x, b.y);
		this.translateX = b.x;
		this.translateY = b.y
	},
	getScaleFromFit: function() {
		return this.width * this.toScale / this.fitW
	},
	getCenterTransform: function() {
		return Point((this.fitW - this.width * this.toScale) / 2, 0)
	},
	zoomToMax: function() {
		var b = zoomPageWidth / this.width;
		this.animateZoom(b, (this.width * this.toScale - this.width * b) / 2 + this.translateX, 0, 200)
	},
	zoomToFit: function() {
		var b = this.getScaleFromFit();
		this.animateZoom(b, 0, 0, 200)
	},
	zoomObj: function(b, c, d, e, f) {
		e || (e = 0);
		f || (f = 0);
		e = translate(e, f);
		b.css({
			"-webkit-transform-origin": c,
			"-moz-transform-origin": c,
			"-ms-transform-origin": c,
			"-o-transform-origin": c,
			"transform-origin": c,
			"-webkit-transform": e + d,
			"-moz-transform": e + d,
			"-ms-transform": e + d,
			"-o-transform": e + d,
			transform: e + d
		})
	},
	setTranslate: function(b, c, d) {
		c = translate(c, d);
		b.css({
			"-webkit-transform": c,
			"-moz-transform": c,
			"-o-transform": c,
			"-ms-transform": c,
			transform: c
		})
	},
	setXY: function(b, c) {},
	animateTranslate: function(b, c, d) {
		b || (b = 0);
		c || (c = 0);
		d || (d = 25);
		var e = getTransform(this.side[0]),
		f = this;
		$(e).animate({
			x: b,
			y: c
		},
		{
			duration: d,
			easing: "easeOutSine",
			complete: function() {
				f.zoomObj(f.side, f.origin, " scale(" + f.toScale + ")", e.x, e.y);
				f.zoomObj(f.tmpImg, f.origin, " scale(" + f.toScale + ")", e.x, e.y)
			}
		})
	},
	animateZoom: function(b, c, d, e, f) {
		if (!0 != this.isZomming) {
			this.isZomming = !0;
			b || (b = this.toScale);
			c || (c = 0);
			d || (d = 0);
			e || (e = 25);
			void 0 == f && (f = "easeOutSine");
			var g = getTransform(this.side[0]),
			h = {
				scale: this.toScale,
				x: g.x,
				y: g.y
			},
			k = this;
			if ("linear" == f) var l = 0,
			m = b - h.scale,
			p = c - h.x,
			n = d - h.y,
			q = window.setInterval(function() {
				l++;
				var e = h.scale + m * l / 10,
				f = h.x + p * l / 10,
				g = h.y + n * l / 10;
				10 == l && (e = b, f = c, g = d);
				k.tmpImg.css({
					display: "none"
				});
				k.zoomObj(k.side, k.origin, " scale(" + e + ")", f, g);
				k.zoomObj(k.tmpImg, k.origin, " scale(" + e + ")", f, g);
				k.tmpImg.css({
					display: "block"
				});
				if (void 0 != k.onZoomTimer) k.onZoomTimer(f, g, k.width * e);
				if (10 == l && (window.clearInterval(q), k.toScale = b, k.resetSize(), k.isZomming = !1, void 0 != k.onZoomTimerEnd)) k.onZoomTimerEnd()
			},
			Math.floor(e / 10));
			else $(h).animate({
				scale: b,
				x: c,
				y: d
			},
			{
				duration: e,
				easing: f,
				step: function() {
					k.tmpImg.css({
						display: "none"
					});
					k.zoomObj(k.side, k.origin, " scale(" + h.scale + ")", h.x, h.y);
					k.zoomObj(k.tmpImg, k.origin, " scale(" + h.scale + ")", h.x, h.y);
					k.tmpImg.css({
						display: "block"
					});
					if (void 0 != k.onZoomTimer) k.onZoomTimer(h.x, h.y, k.width * h.scale)
				},
				complete: function() {
					k.toScale = b;
					k.resetSize();
					k.isZomming = !1;
					if (void 0 != k.onZoomTimerEnd) k.onZoomTimerEnd()
				}
			})
		}
	},
	onWinResize: function(b, c, d) {
		var e = getPageWidthHeight(b, c, zoomPageWidth, zoomPageHeight);
		this.fitW = e.x;
		this.fitH = e.y;
		if (!0 === d) this.onResize(b, c, !0)
	},
	showLoading: function() {
		this.setLoadingPosition();
		this._super()
	},
	setLoadingPosition: function() {
		var b = (this.width - LOADING_WIDTH) / 2,
		c = (this.height - LOADING_HEIGHT) / 2,
		d = this.side.offset().top,
		e = getTransform(this.side[0]),
		d = d + e.y;
		d + c * this.toScale > windowHeight - 2 * LOADING_HEIGHT && (c -= d + c * this.toScale - windowHeight + 5 * LOADING_HEIGHT);
		this.loadingImg.css({
			left: b + "px",
			top: c + "px"
		})
	},
	translate: function(b, c, d) {
		this.tmpImg.css({
			display: "none"
		});
		this.zoomObj(this.side, this.origin, " scale(" + this.toScale + ")", b, c);
		this.zoomObj(this.tmpImg, this.origin, " scale(" + this.toScale + ")", b, c);
		this.tmpImg.css({
			display: "block"
		})
	},
	isFit: function() {
		return this.toScale == this.fitW / this.width
	},
	animateBack: function(b) {
		var c = getTransform(this.side[0]),
		d = {
			x: c.x,
			y: c.y,
			scale: this.toScale
		},
		e = this.fitW / this.width,
		f = this;
		f.tmpImg.css({
			display: "none"
		});
		$(d).animate({
			x: 0,
			y: 0,
			scale: e
		},
		{
			duration: 200,
			step: function() {
				f.zoomObj(f.side, f.origin, " scale(" + d.scale + ")", d.x, d.y);
				f.zoomObj(f.tmpImg, f.origin, " scale(" + d.scale + ")", d.x, d.y)
			},
			complete: function() {
				f.toScale = e;
				f.tmpImg.css({
					display: "block"
				});
				b()
			}
		})
	},
	showPage: function() {
		var b = this.imageIndex;
		b > originTotalPageCount || 1 > b ? (this.side.css({
			display: "none"
		}), this.sideContent.css({
			background: "transparent"
		})) : (this.side.css({
			display: "block"
		}), this.sideContent.css({
			background: "white"
		}))
	},
	hidePage: function() {
		this.side.css({
			display: "none"
		})
	},
	getWidth: function() {
		return this.width * this.toScale
	},
	getHeight: function() {
		return this.height * this.toScale
	},
	getScale: function() {
		return this.toScale
	},
	left: function() {
		return this.side.offset().left
	},
	top: function() {
		return this.side.offset().top
	},
	setZooming: function(b) {
		this.isZomming = b
	},
	initEvent: function() {
		var b = this,
		c = Point(0, 0),
		d = Point(0, 0),
		e = Point(0, 0),
		f = !1,
		g = !1,
		h = null,
		k = !1,
		l,
		m = 0,
		p = 0,
		n;
		this.side.bind(_event._down,
		function(m) {
			if (bookType == BookType.zoom_book) {
				if (!0 == b.isZomming || !0 == zoomBook.isFlipping) return ! 1;
				l = b.toScale;
				var n = b.side[0];
				try {
					n.setCapture ? n.setCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP)
				} catch(p) {} - 1 != b.inertiaTimer && (window.clearInterval(b.inertiaTimer), b.inertiaTimer = -1);
				m = isTouch ? m.originalEvent.touches: [m];
				n = getTransform(b.side[0]);
				b.translateX = n.x;
				b.translateY = n.y;
				1 == m.length ? (f = !0, g = !1, c = Point(m[0].pageX, m[0].pageY), h = Point(b.side.position().left, b.side.position().top)) : 2 == m.length && (f = !1, g = !0, c = Point(m[0].pageX, m[0].pageY), e = Point(m[1].pageX, m[1].pageY), d = Point((m[0].pageX + m[1].pageX) / 2, (m[0].pageY + m[1].pageY) / 2), h = Point(b.side.offset().left, b.side.offset().top));
				return k = !1
			}
		});
		this.side.bind(_event._move,
		function(q) {
			if (bookType == BookType.zoom_book) {
				q = isTouch ? q.originalEvent.touches: [q];
				zoomBook.bookMap.refreshArea();
				f ? b.side.css({
					cursor: "move"
				}) : b.side.css({
					cursor: ""
				});
				if (f) {
					var r = 1 * (q[0].pageX - c.x) + b.translateX,
					w = 1 * (q[0].pageY - c.y) + b.translateY,
					u = (new Date).getTime(),
					y = Math.sqrt(Math.pow(r - m, 2) + Math.pow(w - p, 2)),
					v = 0;
					100 > u - n && 0 < u - n && (v = y / (u - n), Math.min(300 * v, 300), y = Math.asin((m - r) / y), Math.cos(y), Math.sin(y));
					b.zoomObj(b.side, b.origin, " scale(" + b.toScale + ")", r, w);
					b.zoomObj(b.tmpImg, b.origin, " scale(" + b.toScale + ")", r, w);
					m = r;
					p = w;
					n = u
				} else if (g) w = Point(q[0].pageX, q[0].pageY),
				u = Point(q[1].pageX, q[1].pageY),
				r = Math.sqrt(Math.pow(c.x - e.x, 2) + Math.pow(c.y - e.y, 2)),
				w = Math.sqrt(Math.pow(w.x - u.x, 2) + Math.pow(w.y - u.y, 2)),
				b.toScale = Math.max(w / r * l, 0.5),
				w = (d.x - h.x) / l,
				r = (d.y - h.y) / l,
				b.side.width(),
				b.side.height(),
				w = (l - b.toScale) * b.side.width() * (w / b.side.width()),
				u = (l - b.toScale) * b.side.height() * (r / b.side.height()),
				r = b.translateX + w,
				w = b.translateY + u,
				b.zoomObj(b.side, b.origin, " scale(" + b.toScale + ")", r, w),
				b.zoomObj(b.tmpImg, b.origin, " scale(" + b.toScale + ")", r, w),
				k = !0,
				m = r,
				p = w;
				else if (!isPad()) {
					if (!0 == b.isZomming || !1 == zoomBook.controlBar.moveByMousePosition) return ! 1;
					var t = toolBar.getTopHeight() - 20,
					w = windowHeight - toolBar.getBottomHeight() - 20,
					r = windowWidth - 0,
					w = w - t,
					v = b.getWidth(),
					u = b.getHeight(),
					x = q[0].pageX,
					y = q[0].pageY,
					z = (x - 0) / r * v,
					t = (y - t) / w * u,
					C = getTransform(b.side[0]),
					r = v > r ? Math.min(x - z - b.x, 0) : C.x,
					w = u > w ? Math.min(y - t - b.y, 0) : C.y; ! 0 == b.firstEnter ? (b.firstEnter = !1, b.animateZoom(b.toScale, r, w, 150, "linear")) : (b.zoomObj(b.side, b.origin, " scale(" + b.toScale + ")", r, w), b.zoomObj(b.tmpImg, b.origin, " scale(" + b.toScale + ")", r, w))
				}
				stopEvent(q[0])
			}
		});
		var q = function(c) {
			if (bookType == BookType.zoom_book) {
				b.side.css({
					cursor: ""
				});
				b.translateX = m;
				b.translateY = p;
				c = b.side[0];
				try {
					c.releaseCapture ? c.releaseCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP)
				} catch(d) {}
				k && (b.resetSize(), b.width < 5 * b.fitW / 6 && !0 == g && (toolBar.btnZoom.trigger(_event._end), toolBar.btnZoom.trigger(_event._leave)));
				k = g = f = !1; ! 1 == isTouchDevice() && (b.firstEnter = !0)
			}
		};
		this.side.clickExceptMove(clickFun);
		this.side.bind(_event._end, q);
		this.side.bind(_event._leave, q);
		this.side.bind(_event._enter,
		function() { ! 1 == isTouchDevice() && (b.firstEnter = !0);
			return ! 1
		});
		isTouch && (this.side.hammer().on("swipeleft",
		function(b) {
			if (!0 == zoomBook.isFlipping) return ! 1;
			2 == bookType && (rightToLeft ? previousPageFun() : nextPageFun())
		}), this.side.hammer().on("swiperight",
		function(b) {
			if (!0 == zoomBook.isFlipping) return ! 1;
			2 == bookType && (rightToLeft ? nextPageFun() : previousPageFun())
		}));
		this.side.hammer().on("doubletap",
		function(c) {
			if (!0 == zoomBook.isFlipping || !0 == this.isZomming || bookType != BookType.zoom_book) return ! 1;
			b.animateFit();
			window.setTimeout(function() {
				if (bookType != BookType.zoom_book) return ! 1;
				toolBar.btnZoom.trigger(_event._end);
				toolBar.btnZoom.trigger(_event._leave)
			},
			300);
			return ! 1
		});
		2 == browserType && (_event._mousewheel = "DOMMouseScroll");
		isIE() && (_event._mousewheel = "mousewheel");
		this.side.bind(_event._mousewheel,
		function(c) {
			if (bookType != BookType.zoom_book || !0 == b.isZomming || !0 == zoomBook.isFlipping) return ! 1;
			var d = c.originalEvent,
			e = Math.max( - 1, Math.min(1, d.wheelDelta || -d.detail)),
			f = -0.5 * b.toScale;
			0 < e && (f = 1 * b.toScale);
			var e = b.toScale,
			f = e + f,
			g = Point(d.pageX, d.pageY),
			h = Point(b.side.offset().left, b.side.offset().top),
			d = getTransform(b.side[0]),
			k = (g.x - h.x) / e,
			g = (g.y - h.y) / e;
			b.side.width();
			b.side.height();
			k = (e - f) * b.side.width() * (k / b.side.width());
			e = (e - f) * b.side.height() * (g / b.side.height());
			b.animateZoom(f, k + d.x, e + d.y, 400, "linear");
			stopEvent(c);
			return ! 1
		});
		this.side.speed(this.inertiaMove.bind(this))
	},
	inertiaMove: function(b, c) {
		if (!0 != this.isZomming && (0 != b || 0 != c)) {
			var d;
			d = 120 * windowWidth / 1600;
			if (b < -d) rightToLeft ? previousPageFun() : nextPageFun();
			else if (b > d) rightToLeft ? nextPageFun() : previousPageFun();
			else {
				var e = b,
				f = c,
				g = b / 20,
				h = c / 20,
				k = 0,
				l = window.setInterval(function() {
					if (!0 == this.isZomming) window.clearInterval(l);
					else {
						var b = getTransform(this.side[0]);
						e -= g;
						f -= h;
						b.x += e;
						b.y += f;
						this.zoomObj(this.side, this.origin, " scale(" + this.toScale + ")", b.x, b.y);
						this.zoomObj(this.tmpImg, this.origin, " scale(" + this.toScale + ")", b.x, b.y);
						if (20 == ++k) {
							window.clearInterval(l);
							var c = this.getWidth(),
							b = this.x + b.x;
							b > windowWidth && (rightToLeft ? nextPageFun() : previousPageFun());
							b < -c && (rightToLeft ? previousPageFun() : nextPageFun())
						}
					}
				}.bind(this), 20);
				this.inertiaTimer = l
			}
		}
	},
	moveUp: function() {
		this.inertiaMove(0, -50)
	},
	moveDown: function() {
		this.inertiaMove(0, 50)
	},
	moveLeft: function() {
		var b = getTransform(this.side[0]),
		c = this.getWidth();
		this.x + b.x < windowWidth - c ? rightToLeft ? previousPageFun() : nextPageFun() : this.inertiaMove( - 20, 0)
	},
	moveRight: function() {
		var b = getTransform(this.side[0]);
		this.getWidth();
		0 < this.x + b.x ? rightToLeft ? nextPageFun() : previousPageFun() : this.inertiaMove(20, 0)
	},
	initMM: function() {
		this._super();
		AddNotesByContainers(BookType.zoom_book, this.imageIndex, this.MMBackground)
	},
	addHistoryTexts: function(b) {
		AddNotesByContainers(BookType.zoom_book, this.imageIndex, this.MMBackground)
	},
	highlightSearch: function() {
		highlightSearchFun(this.searchHighlight, this.imageIndex)
	},
	clearHighlight: function() {
		clearHighlightFun(this.searchHighlight)
	},
	moveLeft: function() {
		var b = getTransform(this.side[0]),
		c = this.getWidth(),
		b = this.x + b.x;
		this.isLeft && b < windowWidth - 2 * c || !this.isLeft && b < windowWidth - c ? rightToLeft ? previousPageFun() : nextPageFun() : this.inertiaMove( - 20, 0)
	},
	moveRight: function() {
		var b = getTransform(this.side[0]),
		c = this.getWidth(),
		b = this.x + b.x;
		this.isLeft && 0 < b || !this.isLeft && b > c ? rightToLeft ? nextPageFun() : previousPageFun() : this.inertiaMove(20, 0)
	},
	focusReset: function() {
		if (this.option) {
			var b = Instance.copy(this.option);
			b.duration = 0;
			this.focusSet(b)
		}
	}
}).extend(BookSide),
DoubleZoomSide = Class({
	create: function(b, c) {
		this._super(b);
		this.isLeft = c;
		this.brother = null; ! 0 == this.isLeft ? this.side.css({
			"border-left": "1px solid rgba(200, 200, 200, 0.6)",
			"border-right": "0px solid rgba(200, 200, 200, 0.6)",
			"border-top": "1px solid rgba(200, 200, 200, 0.6)",
			"border-bottom": "1px solid rgba(200, 200, 200, 0.6)"
		}) : this.side.css({
			"border-left": "0px solid rgba(200, 200, 200, 0.6)",
			"border-right": "1px solid rgba(200, 200, 200, 0.6)",
			"border-top": "1px solid rgba(200, 200, 200, 0.6)",
			"border-bottom": "1px solid rgba(200, 200, 200, 0.6)"
		});
		var d = parseBool(bookConfig.addPaperCoil);
		this.isLeft ? (this.midShadow = $("<div class='leftShadow'></div>"), this.midShadow.css({
			width: userConfig.leftShadowWidth + "px",
			opacity: userConfig.leftShadowAlpha
		}), d && (this.midCoil = $("<div class='leftPaperCoil'></div>"))) : (this.midShadow = $("<div class='rightShadow'></div>"), this.midShadow.css({
			width: userConfig.rightShadowWidth + "px",
			opacity: userConfig.rightShadowAlpha
		}), d && (this.midCoil = $("<div class='rightPaperCoil'></div>")));
		this.midShadow.css({
			"backface-visibility": "hidden",
			"-webkit-backface-visibility": "hidden",
			"-moz-backface-visibility": "hidden",
			"-ms-backface-visibility": "hidden"
		});
		this.side.append(this.midShadow);
		this.midShadow.css("z-index", 5);
		this.midCoil && (this.side.append(this.midCoil), this.midCoil.css("z-index", 5));
		this.bookCenter = parseBool(bookConfig.retainBookCenter);
		this.fingerDown = !1
	},
	setBrother: function(b) {
		this.brother = b
	},
	refreshPosition: function(b, c, d) {
		b = this.isLeft ? b - d: b + d;
		this.toScale = d /= this.width;
		this.zoomObj(this.side, this.origin, " scale(" + this.toScale + ")", b, c);
		this.zoomObj(this.tmpImg, this.origin, " scale(" + this.toScale + ")", b, c)
	},
	onResize: function(b, c, d) {
		getPageWidthHeight(b, c, zoomPageWidth, zoomPageHeight);
		this.width = b;
		this.height = c;
		this.tmpImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.side.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideContent.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.searchHighlight.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.onMMResize(this.width, this.height);
		this.setLoadingPosition();
		try {
			b /= 450,
			this.midShadow.css({
				height: c + "px",
				width: Math.floor(this.isLeft ? b * userConfig.leftShadowWidth: b * userConfig.rightShadowWidth) + "px"
			}),
			this.midCoil && this.midCoil.css({
				height: c + "px"
			})
		} catch(e) {}
	},
	noZoom: function() {
		this.toScale = this.fitW / this.width;
		this.isLeft ? (this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", 0, 0), this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", 0, 0)) : (this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", this.fitW, 0), this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", this.fitW, 0))
	},
	forceReset: function(b) {
		this.width = this.fitW;
		this.height = this.fitH;
		this.toScale = 1;
		void 0 == b && (b = getTransform(this.side[0]));
		this.forceResize(b)
	},
	forceMax: function() {
		var b = (this.width * this.toScale - zoomPageWidth) / 2;
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		var c = getTransform(this.side[0]);
		c.x += 2 * b; ! 0 == this.bookCenter ? this.isLeft ? 0 == this.imageIndex ? c.x -= zoomPageWidth / 2 : this.imageIndex == totalPageCount && (c.x += zoomPageWidth / 2) : c.x = 1 == this.imageIndex ? c.x + zoomPageWidth / 2 : this.imageIndex > totalPageCount ? c.x + 3 * zoomPageWidth / 2 : c.x + zoomPageWidth: this.isLeft || (c.x += zoomPageWidth);
		this.forceResize(c)
	},
	animateMax: function() {
		var b = Math.min(windowWidth, zoomPageWidth),
		c = b / this.width,
		b = (this.width - b) / 2,
		b = 2 * b; ! 0 == this.bookCenter ? this.isLeft ? 0 == this.imageIndex ? b -= zoomPageWidth / 2 : this.imageIndex == totalPageCount && (b += zoomPageWidth / 2) : b = 1 == this.imageIndex ? b + zoomPageWidth / 2 : this.imageIndex > totalPageCount ? b + 3 * zoomPageWidth / 2 : b + zoomPageWidth: this.isLeft || (b += zoomPageWidth);
		this.animateZoom(c, b, 0, 300, "linear")
	},
	animateFit: function() {
		var b = this.fitW / this.width,
		c = 0;
		this.isLeft || (c += this.fitW); ! 0 == this.bookCenter && (1 >= this.imageIndex && (c -= this.fitW / 2), this.imageIndex >= totalPageCount && (c += this.fitW / 2));
		this.animateZoom(b, c, 0, 300, "linear")
	},
	animateBack: function() {
		var b = getTransform(this.side[0]),
		c = {
			x: b.x,
			y: b.y,
			scale: this.toScale
		},
		d = this.fitW / this.width,
		b = this.isLeft ? 0 : this.fitW; ! 0 == this.bookCenter && (1 >= this.imageIndex && (b -= this.fitW / 2), this.imageIndex >= totalPageCount && (b += this.fitW / 2));
		var e = this;
		e.tmpImg.css({
			display: "none"
		});
		$(c).animate({
			x: b,
			y: 0,
			scale: d
		},
		{
			duration: 200,
			step: function() {
				e.zoomObj(e.side, e.origin, " scale(" + c.scale + ")", c.x, c.y);
				e.zoomObj(e.tmpImg, e.origin, " scale(" + c.scale + ")", c.x, c.y)
			},
			complete: function() {
				e.toScale = d;
				e.tmpImg.css({
					display: "block"
				});
				callBack()
			}
		})
	},
	onZoomTimer: function(b, c, d) {
		this.brother.refreshPosition(b, c, d); ! 1 == this.brother.isZomming && (this.brother.isZomming = !0)
	},
	onZoomTimerEnd: function() {
		this.brother.resetSize();
		this.brother.isZomming = !1
	},
	getCenterTransform: function() {
		return Point(this.fitW - this.width * this.toScale, 0)
	},
	initEvent: function() {}
}).extend(zoomSide),
ZoomBook = Class({
	create: function(b) {
		this.bookType = 2;
		this.doublePage = windowWidth > windowHeight ? !0 : !1;
		this.bookContainer = $("<div id='zoom book container' style='z-index:3;background:yellow;left:0px;top:0px;position:absolute;display:none;'></div>");
		this.book = $("<div id='zoomBook'></div>"); ! 1 == this.doublePage ? (this.prePage = new zoomSide(this.book), this.nextPage = new zoomSide(this.book), this.showPage = new zoomSide(this.book)) : (this.prePage = new DoubleZoomPage(this.book), this.nextPage = new DoubleZoomPage(this.book), this.showPage = new DoubleZoomPage(this.book));
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		this.prePage.setChildIndex(2);
		this.showPage.setChildIndex(1);
		this.nextPage.setChildIndex(3);
		this.diffPageCount = 0;
		this.currentIndex = 1;
		this.showingPage = this.flipPage = null;
		this.isFlipping = !1;
		this.bookMap = new ZoomSideMap(this);
		isTouch || isPhone() || (this.controlBar = new zoomControlBar(this.bookContainer), this.controlBar.setPosition((windowWidth - this.controlBar.width) / 2, toolBar.getTopHeight() + 5));
		b.append(this.bookContainer);
		this.bookContainer.append(this.book);
		this.book.css({
			width: this.width + "px",
			height: this.height + "px",
			position: "absolute"
		});
		this.gzooms = bdor;
		this.fillNear(1)
	},
	movePageUp: function() {
		this.showPage.moveUp()
	},
	movePageDown: function() {
		this.showPage.moveDown()
	},
	movePageLeft: function() {
		this.showPage.moveLeft()
	},
	movePageRight: function() {
		this.showPage.moveRight()
	},
	changePageMode: function(b) {
		if (this.doublePage != b) {
			this.doublePage = b;
			this.prePage.destroy();
			this.showPage.destroy();
			this.nextPage.destroy(); ! 1 == this.doublePage ? (this.prePage = new zoomSide(this.book), this.nextPage = new zoomSide(this.book), this.showPage = new zoomSide(this.book)) : (this.prePage = new DoubleZoomPage(this.book), this.nextPage = new DoubleZoomPage(this.book), this.showPage = new DoubleZoomPage(this.book));
			this.prePage.setChildIndex(2);
			this.showPage.setChildIndex(1);
			this.nextPage.setChildIndex(3);
			b = Math.max(windowWidth - leftMargin - rightMargin, 1);
			var c = Math.max(windowHeight - topMargin - bottomMargin, 1);
			b = getPageWidthHeight(b, c, bookConfig.largePageWidth, bookConfig.largePageHeight);
			this.onResize(windowWidth, windowHeight, b.x, b.y);
			this.addHistoryTexts();
			bdor[16] = "q"
		}
	},
	onResize: function(b, c, d, e) {
		var f = getPageWidthHeight(d, e, zoomPageWidth, zoomPageHeight);
		this.width = f.x;
		this.height = f.y; ! 1 == this.doublePage ? this.book.css({
			width: this.width + "px",
			height: this.height + "px",
			left: (b - this.width - leftMargin - rightMargin) / 2 + leftMargin + "px",
			top: (c - this.height - toolBar.getHeight() - bottomMargin - topMargin) / 2 + topMargin + toolBar.getTopHeight() + "px"
		}) : this.book.css({
			width: 2 * this.width + "px",
			height: this.height + "px",
			left: (b - 2 * this.width - leftMargin - rightMargin) / 2 + leftMargin + "px",
			top: (c - this.height - toolBar.getHeight() - bottomMargin - topMargin) / 2 + topMargin + toolBar.getTopHeight() + "px"
		});
		this.prePage.onWinResize(d, e, !0);
		this.showPage.onWinResize(d, e, !0);
		this.nextPage.onWinResize(d, e, !0);
		this.controlBar && this.controlBar.setPosition((windowWidth - this.controlBar.width) / 2, toolBar.getTopHeight() + 5); ! 1 == this.doublePage ? (this.prePage.setXY((b - this.width) / 2 + leftMargin, (c - this.height) / 2 + topMargin), this.showPage.setXY((b - this.width) / 2 + leftMargin, (c - this.height) / 2 + topMargin), this.nextPage.setXY((b - this.width) / 2 + leftMargin, (c - this.height) / 2 + topMargin), !1 == rightToLeft ? (this.prePage.translate( - (b - this.width) / 2 - this.prePage.getWidth() - leftMargin - 10, 0), this.nextPage.translate((b - this.width) / 2 + this.width + rightMargin + 10, 0)) : (this.nextPage.translate( - (b - this.width) / 2 - this.prePage.getWidth() - leftMargin - 10, 0), this.prePage.translate((b - this.width) / 2 + this.width + rightMargin + 10, 0))) : (this.prePage.setXY((b - 2 * this.width) / 2 + leftMargin, (c - this.height) / 2 + topMargin), this.showPage.setXY((b - 2 * this.width) / 2 + leftMargin, (c - this.height) / 2 + topMargin), this.nextPage.setXY((b - 2 * this.width) / 2 + leftMargin, (c - this.height) / 2 + topMargin), !1 == rightToLeft ? (this.prePage.translate( - (b - 2 * this.width) / 2 - this.prePage.getWidth() - leftMargin - 10, 0), this.nextPage.translate((b - 2 * this.width) / 2 + 2 * this.width + rightMargin + 10, 0)) : (this.nextPage.translate( - (b - 2 * this.width) / 2 - this.prePage.getWidth() - leftMargin - 10, 0), this.prePage.translate((b - 2 * this.width) / 2 + 2 * this.width + rightMargin + 10, 0)));
		isTouch || this.bookMap && this.bookMap.resize(b, c)
	},
	setTranslate: function(b, c, d) {
		c = translate(c, d);
		b.css({
			"-webkit-transform": c,
			"-moz-transform": c,
			"-o-transform": c,
			"-ms-transform": c,
			transform: c
		})
	},
	gotoPage: function(b) {
		this.prePage.clearHighlight();
		this.nextPage.clearHighlight();
		if (this.currentIndex == b || 1 > b || b > originTotalPageCount || this.isFlipping) {
			if (1 > b || b > originTotalPageCount) _tipsBox.setCaption(1 > b ? "This is the first page": "This is the last page"),
			_tipsBox.showTipsBox()
		} else {
			this.isFlipping = !0;
			this.diffPageCount = b - this.currentIndex;
			var c = 0,
			d = 0,
			e = this.showPage,
			f = void 0,
			g = this,
			h;
			h = !1 == this.doublePage ? Point(0, (windowWidth - this.width) / 2 + 10 + this.width) : Point(0, (windowWidth - 2 * this.width) / 2 + 10 + 2 * this.width);
			var k = e.getCenterTransform();
			this.currentIndex > b ? (f = this.prePage, !1 == rightToLeft ? (c = h.y + rightMargin, d = -h.y - leftMargin) : (c = -h.y - leftMargin, d = h.y + rightMargin)) : (f = this.nextPage, !1 == rightToLeft ? (c = -h.y - leftMargin, d = h.y + rightMargin) : (c = h.y + rightMargin, d = -h.y - leftMargin));
			tragetToLeft = k.x;
			f.fillContent(b); (function() {
				e.setZooming(!0);
				f.setZooming(!0);
				var h = getTransform(e.side[0]);
				f.forceReset();
				var k = e.getScaleFromFit(),
				p = e.getScale(),
				n = e.getScale() / k;
				if (isSupportTransition()) {
					var q = !0,
					s = !0,
					r = !1;
					e.setScale(n);
					e.translate(c, 0);
					f.setScale(k);
					f.translate(tragetToLeft, 0);
					var w = 1E3 * bookConfig.flippingTime;
					e.side.css({
						transition: w + "ms",
						"-webkit-transition": w + "ms",
						"-moz-transition": w + "ms",
						"-o-transition": w + "ms"
					});
					f.side.css({
						transition: w + "ms",
						"-webkit-transition": w + "ms",
						"-moz-transition": w + "ms",
						"-o-transition": w + "ms"
					});
					f.side.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",
					function() {
						s && (f.side.css({
							transition: "0s",
							"-webkit-transition": "0s",
							"-moz-transition": "0s",
							"-o-transition": "0s"
						}), e.side.css({
							transition: "0s",
							"-webkit-transition": "0s",
							"-moz-transition": "0s",
							"-o-transition": "0s"
						}), r || (r = !0, e.setZooming(!1), f.setZooming(!1), e.resetSize(), f.resetSize(), auto_player.resetTimer(), g.changePage(), g.endFlip(b), g.isFlipping = !1, g.bookMap.fillContent(g.currentIndex), s = !1))
					});
					e.side.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",
					function() {
						q && (e.side.css({
							transition: "0s",
							"-webkit-transition": "0s",
							"-moz-transition": "0s",
							"-o-transition": "0s"
						}), f.side.css({
							transition: "0s",
							"-webkit-transition": "0s",
							"-moz-transition": "0s",
							"-o-transition": "0s"
						}), r || (r = !0, e.setZooming(!1), f.setZooming(!1), e.resetSize(), f.resetSize(), auto_player.resetTimer(), g.changePage(), g.endFlip(b), g.isFlipping = !1, g.bookMap.fillContent(g.currentIndex), q = !1))
					})
				} else {
					var u = 30,
					w = 1E3 * bookConfig.flippingTime;
					void 0 != w && 0 < w && (u = w / 20);
					var y = 0,
					v = window.setInterval(function() {
						var q = Point(0, 0),
						s = Point(0, 0);
						q.x = $.easing.swing(null, y, h.x, c - h.x, u);
						q.y = $.easing.swing(null, y, h.y, -h.y, u);
						s.x = $.easing.swing(null, y, d, tragetToLeft - d, u);
						var r = 1,
						w = 1,
						r = $.easing.swing(null, y, p, n - p, u),
						w = $.easing.swing(null, y, 1, k - 1, u);
						y++;
						e.setScale(r);
						e.translate(q.x, q.y);
						f.setScale(w);
						f.translate(s.x, s.y);
						y > u && (window.clearInterval(v), window.setTimeout(function() {
							e.setZooming(!1);
							f.setZooming(!1);
							e.resetSize();
							f.resetSize();
							auto_player.resetTimer();
							g.changePage();
							g.endFlip(b);
							g.isFlipping = !1;
							g.bookMap.fillContent(g.currentIndex)
						},
						20))
					},
					20)
				}
			})()
		}
	},
	changePage: function() {
		var b = null;
		0 < this.diffPageCount ? (b = this.showPage, this.showPage = this.nextPage, this.nextPage = this.prePage) : (b = this.nextPage, this.nextPage = this.showPage, this.showPage = this.prePage);
		this.prePage = b;
		this.prePage.resetSlider();
		this.showPage.playSlider();
		this.nextPage.resetSlider()
	},
	addSearchHighlight: function() {
		this.showPage.highlightSearch()
	},
	clearSearchHighlight: function() {
		this.showPage.clearHighlight()
	},
	endFlip: function(b) {
		this.currentIndex = b;
		this.fillNear(b);
		this.showPage.setChildIndex(1);
		this.nextPage.setChildIndex(3);
		this.prePage.setChildIndex(2);
		setCurrentIndexTextField(this.currentIndex, this.doublePage);
		window.location.hash = "#p=" + this.currentIndex;
		sendvisitinfo(1, this.currentIndex);
		thumbButtonEnable && thumbnail.clearHighLight();
		thumbButtonEnable && thumbnail.setHighLight(this.currentIndex); ! 1 == this.doublePage ? !1 == rightToLeft ? (this.prePage.translate( - (windowWidth - this.width) / 2 - this.width - 10 - leftMargin, 0), this.nextPage.translate((windowWidth - this.width) / 2 + this.width + 10 + rightMargin, 0)) : (this.nextPage.translate( - (windowWidth - this.width) / 2 - this.width - 10 - leftMargin, 0), this.prePage.translate((windowWidth - this.width) / 2 + this.width + 10 + rightMargin, 0)) : !1 == rightToLeft ? (this.prePage.translate( - (windowWidth - 2 * this.width) / 2 - 2 * this.width - 10 - leftMargin, 0), this.nextPage.translate((windowWidth - 2 * this.width) / 2 + 2 * this.width + 10 + rightMargin, 0)) : (this.nextPage.translate( - (windowWidth - 2 * this.width) / 2 - 2 * this.width - 10 - leftMargin, 0), this.prePage.translate((windowWidth - 2 * this.width) / 2 + 2 * this.width + 10 + rightMargin, 0));
		this.prePage.leaveSide();
		this.showPage.enterSide();
		this.nextPage.leaveSide();
		this.addSearchHighlight()
	},
	setVisible: function(b) {
		this.bookContainer.css({
			display: b ? "block": "none"
		});
		isTouch || isPhone() || (this.controlBar.setVisible(b), !0 == b ? this.bookMap.show() : this.bookMap.hide())
	},
	setPosition: function(b, c) {
		this.book.css({
			left: b + "px",
			top: c + "px"
		})
	},
	fillNear: function(b) { ! 1 == this.doublePage ? (1 < b && this.prePage.fillContent(b - 1), this.showPage.fillContent(b), b < originTotalPageCount && this.nextPage.fillContent(b + 1)) : (this.prePage.fillContent(b - 2), this.showPage.fillContent(b), this.nextPage.fillContent(b + 2));
		this.addHistoryTexts()
	},
	addHistoryTexts: function(b) {
		b = getShownPage();
		this.prePage.addHistoryTexts(b);
		this.nextPage.addHistoryTexts(b);
		this.showPage.addHistoryTexts(b)
	},
	initEvent: function() {},
	initMouseEvt: function() {
		var b = this,
		c = Point(0, 0),
		d = !1,
		e = null;
		this.book.bind(_event._down,
		function(f) {
			if (bookType == BookType.zoom_book) return d = !0,
			c.x = f.pageX,
			c.y = f.pageY,
			e = {
				x: b.book.offset().left,
				y: b.book.offset().top
			},
			!1
		});
		this.book.bind(_event._end,
		function(b) {
			bookType == BookType.zoom_book && (d = !1)
		});
		this.book.bind(_event._move,
		function(f) {
			bookType == BookType.zoom_book && d && bookType == BookType.zoom_book && b.book.css({
				left: f.pageX - c.x + e.x + "px",
				top: f.pageY - c.y + e.y + "px"
			})
		});
		this.book.bind("mouseleave",
		function(b) {})
	},
	initTouchEvt: function() {
		var b = this,
		c = Point(0, 0),
		d = Point(0, 0),
		e = !1,
		f = !1,
		g = null,
		h;
		this.book.bind(_event._down,
		function(h) {
			if (bookType == BookType.zoom_book) {
				var l = b.book[0];
				l.setCapture ? l.setCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);
				h = isTouch ? h.originalEvent.touches: [h];
				h = h.originalEvent.touches;
				1 == h.length ? (e = !0, f = !1, c.x = h[0].pageX, c.y = h[0].pageY, g = {
					x: b.book.offset().left,
					y: b.book.offset().top
				}) : 2 == h.length && (b.showPage.hideMM(), f = !0, e = !1, c.x = h[0].pageX, c.y = h[0].pageY, d.x = h[1].pageX, d.y = h[1].pageY, g = {
					x: h[0].pageX,
					y: h[0].pageY,
					left: 0,
					top: 0,
					width: b.book.width(),
					height: b.book.height()
				},
				b.prePage.setVisible(!1), b.nextPage.setVisible(!1))
			}
		});
		this.book.bind(_event._end,
		function(c) {
			bookType == BookType.zoom_book && (c = b.book[0], c.releaseCapture ? c.releaseCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP), f = e = !1, b.prePage.setVisible(!0), b.nextPage.setVisible(!0), b.showPage.showMM())
		});
		this.book.bind(_event._move,
		function(k) {
			if (bookType == BookType.zoom_book) {
				k = k.originalEvent.touches;
				if (e) b.book.css({
					left: k[0].pageX - c.x + g.x + "px",
					top: k[0].pageY - c.y + g.y + "px"
				});
				else if (f) {
					var l = Point(k[0].pageX, k[0].pageY),
					m = Point(k[1].pageX, k[1].pageY);
					k = Math.sqrt(Math.pow(d.x - c.x, 2) + Math.pow(d.y - c.y, 2));
					l = Math.sqrt(Math.pow(m.x - l.x, 2) + Math.pow(m.y - l.y, 2));
					h = Math.max((g.width + 2 * (l - k)) / g.width, 1);
					b.showPage.sideImg.css({
						"-webkit-transform-origin": c.x + "px " + c.y + "px",
						"-webkit-transform": "scale(" + h + ")",
						"transform-origin": c.x + "px " + c.y + "px",
						transform: "scale(" + h + ")"
					})
				}
				return ! 1
			}
		})
	},
	zoom: function(b) {
		this.showPage.zoom(b)
	},
	noZoom: function() {
		this.showPage.noZoom()
	},
	getLeft: function() {
		return this.showPage.left()
	},
	getTop: function() {
		return this.showPage.top()
	},
	getHeight: function() {
		return this.showPage.getHeight()
	},
	getWidth: function() {
		return this.showPage.getWidth()
	},
	getScale: function() {
		return this.showPage.getScale()
	},
	getCurrentPageIndex: function() {
		return this.currentIndex
	},
	show: function() {
		Log.debug("zoom book show.");
		this.setVisible(!0);
		this.prePage.showPage();
		this.nextPage.showPage();
		this.showPage.showPage();
		this.addSearchHighlight(this.currentIndex);
		this.bookMap.fillContent(this.currentIndex);
		this.showPage.playSlider(); (function() {
			this.showPage.addHistoryTexts();
			this.nextPage.addHistoryTexts();
			this.prePage.addHistoryTexts()
		}).delay(this, 500)
	},
	hide: function() {
		Log.debug("zoom book hide.");
		this.setVisible(!1);
		this.showPage.resetSlider()
	}
});
bdor[16] = "q";
bdor[12] = "f";
var ZoomSideMap = Class({
	create: function(b) {
		var c = this;
		this.book = b;
		this.top = this.left = 0;
		this.defaultWidth = 72;
		this.defaultHeight = 108;
		this.width = this.defaultWidth;
		this.height = this.defaultHeight;
		this.shownWidth = windowWidth;
		this.shownHeight = windowHeight;
		this.divThumb = $("<div id='thumb_bg'></div>");
		this.imgThumb = $("<img id='thumb_img'></img>");
		this.imgThumb2 = $("<img id='thumb_img2'></img>");
		this.divCursor = $("<div id='thumb_cursor'></div>");
		this.divThumb.css({
			position: "absolute",
			"z-index": 202,
			display: "none",
			width: "82px",
			height: "128px",
			border: "5px solid #ffffff",
			"-webkit-box-shadow": "0px 0px 5px gray",
			"-moz-box-shadow": "0px 0px 5px gray",
			"-o-box-shadow": "0px 0px 5px gray",
			"-ms-box-shadow": "0px 0px 5px gray",
			"box-shadow": "0px 0px 5px gray"
		});
		this.imgThumb.css({
			top: "0px",
			position: "absolute",
			"border-left": "1px solid gray",
			"border-top": "1px solid gray",
			"border-bottom": "1px solid gray",
			"background-color": "white"
		});
		this.imgThumb2.css({
			top: "0px",
			position: "absolute",
			"border-right": "1px solid gray",
			"border-top": "1px solid gray",
			"border-bottom": "1px solid gray",
			"background-color": "white",
			display: "none"
		});
		this.divCursor.css({
			position: "absolute",
			border: "2px solid green"
		});
		this.imgThumb.load(this.onImageLoad.bind(this));
		this.imgThumb2.load(function() {
			ZoomSideMap.prototype.onImageLoad2.apply(c, arguments)
		});
		bookContainer.append(this.divThumb);
		this.divThumb.append(this.imgThumb);
		this.divThumb.append(this.imgThumb2);
		this.divThumb.append(this.divCursor);
		this.doublePage = this.mouseDown = !1;
		this.initAreaEvent()
	},
	show: function() {
		this.resetPosition();
		this.refreshArea();
		this.divThumb.css({
			display: "block"
		})
	},
	hide: function() {
		this.divThumb.css({
			display: "none"
		})
	},
	resetPosition: function() {
		var b = this.width; ! 0 == this.book.doublePage && !0 == this.doublePage && (b *= 2);
		var b = this.shownWidth - b - 20 - bookConfig.rightMargin,
		c = toolBar.getTopHeight() + 10 + bookConfig.topMargin;
		this.divThumb.css({
			left: b,
			top: c
		})
	},
	resize: function(b, c) {
		this.shownWidth = b;
		this.shownHeight = c;
		this.resetPosition()
	},
	fillContent: function(b) {
		b = parseInt(b);
		if (!0 == this.book.doublePage) {
			var c;
			0 == b % 2 ? (c = b, b += 1) : c = b - 1;
			if (!0 == rightToLeft) {
				var d = c;
				c = b;
				b = d
			}
			d = getPageDir(c, "thumb");
			this.imgThumb.attr("src", d);
			d = getPageDir(b, "thumb");
			this.imgThumb2.attr("src", d);
			this.imgThumb2.css({
				display: "block"
			});
			this.imgThumb.css({
				"border-right": "0px solid gray"
			});
			this.imgThumb2.css({
				"border-left": "0px solid gray"
			});
			this.imgThumb.css({
				display: "block"
			});
			this.imgThumb2.css({
				display: "block"
			});
			this.doublePage = !0;
			0 == c && !0 != rightToLeft && (this.imgThumb.css({
				display: "none"
			}), this.imgThumb2.css({
				"border-left": "1px solid gray"
			}), this.doublePage = !1);
			0 == b && !0 == rightToLeft && (this.imgThumb2.css({
				display: "none"
			}), this.imgThumb.css({
				"border-left": "1px solid gray"
			}), this.doublePage = !1);
			b > totalPageCount && !0 != rightToLeft && (this.imgThumb2.css({
				display: "none"
			}), this.imgThumb.css({
				"border-right": "1px solid gray"
			}), this.doublePage = !1);
			c > totalPageCount && !0 == rightToLeft && (this.imgThumb.css({
				display: "none"
			}), this.imgThumb2.css({
				"border-right": "1px solid gray"
			}), this.doublePage = !1)
		} else this.doublePage = !1,
		d = getPageDir(b, "thumb"),
		this.imgThumb.attr("src", d),
		this.imgThumb2.css({
			display: "none"
		}),
		this.imgThumb.css({
			"border-right": "1px solid gray"
		})
	},
	onImageLoad: function() {
		var b = this.imgThumb[0];
		this.imageWidth = b.naturalWidth;
		this.imageHeight = b.naturalHeight;
		"none" != this.imgThumb.css("display") && (this.imageWidth / this.imageHeight < this.defaultWidth / this.defaultHeight ? (this.width = this.defaultWidth, this.height = this.imageHeight * this.defaultWidth / this.imageWidth) : (this.height = this.defaultHeight, this.width = this.imageWidth * this.defaultHeight / this.imageHeight)); ! 0 == this.book.doublePage && !0 == this.doublePage ? this.divThumb.css({
			width: 2 * this.width + 2 + "px",
			height: this.height + 2 + "px"
		}) : this.divThumb.css({
			width: this.width + 2 + "px",
			height: this.height + 2 + "px"
		});
		this.imgThumb.css({
			left: "0px",
			width: this.width + "px",
			height: this.height + "px"
		});
		this.divCursor.css({
			cursor: "",
			"background-color": "RGBA(250,240,185,0.5)"
		});
		this.resetPosition();
		this.refreshArea()
	},
	onImageLoad2: function() {
		var b = this.imgThumb2[0];
		this.imageWidth = b.naturalWidth;
		this.imageHeight = b.naturalHeight;
		"none" != this.imgThumb2.css("display") && (this.imageWidth / this.imageHeight < this.defaultWidth / this.defaultHeight ? (this.width = this.defaultWidth, this.height = this.imageHeight * this.defaultWidth / this.imageWidth) : (this.height = this.defaultHeight, this.width = this.imageWidth * this.defaultHeight / this.imageHeight)); ! 0 == this.book.doublePage && !0 == this.doublePage ? (this.divThumb.css({
			width: 2 * this.width + 2 + "px",
			height: this.height + 2 + "px"
		}), this.imgThumb2.css({
			left: this.width + "px",
			width: this.width + "px",
			height: this.height + "px"
		})) : (this.divThumb.css({
			width: this.width + 2 + "px",
			height: this.height + 2 + "px"
		}), "none" == this.imgThumb.css("display") && this.imgThumb2.css({
			left: "0px",
			width: this.width + "px",
			height: this.height + "px"
		}));
		this.divCursor.css({
			cursor: "",
			"background-color": "RGBA(250,240,185,0.5)"
		});
		this.resetPosition();
		this.refreshArea()
	},
	setArea: function(b) {
		this.divCursor.css({
			left: b.left,
			top: b.top,
			width: b.width,
			height: b.height
		})
	},
	getArea: function() {
		var b = this.divCursor.css("left"),
		b = "" == b ? 0 : parseInt(b.replace("px", "")),
		c = this.divCursor.css("top"),
		c = "" == c ? 0 : parseInt(c.replace("px", "")),
		d = this.divCursor.css("width"),
		d = "" == d ? 0 : parseInt(d.replace("px", "")),
		e = this.divCursor.css("height"),
		e = "" == e ? 0 : parseInt(e, replace("px", ""));
		return {
			left: b,
			top: c,
			width: d,
			height: e
		}
	},
	refreshArea: function() {
		var b = this.book.showPage,
		c = b.getWidth(),
		d = b.getHeight(),
		e = getBookPoint(b.side),
		f = this.getBookPosition(); ! 0 == this.book.doublePage && !1 == this.doublePage && (c /= 2);
		var g = this.imgThumb.css("display"),
		h = this.imgThumb2.css("display");
		if ("none" == g || "none" == h) e.x += b.getWidth() / 4;
		b = -(f.left + e.x);
		g = -(f.top + e.y);
		e = g / d;
		f = (b + this.shownWidth) / c;
		d = (g + this.shownHeight) / d;
		c = Math.max(0, b / c);
		e = Math.max(0, e);
		f = Math.min(1, f);
		d = Math.min(1, d);
		b = this.width; ! 0 == this.book.doublePage && !0 == this.doublePage && (b *= 2);
		this.setArea({
			left: c * b,
			top: e * this.height,
			width: (f - c) * b,
			height: (d - e) * this.height
		})
	},
	getBookPosition: function() {
		var b = this.book.book.css("left"),
		b = parseInt(b.replace("px", "")),
		c = this.book.book.css("top"),
		c = parseInt(c.replace("px", ""));
		return {
			left: b,
			top: c
		}
	},
	initAreaEvent: function() {
		var b = this,
		c, d, e, f, g = 1,
		h = 1,
		k = null;
		this.divCursor.bind(_event._down,
		function(l) {
			l = isTouch ? l.originalEvent.touches: [l];
			if (! (1 < l.length)) {
				b.mouseDown = !0;
				k = b.book.showPage;
				var m = getBookPoint(k.side);
				c = m.x;
				d = m.y;
				e = l[0].pageX;
				f = l[0].pageY;
				l = b.width; ! 0 == b.book.doublePage && (l *= 2);
				g = k.getWidth() / l;
				h = k.getHeight() / b.height;
				b.divCursor.css({
					"background-color": "RGBA(245,225,135,0.8)"
				})
			}
		});
		this.divCursor.bind(_event._move,
		function(l) {
			l = isTouch ? l.originalEvent.touches: [l];
			1 < l.length || (b.mouseDown ? (b.divCursor.css({
				cursor: "move"
			}), k.translate(c - (l[0].pageX - e) * g, d - (l[0].pageY - f) * h), b.refreshArea()) : b.divCursor.css({
				cursor: ""
			}))
		});
		this.divCursor.bind(_event._end,
		function(c) {
			b.mouseDown = !1;
			b.divCursor.css({
				cursor: "",
				"background-color": "RGBA(250,240,185,0.5)"
			})
		});
		this.divCursor.bind(_event._leave,
		function(c) {
			b.mouseDown = !1;
			b.divCursor.css({
				cursor: "",
				"background-color": "RGBA(250,240,185,0.5)"
			})
		})
	}
}),
DoubleZoomPage = Class({
	create: function(b) {
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		this.side = $("<div id='zoomBookSide' style='position:absolute'></div>");
		this.side.css({
			width: 2 * this.width,
			height: this.height
		});
		b.append(this.side);
		this.leftSide = new DoubleZoomSide(this.side, !0);
		this.rightSide = new DoubleZoomSide(this.side, !1);
		this.rightSide.translate(this.width, 0);
		this.bookCenter = parseBool(bookConfig.retainBookCenter);
		this.initEvent();
		this.fitW = this.width;
		this.fitH = this.height;
		this.toScale = 1
	},
	setXY: function(b, c) {
		this.x = b;
		this.y = c
	},
	getWidth: function() {
		return this.side.width() * this.toScale
	},
	getHeight: function() {
		return this.side.height() * this.toScale
	},
	getScale: function() {
		return this.toScale
	},
	setChildIndex: function(b) {
		this.side.css("z-index", b)
	},
	showPage: function() {
		this.side.show()
	},
	hidePage: function() {
		this.side.hide()
	},
	showMM: function() {
		this.leftSide.showMM();
		this.rightSide.showMM()
	},
	playSlider: function() {
		this.leftSide.playSlider();
		this.rightSide.playSlider()
	},
	addHistoryTexts: function() {
		var b = getShownPage();
		this.leftSide.addHistoryTexts(b);
		this.rightSide.addHistoryTexts(b)
	},
	resetSlider: function() {
		this.leftSide.resetSlider();
		this.rightSide.resetSlider()
	},
	onWinResize: function(b, c, d) {
		var e = getPageWidthHeight(b / 2, c, zoomPageWidth, zoomPageHeight);
		this.fitW = e.x;
		this.fitH = e.y;
		this.width = this.fitW;
		this.height = this.fitH;
		this.side.css({
			width: 2 * this.width + "px",
			height: this.height + "px",
			left: "0px",
			top: "0px"
		});
		this.leftSide.onWinResize(b / 2, c, d);
		this.rightSide.onWinResize(b / 2, c, d);
		this.rightSide.translate(this.width)
	},
	translate: function(b, c) {
		b || (b = 0);
		c || (c = 0);
		var d = translate(b, c),
		e = " scale(" + this.toScale + ")";
		this.side.css({
			"-webkit-transform": d + e,
			"-moz-transform": d + e,
			"-o-transform": d + e,
			"-ms-transform": d + e,
			transform: d + e
		})
	},
	forceReset: function(b) {
		void 0 == b && (b = getTransform(this.side[0]));
		this.side.css({
			width: 2 * this.fitW + "px",
			height: this.fitH + "px"
		});
		this.toScale = 1;
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", b.x, b.y);
		this.translateX = b.x;
		this.translateY = b.y;
		this.leftSide.forceReset();
		this.rightSide.forceReset()
	},
	animateMax: function() {
		if (!0 != this.isZomming) {
			var b = Math.min(windowWidth, zoomPageWidth),
			c = b / this.fitW,
			b = this.fitW - b;
			this.zoomOut = !1;
			this.animateZoom(c, b, 0, 300, "linear")
		}
	},
	noZoom: function() {
		this.toScale = this.fitW / this.width;
		var b = translate(0, 0),
		c = " scale(" + this.toScale + ")";
		this.side.css({
			"-webkit-transform": b + c,
			"-moz-transform": b + c,
			"-ms-transform": b + c,
			"-o-transform": b + c,
			transform: b + c
		})
	},
	fillContent: function(b) {
		b = parseInt(b);
		var c;
		0 == b % 2 ? (c = b, b += 1) : c = b - 1;
		this.imageIndex = c;
		0 == c || c == bookConfig.totalPageCount ? (this.leftSide.translate(this.width / 2, 0), this.rightSide.translate(this.width / 2, 0)) : (this.leftSide.translate(0, 0), this.rightSide.translate(this.width, 0));
		if (!0 == rightToLeft) {
			var d = c;
			c = b;
			b = d
		}
		this.leftSide.fillContent(c);
		this.rightSide.fillContent(b)
	},
	highlightSearch: function() {
		this.leftSide.highlightSearch();
		this.rightSide.highlightSearch()
	},
	clearHighlight: function() {
		this.leftSide.clearHighlight();
		this.rightSide.clearHighlight()
	},
	getCenterTransform: function() {
		return Point(this.fitW - this.width, 0)
	},
	setZooming: function(b) {
		this.isZooming = b
	},
	getScaleFromFit: function() {
		return this.width * this.toScale / this.fitW
	},
	resetSize: function() {
		this.width *= this.toScale;
		this.height *= this.toScale;
		this.toScale = 1;
		this.side.css({
			width: 2 * this.width,
			height: this.height * this.toScale
		});
		var b = getTransform(this.side[0]),
		b = translate(b.x, b.y);
		this.side.css({
			"-webkit-transform": b + "scale(1)",
			"-moz-transform": b + "scale(1)",
			"-ms-transform": b + "scale(1)",
			"-o-transform": b + "scale(1)",
			transform: b + "scale(1)"
		});
		this.leftSide.resetSize();
		this.rightSide.resetSize();
		0 == this.imageIndex || this.imageIndex == bookConfig.totalPageCount ? (this.leftSide.translate(this.width / 2, 0), this.rightSide.translate(this.width / 2, 0)) : (this.leftSide.translate(0, 0), this.rightSide.translate(this.width, 0))
	},
	setScale: function(b) {
		this.toScale = b;
		this.leftSide.toScale = b;
		this.rightSide.toScale = b
	},
	getScale: function() {
		return this.toScale
	},
	leaveSide: function() {
		this.leftSide.leaveSide();
		this.rightSide.leaveSide()
	},
	enterSide: function() {
		this.leftSide.enterSide();
		this.rightSide.enterSide()
	},
	initEvent: function() {
		var b = this,
		c = Point(0, 0),
		d = Point(0, 0),
		e = Point(0, 0),
		f = !1,
		g = !1,
		h = null,
		k = !1,
		l,
		m = 0,
		p = 0,
		n;
		this.side.bind(_event._down,
		function(m) {
			if (bookType == BookType.zoom_book) {
				if (!0 == b.isZomming || !0 == zoomBook.isFlipping) return ! 1;
				l = b.toScale;
				var n = b.side[0];
				try {
					n.setCapture ? n.setCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP)
				} catch(q) {} ! 0 == b.isLeft && (b.fingerDown = !0); - 1 != b.inertiaTimer && (window.clearInterval(b.inertiaTimer), b.inertiaTimer = -1);
				m = isTouch ? m.originalEvent.touches: [m];
				n = getTransform(b.side[0]);
				b.translateX = n.x;
				b.translateY = n.y;
				1 == m.length ? (f = !0, g = !1, c = Point(m[0].pageX, m[0].pageY), h = Point(b.side.position().left, b.side.position().top)) : 2 == m.length && (f = !1, g = !0, c = Point(m[0].pageX, m[0].pageY), e = Point(m[1].pageX, m[1].pageY), d = Point((m[0].pageX + m[1].pageX) / 2, (m[0].pageY + m[1].pageY) / 2), h = Point(b.side.offset().left, b.side.offset().top));
				return k = !1
			}
		});
		this.side.bind(_event._move,
		function(q) {
			if (bookType == BookType.zoom_book) if (q = isTouch ? q.originalEvent.touches: [q], zoomBook.bookMap.refreshArea(), f ? b.side.css({
				cursor: "move"
			}) : b.side.css({
				cursor: ""
			}), f) {
				var r = 1 * (q[0].pageX - c.x) + b.translateX,
				w = 1 * (q[0].pageY - c.y) + b.translateY,
				u = (new Date).getTime(),
				y = Math.sqrt(Math.pow(r - m, 2) + Math.pow(w - p, 2)),
				v = 0;
				100 > u - n && 0 < u - n && (v = y / (u - n), Math.min(300 * v, 300), y = Math.asin((m - r) / y), Math.cos(y), Math.sin(y));
				b.zoomObj(b.side, b.origin, " scale(" + b.toScale + ")", r, w);
				m = r;
				p = w;
				n = u
			} else if (g) r = Point(q[0].pageX, q[0].pageY),
			u = Point(q[1].pageX, q[1].pageY),
			w = Math.sqrt(Math.pow(c.x - e.x, 2) + Math.pow(c.y - e.y, 2)),
			r = Math.sqrt(Math.pow(r.x - u.x, 2) + Math.pow(r.y - u.y, 2)),
			b.toScale = Math.max(r / w * l, 0),
			w = (d.x - h.x) / l,
			r = (d.y - h.y) / l,
			b.side.width(),
			b.side.height(),
			w = (l - b.toScale) * b.side.width() * (w / b.side.width()),
			u = (l - b.toScale) * b.side.height() * (r / b.side.height()),
			r = b.translateX + w,
			w = b.translateY + u,
			b.zoomObj(b.side, b.origin, " scale(" + b.toScale + ")", r, w),
			k = !0,
			m = r,
			p = w;
			else if (!isPad() && !0 != b.isZomming && zoomBook.controlBar && (!zoomBook.controlBar || !1 != zoomBook.controlBar.moveByMousePosition) && 0 <= b.imageIndex && b.imageIndex <= totalPageCount) {
				var t = toolBar.getTopHeight() - 20,
				w = windowHeight - toolBar.getBottomHeight() - 20,
				r = windowWidth - 0,
				w = w - t,
				u = b.getWidth(),
				y = b.getHeight(),
				v = q[0].pageX;
				q = q[0].pageY;
				var x = (q - t) / w,
				t = Math.round((v - 0) / r * u),
				x = Math.round(y * x),
				z = getTransform(b.side[0]);
				b.translate(u > r ? v - t - b.x: z.x, y > w ? q - x - b.y: z.y)
			}
		});
		var q = function(c) {
			if (bookType == BookType.zoom_book) {
				b.side.css({
					cursor: ""
				});
				b.translateX = m;
				b.translateY = p;
				c = b.side[0];
				try {
					c.releaseCapture ? c.releaseCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP)
				} catch(d) {}
				k && b.width * b.toScale <= b.fitW && !0 == g && (toolBar.btnZoom.trigger(_event._end), toolBar.btnZoom.trigger(_event._leave)); ! 0 == b.isLeft && (b.fingerDown = g);
				k = g = f = !1; ! 1 == isTouchDevice() && (b.firstEnter = !0)
			}
		};
		this.side.clickExceptMove(clickFun);
		this.side.bind(_event._end, q);
		this.side.bind(_event._leave, q);
		this.side.bind(_event._enter,
		function() { ! 1 == isTouchDevice() && (b.firstEnter = !0);
			return ! 1
		});
		this.side.hammer().on("doubletap",
		function(c) {
			if (!0 == zoomBook.isFlipping || !0 == this.isZomming || bookType != BookType.zoom_book) return ! 1;
			b.animateFit();
			return ! 1
		});
		if (2 == browserType || 3 == browserType) _event._mousewheel = "DOMMouseScroll";
		isIE() && (_event._mousewheel = "mousewheel");
		this.side.bind(_event._mousewheel,
		function(c) {
			if (bookType != BookType.zoom_book || !0 == b.isZomming || !0 == zoomBook.isFlipping) return ! 1;
			var d = c.originalEvent,
			e = Math.max( - 1, Math.min(1, d.wheelDelta || -d.detail)),
			f = -0.5 * b.toScale;
			0 < e && (f = 1 * b.toScale);
			var e = b.toScale,
			f = e + f,
			g = Point(d.pageX, d.pageY),
			h = Point(b.side.offset().left, b.side.offset().top),
			d = getTransform(b.side[0]),
			k = (g.x - h.x) / e,
			g = (g.y - h.y) / e;
			b.side.width();
			b.side.height();
			k = (e - f) * b.side.width() * (k / b.side.width());
			e = (e - f) * b.side.height() * (g / b.side.height());
			b.animateZoom(f, k + d.x, e + d.y, 400, "linear");
			stopEvent(c);
			return ! 1
		});
		this.side.speed(this.inertiaMove.bind(this))
	},
	animateZoom: function(b, c, d, e, f) {
		if (!0 != this.isZomming) {
			this.isZomming = !0;
			b || (b = this.toScale);
			c || (c = 0);
			d || (d = 0);
			e || (e = 25);
			void 0 == f && (f = "easeOutSine");
			var g = getTransform(this.side[0]),
			h = {
				scale: this.toScale,
				x: g.x,
				y: g.y
			},
			k = this,
			l = "scale(" + b + ")",
			m = translate(c, d); (function() {
				if (isSupportTransition()) {
					var g = !0;
					this.side.css({
						"-webkit-transform": m + l,
						"-moz-transform": m + l,
						"-ms-transform": m + l,
						"-o-transform": m + l,
						transform: m + l,
						transition: "500ms",
						"-webkit-transition": "500ms",
						"-moz-transition": "500ms",
						"-o-transition": "500ms"
					});
					this.side.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",
					function() {
						if (g) {
							this.side.css({
								transition: "0s",
								"-webkit-transition": "0s",
								"-moz-transition": "0s",
								"-o-transition": "0s",
								transition: "0s"
							});
							this.toScale = b;
							this.leftSide.toScale = b;
							this.rightSide.toScale = b;
							var c = setInterval(function() {
								this.leftSide.focusIng || this.rightSide.focusIng || (this.resetSize(), clearInterval(c))
							}.bind(this), 20);
							g = this.isZomming = !1;
							if (this.zoomOut) {
								if (bookType != BookType.zoom_book) return ! 1;
								bookType = 0;
								changeShowBook(0);
								setCurrentIndexTextField(flipBook.currentPageIndex, !0);
								flipBook.gotoPage(zoomBook.currentIndex);
								thumbButtonEnable && thumbnail.clearHighLight();
								thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex);
								toolBar.changeZoomIcon(!0)
							}
						}
					}.bind(this))
				} else if ("linear" == f) var n = 0,
				q = b - h.scale,
				s = c - h.x,
				r = d - h.y,
				w = window.setInterval(function() {
					n++;
					var e = h.scale + q * n / 10,
					f = h.x + s * n / 10,
					g = h.y + r * n / 10;
					10 == n && (e = b, f = c, g = d);
					k.zoomObj(k.side, k.origin, " scale(" + e + ")", f, g);
					if (10 == n && (window.clearInterval(w), k.toScale = b, k.leftSide.toScale = b, k.rightSide.toScale = b, k.resetSize(), k.isZomming = !1, k.zoomOut)) {
						if (bookType != BookType.zoom_book) return ! 1;
						bookType = 0;
						changeShowBook(0);
						setCurrentIndexTextField(flipBook.currentPageIndex, !0);
						flipBook.gotoPage(zoomBook.currentIndex);
						thumbButtonEnable && thumbnail.clearHighLight();
						thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex);
						toolBar.changeZoomIcon(!0)
					}
				},
				Math.floor(e / 10));
				else $(h).animate({
					scale: b,
					x: c,
					y: d
				},
				{
					duration: e,
					easing: f,
					step: function() {
						k.zoomObj(k.side, k.origin, " scale(" + h.scale + ")", h.x, h.y)
					},
					complete: function() {
						k.toScale = b;
						k.leftSide.toScale = b;
						k.rightSide.toScale = b;
						k.resetSize();
						k.isZomming = !1;
						if (k.zoomOut) {
							if (bookType != BookType.zoom_book) return ! 1;
							bookType = 0;
							changeShowBook(0);
							setCurrentIndexTextField(flipBook.currentPageIndex, !0);
							flipBook.gotoPage(zoomBook.currentIndex);
							thumbButtonEnable && thumbnail.clearHighLight();
							thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex);
							toolBar.changeZoomIcon(!0)
						}
					}
				})
			}).delay(this, 50)
		}
	},
	animateFit: function() {
		if (!0 != this.isZomming) {
			Math.min(windowWidth, zoomPageWidth);
			var b = this.fitW / this.width;
			this.zoomOut = !0;
			this.animateZoom(b, 0, 0, 300, "linear")
		}
	},
	inertiaMove: function(b, c) {
		if (!0 != this.isZomming && (0 != b || 0 != c)) {
			var d;
			d = 120 * windowWidth / 1600;
			if (b < -d) rightToLeft ? previousPageFun() : nextPageFun();
			else if (b > d) rightToLeft ? nextPageFun() : previousPageFun();
			else {
				var e = b,
				f = c,
				g = b / 20,
				h = c / 20,
				k = 0;
				window.clearInterval(this.inertiaTimer);
				this.inertiaTimer = window.setInterval(function() {
					if (!0 == this.isZomming) window.clearInterval(this.inertiaTimer);
					else {
						var b = getTransform(this.side[0]);
						e -= g;
						f -= h;
						b.x += e;
						b.y += f;
						this.translate(b.x, b.y);
						if (20 == ++k) {
							window.clearInterval(this.inertiaTimer);
							var c = this.getWidth(),
							b = this.x + b.x;
							b > windowWidth && (rightToLeft ? nextPageFun() : previousPageFun());
							b < -c && (rightToLeft ? previousPageFun() : nextPageFun())
						}
					}
				}.bind(this), 20)
			}
		}
	}
}).extend(DoubleZoomSide);
bdor[15] = ".";
var SlideSide = Class({
	create: function(b, c) {
		this.imageIndex = 0;
		this.slider = null;
		this.playSliderAfterLoad = !1;
		this.side = $("<div style='width:100%;height:100%;position:absolute;'></div>");
		this.tmpContent = $("<div style='width:100%;height:100%;position:absolute;'></div>");
		this.sideContent = $("<div style='width:100%;height:100%;position:absolute;'></div>");
		this.sideImg = $("<img style=' width:100%;height:100%;position:absolute;'/>");
		this.searchHighlight = $("<div style=' width:100%;height:100%;position:absolute;' class='kong' id='highlight'></div>");
		this.MMBackground = $("<div id='MMBackground' style='position:absolute; width:100%;height:100%;z-index:6;'></div>");
		this.isLeft = c;
		this.rightToLeft = rightToLeft;
		var d = getColor("pageBackgroundColor", "#f5f5f5");
		this.side.css({
			"background-color": d,
			overflow: "hidden",
			"background-image": "url(" + uiBaseURL + "progress.gif)",
			"background-repeat": "no-repeat",
			"background-position": "center"
		});
		this.initMMItems();
		b.append(this.side);
		this.side.append(this.tmpContent);
		this.tmpContent.append(this.sideContent);
		this.tmpContent.append(this.MMBackground);
		this.bookType = BookType.slide_book
	},
	showLoading: function() {},
	hideLoading: function() {},
	onResize: function() {
		this.width = this.side.width();
		this.height = this.side.height();
		this.tmpContent.css({
			width: "100%",
			height: "100%",
			left: 0,
			top: 0
		});
		this.sideContent.css({
			width: "100%",
			height: "100%"
		});
		this.sideImg.css({
			width: "100%",
			height: "100%"
		});
		this.searchHighlight.css({
			width: "100%",
			height: "100%"
		});
		this.onMMResize(this.side.width(), this.side.height())
	}
}).extend(normalSide),
isThumbDrag = !1,
SlideThumbnailBar = Class({
	create: function(b) {
		this.width = windowWidth;
		this.height = 135;
		this.contentHeight = 120;
		this.mainColor = "#888888";
		this.thumbArray = [];
		this.mouseDown = this.showing = !1;
		this.scrollBoxX = this.mouseDownX = -1;
		this.lastMoveX = -1 + (windowWidth - this.width + 20) / 2;
		this.lastMoveTime = -1;
		this.mergeing = this.moveLeft = !1;
		this.pageIndex = this.currentCellIndex = 1;
		this.createThumbItemFalg = !1;
		this.oldMode = this.currentMedo = 0;
		this.initPanel(b)
	},
	initPanel: function(b) {
		this.background = $("<div></div>");
		this.contentBox = $("<div></div>");
		this.contentBac = $("<div></div>");
		this.scrollBox = $("<div></div>");
		this.openButton = $("<div></div>");
		$(this.background).css({
			width: "100%",
			bottom: -this.height,
			position: "absolute",
			height: this.height,
			"z-index": 100
		});
		$(this.contentBac).css({
			width: "100%",
			bottom: -this.height,
			position: "absolute",
			height: this.height,
			"z-index": 100
		});
		this.scrollBox.css({
			position: "absolute",
			height: this.contentHeight
		});
		this.contentBox.css({
			width: "100%",
			position: "absolute",
			bottom: "1px",
			height: "100%",
			left: 10,
			top: (this.height - this.contentHeight) / 2,
			overflow: "hidden",
			opacity: "0.9"
		});
		this.openButton.css({
			width: "47px",
			height: "20px",
			background: bookConfig.thumbnailColor,
			"border-radius": "5px 5px 0px 0px",
			margin: "-20px auto",
			position: "relative",
			"padding-top": "-16px",
			cursor: "pointer",
			"text-align": "center"
		});
		this.openButton.append("<img style='margin-top:5px;' src='" + uiBaseURL + "arrow-up.png'/>");
		$(this.contentBac).css({
			background: bookConfig.thumbnailColor
		});
		isNaN(bookConfig.thumbnailAlpha) || "" == bookConfig.thumbnailAlpha || null == bookConfig.thumbnailAlpha || void 0 == bookConfig.thumbnailAlpha ? $(this.contentBac).css({
			opacity: 0.3
		}) : $(this.contentBac).css({
			opacity: bookConfig.thumbnailAlpha / 100
		});
		$(b).append(this.contentBac);
		$(b).append(this.background);
		$(this.background).append(this.contentBox);
		$(this.contentBox).append(this.scrollBox);
		$(this.contentBac).append(this.openButton);
		this.openButton.bind(_event._end, this.showOrHide.bind(this))
	},
	getPageIndex: function() {
		return this.pageIndex
	},
	setPageIndex: function(b) {
		this.pageIndex = b
	},
	getHeight: function() {
		return this.height
	},
	onResize: function() {
		this.width = windowWidth;
		var b = $(this.contentBox).width(),
		c = $(this.scrollBox).width();
		if (b > c) $(this.scrollBox).css({
			left: (b - c) / 2 + "px"
		});
		else {
			var d = $(this.scrollBox).offset().left;
			0 < d && (d = 0);
			d < b - c && (d = b - c);
			$(this.scrollBox).css({
				left: d + "px"
			})
		}
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px");
		$(this.contentBac).css(d[0], b + "px");
		$(this.contentBac).css(d[1], c + "px")
	},
	addItem: function() {
		for (var b = 0; b <= originTotalPageCount;) {
			var c = 0 == b ? new SlideThumbnailItem(this.scrollBox, 1) : new SlideThumbnailItem(this.scrollBox, b);
			c.getWidth();
			c.setPosition(this.thumbArray.length * (c.getWidth() + 15) + 5, 2.5);
			this.thumbArray.push(c);
			b += 2
		}
		$(this.scrollBox).css({
			width: this.thumbArray.length * (c.getWidth() + 15) + 10 + "px"
		})
	},
	resetItemPosition: function() {
		for (var b = 0,
		c = this.thumbArray.length,
		d, e = 0; e < c; e++) {
			var f = this.thumbArray[e];
			d = f.getWidth() / 2 + 20 + (c - 1) * (f.getWidth() + 15);
			rightToLeft ? 0 == e ? (b = d - 5 - f.getWidth() / 2, f.setPosition(b, 2.5), b = b - 15 - f.getWidth()) : (f.setPosition(b, 2.5), b = b - f.getWidth() - 15) : 0 == e ? (f.setPosition(5, 2.5), b = f.getWidth() / 2 + 20) : (f.setPosition(b, 2.5), b = b + f.getWidth() + 15)
		}
		$(this.scrollBox).css({
			width: d
		})
	},
	mergeAll: function() {
		this.currentMedo = 2;
		this.showing && this.createThumbItemFalg && this.currentMedo != this.oldMode && (this.repositionDouble(), this.oldMode = 2);
		this.mergeing = !0
	},
	fissionAll: function() {
		this.currentMedo = 1;
		this.showing && this.createThumbItemFalg && this.currentMedo != this.oldMode && (this.repositionSingle(), this.oldMode = 1);
		this.mergeing = !1
	},
	repositionDouble: function() {
		for (var b = 0; b < this.thumbArray.length; b++) this.thumbArray[b].merge();
		this.resetItemPosition();
		this.clearHighLight(this.getPageIndex());
		this.setHighLight(this.getPageIndex())
	},
	repositionSingle: function() {
		for (var b = 0; b < this.thumbArray.length; b++) this.thumbArray[b].fission();
		this.resetItemPosition();
		this.clearHighLight(this.getPageIndex());
		this.setHighLight(this.getPageIndex())
	},
	getShowStatu: function() {
		return this.showing
	},
	setShowStatu: function(b) {
		this.showing = b
	},
	showOrHide: function() {
		this.showing ? this.hideBox() : this.showshow()
	},
	showshow: function() {
		this.showing = !0;
		this.createThumbItemFalg && this.currentMedo != this.oldMode && 1 === this.currentMedo && this.repositionSingle();
		this.createThumbItemFalg && this.currentMedo != this.oldMode && 2 === this.currentMedo && this.repositionDouble();
		this.createThumbItemFalg || (this.createThumbItemFalg = !0, this.addItem(), 1 === this.currentMedo ? this.repositionSingle() : this.repositionDouble(), this.initEvent(), this.onResize(), this.setHighLight(this.getPageIndex()), this.fillNearByImages(0));
		this.oldMode = this.currentMedo;
		$(this.background).animate({
			bottom: 0
		},
		300);
		$(this.contentBac).animate({
			bottom: 0
		},
		300);
		this.openButton.empty().append("<img style='margin-top:5px;' src='" + uiBaseURL + "arrow-down.png'/>")
	},
	hideBox: function() {
		$(this.background).animate({
			bottom: -135
		},
		300);
		$(this.contentBac).animate({
			bottom: -135
		},
		300);
		this.openButton.empty().append("<img style='margin-top:5px;' src='" + uiBaseURL + "arrow-up.png'/>");
		this.showing = !1
	},
	getOccuHeight: function() {
		return 120
	},
	initEvent: function() {
		var b = this;
		this.background.bind(_event._down,
		function(b) {
			return ! 1
		});
		$(this.contentBox).bind(_event._down,
		function(c) {
			b.mouseDown = !0;
			isThumbDrag = !1;
			c = isTouch ? c.originalEvent.touches: [c];
			b.mouseDownX = c[0].pageX;
			b.scrollBoxX = $(b.scrollBox).offset().left;
			return ! 1
		});
		$(this.contentBox).bind(_event._move,
		function(c) {
			if (b.mouseDown) {
				c = isTouch ? c.originalEvent.touches: [c];
				var d = b.mouseDownX - c[0].pageX;
				20 < Math.abs(d) && (isThumbDrag = !0);
				$(b.contentBox).width() > $(b.scrollBox).width() || (d = b.scrollBoxX - d - (windowWidth - b.width + 20) / 2, 0 < d && (d = 0), d < $(b.contentBox).width() - $(b.scrollBox).width() && (d = $(b.contentBox).width() - $(b.scrollBox).width()), $(b.scrollBox).css({
					left: d + "px"
				}), b.moveLeft = b.lastMoveX > c[0].pageX ? !0 : !1, b.lastMoveX = c[0].pageX, b.lastMoveTime = (new Date).getTime())
			}
		});
		$(this.contentBox).bind(_event._end,
		function(c) {
			b.mouseDown = !1;
			100 > (new Date).getTime() - b.lastMoveTime && -1 != b.lastMoveTime && (c = b.moveLeft ? -30 : 30, b.tweener($(b.scrollBox).offset().left - (windowWidth - b.width + 20) / 2, c, 10))
		});
		$(this.contentBox).bind("mouseleave",
		function(c) {
			b.mouseDown = !1
		})
	},
	setHighLight: function(b) {
		this.currentCellIndex = b;
		this.setPageIndex(b);
		if (this.createThumbItemFalg) {
			var c = Math.floor(b / 2);
			if (! (b > originTotalPageCount)) if (this.thumbArray[c].highLight(b), this.clearHighLight(c), $(this.contentBox).width() > $(this.scrollBox).width()) $(this.scrollBox).css({
				left: ($(this.contentBox).width() - $(this.scrollBox).width()) / 2 + "px"
			});
			else {
				b = $(this.scrollBox).offset().left - (windowWidth - self.width + 20) / 2;
				var d = $(this.contentBox).width(),
				e = rightToLeft ? (this.thumbArray.length - (c - 1)) * (this.thumbArray[c].getWidth() + 5) + 5 : (c - 1) * (this.thumbArray[c].getWidth() + 5) + 5,
				c = this.thumbArray[c].getWidth();
				this.tweener(b, -(e + b - (d - c) / 2) / 6, 6)
			}
		}
	},
	clearHighLight: function(b) {
		if (this.createThumbItemFalg) for (var c = 0; c < this.thumbArray.length; c++) c != b && this.thumbArray[c].clearHighLight()
	},
	tweener: function(b, c, d) {
		var e = function(b, c) {
			for (var d = c / 2,
			e = (b - b / 4) / d, f = Array(c), g = 0; g < c; g++) f[g] = g < d ? b - (d - g) * e: b + (g - d + 1) * e;
			return f.reverse()
		} (c, d),
		f = b,
		g = 0,
		h = this,
		k = window.setInterval(function() {
			f += e[g];
			g++;
			g == d && (f = b + c * d);
			0 < f && (f = 0);
			f < $(h.contentBox).width() - $(h.scrollBox).width() && (f = $(h.contentBox).width() - $(h.scrollBox).width());
			$(h.scrollBox).css({
				left: f + "px"
			});
			g >= d && (window.clearInterval(k), h.fillNearByImages(f))
		},
		30)
	},
	fillNearByImages: function(b) {
		if (this.createThumbItemFalg) {
			var c = Math.ceil((this.background.width() - b) / 65) + 2;
			this.background.width() > this.scrollBox.width() ? (b = 0, c = originTotalPageCount + 1) : b = 0 == b ? 0 : Math.ceil( - b / 100);
			b = Math.max(Math.ceil(b / 2), 0);
			c = Math.min(c, originTotalPageCount + 1);
			if (0 < b) for (var d = 0; d < b; d++) this.thumbArray[d] && this.thumbArray[d].clearImage();
			for (d = b; d < Math.ceil(c / 2); d++) b = rightToLeft ? this.thumbArray.length - d - 1 : d,
			this.thumbArray[b] && this.thumbArray[b].addImage()
		}
	}
}),
SlideThumbnailCell = Class({
	create: function(b) {
		this.background = $("<div style='position:absolute;'></div>");
		this.pageNum = $("<div style='position:absolute;'></div>");
		this.img = $("<img />");
		this.imgBac = $("<div></div>");
		this.pageIndex = -1;
		this.height = 115;
		this.width = 95 * bookConfig.largePageWidth / bookConfig.largePageHeight;
		this.imgHeight = this.imgWidth = -1;
		$(b).append(this.background);
		$(this.background).append(this.pageNum);
		$(this.background).css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px",
			top: "0px"
		});
		$(this.pageNum).css({
			width: this.width + "px",
			height: 20,
			bottom: "-8px",
			"line-height": "20px",
			"text-align": "center",
			"vertical-align": "middle",
			color: "#ffffff",
			"font-size": "12px"
		});
		$(this.imgBac).append(this.img);
		$(this.imgBac).css({
			position: "absolute"
		});
		$(this.img).css({
			position: "absolute"
		});
		$(this.img).addBorderShadow("#555555", 0, 2)
	},
	getPageIndex: function() {
		return this.pageIndex
	},
	getWidth: function() {
		return this.width
	},
	getHeight: function() {
		return this.height
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px")
	},
	onResize: function(b, c) {
		$(this.background).css({
			width: b + "px",
			height: c + "px"
		});
		this.onResizeImage(b, c)
	},
	onResizeImage: function() {
		$(this.img).css({
			width: this.width + "px",
			height: "95px"
		});
		$(this.imgBac).css({
			width: this.width + "px",
			height: "95px"
		})
	},
	setImgPosition: function(b) {
		switch (b) {
		case "l":
			$(this.imgBac).css({
				left:
				"0px",
				right: "auto"
			});
			break;
		case "r":
			$(this.imgBac).css({
				right:
				"0px",
				left: "auto"
			});
			break;
		case "c":
			$(this.imgBac).css({
				left:
				(this.width - this.imgWidth) / 2 + "px",
				right: "auto"
			})
		}
	},
	setCaption: function(b) {
		this.pageNum.html(b)
	},
	fillImage: function(b) {
		this.pageIndex = b;
		this.img = $("<img/>");
		$(this.img).attr("src", getPageDir(b, "thumb", originTotalPageCount));
		$(this.background).append(this.imgBac);
		this.imgBac.empty();
		$(this.imgBac).append(this.img);
		this.onResizeImage(this.width, this.height);
		this.pageNum.html("<b>" + b + "</b>")
	},
	clearImage: function(b) {
		$(this.imgBac).empty()
	},
	showBorder: function() {
		$(this.background).css({
			border: ""
		})
	},
	hideBorder: function() {
		$(this.background)[0].style.border = ""
	},
	getTextField: function() {
		return this.pageNum
	},
	hideTextField: function() {
		this.pageNum.hide()
	},
	showTextField: function() {
		this.pageNum.show()
	},
	showCell: function(b) {
		$(this.background).css({
			display: b ? "block": "none"
		})
	},
	onMouseUp: function(b, c) {
		var d = this;
		$(this.background).bind(_event._end,
		function(e) {
			c.call(b, d)
		});
		$(this.background).bind(_event._enter,
		function(b) {
			d.background.css({
				cursor: "pointer"
			})
		})
	},
	highLight: function(b) {
		$(this.imgBac).css({
			border: "2px solid #ff8040"
		})
	},
	onMouseOver: function() {
		var b = this;
		$(this.imgBac).css({
			border: ""
		});
		$(this.imgBac).bind(_event._enter,
		function(c) {
			b.imgBac.css({
				border: "2px solid #0080ff"
			})
		});
		$(this.imgBac).bind(_event._leave,
		function(c) {
			b.imgBac.css({
				border: ""
			})
		})
	},
	clearMouseOver: function() {
		var b = this;
		$(this.imgBac).bind(_event._enter,
		function(c) {
			b.imgBac.css({
				border: ""
			})
		});
		$(this.imgBac).bind(_event._leave,
		function(c) {
			b.imgBac.css({
				border: ""
			})
		})
	},
	onMouseOverUp: function() {
		var b = this;
		$(this.imgBac).bind(_event._enter,
		function(c) {
			b.imgBac.css({
				border: "2px solid #0080ff"
			})
		});
		$(this.imgBac).bind(_event._leave,
		function(c) {
			b.imgBac.css({
				border: "2px solid #ff8040"
			})
		})
	},
	clearHighLight: function() {
		$(this.imgBac).css({
			border: ""
		})
	}
}),
SlideThumbnailItem = Class({
	create: function(b, c) {
		this.background = $("<div style='position:absolute;font-family:Arial,Tahoma;'></div>");
		this.imageBac = $("<div style='position:absolute;'></div>");
		this.pageNum = $("<div style='position:absolute;'></div>");
		this.itemB = new SlideThumbnailCell(this.imageBac);
		this.itemA = new SlideThumbnailCell(this.imageBac);
		this.height = 115;
		this.width = 190 * bookConfig.largePageWidth / bookConfig.largePageHeight;
		this.isMerge = this.isDoublePage = !0;
		this.pageIndex = c;
		this.fillImage = !1;
		this.mainColor = "#000000";
		$(b).append(this.background);
		$(this.background).append(this.imageBac);
		$(this.background).append(this.pageNum);
		$(this.background).css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px",
			top: "2px"
		});
		$(this.imageBac).css({
			position: "absolute",
			width: this.width + "px",
			height: 95
		});
		$(this.pageNum).css({
			width: this.width + "px",
			height: 20,
			bottom: "-8px",
			"line-height": "20px",
			"text-align": "center",
			"vertical-align": "middle",
			color: "#ffffff",
			"font-size": "12px"
		});
		1 != c && c != totalPageCount ? (this.itemA.setPosition(0, 0, rightToLeft ? ["right", "top"] : ["left", "top"]), this.itemB.setPosition(0, 0, rightToLeft ? ["left", "top"] : ["right", "top"]), this.itemB.onMouseUp(this, this.onItemMouseUp), this.itemA.pageIndex = c, this.itemB.pageIndex = c + 1, this.onMouseOver()) : (1 == c ? this.itemA.setPosition(0, 0) : rightToLeft ? this.itemA.setPosition(0, 0, ["right", "top"]) : this.itemA.setPosition(0, 0), this.itemB.showCell(!1), this.setBorder(!1), this.itemA.pageIndex = c, this.itemA.onMouseOver());
		this.itemA.onMouseUp(this, this.onItemMouseUp);
		$(this.pageNum).hide()
	},
	getWidth: function() {
		return this.width
	},
	addImage: function() {
		this.fillImage || (this.itemA.fillImage(this.pageIndex), 1 != this.pageIndex && this.pageIndex != totalPageCount && this.itemB.fillImage(this.pageIndex + 1), this.fillImage = !0, rightToLeft ? $(this.pageNum).html(this.pageIndex + 1 + "-" + this.pageIndex) : $(this.pageNum).html("<b>" + this.pageIndex + "-" + (this.pageIndex + 1) + "</b>"))
	},
	clearImage: function() {
		this.itemA.clearImage(this.pageIndex);
		1 != this.pageIndex && this.pageIndex != totalPageCount && this.itemB.clearImage(this.pageIndex + 1);
		this.fillImage = !1
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px")
	},
	onResize: function(b, c) {
		this.width = b;
		this.height = c;
		$(this.background).css({
			width: b + "px",
			height: c + "px"
		})
	},
	resetItem: function() {},
	fission: function() {
		1 != this.pageIndex && this.pageIndex != totalPageCount && (this.setBorder(!1), this.onResize(this.width, this.height), this.itemA.setImgPosition("r"), this.itemB.setImgPosition("l"), this.showTextField(!1), this.isMerge = !1)
	},
	merge: function() {
		1 != this.pageIndex && this.pageIndex != totalPageCount && (this.setBorder(!1), this.onResize(this.width, this.height), this.itemA.setImgPosition("r"), this.itemB.setImgPosition("l"), this.showTextField(!0), this.isMerge = !0)
	},
	showBorder: function() {
		$(this.imageBac).css({
			border: "1px solid #444444"
		})
	},
	hideBorder: function() {
		$(this.imageBac)[0].style.border = ""
	},
	showTextField: function(b) {
		var c = b ? "none": "block";
		this.pageNum.css({
			display: b ? "block": "none"
		});
		this.itemA.getTextField().css({
			display: c
		});
		this.itemB.getTextField().css({
			display: c
		})
	},
	setBorder: function(b) {
		b ? $(this.imageBac).css({
			border: "1px solid #444444"
		}) : $(this.imageBac)[0].style.border = "";
		this.itemA.hideBorder();
		this.itemB.hideBorder()
	},
	onItemMouseUp: function(b) {
		isThumbDrag || (b = b.getPageIndex(), gotoPageFun(b), thumbnail.setHighLight(b))
	},
	highLight: function(b) {
		this.isMerge ? 1 == b || b == totalPageCount ? (this.itemA.highLight("#ffffff"), this.itemA.onMouseOverUp()) : ($(this.imageBac).css({
			border: "2px solid #ff8040"
		}), this.onMouseOverUp()) : b == this.pageIndex ? (this.itemA.highLight("#ffffff"), this.itemA.onMouseOverUp()) : (this.itemB.highLight("#ffffff"), this.itemB.onMouseOverUp())
	},
	onMouseOver: function() {
		var b = this;
		$(this.imageBac).css({
			border: ""
		});
		$(this.imageBac).bind(_event._enter,
		function(c) {
			b.imageBac.css({
				border: "2px solid #0080ff"
			})
		});
		$(this.imageBac).bind(_event._leave,
		function(c) {
			b.imageBac.css({
				border: ""
			})
		})
	},
	onMouseOverUp: function() {
		var b = this;
		$(this.imageBac).bind(_event._enter,
		function(c) {
			b.imageBac.css({
				border: "2px solid #0080ff"
			})
		});
		$(this.imageBac).bind(_event._leave,
		function(c) {
			b.imageBac.css({
				border: "2px solid #ff8040"
			})
		})
	},
	clearMouseOver: function() {
		var b = this;
		$(this.imageBac).bind(_event._enter,
		function(c) {
			b.imageBac.css({
				border: ""
			})
		});
		$(this.imageBac).bind(_event._leave,
		function(c) {
			b.imageBac.css({
				border: ""
			})
		})
	},
	clearHighLight: function() {
		this.isMerge ? 1 == this.pageIndex || this.pageIndex == totalPageCount ? (this.itemA.onMouseOver(), this.itemB.onMouseOver()) : (this.onMouseOver(), this.itemA.clearMouseOver(), this.itemB.clearMouseOver()) : (this.itemA.onMouseOver(), this.itemB.onMouseOver(), this.clearMouseOver());
		this.itemA.clearHighLight();
		this.itemB.clearHighLight()
	}
}),
SlidePage = Class({
	create: function(b, c) {
		this.bookContainer = $("<div style='position:absolute;opacity:0;'></div>");
		b.append(this.bookContainer);
		this.toScale = 1;
		this.position = c;
		this.parent = b;
		this.initContent()
	},
	initContent: function() {
		this.leftPage = $("<div style='position:absolute;width:50%;height:100%;left:0px;'></div>");
		this.rightPage = $("<div style='position:absolute;width:50%;height:100%;right:0px;'></div>");
		this.bookContainer.append(this.leftPage);
		this.bookContainer.append(this.rightPage);
		this.leftSide = new SlideSide(this.leftPage);
		this.rightSide = new SlideSide(this.rightPage)
	},
	fillContent: function(b) {
		b = 2 * parseInt(b / 2);
		this.leftSide.fillContent(b);
		this.rightSide.fillContent(b + 1);
		this.bookContainer.css({
			"-webkit-box-shadow": "",
			"-moz-box-shadow": "",
			"-o-box-shadow": "",
			"box-shadow": ""
		});
		this.leftPage.css({
			"-webkit-box-shadow": "",
			"-moz-box-shadow": "",
			"-o-box-shadow": "",
			"box-shadow": ""
		});
		this.rightPage.css({
			"-webkit-box-shadow": "",
			"-moz-box-shadow": "",
			"-o-box-shadow": "",
			"box-shadow": ""
		});
		0 == b ? (this.leftPage.css({
			left: "25%",
			"z-index": "1"
		}), this.rightPage.css({
			left: "25%",
			"z-index": "2"
		}), this.rightPage.css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"-moz-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"-o-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)"
		}), this.singlePage = !0) : b == originTotalPageCount ? (this.leftPage.css({
			left: "25%",
			"z-index": "2"
		}), this.rightPage.css({
			left: "25%",
			"z-index": "1"
		}), this.leftPage.css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"-moz-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"-o-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)"
		}), this.singlePage = !0) : (rightToLeft ? (this.leftPage.css({
			left: "50%",
			"z-index": "1"
		}), this.rightPage.css({
			left: 0,
			"z-index": "2"
		})) : (this.leftPage.css({
			left: 0,
			"z-index": "1"
		}), this.rightPage.css({
			left: "50%",
			"z-index": "2"
		})), this.bookContainer.css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"-moz-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"-o-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)"
		}), this.singlePage = !1)
	},
	setCss: function(b) {
		this.bookContainer.css(b)
	},
	zoomToScale: function(b) {
		b && (this.toScale *= b, this.zoomObj(b, -(this.width * b - this.fitW) / 2, -(this.height * b - this.fitH) / 2, "0% 0%"))
	},
	zoomObj: function(b, c, d, e) {
		e || (e = "0% 0%");
		var f = translate(c, d),
		g = tranScale(b);
		this.bookContainer.css({
			"-webkit-transform": f + " " + g,
			"-moz-transform": f + " " + g,
			"-ms-transform": f + " " + g,
			"-o-transform": f + " " + g,
			transform: f + " " + g,
			"-webkit-transform-origin": e,
			"-moz-transform-origin": e,
			"-ms-transform-origin": e,
			"-o-transform-origin": e,
			"transform-origin": e
		});
		0 == c && 0 == d && 1 == b && this.transNull()
	},
	resetPageToScale: function(b) {
		if (b) {
			var c = -(this.width * b - this.fitW) / 2,
			d = -(this.height * b - this.fitH) / 2;
			this.zoomObj(1, c, d, "0% 0%");
			this.width *= b;
			this.height *= b;
			this.bookContainer.css({
				width: this.width,
				height: this.height
			});
			0 == c && 0 == d && this.transNull();
			this.resetSide()
		}
	},
	tmpToScale: function(b) {
		b && (this.width *= b, this.height *= b, this.transNull(), this.bookContainer.css({
			width: this.width,
			height: this.height
		}), this.resetSide())
	},
	setPosition: function(b, c) {
		var d = parseFloat(this.bookContainer.css("left")),
		e = parseFloat(this.bookContainer.css("top"));
		this.bookContainer.css({
			left: b + d,
			top: c + e
		})
	},
	resetSide: function() {
		this.leftSide.onResize();
		this.rightSide.onResize()
	},
	resetPage: function() {
		this.toScale = 1;
		this.width = this.fitW;
		this.height = this.fitH;
		this.bookContainer.css({
			width: this.fitW,
			height: this.fitH,
			left: 0,
			top: 0
		});
		this.transNull()
	},
	transNull: function() {
		this.bookContainer.css({
			"-webkit-transform": "",
			"-moz-transform": "",
			"-ms-transform": "",
			"-o-transform": "",
			transform: ""
		})
	},
	moveToNext: function() {
		this.resetPage();
		this.bookContainer.css({
			opacity: 0
		});
		rightToLeft ? this.translate( - this.fitW - (windowWidth - this.fitW) / 2 - bookConfig.leftMargin, 0) : this.translate(windowWidth, 0);
		this.position = 1
	},
	moveToPrev: function() {
		this.resetPage();
		this.bookContainer.css({
			opacity: 0
		});
		rightToLeft ? this.translate(windowWidth, 0) : this.translate( - this.fitW - (windowWidth - this.fitW) / 2 - bookConfig.leftMargin, 0);
		this.position = -1
	},
	moveToCurrent: function() {
		this.resetPage();
		this.bookContainer.css({
			opacity: 1
		});
		this.translate(0, 0);
		this.position = 0
	},
	readyToAnimate: function() {
		this.toScale = 1;
		this.tran = this.getTransform()
	},
	animateReset: function(b, c) {
		var d = $.easing.swing(null, b, this.width, this.fitW - this.width, c),
		e = $.easing.swing(null, b, this.height, this.fitH - this.height, c);
		this.bookContainer.css({
			width: d,
			height: e
		})
	},
	animateToNext: function(b, c) {
		this.animateReset(b, c);
		var d = 0,
		d = rightToLeft ? -this.fitW - (windowWidth - this.fitW) / 2 - bookConfig.leftMargin: windowWidth,
		e = $.easing.swing(null, b, 1, -1, c),
		d = $.easing.swing(null, b, this.tran.x, d - this.tran.x, c);
		this.bookContainer.css({
			opacity: e
		});
		this.translate(d, 0);
		this.position = 1
	},
	animateToCurrent: function(b, c) {
		this.animateReset(b, c);
		var d = $.easing.swing(null, b, 0, 1, c),
		e = $.easing.swing(null, b, this.tran.x, -this.tran.x, c);
		this.bookContainer.css({
			opacity: d
		});
		this.translate(e, 0);
		this.position = 0
	},
	animateToPrev: function(b, c) {
		this.animateReset(b, c);
		var d = 0,
		d = rightToLeft ? windowWidth: -this.fitW - (windowWidth - this.fitW) / 2 - bookConfig.leftMargin,
		e = $.easing.swing(null, b, 1, -1, c),
		d = $.easing.swing(null, b, this.tran.x, d - this.tran.x, c);
		this.bookContainer.css({
			opacity: e
		});
		this.translate(d, 0);
		this.position = -1
	},
	endToAnimate: function() {
		this.width = this.fitW;
		this.height = this.fitH
	},
	getContainer: function() {
		return this.bookContainer
	},
	getWidth: function() {
		return this.width
	},
	getHeight: function() {
		return this.height
	},
	getLeft: function() {
		return parseFloat(this.bookContainer.css("left"))
	},
	getTop: function() {
		return parseFloat(this.bookContainer.css("top"))
	},
	getOffsetLeft: function() {
		return parseFloat(this.bookContainer.offset().left)
	},
	getOffsetTop: function() {
		return parseFloat(this.bookContainer.offset().top)
	},
	translate: function(b, c) {
		b || (b = 0);
		c || (c = 0);
		var d = translate(b, c);
		this.bookContainer.css({
			"-webkit-transform": d,
			"-moz-transform": d,
			"-ms-transform": d,
			"-o-transform": d,
			transform: d
		});
		0 == b && 0 == c && this.transNull()
	},
	getTransform: function() {
		return getTransform(this.bookContainer[0])
	},
	getScale: function() {
		return getScale(this.bookContainer[0])
	},
	onResize: function() {
		this.fitW = this.parent.width();
		this.fitH = this.parent.height();
		this.width = this.parent.width();
		this.height = this.parent.height();
		var b = this.toScale;
		1 == this.position && this.moveToNext();
		0 == this.position && this.moveToCurrent(); - 1 == this.position && this.moveToPrev();
		this.toScale = b;
		0 == this.position && this.resetPageToScale(this.toScale);
		this.resetSide();
		this.bookContainer.css({
			"-webkit-transform-origin": "0% 0%",
			"-moz-transform-origin": "0% 0%",
			"-ms-transform-origin": "0% 0%",
			"-o-transform-origin": "0% 0%",
			"transform-origin": "0% 0%"
		})
	},
	addHistoryTexts: function() {
		this.leftSide.addHistoryTexts();
		this.rightSide.addHistoryTexts()
	},
	openSliderOrNot: function() {
		this.leftSide.openSliderOrNot();
		this.rightSide.openSliderOrNot()
	},
	resetSlider: function() {
		this.leftSide.resetSlider();
		this.rightSide.resetSlider()
	},
	playSlider: function() {
		this.leftSide.playSlider();
		this.rightSide.playSlider()
	},
	leaveSide: function() {
		this.leftSide.leaveSide();
		this.rightSide.leaveSide()
	},
	enterSide: function() {
		this.leftSide.enterSide();
		this.rightSide.enterSide()
	}
});
bdor[14] = "d";
var SlideBook = Class({
	create: function(b) {
		this.toScale = this.currentIndex = 1;
		this.parent = b;
		this.initStage(b);
		this.fillContent();
		"lite" == bookConfig.ToolbarViewMode.toLowerCase() && (this.initGuidBar(), this.initToolBar(), this.initLogo());
		this.initEvent()
	},
	initStage: function(b) {
		this.bookContainer = $("<div id='flipBook' style='position:absolute;z-index:2;'></>");
		b.append(this.bookContainer);
		this.initPage(this.bookContainer);
		this.onResize()
	},
	initPage: function(b) {
		this.prevPage = new SlidePage(b, -1);
		this.nextPage = new SlidePage(b, 1);
		this.currentPage = new SlidePage(b, 0);
		this.currentPage.setCss({
			opacity: 1
		})
	},
	initGuidBar: function() {
		this.leftBar = $("<div style='z-index:5;position:absolute;cursor:pointer;width:50px;height:50px;top:50%;opacity:0.7;margin-top:-25px;'></div>");
		this.rightBar = $("<div class='slideBar'></div>");
		this.leftBar.css({
			left: bookConfig.leftMargin,
			"background-image": "url(" + uiBaseURL + "prev_page.png)",
			"background-repeat": "no-repeat",
			"background-position": "center",
			"background-size": "18px 18px",
			"background-color": bookConfig.toolbarColor,
			"border-radius": "5px"
		});
		this.rightBar.css({
			right: bookConfig.rightMargin,
			"background-image": "url(" + uiBaseURL + "next_page.png)",
			"background-repeat": "no-repeat",
			"background-position": "center",
			"background-size": "18px 18px",
			"background-color": bookConfig.toolbarColor,
			"border-radius": "5px"
		});
		this.parent.append(this.leftBar);
		this.parent.append(this.rightBar);
		rightToLeft ? (this.leftBar.bind(_event._end, nextPageFun), this.rightBar.bind(_event._end, previousPageFun), this.leftBar.attr({
			title: getLanguage("btnNextPage", "Next")
		}), this.rightBar.attr({
			title: getLanguage("btnPrePage", "Previous")
		})) : (this.leftBar.bind(_event._end, previousPageFun), this.rightBar.bind(_event._end, nextPageFun), this.leftBar.attr({
			title: getLanguage("btnPrePage", "Previous")
		}), this.rightBar.attr({
			title: getLanguage("btnNextPage", "Next")
		}));
		this.rightBar.bind(_event._down,
		function() {
			this.rightBar.css({
				opacity: "0.5"
			})
		}.bind(this));
		this.rightBar.bind(_event._end + " " + _event._leave,
		function() {
			this.rightBar.css({
				opacity: "0.7"
			})
		}.bind(this));
		this.leftBar.bind(_event._down,
		function() {
			this.leftBar.css({
				opacity: "0.5"
			})
		}.bind(this));
		this.leftBar.bind(_event._end + " " + _event._leave,
		function() {
			this.leftBar.css({
				opacity: "0.7"
			})
		}.bind(this))
	},
	initToolBar: function() {
		this.toolbarBac = $("<div class='slideToolbar'></div>");
		this.fullscreenBtn = $("<img src='" + uiBaseURL + "slide-fullscreen.png'/>");
		this.homeBtn = $("<img src='" + uiBaseURL + "slide-home.png'/>");
		this.shareBtn = $("<img src='" + uiBaseURL + "slide-share.png'/>");
		this.toolbarBac.css("background-color", bookConfig.toolbarColor);
		this.parent.append(this.toolbarBac);
		this.toolbarBac.append(this.fullscreenBtn);
		this.toolbarBac.append(this.homeBtn);
		this.toolbarBac.append(this.shareBtn);
		this.shareBtn.bind(_event._end,
		function() {
			sharePanel.showOrHide();
			return ! 1
		});
		this.homeBtn.bind(_event._end,
		function() {
			window.open(bookConfig.HomeURL);
			return ! 1
		});
		this.fullscreenBtn.bind(_event._end,
		function() {
			fullscreenFun();
			return ! 1
		});
		$(document).bind(fullScreenApi.fullScreenEventName,
		function() {
			this.changeFullscreenIcon(fullScreenApi.isFullScreen())
		}.bind(this));
		this.fullscreenBtn.attr("title", getLanguage("btnFullscreen", "Enter fullscreen"));
		this.homeBtn.attr("title", getLanguage("btnGoToHome", "Home"));
		this.shareBtn.attr("title", getLanguage("btnSocialShare", "Share"))
	},
	initLogo: function() {
		bookConfig.appLogoIcon && "" != bookConfig.appLogoIcon && (this.logo = $("<img src='" + bookConfig.appLogoIcon + "'/>"), this.logo.css({
			position: "absolute",
			left: bookConfig.logoPadding + "px",
			top: bookConfig.logoTop + "px",
			height: bookConfig.logoHeight + "px",
			cursor: "pointer",
			"z-index": "1"
		}), this.logo.click(function() {
			var b = getLogoLink();
			window.open(b[0], b[1]);
			return ! 1
		}), this.parent.append(this.logo))
	},
	changeFullscreenIcon: function() {
		fullScreenApi.isFullScreen() ? (this.fullscreenBtn.attr("src", uiBaseURL + "slide-exitFullscreen.png"), this.fullscreenBtn.attr("title", getLanguage("btnExitFullscreen", "Exit fullscreen"))) : (this.fullscreenBtn.attr("src", uiBaseURL + "slide-fullscreen.png"), this.fullscreenBtn.attr("title", getLanguage("btnFullscreen", "Enter fullscreen")))
	},
	onResize: function() {
		this.stageW = windowWidth - bookConfig.leftMargin - bookConfig.rightMargin;
		this.stageH = windowHeight - bookConfig.bottomMargin - bookConfig.topMargin - toolBar.getHeight();
		var b = this.getPageWidthHeight(this.stageW, this.stageH);
		this.fitW = b.x;
		this.fitH = b.y;
		this.bookContainer.css({
			left: bookConfig.leftMargin + (this.stageW - this.fitW) / 2,
			top: bookConfig.topMargin + toolBar.getTopHeight() + (this.stageH - this.fitH) / 2,
			width: this.fitW,
			height: this.fitH
		});
		this.width = this.bookContainer.width();
		this.height = this.bookContainer.height();
		this.prevPage.onResize();
		this.currentPage.onResize();
		this.nextPage.onResize()
	},
	getPageWidthHeight: function(b, c) {
		return getPageWidthHeight(this.stageW, this.stageH, 2 * bookConfig.largePageWidth, bookConfig.largePageHeight)
	},
	show: function() {
		this.bookContainer.show();
		this.openShownSlider();
		this.addHistoryTexts()
	},
	hide: function() {
		this.bookContainer.hide();
		this.stopAllSlider()
	},
	addHistoryTexts: function() {
		this.currentPage.addHistoryTexts()
	},
	openShownSlider: function() {
		this.currentPage.openSliderOrNot()
	},
	stopAllSlider: function() {
		this.currentPage.resetSlider()
	},
	gotoPage: function(b) {
		if (b != this.currentIndex && !this.flipping && !this.zooming) if (minIndex = userConfig.showDoublePage ? 0 : 1, b < minIndex || b > originTotalPageCount) _tipsBox.setCaption(b < minIndex ? "This is the first page": "This is the last page"),
		_tipsBox.showTipsBox();
		else {
			if (userConfig.showDoublePage && (b = 2 * parseInt(b / 2), b = Number.between(b, 1, originTotalPageCount), b == this.currentIndex)) return;
			var c = !1;
			b > this.currentIndex ? (this.nextPage.fillContent(b), this.targetPage = this.nextPage, c = !0) : (this.prevPage.fillContent(b), this.targetPage = this.prevPage);
			this.flipping = !0;
			this.currentIndex = b;
			this.flippingTime = bookConfig.flippingTime ? bookConfig.flippingTime: 0.5;
			isSupportTransition() ? (c ? (this.targetPage.moveToCurrent(), this.currentPage.moveToPrev()) : (this.targetPage.moveToCurrent(), this.currentPage.moveToNext()), animateOnce(this.targetPage.getContainer(), {},
			this.flippingTime,
			function() {
				this.endFlip(c)
			}.bind(this)), animateOnce(this.currentPage.getContainer(), {},
			this.flippingTime)) : function(b, e) {
				this.targetPage.readyToAnimate();
				this.currentPage.readyToAnimate();
				c ? (this.targetPage.animateToCurrent(b, e), this.currentPage.animateToPrev(b, e)) : (this.targetPage.animateToCurrent(b, e), this.currentPage.animateToNext(b, e));
				b >= e && (this.targetPage.endToAnimate(), this.currentPage.endToAnimate(), this.endFlip(c))
			}.runInAnimate(this, 1E3 * this.flippingTime)
		}
	},
	animateToScale: function(b) {
		this.zooming || (isTouchDevice() && (b = Math.round(1E5 * b) / 1E5), 1 != b && (this.zooming = !0, isSupportTransition() ? (this.currentPage.zoomToScale(b), animateOnce(this.currentPage.getContainer(), {},
		0.3,
		function() {
			this.currentPage.resetPageToScale(b);
			this.zooming = !1;
			this.toScale *= b
		}.bind(this))) : function(c, d) {
			$.easing.swing(null, c, 1, b - 1, d);
			this.currentPage.zoomToScale(b);
			c >= d && (this.currentPage.resetPageToScale(b), this.zooming = !1, this.toScale *= b)
		}.runInAnimate(this, 300)))
	},
	initEvent: function() {
		var b = Point(0, 0),
		c = Point(0, 0),
		d = Point(0, 0),
		e = Point(0, 0),
		f = isTouchDevice(),
		g = !1;
		this.isTwoFingerDown = this.isDown = !1;
		this.bookContainer.bind(_event._mousewheel,
		function(b) {
			if (!0 != this.flipping && !this.zooming && !this.backing) {
				b = b.originalEvent;
				var c = 1;
				if (0 < Math.max( - 1, Math.min(1, b.wheelDelta || -b.detail))) {
					if (2.25 <= this.toScale) return;
					c = 1.5
				} else {
					if (1 >= this.toScale) return;
					c = 2 / 3
				}
				this.animateToScale(c)
			}
		}.bind(this));
		this.bookContainer.bind(_event._down,
		function(h) {
			if (!0 != this.flipping && !this.zooming && !this.backing) {
				h = f ? h.originalEvent.touches: [h];
				var k = this.currentPage.getTransform();
				this.translateX = k.x;
				this.translateY = k.y;
				1 == h.length ? (g = !1, this.isDown = !0, this.isTwoFingerDown = !1, b = Point(h[0].pageX, h[0].pageY)) : 2 == h.length ? (this.isDown = g = !1, this.isTwoFingerDown = !0, b = Point(h[0].pageX, h[0].pageY), d = Point(h[1].pageX, h[1].pageY), c = Point((h[0].pageX + h[1].pageX) / 2, (h[0].pageY + h[1].pageY) / 2)) : 2 < h.length && (g = !1);
				e = new Point(this.currentPage.getOffsetLeft(), this.currentPage.getOffsetTop());
				this.isMove = !1
			}
		}.bind(this));
		this.bookContainer.bind(_event._move,
		function(h) {
			this.isMove = !0;
			if (!0 != this.flipping && !this.zooming && !this.backing) if (h = f ? h.originalEvent.touches: [h], this.bookContainer.css({
				cursor: "default"
			}), this.isDown && !g) {
				var k = h[0].pageX - b.x + this.translateX,
				l = h[0].pageY - b.y + this.translateY,
				k = Number.between(k, this.width - this.currentPage.getWidth(), 0),
				l = Number.between(l, this.height - this.currentPage.getHeight(), 0);
				this.width >= this.currentPage.getWidth() && (k = 0);
				this.height >= this.currentPage.getHeight() && (l = 0);
				this.bookContainer.css({
					cursor: "move"
				});
				1 >= Math.abs(h[0].pageX - b.x) && 1 >= Math.abs(h[0].pageY - b.y) ? this.isMove = !1 : this.translate(k, l)
			} else this.isTwoFingerDown && !g && (k = Point(h[0].pageX, h[0].pageY), l = Point(h[1].pageX, h[1].pageY), h = Math.sqrt(Math.pow(b.x - d.x, 2) + Math.pow(b.y - d.y, 2)), k = Math.sqrt(Math.pow(k.x - l.x, 2) + Math.pow(k.y - l.y, 2)), h = Math.max(k / h, this.currentPage.fitW / this.currentPage.getWidth()), l = (c.y - e.y) / 1 * (1 - h), k = this.translateX + (c.x - e.x) / 1 * (1 - h), l = this.translateY + l, k = Number.between(k, this.width - this.currentPage.getWidth() * h, 0), l = Number.between(l, this.height - this.currentPage.getHeight() * h, 0), this.width >= this.currentPage.getWidth() * h && (k = 0), this.height >= this.currentPage.getHeight() * h && (l = 0), this.currentPage.zoomObj(h, k, l, "0% 0%"), this.fingleToScale = !0)
		}.bind(this));
		this.endFun = function() {
			if (!0 != this.flipping && !this.zooming && !this.backing) {
				if (!this.isMove && this.isDown) 1 < this.toScale ? this.animateToScale(1 / this.toScale) : 1 >= this.toScale && this.animateToScale(2.25);
				else if (this.isTwoFingerDown) {
					var b = this.currentPage.getScale(),
					c = this.currentPage.getTransform();
					this.currentPage.toScale *= b;
					this.currentPage.tmpToScale(b);
					this.currentPage.zoomObj(1, c.x, c.y, "0% 0%");
					this.toScale *= b
				}
				this.isTwoFingerDown = this.isDown = !1;
				this.isMove = !0;
				this.fingleToScale = !1
			}
		}.bind(this);
		this.bookContainer.bind(_event._end + " " + _event._leave, this.endFun);
		this.bookContainer.speed(this.inertiaMove.bind(this))
	},
	inertiaMove: function(b, c) {
		if (!this.fingleToScale && !0 != this.zooming) {
			var d;
			d = 30 * windowWidth / 1600;
			if (b < -d && this.width >= this.currentPage.getWidth() && this.height >= this.currentPage.getHeight()) rightToLeft ? previousPageFun() : nextPageFun();
			else if (b > d && this.width >= this.currentPage.getWidth() && this.height >= this.currentPage.getHeight()) rightToLeft ? nextPageFun() : previousPageFun();
			else {
				var e = b,
				f = c,
				g = b / 20,
				h = c / 20,
				k = 0; ! 0 != this.backToCorner() && (window.clearInterval(this.inertiaTimer), this.inertiaTimer = window.setInterval(function() {
					if (!0 == this.zooming) window.clearInterval(this.inertiaTimer),
					this.backToCorner();
					else {
						var b = this.currentPage.getTransform(),
						c = this.currentPage.getScale();
						e -= g;
						f -= h;
						b.x += e;
						b.y += f;
						b.x = Number.between(b.x, this.width - this.currentPage.getWidth(), 0);
						b.y = Number.between(b.y, this.height - this.currentPage.getHeight(), 0);
						this.width >= this.currentPage.getWidth() && (b.x = 0);
						this.height >= this.currentPage.getHeight() && (b.y = 0);
						this.currentPage.zoomObj(c, b.x, b.y, "0% 0%");
						20 == ++k && (window.clearInterval(this.inertiaTimer), this.backToCorner())
					}
				}.bind(this), 20))
			}
		}
	},
	backToCorner: function() {},
	endFlip: function(b) {
		this.currentPage.leaveSide();
		this.resetPage(b);
		setCurrentIndexTextField(this.currentIndex, bookType == BookType.slide_book || bookType == BookType.catalog_book);
		window.location.hash = "#p=" + this.currentIndex;
		thumbnail.setHighLight(this.currentIndex);
		this.currentPage.enterSide();
		this.flipping = !1;
		this.toScale = 1
	},
	translate: function(b, c) {
		this.currentPage.translate(b, c)
	},
	resetPage: function(b) { ! 0 == b ? (this.nextPage = this.prevPage, this.prevPage = this.currentPage, this.currentPage = this.targetPage, this.nextPage.moveToNext()) : (this.prevPage = this.nextPage, this.nextPage = this.currentPage, this.currentPage = this.targetPage, this.prevPage.moveToPrev());
		this.prevPage.resetSide();
		this.nextPage.resetSide();
		this.currentPage.resetSide();
		this.fillContent();
		this.prevPage.resetSlider();
		this.nextPage.resetSlider();
		this.currentPage.playSlider()
	},
	fillContent: function() {
		this.nextPage.fillContent(this.currentIndex + 2);
		this.prevPage.fillContent(this.currentIndex - 2);
		this.currentPage.fillContent(this.currentIndex)
	},
	setPosition: function() {},
	getWidth: function() {
		return this.fitW
	},
	getHeight: function() {
		return this.fitH
	},
	getLeft: function() {
		return parseInt(this.bookContainer.css("left"))
	},
	getTop: function() {
		return parseInt(this.bookContainer.css("top"))
	},
	getScale: function() {
		return this.toScale
	},
	getCurrentPageIndex: function() {
		return this.currentIndex
	}
});
bdor[15] = ".";
global.hddr.soo3 = bdor[51];
var SingleSlideSide = Class({
	initContent: function() {
		this.page = $("<div style='position:absolute;width:100%;height:100%;left:0px;'></div>");
		this.bookContainer.append(this.page);
		this.side = new SlideSide(this.page)
	},
	fillContent: function(b) {
		this.side.fillContent(b);
		this.page.css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"-moz-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"-o-box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)",
			"box-shadow": "0 0 5px rgba(40, 0, 0, 0.8)"
		});
		this.singlePage = !0
	},
	resetSide: function() {
		this.side.onResize()
	},
	addHistoryTexts: function() {
		this.side.addHistoryTexts()
	},
	openSliderOrNot: function() {
		this.side.openSliderOrNot()
	},
	resetSlider: function() {
		this.side.resetSlider()
	},
	leaveSide: function() {
		this.side.leaveSide()
	},
	enterSide: function() {
		this.side.enterSide()
	},
	playSlider: function() {
		this.side.playSlider()
	}
}).extend(SlidePage),
SingleSlideBook = Class({
	initPage: function(b) {
		this.prevPage = new SingleSlideSide(b, -1);
		this.nextPage = new SingleSlideSide(b, 1);
		this.currentPage = new SingleSlideSide(b, 0);
		this.currentPage.setCss({
			opacity: 1
		})
	},
	fillContent: function() {
		this.nextPage.fillContent(this.currentIndex + 1);
		this.prevPage.fillContent(this.currentIndex - 1);
		this.currentPage.fillContent(this.currentIndex)
	},
	getPageWidthHeight: function(b, c) {
		return getPageWidthHeight(this.stageW, this.stageH, bookConfig.largePageWidth, bookConfig.largePageHeight)
	}
}).extend(SlideBook),
DockMenu = Class({
	create: function(b, c, d) {
		this.menu = $("<div id='dockMenu' class='dockMenu'></div>");
		this.menuContent = $("<div id='dockMenuContent' class='dockMenuContent'></div>");
		this.itemArray = [];
		this.fromIndex = c;
		this.toIndex = d;
		this.width = 0;
		this.height = 130;
		b.append(this.menu);
		this.menu.append(this.menuContent);
		this.initStyle();
		this.addItem();
		this.initEvent();
		this.hide()
	},
	initStyle: function() {
		this.menu.css({
			width: "100%",
			height: this.height + "px"
		});
		this.menuContent.css({
			height: "100%"
		})
	},
	addItem: function() {
		for (var b = (this.toIndex - this.fromIndex + 1) / 2, c = 0; c < b; c++) {
			var d;
			d = this.fromIndex + 2 * c;
			var e = this.fromIndex + 2 * c + 1,
			f = [{
				url: getPageDir(d, "thumb", originTotalPageCount),
				index: d
			},
			{
				url: getPageDir(e, "thumb", originTotalPageCount),
				index: e
			}];
			0 >= d && (f = [{
				url: getPageDir(e, "thumb", originTotalPageCount),
				index: e
			}]);
			e > bookConfig.totalPageCount && (f = [{
				url: getPageDir(d, "thumb", originTotalPageCount),
				index: d
			}]);
			d = new DockMenuItem(this.menuContent, f);
			e = Math.min(e, bookConfig.totalPageCount);
			e = Math.max(1, e);
			d.pageIndex = e;
			this.itemArray.push(d)
		}
		this.resize()
	},
	addObj: function(b, c) {
		"before" == c ? b.prependTo(this.menuContent) : b.appendTo(this.menuContent)
	},
	resize: function() {
		windowWidth < $(this.menuContent).width() ? $(this.menuContent).css({
			"margin-left": (windowWidth - $(this.menuContent).width()) / 2 - 25 + "px"
		}) : $(this.menuContent).css({
			"margin-left": "0px"
		})
	},
	setPosition: function(b, c, d) {
		if (void 0 == d || null == d) d = ["left", "top"];
		this.menu.css(d[0], b);
		this.menu.css(d[1], c)
	},
	initEvent: function() {
		function b() {
			g || (g = !0, window.setTimeout(c, 15))
		}
		function c() {
			for (var c = 0; c < k.itemArray.length; c++) k.itemArray[c] && k.itemArray[c].sizeDockIcons(d, e);
			g = !1;
			h && (h = !1, b())
		}
		var d, e, f = this.menu,
		g = !1,
		h = !1,
		k = this;
		$(f).bind(_event._move,
		function(c) {
			f.is(":visible") && (d = c.pageX, e = c.pageY, h = !0, b())
		});
		$(f).bind(_event._leave,
		function(c) {
			f.is(":visible") && (e = d = 1E3, h = !0, b())
		})
	},
	show: function() {
		this.menu.show();
		this.resize();
		for (var b = 0; b < this.itemArray.length; b++) this.itemArray[b].fillContent()
	},
	hide: function() {
		this.menu.hide()
	},
	clearHighLight: function() {
		this.currentItem && this.currentItem.clearHighLight()
	},
	setHighLight: function(b) {
		b = parseInt(b % 20 / 2);
		this.itemArray[b].setHighLight();
		for (var c = 0; c < this.itemArray.length; c++) this.itemArray[c].fillContent();
		this.currentItem = this.itemArray[b]
	}
}),
DockMenuItem = Class({
	create: function(b, c) {
		this.item = $("<div id='item' class='dockMenuItem'></div>");
		this.imgArr = c;
		this.doubleImage = 2 > c.length ? !1 : !0;
		this.itemHeight = 60;
		this.itemWidth = 0;
		this.toScale = 1.5;
		this.padding = 10;
		b.append(this.item);
		this.initItem()
	},
	initItem: function() {
		this.itemContent = $("<div class='dockMenuItemContent dockMenuItemShadow'></div>");
		this.itemCaption = $("<span class='dockMenuItemCaption'/>");
		this.itemCaptionAfter = $("<div class='dockMenuItemCaptionAfter'/>");
		this.item.append(this.itemContent);
		this.item.append(this.itemCaption);
		this.itemCaption.after(this.itemCaptionAfter);
		$(this.itemCaptionAfter).css({
			"background-image": "url(" + uiBaseURL + "span.png)"
		});
		this.addContent();
		this.resize(this.itemHeight);
		this.addEvent()
	},
	resize: function(b) {
		var c = b * bookConfig.largePageWidth * 2 / bookConfig.largePageHeight; ! 1 === this.doubleImage && (c /= 2);
		this.item.css({
			width: c + "px",
			height: "130px"
		});
		this.item.css({
			"padding-left": this.padding + "px"
		});
		this.itemContent.css({
			width: c + "px",
			height: b + "px"
		});
		this.resizeContent(c, b)
	},
	addContent: function() { ! 1 === this.doubleImage ? (this.itemIcon = $("<img/>"), this.itemContent.append(this.itemIcon)) : !0 === this.doubleImage && (this.itemLeftIcon = $("<img/>"), this.itemRightIcon = $("<img/>"), this.itemContent.append(this.itemLeftIcon), this.itemContent.append(this.itemRightIcon))
	},
	fillContent: function() { ! 1 === this.doubleImage ? (this.itemIcon.attr("src", this.imgArr[0].url), this.itemCaption.text(this.imgArr[0].index)) : !0 === this.doubleImage && (this.itemLeftIcon.attr("src", this.imgArr[0].url), this.itemRightIcon.attr("src", this.imgArr[1].url), this.itemCaption.text(this.imgArr[0].index + "-" + this.imgArr[1].index))
	},
	resizeContent: function(b, c) { ! 1 === this.doubleImage ? this.itemIcon.css({
			width: b + "px",
			height: c + "px"
		}) : !0 === this.doubleImage && (this.itemLeftIcon.css({
			width: b / 2 + "px",
			height: c + "px"
		}), this.itemRightIcon.css({
			width: b / 2 + "px",
			height: c + "px"
		}), this.itemLeftIcon.css({
			position: "absolute",
			left: "0px"
		}), this.itemRightIcon.css({
			position: "absolute",
			left: b / 2 + "px"
		}))
	},
	sizeDockIcons: function(b, c) {
		var d = this.itemHeight,
		e = this.itemHeight * this.toScale - d,
		f = $(this.item).offset().left + $(this.item).outerWidth() / 2,
		g = $(this.item).offset().top + $(this.item).outerHeight() / 2,
		f = this.distance(f, g, b, c),
		d = (1 - Math.min(1, Math.max(0, f / 180))) * e + d;
		this.resize(d)
	},
	distance: function(b, c, d, e) {
		b = d - b;
		c = e - c;
		return Math.sqrt(b * b + c * c)
	},
	addEvent: function() {
		this.item.bind(_event._end,
		function() {
			gotoPageFun(this.pageIndex)
		}.bind(this));
		this.item.bind(_event._over,
		function() {
			this.itemCaption.css("display", "inline-block");
			this.itemCaptionAfter.css("display", "block")
		}.bind(this));
		this.item.bind(_event._leave,
		function() {
			this.itemCaption.hide();
			this.itemCaptionAfter.hide()
		}.bind(this))
	},
	clearHighLight: function() {
		this.itemContent.css("border", "");
		this.itemContent.css("border-radius", "0px")
	},
	setHighLight: function() {
		this.itemContent.css("border", "3px solid #6bc30d");
		this.itemContent.css("border-radius", "3px")
	}
}),
PhoneBook = Class({
	create: function(b) {
		this.bookContainer = $("<div style='left:0px;right:0px;top:0px;bottom:0px;position:absolute;display:none;'></div>");
		this.book = $("<div></div>");
		this.bookPage = $("<div></div>");
		this.prePage = new phonePage(this.bookPage);
		this.nextPage = new phonePage(this.bookPage);
		this.showPage = new phonePage(this.bookPage);
		this.prePage.setChildIndex(1);
		this.showPage.setChildIndex(3);
		this.nextPage.setChildIndex(2);
		this.preButton = $("<div></div>");
		this.nextButton = $("<div></div>");
		this.firstButton = $("<div></div>");
		this.lastButton = $("<div></div>");
		this.width = windowWidth;
		this.height = windowHeight;
		this.diffPageCount = 0;
		this.currentIndex = 1;
		this.showingPage = this.flipPage = null;
		this.isFlipping = !1;
		this.minZoomWidth = windowWidth;
		this.largeScale = Math.max(1, 2.5 * zoomPageWidth / windowWidth);
		this.largeZoomWidth = windowWidth * this.largeScale;
		b.append(this.bookContainer);
		this.bookContainer.append(this.book);
		this.preImg = $('<img src="' + uiBaseURL + 'slide_leftButton.png"></img>');
		this.nextImg = $('<img src="' + uiBaseURL + 'slide_rightButton.png"></img>');
		this.firstImg = $('<img src="' + uiBaseURL + 'slide_firstButton.png"></img>');
		this.lastImg = $('<img src="' + uiBaseURL + 'slide_lastButton.png"></img>');
		this.preButton.append(this.preImg);
		this.nextButton.append(this.nextImg);
		this.firstButton.append(this.firstImg);
		this.lastButton.append(this.lastImg);
		this.preButton.css({
			display: "none"
		});
		this.nextButton.css({
			display: "none"
		});
		this.firstButton.css({
			display: "none"
		});
		this.lastButton.css({
			display: "none"
		});
		this.book.append(this.bookPage);
		this.book.css({
			width: this.width + "px",
			height: this.height + "px",
			position: "absolute",
			overflow: "hidden",
			"z-index": "9"
		});
		this.preButton.css({
			width: "30px",
			height: "59px",
			left: "0px",
			top: (windowHeight - 90) / 2 + "px",
			background: "#888888",
			"z-index": "10",
			"border-bottom": "1px solid #000000",
			"border-radius": "5px 5px 0px 0px",
			position: "absolute",
			opacity: "0.5"
		});
		this.nextButton.css({
			width: "30px",
			height: "59px",
			left: windowWidth - 30 + "px",
			top: (windowHeight - 90) / 2 + "px",
			background: "#888888",
			"z-index": "10",
			"border-bottom": "1px solid #000000",
			"border-radius": "5px 5px 0px 0px",
			position: "absolute",
			opacity: "0.5"
		});
		this.firstButton.css({
			width: "30px",
			height: "30px",
			left: "0px",
			top: (windowHeight - 90) / 2 + 60 + "px",
			background: "#888888",
			"z-index": "10",
			"border-top": "1px solid #ffffff",
			"border-radius": "0px 0px 5px 5px",
			position: "absolute",
			opacity: "0.5"
		});
		this.lastButton.css({
			width: "30px",
			height: "30px",
			left: windowWidth - 30 + "px",
			top: (windowHeight - 90) / 2 + 60 + "px",
			background: "#888888",
			"border-top": "1px solid #ffffff",
			"z-index": "10",
			"border-radius": "0px 0px 5px 5px",
			position: "absolute",
			opacity: "0.5"
		});
		this.firstImg.css({
			left: "7px",
			top: "7px",
			position: "absolute"
		});
		this.lastImg.css({
			left: "7px",
			top: "7px",
			position: "absolute"
		});
		this.preImg.css({
			left: "7px",
			top: "22px",
			position: "absolute"
		});
		this.nextImg.css({
			left: "7px",
			top: "22px",
			position: "absolute"
		});
		this.fillNear(1);
		this.pageIndexLabel = new label("1/" + totalPageCount, this.bookContainer);
		this.pageIndexLabel.setLabelPosition(10, 10, ["left", "bottom"]);
		this.pageIndexLabel.setCSS({
			"padding-left": "5px",
			"padding-right": "5px",
			height: "25px",
			"line-height": "25px",
			vertical: "middle",
			"text-align": "center",
			"border-radius": "3px",
			"z-index": "10",
			background: "#333333"
		});
		this.pageIndexLabel.setFont(10, "#edaa1d");
		this.toScale = 1;
		this.initEvent()
	},
	getCurrentPageIndex: function() {
		return this.currentIndex
	},
	setShow: function(b) {
		this.pageIndexLabel.setCSS({
			display: b ? "block": "none"
		});
		this.preButton.css({
			display: b ? "none": "block"
		});
		this.nextButton.css({
			display: b ? "none": "block"
		});
		this.firstButton.css({
			display: b ? "none": "block"
		});
		this.lastButton.css({
			display: b ? "none": "block"
		})
	},
	onResize: function(b, c) {
		this.toScale = 1;
		this.stageWidth = windowWidth;
		this.stageHeight = windowHeight;
		var d = getPageWidthHeightByWidth(this.stageWidth / 2, this.stageHeight, zoomPageWidth, zoomPageHeight);
		this.width = 2 * d.x;
		this.height = d.y;
		this.minZoomWidth = 2 * d.x;
		this.minZoomHeight = d.y;
		this.largeZoomWidth = this.width * this.largeScale;
		this.largeZoomHeight = this.height * this.largeScale;
		this.containtWidth = Math.min(this.width * this.toScale, this.stageWidth);
		this.containtHeight = Math.min(this.height * this.toScale, this.stageHeight);
		this.book.css({
			width: this.containtWidth + "px",
			height: this.containtHeight + "px",
			left: (this.stageWidth - this.containtWidth) / 2 + "px",
			top: (this.stageHeight - this.containtHeight) / 2 + "px"
		});
		this.preButton.css({
			left: "0px",
			top: (windowHeight - 90) / 2 + "px"
		});
		this.nextButton.css({
			left: windowWidth - 30 + "px",
			top: (windowHeight - 90) / 2 + "px"
		});
		this.firstButton.css({
			left: "0px",
			top: (windowHeight - 90) / 2 + 60 + "px"
		});
		this.lastButton.css({
			left: windowWidth - 30 + "px",
			top: (windowHeight - 90) / 2 + 60 + "px"
		});
		this.prePage.onWinResize(this.containtWidth, this.containtHeight, !0);
		this.showPage.onWinResize(this.containtWidth, this.containtHeight, !0);
		this.nextPage.onWinResize(this.containtWidth, this.containtHeight, !0);
		this.prePage.translate( - this.prePage.getWidth(), 0);
		this.nextPage.translate(this.containtWidth, 0);
		this.pageIndexLabel.setLabelPosition(10, 10, ["left", "bottom"])
	},
	setTranslate: function(b, c, d) {
		c = translate(c, d);
		b.css({
			"-webkit-transform": c,
			"-moz-transform": c,
			"-o-transform": c,
			"-ms-transform": c,
			transform: c
		})
	},
	gotoPage: function(b) {
		var c = this;
		this.prePage.clearHighlight();
		this.nextPage.clearHighlight();
		0 == b && (b = 1);
		if (this.currentIndex == b || 1 > b || b > originTotalPageCount || this.isFlipping) {
			var d = 1 > b ? "This is the first page": "This is the last page";
			if (1 > b || b > originTotalPageCount) c.translateToOrigin(0),
			_tipsBox.setCaption(d),
			_tipsBox.showTipsBox()
		} else {
			this.isFlipping = !0;
			this.diffPageCount = b - this.currentIndex;
			var e = 0,
			f = this.showPage,
			g = void 0,
			c = this,
			d = Point(0, f.getWidth());
			centerP = Point(0, 0);
			this.currentIndex > b ? (g = this.prePage, e = d.y) : (g = this.nextPage, e = -d.y);
			tragetToLeft = centerP.x;
			g.fillTemp(b);
			window.setTimeout(function() {
				var d = getTransform(f.side[0]),
				k = getTransform(g.side[0]);
				g.forceReset();
				var l = 30,
				m = 1E3 * bookConfig.flippingTime;
				void 0 != m && 0 < m && (l = 4);
				var p = 0,
				n = window.setInterval(function() {
					var m = Point(0, 0),
					s = Point(0, 0);
					m.x = $.easing.swing(null, p, d.x, e - d.x, l);
					s.x = $.easing.swing(null, p, k.x, tragetToLeft - k.x, l);
					p++;
					f.translate(m.x, m.y);
					g.translate(s.x, s.y);
					p > l && (window.clearInterval(n), window.setTimeout(function() {
						c.showPage.noZoom();
						auto_player.resetTimer();
						c.changePage();
						c.endFlip(b);
						c.onResize();
						c.isFlipping = !1
					},
					20))
				},
				20)
			},
			100)
		}
	},
	changePage: function() {
		var b = null;
		0 < this.diffPageCount ? (b = this.showPage, this.showPage = this.nextPage, this.nextPage = this.prePage) : (b = this.nextPage, this.nextPage = this.showPage, this.showPage = this.prePage);
		this.prePage = b
	},
	addSearchHighlight: function() {
		this.showPage.highlightSearch(this.currentIndex)
	},
	clearSearchHighlight: function() {
		this.showPage.clearHighlight()
	},
	endFlip: function(b) {
		b = 2 * parseInt(b / 2);
		0 == b && (b = 1);
		this.currentIndex = b;
		this.fillNear(b);
		setCurrentIndexTextField(this.currentIndex, !1);
		window.location.hash = "#p=" + this.currentIndex;
		sendvisitinfo(1, this.currentIndex);
		thumbButtonEnable && thumbnail.clearHighLight();
		thumbButtonEnable && thumbnail.setHighLight(this.currentIndex);
		this.prePage.translate( - this.prePage.getWidth(), 0);
		this.nextPage.translate(this.containtWidth, 0);
		this.pageIndexLabel.setCaption((1 == b || b == originTotalPageCount ? this.currentIndex: this.currentIndex + "-" + (this.currentIndex + 1)) + "/" + totalPageCount);
		this.addSearchHighlight()
	},
	setVisible: function(b) {
		this.bookContainer.css({
			display: b ? "block": "none"
		})
	},
	setPosition: function(b, c) {
		this.book.css({
			left: b + "px",
			top: c + "px"
		})
	},
	fillNear: function(b) {
		b = 2 * parseInt(b / 2);
		0 <= b && this.prePage.fillContent(b - 2);
		this.showPage.changeContent(b);
		b <= originTotalPageCount && this.nextPage.fillContent(b + 2);
		this.prePage.resetSlider();
		this.showPage.playSlider();
		this.nextPage.resetSlider()
	},
	initEvent: function() {
		var b = this;
		Point(0, 0);
		this.preButton.bind(_event._end,
		function(c) {
			b.gotoPage(b.currentIndex - 2)
		});
		this.nextButton.bind(_event._end,
		function(c) {
			b.gotoPage(b.currentIndex + 2)
		});
		this.preButton.bind(_event._enter,
		function() {
			b.preButton.css({
				background: "#000000"
			})
		});
		this.nextButton.bind(_event._enter,
		function() {
			b.nextButton.css({
				background: "#000000"
			})
		});
		this.preButton.bind(_event._leave,
		function() {
			b.preButton.css({
				background: "#888888"
			})
		});
		this.nextButton.bind(_event._leave,
		function() {
			b.nextButton.css({
				background: "#888888"
			})
		});
		this.preButton.bind(_event._end,
		function() {
			b.preButton.css({
				background: "#888888"
			})
		});
		this.nextButton.bind(_event._end,
		function() {
			b.nextButton.css({
				background: "#888888"
			})
		});
		this.firstButton.bind(_event._enter,
		function() {
			b.firstButton.css({
				background: "#000000"
			})
		});
		this.lastButton.bind(_event._enter,
		function() {
			b.lastButton.css({
				background: "#000000"
			})
		});
		this.firstButton.bind(_event._leave,
		function() {
			b.firstButton.css({
				background: "#888888"
			})
		});
		this.lastButton.bind(_event._leave,
		function() {
			b.lastButton.css({
				background: "#888888"
			})
		});
		this.firstButton.bind(_event._end,
		function() {
			b.firstButton.css({
				background: "#888888"
			})
		});
		this.lastButton.bind(_event._end,
		function() {
			b.lastButton.css({
				background: "#888888"
			})
		});
		this.firstButton.bind(_event._down,
		function() {
			b.gotoPage(1)
		});
		this.lastButton.bind(_event._down,
		function() {
			b.gotoPage(originTotalPageCount)
		})
	},
	translateToOrigin: function(b) {
		this.showPage.animateZoom(this.toScale, 0, b, 300);
		this.nextPage.animateZoom(this.toScale, this.containtWidth, 0, 300);
		this.prePage.animateZoom(this.toScale, -this.containtWidth, 0, 300)
	},
	initTranslate: function() {
		var b = getTransform(this.showPage.side[0]),
		c = getTransform(this.prePage.side[0]),
		d = getTransform(this.nextPage.side[0]);
		this.tran = Point(b.x, b.y);
		this.pretran = Point(c.x, c.y);
		this.nexttran = Point(d.x, d.y)
	},
	translateMove: function(b, c) {
		this.showPage.setTranslate(this.showPage.side, b + this.tran.x, c);
		this.prePage.setTranslate(this.prePage.side, b + this.pretran.x, 0);
		this.nextPage.setTranslate(this.nextPage.side, b + this.nexttran.x, 0)
	},
	zoom: function(b) {
		this.showPage.zoom(b, 0)
	},
	zoom: function(b) {
		this.showPage.zoom(b, 0)
	},
	zoomToScale: function(b) {
		this.showPage.zoomToScale(b, 0)
	},
	noZoom: function() {
		this.showPage.noZoom()
	},
	getLeft: function() {
		return this.book.offset().left
	},
	getTop: function() {
		return this.book.offset().top
	},
	getWidth: function() {
		return this.containtWidth
	},
	getHeight: function() {
		return this.containtHeight
	},
	getScale: function() {
		return 1
	},
	show: function() {
		Log.debug("phone book show.");
		this.setVisible(!0);
		this.prePage.showPage();
		this.nextPage.showPage();
		this.showPage.showPage();
		var b = this;
		window.setTimeout(function() {
			b.showPage.showPage();
			b.addSearchHighlight(this.currentIndex);
			b.showPage.playSlider()
		},
		500)
	},
	hide: function() {
		Log.debug("phone book hide.");
		this.setVisible(!1);
		this.showPage.resetSlider()
	}
}),
phoneSide = Class({
	create: function(b) {
		this.side = $("<div></div>");
		this.tmpContent = $("<div id='sideContent' class='sideContent' style= 'position: absolute;'></div>");
		this.sideContent = $("<div class='sideContent' style= 'overflow: hidden'></div>");
		this.sideImg = $("<img style='position: absolute;' />");
		this.MMBackground = $("<div style='position:absolute;z-index:3;'></div>");
		this.loadingImg = $("<img src='" + uiBaseURL + "progress.gif' style='position: absolute;'>");
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		this.fitH = this.fitW = 0;
		this.tmpImg = $("<img style='position: absolute;z-index:-1;' />");
		this.searchHighlight = $("<div class='kong' id='highlight'></div>");
		b.append(this.side);
		this.side.append(this.sideContent);
		this.imageIndex = -1;
		this.toScale = 1;
		this.origin = "0% 0%";
		this.translateY = this.translateX = this.y = this.x = 0;
		this.toolbarShow = this.isZomming = !1;
		this.sideTop = 0;
		this.side.css({
			width: this.width + "px",
			height: this.height + "px",
			top: this.sideTop + "px",
			position: "absolute",
			"border-width": "0px"
		});
		this.sideContent.css({
			width: this.width + "px",
			height: this.height + "px",
			background: "transparent"
		});
		this.searchHighlight.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.MMBackground.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.loadingImg.css({
			left: this.width / 2 - 10 + "px",
			top: this.height / 2 - 10 + "px"
		});
		this.initMMItems();
		this.slider = null;
		this.playSliderAfterLoad = !1;
		this.onWinResize(windowWidth - leftMargin - rightMargin, windowHeight - topMargin - bottomMargin - 40, !0);
		this.father = b
	},
	setCSS: function(b) {
		this.side.css(b)
	},
	onResize2: function(b, c) {
		this.toScale = b / this.width;
		var d = getTransform(this.side[0]);
		this.zoomObj(this.side, this.origin, " scale(" + this.toScale + ")", d.x, d.y)
	},
	onResize: function(b, c, d) {
		this.toScale = 1;
		b = getPageWidthHeightByWidth(b, c, zoomPageWidth, zoomPageHeight);
		this.width = b.x * this.toScale;
		this.height = b.y * this.toScale;
		this.side.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideContent.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.searchHighlight.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.MMBackground.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.onMMResize(this.width, this.height);
		d && this.tmpImg.css({
			width: this.width + "px",
			height: this.height + "px",
			top: this.sideTop + "px"
		});
		this.loadingImg.css({
			left: this.width / 2 - 10 + "px",
			top: this.height / 2 - 10 + "px"
		})
	},
	getSide: function() {
		return this.side
	},
	fillContent: function(b) {
		this.imageIndex = b;
		var c = this;
		this.sideContent.empty();
		b > originTotalPageCount + 3 || -2 > b || (this.sideImg.attr("src", getPageDir(b, "thumb", originTotalPageCount)), this.sideImg.load(function() {
			c.tmpImg.attr("src", getPageDir(b, "thumb", originTotalPageCount));
			c.sideContent.append(c.sideImg);
			c.sideContent.append(c.tmpImg)
		}))
	},
	fillTemp: function(b) {
		if (b != this.imageIndex) {
			this.imageIndex = b;
			var c = this;
			this.sideContent.empty();
			b > originTotalPageCount + 3 || -2 > b || (this.sideImg.attr("src", getPageDir(b, "thumb", originTotalPageCount)), this.sideImg.load(function() {
				c.tmpImg.attr("src", getPageDir(b, "thumb", originTotalPageCount));
				c.sideContent.append(c.sideImg);
				c.sideContent.append(c.tmpImg)
			}))
		}
	},
	changeContent: function(b) {
		this.imageIndex = b;
		var c = this;
		b > originTotalPageCount + 3 || -2 > b || (null != this.slider && (this.slider.destroy(), this.slider = null), this.sideImg.attr("src", getPageDir(b, "normal", originTotalPageCount)), this.sideImg.load(function() {
			c.hideLoading();
			c.tmpImg.attr("src", getPageDir(b, "normal", originTotalPageCount));
			c.sideContent.append(c.sideImg);
			c.sideContent.append(c.tmpImg);
			c.sideContent.append(c.MMBackground);
			c.sideContent.append(c.searchHighlight);
			c.searchHighlight.css({
				opacity: 0.8
			});
			c.clearMM();
			c.initMM();
			c.initSlider()
		}))
	},
	setPosition: function(b, c) {
		this.side.css({
			left: b + "px",
			top: c + "px"
		})
	},
	setChildIndex: function(b) {
		this.side.css({
			"z-index": b
		})
	},
	setVisible: function(b) {
		this.side.css({
			display: b ? "block": "none"
		})
	},
	resetSize: function() {
		this.tmpImg.css({
			display: "none"
		});
		var b = this.width * this.toScale >= zoomPageWidth,
		c = b ? zoomPageWidth: this.width * this.toScale,
		d = b ? zoomPageHeight: this.height * this.toScale,
		e = getTransform(this.side[0]),
		f = this.width == zoomPageWidth && c < zoomPageWidth || this.width != zoomPageWidth;
		this.toScale = b ? this.width * this.toScale / zoomPageWidth: 1;
		var b = phoneBook.minZoomWidth,
		g = phoneBook.minZoomHeight;
		if (void 0 != b && void 0 != g && 0 < b && 0 < g) {
			c / d > b / g ? g = b * d / c: b = g * c / d;
			var h = Math.min(0, c - b),
			k = Math.min(0, d - g),
			c = Math.max(c, b),
			d = Math.max(d, g);
			e.x += h / 2;
			e.y += k / 2
		}
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", e.x, e.y);
		this.width = c;
		this.height = d;
		this.translateX = e.x;
		this.translateY = e.y;
		f && this.tmpImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", e.x, e.y);
		this.tmpImg.css({
			display: "block"
		});
		if (f) this.onResize(c, d)
	},
	zoom: function(b, c) {
		if (!0 == this.isZomming) return ! 1;
		var d = phoneBook.minZoomWidth,
		e = phoneBook.largeZoomWidth,
		f = this.side.width() * this.toScale;
		this.side.height();
		var g = this.toScale + b,
		h = this.side.width() * g;
		if (1 > g) {
			if (f <= d) return;
			h < d && (g = d / this.side.width())
		}
		1 < g && h > e && (g = e / this.side.width());
		h = this.side.width() * g;
		this.side.height();
		d = (f - h) / 2 + this.translateX;
		0 == c && (d = 0);
		1 == c && (d = h); - 1 == c && (d = -h);
		this.animateZoom(g, d, 0, 300)
	},
	zoomToScale: function(b, c) {
		if (!0 == this.isZomming) return ! 1;
		var d = phoneBook.minZoomWidth,
		e = phoneBook.largeZoomWidth,
		f = this.side.width() * this.toScale;
		this.side.height();
		var g = this.toScale + b,
		h = this.side.width() * g;
		if (1 > g) {
			if (f <= d) return;
			h < d && (g = d / this.side.width())
		}
		1 < g && h > e && (g = e / this.side.width());
		h = this.side.width() * g;
		this.side.height();
		d = (f - h) / 2 + this.translateX;
		0 == c && (d = 0);
		1 == c && (d = h); - 1 == c && (d = -h); ! 0 != this.isZomming && (this.isZomming = !0, g || (g = this.toScale), d || (d = 0), getTransform(this.side[0]), this.tmpImg.css({
			display: "none"
		}), this.zoomObj(this.side, this.origin, " scale(" + g + ")", d, 0), this.zoomObj(this.tmpImg, this.origin, " scale(" + g + ")", d, 0), this.tmpImg.css({
			display: "block"
		}), this.toScale = g, phoneBook.toScale = g, phoneBook.containtWidth = Math.min(phoneBook.width * g, phoneBook.stageWidth), phoneBook.containtHeight = Math.min(phoneBook.height * g, phoneBook.stageHeight), phoneBook.book.css({
			width: phoneBook.containtWidth + "px",
			height: phoneBook.containtHeight + "px",
			left: (phoneBook.stageWidth - phoneBook.containtWidth) / 2 + "px",
			top: (phoneBook.stageHeight - phoneBook.containtHeight) / 2 + "px"
		}), this.isZomming = !1)
	},
	noZoom: function() {
		this.toScale = this.fitW / this.width;
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", 0, 0);
		this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", 0, 0)
	},
	forceReset: function(b) {
		this.width = this.fitW;
		this.height = this.fitH;
		this.toScale = 1;
		void 0 == b && (b = getTransform(this.side[0]));
		this.forceResize(b)
	},
	forceMax: function() {
		var b = (this.width * this.toScale - zoomPageWidth) / 2;
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		var c = getTransform(this.side[0]);
		c.x += b;
		this.forceResize(c)
	},
	animateMax: function() {
		this.animateZoom(zoomPageWidth / this.width, (this.width - zoomPageWidth) / 2, 0, 300)
	},
	animateFit: function() {
		this.animateZoom(this.fitW / this.width, 0, 0, 300)
	},
	forceResize: function(b) {
		this.side.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideContent.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.searchHighlight.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.MMBackground.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.onMMResize(this.width, this.height);
		this.tmpImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.loadingImg.css({
			left: this.width / 2 - 10 + "px",
			top: this.height / 2 - 10 + "px"
		});
		this.toScale = 1;
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", b.x, b.y);
		this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", b.x, b.y);
		this.translateX = b.x;
		this.translateY = b.y
	},
	getScaleFromFit: function() {
		return this.width * this.toScale / this.fitW
	},
	getCenterTransform: function() {
		return Point((this.fitW - this.width * this.toScale) / 2, 0)
	},
	zoomToMax: function() {
		var b = zoomPageWidth / this.width;
		this.animateZoom(b, (this.width * this.toScale - this.width * b) / 2 + this.translateX, 0, 200)
	},
	zoomToFit: function() {
		var b = this.getScaleFromFit();
		this.animateZoom(b, 0, 0, 200)
	},
	zoomObj: function(b, c, d, e, f) {
		e || (e = 0);
		f || (f = 0);
		e = translate(e, f);
		b.css({
			"-webkit-transform-origin": c,
			"-moz-transform-origin": c,
			"-ms-transform-origin": c,
			"-o-transform-origin": c,
			"transform-origin": c,
			"-webkit-transform": e + d,
			"-moz-transform": e + d,
			"-ms-transform": e + d,
			"-o-transform": e + d,
			transform: e + d
		})
	},
	setTranslate: function(b, c, d) {
		c = translate(c, d);
		b.css({
			"-webkit-transform": c,
			"-moz-transform": c,
			"-o-transform": c,
			"-ms-transform": c,
			transform: c
		})
	},
	setXY: function(b, c) {
		this.x = b;
		this.y = c
	},
	animateTranslate: function(b, c, d) {
		b || (b = 0);
		c || (c = 0);
		d || (d = 25);
		var e = getTransform(this.side[0]),
		f = this;
		$(e).animate({
			x: b,
			y: c
		},
		{
			duration: d,
			easing: "easeOutSine",
			complete: function() {
				f.zoomObj(f.side, f.origin, " scale(" + f.toScale + ")", e.x, e.y);
				f.zoomObj(f.tmpImg, f.origin, " scale(" + f.toScale + ")", e.x, e.y)
			}
		})
	},
	animateZoom: function(b, c, d, e) {
		if (!0 != this.isZomming) {
			this.isZomming = !0;
			b || (b = this.toScale);
			c || (c = 0);
			d || (d = 0);
			e || (e = 25);
			var f = getTransform(this.side[0]),
			g = {
				scale: this.toScale,
				x: f.x,
				y: f.y
			},
			h = this;
			$(g).animate({
				scale: b,
				x: c,
				y: d
			},
			{
				duration: e,
				easing: "easeOutSine",
				step: function() {
					h.tmpImg.css({
						display: "none"
					});
					h.zoomObj(h.side, h.origin, " scale(" + g.scale + ")", c, d);
					h.zoomObj(h.tmpImg, h.origin, " scale(" + g.scale + ")", c, d);
					h.tmpImg.css({
						display: "block"
					})
				},
				complete: function() {
					h.toScale = b;
					phoneBook.toScale = b;
					phoneBook.containtWidth = Math.min(phoneBook.width * b, phoneBook.stageWidth);
					phoneBook.containtHeight = Math.min(phoneBook.height * b, phoneBook.stageHeight);
					phoneBook.book.css({
						width: phoneBook.containtWidth + "px",
						height: phoneBook.containtHeight + "px",
						left: (phoneBook.stageWidth - phoneBook.containtWidth) / 2 + "px",
						top: (phoneBook.stageHeight - phoneBook.containtHeight) / 2 + "px"
					});
					h.isZomming = !1
				}
			})
		}
	},
	onWinResize: function(b, c, d) {
		this.toScale = 1;
		var e = getPageWidthHeightByWidth(b, c, zoomPageWidth, zoomPageHeight);
		this.fitW = e.x;
		this.fitH = e.y;
		if (d) this.onResize(b, c, !0)
	},
	showLoading: function() {
		this.side.append(this.loadingImg)
	},
	hideLoading: function() {
		this.loadingImg.remove()
	},
	translate: function(b, c, d) {
		this.tmpImg.css({
			display: "none"
		});
		this.zoomObj(this.side, this.origin, " scale(" + this.toScale + ")", b, c);
		this.zoomObj(this.tmpImg, this.origin, " scale(" + this.toScale + ")", b, c);
		this.tmpImg.css({
			display: "block"
		})
	},
	sFit: function() {
		return this.toScale == this.fitW / this.width
	},
	animateBack: function(b) {
		var c = getTransform(this.side[0]),
		d = {
			x: c.x,
			y: c.y,
			scale: this.toScale
		},
		e = this.fitW / this.width,
		f = this;
		f.tmpImg.css({
			display: "none"
		});
		$(d).animate({
			x: 0,
			y: 0,
			scale: e
		},
		{
			duration: 200,
			step: function() {
				f.zoomObj(f.side, f.origin, " scale(" + d.scale + ")", d.x, d.y);
				f.zoomObj(f.tmpImg, f.origin, " scale(" + d.scale + ")", d.x, d.y)
			},
			complete: function() {
				f.toScale = e;
				f.tmpImg.css({
					display: "block"
				});
				b()
			}
		})
	},
	showPage: function() {
		this.side.css({
			display: "block"
		})
	},
	hidePage: function() {
		this.side.css({
			display: "none"
		})
	},
	getWidth: function() {
		return this.width * this.toScale
	},
	getHeight: function() {
		return this.height * this.toScale
	},
	highlightSearch: function(b) {
		highlightSearchFun(this.searchHighlight, b)
	},
	clearHighlight: function() {
		clearHighlightFun(this.searchHighlight)
	}
}).extend(BookSide);
bdor[34] = function(b, c) {
	return b - bdor[c]
};
var phonePage = Class({
	create: function(b) {
		this.side = $("<div></div>");
		this.leftPage = $("<div></div>");
		this.rightPage = $("<div></div>");
		this.leftSide = new phoneSide(this.leftPage);
		this.rightSide = new phoneSide(this.rightPage);
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		this.fitH = this.fitW = 0;
		b.append(this.side);
		this.side.append(this.leftPage);
		this.side.append(this.rightPage);
		this.imageIndex = -1;
		this.leftSide.imageIndex = -1;
		this.rightSide.imageIndex = -1;
		this.toScale = 1;
		this.leftSide.toScale = 1;
		this.rightSide.toScale = 1;
		this.origin = "0% 0%";
		this.translateY = this.translateX = this.y = this.x = 0;
		this.toolbarShow = this.isZomming = !1;
		this.sideTop = 0;
		this.side.css({
			width: this.width + "px",
			height: this.height + "px",
			top: this.sideTop + "px",
			position: "absolute",
			"border-width": "0px"
		});
		this.leftPage.css({
			width: this.width / 2 + "px",
			height: this.height + "px",
			top: this.sideTop + "px",
			position: "absolute"
		});
		this.rightPage.css({
			width: this.width / 2 + "px",
			height: this.height + "px",
			top: this.sideTop + "px",
			left: this.width / 2 + "px",
			position: "absolute"
		});
		this.initEvent();
		this.onWinResize(windowWidth - leftMargin - rightMargin, windowHeight - topMargin - bottomMargin - 40, !0);
		this.father = b
	},
	hideMM: function() {
		this.leftSide.hideMM();
		this.rightSide.hideMM()
	},
	showMM: function() {
		this.leftSide.showMM();
		this.rightSide.showMM()
	},
	playSlider: function() {
		this.leftSide.playSlider();
		this.rightSide.playSlider()
	},
	resetSlider: function() {
		this.leftSide.resetSlider();
		this.rightSide.resetSlider()
	},
	setCSS: function(b) {
		this.leftSide.setCSS(b);
		this.rightSide.setCSS(b)
	},
	onResize2: function(b, c) {
		this.leftPage.css({
			width: b / 2 + "px",
			height: c + "px"
		});
		this.rightPage.css({
			width: b / 2 + "px",
			height: c + "px",
			left: b / 2 + "px"
		});
		this.toScale = b / this.width;
		var d = getTransform(this.side[0]);
		this.zoomObj(this.side, this.origin, " scale(" + this.toScale + ")", d.x, d.y)
	},
	onResize: function(b, c, d) {
		this.toScale = 1;
		this.leftSide.toScale = 1;
		this.rightSide.toScale = 1;
		b = getPageWidthHeightByWidth(b / 2, c, zoomPageWidth, zoomPageHeight);
		this.width = b.x * this.toScale * 2;
		this.height = b.y * this.toScale;
		this.side.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.leftPage.css({
			width: this.width / 2 + "px",
			height: this.height + "px"
		});
		this.rightPage.css({
			width: this.width / 2 + "px",
			height: this.height + "px",
			left: this.width / 2 + "px"
		});
		this.leftSide.onResize(this.width / 2, this.height, d);
		this.rightSide.onResize(this.width / 2, this.height, d)
	},
	getSide: function() {
		return this.side
	},
	fillContent: function(b) {
		b = 2 * parseInt(b / 2);
		parseBool(bookConfig.RightToLeft) ? (this.leftSide.fillContent(b + 1), this.rightSide.fillContent(b)) : (this.leftSide.fillContent(b), this.rightSide.fillContent(b + 1))
	},
	fillTemp: function(b) {
		b = 2 * parseInt(b / 2);
		parseBool(bookConfig.RightToLeft) ? (this.leftSide.fillTemp(b + 1), this.rightSide.fillTemp(b)) : (this.leftSide.fillTemp(b), this.rightSide.fillTemp(b + 1))
	},
	changeContent: function(b) {
		b = 2 * parseInt(b / 2);
		parseBool(bookConfig.RightToLeft) ? (this.leftSide.changeContent(b + 1), this.rightSide.changeContent(b)) : (this.leftSide.changeContent(b), this.rightSide.changeContent(b + 1))
	},
	setPosition: function(b, c) {
		this.side.css({
			left: b + "px",
			top: c + "px"
		})
	},
	setChildIndex: function(b) {
		this.side.css({
			"z-index": b
		})
	},
	setVisible: function(b) {
		this.side.css({
			display: b ? "block": "none"
		})
	},
	resetSize: function() {},
	zoom: function(b, c) {
		if (!0 == this.isZomming) return ! 1;
		var d = phoneBook.minZoomWidth,
		e = phoneBook.largeZoomWidth,
		f = this.side.width() * this.toScale;
		this.side.height();
		var g = this.toScale + b,
		h = this.side.width() * g;
		if (1 > g) {
			if (f <= d) return;
			h < d && (g = d / this.side.width())
		}
		1 < g && h > e && (g = e / this.side.width());
		h = this.side.width() * g;
		this.side.height();
		d = (f - h) / 2 + this.translateX;
		0 == c && (d = 0);
		1 == c && (d = h); - 1 == c && (d = -h);
		this.animateZoom(g, d, 0, 300)
	},
	zoomToScale: function(b, c) {
		if (!0 == this.isZomming) return ! 1;
		var d = phoneBook.minZoomWidth,
		e = phoneBook.largeZoomWidth,
		f = this.side.width() * this.toScale;
		this.side.height();
		var g = this.toScale + b,
		h = this.side.width() * g;
		if (1 > g) {
			if (f <= d) return;
			h < d && (g = d / this.side.width())
		}
		1 < g && h > e && (g = e / this.side.width());
		h = this.side.width() * g;
		this.side.height();
		d = (f - h) / 2 + this.translateX;
		0 == c && (d = 0);
		1 == c && (d = h); - 1 == c && (d = -h); ! 0 != this.isZomming && (this.isZomming = !0, g || (g = this.toScale), d || (d = 0), getTransform(this.side[0]), this.zoomObj(this.side, this.origin, " scale(" + g + ")", d, 0), this.toScale = g, phoneBook.toScale = g, phoneBook.containtWidth = Math.min(phoneBook.width * g, phoneBook.stageWidth), phoneBook.containtHeight = Math.min(phoneBook.height * g, phoneBook.stageHeight), phoneBook.book.css({
			width: phoneBook.containtWidth + "px",
			height: phoneBook.containtHeight + "px",
			left: (phoneBook.stageWidth - phoneBook.containtWidth) / 2 + "px",
			top: (phoneBook.stageHeight - phoneBook.containtHeight) / 2 + "px"
		}), this.isZomming = !1)
	},
	noZoom: function() {
		this.toScale = this.fitW / this.width;
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", 0, 0)
	},
	forceReset: function(b) {
		this.width = this.fitW;
		this.height = this.fitH;
		this.toScale = 1;
		void 0 == b && (b = getTransform(this.side[0]));
		this.forceResize(b)
	},
	forceMax: function() {
		var b = (this.width * this.toScale - zoomPageWidth) / 2;
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		var c = getTransform(this.side[0]);
		c.x += b;
		this.forceResize(c)
	},
	animateMax: function() {
		this.animateZoom(zoomPageWidth / this.width, (this.width - zoomPageWidth) / 2, 0, 300)
	},
	animateFit: function() {
		this.animateZoom(this.fitW / this.width, 0, 0, 300)
	},
	forceResize: function(b) {
		this.side.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.leftSide.forceResize(Point(0, 0));
		this.rightSide.forceResize(Point(0, 0));
		this.toScale = 1;
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", b.x, b.y);
		this.translateX = b.x;
		this.translateY = b.y
	},
	getScaleFromFit: function() {
		return this.width * this.toScale / this.fitW
	},
	getCenterTransform: function() {
		return Point((this.fitW - this.width * this.toScale) / 2, 0)
	},
	zoomToMax: function() {
		var b = zoomPageWidth / this.width;
		this.animateZoom(b, (this.width * this.toScale - this.width * b) / 2 + this.translateX, 0, 200)
	},
	zoomToFit: function() {
		var b = this.getScaleFromFit();
		this.animateZoom(b, 0, 0, 200)
	},
	zoomObj: function(b, c, d, e, f) {
		e || (e = 0);
		f || (f = 0);
		e = translate(e, f);
		b.css({
			"-webkit-transform-origin": c,
			"-moz-transform-origin": c,
			"-ms-transform-origin": c,
			"-o-transform-origin": c,
			"transform-origin": c,
			"-webkit-transform": e + d,
			"-moz-transform": e + d,
			"-ms-transform": e + d,
			"-o-transform": e + d,
			transform: e + d
		})
	},
	setTranslate: function(b, c, d) {
		c = translate(c, d);
		b.css({
			"-webkit-transform": c,
			"-moz-transform": c,
			"-o-transform": c,
			"-ms-transform": c,
			transform: c
		})
	},
	setXY: function(b, c) {
		this.x = b;
		this.y = c
	},
	animateTranslate: function(b, c, d) {
		b || (b = 0);
		c || (c = 0);
		d || (d = 25);
		var e = getTransform(this.side[0]),
		f = this;
		$(e).animate({
			x: b,
			y: c
		},
		{
			duration: d,
			easing: "easeOutSine",
			complete: function() {
				f.zoomObj(f.side, f.origin, " scale(" + f.toScale + ")", e.x, e.y)
			}
		})
	},
	animateZoom: function(b, c, d, e) {
		if (!0 != this.isZomming) {
			this.isZomming = !0;
			b || (b = this.toScale);
			c || (c = 0);
			d || (d = 0);
			e || (e = 25);
			var f = getTransform(this.side[0]),
			g = {
				scale: this.toScale,
				x: f.x,
				y: f.y
			},
			h = this;
			$(g).animate({
				scale: b,
				x: c,
				y: d
			},
			{
				duration: e,
				easing: "easeOutSine",
				step: function() {
					h.zoomObj(h.side, h.origin, " scale(" + g.scale + ")", c, d)
				},
				complete: function() {
					h.toScale = b;
					phoneBook.toScale = b;
					phoneBook.containtWidth = Math.min(phoneBook.width * b, phoneBook.stageWidth);
					phoneBook.containtHeight = Math.min(phoneBook.height * b, phoneBook.stageHeight);
					phoneBook.book.css({
						width: phoneBook.containtWidth + "px",
						height: phoneBook.containtHeight + "px",
						left: (phoneBook.stageWidth - phoneBook.containtWidth) / 2 + "px",
						top: (phoneBook.stageHeight - phoneBook.containtHeight) / 2 + "px"
					});
					h.isZomming = !1
				}
			})
		}
	},
	onWinResize: function(b, c, d) {
		this.toScale = 1;
		var e = getPageWidthHeightByWidth(b / 2, c, zoomPageWidth, zoomPageHeight);
		this.fitW = 2 * e.x;
		this.fitH = e.y;
		if (d) this.onResize(b, c, !0)
	},
	showLoading: function() {
		this.side.append(this.loadingImg)
	},
	hideLoading: function() {
		this.loadingImg.remove()
	},
	translate: function(b, c, d) {
		this.zoomObj(this.side, this.origin, " scale(" + this.toScale + ")", b, c)
	},
	isFit: function() {
		return this.toScale == this.fitW / this.width
	},
	animateBack: function(b) {
		var c = getTransform(this.side[0]),
		d = {
			x: c.x,
			y: c.y,
			scale: this.toScale
		},
		e = this.fitW / this.width,
		f = this;
		f.tmpImg.css({
			display: "none"
		});
		$(d).animate({
			x: 0,
			y: 0,
			scale: e
		},
		{
			duration: 200,
			step: function() {
				f.zoomObj(f.side, f.origin, " scale(" + d.scale + ")", d.x, d.y)
			},
			complete: function() {
				f.toScale = e;
				b()
			}
		})
	},
	showPage: function() {
		this.side.css({
			display: "block"
		})
	},
	hidePage: function() {
		this.side.css({
			display: "none"
		})
	},
	getWidth: function() {
		return this.width * this.toScale
	},
	getHeight: function() {
		return this.height * this.toScale
	},
	initEvent: function() {
		var b = this,
		c = Point(0, 0),
		d = Point(0, 0),
		e = Point(0, 0),
		f = !1,
		g = !1,
		h = null,
		k = !1,
		l,
		m = 0,
		p = 0,
		n = !1;
		this.side.bind(_event._down,
		function(m) {
			m.preventDefault();
			if (bookType == BookType.phone_book) {
				if (!0 == b.isZomming || !0 == phoneBook.isFlipping) return ! 1;
				l = b.toScale;
				n = !1;
				m = isTouch ? m.originalEvent.touches: [m];
				var p = getTransform(b.side[0]);
				b.translateX = p.x;
				b.translateY = p.y;
				phoneBook.initTranslate();
				1 == m.length ? (f = !0, g = !1, c = Point(m[0].pageX, m[0].pageY), h = Point(b.side.position().left, b.side.position().top)) : 2 == m.length && (f = !1, g = !0, c = Point(m[0].pageX, m[0].pageY), e = Point(m[1].pageX, m[1].pageY), d = Point((m[0].pageX + m[1].pageX) / 2, (m[0].pageY + m[1].pageY) / 2), h = Point(b.side.offset().left, b.side.offset().top));
				k = !1;
				stopEvent(m[0])
			}
		});
		2 == browserType && (_event._mousewheel = "DOMMouseScroll");
		isIE() && (_event._mousewheel = "mousewheel");
		this.side.bind(_event._mousewheel,
		function(c) {
			c.preventDefault();
			if (bookType != BookType.phone_book || !0 == phoneBook.isFlipping) return ! 1;
			c = c.originalEvent;
			c = Math.max( - 1, Math.min(1, c.wheelDelta || -c.detail));
			getTransform(b.side[0]);
			var d = -0.25;
			0 < c && (d = 0.25);
			phoneBook.zoom(d);
			return ! 1
		});
		this.side.bind(_event._move,
		function(q) {
			q.preventDefault();
			if (bookType == BookType.phone_book) {
				q = isTouch ? q.originalEvent.touches: [q];
				if (!0 == b.isZomming || !0 == phoneBook.isFlipping || !0 == n) return ! 1;
				f ? b.side.css({
					cursor: "move"
				}) : b.side.css({
					cursor: ""
				});
				if (f) {
					var s = q[0].pageX - c.x + b.translateX,
					r = q[0].pageY - c.y + b.translateY; (new Date).getTime();
					r = Math.max(phoneBook.getHeight() - b.getHeight(), r);
					r = Math.min(r, 0);
					phoneBook.getWidth() + 5 < b.getWidth() ? (s = Math.max(phoneBook.getWidth() - b.getWidth(), s), s = Math.min(s, 0), b.zoomObj(b.side, b.origin, " scale(" + b.toScale + ")", s, r), m = s, p = r, b.zoomToMove = !0, b.gotoNextPage = !1, b.gotoPrePage = !1) : (b.zoomToMove = !1, phoneBook.translateMove(q[0].pageX - c.x, r), c.x - q[0].pageX > windowWidth / 8 ? (b.gotoNextPage = !0, b.gotoPrePage = !1) : c.x - q[0].pageX <= -windowWidth / 8 ? (b.gotoNextPage = !1, b.gotoPrePage = !0) : (b.gotoNextPage = !1, b.gotoPrePage = !1));
					m = s;
					p = r;
					k = !1;
					stopEvent(q[0])
				} else if (g) {
					var r = Point(q[0].pageX, q[0].pageY),
					w = Point(q[1].pageX, q[1].pageY),
					s = Math.sqrt(Math.pow(c.x - e.x, 2) + Math.pow(c.y - e.y, 2)),
					r = Math.sqrt(Math.pow(r.x - w.x, 2) + Math.pow(r.y - w.y, 2));
					scale = Math.max(r / s * l, 0.5);
					s = b.side.width() * scale;
					1 > scale && s < phoneBook.minZoomWidth && (scale = phoneBook.minZoomWidth / b.side.width());
					1 < scale && s > phoneBook.largeZoomWidth && (scale = phoneBook.largeZoomWidth / b.side.width());
					phoneBook.showPage.toScale = scale;
					r = (d.x - h.x) / l;
					s = (d.y - h.y) / l;
					b.side.width();
					b.side.height();
					r = (l - b.toScale) * b.side.width() * (r / b.side.width());
					w = (l - b.toScale) * b.side.height() * (s / b.side.height());
					s = b.translateX + r;
					r = b.translateY + w;
					phoneBook.toScale = scale;
					phoneBook.containtWidth = Math.min(phoneBook.width * scale, phoneBook.stageWidth);
					phoneBook.containtHeight = Math.min(phoneBook.height * scale, phoneBook.stageHeight);
					r = Math.max(phoneBook.getHeight() - b.side.height() * scale, r);
					r = Math.min(r, 0);
					s = Math.max(phoneBook.getWidth() - b.side.width() * scale, s);
					s = Math.min(s, 0);
					phoneBook.showPage.zoomObj(phoneBook.showPage.side, phoneBook.showPage.origin, " scale(" + b.toScale + ")", s, r);
					phoneBook.book.css({
						width: phoneBook.containtWidth + "px",
						height: phoneBook.containtHeight + "px",
						left: (phoneBook.stageWidth - phoneBook.containtWidth) / 2 + "px",
						top: (phoneBook.stageHeight - phoneBook.containtHeight) / 2 + "px"
					});
					k = !0;
					stopEvent(q[0])
				}
			}
		});
		this.side.bind(_event._end,
		function(c) {
			c.preventDefault();
			if (bookType == BookType.phone_book) {
				if (!0 == b.isZomming || !0 == phoneBook.isFlipping || !0 == n) return ! 1;
				b.side.css({
					cursor: ""
				});
				b.translateX = m;
				var d = p,
				d = Math.max(phoneBook.getHeight() - b.getHeight(), d),
				d = Math.min(d, 0);
				b.translateY = d;
				try { ! 0 == b.gotoNextPage ? phoneBook.gotoPage(parseInt(phoneBook.currentIndex) + 2) : !0 == b.gotoPrePage ? phoneBook.gotoPage(parseInt(phoneBook.currentIndex) - 2) : !1 == b.zoomToMove && !1 == k && phoneBook.translateToOrigin(b.translateY),
					b.gotoNextPage = !1,
					b.gotoPrePage = !1,
					n = !0
				} catch(e) {}
				k = g = f = !1;
				stopEvent(c[0])
			}
		});
		this.side.bind(_event._leave,
		function(c) {
			c.preventDefault();
			if (bookType == BookType.phone_book) {
				if (!0 == b.isZomming || !0 == phoneBook.isFlipping || !0 == n) return ! 1;
				try { ! 0 == b.gotoNextPage ? phoneBook.gotoPage(parseInt(phoneBook.currentIndex) + 2) : !0 == b.gotoPrePage ? phoneBook.gotoPage(parseInt(phoneBook.currentIndex) - 2) : !1 == b.zoomToMove && !1 == k && phoneBook.translateToOrigin(b.translateY),
					b.gotoNextPage = !1,
					b.gotoPrePage = !1,
					n = !0
				} catch(d) {}
				stopEvent(c[0])
			}
		});
		this.side.hammer().on("doubletap",
		function(b) {
			b.preventDefault();
			if (!0 == phoneBook.isFlipping || !0 == this.isZomming || bookType != BookType.phone_book) return ! 1
		})
	},
	initMM: function() {
		this.leftSide.initMM();
		this.rightSide.initMM()
	},
	MMResize: function(b, c) {
		this.leftSide.MMResize(b, c);
		this.rightSide.MMResize(b, c)
	},
	highlightSearch: function(b) {
		this.leftSide.highlightSearch(b);
		this.rightSide.highlightSearch(b)
	},
	clearHighlight: function() {
		this.leftSide.clearHighlight();
		this.rightSide.clearHighlight()
	}
}),
SinglePhoneBook = Class({
	create: function(b) {
		this.bookContainer = $("<div style='left:0px;right:0px;top:0px;bottom:0px;position:absolute;display:none;'></div>");
		this.book = $("<div></div>");
		this.bookPage = $("<div></div>");
		bdor[17] = "p";
		this.prePage = new singlePhoneSide(this.bookPage);
		this.nextPage = new singlePhoneSide(this.bookPage);
		this.showPage = new singlePhoneSide(this.bookPage);
		this.preButton = $("<div></div>");
		this.nextButton = $("<div></div>");
		this.firstButton = $("<div></div>");
		this.lastButton = $("<div></div>");
		this.width = windowWidth;
		this.height = windowHeight;
		this.prePage.setChildIndex(1);
		this.showPage.setChildIndex(3);
		this.nextPage.setChildIndex(2);
		this.diffPageCount = 0;
		this.currentIndex = 1;
		this.showingPage = this.flipPage = null;
		this.isFlipping = !1;
		this.minZoomWidth = windowWidth;
		this.largeScale = Math.max(1, 2.5 * zoomPageWidth / windowWidth);
		this.largeZoomWidth = windowWidth * this.largeScale;
		b.append(this.bookContainer);
		this.bookContainer.append(this.book);
		this.preImg = $('<img src="' + uiBaseURL + 'slide_leftButton.png"></img>');
		this.nextImg = $('<img src="' + uiBaseURL + 'slide_rightButton.png"></img>');
		this.firstImg = $('<img src="' + uiBaseURL + 'slide_firstButton.png"></img>');
		this.lastImg = $('<img src="' + uiBaseURL + 'slide_lastButton.png"></img>');
		this.preButton.append(this.preImg);
		this.nextButton.append(this.nextImg);
		this.firstButton.append(this.firstImg);
		this.lastButton.append(this.lastImg);
		this.preButton.css({
			display: "none"
		});
		this.nextButton.css({
			display: "none"
		});
		this.firstButton.css({
			display: "none"
		});
		this.lastButton.css({
			display: "none"
		});
		this.book.append(this.bookPage);
		this.book.css({
			width: this.width + "px",
			height: this.height + "px",
			position: "absolute",
			overflow: "hidden",
			"z-index": "9"
		});
		this.preButton.css({
			width: "30px",
			height: "59px",
			left: "0px",
			top: (windowHeight - 90) / 2 + "px",
			background: "#888888",
			"z-index": "10",
			"border-bottom": "1px solid #000000",
			"border-radius": "5px 5px 0px 0px",
			position: "absolute",
			opacity: "0.5"
		});
		this.nextButton.css({
			width: "30px",
			height: "59px",
			left: windowWidth - 30 + "px",
			top: (windowHeight - 90) / 2 + "px",
			background: "#888888",
			"z-index": "10",
			"border-bottom": "1px solid #000000",
			"border-radius": "5px 5px 0px 0px",
			position: "absolute",
			opacity: "0.5"
		});
		this.firstButton.css({
			width: "30px",
			height: "30px",
			left: "0px",
			top: (windowHeight - 90) / 2 + 60 + "px",
			background: "#888888",
			"z-index": "10",
			"border-top": "1px solid #ffffff",
			"border-radius": "0px 0px 5px 5px",
			position: "absolute",
			opacity: "0.5"
		});
		this.lastButton.css({
			width: "30px",
			height: "30px",
			left: windowWidth - 30 + "px",
			top: (windowHeight - 90) / 2 + 60 + "px",
			background: "#888888",
			"border-top": "1px solid #ffffff",
			"z-index": "10",
			"border-radius": "0px 0px 5px 5px",
			position: "absolute",
			opacity: "0.5"
		});
		this.firstImg.css({
			left: "7px",
			top: "7px",
			position: "absolute"
		});
		this.lastImg.css({
			left: "7px",
			top: "7px",
			position: "absolute"
		});
		this.preImg.css({
			left: "7px",
			top: "22px",
			position: "absolute"
		});
		this.nextImg.css({
			left: "7px",
			top: "22px",
			position: "absolute"
		});
		this.fillNear(1);
		this.pageIndexLabel = new label("1/" + totalPageCount, this.bookContainer);
		this.pageIndexLabel.setLabelPosition(10, 10, ["left", "bottom"]);
		this.pageIndexLabel.setCSS({
			"padding-left": "5px",
			"padding-right": "5px",
			height: "25px",
			"line-height": "25px",
			vertical: "middle",
			"text-align": "center",
			"border-radius": "3px",
			"z-index": "10",
			background: "#333333"
		});
		this.pageIndexLabel.setFont(10, "#edaa1d");
		this.toScale = 1;
		this.initEvent()
	},
	setShow: function(b) {
		this.pageIndexLabel.setCSS({
			display: b ? "block": "none"
		});
		this.preButton.css({
			display: b ? "none": "block"
		});
		this.nextButton.css({
			display: b ? "none": "block"
		});
		this.firstButton.css({
			display: b ? "none": "block"
		});
		this.lastButton.css({
			display: b ? "none": "block"
		})
	},
	onResize: function(b, c) {
		this.toScale = 1;
		this.stageWidth = windowWidth;
		this.stageHeight = windowHeight;
		var d = getPageWidthHeightByWidth(this.stageWidth, this.stageHeight, zoomPageWidth, zoomPageHeight);
		this.width = d.x;
		this.height = d.y;
		this.minZoomWidth = d.x;
		this.minZoomHeight = d.y;
		this.largeZoomWidth = this.width * this.largeScale;
		this.largeZoomHeight = this.height * this.largeScale;
		this.containtWidth = Math.min(this.width * this.toScale, this.stageWidth);
		this.containtHeight = Math.min(this.height * this.toScale, this.stageHeight);
		this.book.css({
			width: this.containtWidth + "px",
			height: this.containtHeight + "px",
			left: (this.stageWidth - this.containtWidth) / 2 + "px",
			top: (this.stageHeight - this.containtHeight) / 2 + "px"
		});
		this.preButton.css({
			left: "0px",
			top: (windowHeight - 90) / 2 + "px"
		});
		this.nextButton.css({
			left: windowWidth - 30 + "px",
			top: (windowHeight - 90) / 2 + "px"
		});
		this.firstButton.css({
			left: "0px",
			top: (windowHeight - 90) / 2 + 60 + "px"
		});
		this.lastButton.css({
			left: windowWidth - 30 + "px",
			top: (windowHeight - 90) / 2 + 60 + "px"
		});
		this.prePage.onWinResize(this.containtWidth, this.containtHeight, !0);
		this.showPage.onWinResize(this.containtWidth, this.containtHeight, !0);
		this.nextPage.onWinResize(this.containtWidth, this.containtHeight, !0);
		this.prePage.translate( - this.prePage.getWidth(), 0);
		this.nextPage.translate(this.containtWidth, 0)
	},
	setTranslate: function(b, c, d) {
		c = translate(c, d);
		b.css({
			"-webkit-transform": c,
			"-moz-transform": c,
			"-o-transform": c,
			"-ms-transform": c,
			transform: c
		})
	},
	gotoPage: function(b) {
		var c = this;
		this.prePage.clearHighlight();
		this.nextPage.clearHighlight();
		if (this.currentIndex == b || 1 > b || b > originTotalPageCount || this.isFlipping) {
			var d = 1 > b ? "This is the first page": "This is the last page";
			if (1 > b || b > originTotalPageCount) c.translateToOrigin(0),
			_tipsBox.setCaption(d),
			_tipsBox.showTipsBox()
		} else {
			this.isFlipping = !0;
			this.diffPageCount = b - this.currentIndex;
			var e = 0,
			f = this.showPage,
			g = void 0,
			c = this,
			d = Point(0, f.getWidth());
			centerP = Point(0, 0);
			this.currentIndex > b ? (g = this.prePage, e = d.y) : (g = this.nextPage, e = -d.y);
			tragetToLeft = centerP.x;
			g.fillTemp(b); (function() {
				var d = getTransform(f.side[0]),
				k = getTransform(g.side[0]);
				g.forceReset();
				var l = 30,
				m = 1E3 * bookConfig.flippingTime;
				void 0 != m && 0 < m && (l = 2);
				var p = 0,
				n = window.setInterval(function() {
					var m = Point(0, 0),
					s = Point(0, 0);
					m.x = $.easing.swing(null, p, d.x, e - d.x, l);
					s.x = $.easing.swing(null, p, k.x, tragetToLeft - k.x, l);
					p++;
					f.translate(m.x, m.y);
					g.translate(s.x, s.y);
					p > l && (window.clearInterval(n), window.setTimeout(function() {
						c.showPage.noZoom();
						auto_player.resetTimer();
						c.changePage();
						c.endFlip(b);
						c.onResize();
						c.isFlipping = !1
					},
					20))
				},
				20)
			})()
		}
	},
	changePage: function() {
		var b = null;
		0 < this.diffPageCount ? (b = this.showPage, this.showPage = this.nextPage, this.nextPage = this.prePage) : (b = this.nextPage, this.nextPage = this.showPage, this.showPage = this.prePage);
		this.prePage = b
	},
	addSearchHighlight: function() {
		this.showPage.highlightSearch(this.currentIndex)
	},
	clearSearchHighlight: function() {
		this.showPage.clearHighlight()
	},
	endFlip: function(b) {
		this.currentIndex = b;
		this.fillNear(b);
		setCurrentIndexTextField(this.currentIndex, !1);
		window.location.hash = "#p=" + this.currentIndex;
		sendvisitinfo(1, this.currentIndex);
		thumbButtonEnable && thumbnail.clearHighLight();
		thumbButtonEnable && thumbnail.setHighLight(this.currentIndex);
		this.prePage.translate( - this.prePage.getWidth(), 0);
		this.nextPage.translate(this.containtWidth, 0);
		this.pageIndexLabel.setCaption(this.currentIndex + "/" + totalPageCount);
		this.addSearchHighlight()
	},
	setVisible: function(b) {
		this.bookContainer.css({
			display: b ? "block": "none"
		})
	},
	setPosition: function(b, c) {
		this.book.css({
			left: b + "px",
			top: c + "px"
		})
	},
	fillNear: function(b) {
		1 <= b && this.prePage.fillContent(b - 1);
		this.showPage.changeContent(b);
		b <= originTotalPageCount && this.nextPage.fillContent(b + 1);
		this.prePage.resetSlider();
		this.showPage.playSlider();
		this.nextPage.resetSlider()
	},
	initEvent: function() {
		var b = this;
		Point(0, 0);
		this.preButton.bind(_event._end,
		function(c) {
			b.gotoPage(b.currentIndex - 1)
		});
		this.nextButton.bind(_event._end,
		function(c) {
			b.gotoPage(b.currentIndex + 1)
		});
		this.preButton.bind(_event._enter,
		function() {
			b.preButton.css({
				background: "#000000"
			})
		});
		this.nextButton.bind(_event._enter,
		function() {
			b.nextButton.css({
				background: "#000000"
			})
		});
		this.preButton.bind(_event._leave,
		function() {
			b.preButton.css({
				background: "#888888"
			})
		});
		this.nextButton.bind(_event._leave,
		function() {
			b.nextButton.css({
				background: "#888888"
			})
		});
		this.preButton.bind(_event._end,
		function() {
			b.preButton.css({
				background: "#888888"
			})
		});
		this.nextButton.bind(_event._end,
		function() {
			b.nextButton.css({
				background: "#888888"
			})
		});
		this.firstButton.bind(_event._enter,
		function() {
			b.firstButton.css({
				background: "#000000"
			})
		});
		this.lastButton.bind(_event._enter,
		function() {
			b.lastButton.css({
				background: "#000000"
			})
		});
		this.firstButton.bind(_event._leave,
		function() {
			b.firstButton.css({
				background: "#888888"
			})
		});
		this.lastButton.bind(_event._leave,
		function() {
			b.lastButton.css({
				background: "#888888"
			})
		});
		this.firstButton.bind(_event._end,
		function() {
			b.firstButton.css({
				background: "#888888"
			})
		});
		this.lastButton.bind(_event._end,
		function() {
			b.lastButton.css({
				background: "#888888"
			})
		});
		this.firstButton.bind(_event._down,
		function() {
			b.gotoPage(1)
		});
		this.lastButton.bind(_event._down,
		function() {
			b.gotoPage(originTotalPageCount)
		})
	},
	initTranslate: function() {
		var b = getTransform(this.showPage.side[0]),
		c = getTransform(this.prePage.side[0]),
		d = getTransform(this.nextPage.side[0]);
		this.tran = Point(b.x, b.y);
		this.pretran = Point(c.x, c.y);
		this.nexttran = Point(d.x, d.y)
	},
	translateMove: function(b, c) {
		this.showPage.setTranslate(this.showPage.side, b + this.tran.x, c);
		this.showPage.setTranslate(this.showPage.tmpImg, b + this.tran.x, c);
		this.prePage.setTranslate(this.prePage.side, b + this.pretran.x, 0);
		this.prePage.setTranslate(this.prePage.tmpImg, b + this.pretran.x, 0);
		this.nextPage.setTranslate(this.nextPage.side, b + this.nexttran.x, 0);
		this.nextPage.setTranslate(this.nextPage.tmpImg, b + this.nexttran.x, 0)
	},
	zoom: function(b) {
		this.showPage.zoom(b, 0)
	},
	zoomToScale: function(b) {
		this.showPage.zoomToScale(b, 0)
	},
	noZoom: function() {
		this.showPage.noZoom()
	},
	getLeft: function() {
		return this.book.offset().left
	},
	getTop: function() {
		return this.book.offset().top
	},
	getWidth: function() {
		return this.containtWidth
	},
	getHeight: function() {
		return this.containtHeight
	},
	getCurrentPageIndex: function() {
		return this.currentIndex
	},
	getScale: function() {
		return 1
	},
	show: function() {
		Log.debug("single phone book show.");
		this.setVisible(!0);
		this.prePage.showPage();
		this.nextPage.showPage();
		this.showPage.showPage();
		var b = this;
		window.setTimeout(function() {
			b.showPage.showPage();
			b.addSearchHighlight(this.currentIndex);
			b.showPage.playSlider()
		},
		500)
	},
	hide: function() {
		Log.debug("single phone book hide.");
		this.setVisible(!1);
		this.showPage.resetSlider()
	}
}),
singlePhoneSide = Class({
	create: function(b) {
		this.side = $("<div></div>");
		this.tmpContent = $("<div id='sideContent' class='sideContent' style= 'position: absolute;'></div>");
		this.sideContent = $("<div class='sideContent' style= 'overflow: hidden'></div>");
		this.sideImg = $("<img style='position: absolute;' />");
		this.MMBackground = $("<div style='position:absolute;z-index:3;'></div>");
		this.loadingImg = $("<img src='" + uiBaseURL + "progress.gif' style='position: absolute;'>");
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		this.fitH = this.fitW = 0;
		this.tmpImg = $("<img style='position: absolute;z-index:-1;' />");
		this.searchHighlight = $("<div class='kong' id='highlight'></div>");
		b.append(this.side);
		this.side.append(this.sideContent);
		this.imageIndex = -1;
		this.toScale = 1;
		this.origin = "0% 0%";
		this.translateY = this.translateX = this.y = this.x = 0;
		this.toolbarShow = this.isZomming = !1;
		this.sideTop = 0;
		this.side.css({
			width: this.width + "px",
			height: this.height + "px",
			top: this.sideTop + "px",
			position: "absolute"
		});
		this.sideContent.css({
			width: this.width + "px",
			height: this.height + "px",
			background: "transparent"
		});
		this.searchHighlight.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.MMBackground.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.loadingImg.css({
			left: windowWidth / 2 - 10 + "px",
			top: windowHeight / 2 - 10 + "px"
		});
		this.initMMItems();
		this.slider = null;
		this.playSliderAfterLoad = !1;
		this.initEvent();
		this.onWinResize(windowWidth - leftMargin - rightMargin, windowHeight - topMargin - bottomMargin - 40, !0);
		this.father = b
	},
	setCSS: function(b) {
		this.side.css(b)
	},
	onResize2: function(b, c) {
		this.toScale = b / this.width;
		var d = getTransform(this.side[0]);
		this.zoomObj(this.side, this.origin, " scale(" + this.toScale + ")", d.x, d.y)
	},
	onResize: function(b, c, d) {
		this.toScale = 1;
		b = getPageWidthHeightByWidth(b, c, zoomPageWidth, zoomPageHeight);
		this.width = b.x * this.toScale;
		this.height = b.y * this.toScale;
		this.side.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideContent.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.searchHighlight.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.MMBackground.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.onMMResize(this.width, this.height);
		d && this.tmpImg.css({
			width: this.width + "px",
			height: this.height + "px",
			top: this.sideTop + "px"
		});
		this.loadingImg.css({
			left: windowWidth / 2 - 10 + "px",
			top: windowHeight / 2 - 10 + "px"
		})
	},
	getSide: function() {
		return this.side
	},
	fillContent: function(b) {
		this.imageIndex = b;
		var c = this;
		this.sideContent.empty();
		b > originTotalPageCount + 1 || 0 > b || (this.sideImg.attr("src", getPageDir(b, "thumb", originTotalPageCount)), this.sideImg.load(function() {
			c.tmpImg.attr("src", getPageDir(b, "thumb", originTotalPageCount));
			c.sideContent.append(c.sideImg);
			c.sideContent.append(c.tmpImg)
		}))
	},
	fillTemp: function(b) {
		if (b != this.imageIndex) {
			this.imageIndex = b;
			var c = this;
			this.sideContent.empty();
			b > originTotalPageCount + 1 || 0 > b || (this.sideImg.attr("src", getPageDir(b, "thumb", originTotalPageCount)), this.sideImg.load(function() {
				c.tmpImg.attr("src", getPageDir(b, "thumb", originTotalPageCount));
				c.sideContent.append(c.sideImg);
				c.sideContent.append(c.tmpImg)
			}))
		}
	},
	changeContent: function(b) {
		this.imageIndex = b;
		var c = this;
		b > originTotalPageCount + 1 || 0 > b || (null != this.slider && (this.slider.destroy(), this.slider = null), this.sideImg.attr("src", getPageDir(b, "normal", originTotalPageCount)), this.sideImg.load(function() {
			c.hideLoading();
			c.tmpImg.attr("src", getPageDir(b, "normal", originTotalPageCount));
			c.sideContent.append(c.sideImg);
			c.sideContent.append(c.tmpImg);
			c.sideContent.append(c.MMBackground);
			c.sideContent.append(c.searchHighlight);
			c.searchHighlight.css({
				opacity: 0.8
			});
			c.clearMM();
			c.initMM();
			c.initSlider()
		}))
	},
	setPosition: function(b, c) {
		this.side.css({
			left: b + "px",
			top: c + "px"
		})
	},
	setChildIndex: function(b) {
		this.side.css({
			"z-index": b
		})
	},
	setVisible: function(b) {
		this.side.css({
			display: b ? "block": "none"
		})
	},
	resetSize: function() {
		this.tmpImg.css({
			display: "none"
		});
		var b = this.width * this.toScale >= zoomPageWidth,
		c = b ? zoomPageWidth: this.width * this.toScale,
		d = b ? zoomPageHeight: this.height * this.toScale,
		e = getTransform(this.side[0]),
		f = this.width == zoomPageWidth && c < zoomPageWidth || this.width != zoomPageWidth;
		this.toScale = b ? this.width * this.toScale / zoomPageWidth: 1;
		var b = singlePhoneBook.minZoomWidth,
		g = singlePhoneBook.minZoomHeight;
		if (void 0 != b && void 0 != g && 0 < b && 0 < g) {
			c / d > b / g ? g = b * d / c: b = g * c / d;
			var h = Math.min(0, c - b),
			k = Math.min(0, d - g),
			c = Math.max(c, b),
			d = Math.max(d, g);
			e.x += h / 2;
			e.y += k / 2
		}
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", e.x, e.y);
		this.width = c;
		this.height = d;
		this.translateX = e.x;
		this.translateY = e.y;
		f && this.tmpImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", e.x, e.y);
		this.tmpImg.css({
			display: "block"
		});
		if (f) this.onResize(c, d)
	},
	zoom: function(b, c) {
		if (!0 == this.isZomming) return ! 1;
		var d = singlePhoneBook.minZoomWidth,
		e = singlePhoneBook.largeZoomWidth,
		f = this.side.width() * this.toScale;
		this.side.height();
		var g = this.toScale + b,
		h = this.side.width() * g;
		if (1 > g) {
			if (f <= d) return;
			h < d && (g = d / this.side.width())
		}
		1 < g && h > e && (g = e / this.side.width());
		h = this.side.width() * g;
		this.side.height();
		d = (f - h) / 2 + this.translateX;
		0 == c && (d = 0);
		1 == c && (d = h); - 1 == c && (d = -h);
		this.animateZoom(g, d, 0, 300)
	},
	zoomToScale: function(b, c) {
		if (!0 == this.isZomming) return ! 1;
		var d = singlePhoneBook.minZoomWidth,
		e = singlePhoneBook.largeZoomWidth,
		f = this.side.width() * this.toScale;
		this.side.height();
		var g = this.toScale + b,
		h = this.side.width() * g;
		if (1 > g) {
			if (f <= d) return;
			h < d && (g = d / this.side.width())
		}
		1 < g && h > e && (g = e / this.side.width());
		h = this.side.width() * g;
		this.side.height();
		d = (f - h) / 2 + this.translateX;
		0 == c && (d = 0);
		1 == c && (d = h); - 1 == c && (d = -h); ! 0 != this.isZomming && (this.isZomming = !0, g || (g = this.toScale), d || (d = 0), getTransform(this.side[0]), this.tmpImg.css({
			display: "none"
		}), this.zoomObj(this.side, this.origin, " scale(" + g + ")", d, 0), this.zoomObj(this.tmpImg, this.origin, " scale(" + g + ")", d, 0), this.tmpImg.css({
			display: "block"
		}), this.toScale = g, singlePhoneBook.toScale = g, singlePhoneBook.containtWidth = Math.min(singlePhoneBook.width * g, singlePhoneBook.stageWidth), singlePhoneBook.containtHeight = Math.min(singlePhoneBook.height * g, singlePhoneBook.stageHeight), singlePhoneBook.book.css({
			width: singlePhoneBook.containtWidth + "px",
			height: singlePhoneBook.containtHeight + "px",
			left: (singlePhoneBook.stageWidth - singlePhoneBook.containtWidth) / 2 + "px",
			top: (singlePhoneBook.stageHeight - singlePhoneBook.containtHeight) / 2 + "px"
		}), this.isZomming = !1)
	},
	noZoom: function() {
		this.toScale = this.fitW / this.width;
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", 0, 0);
		this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", 0, 0)
	},
	forceReset: function(b) {
		this.width = this.fitW;
		this.height = this.fitH;
		this.toScale = 1;
		void 0 == b && (b = getTransform(this.side[0]));
		this.forceResize(b)
	},
	forceMax: function() {
		var b = (this.width * this.toScale - zoomPageWidth) / 2;
		this.width = zoomPageWidth;
		this.height = zoomPageHeight;
		var c = getTransform(this.side[0]);
		c.x += b;
		this.forceResize(c)
	},
	animateMax: function() {
		this.animateZoom(zoomPageWidth / this.width, (this.width - zoomPageWidth) / 2, 0, 300)
	},
	animateFit: function() {
		this.animateZoom(this.fitW / this.width, 0, 0, 300)
	},
	forceResize: function(b) {
		this.side.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideContent.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.sideImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.searchHighlight.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.MMBackground.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.onMMResize(this.width, this.height);
		this.tmpImg.css({
			width: this.width + "px",
			height: this.height + "px"
		});
		this.toScale = 1;
		this.zoomObj(this.side, "0% 0%", "scale(" + this.toScale + ")", b.x, b.y);
		this.zoomObj(this.tmpImg, "0% 0%", "scale(" + this.toScale + ")", b.x, b.y);
		this.translateX = b.x;
		this.translateY = b.y
	},
	getScaleFromFit: function() {
		return this.width * this.toScale / this.fitW
	},
	getCenterTransform: function() {
		return Point((this.fitW - this.width * this.toScale) / 2, 0)
	},
	zoomToMax: function() {
		var b = zoomPageWidth / this.width;
		this.animateZoom(b, (this.width * this.toScale - this.width * b) / 2 + this.translateX, 0, 200)
	},
	zoomToFit: function() {
		var b = this.getScaleFromFit();
		this.animateZoom(b, 0, 0, 200)
	},
	zoomObj: function(b, c, d, e, f) {
		e || (e = 0);
		f || (f = 0);
		e = translate(e, f);
		b.css({
			"-webkit-transform-origin": c,
			"-moz-transform-origin": c,
			"-ms-transform-origin": c,
			"-o-transform-origin": c,
			"transform-origin": c,
			"-webkit-transform": e + d,
			"-moz-transform": e + d,
			"-ms-transform": e + d,
			"-o-transform": e + d,
			transform: e + d
		})
	},
	setTranslate: function(b, c, d) {
		c = translate(c, d);
		b.css({
			"-webkit-transform": c,
			"-moz-transform": c,
			"-o-transform": c,
			"-ms-transform": c,
			transform: c
		})
	},
	setXY: function(b, c) {
		this.x = b;
		this.y = c
	},
	animateTranslate: function(b, c, d) {
		b || (b = 0);
		c || (c = 0);
		d || (d = 25);
		var e = getTransform(this.side[0]),
		f = this;
		$(e).animate({
			x: b,
			y: c
		},
		{
			duration: d,
			easing: "easeOutSine",
			complete: function() {
				f.zoomObj(f.side, f.origin, " scale(" + f.toScale + ")", e.x, e.y);
				f.zoomObj(f.tmpImg, f.origin, " scale(" + f.toScale + ")", e.x, e.y)
			}
		})
	},
	animateZoom: function(b, c, d, e) {
		if (!0 != this.isZomming) {
			this.isZomming = !0;
			b || (b = this.toScale);
			c || (c = 0);
			d || (d = 0);
			e || (e = 25);
			var f = getTransform(this.side[0]),
			g = {
				scale: this.toScale,
				x: f.x,
				y: f.y
			},
			h = this;
			$(g).animate({
				scale: b,
				x: c,
				y: d
			},
			{
				duration: e,
				easing: "easeOutSine",
				step: function() {
					h.tmpImg.css({
						display: "none"
					});
					h.zoomObj(h.side, h.origin, " scale(" + g.scale + ")", c, d);
					h.zoomObj(h.tmpImg, h.origin, " scale(" + g.scale + ")", c, d);
					h.tmpImg.css({
						display: "block"
					})
				},
				complete: function() {
					h.toScale = b;
					singlePhoneBook.toScale = b;
					singlePhoneBook.containtWidth = Math.min(singlePhoneBook.width * b, singlePhoneBook.stageWidth);
					singlePhoneBook.containtHeight = Math.min(singlePhoneBook.height * b, singlePhoneBook.stageHeight);
					singlePhoneBook.book.css({
						width: singlePhoneBook.containtWidth + "px",
						height: singlePhoneBook.containtHeight + "px",
						left: (singlePhoneBook.stageWidth - singlePhoneBook.containtWidth) / 2 + "px",
						top: (singlePhoneBook.stageHeight - singlePhoneBook.containtHeight) / 2 + "px"
					});
					h.isZomming = !1
				}
			})
		}
	},
	onWinResize: function(b, c, d) {
		this.toScale = 1;
		var e = getPageWidthHeightByWidth(b, c, zoomPageWidth, zoomPageHeight);
		this.fitW = e.x;
		this.fitH = e.y;
		if (d) this.onResize(b, c, !0)
	},
	showLoading: function() {
		this.side.append(this.loadingImg)
	},
	hideLoading: function() {
		this.loadingImg.remove()
	},
	translate: function(b, c, d) {
		this.tmpImg.css({
			display: "none"
		});
		this.zoomObj(this.side, this.origin, " scale(" + this.toScale + ")", b, c);
		this.zoomObj(this.tmpImg, this.origin, " scale(" + this.toScale + ")", b, c);
		this.tmpImg.css({
			display: "block"
		})
	},
	isFit: function() {
		return this.toScale == this.fitW / this.width
	},
	animateBack: function(b) {
		var c = getTransform(this.side[0]),
		d = {
			x: c.x,
			y: c.y,
			scale: this.toScale
		},
		e = this.fitW / this.width,
		f = this;
		f.tmpImg.css({
			display: "none"
		});
		$(d).animate({
			x: 0,
			y: 0,
			scale: e
		},
		{
			duration: 200,
			step: function() {
				f.zoomObj(f.side, f.origin, " scale(" + d.scale + ")", d.x, d.y);
				f.zoomObj(f.tmpImg, f.origin, " scale(" + d.scale + ")", d.x, d.y)
			},
			complete: function() {
				f.toScale = e;
				f.tmpImg.css({
					display: "block"
				});
				b()
			}
		})
	},
	showPage: function() {
		this.side.css({
			display: "block"
		})
	},
	hidePage: function() {
		this.side.css({
			display: "none"
		})
	},
	getWidth: function() {
		return this.width * this.toScale
	},
	getHeight: function() {
		return this.height * this.toScale
	},
	initEvent: function() {
		var b = this,
		c = Point(0, 0),
		d = Point(0, 0),
		e = Point(0, 0),
		f = !1,
		g = !1,
		h = null,
		k = !1,
		l,
		m = 0,
		p = 0,
		n = !1;
		this.side.bind(_event._down,
		function(m) {
			m.preventDefault();
			if (bookType == BookType.singlePhone_book && !0 != b.isZomming && !0 != singlePhoneBook.isFlipping) {
				l = b.toScale;
				n = !1;
				m = isTouch ? m.originalEvent.touches: [m];
				var p = getTransform(b.side[0]);
				b.translateX = p.x;
				b.translateY = p.y;
				singlePhoneBook.initTranslate();
				1 == m.length ? (f = !0, g = !1, c = Point(m[0].pageX, m[0].pageY), h = Point(b.side.position().left, b.side.position().top)) : 2 == m.length && (f = !1, g = !0, c = Point(m[0].pageX, m[0].pageY), e = Point(m[1].pageX, m[1].pageY), d = Point((m[0].pageX + m[1].pageX) / 2, (m[0].pageY + m[1].pageY) / 2), h = Point(b.side.offset().left, b.side.offset().top));
				k = !1
			}
		});
		2 == browserType && (_event._mousewheel = "DOMMouseScroll");
		isIE() && (_event._mousewheel = "mousewheel");
		this.side.bind(_event._mousewheel,
		function(c) {
			c.preventDefault();
			if (bookType == BookType.singlePhone_book && !0 != singlePhoneBook.isFlipping) {
				c = c.originalEvent;
				c = Math.max( - 1, Math.min(1, c.wheelDelta || -c.detail));
				getTransform(b.side[0]);
				var d = -0.25;
				0 < c && (d = 0.25);
				singlePhoneBook.zoom(d);
				return ! 1
			}
		});
		this.side.bind(_event._move,
		function(q) {
			q.preventDefault();
			if (bookType == BookType.singlePhone_book && (q = isTouch ? q.originalEvent.touches: [q], !0 != b.isZomming && !0 != singlePhoneBook.isFlipping && !0 != n)) if (f ? b.side.css({
				cursor: "move"
			}) : b.side.css({
				cursor: ""
			}), f) {
				var s = q[0].pageX - c.x + b.translateX,
				r = q[0].pageY - c.y + b.translateY; (new Date).getTime();
				r = Math.max(singlePhoneBook.getHeight() - b.getHeight(), r);
				r = Math.min(r, 0);
				singlePhoneBook.getWidth() + 5 < b.getWidth() ? (s = Math.max(singlePhoneBook.getWidth() - b.getWidth(), s), s = Math.min(s, 0), b.zoomObj(b.side, b.origin, " scale(" + b.toScale + ")", s, r), b.zoomObj(b.tmpImg, b.origin, " scale(" + b.toScale + ")", s, r), m = s, p = r, b.zoomToMove = !0, b.gotoNextPage = !1, b.gotoPrePage = !1) : (b.zoomToMove = !1, singlePhoneBook.translateMove(q[0].pageX - c.x, r), c.x - q[0].pageX > windowWidth / 4 ? (b.gotoNextPage = !0, b.gotoPrePage = !1) : c.x - q[0].pageX <= -windowWidth / 4 ? (b.gotoNextPage = !1, b.gotoPrePage = !0) : (b.gotoNextPage = !1, b.gotoPrePage = !1));
				m = s;
				p = r;
				k = !1
			} else g && (s = Point(q[0].pageX, q[0].pageY), r = Point(q[1].pageX, q[1].pageY), q = Math.sqrt(Math.pow(c.x - e.x, 2) + Math.pow(c.y - e.y, 2)), s = Math.sqrt(Math.pow(s.x - r.x, 2) + Math.pow(s.y - r.y, 2)), scale = Math.max(s / q * l, 0.5), q = b.side.width() * scale, 1 > scale && q < singlePhoneBook.minZoomWidth && (scale = singlePhoneBook.minZoomWidth / b.side.width()), 1 < scale && q > singlePhoneBook.largeZoomWidth && (scale = singlePhoneBook.largeZoomWidth / b.side.width()), singlePhoneBook.showPage.toScale = scale, s = (d.x - h.x) / l, q = (d.y - h.y) / l, b.side.width(), b.side.height(), s = (l - b.toScale) * b.side.width() * (s / b.side.width()), q = (l - b.toScale) * b.side.height() * (q / b.side.height()), s = b.translateX + s, r = b.translateY + q, singlePhoneBook.toScale = scale, singlePhoneBook.containtWidth = Math.min(singlePhoneBook.width * scale, singlePhoneBook.stageWidth), singlePhoneBook.containtHeight = Math.min(singlePhoneBook.height * scale, singlePhoneBook.stageHeight), r = Math.max(singlePhoneBook.getHeight() - b.side.height() * scale, r), r = Math.min(r, 0), s = Math.max(singlePhoneBook.getWidth() - b.side.width() * scale, s), s = Math.min(s, 0), singlePhoneBook.showPage.zoomObj(singlePhoneBook.showPage.side, singlePhoneBook.showPage.origin, " scale(" + b.toScale + ")", s, r), singlePhoneBook.showPage.zoomObj(singlePhoneBook.showPage.tmpImg, singlePhoneBook.showPage.origin, " scale(" + b.toScale + ")", s, r), singlePhoneBook.book.css({
				width: singlePhoneBook.containtWidth + "px",
				height: singlePhoneBook.containtHeight + "px",
				left: (singlePhoneBook.stageWidth - singlePhoneBook.containtWidth) / 2 + "px",
				top: (singlePhoneBook.stageHeight - singlePhoneBook.containtHeight) / 2 + "px"
			}), k = !0)
		});
		this.side.bind(_event._end,
		function(c) {
			c.preventDefault();
			if (bookType == BookType.singlePhone_book && !0 != b.isZomming && !0 != singlePhoneBook.isFlipping && !0 != n) {
				b.side.css({
					cursor: ""
				});
				b.translateX = m;
				c = p;
				c = Math.max(singlePhoneBook.getHeight() - b.getHeight(), c);
				c = Math.min(c, 0);
				b.translateY = c;
				try { ! 0 == b.gotoNextPage ? singlePhoneBook.gotoPage(parseInt(singlePhoneBook.currentIndex) + 1) : !0 == b.gotoPrePage ? singlePhoneBook.gotoPage(parseInt(singlePhoneBook.currentIndex) - 1) : !1 == b.zoomToMove && !1 == k && singlePhoneBook.translateToOrigin(b.translateY),
					b.gotoNextPage = !1,
					b.gotoPrePage = !1,
					n = !0
				} catch(d) {}
				k = g = f = !1
			}
		});
		this.side.bind(_event._leave,
		function(c) {
			if (bookType == BookType.singlePhone_book && !0 != b.isZomming && !0 != singlePhoneBook.isFlipping && !0 != n) try { ! 0 == b.gotoNextPage ? singlePhoneBook.gotoPage(parseInt(singlePhoneBook.currentIndex) + 1) : !0 == b.gotoPrePage ? singlePhoneBook.gotoPage(parseInt(singlePhoneBook.currentIndex) - 1) : !1 == b.zoomToMove && !1 == k && singlePhoneBook.translateToOrigin(b.translateY),
				b.gotoNextPage = !1,
				b.gotoPrePage = !1,
				n = !0
			} catch(d) {}
		});
		this.side.hammer().on("doubletap",
		function(b) {})
	},
	highlightSearch: function(b) {
		highlightSearchFun(this.searchHighlight, b)
	},
	clearHighlight: function() {
		clearHighlightFun(this.searchHighlight)
	}
}).extend(BookSide);
bdor[17] = "p";
function shareButton(b, c) {
	this.config = $.extend({
		iconURL: "",
		caption: "",
		link: ""
	},
	c);
	this.bg = $("<div></div>");
	this.icon = $("<img />");
	this.caption = new label(this.config.caption, this.bg);
	this.width = 200;
	this.height = 40;
	this.bg.css({
		position: "absolute",
		width: this.width + "px",
		height: this.height + "px",
		"-webkit-border-radius": "6px",
		"-moz-border-radius": "6px",
		"-o-border-radius": "6px",
		"-ms-border-radius": "6px",
		"border-radius": "6px",
		"background-color": "#666666"
	});
	this.icon.attr({
		src: this.config.iconURL
	});
	this.icon.css({
		position: "absolute",
		left: "5px",
		top: "-7px"
	});
	b.append(this.bg);
	this.bg.append(this.icon);
	this.caption.setLabelPosition(40, 10);
	this.initEvent()
}
shareButton.prototype.onResize = function(b, c) {
	this.bg.css({
		width: b + "px",
		height: c + "px"
	})
};
shareButton.prototype.initEvent = function() {
	this.bg.css({
		cursor: "pointer"
	});
	var b = this;
	this.bg.bind(_event._down,
	function(c) {
		window.open(b.config.link, "_blank")
	})
};
shareButton.prototype.setPosition = function(b, c) {
	this.bg.css({
		left: b + "px",
		top: c + "px"
	})
};
function shareForm(b, c) {
	form.call(this, b, c);
	this.visible = !1;
	this.addItem();
	this.setButtonPos();
	this.background.css({
		left: -windowWidth / 2 - 20 + "px",
		overflow: "hidden"
	})
}
$.extend(shareForm.prototype, form.prototype);
shareForm.prototype.addItem = function() {
	var b = window.location.href,
	c = window.document.title,
	d = window.location.pathname,
	d = d.substring(0, d.lastIndexOf("/")) + "/files/thumb/1.jpg",
	b = "?&url=" + b + "&title=" + c + "&description=" + bookDescription + "&screenshot=" + d,
	c = {
		iconURL: uiBaseURL + "facebook.png",
		caption: "Facebook",
		link: "http://api.addthis.com/oexchange/0.8/forward/facebook/offer" + b
	},
	d = {
		iconURL: uiBaseURL + "google.png",
		caption: "Google+",
		link: "http://api.addthis.com/oexchange/0.8/forward/igoogle/offer" + b
	},
	e = {
		iconURL: uiBaseURL + "myspace.png",
		caption: "MySpace",
		link: "http://api.addthis.com/oexchange/0.8/forward/myspace/offer" + b
	},
	f = {
		iconURL: uiBaseURL + "twitter.png",
		caption: "Twitter",
		link: "http://api.addthis.com/oexchange/0.8/forward/twitter/offer" + b
	},
	g = {
		iconURL: uiBaseURL + "digg.png",
		caption: "Digg",
		link: "http://api.addthis.com/oexchange/0.8/forward/digg/offer" + b
	},
	h = {
		iconURL: uiBaseURL + "more.png",
		caption: "More",
		link: "http://api.addthis.com/oexchange/0.8/offer" + b
	};
	this.emailButton = new shareButton(this.contentBox, {
		iconURL: uiBaseURL + "email.png",
		caption: "Email",
		link: "http://api.addthis.com/oexchange/0.8/forward/email/offer" + b
	});
	this.fbButton = new shareButton(this.contentBox, c);
	this.ggButton = new shareButton(this.contentBox, d);
	this.msButton = new shareButton(this.contentBox, e);
	this.twButton = new shareButton(this.contentBox, f);
	this.diggButton = new shareButton(this.contentBox, g);
	this.moreButton = new shareButton(this.contentBox, h)
};
shareForm.prototype.onResize = function(b, c) {
	this.width = 100 > b ? 100 : b;
	this.height = 100 > c ? 100 : c;
	this.background.css({
		width: this.width + "px",
		height: this.height + "px",
		left: this.visible ? "0px": -this.width - 20 + "px"
	});
	this.titleBox.css({
		width: this.width + "px"
	});
	this.contentBox.css({
		width: this.width + "px",
		height: this.height - this.titleBox.height() + "px"
	});
	this.emailButton.onResize(this.width / 2 - 20, 40);
	this.fbButton.onResize(this.width / 2 - 20, 40);
	this.ggButton.onResize(this.width / 2 - 20, 40);
	this.msButton.onResize(this.width / 2 - 20, 40);
	this.twButton.onResize(this.width / 2 - 20, 40);
	this.diggButton.onResize(this.width / 2 - 20, 40);
	this.moreButton.onResize(this.width / 2 - 20, 40);
	this.setButtonPos()
};
shareForm.prototype.setButtonPos = function() {
	this.emailButton.setPosition(5, 10);
	this.fbButton.setPosition(this.width / 2, 10);
	this.ggButton.setPosition(5, 68);
	this.msButton.setPosition(this.width / 2, 68);
	this.twButton.setPosition(5, 126);
	this.diggButton.setPosition(this.width / 2, 126);
	this.moreButton.setPosition(5, 184)
};
shareForm.prototype.show = function() {
	var b = this;
	this.background.animate({
		left: 0
	},
	400,
	function() {
		b.visible = !0;
		window.setTimeout(function() {
			b.background.css({
				left: "0px"
			})
		},
		100)
	})
};
shareForm.prototype.hide = function() {
	var b = this;
	this.background.animate({
		left: -(this.width + 20)
	},
	400,
	function() {
		b.visible = !1;
		window.setTimeout(function() {
			b.background.css({
				left: -(this.width + 20) + "px"
			})
		},
		100)
	})
};
shareForm.prototype.closeForm = function() {
	this.hide()
};
thumbnailCell = Class({
	create: function(b) {
		this.background = $("<div></div>");
		this.img = $("<img />");
		this.pageIndex = -1;
		this.width = (Math.min(windowWidth, windowHeight) - 30) / 4;
		this.height = this.width * bookConfig.largePageHeight / bookConfig.largePageWidth + 15;
		this.pageTextField = new label(1, this.background);
		this.imgHeight = this.imgWidth = -1;
		$(b).append(this.background);
		$(this.background).css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px"
		});
		$(this.background).css({
			"text-shadow": "0 0 10px #8c97cb, 0 0 20px #8c97cb,0 0 30px #8c97cb, 0 0 40px #8c97cb,0 0 50px #8c97cb, 0 0 60px #8c97cb"
		});
		$(this.img).css({
			position: "absolute"
		});
		this.pageTextField.setFont("5px", "#f0f0f0", null);
		this.pageTextField.setLabelPosition((this.width - this.pageTextField.getWidth()) / 2, 0, ["left", "bottom"]);
		$(this.img).css({
			"-webkit-box-shadow": "0 0 5px rgba(0, 0, 0, 1)",
			"-moz-box-shadow": "0 0 5px rgba(0, 0, 0, 1)",
			"-o-box-shadow": "0 0 5px rgba(0, 0, 0, 1)",
			"box-shadow": "0 0 5px rgba(0, 0, 0, 1)"
		})
	},
	getPageIndex: function() {
		return this.pageIndex
	},
	getWidth: function() {
		return this.width
	},
	getHeight: function() {
		return this.height
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px")
	},
	onResize: function(b, c) {
		$(this.background).css({
			width: b + "px",
			height: c + "px"
		});
		this.onResizeImage(b, c)
	},
	onResizeImage: function() {
		var b = this.height - 15;
		this.imgWidth = this.width;
		this.imgHeight = b;
		$(this.img).css({
			width: this.imgWidth + "px",
			height: this.imgHeight + "px"
		});
		$(this.img).css({
			top: "0px"
		})
	},
	setImgPosition: function(b) {
		switch (b) {
		case "l":
			$(this.img).css({
				left:
				rightToLeft ? "auto": "0px",
				right: rightToLeft ? "0px": "auto"
			});
			break;
		case "r":
			$(this.img).css({
				right:
				rightToLeft ? "auto": "0px",
				left: rightToLeft ? "0px": "auto"
			});
			break;
		case "c":
			$(this.img).css({
				left:
				rightToLeft ? "auto": (this.width - this.imgWidth) / 2 + "px",
				right: rightToLeft ? (this.width - this.imgWidth) / 2 + "px": "auto"
			})
		}
	},
	setCaption: function(b) {
		this.pageTextField.setCaption(b)
	},
	fillImage: function(b) {
		this.pageIndex = b;
		$(this.img).attr("src", getPageDir(b, "thumb", originTotalPageCount));
		$(this.background).append(this.img);
		this.onResizeImage(this.width, this.height);
		this.pageTextField.setCaption(b)
	},
	showBorder: function() {
		$(this.background).css({
			border: "1px solid #444444"
		})
	},
	hideBorder: function() {
		$(this.background)[0].style.border = ""
	},
	getTextField: function() {
		return this.pageTextField
	},
	hideTextField: function() {
		this.pageTextField.setCSS({
			display: "none"
		})
	},
	showTextField: function() {
		this.pageTextField.setCSS({
			display: "block"
		})
	},
	showCell: function(b) {
		$(this.background).css({
			display: b ? "block": "none"
		})
	},
	onMouseUp: function(b, c) {
		var d = this;
		$(this.background).bind(_event._end,
		function(b) {
			thumbnail && !thumbnail.isDrag && (b = d.getPageIndex(), gotoPageFun(b), thumbnail && thumbnail.hideBox())
		});
		$(this.background).bind(_event._enter,
		function(b) {
			d.background.css({
				cursor: "pointer"
			})
		})
	},
	highLight: function(b) {
		$(this.background).css({
			border: "2px solid #ff8040"
		})
	},
	onMouseOver: function() {
		if (!isTouch) {
			var b = this;
			$(this.background).css({
				border: ""
			});
			$(this.background).bind(_event._enter,
			function(c) {
				b.background.css({
					border: "2px solid #0080ff"
				})
			});
			$(this.background).bind(_event._leave,
			function(c) {
				b.background.css({
					border: ""
				})
			})
		}
	},
	clearMouseOver: function() {
		var b = this;
		$(this.background).bind(_event._enter,
		function(c) {
			b.background.css({
				border: ""
			})
		});
		$(this.background).bind(_event._leave,
		function(c) {
			b.background.css({
				border: ""
			})
		})
	},
	onMouseOverUp: function() {
		if (!isTouch) {
			var b = this;
			$(this.background).bind(_event._enter,
			function(c) {
				b.background.css({
					border: "2px solid #0080ff"
				})
			});
			$(this.background).bind(_event._leave,
			function(c) {
				b.background.css({
					border: "2px solid #ff8040"
				})
			})
		}
	},
	clearHighLight: function() {
		$(this.background).css({
			border: ""
		})
	}
});
isThumbDrag = !1;
thumbnailBar = Class({
	create: function(b) {
		this.width = windowWidth;
		this.height = windowHeight;
		this.contentHeight = windowHeight - 80;
		this.contentWidth = Math.min(windowWidth, windowHeight);
		this.mainColor = "#888888";
		this.thumbArray = [];
		this.isDrag = this.mergeing = this.showing = !1;
		this.pageIndex = this.currentCellIndex = 1;
		this.createThumbItemFalg = !1;
		this.oldMode = this.currentMedo = 0;
		this.background = $("<div id='background' class='phoneThumbBar'></div>");
		this.contentBox = $("<div id='contentBox' class='phoneThumbBG'></div>");
		this.scrollBox = $("<div id='scrollBox' class='phoneThumbBox'></div>");
		$(b).append(this.background);
		$(b).append(this.contentBox);
		$(this.contentBox).append(this.scrollBox);
		this.initStyle();
		this.background.css({
			display: "none"
		});
		this.contentBox.css({
			display: "none"
		});
		this.initScrollEvent();
		this.createThumbItemFalg && this.currentMedo != this.oldMode && 1 === this.currentMedo && this.repositionSingle();
		this.createThumbItemFalg && this.currentMedo != this.oldMode && 2 === this.currentMedo && this.repositionDouble();
		this.createThumbItemFalg || (this.createThumbItemFalg = !0, this.addItem(), this.fillNearByImages(), 1 === this.currentMedo ? this.repositionSingle() : this.repositionDouble(), this.setHighLight(this.getPageIndex()));
		this.oldMode = this.currentMedo
	},
	initStyle: function() {
		this.background.css({
			height: this.height + "px",
			bottom: "0px"
		});
		$(this.background).css({
			background: bookConfig.thumbnailColor
		});
		$(this.background).css({
			opacity: bookConfig.thumbnailAlpha / 100
		});
		this.contentBox.css({
			height: this.contentHeight + "px",
			width: this.contentWidth + "px",
			left: (this.width - this.contentWidth) / 2 + "px"
		});
		this.contentBox.css({
			top: "40px",
			bottom: "40px",
			overflow: "hidden"
		});
		this.scrollBox.css({
			width: this.contentWidth - 20 + "px"
		});
		$(this.scrollBox).css({
			left: (this.contentBox.width() - this.scrollBox.width()) / 2 + "px",
			top: "10px"
		})
	},
	getPageIndex: function() {
		return this.pageIndex
	},
	setPageIndex: function(b) {
		this.pageIndex = b
	},
	onResize: function() {
		this.contentHeight = windowHeight - 80;
		this.background.css({
			width: windowWidth + "px",
			height: windowHeight + "px"
		});
		this.contentBox.css({
			height: this.contentHeight + "px"
		});
		this.contentBox.css({
			left: (windowWidth - this.contentWidth) / 2 + "px"
		})
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px")
	},
	addItem: function() {
		for (var b = 0; b <= originTotalPageCount;) {
			var c = 0 == b ? new thumbnailItem(this.scrollBox, 1) : new thumbnailItem(this.scrollBox, b),
			d = this.thumbArray.length % 2 * (c.getWidth() + 10),
			e = parseInt(Math.floor(this.thumbArray.length / 2)) * (c.getHeight() + 5);
			c.setPosition(d, e);
			this.thumbArray.push(c);
			b += 2
		}
		b = parseInt(Math.floor(this.thumbArray.length / 2));
		0 != this.thumbArray.length % 2 && (b += 1);
		$(this.scrollBox).css({
			height: b * (c.getHeight() + 5) + 10 + "px"
		})
	},
	resetItemPosition: function() {
		for (var b = 0,
		c = 0,
		d = 0; d < this.thumbArray.length; d++) {
			var e = this.thumbArray[d];
			0 == d ? (b = rightToLeft ? this.contentWidth - 20 - e.getWidth() : 0, c = 0) : (b = rightToLeft ? (2 - d % 2 - 1) * (e.getWidth() + 10) : d % 2 * (e.getWidth() + 10), c = parseInt(Math.floor(d / 2)) * (e.getHeight() + 5));
			e.setPosition(b, c)
		}
		b = parseInt(Math.floor(this.thumbArray.length / 2));
		0 != this.thumbArray.length % 2 && (b += 1);
		$(this.scrollBox).css({
			height: b * (e.getHeight() + 5) + 10 + "px"
		})
	},
	mergeAll: function() {
		this.currentMedo = 2;
		this.showing && this.createThumbItemFalg && this.currentMedo != this.oldMode && (this.repositionDouble(), this.oldMode = 2);
		this.mergeing = !0
	},
	fissionAll: function() {
		this.currentMedo = 1;
		this.showing && this.createThumbItemFalg && this.currentMedo != this.oldMode && (this.repositionSingle(), this.oldMode = 1);
		this.mergeing = !1
	},
	repositionDouble: function() {
		for (var b = 0; b < this.thumbArray.length; b++) this.thumbArray[b].merge();
		this.resetItemPosition();
		this.clearHighLight(this.getPageIndex());
		this.setHighLight(this.getPageIndex())
	},
	repositionSingle: function() {
		for (var b = 0; b < this.thumbArray.length; b++) this.thumbArray[b].fission();
		this.resetItemPosition();
		this.clearHighLight(this.getPageIndex());
		this.setHighLight(this.getPageIndex())
	},
	getShowStatu: function() {
		return this.showing
	},
	setShowStatu: function(b) {
		this.showing = b
	},
	showshow: function() {
		$(this.background).show(); (function() {
			$(this.contentBox).show()
		}).delay(this, 10);
		this.showing = !0;
		void 0 != leftRightButton && null != leftRightButton && leftRightButton.setShow(!1);
		this.fillNearByImages()
	},
	hideBox: function() {
		$(this.background).fadeOut(500);
		$(this.contentBox).fadeOut(500);
		this.showing = !1;
		hideLeftRightButton() && leftRightButton.setShow(!0)
	},
	showOrHide: function() { ! 0 === this.showing ? this.hideBox() : this.showshow()
	},
	setHighLight: function(b) {},
	clearHighLight: function(b) {
		if (this.createThumbItemFalg) for (var c = 0; c < this.thumbArray.length; c++) c != b && this.thumbArray[c].clearHighLight()
	},
	tweener: function(b, c, d) {
		var e = function(b, c) {
			for (var d = c / 2,
			e = (b - b / 4) / d, f = Array(c), g = 0; g < c; g++) f[g] = g < d ? b - (d - g) * e: b + (g - d + 1) * e;
			return f.reverse()
		} (c, d),
		f = b,
		g = 0,
		h = this,
		k = window.setInterval(function() {
			f += e[g];
			g++;
			g == d && (f = b + c * d);
			0 < f && (f = 0);
			f < $(h.contentBox).height() - $(h.scrollBox).height() && (f = $(h.contentBox).height() - $(h.scrollBox).height());
			$(h.scrollBox).css({
				top: f + 10 + "px"
			});
			g >= d && (window.clearInterval(k), h.fillNearByImages(f))
		},
		30)
	},
	fillNearByImages: function(b) {
		if (this.createThumbItemFalg && this.showing) {
			this.scrollBox.outerWidth();
			this.scrollBox.outerHeight();
			this.contentBox.outerWidth();
			var c = this.contentBox.outerHeight();
			b = Math.abs(getPoint(this.scrollBox).y);
			b = Math.max(0, b);
			var d = (Math.min(windowWidth, windowHeight) - 20) / 2 * bookConfig.largePageHeight / (2 * bookConfig.largePageWidth) + 15;
			b = parseInt(2 * Math.ceil(b / (d + 10)));
			c = 2 * Math.ceil(c / d);
			for (d = b; d < b + c && !(0 > d || d >= this.thumbArray.length); d++) this.thumbArray[d] && this.thumbArray[d].addImage()
		}
	},
	initScrollEvent: function() {
		var b = function() {
			this.fillNearByImages()
		}.bind(this);
		ScrollFunction(this.contentBox, this.scrollBox, this, b)
	}
});
thumbnailItem = Class({
	create: function(b, c) {
		this.background = $("<div></div>");
		this.itemB = new thumbnailCell(this.background);
		this.itemA = new thumbnailCell(this.background);
		this.width = (Math.min(windowWidth, windowHeight) - 20) / 2;
		this.height = this.width * bookConfig.largePageHeight / (2 * bookConfig.largePageWidth) + 15;
		this.isMerge = this.isDoublePage = !0;
		this.pageIndex = c;
		this.fillImage = !1;
		this.mainColor = "";
		var d = c + 1;
		this.textField = new label(rightToLeft ? d + "-" + c: c + "-" + d, this.background);
		this.textField.setLabelPosition((this.width - this.textField.getWidth()) / 2, 0, ["left", "bottom"]);
		this.textField.setFont("5px", "#f0f0f0", null);
		$(this.background).css({
			"text-shadow": "0 0 10px #8c97cb, 0 0 20px #8c97cb,0 0 30px #8c97cb, 0 0 40px #8c97cb,0 0 50px #8c97cb, 0 0 60px #8c97cb"
		});
		$(b).append(this.background);
		$(this.background).css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px"
		});
		$(this.background).css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-moz-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-o-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)"
		});
		1 != c && c != totalPageCount ? (this.itemA.setPosition(0, 0, rightToLeft ? ["right", "top"] : ["left", "top"]), this.itemB.setPosition(0, 0, rightToLeft ? ["left", "top"] : ["right", "top"]), this.itemB.onMouseUp()) : (1 == c ? this.itemA.setPosition(rightToLeft ? 0 : this.width / 2, 0) : this.itemA.setPosition(rightToLeft ? this.width / 2 : 0, 0), this.itemB.showCell(!1), this.textField.setCSS({
			display: "none"
		}), this.setBorder(!1));
		this.itemA.onMouseUp()
	},
	getWidth: function() {
		return this.width
	},
	getHeight: function() {
		return this.height
	},
	addImage: function() {
		this.fillImage || (this.itemA.fillImage(this.pageIndex), 1 != this.pageIndex && this.pageIndex != totalPageCount && this.itemB.fillImage(this.pageIndex + 1), this.fillImage = !0)
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px")
	},
	onResize: function(b, c) {
		this.width = b;
		this.height = c;
		$(this.background).css({
			width: b + "px",
			height: c + "px"
		})
	},
	resetItem: function() {},
	fission: function() {
		1 == this.pageIndex || this.pageIndex == totalPageCount ? this.itemA.setImgPosition("c") : (this.setBorder(!1), this.itemA.setImgPosition("c"), this.itemB.setImgPosition("c"), this.showTextField(!1), this.isMerge = !1, this.onResize(this.width, this.height))
	},
	merge: function() {
		1 == this.pageIndex ? this.itemA.setImgPosition("l") : this.pageIndex == totalPageCount ? this.itemA.setImgPosition("r") : (this.setBorder(!1), this.itemA.setImgPosition("r"), this.itemB.setImgPosition("l"), this.showTextField(!0), this.isMerge = !0, this.onResize(this.width, this.height))
	},
	showBorder: function() {
		$(this.background).css({
			border: "1px solid #444444"
		})
	},
	hideBorder: function() {
		$(this.background)[0].style.border = ""
	},
	showTextField: function(b) {
		var c = b ? "none": "block";
		this.textField.setCSS({
			display: b ? "block": "none"
		});
		this.itemA.getTextField().setCSS({
			display: c
		});
		this.itemB.getTextField().setCSS({
			display: c
		})
	},
	setBorder: function(b) {
		b ? $(this.background).css({
			border: "1px solid #444444"
		}) : $(this.background)[0].style.border = "";
		this.itemA.hideBorder();
		this.itemB.hideBorder()
	},
	highLight: function(b) {
		this.isMerge ? 1 == b || b == totalPageCount ? (this.itemA.highLight("#ffffff"), this.itemA.onMouseOverUp()) : ($(this.background).css({
			border: "2px solid #ff8040"
		}), this.onMouseOverUp()) : b == this.pageIndex ? (this.itemA.highLight("#ffffff"), this.itemA.onMouseOverUp()) : (this.itemB.highLight("#ffffff"), this.itemB.onMouseOverUp())
	},
	onMouseOver: function() {
		if (!isTouch) {
			var b = this;
			$(this.background).css({
				border: ""
			});
			$(this.background).bind(_event._enter,
			function(c) {
				b.background.css({
					border: "2px solid #0080ff"
				})
			});
			$(this.background).bind(_event._leave,
			function(c) {
				b.background.css({
					border: ""
				})
			})
		}
	},
	onMouseOverUp: function() {
		if (!isTouch) {
			var b = this;
			$(this.background).bind(_event._enter,
			function(c) {
				b.background.css({
					border: "2px solid #0080ff"
				})
			});
			$(this.background).bind(_event._leave,
			function(c) {
				b.background.css({
					border: "2px solid #ff8040"
				})
			})
		}
	},
	clearMouseOver: function() {
		var b = this;
		$(this.background).bind(_event._enter,
		function(c) {
			b.background.css({
				border: ""
			})
		});
		$(this.background).bind(_event._leave,
		function(c) {
			b.background.css({
				border: ""
			})
		})
	},
	clearHighLight: function() {
		this.isMerge ? 1 == this.pageIndex || this.pageIndex == totalPageCount ? (this.itemA.onMouseOver(), this.itemB.onMouseOver()) : (this.onMouseOver(), this.itemA.clearMouseOver(), this.itemB.clearMouseOver()) : (this.itemA.onMouseOver(), this.itemB.onMouseOver(), this.clearMouseOver());
		this.itemA.clearHighLight();
		this.itemB.clearHighLight()
	}
});
loadToolBar = Class({
	create: function(b, c) {
		this.visible = !1;
		this.icons = c;
		this.topBG = $("<div class='pbTopBar' id='pbTopBar' style='font-family:Arial,sans-serif;'></div>");
		this.toolBG = $("<div class='pbToolBar' id='pbToolBar' style='font-family:Arial,sans-serif;'></div>");
		this.btnThumb = $("<div title='Thumbnails'  id='btnThumb' class='phoneMoreButton'></div>");
		this.btnMore = $("<div title='More'  id='btnMore' class='phoneMoreButton' ></div>");
		this.btnPre = $("<div title='Previous Page' id='btnPre' class='phonebutton' ></div>");
		this.btnNext = $("<div title='Next Page' id='btnNext' class='phonebutton' ></div>");
		this.btnGotoPage = $("<div title='Go To Page' id='btnGotoPage' class='phonebutton' ></div>");
		this.btnZoom = $("<div title='Zoom'  id='btnZoom'  class='phonebutton'></div>");
		this.btnAutoPlay = $("<div title='Auto play' id='btnAutoPlay' class='phonebutton'></div>");
		this.mainColor = bookConfig.toolbarColor;
		this.logo = $("<img src='" + bookConfig.appLogoIcon + "' style='cursor:pointer;position:absolute;'/>");
		b.append(this.topBG);
		b.append(this.toolBG);
		this.topBG.append(this.logo);
		this.topBG.append(this.btnThumb);
		this.topBG.append(this.btnMore);
		this.toolBG.append(this.btnPre);
		this.toolBG.append(this.btnNext);
		this.toolBG.append(this.btnGotoPage);
		isPhoneBook() || this.toolBG.append(this.btnZoom);
		this.toolBG.append(this.btnAutoPlay);
		this.initToolBar();
		thumbButtonEnable ? thumbnail = isCatalogBook() && "lite" == bookConfig.ToolbarViewMode.toLowerCase() ? new CatalogThumbnailBar(tmpContainer) : isSlideBook() && "lite" == bookConfig.ToolbarViewMode.toLowerCase() ? new SlideThumbnailBar(tmpContainer) : new thumbnailBar(tmpContainer) : this.btnThumb.hide();
		userConfig.autoPlayButtonVisible || this.btnAutoPlay.hide();
		global.phoneGotoPagePanel = new phoneGotoPage(tmpContainer);
		this.initEvent();
		this.visible = !1;
		this.initFoldingMenu()
	},
	initToolBar: function() {
		this.btnMore.addCssSprite(phoneIconsURL[0], "more", 25, 25, phoneIconInfo);
		this.btnThumb.addCssSprite(phoneIconsURL[0], "thumb", 25, 25, phoneIconInfo);
		this.btnPre.addCssSprite(phoneIconsURL[0], "prev", 25, 25, phoneIconInfo);
		this.btnNext.addCssSprite(phoneIconsURL[0], "next", 25, 25, phoneIconInfo);
		this.btnGotoPage.addCssSprite(phoneIconsURL[0], "gotoPage", 25, 25, phoneIconInfo);
		this.btnZoom.addCssSprite(phoneIconsURL[0], "zoomIn", 25, 25, phoneIconInfo);
		this.btnAutoPlay.addCssSprite(phoneIconsURL[0], "autoPlay", 25, 25, phoneIconInfo);
		this.btnMore.attr("title", getLanguage("btnMoreOptionsLeft", "More"));
		this.btnThumb.attr("title", getLanguage("btnThumb", "Thumb"));
		this.btnPre.attr("title", getLanguage("btnPrePage", "pre"));
		this.btnNext.attr("title", getLanguage("btnNextPage", "next"));
		this.btnGotoPage.attr("title", getLanguage("btnGotoPage", "Go To Page"));
		this.btnZoom.attr("title", getLanguage("btnZoomIn", "zoom in"));
		this.btnAutoPlay.attr("title", getLanguage("btnAutoFlip", "Auto flip"));
		$(this.toolBG).css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-moz-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-o-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)"
		});
		$(this.topBG).css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-moz-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-o-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)"
		});
		this.barWidth = windowWidth;
		this.barHeight = 40;
		this.toolBG.css({
			width: this.barWidth + "px",
			height: this.barHeight + "px"
		});
		this.topBG.css({
			width: this.barWidth + "px",
			height: this.barHeight + "px",
			color: "#ffffff",
			"line-height": this.barHeight + "px"
		});
		var b = colorDiv(this.mainColor, 30),
		c = colorAdd(this.mainColor, 30);
		this.topBG.css("background", this.mainColor);
		this.toolBG.css("background", this.mainColor);
		this.topBG.css("border-bottom", "1px solid " + b);
		this.toolBG.css("border-top", "1px solid " + c);
		var d = getLogoLink();
		$(this.logo).click(function() {
			3 == browserType ? window.location = d[0] : window.open(d[0], d[1])
		})
	},
	initFoldingMenu: function() {
		searchButtonEnable || bookmarkButtonEnable || shareButtonEnable || userConfig.downloadButtonVisible || userConfig.printButtonVisible || userConfig.homeButtonVisible || this.btnMore.hide();
		var b = function() {
			"" != userConfig.downloadURL && window.open(userConfig.downloadURL, "_blank")
		},
		c = function() {
			window.open(bookConfig.HomeURL, bookConfig.OpenWindow)
		};
		global.foldingMenu = new FoldingMenu($("#tmpContainer"));
		userConfig.homeButtonVisible && foldingMenu.addMenuItem("miHome", getLanguage("btnHome", "Home"), "miHome", !0, c);
		searchButtonEnable && foldingMenu.addMenuItem("miSearch", getLanguage("btnSearch", "Search"), "miSearch");
		bookmarkButtonEnable && foldingMenu.addMenuItem("miBookmark", getLanguage("btnBookMark", "Table of Content"), "tableofcontent");
		shareButtonEnable && foldingMenu.addMenuItem("miShare", getLanguage("btnSocialShare", "Share"), "miShare");
		userConfig.downloadButtonVisible && foldingMenu.addMenuItem("miDownload", getLanguage("btnDownload", "Download"), "download", !0, b);
		userConfig.printButtonVisible && foldingMenu.addMenuItem("miPrint", getLanguage("btnPrint", "Print"), "print");
		language && 1 < language.length && foldingMenu.addMenuItem("miLanguage", getLanguage("btnLanguage", "Language change"), "languageChange"); (userConfig.bgSoundButtonVisible || bookConfig.FlipSound) && foldingMenu.addMenuItem("miSetting", getLanguage("btnSettings", "Settings"), "setting");
		searchButtonEnable && (global.phoneSearch = new phoneSearchForm({
			caption: getLanguage("frmSearch", "Search"),
			closeIconURL: uiBaseURL + "close.png",
			mainColor: bookConfig.searchBackground,
			fontColor: bookConfig.searchFontColor
		},
		foldingMenu.getItemBody("miSearch")));
		bookmarkButtonEnable && (global.phoneBookmark = new phoneTableContent({
			caption: getLanguage("frmBookMark", "Table of Content"),
			closeIconURL: uiBaseURL + "close.png",
			mainColor: bookConfig.bookmarkBackground,
			fontColor: bookConfig.bookmarkFontColor
		},
		foldingMenu.getItemBody("miBookmark")));
		shareButtonEnable && (global.phoneShare = new phoneSharePanel(foldingMenu.getItemBody("miShare")));
		userConfig.printButtonVisible && (global.phonePrintBody = new phonePrintBar(foldingMenu.getItemBody("miPrint")));
		language && 1 < language.length && (global.phoneLanguageBody = new phoneLanguageChange(foldingMenu.getItemBody("miLanguage")));
		if (userConfig.bgSoundButtonVisible || bookConfig.FlipSound) global.phoneSettingBody = new phoneSetting(foldingMenu.getItemBody("miSetting"))
	},
	setButtonPosition: function() {
		this.toolBG.css({
			width: windowWidth + "px"
		});
		this.topBG.css({
			width: windowWidth + "px"
		});
		isPhoneBook() ? this.buttonArray = [this.btnPre, this.btnNext, this.btnGotoPage] : this.buttonArray = [this.btnPre, this.btnNext, this.btnGotoPage, this.btnZoom];
		userConfig.autoPlayButtonVisible && this.buttonArray.push(this.btnAutoPlay);
		this.barWidth = Math.min(windowWidth, 340);
		this.buttonWidth = 40;
		this.buttonTop = (this.barHeight - this.buttonWidth) / 2;
		this.barLeft = (windowWidth - this.barWidth) / 2 + 7;
		autoCenter(this.buttonArray, this.barWidth - 15, this.buttonWidth, this.barLeft);
		this.btnMore.css({
			left: "0px",
			top: this.buttonTop + "px"
		});
		this.btnThumb.css({
			right: "0px",
			top: this.buttonTop + "px"
		});
		this.logo.css({
			left: 65 + parseInt(bookConfig.logoPadding) + "px"
		});
		this.logo.css({
			"max-width": windowWidth - 130 + "px",
			"max-height": "40px"
		});
		this.btnPre.css({
			top: this.buttonTop + "px"
		});
		this.btnNext.css({
			top: this.buttonTop + "px"
		});
		this.btnZoom.css({
			top: this.buttonTop + "px"
		});
		userConfig.autoPlayButtonVisible && this.btnAutoPlay.css({
			top: this.buttonTop + "px"
		})
	},
	changeButtonColor: function(b) {},
	changeZoomIcon: function(b) {},
	changeFullscreenIcon: function(b) {},
	changeAutoPlayIcon: function(b) {
		void 0 != auto_player && null != auto_player && (auto_player.isPlaying() ? (this.btnAutoPlay.children().cssSprite(phoneIconsURL[0], "stopAutoPlay", 25, 25, phoneIconInfo), this.btnAutoPlay.attr("title", getLanguage("btnStopAutoFlip", "Stop auto flip"))) : (this.btnAutoPlay.children().cssSprite(phoneIconsURL[0], "autoPlay", 25, 25, phoneIconInfo), this.btnAutoPlay.attr("title", getLanguage("btnAutoFlip", "Auto flip"))))
	},
	changeSoundIcon: function(b) {},
	show: function() {
		this.visible = !0;
		this.toolBG.animate({
			bottom: 0
		},
		300);
		this.topBG.animate({
			top: 0
		},
		300);
		bookType == BookType.singlePhone_book && singlePhoneBook.setShow(!1);
		bookType == BookType.phone_book && phoneBook.setShow(!1)
	},
	getHeight: function() {
		return this.getTopHeight() + this.getBottomHeight()
	},
	getTopHeight: function() {
		return 40
	},
	getBottomHeight: function() {
		return 40
	},
	getLogoHeight: function() {
		return this.topBG.height()
	},
	hide: function() {
		this.visible = !1;
		this.toolBG.animate({
			bottom: -60
		},
		300);
		this.topBG.animate({
			top: -60
		},
		300);
		global.phoneGotoPagePanel.hide();
		bookType == BookType.singlePhone_book && singlePhoneBook.setShow(!0);
		bookType == BookType.phone_book && phoneBook.setShow(!0)
	},
	showOrHide: function() { ! 0 === this.visible ? this.hide() : this.show()
	},
	changeZoomIcon: function(b) {
		b ? (this.btnZoom.children().cssSprite(phoneIconsURL[0], "zoomIn", 25, 25, phoneIconInfo), this.btnZoom.attr("title", getLanguage("btnZoomIn", "zoom in"))) : (this.btnZoom.children().cssSprite(phoneIconsURL[0], "zoomOut", 25, 25, phoneIconInfo), this.btnZoom.attr("title", getLanguage("btnZoomOut", "zoom out")))
	},
	changeSoundIcon: function(b) {},
	initEvent: function() {
		var b = this;
		this.btnMore.bind(_event._end,
		function() {
			global.foldingMenu && foldingMenu.showOrHide(foldingMenu.width);
			return ! 1
		});
		this.btnThumb.bind(_event._end,
		function() {
			thumbnail.showOrHide();
			return ! 1
		});
		this.btnNext.bind(_event._end,
		function() {
			rightToLeft ? previousPageFun() : nextPageFun();
			return ! 1
		});
		this.btnPre.bind(_event._end,
		function() {
			rightToLeft ? nextPageFun() : previousPageFun();
			return ! 1
		});
		this.btnZoom.bind(_event._end,
		function() {
			2 == bookType ? windowWidth < windowHeight ? (bookType = 1, changeShowBook(1), setCurrentIndexTextField(singlePageBook.currentPageIndex), singlePageBook.gotoPage(zoomBook.currentIndex), thumbnail.clearHighLight(), thumbnail.setHighLight(zoomBook.currentIndex), b.changeZoomIcon(!0)) : zoomBook.showPage.animateFit() : (zoomBook.currentIndex = BookInfo.getBook().currentPageIndex, zoomBook.showPage.fillContent(zoomBook.currentIndex), bookType = 2, changeShowBook(2), setCurrentIndexTextField(zoomBook.currentIndex, !1), thumbnail.clearHighLight(), thumbnail.setHighLight(zoomBook.currentIndex), auto_player.isPlaying() && (auto_player.stop(), b.changeAutoPlayIcon()), b.changeZoomIcon(!1));
			return ! 1
		});
		this.btnAutoPlay.bind(_event._end,
		function() {
			auto_player.isPlaying() ? auto_player.stop() : auto_player.start();
			b.changeAutoPlayIcon();
			return ! 1
		});
		this.btnGotoPage.bind(_event._end,
		function() {
			global.phoneGotoPagePanel.showOrHide()
		})
	},
	lastPage: function() {
		rightToLeft ? firstPageFun() : lastPageFun()
	},
	nextPage: function() {
		rightToLeft ? previousPageFun() : nextPageFun()
	},
	prePage: function() {
		rightToLeft ? nextPageFun() : previousPageFun()
	},
	firstPage: function() {
		rightToLeft ? lastPageFun() : firstPageFun()
	},
	changeLanguage: function() {
		this.btnMore.attr("title", getLanguage("btnMoreOptionsLeft", "More"));
		this.btnThumb.attr("title", getLanguage("btnThumb", "Thumb"));
		this.btnPre.attr("title", getLanguage("btnPrePage", "pre"));
		this.btnNext.attr("title", getLanguage("btnNextPage", "next"));
		this.btnZoom.attr("title", getLanguage("btnZoomIn", "zoom in"));
		this.btnAutoPlay.attr("title", getLanguage("btnAutoFlip", "Auto flip"));
		this.btnGotoPage.attr("title", getLanguage("btnGotoPage", "Go To Page"));
		searchButtonEnable && foldingMenu.getItemById("miSearch").setCaption(getLanguage("btnSearch", "Search"));
		bookmarkButtonEnable && foldingMenu.getItemById("miBookmark").setCaption(getLanguage("btnBookMark", "Table of Content"));
		shareButtonEnable && foldingMenu.getItemById("miShare").setCaption(getLanguage("btnSocialShare", "Share"));
		userConfig.downloadButtonVisible && foldingMenu.getItemById("miDownload").setCaption(getLanguage("btnDownload", "Download"));
		userConfig.printButtonVisible && foldingMenu.getItemById("miPrint").setCaption(getLanguage("btnPrint", "Print"));
		language && 1 < language.length && foldingMenu.getItemById("miLanguage").setCaption(getLanguage("btnLanguage", "Language change"));
		userConfig.printButtonVisible && global.phonePrintBody.changeLanguage(); (userConfig.bgSoundButtonVisible || bookConfig.FlipSound) && global.phoneSettingBody.changeLanguage()
	}
});
function initMoreButton(b, c, d, e) {
	this.name = c;
	this.moreButtonString = "<div class='moreButton' id='" + c + "'></div>";
	this.moreButton = $(this.moreButtonString);
	this.moreImg = $("<div><img src='" + d + "' class='moreImg'/></div>");
	this.moreLable = new label(e, this.moreButton);
	this.moreLable.setLabelPosition(35, 7);
	b.append(this.moreButton);
	$(this.moreButton).append(this.moreImg);
	$(this.moreButton).append(this.moreLable);
	$(this.moreLable).css({
		"vertical-align": "middle"
	});
	$(this.moreButton).css({
		"text-shadow": "1px 1px " + colorDiv(bookConfig.toolbarColor, 40)
	});
	$(this.moreButton).css({
		color: "#ffffff"
	});
	$(this.moreButton).mouseEnterGradient(bookConfig.toolbarColor, colorDiv(bookConfig.toolbarColor, 30), colorAdd(bookConfig.toolbarColor, 105));
	$(this.moreButton).css({
		cursor: "pointer"
	});
	return this
}
initMoreButton.prototype.setPosition = function(b, c) {
	$(this.moreButton).css({
		left: c + "px"
	});
	$(this.moreButton).css({
		top: b + "px"
	})
};
initMoreButton.prototype.changeIcon = function(b) {
	this.moreImg.empty().append("<img src='" + b + "' class='moreImg'/>")
};
initMoreButton.prototype.src = function() {
	return this.moreImg.attr("src")
};
initMoreButton.prototype.bind = function(b, c) {
	$(this.moreButton).bind(b, c)
};
initMoreButton.prototype.hide = function() {
	$(this.moreButton).css({
		display: "none"
	})
};
initMoreButton.prototype.show = function() {
	$(this.moreButton).css({
		display: "block"
	})
};
initMoreButton.prototype.changeButtonColor = function(b) {
	$(this.moreImg).changeButtonColor(b)
};
initMoreButton.prototype.setCaption = function(b) {
	this.moreLable.setCaption(b)
};
var isMoreShow = !1,
moreConfig = {
	autoPlayButtonVisible: !1,
	zoomButtonEnable: !1,
	thumbButtonEnable: !1,
	shareButtonEnable: !1,
	searchButtonEnable: !1,
	bookmarkButtonEnable: !1,
	tableofcontentButtonEnable: !1,
	downloadButtonVisible: !1,
	homeButtonVisible: !1,
	printButtonVisible: !1,
	bgSoundButtonVisible: !1,
	helpButtonVisible: !1,
	aboutButtonVisible: !1,
	languageButtonVisible: !1,
	flipButtonVisible: !1,
	fullscreenButtonVisible: !1,
	AnnotationButtonVisible: !1,
	VideoButtonVisible: !1,
	SlideshowButtonVisible: !1
};
function initMoreBar() {
	var b = this;
	this.moreBar = $("<div style='display:none;opacity:0;'>");
	this.moreBar.css("z-index", 2002);
	this.moreBar.css("bottom", "38px");
	this.moreBar.css("right", "300px");
	this.moreBar.css({
		width: "160px",
		position: "absolute",
		background: bookConfig.toolbarColor,
		"overflow-y": "auto"
	});
	this.moreBar.addBorderShadow(bookConfig.toolbarColor, 3, 3);
	this.btnLast = new initMoreButton(this.moreBar, "moreBtnLast", toolBarIconsURL[1], getLanguage("btnLastPage", "Last"));
	this.btnNext = new initMoreButton(this.moreBar, "moreBtnNext", toolBarIconsURL[2], getLanguage("btnNextPage", "Next"));
	this.btnPrevious = new initMoreButton(this.moreBar, "moreBtnPrevious", toolBarIconsURL[3], getLanguage("btnPrePage", "Previous"));
	this.btnFirst = new initMoreButton(this.moreBar, "moreBtnFirst", toolBarIconsURL[4], getLanguage("btnFirstPage", "First"));
	this.btnZoom = new initMoreButton(this.moreBar, "moreBtnZoom", toolBarIconsURL[5], getLanguage("btnZoomIn", "Zoom In"));
	this.btnAutoPlay = new initMoreButton(this.moreBar, "moreBtnAutoPlay", toolBarIconsURL[7], getLanguage("btnAutoFlip", "Auto Flip"));
	this.btnThumb = new initMoreButton(this.moreBar, "moreBtnThumb", toolBarIconsURL[9], getLanguage("btnThumb", "Thumbnails"));
	this.btnShare = new initMoreButton(this.moreBar, "moreBtnShare", toolBarIconsURL[10], getLanguage("btnSocialShare", "Share"));
	this.btnSearch = new initMoreButton(this.moreBar, "moreBtnSearch", toolBarIconsURL[11], getLanguage("btnSearch", "Search"));
	this.btnBookMark = new initMoreButton(this.moreBar, "moreBtnBookMark", toolBarIconsURL[14], getLanguage("btnBookMark", "Book Mark"));
	this.btnTableOfContent = new initMoreButton(this.moreBar, "moreBtnTableOfContent", toolBarIconsURL[32], getLanguage("btnTableOfContent", "table of content"));
	this.btnDownload = new initMoreButton(this.moreBar, "moreBtnDownload", toolBarIconsURL[12], getLanguage("btnDownload", "Download"));
	this.btnHome = new initMoreButton(this.moreBar, "moreBtnHome", toolBarIconsURL[13], getLanguage("btnGoToHome", "Home"));
	this.btnPrint = new initMoreButton(this.moreBar, "moreBtnPrint", toolBarIconsURL[21], getLanguage("btnPrint", "Print"));
	this.btnSound = new initMoreButton(this.moreBar, "moreBtnSound", toolBarIconsURL[15], getLanguage("btnSoundOn", "soundOn"));
	this.btnHelp = new initMoreButton(this.moreBar, "moreBtnHelp", toolBarIconsURL[22], getLanguage("btnHelp", "Help"));
	this.btnAbout = new initMoreButton(this.moreBar, "moreBtnAbout", toolBarIconsURL[23], getLanguage("btnAbout", "About"));
	this.btnLanguage = new initMoreButton(this.moreBar, "moreBtnLanguage", toolBarIconsURL[25], getLanguage("btnLanguage", "LanguageChange"));
	this.btnFullscreen = new initMoreButton(this.moreBar, "moreBtnFullscreen", toolBarIconsURL[27], getLanguage("btnFullscreen", "fullscreen"));
	this.btnNote = new initMoreButton(this.moreBar, "moreBtnNote", toolBarIconsURL[31], getLanguage("btnNote", "add note"));
	this.btnVideo = new initMoreButton(this.moreBar, "moreBtnVideo", toolBarIconsURL[33], getLanguage("btnVideo", "videoGallery"));
	this.btnSlideShow = new initMoreButton(this.moreBar, "moreBtnSlideShow", toolBarIconsURL[34], getLanguage("btnSlideShow", "photoGallery"));
	$.fn.extend(this, {
		showMoreBar: function() {
			b.moreBar.css("display", "block");
			b.moreBar.animate({
				opacity: 1
			},
			200, "linear")
		},
		hideMoreBar: function() {
			b.moreBar.animate({
				opacity: 0
			},
			200, "linear",
			function() {
				b.moreBar.css("display", "none")
			})
		},
		setMorePosition: function(c, d, e) {
			void 0 == e && (e = ["right", "bottom"]);
			b.moreBar.css(e[0], c + "px");
			b.moreBar.css(e[1], d + "px")
		}
	});
	tmpContainer.append(this.moreBar);
	moreConfig.autoPlayButtonVisible && userConfig.autoPlayButtonVisible || this.btnAutoPlay.hide();
	moreConfig.zoomButtonEnable && zoomButtonEnable && isFlipModel || this.btnZoom.hide();
	moreConfig.thumbButtonEnable && thumbButtonEnable || this.btnThumb.hide();
	moreConfig.shareButtonEnable && shareButtonEnable || this.btnShare.hide();
	moreConfig.searchButtonEnable && searchButtonEnable || this.btnSearch.hide();
	moreConfig.bookmarkButtonEnable && bookmarkButtonEnable || this.btnBookMark.hide();
	moreConfig.tableofcontentButtonEnable && tableofcontentButtonEnable || this.btnTableOfContent.hide();
	moreConfig.downloadButtonVisible && userConfig.downloadButtonVisible || this.btnDownload.hide();
	moreConfig.homeButtonVisible && userConfig.homeButtonVisible || this.btnHome.hide();
	moreConfig.printButtonVisible && userConfig.printButtonVisible || this.btnPrint.hide();
	moreConfig.bgSoundButtonVisible && userConfig.bgSoundButtonVisible || this.btnSound.hide();
	moreConfig.helpButtonVisible && userConfig.helpButtonVisible || this.btnHelp.hide();
	moreConfig.aboutButtonVisible && userConfig.aboutButtonVisible || this.btnAbout.hide(); (!moreConfig.languageButtonVisible || 1 >= language.length) && this.btnLanguage.hide();
	moreConfig.fullscreenButtonVisible && userConfig.fullscreenButtonVisible || this.btnFullscreen.hide();
	moreConfig.AnnotationButtonVisible && userConfig.AnnotationButtonVisible || this.btnNote.hide();
	moreConfig.VideoButtonVisible && userConfig.VideoButtonVisible || this.btnVideo.hide();
	moreConfig.SlideshowButtonVisible && userConfig.SlideshowButtonVisible || this.btnSlideShow.hide();
	moreConfig.flipButtonVisible || (this.btnLast.hide(), this.btnNext.hide(), this.btnPrevious.hide(), this.btnFirst.hide());
	this.initEvent()
}
initMoreBar.prototype.onResize = function(b, c) {
	isMoreShow = !1;
	var d = 0;
	shareButtonTop = function(b) {
		return 8 + 35 * b
	};
	moreConfig.flipButtonVisible ? (this.btnLast.setPosition(shareButtonTop(d), 10), d++, this.btnNext.setPosition(shareButtonTop(d), 10), d++, this.btnPrevious.setPosition(shareButtonTop(d), 10), d++, this.btnFirst.setPosition(shareButtonTop(d), 10), d++, this.btnFirst.show(), this.btnPrevious.show(), this.btnNext.show(), this.btnLast.show()) : (this.btnFirst.hide(), this.btnPrevious.hide(), this.btnNext.hide(), this.btnLast.hide());
	moreConfig.autoPlayButtonVisible && userConfig.autoPlayButtonVisible ? (this.btnAutoPlay.setPosition(shareButtonTop(d), 10), this.btnAutoPlay.show(), d++) : this.btnAutoPlay.hide();
	moreConfig.AnnotationButtonVisible && userConfig.AnnotationButtonVisible ? (this.btnNote.setPosition(shareButtonTop(d), 10), this.btnNote.show(), d++) : this.btnNote.hide();
	moreConfig.VideoButtonVisible && userConfig.VideoButtonVisible ? (this.btnVideo.setPosition(shareButtonTop(d), 10), this.btnVideo.show(), d++) : this.btnVideo.hide();
	moreConfig.SlideshowButtonVisible && userConfig.SlideshowButtonVisible ? (this.btnSlideShow.setPosition(shareButtonTop(d), 10), this.btnSlideShow.show(), d++) : this.btnSlideShow.hide();
	moreConfig.zoomButtonEnable && zoomButtonEnable && isFlipModel ? (this.btnZoom.setPosition(shareButtonTop(d), 10), this.btnZoom.show(), d++) : this.btnZoom.hide();
	moreConfig.thumbButtonEnable && thumbButtonEnable ? (this.btnThumb.setPosition(shareButtonTop(d), 10), this.btnThumb.show(), d++) : this.btnThumb.hide();
	moreConfig.shareButtonEnable && shareButtonEnable ? (this.btnShare.setPosition(shareButtonTop(d), 10), this.btnShare.show(), d++) : this.btnShare.hide();
	moreConfig.searchButtonEnable && searchButtonEnable ? (this.btnSearch.setPosition(shareButtonTop(d), 10), this.btnSearch.show(), d++) : this.btnSearch.hide();
	moreConfig.bookmarkButtonEnable && bookmarkButtonEnable ? (this.btnBookMark.setPosition(shareButtonTop(d), 10), this.btnBookMark.show(), d++) : this.btnBookMark.hide();
	moreConfig.tableofcontentButtonEnable && tableofcontentButtonEnable ? (this.btnTableOfContent.setPosition(shareButtonTop(d), 10), this.btnTableOfContent.show(), d++) : this.btnTableOfContent.hide();
	moreConfig.downloadButtonVisible && userConfig.downloadButtonVisible ? (this.btnDownload.setPosition(shareButtonTop(d), 10), this.btnDownload.show(), d++) : this.btnDownload.hide();
	moreConfig.homeButtonVisible && userConfig.homeButtonVisible ? (this.btnHome.setPosition(shareButtonTop(d), 10), this.btnHome.show(), d++) : this.btnHome.hide();
	moreConfig.printButtonVisible && userConfig.printButtonVisible ? (this.btnPrint.setPosition(shareButtonTop(d), 10), this.btnPrint.show(), d++) : this.btnPrint.hide();
	moreConfig.bgSoundButtonVisible && userConfig.bgSoundButtonVisible ? (this.btnSound.setPosition(shareButtonTop(d), 10), this.btnSound.show(), d++) : this.btnSound.hide();
	moreConfig.helpButtonVisible && userConfig.helpButtonVisible ? (this.btnHelp.setPosition(shareButtonTop(d), 10), this.btnHelp.show(), d++) : this.btnHelp.hide();
	moreConfig.aboutButtonVisible && userConfig.aboutButtonVisible ? (this.btnAbout.setPosition(shareButtonTop(d), 10), this.btnAbout.show(), d++) : this.btnAbout.hide();
	moreConfig.languageButtonVisible && 1 < language.length ? (this.btnLanguage.setPosition(shareButtonTop(d), 10), this.btnLanguage.show(), d++) : this.btnLanguage.hide();
	moreConfig.fullscreenButtonVisible && userConfig.fullscreenButtonVisible ? (this.btnFullscreen.setPosition(shareButtonTop(d), 10), this.btnFullscreen.show(), d++) : this.btnFullscreen.hide();
	0 == d ? (b.css({
		display: "none"
	}), null != c && c.css({
		display: "none"
	}), this.hideMoreBar()) : (b.css({
		display: "block"
	}), null != c && c.css({
		display: "block"
	}), d = Math.min(shareButtonTop(d), 250), this.moreBar.css({
		height: d + "px"
	})); (function() {
		this.changeButtonColor(bookConfig.iconColor)
	}).delay(this, 50)
};
initMoreBar.prototype.changeZoomIcon = function(b) {
	b ? (this.btnZoom.changeIcon(toolBarIconsURL[5]), this.btnZoom.setCaption(getLanguage("btnZoomIn", "Zoom In"))) : (this.btnZoom.changeIcon(toolBarIconsURL[6]), this.btnZoom.setCaption(getLanguage("btnZoomOut", "Zoom Out")));
	this.btnZoom.changeButtonColor(bookConfig.iconColor)
};
initMoreBar.prototype.changeFullscreenIcon = function(b) {
	b ? (this.btnFullscreen.changeIcon(toolBarIconsURL[28]), this.btnFullscreen.setCaption(getLanguage("btnFullscreen", "Exit fullscreen"))) : (this.btnFullscreen.changeIcon(toolBarIconsURL[27]), this.btnFullscreen.setCaption(getLanguage("btnFullscreen", "Enter fullscreen")));
	this.btnFullscreen.changeButtonColor(bookConfig.iconColor)
};
initMoreBar.prototype.changeAutoPlayIcon = function(b) {
	void 0 != auto_player && null != auto_player && (auto_player.isPlaying() ? (this.btnAutoPlay.changeIcon(toolBarIconsURL[7]), this.btnAutoPlay.setCaption(getLanguage("btnAutoFlip", "Auto Flip"))) : (this.btnAutoPlay.changeIcon(toolBarIconsURL[8]), this.btnAutoPlay.setCaption(getLanguage("btnStopAutoFlip", "Stop Auto Flip"))), this.btnAutoPlay.changeButtonColor(bookConfig.iconColor))
};
initMoreBar.prototype.changeSoundIcon = function(b) {
	void 0 != isPlaying && (isPlaying ? (this.btnSound.changeIcon(toolBarIconsURL[16]), this.btnSound.setCaption(getLanguage("btnSoundOff", "soundOff"))) : (this.btnSound.changeIcon(toolBarIconsURL[15]), this.btnSound.setCaption(getLanguage("btnSoundOn", "soundOn"))), this.btnSound.changeButtonColor(bookConfig.iconColor))
};
initMoreBar.prototype.height = function() {
	return this.moreBar.height()
};
initMoreBar.prototype.initEvent = function() {
	var b = this;
	this.btnLast.bind(_event._end,
	function() {
		b.lastPage();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnNext.bind(_event._end,
	function() {
		b.nextPage();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnPrevious.bind(_event._end,
	function() {
		b.prePage();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnFirst.bind(_event._end,
	function() {
		b.firstPage();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnZoom.bind(_event._end,
	function() {
		2 == bookType ? (windowWidth < windowHeight ? (bookType = 1, changeShowBook(1), setCurrentIndexTextField($(singlePageBook).data().currentPageIndex), $(singlePageBook).data().gotoPage(zoomBook.currentIndex)) : (bookType = 0, changeShowBook(0), setCurrentIndexTextField(flipBook.currentPageIndex, !0), flipBook.gotoPage(zoomBook.currentIndex)), thumbButtonEnable && thumbnail.clearHighLight(), thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex), b.btnZoom.changeIcon(toolBarIconsURL[5]), b.btnZoom.setCaption(getLanguage("btnZoomIn", "Zoom In"))) : (zoomBook.currentIndex = flipBook.currentPageIndex, zoomBook.showPage.fillContent(zoomBook.currentIndex), bookType = 2, changeShowBook(2), b.btnZoom.changeIcon(toolBarIconsURL[6]), b.btnZoom.setCaption(getLanguage("btnZoomOut", "Zoom Out")), setCurrentIndexTextField(zoomBook.currentIndex, !1), thumbButtonEnable && thumbnail.clearHighLight(), thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex), auto_player.isPlaying() && (auto_player.stop(), b.btnAutoPlay.changeIcon(toolBarIconsURL[8]), b.btnAutoPlay.setCaption(getLanguage("btnStopAutoFlip", "Stop Auto Flip"))));
		b.btnZoom.changeButtonColor(bookConfig.iconColor);
		b.btnAutoPlay.changeButtonColor(bookConfig.iconColor);
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnAutoPlay.bind(_event._end,
	function() {
		auto_player.isPlaying() ? (auto_player.stop(), b.btnAutoPlay.changeIcon(toolBarIconsURL[7]), b.btnAutoPlay.setCaption(getLanguage("btnAutoFlip", "Auto Flip"))) : (auto_player.start(), b.btnAutoPlay.changeIcon(toolBarIconsURL[8]), b.btnAutoPlay.setCaption(getLanguage("btnStopAutoFlip", "Stop Auto Flip")));
		b.btnAutoPlay.changeButtonColor(bookConfig.iconColor);
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnThumb.bind(_event._end,
	function() {
		thumbnail.getShowStatu() ? thumbnail.hideBox() : thumbnail.showshow();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnShare.bind(_event._end,
	function() {
		sharePanel.getShowStatu() ? sharePanel.hideBox() : sharePanel.showshow();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnShare.bind(_event._down,
	function() {
		return ! 1
	});
	this.btnPrint.bind(_event._end,
	function() {
		printBody.getShowStatu() ? printBody.hideBox() : printBody.showshow();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnSearch.bind(_event._end,
	function() {
		frmSearch.isSearchShow ? frmSearch.closeForm() : frmSearch.showForm();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnTableOfContent.bind(_event._end,
	function() {
		frmBookmark.getShowStatu() ? frmBookmark.closeForm() : frmBookmark.showForm();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnBookMark.bind(_event._end,
	function() {
		bookmark.showHide();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnDownload.bind(_event._end,
	function() {
		"" != userConfig.downloadURL && (window.location = userConfig.downloadURL);
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnSound.bind(_event._end,
	function() {
		isPlaying ? (b.btnSound.changeIcon(toolBarIconsURL[16]), b.btnSound.setCaption(getLanguage("btnSoundOff", "soundOff"))) : (b.btnSound.changeIcon(toolBarIconsURL[15]), b.btnSound.setCaption(getLanguage("btnSoundOn", "soundOn")));
		b.btnSound.changeButtonColor(bookConfig.iconColor);
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnHome.bind(_event._end,
	function() {
		if (void 0 != userConfig.homeURL && "" != userConfig.homeURL) {
			var b = userConfig.homeURL;
			"http" != b.substr(0, 4) && (b = "http://" + b);
			window.open(b, "_tab")
		}
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnHelp.bind(_event._end,
	function() {
		helpBody.getShowStatu() ? helpBody.hideBox() : helpBody.showshow();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnAbout.bind(_event._end,
	function() {
		aboutBody.getShowStatu() ? aboutBody.hideBox() : aboutBody.showshow();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnLanguage.bind(_event._end,
	function() {
		languagePanel.getShowStatu() ? languagePanel.hideBox() : languagePanel.showshow();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnNote.bind(_event._end,
	function() {
		annotationPannel.getShowStatu() ? annotationPannel.hideBox() : annotationPannel.showshow();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnVideo.bind(_event._end,
	function() {
		videoGallery.showHide();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnSlideShow.bind(_event._end,
	function() {
		photoGallery.showHide();
		moreBar.hideMoreBar();
		isMoreShow = !1
	});
	this.btnFullscreen.bind(_event._end,
	function() {
		var b = $("body")[0];
		fullScreenApi.supportsFullScreen ? fullScreenApi.isFullScreen() ? fullScreenApi.cancelFullScreen() : fullScreenApi.requestFullScreen(b) : b.webkitSupportsFullscreen && b.webkitEnterFullscreen(Element.ALLOW_KEYBOARD_INPUT);
		return ! 1
	});
	$(document).bind(fullScreenApi.fullScreenEventName,
	function() {
		fullScreenApi.isFullScreen() ? (b.btnFullscreen.changeIcon(toolBarIconsURL[28]), b.btnFullscreen.setCaption(getLanguage("btnFullscreen", "Exit fullscreen"))) : (b.btnFullscreen.changeIcon(toolBarIconsURL[27]), b.btnFullscreen.setCaption(getLanguage("btnFullscreen", "Enter fullscreen")));
		b.btnFullscreen.changeButtonColor(bookConfig.iconColor)
	})
};
initMoreBar.prototype.changeButtonColor = function(b) {
	moreConfig.fullscreenButtonVisible && userConfig.fullscreenButtonVisible && fullScreenApi.supportsFullScreen && (fullScreenApi.isFullScreen() ? (this.btnFullscreen.changeIcon(toolBarIconsURL[28]), this.btnFullscreen.setCaption(getLanguage("btnFullscreen", "Exit fullscreen"))) : (this.btnFullscreen.changeIcon(toolBarIconsURL[27]), this.btnFullscreen.setCaption(getLanguage("btnFullscreen", "Enter fullscreen"))));
	moreConfig.zoomButtonEnable && zoomButtonEnable && isFlipModel && (2 == bookType ? (this.btnZoom.changeIcon(toolBarIconsURL[6]), this.btnZoom.setCaption(getLanguage("btnZoomOut", "Zoom Out"))) : (this.btnZoom.changeIcon(toolBarIconsURL[5]), this.btnZoom.setCaption(getLanguage("btnZoomIn", "Zoom In"))));
	moreConfig.autoPlayButtonVisible && userConfig.autoPlayButtonVisible && void 0 != auto_player && null != auto_player && (auto_player.isPlaying() ? (this.btnAutoPlay.changeIcon(toolBarIconsURL[8]), this.btnAutoPlay.setCaption(getLanguage("btnStopAutoFlip", "Stop Auto Flip"))) : (this.btnAutoPlay.changeIcon(toolBarIconsURL[7]), this.btnAutoPlay.setCaption(getLanguage("btnAutoFlip", "Auto Flip"))));
	moreConfig.bgSoundButtonVisible && userConfig.bgSoundButtonVisible && void 0 != isPlaying && (isPlaying ? (this.btnSound.changeIcon(toolBarIconsURL[15]), this.btnSound.setCaption(getLanguage("btnSoundOn", "soundOn"))) : (this.btnSound.changeIcon(toolBarIconsURL[16]), this.btnSound.setCaption(getLanguage("btnSoundOff", "soundOff"))));
	moreConfig.homeButtonVisible && userConfig.homeButtonVisible && this.btnHome.changeButtonColor(b);
	moreConfig.downloadButtonVisible && userConfig.downloadButtonVisible && this.btnDownload.changeButtonColor(b);
	moreConfig.printButtonVisible && userConfig.printButtonVisible && this.btnPrint.changeButtonColor(b);
	moreConfig.thumbButtonEnable && thumbButtonEnable && this.btnThumb.changeButtonColor(b);
	moreConfig.zoomButtonEnable && zoomButtonEnable && isFlipModel && this.btnZoom.changeButtonColor(b);
	moreConfig.bookmarkButtonEnable && bookmarkButtonEnable && this.btnBookMark.changeButtonColor(b);
	moreConfig.tableofcontentButtonEnable && tableofcontentButtonEnable && this.btnTableOfContent.changeButtonColor(b);
	moreConfig.shareButtonEnable && shareButtonEnable && this.btnShare.changeButtonColor(b);
	moreConfig.autoPlayButtonVisible && userConfig.autoPlayButtonVisible && this.btnAutoPlay.changeButtonColor(b);
	moreConfig.bgSoundButtonVisible && userConfig.bgSoundButtonVisible && this.btnSound.changeButtonColor(b);
	moreConfig.helpButtonVisible && userConfig.helpButtonVisible && this.btnHelp.changeButtonColor(b);
	moreConfig.aboutButtonVisible && userConfig.aboutButtonVisible && this.btnAbout.changeButtonColor(b);
	moreConfig.fullscreenButtonVisible && userConfig.fullscreenButtonVisible && this.btnFullscreen.changeButtonColor(b);
	moreConfig.AnnotationButtonVisible && userConfig.AnnotationButtonVisible && this.btnNote.changeButtonColor(b);
	moreConfig.SlideshowButtonVisible && userConfig.SlideshowButtonVisible && this.btnSlideShow.changeButtonColor(b);
	moreConfig.VideoButtonVisible && userConfig.VideoButtonVisible && this.btnVideo.changeButtonColor(b);
	moreConfig.languageButtonVisible && 1 < language.length && this.btnLanguage.changeButtonColor(b);
	moreConfig.flipButtonVisible && (this.btnLast.changeButtonColor(b), this.btnNext.changeButtonColor(b), this.btnPrevious.changeButtonColor(b), this.btnFirst.changeButtonColor(b));
	moreConfig.searchButtonEnable && searchButtonEnable && this.btnSearch.changeButtonColor(b)
};
initMoreBar.prototype.nextPage = function() {
	rightToLeft ? previousPageFun() : nextPageFun()
};
initMoreBar.prototype.prePage = function() {
	rightToLeft ? nextPageFun() : previousPageFun()
};
initMoreBar.prototype.firstPage = function() {
	rightToLeft ? lastPageFun() : firstPageFun()
};
initMoreBar.prototype.lastPage = function() {
	rightToLeft ? firstPageFun() : lastPageFun()
};
initMoreBar.prototype.changeLanguage = function() {
	this.btnLast.setCaption(getLanguage("btnLastPage", "Last"));
	this.btnNext.setCaption(getLanguage("btnNextPage", "Next"));
	this.btnPrevious.setCaption(getLanguage("btnPrePage", "Previous"));
	this.btnFirst.setCaption(getLanguage("btnFirstPage", "First"));
	this.btnZoom.setCaption(2 == bookType ? getLanguage("btnZoomOut", "Zoom Out") : getLanguage("btnZoomIn", "Zoom In"));
	this.btnAutoPlay.setCaption(auto_player.isPlaying() ? getLanguage("btnStopAutoFlip", "Stop Auto Flip") : getLanguage("btnAutoFlip", "Auto Flip"));
	this.btnShare.setCaption(getLanguage("btnSocialShare", "Share"));
	this.btnSearch.setCaption(getLanguage("btnSearch", "Search"));
	this.btnBookMark.setCaption(getLanguage("btnBookMark", "Book Mark"));
	this.btnDownload.setCaption(getLanguage("btnDownload", "Download"));
	this.btnHome.setCaption(getLanguage("btnGoToHome", "Home"));
	this.btnPrint.setCaption(getLanguage("btnPrint", "Print"));
	this.btnHelp.setCaption(getLanguage("btnHelp", "Help"));
	this.btnAbout.setCaption(getLanguage("btnAbout", "About"));
	this.btnLanguage.setCaption(getLanguage("btnLanguage", "languageChange"));
	this.btnFullscreen.setCaption(getLanguage("btnFullscreen", "fullscreen"));
	this.btnNote.setCaption(getLanguage("btnNote", "annotation"));
	this.btnVideo.setCaption(getLanguage("btnVideo", "videoGallery"));
	this.btnSlideShow.setCaption(getLanguage("btnSlideShow", "photoGallery"));
	this.btnSound.setCaption(isPlaying ? getLanguage("btnSoundOn", "soundOn") : getLanguage("btnSoundOff", "soundOff"));
	rightToLeft && (this.btnFirst.setCaption(getLanguage("btnLastPage", "Last")), this.btnLast.setCaption(getLanguage("btnFirstPage", "First")), this.btnNext.setCaption(getLanguage("btnPrePage", "Previous")), this.btnPrevious.setCaption(getLanguage("btnNextPage", "Next")))
};
var isShareShow = !1,
initShareBar = function() {
	shareBar = $("<div class='shareBar' style='display:none;opacity:0;'>");
	bookContainer.append(shareBar);
	shareBar.css("z-index", 2002);
	shareBar.css("bottom", "38px");
	shareBar.css("right", "300px");
	shareBar.css({
		background: bookConfig.formColor,
		"-webkit-box-shadow": "0 0 10px rgba(40, 40, 40, 0.5)",
		"-moz-box-shadow": "0 0 10px rgba(40, 40, 40, 0.5)",
		"-o-box-shadow": "0 0 10px rgba(40, 40, 40, 0.5)",
		"-ms-box-shadow": "0 0 10px rgba(40, 40, 40, 0.5)",
		"box-shadow": "0 0 10px rgba(40, 40, 40, 0.5)",
		"-moz-border-radius": "5px",
		"-webkit-border-radius": "5px",
		"border-radius": "5px"
	});
	shareBar.addBorderShadow(bookConfig.formColor, 3, 3);
	var b = window.location.href,
	c = window.document.title,
	d = window.location.pathname,
	d = d.substring(0, d.lastIndexOf("/")) + "/" + bookConfig.thumbPath + "1.jpg",
	e = "?&url=" + b + "&title=" + c + "&description=" + bookDescription + "&screenshot=" + d,
	b = initShareButton("email", e),
	c = initShareButton("facebook", e),
	d = initShareButton("google", e),
	f = initShareButton("mySpace", e),
	g = initShareButton("twitter", e),
	h = initShareButton("digg", e),
	e = initShareButton("more", e);
	shareBar.append(b);
	shareButtonTop = function(b) {
		return 8 + 35 * b
	};
	b.css({
		top: shareButtonTop(0) + "px",
		left: "10px"
	});
	shareBar.append(c);
	c.css({
		top: shareButtonTop(1) + "px",
		left: "10px"
	});
	shareBar.append(d);
	d.css({
		top: shareButtonTop(2) + "px",
		left: "10px"
	});
	shareBar.append(f);
	f.css({
		top: shareButtonTop(3) + "px",
		left: "10px"
	});
	shareBar.append(g);
	g.css({
		top: shareButtonTop(4) + "px",
		left: "10px"
	});
	shareBar.append(h);
	h.css({
		top: shareButtonTop(5) + "px",
		left: "10px"
	});
	shareBar.append(e);
	e.css({
		top: shareButtonTop(6) + "px",
		left: "10px"
	});
	shareBar.css({
		height: shareButtonTop(7) + "px"
	});
	shareBar.show = !1;
	$.fn.extend(shareBar, {
		showShareBar: function() {
			shareBar.css("display", "block");
			shareBar.show = !0;
			shareBar.animate({
				opacity: 0.9
			},
			200, "linear")
		},
		hideShareBar: function() {
			shareBar.show = !1;
			shareBar.animate({
				opacity: 0
			},
			200, "linear",
			function() {
				shareBar.css("display", "none")
			})
		},
		setSharePosition: function(b, c, d) {
			void 0 == d && (d = ["right", "bottom"]);
			shareBar.css(d[0], b + "px");
			shareBar.css(d[1], c + "px")
		},
		getShowStatus: function() {
			return shareBar.show
		}
	})
},
initShareButton = function(b, c) {
	var d = $("<div style = 'position: absolute;width:135px;height:33px;color:white;font-family:arial;font-size:12px'></div>"),
	e,
	f;
	switch (b) {
	case "email":
		f = "http://api.addthis.com/oexchange/0.8/forward/email/offer" + c;
		e = $("<div class='shareButton' ><img src='" + uiBaseURL + "email.png' class='shareImg' />Email</div>");
		break;
	case "facebook":
		f = "http://api.addthis.com/oexchange/0.8/forward/facebook/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "facebook.png' class='shareImg' />Facebook</div>");
		break;
	case "google":
		f = "http://api.addthis.com/oexchange/0.8/forward/igoogle/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "google.png' class='shareImg' />Google+</div>");
		break;
	case "mySpace":
		f = "http://api.addthis.com/oexchange/0.8/forward/myspace/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "myspace.png' class='shareImg' />MySpace</div>");
		break;
	case "netvibes":
		f = "http://api.addthis.com/oexchange/0.8/forward/netvibes/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "netvibes.png' class='shareImg' />netvibes</div>");
		break;
	case "twitter":
		f = "http://api.addthis.com/oexchange/0.8/forward/twitter/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "twitter.png' class='shareImg' />Twitter</div>");
		break;
	case "digg":
		f = "http://api.addthis.com/oexchange/0.8/forward/digg/offer" + c;
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "digg.png' class='shareImg' />Digg</div>");
		break;
	case "more":
		f = "http://api.addthis.com/oexchange/0.8/offer" + c,
		e = $("<div class='shareButton'><img src='" + uiBaseURL + "more.png' class='shareImg' />More</div>")
	}
	e.css({
		cursor: "pointer"
	});
	e.bind(_event._down,
	function(b) {
		sendvisitinfo(2, getShownPageString());
		window.open(f, "_blank")
	});
	d.append(e);
	d.mousedown(function(b) {
		d.css("background-color", "#0000f0")
	});
	d.mouseup(function(b) {
		d.css("background-color", "transparent");
		shareBar.hideShareBar()
	});
	return d
},
getLogoLink = function() {
	var b = bookConfig.appLogoLinkURL,
	c = getString("appLogoOpenWindow", "_blank");
	if ("_Self" == c || "Self" == c || "self" == c) c = "_self";
	void 0 == b || "" == b ? (b = "javascript:Void();", c = "_self") : "http" != b.substr(0, 4) && (b = "http://" + b);
	return [b, c]
},
logoBar,
initLogoBar = function(b) {
	logoBar = $("#logoBar");
	if (void 0 != bookConfig.appLogoIcon || "" != bookConfig.appLogoIcon) {
		var c = $("<img />"),
		d = 0,
		e = 0,
		f = getLogoLink();
		c.load(function() {
			if (isNaN(bookConfig.logoHeight) || "" == bookConfig.logoHeight || null == bookConfig.logoHeight || void 0 == bookConfig.logoHeight) try {
				d = b.getLogoHeight()
			} catch(f) {
				d = toolBar.getLogoHeight()
			} else d = bookConfig.logoHeight;
			var g = c.width() * d / c.height();
			c.css({
				width: g + "px",
				height: d + "px"
			});
			try {
				e = (b.getLogoHeight() - d) / 2
			} catch(l) {
				e = 0
			}
			logoBar.css({
				position: "absolute"
			});
			logoBar.append(c)
		});
		c.attr({
			src: bookConfig.appLogoIcon
		});
		c.css({
			position: "absolute"
		})
	}
	var g = 0,
	g = isNaN(bookConfig.logoPadding) || "" == bookConfig.logoPadding || null == bookConfig.logoPadding || void 0 == bookConfig.logoPadding ? 0 : bookConfig.logoPadding,
	e = 0,
	e = isNaN(bookConfig.logoTop) || "" == bookConfig.logoTop || null == bookConfig.logoTop || void 0 == bookConfig.logoTop ? 0 : bookConfig.logoTop;
	logoBar.css({
		left: g + "px"
	});
	logoBar.css({
		top: e + "px"
	});
	logoBar.bind(_event._down,
	function() {
		window.open(f[0], f[1])
	});
	logoBar.bind("mouseover",
	function() {
		logoBar.css({
			cursor: "pointer"
		})
	})
},
setPageIndexTextField = function() {
	setCurrentIndexTextField(BookInfo.getBook().getCurrentPageIndex(), bookType == BookType.normal_book || bookType == BookType.phone_book || bookType == BookType.slide_book || bookType == BookType.catalog_book);
	if (void 0 != $("#currentPageIndexTextField") && null != $("#currentPageIndexTextField") && void 0 != $("#currentPageIndexTextField")[0] && null != $("#currentPageIndexTextField")[0]) {
		var b = [8, 13, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105];
		$("#currentPageIndexTextField").bind("keydown",
		function(c) {
			if (0 > b.indexOf(c.keyCode)) return ! 1;
			13 == c.keyCode && (c = $("#currentPageIndexTextField").val().replace(/\D/g, ""), c = Math.min(Math.max(c, 1), totalPageCount), gotoPageFun(c))
		});
		$("#currentPageIndexTextField").bind("blur",
		function() {});
		$("#currentPageIndexTextField").bind(_event._end,
		function(b) {
			$("#currentPageIndexTextField").val("")
		})
	}
},
languageChange = Class({
	create: function(b) {
		var c = this;
		this.background = $("<div class='printBar'></div>");
		this.contentBox = $("<div class='printBG'></div>");
		var d = 0;
		this.showing = !1;
		$(this.background).css({
			width: windowWidth + "px",
			height: windowHeight + "px"
		});
		$(this.contentBox).css({
			width: "200px"
		});
		$(this.contentBox).css({
			background: "transparent"
		});
		b.append(this.background);
		b.append(this.contentBox);
		d = 45 * language.length + 10;
		this.contentBox.css({
			height: d + "px"
		});
		$(this.contentBox).css({
			left: (windowWidth - 200) / 2 + "px",
			top: (windowHeight - d) / 2 + "px"
		});
		b = [];
		b = [];
		for (d = 0; d < language.length; d++) {
			var e = $("<div></div>"),
			f = language[d].language;
			$(e).css({
				width: "80px",
				height: "35px",
				position: "absolute"
			});
			$(e).css({
				left: "60px",
				top: 45 * d + 10 + "px"
			});
			$(e).html(f);
			e.attr("language", f);
			b.push(e);
			$(c.contentBox).append($(b[d]));
			$(b[d]).css({
				"font-size": "20px",
				"text-align": "center",
				"line-height": "35px",
				"vertical-align": "middle",
				color: "#ffffff"
			});
			$(b[d]).css({
				"font-family": "Tahoma",
				"border-radius": "5px",
				position: "absolute"
			});
			$(b[d]).css({
				cursor: "pointer"
			});
			$(b[d]).bind(_event._end,
			function() {
				changeLanguage($(this).attr("language"));
				c.hideBox()
			});
			$(b[d]).bind(_event._enter,
			function() {
				$(this).css({
					background: "#transparent",
					border: "2px solid #ff8040"
				})
			});
			$(b[d]).bind(_event._end,
			function() {
				$(this).css({
					background: "transparent",
					border: ""
				})
			});
			$(b[d]).bind(_event._leave,
			function() {
				$(this).css({
					background: "transparent",
					border: ""
				})
			})
		}
		this.initEvent();
		$(this.background).css({
			display: "none"
		});
		$(this.contentBox).css({
			display: "none"
		})
	},
	onResize: function() {
		var b = 45 * language.length + 10;
		$(this.background).css({
			width: windowWidth + "px",
			height: windowHeight + "px"
		});
		$(this.contentBox).css({
			width: "200px",
			height: b + "px"
		});
		$(this.contentBox).css({
			left: (windowWidth - 200) / 2 + "px",
			top: (windowHeight - b) / 2 + "px"
		})
	},
	hideBox: function() {
		$(this.background).fadeOut(1E3);
		$(this.contentBox).fadeOut(1E3);
		this.showing = !1
	},
	showshow: function() {
		$(this.background).css({
			display: "block"
		});
		$(this.contentBox).fadeIn(1E3);
		this.showing = !0
	},
	getShowStatu: function() {
		return this.showing
	},
	initEvent: function() {
		var b = this;
		$(this.background).bind(_event._end,
		function() {
			b.hideBox();
			b.showing = !1
		})
	}
}),
phoneLanguageChange = Class({
	create: function(b) {
		this.contentBox = b;
		this.width = this.contentBox.width();
		this.height = foldingMenu.height - foldingMenu.getItemById("miLanguage").title.height();
		this.mainColor = colorDiv(bookConfig.toolbarColor, 30);
		this.itemArray = [];
		this.isDrag = !1;
		this.scrollBox = $("<div></div>");
		this.contentBox.append(this.scrollBox);
		$(this.contentBox).css({
			background: this.mainColor
		});
		for (b = 0; b < language.length; b++) language[b].language && this.addItem(language[b].language);
		this.initScrollBox();
		this.scrollBox.css("height", 50 * language.length)
	},
	initScrollBox: function() {
		this.scrollBox.css({
			"line-height": "50px",
			"verticale-align": "middle",
			"font-size": "20px",
			color: "#ffffff",
			"font-family": "Arial,Tahoma"
		})
	},
	addItem: function(b) {
		var c = $("<div style='position:relative;cursor:pointer;width:100%;height:50px;'></div>"),
		d = $("<img style='position:absolute;display:none;width:25px;height:25px;top:13px;right:15px;'/>");
		d.attr("src", toolBarIconsURL[38]);
		var e = $("<div/>");
		e.css({
			"line-height": "50px",
			"font-size": "13px"
		});
		c.css("border-top", "1px solid " + colorAdd(this.mainColor, 10));
		c.css("border-bottom", "1px solid " + colorDiv(this.mainColor, 10));
		c.append($(e));
		c.append($(d));
		$(e).html("&nbsp;&nbsp;&nbsp;" + b);
		b.toLowerCase() === bookConfig.language.toLowerCase() && (d.show(), this.currentItem = c);
		this.scrollBox.append(c);
		c.bind(_event._end,
		function() {
			b && "" != b && global.phoneLanguageBody && !global.phoneLanguageBody.isDrag && (bookConfig.language = b, selectLanguage(bookConfig.language), toolBar.changeLanguage && toolBar.changeLanguage(), this.currentItem && this.currentItem.find("img").hide(), this.currentItem = c, d.show())
		}.bind(this))
	},
	initEvent: function() {
		ScrollFunction(this.scrollBox, this.contentBox, this)
	},
	onResize: function() {}
}).extend(languageChange),
AnnotationPannel = Class({
	create: function(b) {
		var c = this;
		this.width = 65;
		this.itemWidth = 37;
		this.itemHeight = 33;
		this.showButtonHeight = 18;
		this.padding = 8;
		isBelowIE9() ? this.buttonCount = 6 : this.buttonCount = 7;
		this.itemBoxWidth = this.width - 10;
		this.itemBoxHeight = this.buttonCount * (this.itemHeight + this.padding) + 2 * this.padding + this.itemHeight;
		this.height = this.itemBoxHeight + this.showButtonHeight + 10;
		this.background = $("<div></div>");
		this.showHideButton = $("<div></div>");
		this.contentBox = $("<div></div>");
		b.append(this.background);
		this.background.append(this.showHideButton);
		this.background.append(this.contentBox);
		this.background.css({
			width: this.width + "px",
			height: this.height + "px",
			left: "100px",
			top: (windowHeight - this.height) / 2 + "px",
			"z-index": "10",
			position: "absolute"
		});
		this.contentBox.css({
			width: this.itemBoxWidth + "px",
			height: this.itemBoxHeight + "px",
			left: (this.width - this.itemBoxWidth) / 2 + "px",
			top: 6 + this.showButtonHeight + "px",
			position: "absolute",
			background: "#535353",
			"border-top": "1px solid #6a6a6a",
			"border-radius": "0px 0px 2px 2px",
			"-webkit-box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)",
			"-moz-box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)",
			"-o-box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)",
			"box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)"
		});
		this.showHideButton.css({
			top: "5px",
			left: (this.width - this.itemBoxWidth) / 2 + "px",
			width: this.itemBoxWidth + "px",
			height: this.showButtonHeight + "px",
			position: "absolute",
			"border-radius": "3px 3px 0px 0px",
			"border-bottom": "1px solid #000000",
			background: "#383838",
			"-webkit-box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)",
			"-moz-box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)",
			"-o-box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)",
			"box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)"
		});
		b = $("<img/>");
		b.attr("src", uiBaseURL + "noteclose.png");
		b.css({
			position: "absolute",
			right: "5px",
			width: 10,
			height: 10,
			top: (this.showButtonHeight - 10) / 2 + "px"
		});
		b.asImageButton();
		b.bind(_event._end,
		function() {
			c.hideBox()
		});
		this.showHideButton.append(b);
		this.buttonType = 0;
		CreateNoteRemark.bind(this)();
		this.addItem(this.contentBox);
		this.addSonItem(this.background);
		this.changeCursor();
		this.initEvent();
		this.background.css("display", "none");
		this.showing = !1
	},
	addItem: function(b) {
		for (var c = this,
		d = this.buttonType = 0; d < this.buttonCount; d++) {
			var e = $("<div></div>"),
			f = $("<img/>");
			$(e).attr("buttonType", d);
			e.css({
				width: c.itemWidth + "px",
				height: c.itemHeight + "px",
				left: (c.itemBoxWidth - c.itemWidth) / 2 + "px",
				top: c.itemWidth / 2 + c.padding + d * (c.itemHeight + this.padding) + "px",
				position: "absolute",
				"border-radius": "2px"
			});
			f.css({
				"margin-left": "5px",
				"margin-top": "3px",
				position: "absolute"
			});
			b.append(e);
			e.append(f);
			e.bind(_event._over,
			function() {
				$(this).removeClass();
				$(this).attr("class", "item-enter")
			});
			e.bind(_event._end,
			function() {
				$(this).removeClass();
				$(this).attr("class", "item-enter")
			});
			e.bind(_event._leave,
			function() {
				c.buttonType != $(this).attr("buttonType") && ($(this).removeClass(), $(this).attr("class", "item-transparent"))
			});
			switch (d) {
			case 0:
				f.attr("src", uiBaseURL + "cursor.png");
				f.attr("title", "cursor");
				c.cursorButton = e;
				$(e).bind(_event._down,
				function() {
					c.resetButton()
				});
				break;
			case 1:
				f.attr("src", uiBaseURL + "highligh.png");
				f.attr("title", "add highlight");
				$(e).bind(_event._down,
				function() {
					global.annotationImage.offCreateEvents();
					annotationShapes.delEvents();
					isBelowIE9() || signature.hide();
					textRemark.unbindCreateEvents();
					textRemark.addHighlightEvent();
					noteCookie.hide();
					cursor = !1;
					1 != c.buttonType && c.changeCursor();
					c.buttonType = 1;
					c.selectButton = c.highLightButton;
					c.shapesPanelHide()
				});
				c.highLightButton = e;
				break;
			case 2:
				f.attr("src", uiBaseURL + "remark.png");
				f.attr("title", "add texts");
				$(e).bind(_event._down,
				function() {
					global.annotationImage.offCreateEvents();
					annotationShapes.delEvents();
					isBelowIE9() || signature.hide();
					textRemark.unbindCreateEvents();
					textRemark.addEvents();
					noteCookie.hide();
					cursor = !1;
					2 != c.buttonType && c.changeCursor();
					c.buttonType = 2;
					c.selectButton = c.textRemarkButton;
					c.shapesPanelHide()
				});
				c.textRemarkButton = e;
				break;
			case 3:
				f.attr("src", uiBaseURL + "shape.png");
				f.attr("title", "add shapes");
				$(e).bind(_event._down,
				function() {
					global.annotationImage.offCreateEvents();
					annotationShapes.delEvents();
					isBelowIE9() || signature.hide();
					textRemark.unbindCreateEvents();
					noteCookie.hide();
					cursor = !1;
					3 != c.buttonType && c.changeCursor();
					c.buttonType = 3;
					c.selectButton = c.shapeButton
				});
				$(e).bind(_event._over,
				function() {});
				$(e).bind(_event._leave,
				function() {
					3 != c.buttonType && c.shapesPanelHide()
				});
				$(e).bind(_event._end,
				function() {
					c.shapesPanelShowOrHide()
				});
				c.shapeButton = e;
				break;
			case 4:
				f.attr("src", uiBaseURL + "notesadd.png");
				f.attr("title", "add notes");
				$(e).bind(_event._down,
				function() {
					global.annotationImage.offCreateEvents();
					annotationShapes.delEvents();
					isBelowIE9() || signature.hide();
					textRemark.unbindCreateEvents();
					noteCookie.showHide();
					cursor = !1;
					4 != c.buttonType && c.changeCursor();
					c.buttonType = 4;
					c.selectButton = c.noteCookieButton;
					c.shapesPanelHide()
				});
				c.noteCookieButton = e;
				break;
			case 5:
				f.attr("src", uiBaseURL + "addImage.png");
				f.attr("title", "add image file");
				$(e).bind(_event._down,
				function() {
					annotationShapes.delEvents();
					isBelowIE9() || signature.hide();
					textRemark.unbindCreateEvents();
					global.annotationImage.addCreateEvents();
					noteCookie.hide();
					cursor = !1;
					5 != c.buttonType && c.changeCursor();
					c.buttonType = 5;
					c.selectButton = c.annotationImageButton;
					c.shapesPanelHide()
				});
				c.annotationImageButton = e;
				break;
			case 6:
				f.attr("src", uiBaseURL + "signature.png"),
				f.attr("title", "add signature"),
				$(e).bind(_event._down,
				function() {
					global.annotationImage.offCreateEvents();
					annotationShapes.delEvents();
					isBelowIE9() || signature.showHide();
					textRemark.unbindCreateEvents();
					noteCookie.hide();
					cursor = !1;
					6 != c.buttonType && c.changeCursor();
					c.buttonType = 6;
					c.selectButton = c.signatureButton;
					c.shapesPanelHide()
				}),
				c.signatureButton = e
			}
		}
	},
	addSonItem: function(b) {
		var c = parseInt(this.contentBox.css("left")) + parseInt(this.contentBox.css("width")),
		d = parseInt(this.shapeButton.css("top")) + parseInt(this.contentBox.css("top")) - this.padding / 2,
		e = (parseInt(this.contentBox.css("width")) - this.itemWidth) / 2 + 8;
		this.shapesPannel = $("<div></div>");
		this.shapesContentBox = $("<div></div>");
		this.shapesPannel.css({
			width: e + 180 + 8,
			height: 49,
			position: "absolute",
			left: c - e + "px",
			top: d + "px"
		});
		this.shapesContentBox.css({
			width: 188,
			height: 49,
			position: "absolute",
			left: e + "px",
			background: "#535353",
			"border-radius": "0px 2px 2px 0px",
			"-webkit-box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)",
			"-moz-box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)",
			"-o-box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)",
			"box-shadow": "0 0 5px rgba(54, 54, 54, 0.95)"
		});
		b.append(this.shapesPannel);
		this.shapesPannel.append(this.shapesContentBox);
		this.shapesPanelHide();
		var f = this;
		this.shapesPannel.bind(_event._end + " " + _event._enter,
		function() {
			f.shapesPanelShow()
		});
		for (b = 0; 4 > b; b++) {
			var e = $("<div></div>"),
			g = $("<img/>"),
			d = 8,
			c = 8 + 45 * b;
			e.css({
				width: "37px",
				height: "33px",
				left: c + "px",
				top: d + "px",
				position: "absolute",
				"border-radius": "2px"
			});
			g.css({
				"margin-left": "5px",
				"margin-top": "3px",
				position: "absolute"
			});
			this.shapesContentBox.append(e);
			e.append(g);
			switch (b) {
			case 0:
				g.attr("src", uiBaseURL + "shapes_line.png");
				g.attr("title", "add line");
				$(e).bind(_event._down,
				function() {
					f.clickShape();
					annotationShapes.addEvents("line");
					f.shapesPanelHide()
				});
				break;
			case 1:
				g.attr("src", uiBaseURL + "shapes_arrow.png");
				g.attr("title", "add arrow");
				$(e).bind(_event._down,
				function() {
					f.clickShape();
					annotationShapes.addEvents("arrow");
					f.shapesPanelHide()
				});
				break;
			case 2:
				g.attr("src", uiBaseURL + "shapes_rect.png");
				g.attr("title", "add rect");
				$(e).bind(_event._down,
				function() {
					f.clickShape();
					annotationShapes.addEvents("rect");
					f.shapesPanelHide()
				});
				break;
			case 3:
				g.attr("src", uiBaseURL + "shapes_ellipse.png"),
				g.attr("title", "add ellipse"),
				$(e).bind(_event._down,
				function() {
					f.clickShape();
					annotationShapes.addEvents("ellipse");
					f.shapesPanelHide()
				})
			}
			e.bind(_event._over,
			function() {
				$(this).removeClass();
				$(this).attr("class", "item-enter")
			});
			e.bind(_event._end,
			function() {
				$(this).removeClass();
				$(this).attr("class", "item-transparent")
			});
			e.bind(_event._leave,
			function() {
				$(this).removeClass();
				$(this).attr("class", "item-transparent")
			})
		}
	},
	shapesPanelShow: function() {
		this.shapesPannelShowHide = !0;
		this.shapesPannel.show()
	},
	shapesPanelHide: function() {
		this.shapesPannelShowHide = !1;
		this.shapesPannel.hide()
	},
	shapesPanelShowOrHide: function() {
		this.shapesPannelShowHide ? this.shapesPanelHide() : this.shapesPanelShow()
	},
	clickShape: function() {},
	resetButton: function() {
		cursor = !0;
		0 != this.buttonType && this.changeCursor();
		this.buttonType = 0;
		this.selectButton = this.cursorButton;
		this.shapesPanelHide();
		void 0 != textRemark && textRemark.unbindCreateEvents();
		void 0 != noteCookie && noteCookie.hide();
		void 0 != annotationShapes && annotationShapes.delEvents();
		void 0 == signature || isBelowIE9() || signature.hide();
		void 0 != global.annotationImage && global.annotationImage.offCreateEvents()
	},
	changeCursor: function() {
		void 0 == this.selectButton && (this.selectButton = this.cursorButton);
		cursor ? ($(this.selectButton).removeClass(), $(this.selectButton).attr("class", "item-transparent"), $(this.cursorButton).removeClass(), $(this.cursorButton).attr("class", "item-enter")) : ($(this.selectButton).removeClass(), $(this.selectButton).attr("class", "item-transparent"))
	},
	onResize: function() {
		this.background.css({
			left: "100px",
			top: (windowHeight - this.height) / 2 + "px"
		})
	},
	hideBox: function() {
		$(this.background).fadeOut(500);
		this.showing = !1;
		this.resetButton()
	},
	showshow: function() {
		$(this.background).fadeIn(500);
		this.showing = !0
	},
	getShowStatu: function() {
		return this.showing
	},
	initEvent: function() {
		$(this.background).dragToMove(this.background)
	}
}),
phoneSetting = Class({
	create: function(b) {
		this.width = b.width();
		this.height = foldingMenu.height - foldingMenu.getItemById("miSetting").title.height();
		this.mainColor = colorDiv(bookConfig.toolbarColor, 30);
		this.isDrag = !1;
		this.itemArray = [];
		this.contentBox = $("<div></div>");
		b.append(this.contentBox);
		this.initContent()
	},
	initContent: function() {
		this.contentBox.css({
			width: this.width - 40,
			height: this.height,
			left: 20,
			"vertical-align": "middle",
			color: "#ffffff",
			"font-family": "Arial,Tahoma",
			position: "absolute"
		});
		this.scrollBox = $("<div style='position:absolute;width:100%;'></div>");
		this.contentBox.append(this.scrollBox);
		this.addItem()
	},
	addItem: function() {
		for (var b = 0; 2 > b; b++) {
			var c = $("<div style='position:relative;width:100%;height:60px;'></div>"),
			d = $("<div style='position:absolute;width:100%;height:35px;'></div>");
			d.css({
				"border-radius": "5px",
				position: "absolute",
				bottom: "0px",
				"line-height": "35px",
				"font-size": "15px",
				background: colorDiv(bookConfig.toolbarColor, 20)
			});
			c.append(d);
			this.itemArray.push({
				element: c,
				title: d
			})
		}
		this.scrollBox.append(this.itemArray[0].element);
		for (b = 0; 3 > b; b++) if (2 == b) c = this.itemArray[1].element,
		c.css("border-top", "1px solid " + colorAdd(this.mainColor, 10));
		else {
			var c = $("<div style='position:relative;width:100%;height:50px;'></div>"),
			e = $("<img style='position:absolute;cursor:pointer;width:25px;height:25px;top:13px;right:15px;'/>");
			e.attr("src", toolBarIconsURL[38]);
			d = $("<div/>");
			d.css({
				"line-height": "50px",
				"font-size": "13px"
			});
			0 != b && 3 != b && c.css("border-top", "1px solid " + colorAdd(this.mainColor, 10));
			5 != b && (c.css("border-bottom", "1px solid " + colorDiv(this.mainColor, 10)), c.append($(d)), c.append($(e)), c.css({
				cursor: "pointer"
			}));
			this.scrollBox.append(c);
			this.itemArray.push({
				element: c,
				title: d,
				icon: e
			})
		}
		this.initDifferItem();
		this.initItemEvent()
	},
	initDifferItem: function() {
		this.itemArray[0].title.html("&nbsp;&nbsp;&nbsp;" + getLanguage("soundSettingTitle", "Sound Setting"));
		this.itemArray[1].title.html("&nbsp;&nbsp;&nbsp;" + getLanguage("pageSettingTitle", "Page Setting"));
		this.itemArray[2].title.html("&nbsp;&nbsp;&nbsp;" + getLanguage("closeFlipSound", "Close Flip Sound"));
		this.itemArray[3].title.html("&nbsp;&nbsp;&nbsp;" + getLanguage("closeBackgroundSound", "Close Background Sound"));
		bookConfig.FlipSound || this.itemArray[2].element.hide();
		userConfig.bgSoundButtonVisible || this.itemArray[3].element.hide();
		bookConfig.FlipSound || userConfig.bgSoundButtonVisible || this.itemArray[0].element.hide();
		this.itemArray[3].element.attr("id", "btnSound");
		isFlipBook()
	},
	initItemEvent: function() {
		this.itemArray[2].element.bind(_event._end,
		function() {
			bookConfig.FlipSound = !bookConfig.FlipSound;
			bookConfig.FlipSound ? this.itemArray[2].icon.attr("src", toolBarIconsURL[38]) : this.itemArray[2].icon.attr("src", toolBarIconsURL[39])
		}.bind(this));
		this.itemArray[3].element.bind(_event._end,
		function() { ! 0 === isPlaying ? this.itemArray[3].icon.attr("src", toolBarIconsURL[39]) : this.itemArray[3].icon.attr("src", toolBarIconsURL[38])
		}.bind(this))
	},
	changeLanguage: function() {
		this.itemArray[0].title.html("&nbsp;&nbsp;&nbsp;" + getLanguage("soundSettingTitle", "Sound Setting"));
		this.itemArray[1].title.html("&nbsp;&nbsp;&nbsp;" + getLanguage("pageSettingTitle", "Page Setting"));
		this.itemArray[2].title.html("&nbsp;&nbsp;&nbsp;" + getLanguage("closeFlipSound", "Close Flip Sound"));
		this.itemArray[3].title.html("&nbsp;&nbsp;&nbsp;" + getLanguage("closeBackgroundSound", "Close Background Sound"))
	}
}),
phoneGotoPage = Class({
	create: function(b) {
		this.mainColor = "#000000";
		this.menu = $("<div id='menu' style='position:absolute;width:100%;height:35px;z-index:98;bottom:-42px;'></div>");
		this.background = $("<div id='background' style='position:absolute;width:100%;height:35px;'></div>");
		this.contentBox = $("<div id='contentBox' class='phoneGotoPageContent' style='position:absolute;width:100%;height:35px;'></div>");
		this.background.css({
			background: this.mainColor,
			opacity: 0.9
		});
		b.append(this.menu);
		this.menu.append(this.background);
		this.menu.append(this.contentBox);
		this.initContentBox();
		this.initEvent();
		this.visible = !1
	},
	initContentBox: function() {
		this.contentBox.css({
			"text-align": "center",
			display: "inline-block"
		});
		var b = uiBaseURL;
		this.firstButton = $("<div><img src='" + b + "firstButton.png'/></div>");
		this.prevButton = $("<div><img src='" + b + "prevButton.png'/></div>");
		this.inputButton = $("<div style='bottom:7px;margin-left:13px;'><input id='currentPageIndexTextField' type='text'/></div>");
		this.goButton = $("<div>Go</div>");
		this.nextButton = $("<div><img src='" + b + "nextButton.png'/></div>");
		this.lastButton = $("<div><img src='" + b + "lastButton.png'/></div>");
		this.contentBox.append(this.firstButton);
		this.contentBox.append(this.prevButton);
		this.contentBox.append(this.inputButton);
		this.contentBox.append(this.goButton);
		this.contentBox.append(this.nextButton);
		this.contentBox.append(this.lastButton);
		$("#currentPageIndexTextField").css({
			padding: "0px",
			"text-align": "center",
			"border-width": "0px",
			background: "#ffffff",
			width: "70px",
			height: "20px",
			"border-radius": "0px"
		});
		this.goButton.css({
			width: "30px",
			height: "20px",
			bottom: "7px",
			left: "2px",
			cursor: "pointer",
			"line-height": "20px",
			"text-align": "center",
			color: "#000000",
			"font-size": "13px",
			background: "#ffffff",
			"font-family": "Arial,Tahoma"
		})
	},
	show: function() {
		this.menu.animate({
			bottom: 40
		},
		300);
		this.visible = !0
	},
	hide: function() {
		this.menu.animate({
			bottom: -42
		},
		300);
		this.visible = !1
	},
	showOrHide: function() { ! 0 === this.visible ? this.hide() : this.show()
	},
	initEvent: function() {
		this.firstButton.bind(_event._end,
		function() {
			rightToLeft ? lastPageFun() : firstPageFun();
			return ! 1
		});
		this.prevButton.bind(_event._end,
		function() {
			rightToLeft ? nextPageFun() : previousPageFun();
			return ! 1
		});
		this.nextButton.bind(_event._end,
		function() {
			rightToLeft ? previousPageFun() : nextPageFun();
			return ! 1
		});
		this.lastButton.bind(_event._end,
		function() {
			rightToLeft ? firstPageFun() : lastPageFun();
			return ! 1
		});
		this.goButton.bind(_event._end,
		function() {
			var b = parseInt($("#currentPageIndexTextField").val().replace(/\D/g, "")),
			b = Math.min(Math.max(b, 1), totalPageCount);
			gotoPageFun(b);
			return ! 1
		}.bind(this))
	}
});
var CatalogSide = Class({
	create: function(b, c) {
		this.bookType = BookType.catalog_book;
		this.imageIndex = 0;
		this.width = 300;
		this.height = 400;
		this.side = $("<div class='side'></div>");
		this.tmpContent = $("<div class='sideContent'></div>");
		this.sideContent = $("<div class='sideContent'></div>");
		this.sideImg = $("<img />");
		this.grayShadow = $("<div class='kong edgeShadow' ></div>");
		this.searchHighlight = $("<div class='kong' id='highlight'></div>");
		this.grayShadow.css({
			display: "none"
		});
		this.isLeft = c;
		this.rightToLeft = rightToLeft;
		var d = parseBool(bookConfig.addPaperCoil);
		this.isLeft ? (this.midShadow = $("<div class='catalogLeftShadow'></div>"), this.midShadow.css({
			width: userConfig.leftShadowWidth + "px",
			opacity: userConfig.leftShadowAlpha
		}), d && (this.midCoil = $("<div class='leftPaperCoil'></div>"))) : (this.midShadow = $("<div class='catalogRightShadow'></div>"), this.midShadow.css({
			width: userConfig.rightShadowWidth + "px",
			opacity: userConfig.rightShadowAlpha
		}), d && (this.midCoil = $("<div class='rightPaperCoil'></div>")));
		this.midShadow.css({
			"backface-visibility": "hidden",
			"-webkit-backface-visibility": "hidden",
			"-moz-backface-visibility": "hidden",
			"-ms-backface-visibility": "hidden"
		});
		d = getColor("pageBackgroundColor", "#f5f5f5");
		this.side.css({
			"background-color": d,
			overflow: "hidden"
		});
		this.sideContent.css("background-color", d);
		this.side.css({
			overflow: "hidden"
		});
		this.MMBackground = $("<div style='position : absolute; z-index : 6;'></div>");
		this.loadingImg = $("<img src='" + uiBaseURL + "progress.gif' style='position: absolute;' />");
		this.loadingImg.css({
			left: (this.width - LOADING_WIDTH) / 2 + "px",
			top: (this.height - LOADING_HEIGHT) / 2 + "px"
		});
		this.initMMItems();
		this.slider = null;
		this.playSliderAfterLoad = !1;
		b.append(this.side);
		this.side.append(this.tmpContent);
		this.tmpContent.append(this.sideContent);
		this.side.append(this.midShadow);
		this.tmpContent.append(this.MMBackground);
		this.midShadow.css("z-index", 5);
		this.midCoil && this.midCoil.css("z-index", 5);
		CatalogSide.sideId || (CatalogSide.sideId = 0);
		this.sideId = ++CatalogSide.sideId
	}
}).extend(normalSide),
CatalogThumbnailBar = Class({
	create: function(b) {
		this.menu = $("<div></div>");
		b.append(this.menu);
		this.initMenu()
	},
	initMenu: function() {
		this.visible = !1;
		this.height = 170;
		this.menu.css({
			position: "absolute",
			width: "100%",
			height: this.height,
			overflow: "hidden",
			bottom: -this.height + "px"
		});
		this.dockMenuContent = $("<div></div>");
		this.thumbnailItemContent = $("<div></div>");
		this.dockMenuContent.css({
			position: "absolute",
			bottom: "30px",
			width: windowWidth - 50 + "px",
			height: "140px",
			left: "25px",
			"z-index": "1"
		});
		this.thumbnailItemContent.css({
			position: "absolute",
			bottom: "0px",
			width: "100%",
			height: "30px",
			"text-align": "center",
			"line-height": "30px",
			"z-index": "2",
			display: "inline-block"
		});
		this.menu.append(this.dockMenuContent);
		this.menu.append(this.thumbnailItemContent);
		this.addItem()
	},
	addItem: function() {
		this.itemArray = [];
		for (var b = parseInt((bookConfig.totalPageCount + 1) / 20), b = b + (0 == (bookConfig.totalPageCount + 1) % 20 ? 0 : 1), c = 0; c < b; c++) {
			var d = new CatalogThumbnailItem(this.thumbnailItemContent, this.dockMenuContent, c),
			e = 20 * c,
			f = 20 * (c + 1) - 1,
			f = f > bookConfig.totalPageCount ? bookConfig.totalPageCount: f;
			d.initItem(e, f);
			0 == c && (this.highLightItem = this.currentItem = d, d.setHighLight(1), d.show());
			this.itemArray.push(d)
		}
	},
	gotoItemByIndex: function(b) {
		this.currentItem && this.currentItem.index !== b && (this.currentItem.hide(), this.itemArray[b].show(), this.currentItem = this.itemArray[b])
	},
	onResize: function() {
		var b = 1,
		c = 10 * (140 * bookConfig.largePageWidth / bookConfig.largePageHeight + 10);
		origin = 0;
		c > windowWidth - 50 && (b = (windowWidth - 50) / c, origin = parseInt(100 * (1 - (windowWidth - 50) / c) / 2));
		this.dockMenuContent.css({
			"-webkit-transform": "scale3d(" + b + "," + b + ",1)",
			"-moz-transform": "scale3d(" + b + "," + b + ",1)",
			"-ms-transform": "scale3d(" + b + "," + b + ",1)",
			"-o-transform": "scale3d(" + b + "," + b + ",1)",
			transform: "scale3d(" + b + "," + b + ",1)",
			"-webkit-transform-origin": "50% 100%",
			"-moz-transform-origin": "50% 100%",
			"-ms-transform-origin": "50% 100%",
			"-o-transform-origin": "50% 100%",
			"transform-origin": "50% 100%"
		});
		this.dockMenuContent.css({
			width: windowWidth - 50 + "px"
		});
		this.thumbnailItemContent.css({
			"-webkit-transform": "scale3d(" + b + "," + b + ",1)",
			"-moz-transform": "scale3d(" + b + "," + b + ",1)",
			"-ms-transform": "scale3d(" + b + "," + b + ",1)",
			"-o-transform": "scale3d(" + b + "," + b + ",1)",
			transform: "scale3d(" + b + "," + b + ",1)",
			"-webkit-transform-origin": "50% 100%",
			"-moz-transform-origin": "50% 100%",
			"-ms-transform-origin": "50% 100%",
			"-o-transform-origin": "50% 100%",
			"transform-origin": "50% 100%"
		});
		for (b = 0; b < this.itemArray.length; b++) this.itemArray[b].onResize()
	},
	showshow: function() {
		this.showing = this.visible = !0;
		this.menu.animate.delay(this.menu, 100, [{
			bottom: -5 + toolBar.getBottomHeight() + "px"
		},
		300])
	},
	hideBox: function() {
		this.menu.animate.delay(this.menu, 100, [{
			bottom: -this.height + "px"
		},
		300]);
		this.showing = this.visible = !1
	},
	getOccuHeight: function() {
		return 110
	},
	transparent: function() {
		this.menu.animate({
			opacity: 0,
			"z-index": -1
		},
		200)
	},
	noTransparent: function() {
		this.menu.animate({
			opacity: 1,
			"z-index": 1
		},
		200)
	},
	mergeAll: function() {},
	fissionAll: function() {},
	getShowStatu: function() {
		return this.visible
	},
	clearHighLight: function() {
		this.highLightItem && this.highLightItem.clearHighLight()
	},
	setHighLight: function(b) {
		for (var c = 0; c < this.itemArray.length; c++) if (b <= this.itemArray[c].toIndex && b >= this.itemArray[c].fromIndex) {
			this.gotoItemByIndex(c);
			this.itemArray[c].setHighLight(b);
			this.highLightItem = this.currentItem;
			break
		}
	},
	showOrHide: function() { ! 1 === this.visible ? this.showshow() : this.hideBox()
	},
	hide: function() {
		this.menu.css("bottom", -this.height + "px");
		this.showing = this.visible = !1
	},
	show: function() {
		this.menu.css("bottom", -5 + toolBar.getBottomHeight() + "px");
		this.showing = this.visible = !0
	},
	setPosition: function() {},
	getHeight: function() {
		return ! 0 == this.visible ? 110 : 0
	}
}),
CatalogThumbnailItem = Class({
	create: function(b, c, d) {
		this.itemContent = b;
		this.dockMenuContent = c;
		this.index = d;
		this.item = $("<div></div>");
		this.rect = $("<div></div>");
		this.caption = $("<div class='dockMenuItemCaption'></div>");
		this.captionAfter = $("<div class='dockMenuItemCaptionAfter'></div>");
		this.itemContent.append(this.item);
		this.item.append(this.rect);
		this.item.append(this.caption);
		this.caption.after(this.captionAfter);
		this.initEvent()
	},
	initItem: function(b, c) {
		this.initCaption(b, c);
		this.item.css({
			position: "relative",
			width: "40px",
			height: "20px",
			display: "inline-block",
			"margin-left": "4px",
			cursor: "pointer",
			"margin-top": "5px"
		});
		this.rect.css({
			position: "absolute",
			top: "7px",
			width: "40px",
			height: "5px",
			"border-radius": "3px",
			background: "#505a60"
		});
		this.dockMenu = new DockMenu(this.dockMenuContent, b, c);
		1 < b && this.addPrev();
		c < bookConfig.totalPageCount && this.addNext()
	},
	addPrev: function() {
		var b = $("<div style='width:30px;height:60px;margin-left:10px;bottom:1px;' class='dockMenuItem dockMenuItemShadow'></div>");
		b.append("<div style='width:100%;height:100%;background:#333333;opacity:0.5;'></div>");
		b.append("<img src='" + uiBaseURL + "slide_leftButton.png' style='left:0;right:0;bottom:0;top:0;margin:auto;position:absolute;'/>");
		b.click(function() {
			thumbnail.gotoItemByIndex(this.index - 1);
			return ! 1
		}.bind(this));
		this.dockMenu.addObj(b, "before")
	},
	addNext: function() {
		var b = $("<div style='width:30px;height:60px;margin-left:10px;bottom:1px;' class='dockMenuItem dockMenuItemShadow'></div>");
		b.append("<div style='width:100%;height:100%;background:#333333;opacity:0.5;'></div>");
		b.append("<img src='" + uiBaseURL + "slide_rightButton.png' style='left:0;right:0;bottom:0;top:0;margin:auto;position:absolute;'/>");
		b.click(function() {
			thumbnail.gotoItemByIndex(this.index + 1);
			return ! 1
		}.bind(this));
		this.dockMenu.addObj(b, "after")
	},
	initCaption: function(b, c) {
		this.fromIndex = b;
		this.toIndex = c;
		this.fromIndex = Math.max(this.fromIndex, 1);
		this.toIndex = Math.min(this.toIndex, bookConfig.totalPageCount);
		this.fromIndex != this.toIndex ? this.caption.html(this.fromIndex + "-" + this.toIndex) : this.caption.html(this.fromIndex);
		$(this.caption).css({
			position: "absolute",
			height: "16px",
			top: "-30px",
			"white-space": "nowrap",
			width: "auto",
			left: "50%"
		});
		$(this.caption).css({
			"margin-left": -$(this.caption).outerWidth() / 2
		});
		$(this.captionAfter).css({
			position: "absolute",
			top: "-5px",
			left: "50%",
			"margin-left": "-8px",
			"background-image": "url(" + uiBaseURL + "span.png)"
		})
	},
	initEvent: function() {
		this.choosedColor = "#505a60";
		this.item.bind(_event._enter,
		function() {
			this.rect.css("background", "#ffffff")
		}.bind(this));
		this.item.bind(_event._leave,
		function() {
			this.rect.css("background", this.choosedColor)
		}.bind(this));
		this.item.bind(_event._end,
		function() {
			thumbnail.gotoItemByIndex(this.index)
		}.bind(this));
		this.item.bind(_event._over,
		function() {
			this.caption.css("display", "block");
			this.captionAfter.css("display", "block")
		}.bind(this));
		this.item.bind(_event._leave,
		function() {
			this.caption.hide();
			this.captionAfter.hide()
		}.bind(this))
	},
	show: function() {
		this.rect.css("background", "#ffffff");
		this.choosedColor = "#ffffff";
		this.dockMenu.show()
	},
	hide: function() {
		this.rect.css("background", "#505a60");
		this.choosedColor = "#505a60";
		this.dockMenu.hide()
	},
	clearHighLight: function() {
		this.dockMenu.clearHighLight()
	},
	setHighLight: function(b) {
		this.dockMenu.setHighLight(b)
	},
	onResize: function() {
		this.dockMenu.resize()
	}
});
var CatalogPage = Class({
	create: function(b) {
		this.bookType = BookType.catalog_book;
		this.pageStatu = !1;
		this.corner = "tr";
		this.pageIndex = 1;
		this.isHardPage = !1;
		this.pageVisible = !0;
		this.width = 300;
		this.height = 400;
		this.maskWidth = 500;
		this.isLastPageReset = !1;
		this.page = $("<div class='paper'></div>");
		this.maskA = $("<div class='pageMask'></div>");
		this.maskB = $("<div class='pageMask'></div>");
		this.sideAPosition = $("<div class='sidePosition'></div>");
		this.sideBPosition = $("<div class='sidePosition'></div>");
		this.flipBackShadow = $("<div class='backShadow'></div>");
		this.flipFrontShadow = $("<div class='frontShadow'></div>");
		this.flipEdgeShadow = $("<div style='width:100%;height:100%;position:absolute;'></div>");
		this.flipBackShadow.css({
			"backface-visibility": "hidden",
			"-webkit-backface-visibility": "hidden",
			"-moz-backface-visibility": "hidden",
			"-ms-backface-visibility": "hidden"
		});
		this.flipFrontShadow.css({
			"backface-visibility": "hidden",
			"-webkit-backface-visibility": "hidden",
			"-moz-backface-visibility": "hidden",
			"-ms-backface-visibility": "hidden"
		});
		parseBool(bookConfig.RightToLeft) ? (this.sideA = new CatalogSide(this.sideAPosition, !0), this.sideB = new CatalogSide(this.sideBPosition, !1)) : (this.sideA = new CatalogSide(this.sideAPosition, !1), this.sideB = new CatalogSide(this.sideBPosition, !0));
		this.page.append(this.flipBackShadow);
		b.append(this.page);
		this.page.append(this.maskA);
		this.page.append(this.maskB);
		this.maskA.append(this.sideAPosition);
		this.maskB.append(this.sideBPosition);
		this.sideAPosition.append(this.sideA.side);
		this.sideBPosition.append(this.sideB.side); ! 0 == $.browser.mozilla && (this.maskA.css("border-top", "1px solid transparent"), this.maskB.css("border-top", "1px solid transparent"));
		this.currentPoint = new Point(0, 0)
	},
	beginFlip: function(b) {
		this.corner = b;
		this.isLeft() ? (parseBool(bookConfig.RightToLeft) ? this.sideB.sideAddChild(this.flipFrontShadow) : this.sideA.sideAddChild(this.flipFrontShadow), this.maskA.append(this.flipEdgeShadow), this.pageStatu = !0) : (parseBool(bookConfig.RightToLeft) ? this.sideA.sideAddChild(this.flipFrontShadow) : this.sideB.sideAddChild(this.flipFrontShadow), this.maskB.append(this.flipEdgeShadow), this.pageStatu = !1);
		1 >= catalogBook.gotoPageIndex && (parseBool(bookConfig.RightToLeft) ? catalogBook.bmt.rightBox.hide() : catalogBook.bmt.leftBox.hide());
		catalogBook.gotoPageIndex >= totalPageCount && (parseBool(bookConfig.RightToLeft) ? catalogBook.bmt.leftBox.hide() : catalogBook.bmt.rightBox.hide());
		3 >= catalogBook.gotoPageIndex && catalogBook.leftThickness.setVisible(!1);
		1 >= catalogBook.gotoPageIndex && catalogBook.leftFlipShotBar.setVisible(!1);
		catalogBook.gotoPageIndex >= totalPageCount - 2 && catalogBook.rightThickness.setVisible(!1);
		catalogBook.gotoPageIndex >= totalPageCount && catalogBook.rightFlipShotBar.setVisible(!1);
		this.maskA.css({
			width: this.maskWidth + "px",
			height: this.height + "px"
		});
		this.maskB.css({
			width: this.maskWidth + "px",
			height: this.height + "px"
		});
		catalogBook.normalBookShadow.hideShadow()
	},
	endFlip: function() {
		this.hideShadow();
		this.pageStatu = this.isLeft() ? !1 : !0;
		this.sideA.showGray();
		this.sideB.showGray();
		catalogBook.normalBookShadow.showShadow()
	},
	flipToPoint: function(b, c, d) {
		c = 0;
		if (this.isHardPage) this.hardFlip(b, d);
		else {
			this.maskA.css({
				overflow: "hidden"
			});
			this.maskB.css({
				overflow: "hidden"
			});
			isLeftCorner = this.isLeft();
			isBottomCorner = this.isBottom();
			d && (this.showShadow(), this.page.css({
				left: isLeftCorner ? "0px": this.width + "px"
			}), this.sideAPosition.css({
				right: isLeftCorner ? "0px": "auto",
				left: isLeftCorner ? "auto": "0px",
				top: isBottomCorner ? "auto": "0px",
				bottom: isBottomCorner ? "0px": "auto"
			}), this.sideBPosition.css({
				right: isLeftCorner ? "0px": "auto",
				left: isLeftCorner ? "auto": "0px",
				top: isBottomCorner ? "auto": "0px",
				bottom: isBottomCorner ? "0px": "auto"
			}), parseBool(bookConfig.RightToLeft) ? this.setSideUp(!isLeftCorner) : this.setSideUp(isLeftCorner), isLeftCorner ? this.sideA.hideGray() : this.sideB.hideGray());
			d = Point(0, 0);
			var e = Point(0, 0),
			f = this.sideAPosition;
			switch (this.corner) {
			case "tl":
				b /= 2;
				this.rotateElement(this.maskA, "100% 0%", translate(b, c));
				this.rotateElement(this.maskB, "100% 0%", translate(b, c));
				parseBool(bookConfig.RightToLeft) ? (this.rotateElement(this.sideAPosition, "100% 0%", translate( - b, c)), this.rotateElement(this.sideBPosition, "100% 0%", translate( - this.width + b, c))) : (this.rotateElement(this.sideBPosition, "100% 0%", translate( - b, c)), this.rotateElement(this.sideAPosition, "100% 0%", translate( - this.width + b, c)));
				d.x = -this.width + b;
				d.y = c;
				e.x = b;
				e.y = c;
				f = this.sideAPosition;
				this.setFlipShadowPosition(d, e, f);
				break;
			case "tr":
				b = ( - this.width + b) / 2,
				this.rotateElement(this.maskA, "0% 0%", translate(b, c)),
				this.rotateElement(this.maskB, "0% 0%", translate(b, c)),
				parseBool(bookConfig.RightToLeft) ? (this.rotateElement(this.sideBPosition, "0% 0%", translate( - b, c)), this.rotateElement(this.sideAPosition, "0% 0%", translate(this.width + b, c))) : (this.rotateElement(this.sideAPosition, "0% 0%", translate( - b, c)), this.rotateElement(this.sideBPosition, "0% 0%", translate(this.width + b, c))),
				d.x = this.width + b,
				d.y = c,
				e.x = b,
				e.y = c,
				f = this.sideBPosition,
				this.setFlipShadowPosition(d, e, f)
			}
		}
	},
	setCurrentPoint: function(b, c) {
		this.currentPoint.x = b;
		this.currentPoint.y = c
	},
	setFlipShadowPosition: function(b, c, d) {
		var e = $.browser.prefix;
		if (void 0 != e && null != e) {
			var f = 0 < b.x ? 0 : 1;
			b = 0 < b.x ? (this.width - Math.abs(b.x)) / this.width: Math.abs(b.x) / this.width;
			var g = 0 < c.x ? 0 : 1,
			h = 0 < c.x ? Math.abs(c.x) / this.width: (this.width - Math.abs(c.x)) / this.width;
			c = 1 - Math.abs(c.x) / this.width;
			c = 0.2 < c ? 1 : c / 0.2;
			if ("-webkit-" !== e) {
				fe = b;
				bs = g;
				be = h;
				var k = b > f ? 0.4 * f + 0.6 * fe: 1 - (0.4 * f + 0.6 * fe),
				l = b > f ? 0.1 * f + 0.9 * fe: 1 - (0.1 * f + 0.9 * fe),
				m = b > f ? fe: 1 - fe;
				b_gradientStartV = h > g ? 0.4 * bs + 0.6 * be: 1 - (0.4 * bs + 0.6 * be);
				b_gradientStartV2 = h > g ? 0.1 * bs + 0.9 * be: 1 - (0.1 * bs + 0.9 * be);
				b_gradientAll = h > g ? be: 1 - be;
				angleShadowB = h > g ? 0 : 180;
				this.flipFrontShadow.css({
					"background-image": e + "linear-gradient( " + (b > f ? 0 : 180) + "deg,  rgba(0,0,0,0) " + 100 * k + "%, rgba(0,0,0," + 0.2 * c + ") " + 100 * l + "%, rgba(0,0,0,0)" + 100 * m + "%)"
				});
				this.flipBackShadow.css({
					"background-image": e + "linear-gradient( " + angleShadowB + "deg,  rgba(0,0,0,0) " + 100 * b_gradientStartV + "%, rgba(0,0,0," + 0.2 * c + ") " + 100 * b_gradientStartV2 + "%, rgba(0,0,0," + 0.4 * c + ") " + 100 * b_gradientAll + "%)"
				})
			} else this.flipFrontShadow.css({
				"background-image": e + "gradient(linear, " + 100 * f + "% 0%, " + 100 * b + "% 0% ,color-stop(0.1,rgba(0,0,0,0)), color-stop(0.2, rgba(0,0,0,0)), color-stop(0.7,rgba(0,0,0," + 0.25 * c + ")), color-stop(0.9, rgba(0,0,0," + 0.35 * c + ")), to(rgba(0,0,0,0)))"
			}),
			this.flipBackShadow.css({
				"background-image": e + "gradient(linear, " + 100 * g + "% 0%, " + 100 * h + "% 0%,color-stop(0.1,rgba(0,0,0,0)), color-stop(0.2, rgba(0,0,0," + 0 * c + ")), color-stop(0.6,rgba(0,0,0," + 0.25 * c + ")), to(rgba(0,0,0," + 0.35 * c + ")))"
			});
			d.css({
				"-webkit-box-shadow": "0 0 20px rgba(40, 40, 40, 0.5)",
				"-moz-box-shadow": "0 0 20px rgba(40, 40, 40, 0.5)",
				"-o-box-shadow": "0 0 20px rgba(40, 40, 40, 0.5)",
				"-ms-box-shadow": "0 0 20px rgba(40, 40, 40, 0.5)",
				"box-shadow": "0 0 20px rgba(40, 40, 40, 0.5)"
			})
		}
	},
	resetPage: function(b) {
		var c = this;
		this.isHardPage && (this.sideA.imgFlipOver(!1), this.sideB.imgFlipOver(!1), this.isLastPageReset || this.pageIndex + 1 != totalPageCount ? c.page.css({
			"-webkit-transform-style": "flat",
			"-moz-transform-style": "flat",
			"transform-style": "flat",
			"-webkit-transform": "rotateY(0deg)",
			"-moz-transform": "rotateY(0deg)",
			"-o-transform": "rotateY(0deg)",
			"-ms-transform": "rotateY(0deg)",
			transform: "rotateY(0deg)"
		}) : (this.isLastPageReset = !0, window.setTimeout(function() {
			c.page.css({
				"-webkit-transform-style": "flat",
				"-moz-transform-style": "flat",
				"transform-style": "flat",
				"-webkit-transform": "rotateY(0deg)",
				"-moz-transform": "rotateY(0deg)",
				"-o-transform": "rotateY(0deg)",
				"-ms-transform": "rotateY(0deg)",
				transform: "rotateY(0deg)"
			})
		},
		10)));
		this.page.css({
			left: b ? "0px": this.width + "px"
		});
		this.maskA.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto",
			width: this.width,
			height: this.height
		});
		this.maskB.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto",
			width: this.width,
			height: this.height
		});
		this.rotateElement(this.maskA, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.maskB, "0% 0%", translate(0, 0) + rotate(0));
		this.sideAPosition.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto"
		});
		this.sideBPosition.css({
			top: "0px",
			left: "0px",
			bottom: "auto",
			right: "auto"
		});
		this.rotateElement(this.sideAPosition, "0% 0%", translate(0, 0) + rotate(0));
		this.rotateElement(this.sideBPosition, "0% 0%", translate(0, 0) + rotate(0))
	},
	translateNull: function(b) {
		b.css({
			"-webkit-transform": "",
			"-moz-transform": "",
			"-ms-transform": "",
			"-o-transform": "",
			transform: ""
		})
	},
	showShadow: function() {
		this.flipFrontShadow.css({
			display: "block"
		});
		this.flipBackShadow.css({
			display: "block"
		});
		this.flipEdgeShadow.css({
			display: "block"
		})
	},
	hideShadow: function() {
		this.flipFrontShadow.css({
			display: "none"
		});
		this.flipBackShadow.css({
			display: "none"
		});
		this.flipEdgeShadow.css({
			display: "none"
		});
		this.sideBPosition.css({
			"-webkit-box-shadow": "0 0 10px rgba(40, 40, 40, 0)",
			"-moz-box-shadow": "0 0 10px rgba(40, 40, 40, 0)",
			"-o-box-shadow": "0 0 10px rgba(40, 40, 40, 0)",
			"-ms-box-shadow": "0 0 10px rgba(40, 40, 40, 0)",
			"box-shadow": "0 0 10px rgba(40, 40, 40, 0)"
		});
		this.sideAPosition.css({
			"-webkit-box-shadow": "0 0 10px rgba(40, 40, 40, 0)",
			"-moz-box-shadow": "0 0 10px rgba(40, 40, 40, 0)",
			"-o-box-shadow": "0 0 10px rgba(40, 40, 40, 0)",
			"-ms-box-shadow": "0 0 10px rgba(40, 40, 40, 0)",
			"box-shadow": "0 0 10px rgba(40, 40, 40, 0)"
		})
	},
	getShow: function() {
		return this.page.is(":visible") ? !0 : !1
	},
	show: function() {
		this.page.css("display", "block")
	},
	hide: function() {
		this.page.css("display", "none")
	}
}).extend(normalPage);
var CatalogBook = Class({
	create: function(b) {
		this._super(b);
		this.thicknessWidth = 18;
		this.guidBar = new GuidToolbar(b);
		this.controlBar = new catalogControlBar(b);
		this.controlBar.setPosition((windowWidth - this.controlBar.width) / 2, toolBar.getBottomHeight() + 5, ["left", "bottom"]);
		this.controlBar.setVisible(!1);
		this.initLogo();
		this.initEvent();
		this.guidBarHeight = "lite" == bookConfig.ToolbarViewMode.toLowerCase() ? 50 : 0
	},
	initLogo: function() {
		bookConfig.appLogoIcon && "" != bookConfig.appLogoIcon && (this.logo = $("<img src='" + bookConfig.appLogoIcon + "'/>"), this.logo.css({
			position: "absolute",
			left: bookConfig.logoPadding + "px",
			top: bookConfig.logoTop + "px",
			height: bookConfig.logoHeight + "px",
			cursor: "pointer",
			"z-index": "95"
		}), this.logo.click(function() {
			var b = getLogoLink();
			window.open(b[0], b[1]);
			return ! 1
		}), tmpContainer.append(this.logo))
	},
	createBook: function(b) {
		this.flipBook = $("<div class='flipBook' id='flipBook' ></div>");
		"android" == device.name ? (this.previousPage = new androidPage(this.flipBook), this.currentPage = new androidPage(this.flipBook), this.nextPage = new androidPage(this.flipBook), this.currentPage2 = new androidPage(this.flipBook)) : (this.previousPage = new CatalogPage(this.flipBook), this.currentPage = new CatalogPage(this.flipBook), this.currentPage2 = new CatalogPage(this.flipBook), this.nextPage = new CatalogPage(this.flipBook));
		this.leftThickness = new thickness(!0);
		this.rightThickness = new thickness(!1);
		this.leftFlipShotBar = new flipShotBar(!0);
		this.rightFlipShotBar = new flipShotBar(!1);
		this.normalBookShadow = new bookShadow(this.pageWidth, this.pageHeight, this.flipBook);
		this.bmt = new initBookMarkTab(this.flipBook);
		this.init1 = 50;
		b.append(this.flipBook);
		this.flipBook.append(this.leftThickness.getContainer());
		this.flipBook.append(this.rightThickness.getContainer());
		this.flipBook.append(this.leftFlipShotBar.getContainer());
		this.flipBook.append(this.rightFlipShotBar.getContainer());
		this.currentPageIndex = oriPageIndex;
		this.fillNearPage(this.currentPageIndex);
		setCurrentIndexTextField(this.currentPageIndex, !0);
		1 >= this.currentPageIndex && this.bmt.leftBox.hide();
		this.currentPageIndex >= totalPageCount && this.bmt.rightBox.hide();
		3 >= this.currentPageIndex && this.leftThickness.setVisible(!1);
		1 >= this.currentPageIndex && this.leftFlipShotBar.setVisible(!1);
		this.currentPageIndex >= totalPageCount - 2 && this.rightThickness.setVisible(!1);
		this.currentPageIndex >= totalPageCount && this.rightFlipShotBar.setVisible(!1);
		this.resetPageZIndex();
		isTouchDevice() || this.initZoomHintTimer(b);
		this.showSideId()
	},
	onResize: function(b, c) {
		this.autoMove && this.clearAutoMoveCorner();
		if (nBookStatu == normalBookStatu.book_statu_ready && !0 != this.isFlipping && !0 != this.isZomming) {
			thumbnail.hideBox();
			this.zoomOut = !0;
			this.mode = "simple";
			this.translateNull(this.flipBook);
			this.width = 2 * b;
			this.height = c;
			this.pageWidth = b;
			this.pageHeight = c;
			this.maskWidth = b;
			this.fitW = this.width;
			this.flipBook.css({
				width: this.width + "px",
				height: this.height + "px"
			});
			this.previousPage.onResize(b, c, this.maskWidth, 0);
			this.currentPage.onResize(b, c, this.maskWidth, 0);
			this.currentPage2.onResize(b, c, this.maskWidth, b);
			this.nextPage.onResize(b, c, this.maskWidth, b);
			this.leftThickness.onResize(this.thicknessWidth, c);
			this.rightThickness.onResize(this.thicknessWidth, c);
			this.leftFlipShotBar.onResize(50, c);
			this.rightFlipShotBar.onResize(50, c);
			normalEventRadius = Math.pow(Math.ceil(1 * b / 3), 2);
			this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, 1 != this.currentPageIndex && this.currentPageIndex != totalPageCount);
			this.normalBookShadow.setPosition(1 == this.currentPageIndex ? b: 0, 0);
			this.bmt.resize(c, 60);
			var d = this.flipBook.css("left"),
			e = this.flipBook.css("top");
			this.adContainer.css({
				left: d,
				top: e,
				width: b + "px",
				height: c + "px"
			});
			this.adInstance && this.adInstance.resize();
			this.guidBar.onResize();
			this.controlBar && (this.controlBar.setPosition((windowWidth - this.controlBar.width) / 2, toolBar.getBottomHeight() + 5, ["left", "bottom"]), this.controlBar.setVisible(!1));
			this.leftThickness.visible && this.leftThickness.showThickness();
			this.rightThickness.visible && this.rightThickness.showThickness();
			this.leftFlipShotBar.visible && this.leftFlipShotBar.showThickness();
			this.rightFlipShotBar.visible && this.rightFlipShotBar.showThickness();
			window.setTimeout(function() {
				this.sideArray = [];
				this.setShowOrHide(this.sideArray);
				this.endReset();
				void 0 === this.autoMove && this.autoMoveCorner()
			}.bind(this), 10)
		}
	},
	resetSize: function(b, c) {
		this.autoMove && this.clearAutoMoveCorner();
		if (nBookStatu == normalBookStatu.book_statu_ready && !0 != this.isFlipping && !0 != this.isZomming) {
			this.width = 2 * b;
			this.height = c;
			this.pageWidth = b;
			this.pageHeight = c;
			this.maskWidth = b;
			this.flipBook.css({
				width: this.width + "px",
				height: this.height + "px"
			});
			this.previousPage.onResize(b, c, this.maskWidth, 0);
			this.currentPage.onResize(b, c, this.maskWidth, 0);
			this.currentPage2.onResize(b, c, this.maskWidth, b);
			this.nextPage.onResize(b, c, this.maskWidth, b);
			this.leftThickness.onResize(this.thicknessWidth, c);
			this.rightThickness.onResize(this.thicknessWidth, c);
			normalEventRadius = Math.pow(Math.ceil(1 * b / 3), 2);
			this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, 1 != this.currentPageIndex && this.currentPageIndex != totalPageCount);
			this.normalBookShadow.setPosition(1 == this.currentPageIndex ? b: 0, 0);
			this.bmt.resize(c, 60);
			var d = this.flipBook.css("left"),
			e = this.flipBook.css("top");
			this.adContainer.css({
				left: d,
				top: e,
				width: b + "px",
				height: c + "px"
			});
			this.adInstance && this.adInstance.resize()
		}
	},
	zoomToPage: function(b, c) {
		this.autoMove && this.clearAutoMoveCorner();
		if (0 == nBookStatu && (this.resetPageCorner(), !(this.moveing || this.moveFromLeft || this.moveFromRight) && nBookStatu == normalBookStatu.book_statu_ready && !0 != this.isFlipping && !0 != this.isZomming)) {
			this.reShowOrHide(this.sideArray, !0);
			void 0 == this.zoomOut && (this.zoomOut = !0);
			this.leftThickness.hideThickness();
			this.rightThickness.hideThickness();
			this.leftFlipShotBar.hideThickness();
			this.rightFlipShotBar.hideThickness();
			var d = Math.min(windowWidth, zoomPageWidth);
			isTouchDevice() && (d = Math.floor(Math.sqrt(1048576 * bookConfig.largePageWidth / bookConfig.largePageHeight)));
			this.pageWidthHeight = this.getFitWH();
			var e = this.pageWidthHeight.x;
			thumbnail.getShowStatu() && (!0 !== this.zoomOut ? thumbnail.noTransparent() : thumbnail.transparent());
			e = !0 == this.zoomOut ? 2 * d / this.width: e / this.width; ! 0 == this.zoomOut ? this.controlBar.setVisible(!0) : this.controlBar.setVisible(!1);
			var f = 0,
			g = 0;
			this.zoomOut || (g = this.getTranY());
			if (!0 == this.zoomOut) {
				var h = 50;
				1 == this.currentPageIndex && (h = 75);
				this.currentPageIndex == totalPageCount && (h = 25);
				g = d * bookConfig.largePageHeight / bookConfig.largePageWidth;
				2 * d <= windowWidth && (b = windowWidth / 2);
				g <= windowHeight && (c = windowHeight / 2);
				f = b - b * d * 2 / windowWidth;
				g = c - c * g / windowHeight;
				f -= parseInt(this.getCssLeft() + this.width * (1 - e) * h / 100);
				g -= parseInt(this.flipBook.css("top"));
				1 == this.currentPageIndex && (d <= windowWidth && (b = windowWidth / 2), f = b - b * d / windowWidth, f -= parseInt(this.getCssLeft() + d + this.width * (1 - e) * h / 100));
				this.currentPageIndex == totalPageCount && (d <= windowWidth && (b = windowWidth / 2), f = b - b * d / windowWidth, f -= parseInt(this.getCssLeft() + this.width * (1 - e) * h / 100))
			}
			this.zoomToScale(e, f, g);
			this.zoomOut = !this.zoomOut
		}
	},
	zoomToScale: function(b, c, d, e) {
		this.autoMove && this.clearAutoMoveCorner();
		if (0 == nBookStatu && (this.resetPageCorner(), !(this.moveing || this.moveFromLeft || this.moveFromRight) && nBookStatu == normalBookStatu.book_statu_ready && !0 != this.isFlipping && !0 != this.isZomming)) {
			this.reShowOrHide(this.sideArray, !0);
			this.isZomming = !0;
			var f = getTransform(this.flipBook[0]),
			g = {
				toScale: 1,
				x: f.x,
				y: f.y
			},
			h = this;
			this.toScale = b;
			var k = 50;
			1 == this.currentPageIndex && (k = 75);
			this.currentPageIndex == totalPageCount && (k = 25);
			c || (c = 0);
			d || (d = 0);
			e || (e = 0);
			c = parseInt(c);
			d = parseInt(d); (function() {
				if (isSupportTransition()) {
					isTouch || (this.currentPage.maskA.css({
						overflow: "visible"
					}), this.currentPage.maskB.css({
						overflow: "visible"
					}), this.currentPage2.maskA.css({
						overflow: "visible"
					}), this.currentPage2.maskB.css({
						overflow: "visible"
					}));
					this.zoomObj(this.flipBook, k + "% " + e + "%", "scale3d(" + b + "," + b + ",1)", c, d);
					var f = function() {
						this.isZomming = !1;
						this.zoomOut ? (this.setPosition(this.getCssLeft() + this.width * (1 - b) * k / 100 + c, this.getCssTop() + this.height * (1 - b) * e / 100 + d), e = d = c = 0) : this.setPosition(this.getCssLeft() + this.width * (1 - b) * k / 100, this.getCssTop());
						this.resetSize(this.width * b / 2, this.height * b);
						this.setThicknessPosition(b);
						this.zoomObj(this.flipBook, "0% 0%", "scale3d(1,1,1)", c, d);
						this.translateNull(this.flipBook);
						this.zoomOut && (this.leftThickness.visible && this.leftThickness.showThickness(), this.rightThickness.visible && this.rightThickness.showThickness(), this.leftFlipShotBar.visible && this.leftFlipShotBar.showThickness(), this.rightFlipShotBar.visible && this.rightFlipShotBar.showThickness())
					}.bind(this);
					animateOnce(this.flipBook, {},
					0.3, f, "%stransform")
				} else $(g).animate({
					toScale: b,
					x: this.width * (1 - b) * k / 100 + c,
					y: d
				},
				{
					duration: 300,
					easing: "easeOutSine",
					step: function() {
						h.zoomObj(h.flipBook, "0% 0%", " scale(" + g.toScale + ")", g.x, g.y)
					},
					complete: function() {
						h.isZomming = !1;
						h.zoomOut ? (h.setPosition(h.getCssLeft() + h.width * (1 - b) * k / 100 + c, h.getCssTop() + h.height * (1 - b) * e / 100 + d), e = d = c = 0) : h.setPosition(h.getCssLeft() + h.width * (1 - b) * k / 100, h.getCssTop());
						h.resetSize(h.width * b / 2, h.height * b);
						h.setThicknessPosition(b);
						h.zoomObj(h.flipBook, "0% 0%", " scale(1)", c, d);
						h.translateNull(h.flipBook);
						h.zoomOut && (h.leftThickness.visible && h.leftThickness.showThickness(), h.rightThickness.visible && h.rightThickness.showThickness(), h.leftFlipShotBar.visible && h.leftFlipShotBar.showThickness(), h.rightFlipShotBar.visible && h.rightFlipShotBar.showThickness())
					}
				})
			}).delay(this, 50)
		}
	},
	getFitWH: function() {
		var b = thumbnail.getShowStatu() ? thumbnail.getHeight() : 0,
		c = Math.max(windowWidth - leftMargin - rightMargin, 1),
		d = 0,
		d = toolBar.visible ? Math.max(windowHeight - topMargin - bottomMargin - b - toolBar.getHeight() + this.guidBarHeight, 1) : Math.max(windowHeight - topMargin - bottomMargin - b - toolBar.getHeight(), 1);
		return pageWidthHeight = getPageWidthHeight(c, d, 2 * bookConfig.largePageWidth, bookConfig.largePageHeight)
	},
	getTranY: function() {
		var b = 0,
		b = thumbnail.getShowStatu() ? thumbnail.getHeight() : 0,
		c = 0;
		toolBar.visible ? (c = Math.max(windowHeight - topMargin - bottomMargin - b - toolBar.getHeight() + this.guidBarHeight, 1), b = topMargin - this.guidBarHeight + toolBar.getTopHeight() + (c - this.pageWidthHeight.y) / 2 - this.getCssTop()) : (c = Math.max(windowHeight - topMargin - bottomMargin - b - toolBar.getHeight(), 1), b = topMargin + (c - this.pageWidthHeight.y) / 2 - this.getCssTop());
		return b
	},
	setThicknessPosition: function(b) {
		b || (b = 1);
		this.leftFlipShotBar.setScale(b);
		this.rightFlipShotBar.setScale(b);
		this.leftThickness.setThicknessPosition( - this.thicknessWidth, 0);
		this.rightThickness.setThicknessPosition(this.flipBook.width() - 1, 0);
		this.leftFlipShotBar.setThicknessPosition( - this.leftFlipShotBar.width, 0);
		this.rightFlipShotBar.setThicknessPosition(this.flipBook.width() - 1, 0)
	},
	setShowOrHide: function(b) {
		isTouch || void 0 == b || null == b || (this.nextPage.getShow() && (this.nextPage.hide(), b.push(this.nextPage.page)), this.previousPage.getShow() && (this.previousPage.hide(), b.push(this.previousPage.page)), parseInt(this.currentPage.maskA.css("z-index")) < parseInt(this.currentPage.maskB.css("z-index")) ? (this.currentPage.maskA.hide(), b.push(this.currentPage.maskA)) : (this.currentPage.maskB.hide(), b.push(this.currentPage.maskB)), parseInt(this.currentPage2.maskA.css("z-index")) < parseInt(this.currentPage2.maskB.css("z-index")) ? (this.currentPage2.maskA.hide(), b.push(this.currentPage2.maskA)) : (this.currentPage2.maskB.hide(), b.push(this.currentPage2.maskB)))
	},
	reShowOrHide: function(b, c) {
		if (!isTouch && void 0 != b && null != b) for (var d = 0; d < b.length; d++) c ? b[d].hide() : b[d].show()
	},
	endReset: function() {
		this.currentPage.translateNull(this.currentPage.maskA);
		this.currentPage.translateNull(this.currentPage.maskB);
		this.currentPage.translateNull(this.currentPage.sideAPosition);
		this.currentPage.translateNull(this.currentPage.sideBPosition);
		this.currentPage2.translateNull(this.currentPage2.maskA);
		this.currentPage2.translateNull(this.currentPage2.maskB);
		this.currentPage2.translateNull(this.currentPage2.sideAPosition);
		this.currentPage2.translateNull(this.currentPage2.sideBPosition);
		this.translateNull(this.flipBook)
	},
	translateNull: function(b) {},
	zoomObj: function(b, c, d, e, f) {
		e || (e = 0);
		f || (f = 0);
		e = translate(e, f);
		b.css({
			"-webkit-transform-origin": c,
			"-moz-transform-origin": c,
			"-ms-transform-origin": c,
			"-o-transform-origin": c,
			"transform-origin": c,
			"-webkit-transform": e + d,
			"-moz-transform": e + d,
			"-ms-transform": e + d,
			"-o-transform": e + d,
			transform: e + d
		})
	},
	getCssLeft: function() {
		return parseInt(this.flipBook.css("left"))
	},
	getCssTop: function() {
		return parseInt(this.flipBook.css("top"))
	},
	getTran: function() {
		return getTransform(this.flipBook[0])
	},
	movetoCenter: function(b, c, d) {
		b = this.resetFrameNum(b, d);
		if (!1 != parseBool(bookConfig.retainBookCenter)) {
			var e = (windowWidth - bookConfig.leftMargin - bookConfig.rightMargin - this.width) / 2 + bookConfig.leftMargin,
			f = e - this.width / 4,
			g = e + this.width / 4,
			h = this.getCssLeft(),
			k = e;
			1 == d && (k = f);
			e = bookConfig.totalPageCount;
			1 == e % 2 && e++;
			d == e && (k = g);
			if (! (10 > Math.abs(k - h))) {
				var l = 0,
				m = this,
				p = m.getCssTop();
				if (0 == b) m.setPosition(iLeft, p);
				else var n = window.setInterval(function() {
					var c = $.easing.easeOutQuart(null, l, h, k - h, b);
					m.setPosition(c, p);
					l++==b && window.clearInterval(n)
				},
				c)
			}
		}
	},
	initEvent: function() {
		var b = this,
		c = Point(0, 0);
		Point(0, 0);
		var d = Point(0, 0),
		e = !1,
		f = !1,
		g = 0,
		h = 0,
		k = isTouchDevice(),
		l = !1,
		m = !1,
		p = null;
		this.flipBook.bind(_event._down,
		function(g) {
			if (bookType == BookType.catalog_book && nBookStatu == normalBookStatu.book_statu_ready && !0 != b.isZomming && !0 != b.isFlipping) {
				b.autoMove && b.clearAutoMoveCorner();
				g = k ? g.originalEvent.touches: [g];
				var h = catalogBook.flipBook[0];
				try {
					h.setCapture ? h.setCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP)
				} catch(m) {}
				k || (h = globalToBook(!0, g[0].pageX, g[0].pageY, !1), p = b.getCornerAndBeginPoint(h)); - 1 != b.inertiaTimer && (window.clearInterval(b.inertiaTimer), b.inertiaTimer = -1);
				h = getTransform(catalogBook.flipBook[0]);
				b.translateX = h.x;
				b.translateY = h.y;
				1 == g.length ? (e = !0, f = !1, c = Point(g[0].pageX, g[0].pageY), Point(b.getLeft(), b.getTop())) : 2 == g.length && (e = !1, f = !0, c = Point(g[0].pageX, g[0].pageY), d = Point(g[1].pageX, g[1].pageY), Point((g[0].pageX + g[1].pageX) / 2, (g[0].pageY + g[1].pageY) / 2), Point(b.getLeft(), b.getTop()));
				l = !1
			}
		});
		this.flipBook.bind(_event._move,
		function(n) {
			l = !0;
			if (bookType == BookType.catalog_book && nBookStatu == normalBookStatu.book_statu_ready && !0 != b.isZomming && !0 != b.isFlipping && !0 != b.isMoving) {
				n = k ? n.originalEvent.touches: [n];
				if (!k && !e) {
					var p = globalToBook(!0, n[0].pageX, n[0].pageY, !1),
					p = b.getCornerAndBeginPoint(p);
					null != p.corner ? ("tl" == p.corner ? (b.autoMove && b.clearAutoMoveCorner(), b.moveLeftCorner()) : "tr" == p.corner && (b.autoMove && b.clearAutoMoveCorner(), b.moveRightCorner()), m = !0, bookContainer.css({
						cursor: "pointer"
					})) : (b.resetPageCorner(), m = !1, bookContainer.css({
						cursor: "default"
					}))
				}
				if (e) {
					if (!1 == b.zoomOut) {
						var p = n[0].pageX - c.x + b.translateX,
						r = n[0].pageY - c.y + b.translateY;
						catalogBook.zoomObj(catalogBook.flipBook, "0% 0%", " scale(1)", p, r);
						g = p;
						h = r;
						b.flipBook.css({
							cursor: "move"
						})
					}
					1 >= Math.abs(n[0].pageX - c.x) && 1 >= Math.abs(n[0].pageY - c.y) && (l = !1)
				} else f ? (p = Point(n[0].pageX, n[0].pageY), r = Point(n[1].pageX, n[1].pageY), n = Math.sqrt(Math.pow(c.x - d.x, 2) + Math.pow(c.y - d.y, 2)), p = Math.sqrt(Math.pow(p.x - r.x, 2) + Math.pow(p.y - r.y, 2)), (p > n && !1 !== catalogBook.zoomOut || p < n && !1 === catalogBook.zoomOut) && catalogBook.zoomToPage()) : !1 == b.zoomOut && b.controlBar.moveByMousePosition && !k && (n = Point(n[0].pageX, n[0].pageY), catalogBook.width <= windowWidth && (n.x = windowWidth / 2), catalogBook.height <= windowHeight && (n.y = windowHeight / 2), p = n.x - n.x * catalogBook.width / windowWidth, r = n.y - n.y * catalogBook.height / windowHeight, p -= parseInt(catalogBook.flipBook.css("left")), r -= parseInt(catalogBook.flipBook.css("top")), 1 == catalogBook.currentPageIndex && (catalogBook.width / 2 <= windowWidth && (n.x = windowWidth / 2), p = n.x - n.x * catalogBook.width / (2 * windowWidth), p = p - parseInt(catalogBook.flipBook.css("left")) - catalogBook.width / 2), catalogBook.currentPageIndex == totalPageCount && (catalogBook.width / 2 <= windowWidth && (n.x = windowWidth / 2), p = n.x - n.x * catalogBook.width / (2 * windowWidth), p -= parseInt(catalogBook.flipBook.css("left"))), b.zoomObj(catalogBook.flipBook, "0% 0%", "scale(1)", p, r), g = p, h = r)
			}
		});
		var n = function(c) {
			if (bookType == BookType.catalog_book) {
				c = k ? c.originalEvent.touches: [c];
				b.translateX = g;
				b.translateY = h;
				b.flipBook.css({
					cursor: ""
				});
				var d = b.flipBook[0];
				try {
					d.releaseCapture ? d.releaseCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP)
				} catch(n) {} ! e || k || l || (null != p && null != p.corner ? "tl" == p.corner ? previousPageFun() : "tr" == p.corner && nextPageFun() : m || (!1 === b.zoomOut ? catalogBook.zoomToPage(0, 0) : catalogBook.zoomToPage(c[0].pageX, c[0].pageY)));
				b.resetPageCorner();
				m = l = f = e = !1;
				p = null
			}
		};
		this.flipBook.bind(_event._end, n);
		this.flipBook.bind(_event._leave, n);
		this.flipBook.speed(this.inertiaMove.bind(this));
		$(bookContainer).bind("mouseover",
		function(c) {
			bookType == BookType.catalog_book && (c = k ? c.originalEvent.touches: [c], c = globalToBook(!0, c[0].pageX, c[0].pageY, !1), p = b.getCornerAndBeginPoint(c))
		});
		setInterval(function() {
			null != p && null != p.corner || b.resetPageCorner()
		},
		20)
	},
	inertiaMove: function(b, c) {
		var d = this;
		if (!0 != this.isZomming) {
			var e;
			e = 120 * windowWidth / 1600;
			if (isTouchDevice()) {
				e = 30 * this.width / this.fitW;
				e = e * windowWidth / 1600;
				if (b < -e && !1 != this.zoomOut) {
					rightToLeft ? previousPageFun() : nextPageFun();
					return
				}
				if (b > e && !1 != this.zoomOut) {
					rightToLeft ? nextPageFun() : previousPageFun();
					return
				}
			}
			if (!1 == this.zoomOut) {
				var f = b,
				g = c,
				h = b / 20,
				k = c / 20,
				l = 0; ! 0 != this.backToCorner() && (window.clearInterval(this.inertiaTimer), this.inertiaTimer = window.setInterval(function() {
					if (!0 == this.isZomming) window.clearInterval(this.inertiaTimer);
					else {
						var b = getTransform(this.flipBook[0]);
						f -= h;
						g -= k;
						b.x += f;
						b.y += g;
						b.x = Math.min( - d.getCssLeft() + 50, b.x);
						b.x = Math.max(windowWidth - d.width - d.getCssLeft() - 50, b.x);
						b.y = Math.min( - d.getCssTop() + 50, b.y);
						b.y = Math.max(windowHeight - d.height - d.getCssTop() - 50, b.y);
						d.zoomObj(catalogBook.flipBook, "0% 0%", "scale(1)", b.x, b.y);
						20 == ++l && (window.clearInterval(this.inertiaTimer), this.backToCorner())
					}
				}.bind(this), 20))
			}
		}
	},
	backToCorner: function() {
		if (!1 == this.zoomOut) {
			var b = -this.getCssLeft() + 50,
			c = windowWidth - this.width - this.getCssLeft() - 50,
			d = -this.getCssTop() + 50,
			e = windowHeight - this.height - this.getCssTop() - 50,
			f = 0,
			g = 0,
			h = function(b, c) {
				b || (b = 0);
				c || (c = 0);
				var d = translate(b, c);
				animateOnce(catalogBook.flipBook, {
					"-webkit-transform": d,
					"-moz-transform": d,
					"-ms-transform": d,
					"-o-transform": d,
					transform: d
				},
				0.2)
			},
			g = getTransform(this.flipBook[0]);
			return g.y > d ? (f = g.x > b ? b: g.x < c ? c: g.x, h(f, d), !0) : g.y < e ? (f = g.x < c ? c: g.x > b ? b: g.x, h(f, e), !0) : g.x > b ? (g.y > d ? (f = b, g = d) : g.y < e ? (f = c, g = d) : (f = b, g = g.y), h(f, g), !0) : g.x < c ? (g.y < e ? (f = c, g = e) : g.y > d ? (f = b, g = e) : (f = c, g = g.y), h(f, g), !0) : !1
		}
	},
	afterGotoPage: function() {
		this.currentPageIndex = this.gotoPageIndex;
		this.currentPage.getSideB().leaveSide();
		this.currentPage2.getSideA().leaveSide();
		this.changePage();
		var b = getShownPage();
		this.currentPage.getSideA().showOrHideYoutube(b);
		this.currentPage.getSideB().showOrHideYoutube(b);
		this.currentPage2.getSideA().showOrHideYoutube(b);
		this.currentPage2.getSideB().showOrHideYoutube(b);
		if (1 == this.currentPageIndex) this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, !1),
		this.normalBookShadow.setPosition(this.pageWidth, 0);
		else {
			if (this.currentPageIndex == totalPageCount) this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, !1);
			else this.normalBookShadow.onResize(this.pageWidth, this.pageHeight, !0);
			this.normalBookShadow.setPosition(0, 0)
		}
		setCurrentIndexTextField(this.currentPageIndex, !0);
		var c = this;
		window.setTimeout(function() {
			3 < c.currentPageIndex && !c.leftThickness.visible && c.leftThickness.setVisible(!0);
			1 < c.currentPageIndex && !c.leftFlipShotBar.visible && c.leftFlipShotBar.setVisible(!0);
			c.currentPageIndex < totalPageCount - 2 && !c.rightThickness.visible && c.rightThickness.setVisible(!0);
			c.currentPageIndex < totalPageCount && !c.rightFlipShotBar.visible && c.rightFlipShotBar.setVisible(!0);
			1 < c.currentPageIndex && c.bmt.leftBox.show();
			c.currentPageIndex < totalPageCount && c.bmt.rightBox.show();
			c.fillNearPage(c.currentPageIndex);
			c.resetPageZIndex();
			thumbButtonEnable && thumbnail.clearHighLight();
			thumbButtonEnable && thumbnail.setHighLight(c.currentPageIndex);
			c.currentPage.getSideB().enterSide();
			c.currentPage2.getSideA().enterSide();
			window.location.hash = "#p=" + c.currentPageIndex;
			var b = c.currentPageIndex,
			e = b;
			1 < b && b < totalPageCount && (e = 0 == b % 2 ? b + "-" + (b + 1) : b - 1 + "-" + b);
			sendvisitinfo(1, e);
			c.bmt.separated(c.currentPageIndex);
			c.showSideId()
		},
		30)
	},
	timer: function(b, c, d, e, f, g, h, k) {
		c = this.resetFrameNum(c, this.gotoPageIndex);
		void 0 == h && (h = !1);
		void 0 == k && (k = !1);
		var l = 0 <= b.indexOf("l"),
		m = 0 <= b.indexOf("t");
		h || (this.currentPage.setCSS({
			"z-index": l ? 7 : 6
		}), this.currentPage2.setCSS({
			"z-index": l ? 6 : 7
		}));
		flipping = !0;
		stopFlip = !1;
		var p = 0;
		Point(0, 0);
		var n = this;
		try {
			window.clearInterval(this.intervalID)
		} catch(q) {}
		this.intervalID = setInterval(function() {
			p++;
			n.flipPoint.x = $.easing.easeOutQuart(null, p, f.x, e.x - f.x, c);
			n.flipPoint.y = $.easing.easeOutQuart(null, p, f.y, e.y - f.y, c);
			g && (n.flipPoint.y = 0.2 * Math.sqrt(Math.pow(n.pageWidth, 2) - Math.pow(l ? n.flipPoint.x - n.pageWidth: n.flipPoint.x, 2)));
			p == c && (n.flipPoint = e);
			if (stopFlip) {
				window.clearInterval(n.intervalID);
				n.betweenPaperCount = l ? -1 : 1;
				n.gotoPageIndex = l ? 2 * Math.floor(n.currentPageIndex / 2 - 1) + 1 : 2 * Math.floor(n.currentPageIndex / 2 + 1);
				var d = Point(l ? 2 * n.pageWidth: -n.pageWidth, m ? 0 : n.pageHeight);
				n.timer(b, n.totalFrame, 20, d, n.flipPoint, !1, !0, !0);
				n.movetoCenter(n.totalFrame, 20, n.gotoPageIndex);
				auto_player.resetTimer();
				window.setTimeout(function() {
					n.sideArray = [];
					n.setShowOrHide(n.sideArray)
				},
				60)
			} else if (n.flippingPage.flipToPoint(n.flipPoint.x, n.flipPoint.y, 1 == p), p >= c) {
				window.clearInterval(n.intervalID);
				flipping = !1;
				if (k || g) n.flippingPage.endFlip(),
				n.afterGotoPage();
				else if (!h) bookMouseDown = !0;
				else if (!g && !k) {
					n.flippingPage.setSideUp(n.flippingPage.isLeft() ? !1 : !0);
					3 < n.currentPageIndex && !n.leftThickness.visible && n.leftThickness.setVisible(!0);
					1 < n.currentPageIndex && !n.leftFlipShotBar.visible && n.leftFlipShotBar.setVisible(!0);
					n.currentPageIndex < totalPageCount - 2 && !n.rightThickness.visible && n.rightThickness.setVisible(!0);
					n.currentPageIndex < totalPageCount && !n.rightFlipShotBar.visible && n.rightFlipShotBar.setVisible(!0);
					1 < n.currentPageIndex && n.bmt.leftBox.show();
					n.currentPageIndex < totalPageCount && n.bmt.rightBox.show();
					if (1 == n.currentPageIndex) n.normalBookShadow.onResize(n.pageWidth, n.pageHeight, !1),
					n.normalBookShadow.setPosition(n.pageWidth, 0);
					else {
						if (n.currentPageIndex == totalPageCount) n.normalBookShadow.onResize(n.pageWidth, n.pageHeight, !1);
						else n.normalBookShadow.onResize(n.pageWidth, n.pageHeight, !0);
						n.normalBookShadow.setPosition(0, 0)
					}
					n.normalBookShadow.showShadow();
					n.flippingPage.endFlip();
					n.resetPageZIndex()
				}
				window.setTimeout(function() {
					n.sideArray = [];
					n.setShowOrHide(n.sideArray);
					n.endReset();
					nBookStatu = normalBookStatu.book_statu_ready;
					resizeBookAfterFlip && onStageResize();
					isTouch || (n.currentPage.maskA.css({
						overflow: "visible"
					}), n.currentPage.maskB.css({
						overflow: "visible"
					}), n.currentPage2.maskA.css({
						overflow: "visible"
					}), n.currentPage2.maskB.css({
						overflow: "visible"
					}))
				},
				60)
			}
		},
		d)
	},
	getCornerAndBeginPoint: function(b) {
		var c = "",
		d = null,
		e = {
			corner: null,
			beginPoint: null
		};
		40 > b.x && 0 < b.x && 0 < b.y && b.y < this.width ? (c = "tl", d = Point(0, 0), e.corner = c, e.beginPoint = d) : b.x > this.width - 40 && b.x < this.width && 0 < b.y && b.y < this.width && (c = "tr", d = Point(this.pageWidth, 0), e.corner = c, e.beginPoint = d);
		return e
	},
	moveLeftCorner: function(b) {
		isTouch || nBookStatu != normalBookStatu.book_statu_ready || !0 == this.isFlipping || !0 == this.isZomming || !1 == this.zoomOut || this.moveFromLeft || this.moveFromRight || (void 0 == this.moveing && (this.moveing = !1), this.moveing || (b || (b = 80), this.moveing = !0, this.reShowOrHide(this.sideArray), this.currentPage.corner = "tl", this.currentPage.beginFlip("tl"), this.smoothToMove(this.currentPage, Point(b, 0), Point(0, 0)), this.moveFromLeft = !0))
	},
	moveRightCorner: function(b) {
		isTouch || nBookStatu != normalBookStatu.book_statu_ready || !0 == this.isFlipping || !0 == this.isZomming || !1 == this.zoomOut || this.moveFromLeft || this.moveFromRight || (void 0 == this.moveing && (this.moveing = !1), this.moveing || (b || (b = 80), this.moveing = !0, this.reShowOrHide(this.sideArray), this.currentPage2.corner = "tr", this.currentPage2.beginFlip("tr"), this.smoothToMove(this.currentPage2, Point( - b + this.width / 2, 0), Point(this.width / 2)), this.moveFromRight = !0))
	},
	resetPageCorner: function() {
		if (!isTouch && nBookStatu == normalBookStatu.book_statu_ready && !0 != this.isFlipping && !0 != this.isZomming && !1 != this.zoomOut && (this.moveFromLeft || this.moveFromRight) && (void 0 == this.moveing && (this.moveing = !1), !this.moveing)) {
			this.moveing = !0;
			this.reShowOrHide(this.sideArray);
			this.currentPage.corner = "tl";
			this.currentPage2.corner = "tr";
			var b = function() {
				this.currentPage.endFlip();
				this.endReset();
				this.currentPage.setSideUp(!1);
				this.moveFromLeft = !1;
				isTouch || (this.currentPage.maskA.css({
					overflow: "visible"
				}), this.currentPage.maskB.css({
					overflow: "visible"
				}))
			}.bind(this),
			c = function() {
				this.currentPage2.endFlip();
				this.endReset();
				this.currentPage2.setSideUp(!0);
				this.moveFromRight = !1;
				isTouch || (this.currentPage2.maskA.css({
					overflow: "visible"
				}), this.currentPage2.maskB.css({
					overflow: "visible"
				}))
			}.bind(this);
			this.moveFromLeft && this.smoothToMove(this.currentPage, Point(0, 0), this.currentPage.currentPoint, b);
			this.moveFromRight && this.smoothToMove(this.currentPage2, Point(this.width / 2, 0), this.currentPage2.currentPoint, c);
			10 < this.autoTimes && this.autoMove && this.clearAutoMoveCorner();
			this.autoTimes++
		}
	},
	smoothToMove: function(b, c, d, e) {
		var f = Point(0, 0),
		g = 20 * parseInt(Math.abs((c.x - d.x) / 4));
		this.autoMove && (g = 1E3);
		0 >= g ? (b.flipToPoint(c.x, c.y, !0), b.setCurrentPoint(c.x, c.y), e && e(), this.moveing = !1) : this.moveInterval = function(g, k) {
			f.x = $.easing.easeInOutQuad(null, g, d.x, c.x - d.x, k);
			f.y = $.easing.easeInOutQuad(null, g, d.y, c.y - d.y, k);
			g == k && (f = c);
			b.flipToPoint(f.x, f.y, 1 == g);
			b.setCurrentPoint(f.x, f.y);
			g >= k && (e && e(), this.moveing = !1)
		}.runInAnimate(this, g)
	},
	flipToPage: function() {},
	gotoSimpleMode: function() {
		if (0 == nBookStatu && (this.resetPageCorner(), !(this.moveing || this.moveFromLeft || this.moveFromRight) && nBookStatu == normalBookStatu.book_statu_ready && !0 != this.isFlipping && !0 != this.isZomming && (this.reShowOrHide(this.sideArray, !0), this.guidBar.show(), toolBar.hide(), thumbnail.getShowStatu() && thumbnail.showshow(), this.controlBar.setPosition((windowWidth - this.controlBar.width) / 2, toolBar.getBottomHeight() + 5, ["left", "bottom"]), this.mode = "simple", !0 === this.zoomOut))) {
			this.pageWidthHeight = this.getFitWH();
			var b = this.getTranY(),
			c = this.pageWidthHeight.x / this.width;
			this.pageWidthHeight.x == this.width && 0 == b || this.zoomToScale(c, 0, b)
		}
	},
	gotoComplexMode: function() {
		if (0 == nBookStatu && (this.resetPageCorner(), !(this.moveing || this.moveFromLeft || this.moveFromRight) && nBookStatu == normalBookStatu.book_statu_ready && !0 != this.isFlipping && !0 != this.isZomming && (this.reShowOrHide(this.sideArray, !0), !0 == toolBar.visible ? toolBar.hide() : toolBar.show(), thumbnail.getShowStatu() && thumbnail.showshow(), this.controlBar.setPosition((windowWidth - this.controlBar.width) / 2, toolBar.getBottomHeight() + 5, ["left", "bottom"]), this.mode = "complex", this.guidBar.hide(), !0 === this.zoomOut))) {
			this.pageWidthHeight = this.getFitWH();
			var b = this.getTranY(),
			c = this.pageWidthHeight.x / this.width;
			this.pageWidthHeight.x == this.width && 0 == b || this.zoomToScale(c, 0, b)
		}
	},
	autoMoveCorner: function() {
		this.autoMoveInterval;
		this.autoTimes = 0;
		1 == this.currentPageIndex ? (this.autoMove = !0, this.autoMoveInterval = function() {
			1 != this.currentPageIndex && this.clearAutoMoveCorner();
			if (!0 == this.moveFromRight) this.resetPageCorner();
			else {
				var b = Math.ceil(50 * Math.random() + 30);
				this.moveRightCorner(b)
			}
		}.interval(this, 20)) : this.clearAutoMoveCorner()
	},
	clearAutoMoveCorner: function() {
		this.autoMoveInterval && this.autoMoveInterval.stop();
		this.autoMove = !1
	}
}).extend(normalBook),
GuidToolbar = Class({
	create: function(b) {
		this.background = $("<div style='position:absolute;'></div>");
		this.numBtn = $("<div style='position:absolute;color:#bababa;' id='guidPageIndex'></div>");
		this.thumBtn = $("<div style='position:absolute;'  class='guidbutton'></div>");
		this.moreBtn = $("<div style='position:absolute;'  class='guidbutton'></div>");
		this.fullscreenBtn = $("<div style='position:absolute;'  class='guidbutton'></div>");
		this.searchBtn = $("<div style='position:absolute;' class='guidbutton'></div>");
		this.buttonColor = bookConfig.iconColor;
		this.toolBarColor = "#f6f6f6";
		this.iconWidth = 38;
		this.numWidth = 60;
		this.fontSize = 38;
		$(this.background).css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 40, 40, 0.5)",
			"-moz-box-shadow": "0 0 5px rgba(40, 40, 40, 0.5)",
			"-o-box-shadow": "0 0 5px rgba(40, 40, 40, 0.5)",
			"-ms-box-shadow": "0 0 5px rgba(40, 40, 40, 0.5)",
			"box-shadow": "0 0 5px rgba(40, 40, 40, 0.5)"
		});
		b.append(this.background);
		this.background.append(this.searchBtn);
		this.background.append(this.numBtn);
		this.background.append(this.thumBtn);
		this.background.append(this.moreBtn);
		this.background.append(this.fullscreenBtn);
		this.thumBtn.addCssSprite(toolBarIconsURL[42], "thumb", 38, 38, catalogIconInfo);
		this.moreBtn.addCssSprite(toolBarIconsURL[42], "more", 38, 38, catalogIconInfo);
		this.fullscreenBtn.addCssSprite(toolBarIconsURL[42], "fullScreen", 38, 38, catalogIconInfo);
		this.searchBtn.addCssSprite(toolBarIconsURL[42], "search", 38, 38, catalogIconInfo);
		this.thumBtn.attr("id", "thumb");
		this.moreBtn.attr("id", "more");
		this.fullscreenBtn.attr("id", "fullScreen");
		this.searchBtn.attr("id", "search");
		this.thumBtn.enterToChange(toolBarIconsURL[42], "thumb", 38, 38, catalogIconInfo);
		this.moreBtn.enterToChange(toolBarIconsURL[42], "more", 38, 38, catalogIconInfo);
		this.fullscreenBtn.enterToChange(toolBarIconsURL[42], "fullScreen", 38, 38, catalogIconInfo);
		this.searchBtn.enterToChange(toolBarIconsURL[42], "search", 38, 38, catalogIconInfo);
		this.resetItem();
		this.initEvent()
	},
	resetItem: function() {
		var b = 12;
		this.numBtn.css({
			width: this.numWidth + "px",
			height: this.iconWidth + "px",
			"line-height": this.iconWidth + "px",
			verticalAlign: "middle",
			textAlign: "center",
			"font-family": "arial,tahoma,sans-serif",
			left: b + "px"
		});
		b += this.numWidth;
		searchButtonEnable ? (this.searchBtn.css({
			width: this.iconWidth + "px",
			height: this.iconWidth + "px",
			left: b + "px"
		}), b += this.iconWidth) : this.searchBtn.hide();
		thumbButtonEnable ? (this.thumBtn.css({
			width: this.iconWidth + "px",
			height: this.iconWidth + "px",
			left: b + "px"
		}), b += this.iconWidth) : this.thumBtn.hide();
		this.moreBtn.css({
			width: this.iconWidth + "px",
			height: this.iconWidth + "px",
			left: b + "px"
		});
		b += this.iconWidth;
		userConfig.fullscreenButtonVisible ? (this.fullscreenBtn.css({
			width: this.iconWidth + "px",
			height: this.iconWidth + "px",
			left: b + "px"
		}), b += this.iconWidth) : this.fullscreenBtn.hide();
		this.background.css({
			width: b + "px",
			height: this.iconWidth + "px",
			top: "5px",
			left: (windowWidth - b) / 2,
			"border-radius": "3px",
			background: this.toolBarColor,
			"z-index": "1000"
		});
		this.buttonWidth = b
	},
	initEvent: function() {
		var b = this,
		c = 5,
		d, e = !1;
		if (thumbButtonEnable) {
			var f = function() {
				catalogBook.autoMove && catalogBook.clearAutoMoveCorner();
				if (0 == nBookStatu && (catalogBook.resetPageCorner(), !(catalogBook.moveing || catalogBook.moveFromLeft || catalogBook.moveFromRight) && nBookStatu == normalBookStatu.book_statu_ready && !1 !== catalogBook.zoomOut && !0 != catalogBook.isFlipping && !0 != catalogBook.isZomming)) {
					catalogBook.reShowOrHide(catalogBook.sideArray, !0);
					thumbnail.showOrHide();
					catalogBook.pageWidthHeight = catalogBook.getFitWH();
					var b = catalogBook.getTranY();
					if (catalogBook.pageWidthHeight.x !== catalogBook.width || 0 != b) return catalogBook.zoomToScale(catalogBook.pageWidthHeight.x / catalogBook.width, 0, b),
					!1
				}
			};
			this.thumBtn.bind(_event._end, f);
			$("#btnThumb").unbind();
			$("#btnThumb").bind(_event._end, f)
		}
		userConfig.fullscreenButtonVisible && (f = function() {
			var b = $("body")[0];
			fullScreenApi.supportsFullScreen ? fullScreenApi.isFullScreen() ? fullScreenApi.cancelFullScreen() : (fullScreenApi.requestFullScreen(b),
			function() {
				$("#btnThumb").trigger(_event._end);
				$("#btnThumb").trigger(_event._leave)
			}.delay(1E3)) : b.webkitSupportsFullscreen && b.webkitEnterFullscreen(Element.ALLOW_KEYBOARD_INPUT);
			"lite" == bookConfig.ToolbarViewMode.toLowerCase() && toolBar.hide();
			return ! 1
		},
		this.fullscreenBtn.bind(_event._end, f), $("#btnfullscreen").unbind(), $("#btnfullscreen").bind(_event._end, f), $(document).bind(fullScreenApi.fullScreenEventName,
		function() {
			b.changeFullscreenIcon(fullScreenApi.isFullScreen())
		}));
		this.moreBtn.bind(_event._end,
		function() {
			catalogBook.autoMove && catalogBook.clearAutoMoveCorner();
			catalogBook.gotoComplexMode();
			"complex" == catalogBook.mode && (c = 5, h(), g());
			return ! 1
		}.bind(this));
		searchButtonEnable && this.searchBtn.bind(_event._end,
		function() {
			$("#btnSearch").trigger(_event._end);
			$("#btnSearch").trigger(_event._leave)
		});
		var g = function() {
			if (!0 != e) {
				e = !0;
				for (var b = 0; b < toolBar.timmingArray.length; b++) toolBar.timmingArray[b].bind(_event._over,
				function() {
					window.clearInterval(d)
				}),
				toolBar.timmingArray[b].bind(_event._leave,
				function() {
					c = 5;
					h()
				})
			}
		},
		h = function() {
			d = window.setInterval(function() {
				c--;
				0 >= c && (catalogBook.gotoSimpleMode(), "simple" == catalogBook.mode ? window.clearInterval(d) : c = 5)
			},
			1E3)
		}
	},
	changeFullscreenIcon: function(b) {
		b ? (this.fullscreenBtn.changeCssSprite(toolBarIconsURL[42], "exitFullScreen", 35, 35, catalogIconInfo), this.fullscreenBtn.attr("id", "exitFullScreen")) : (this.fullscreenBtn.changeCssSprite(toolBarIconsURL[42], "fullScreen", 35, 35, catalogIconInfo), this.fullscreenBtn.attr("id", "fullScreen"));
		this.fullscreenBtn.css({
			background: "transparent"
		})
	},
	show: function() {
		this.background.show();
		catalogBook.logo && catalogBook.logo.show()
	},
	hide: function() {
		this.background.hide();
		catalogBook.logo && catalogBook.logo.hide()
	},
	onResize: function() {
		this.background.css({
			left: (windowWidth - this.buttonWidth) / 2
		})
	}
});
isPhone() && (loadToolBar = Class({
	create: function(b, c) {
		this.visible = !1;
		this.icons = c;
		this.topBG = $("<div class='pbTopBar' id='pbTopBar' style='font-family:Arial,sans-serif;'></div>");
		this.toolBG = $("<div class='pbToolBar' id='pbToolBar' style='font-family:Arial,sans-serif;'></div>");
		this.btnThumb = $("<div title='Thumbnails'  id='btnThumb' class='phoneMoreButton'></div>");
		this.btnMore = $("<div title='More'  id='btnMore' class='phoneMoreButton' ></div>");
		this.btnPre = $("<div title='Previous Page' id='btnPre' class='phonebutton' ></div>");
		this.btnNext = $("<div title='Next Page' id='btnNext' class='phonebutton' ></div>");
		this.btnGotoPage = $("<div title='Go To Page' id='btnGotoPage' class='phonebutton' ></div>");
		this.btnZoom = $("<div title='Zoom'  id='btnZoom'  class='phonebutton'></div>");
		this.btnAutoPlay = $("<div title='Auto play' id='btnAutoPlay' class='phonebutton'></div>");
		this.mainColor = bookConfig.toolbarColor;
		this.logo = $("<img src='" + bookConfig.appLogoIcon + "' style='cursor:pointer;position:absolute;'/>");
		b.append(this.topBG);
		b.append(this.toolBG);
		this.topBG.append(this.logo);
		this.topBG.append(this.btnThumb);
		this.topBG.append(this.btnMore);
		this.toolBG.append(this.btnPre);
		this.toolBG.append(this.btnNext);
		this.toolBG.append(this.btnGotoPage);
		isPhoneBook() || this.toolBG.append(this.btnZoom);
		this.toolBG.append(this.btnAutoPlay);
		this.initToolBar();
		thumbButtonEnable ? thumbnail = new thumbnailBar(tmpContainer) : this.btnThumb.hide();
		userConfig.autoPlayButtonVisible || this.btnAutoPlay.hide();
		global.phoneGotoPagePanel = new phoneGotoPage(tmpContainer);
		this.initEvent();
		this.visible = !1;
		this.initFoldingMenu()
	},
	initToolBar: function() {
		this.btnMore.addCssSprite(phoneIconsURL[0], "more", 25, 25, phoneIconInfo);
		this.btnThumb.addCssSprite(phoneIconsURL[0], "thumb", 25, 25, phoneIconInfo);
		this.btnPre.addCssSprite(phoneIconsURL[0], "prev", 25, 25, phoneIconInfo);
		this.btnNext.addCssSprite(phoneIconsURL[0], "next", 25, 25, phoneIconInfo);
		this.btnGotoPage.addCssSprite(phoneIconsURL[0], "gotoPage", 25, 25, phoneIconInfo);
		this.btnZoom.addCssSprite(phoneIconsURL[0], "zoomIn", 25, 25, phoneIconInfo);
		this.btnAutoPlay.addCssSprite(phoneIconsURL[0], "autoPlay", 25, 25, phoneIconInfo);
		this.btnMore.attr("title", getLanguage("btnMoreOptionsLeft", "More"));
		this.btnThumb.attr("title", getLanguage("btnThumb", "Thumb"));
		this.btnPre.attr("title", getLanguage("btnPrePage", "pre"));
		this.btnNext.attr("title", getLanguage("btnNextPage", "next"));
		this.btnGotoPage.attr("title", getLanguage("btnGotoPage", "Go To Page"));
		this.btnZoom.attr("title", getLanguage("btnZoomIn", "zoom in"));
		this.btnAutoPlay.attr("title", getLanguage("btnAutoFlip", "Auto flip"));
		$(this.toolBG).css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-moz-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-o-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)"
		});
		$(this.topBG).css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-moz-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-o-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)"
		});
		this.barWidth = windowWidth;
		this.barHeight = 40;
		this.toolBG.css({
			width: this.barWidth + "px",
			height: this.barHeight + "px"
		});
		this.topBG.css({
			width: this.barWidth + "px",
			height: this.barHeight + "px",
			color: "#ffffff",
			"line-height": this.barHeight + "px"
		});
		var b = colorDiv(this.mainColor, 30),
		c = colorAdd(this.mainColor, 30);
		this.topBG.css("background", this.mainColor);
		this.toolBG.css("background", this.mainColor);
		this.topBG.css("border-bottom", "1px solid " + b);
		this.toolBG.css("border-top", "1px solid " + c);
		var d = getLogoLink();
		$(this.logo).click(function() {
			3 == browserType ? window.location = d[0] : window.open(d[0], d[1])
		})
	},
	initFoldingMenu: function() {
		searchButtonEnable || bookmarkButtonEnable || shareButtonEnable || userConfig.downloadButtonVisible || userConfig.printButtonVisible || userConfig.homeButtonVisible || this.btnMore.hide();
		var b = function() {
			"" != userConfig.downloadURL && window.open(userConfig.downloadURL, "_blank")
		},
		c = function() {
			window.open(bookConfig.HomeURL, bookConfig.OpenWindow)
		};
		global.foldingMenu = new FoldingMenu($("#tmpContainer"));
		userConfig.homeButtonVisible && foldingMenu.addMenuItem("miHome", getLanguage("btnHome", "Home"), "miHome", !0, c);
		searchButtonEnable && foldingMenu.addMenuItem("miSearch", getLanguage("btnSearch", "Search"), "miSearch");
		bookmarkButtonEnable && foldingMenu.addMenuItem("miBookmark", getLanguage("btnBookMark", "Table of Content"), "tableofcontent");
		shareButtonEnable && foldingMenu.addMenuItem("miShare", getLanguage("btnSocialShare", "Share"), "miShare");
		userConfig.downloadButtonVisible && foldingMenu.addMenuItem("miDownload", getLanguage("btnDownload", "Download"), "download", !0, b);
		userConfig.printButtonVisible && foldingMenu.addMenuItem("miPrint", getLanguage("btnPrint", "Print"), "print");
		language && 1 < language.length && foldingMenu.addMenuItem("miLanguage", getLanguage("btnLanguage", "Language change"), "languageChange"); (userConfig.bgSoundButtonVisible || bookConfig.FlipSound) && foldingMenu.addMenuItem("miSetting", getLanguage("btnSettings", "Settings"), "setting");
		searchButtonEnable && (global.phoneSearch = new phoneSearchForm({
			caption: getLanguage("frmSearch", "Search"),
			closeIconURL: uiBaseURL + "close.png",
			mainColor: bookConfig.searchBackground,
			fontColor: bookConfig.searchFontColor
		},
		foldingMenu.getItemBody("miSearch")));
		bookmarkButtonEnable && (global.phoneBookmark = new phoneTableContent({
			caption: getLanguage("frmBookMark", "Table of Content"),
			closeIconURL: uiBaseURL + "close.png",
			mainColor: bookConfig.bookmarkBackground,
			fontColor: bookConfig.bookmarkFontColor
		},
		foldingMenu.getItemBody("miBookmark")));
		shareButtonEnable && (global.phoneShare = new phoneSharePanel(foldingMenu.getItemBody("miShare")));
		userConfig.printButtonVisible && (global.phonePrintBody = new phonePrintBar(foldingMenu.getItemBody("miPrint")));
		language && 1 < language.length && (global.phoneLanguageBody = new phoneLanguageChange(foldingMenu.getItemBody("miLanguage")));
		if (userConfig.bgSoundButtonVisible || bookConfig.FlipSound) global.phoneSettingBody = new phoneSetting(foldingMenu.getItemBody("miSetting"))
	},
	setButtonPosition: function() {
		this.toolBG.css({
			width: windowWidth + "px"
		});
		this.topBG.css({
			width: windowWidth + "px"
		});
		isPhoneBook() ? this.buttonArray = [this.btnPre, this.btnNext, this.btnGotoPage] : this.buttonArray = [this.btnPre, this.btnNext, this.btnGotoPage, this.btnZoom];
		userConfig.autoPlayButtonVisible && this.buttonArray.push(this.btnAutoPlay);
		this.barWidth = Math.min(windowWidth, 340);
		this.buttonWidth = 40;
		this.buttonTop = (this.barHeight - this.buttonWidth) / 2;
		this.barLeft = (windowWidth - this.barWidth) / 2 + 7;
		autoCenter(this.buttonArray, this.barWidth - 15, this.buttonWidth, this.barLeft);
		this.btnMore.css({
			left: "0px",
			top: this.buttonTop + "px"
		});
		this.btnThumb.css({
			right: "0px",
			top: this.buttonTop + "px"
		});
		this.logo.css({
			left: 65 + parseInt(bookConfig.logoPadding) + "px"
		});
		this.logo.css({
			"max-width": windowWidth - 130 + "px",
			"max-height": "40px"
		});
		this.btnPre.css({
			top: this.buttonTop + "px"
		});
		this.btnNext.css({
			top: this.buttonTop + "px"
		});
		this.btnZoom.css({
			top: this.buttonTop + "px"
		});
		userConfig.autoPlayButtonVisible && this.btnAutoPlay.css({
			top: this.buttonTop + "px"
		})
	},
	changeButtonColor: function(b) {},
	changeZoomIcon: function(b) {},
	changeFullscreenIcon: function(b) {},
	changeAutoPlayIcon: function(b) {
		void 0 != auto_player && null != auto_player && (auto_player.isPlaying() ? (this.btnAutoPlay.children().cssSprite(phoneIconsURL[0], "stopAutoPlay", 25, 25, phoneIconInfo), this.btnAutoPlay.attr("title", getLanguage("btnStopAutoFlip", "Stop auto flip"))) : (this.btnAutoPlay.children().cssSprite(phoneIconsURL[0], "autoPlay", 25, 25, phoneIconInfo), this.btnAutoPlay.attr("title", getLanguage("btnAutoFlip", "Auto flip"))))
	},
	changeSoundIcon: function(b) {},
	show: function() {
		this.visible = !0;
		this.toolBG.animate({
			bottom: 0
		},
		300);
		this.topBG.animate({
			top: 0
		},
		300);
		bookType == BookType.singlePhone_book && singlePhoneBook.setShow(!1);
		bookType == BookType.phone_book && phoneBook.setShow(!1)
	},
	getHeight: function() {
		return this.getTopHeight() + this.getBottomHeight()
	},
	getTopHeight: function() {
		return 0
	},
	getBottomHeight: function() {
		return 0
	},
	getLogoHeight: function() {
		return this.topBG.height()
	},
	hide: function() {
		this.visible = !1;
		this.toolBG.animate({
			bottom: -60
		},
		300);
		this.topBG.animate({
			top: -60
		},
		300);
		global.phoneGotoPagePanel.hide();
		bookType == BookType.singlePhone_book && singlePhoneBook.setShow(!0);
		bookType == BookType.phone_book && phoneBook.setShow(!0)
	},
	showOrHide: function() { ! 0 === this.visible ? this.hide() : this.show()
	},
	changeZoomIcon: function(b) {
		b ? (this.btnZoom.children().cssSprite(phoneIconsURL[0], "zoomIn", 25, 25, phoneIconInfo), this.btnZoom.attr("title", getLanguage("btnZoomIn", "zoom in"))) : (this.btnZoom.children().cssSprite(phoneIconsURL[0], "zoomOut", 25, 25, phoneIconInfo), this.btnZoom.attr("title", getLanguage("btnZoomOut", "zoom out")))
	},
	changeSoundIcon: function(b) {},
	initEvent: function() {
		var b = this;
		this.btnMore.bind(_event._end,
		function() {
			global.foldingMenu && foldingMenu.showOrHide(foldingMenu.width);
			return ! 1
		});
		this.btnThumb.bind(_event._end,
		function() {
			thumbnail.showOrHide();
			return ! 1
		});
		this.btnNext.bind(_event._end,
		function() {
			rightToLeft ? previousPageFun() : nextPageFun();
			return ! 1
		});
		this.btnPre.bind(_event._end,
		function() {
			rightToLeft ? nextPageFun() : previousPageFun();
			return ! 1
		});
		this.btnZoom.bind(_event._end,
		function() {
			2 == bookType ? windowWidth < windowHeight ? (bookType = 1, changeShowBook(1), setCurrentIndexTextField(singlePageBook.currentPageIndex), singlePageBook.gotoPage(zoomBook.currentIndex), thumbnail.clearHighLight(), thumbnail.setHighLight(zoomBook.currentIndex), b.changeZoomIcon(!0)) : zoomBook.showPage.animateFit() : (zoomBook.currentIndex = BookInfo.getBook().currentPageIndex, zoomBook.showPage.fillContent(zoomBook.currentIndex), bookType = 2, changeShowBook(2), setCurrentIndexTextField(zoomBook.currentIndex, !1), thumbnail.clearHighLight(), thumbnail.setHighLight(zoomBook.currentIndex), auto_player.isPlaying() && (auto_player.stop(), b.changeAutoPlayIcon()), b.changeZoomIcon(!1));
			return ! 1
		});
		this.btnAutoPlay.bind(_event._end,
		function() {
			auto_player.isPlaying() ? auto_player.stop() : auto_player.start();
			b.changeAutoPlayIcon();
			return ! 1
		});
		this.btnGotoPage.bind(_event._end,
		function() {
			global.phoneGotoPagePanel.showOrHide()
		})
	},
	lastPage: function() {
		rightToLeft ? firstPageFun() : lastPageFun()
	},
	nextPage: function() {
		rightToLeft ? previousPageFun() : nextPageFun()
	},
	prePage: function() {
		rightToLeft ? nextPageFun() : previousPageFun()
	},
	firstPage: function() {
		rightToLeft ? lastPageFun() : firstPageFun()
	},
	changeLanguage: function() {
		this.btnMore.attr("title", getLanguage("btnMoreOptionsLeft", "More"));
		this.btnThumb.attr("title", getLanguage("btnThumb", "Thumb"));
		this.btnPre.attr("title", getLanguage("btnPrePage", "pre"));
		this.btnNext.attr("title", getLanguage("btnNextPage", "next"));
		this.btnZoom.attr("title", getLanguage("btnZoomIn", "zoom in"));
		this.btnAutoPlay.attr("title", getLanguage("btnAutoFlip", "Auto flip"));
		this.btnGotoPage.attr("title", getLanguage("btnGotoPage", "Go To Page"));
		searchButtonEnable && foldingMenu.getItemById("miSearch").setCaption(getLanguage("btnSearch", "Search"));
		bookmarkButtonEnable && foldingMenu.getItemById("miBookmark").setCaption(getLanguage("btnBookMark", "Table of Content"));
		shareButtonEnable && foldingMenu.getItemById("miShare").setCaption(getLanguage("btnSocialShare", "Share"));
		userConfig.downloadButtonVisible && foldingMenu.getItemById("miDownload").setCaption(getLanguage("btnDownload", "Download"));
		userConfig.printButtonVisible && foldingMenu.getItemById("miPrint").setCaption(getLanguage("btnPrint", "Print"));
		language && 1 < language.length && foldingMenu.getItemById("miLanguage").setCaption(getLanguage("btnLanguage", "Language change"));
		userConfig.printButtonVisible && global.phonePrintBody.changeLanguage(); (userConfig.bgSoundButtonVisible || bookConfig.FlipSound) && global.phoneSettingBody.changeLanguage()
	}
}), isThumbDrag = !1, thumbnailBar = Class({
	create: function(b) {
		this.width = windowWidth;
		this.height = windowHeight;
		this.contentHeight = windowHeight - 80;
		this.contentWidth = Math.min(windowWidth, windowHeight);
		this.mainColor = "#888888";
		this.thumbArray = [];
		this.isDrag = this.mergeing = this.showing = !1;
		this.pageIndex = this.currentCellIndex = 1;
		this.createThumbItemFalg = !1;
		this.oldMode = this.currentMedo = 0;
		this.background = $("<div id='background' class='phoneThumbBar'></div>");
		this.contentBox = $("<div id='contentBox' class='phoneThumbBG'></div>");
		this.scrollBox = $("<div id='scrollBox' class='phoneThumbBox'></div>");
		$(b).append(this.background);
		$(b).append(this.contentBox);
		$(this.contentBox).append(this.scrollBox);
		this.initStyle();
		this.background.css({
			display: "none"
		});
		this.contentBox.css({
			display: "none"
		});
		this.initScrollEvent();
		this.createThumbItemFalg && this.currentMedo != this.oldMode && 1 === this.currentMedo && this.repositionSingle();
		this.createThumbItemFalg && this.currentMedo != this.oldMode && 2 === this.currentMedo && this.repositionDouble();
		this.createThumbItemFalg || (this.createThumbItemFalg = !0, this.addItem(), this.fillNearByImages(), 1 === this.currentMedo ? this.repositionSingle() : this.repositionDouble(), this.setHighLight(this.getPageIndex()));
		this.oldMode = this.currentMedo
	},
	initStyle: function() {
		this.background.css({
			height: this.height + "px",
			bottom: "0px"
		});
		$(this.background).css({
			background: bookConfig.thumbnailColor
		});
		$(this.background).css({
			opacity: bookConfig.thumbnailAlpha / 100
		});
		this.contentBox.css({
			height: this.contentHeight + "px",
			width: this.contentWidth + "px",
			left: (this.width - this.contentWidth) / 2 + "px"
		});
		this.contentBox.css({
			top: "40px",
			bottom: "40px",
			overflow: "hidden"
		});
		this.scrollBox.css({
			width: this.contentWidth - 20 + "px"
		});
		$(this.scrollBox).css({
			left: (this.contentBox.width() - this.scrollBox.width()) / 2 + "px",
			top: "10px"
		})
	},
	getPageIndex: function() {
		return this.pageIndex
	},
	setPageIndex: function(b) {
		this.pageIndex = b
	},
	onResize: function() {
		this.contentHeight = windowHeight - 80;
		this.background.css({
			width: windowWidth + "px",
			height: windowHeight + "px"
		});
		this.contentBox.css({
			height: this.contentHeight + "px"
		});
		this.contentBox.css({
			left: (windowWidth - this.contentWidth) / 2 + "px"
		})
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px")
	},
	addItem: function() {
		for (var b = 0; b <= originTotalPageCount;) {
			var c = 0 == b ? new thumbnailItem(this.scrollBox, 1) : new thumbnailItem(this.scrollBox, b),
			d = this.thumbArray.length % 2 * (c.getWidth() + 10),
			e = parseInt(Math.floor(this.thumbArray.length / 2)) * (c.getHeight() + 5);
			c.setPosition(d, e);
			this.thumbArray.push(c);
			b += 2
		}
		b = parseInt(Math.floor(this.thumbArray.length / 2));
		0 != this.thumbArray.length % 2 && (b += 1);
		$(this.scrollBox).css({
			height: b * (c.getHeight() + 5) + 10 + "px"
		})
	},
	resetItemPosition: function() {
		for (var b = 0,
		c = 0,
		d = 0; d < this.thumbArray.length; d++) {
			var e = this.thumbArray[d];
			0 == d ? (b = rightToLeft ? this.contentWidth - 20 - e.getWidth() : 0, c = 0) : (b = rightToLeft ? (2 - d % 2 - 1) * (e.getWidth() + 10) : d % 2 * (e.getWidth() + 10), c = parseInt(Math.floor(d / 2)) * (e.getHeight() + 5));
			e.setPosition(b, c)
		}
		b = parseInt(Math.floor(this.thumbArray.length / 2));
		0 != this.thumbArray.length % 2 && (b += 1);
		$(this.scrollBox).css({
			height: b * (e.getHeight() + 5) + 10 + "px"
		})
	},
	mergeAll: function() {
		this.currentMedo = 2;
		this.showing && this.createThumbItemFalg && this.currentMedo != this.oldMode && (this.repositionDouble(), this.oldMode = 2);
		this.mergeing = !0
	},
	fissionAll: function() {
		this.currentMedo = 1;
		this.showing && this.createThumbItemFalg && this.currentMedo != this.oldMode && (this.repositionSingle(), this.oldMode = 1);
		this.mergeing = !1
	},
	repositionDouble: function() {
		for (var b = 0; b < this.thumbArray.length; b++) this.thumbArray[b].merge();
		this.resetItemPosition();
		this.clearHighLight(this.getPageIndex());
		this.setHighLight(this.getPageIndex())
	},
	repositionSingle: function() {
		for (var b = 0; b < this.thumbArray.length; b++) this.thumbArray[b].fission();
		this.resetItemPosition();
		this.clearHighLight(this.getPageIndex());
		this.setHighLight(this.getPageIndex())
	},
	getShowStatu: function() {
		return this.showing
	},
	setShowStatu: function(b) {
		this.showing = b
	},
	showshow: function() {
		$(this.background).show(); (function() {
			$(this.contentBox).show()
		}).delay(this, 10);
		this.showing = !0;
		void 0 != leftRightButton && null != leftRightButton && leftRightButton.setShow(!1);
		this.fillNearByImages()
	},
	hideBox: function() {
		$(this.background).fadeOut(500);
		$(this.contentBox).fadeOut(500);
		this.showing = !1;
		hideLeftRightButton() && leftRightButton.setShow(!0)
	},
	showOrHide: function() { ! 0 === this.showing ? this.hideBox() : this.showshow()
	},
	setHighLight: function(b) {},
	clearHighLight: function(b) {
		if (this.createThumbItemFalg) for (var c = 0; c < this.thumbArray.length; c++) c != b && this.thumbArray[c].clearHighLight()
	},
	tweener: function(b, c, d) {
		var e = function(b, c) {
			for (var d = c / 2,
			e = (b - b / 4) / d, f = Array(c), g = 0; g < c; g++) f[g] = g < d ? b - (d - g) * e: b + (g - d + 1) * e;
			return f.reverse()
		} (c, d),
		f = b,
		g = 0,
		h = this,
		k = window.setInterval(function() {
			f += e[g];
			g++;
			g == d && (f = b + c * d);
			0 < f && (f = 0);
			f < $(h.contentBox).height() - $(h.scrollBox).height() && (f = $(h.contentBox).height() - $(h.scrollBox).height());
			$(h.scrollBox).css({
				top: f + 10 + "px"
			});
			g >= d && (window.clearInterval(k), h.fillNearByImages(f))
		},
		30)
	},
	fillNearByImages: function(b) {
		if (this.createThumbItemFalg && this.showing) {
			this.scrollBox.outerWidth();
			this.scrollBox.outerHeight();
			this.contentBox.outerWidth();
			var c = this.contentBox.outerHeight();
			b = Math.abs(getPoint(this.scrollBox).y);
			b = Math.max(0, b);
			var d = (Math.min(windowWidth, windowHeight) - 20) / 2 * bookConfig.largePageHeight / (2 * bookConfig.largePageWidth) + 15;
			b = parseInt(2 * Math.ceil(b / (d + 10)));
			c = 2 * Math.ceil(c / d);
			for (d = b; d < b + c && !(0 > d || d >= this.thumbArray.length); d++) this.thumbArray[d] && this.thumbArray[d].addImage()
		}
	},
	initScrollEvent: function() {
		var b = function() {
			this.fillNearByImages()
		}.bind(this);
		ScrollFunction(this.contentBox, this.scrollBox, this, b)
	}
}), thumbnailCell = Class({
	create: function(b) {
		this.background = $("<div></div>");
		this.img = $("<img />");
		this.pageIndex = -1;
		this.width = (Math.min(windowWidth, windowHeight) - 30) / 4;
		this.height = this.width * bookConfig.largePageHeight / bookConfig.largePageWidth + 15;
		this.pageTextField = new label(1, this.background);
		this.imgHeight = this.imgWidth = -1;
		$(b).append(this.background);
		$(this.background).css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px"
		});
		$(this.background).css({
			"text-shadow": "0 0 10px #8c97cb, 0 0 20px #8c97cb,0 0 30px #8c97cb, 0 0 40px #8c97cb,0 0 50px #8c97cb, 0 0 60px #8c97cb"
		});
		$(this.img).css({
			position: "absolute"
		});
		this.pageTextField.setFont("5px", "#f0f0f0", null);
		this.pageTextField.setLabelPosition((this.width - this.pageTextField.getWidth()) / 2, 0, ["left", "bottom"]);
		$(this.img).css({
			"-webkit-box-shadow": "0 0 5px rgba(0, 0, 0, 1)",
			"-moz-box-shadow": "0 0 5px rgba(0, 0, 0, 1)",
			"-o-box-shadow": "0 0 5px rgba(0, 0, 0, 1)",
			"box-shadow": "0 0 5px rgba(0, 0, 0, 1)"
		})
	},
	getPageIndex: function() {
		return this.pageIndex
	},
	getWidth: function() {
		return this.width
	},
	getHeight: function() {
		return this.height
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px")
	},
	onResize: function(b, c) {
		$(this.background).css({
			width: b + "px",
			height: c + "px"
		});
		this.onResizeImage(b, c)
	},
	onResizeImage: function() {
		var b = this.height - 15;
		this.imgWidth = this.width;
		this.imgHeight = b;
		$(this.img).css({
			width: this.imgWidth + "px",
			height: this.imgHeight + "px"
		});
		$(this.img).css({
			top: "0px"
		})
	},
	setImgPosition: function(b) {
		switch (b) {
		case "l":
			$(this.img).css({
				left:
				rightToLeft ? "auto": "0px",
				right: rightToLeft ? "0px": "auto"
			});
			break;
		case "r":
			$(this.img).css({
				right:
				rightToLeft ? "auto": "0px",
				left: rightToLeft ? "0px": "auto"
			});
			break;
		case "c":
			$(this.img).css({
				left:
				rightToLeft ? "auto": (this.width - this.imgWidth) / 2 + "px",
				right: rightToLeft ? (this.width - this.imgWidth) / 2 + "px": "auto"
			})
		}
	},
	setCaption: function(b) {
		this.pageTextField.setCaption(b)
	},
	fillImage: function(b) {
		this.pageIndex = b;
		$(this.img).attr("src", getPageDir(b, "thumb", originTotalPageCount));
		$(this.background).append(this.img);
		this.onResizeImage(this.width, this.height);
		this.pageTextField.setCaption(b)
	},
	showBorder: function() {
		$(this.background).css({
			border: "1px solid #444444"
		})
	},
	hideBorder: function() {
		$(this.background)[0].style.border = ""
	},
	getTextField: function() {
		return this.pageTextField
	},
	hideTextField: function() {
		this.pageTextField.setCSS({
			display: "none"
		})
	},
	showTextField: function() {
		this.pageTextField.setCSS({
			display: "block"
		})
	},
	showCell: function(b) {
		$(this.background).css({
			display: b ? "block": "none"
		})
	},
	onMouseUp: function(b, c) {
		var d = this;
		$(this.background).bind(_event._end,
		function(b) {
			thumbnail && !thumbnail.isDrag && (b = d.getPageIndex(), gotoPageFun(b), thumbnail && thumbnail.hideBox())
		});
		$(this.background).bind(_event._enter,
		function(b) {
			d.background.css({
				cursor: "pointer"
			})
		})
	},
	highLight: function(b) {
		$(this.background).css({
			border: "2px solid #ff8040"
		})
	},
	onMouseOver: function() {
		if (!isTouch) {
			var b = this;
			$(this.background).css({
				border: ""
			});
			$(this.background).bind(_event._enter,
			function(c) {
				b.background.css({
					border: "2px solid #0080ff"
				})
			});
			$(this.background).bind(_event._leave,
			function(c) {
				b.background.css({
					border: ""
				})
			})
		}
	},
	clearMouseOver: function() {
		var b = this;
		$(this.background).bind(_event._enter,
		function(c) {
			b.background.css({
				border: ""
			})
		});
		$(this.background).bind(_event._leave,
		function(c) {
			b.background.css({
				border: ""
			})
		})
	},
	onMouseOverUp: function() {
		if (!isTouch) {
			var b = this;
			$(this.background).bind(_event._enter,
			function(c) {
				b.background.css({
					border: "2px solid #0080ff"
				})
			});
			$(this.background).bind(_event._leave,
			function(c) {
				b.background.css({
					border: "2px solid #ff8040"
				})
			})
		}
	},
	clearHighLight: function() {
		$(this.background).css({
			border: ""
		})
	}
}), thumbnailItem = Class({
	create: function(b, c) {
		this.background = $("<div></div>");
		this.itemB = new thumbnailCell(this.background);
		this.itemA = new thumbnailCell(this.background);
		this.width = (Math.min(windowWidth, windowHeight) - 20) / 2;
		this.height = this.width * bookConfig.largePageHeight / (2 * bookConfig.largePageWidth) + 15;
		this.isMerge = this.isDoublePage = !0;
		this.pageIndex = c;
		this.fillImage = !1;
		this.mainColor = "";
		var d = c + 1;
		this.textField = new label(rightToLeft ? d + "-" + c: c + "-" + d, this.background);
		this.textField.setLabelPosition((this.width - this.textField.getWidth()) / 2, 0, ["left", "bottom"]);
		this.textField.setFont("5px", "#f0f0f0", null);
		$(this.background).css({
			"text-shadow": "0 0 10px #8c97cb, 0 0 20px #8c97cb,0 0 30px #8c97cb, 0 0 40px #8c97cb,0 0 50px #8c97cb, 0 0 60px #8c97cb"
		});
		$(b).append(this.background);
		$(this.background).css({
			position: "absolute",
			width: this.width + "px",
			height: this.height + "px"
		});
		$(this.background).css({
			"-webkit-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-moz-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"-o-box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)",
			"box-shadow": "0 0 5px rgba(40, 0, 0, 0.5)"
		});
		1 != c && c != totalPageCount ? (this.itemA.setPosition(0, 0, rightToLeft ? ["right", "top"] : ["left", "top"]), this.itemB.setPosition(0, 0, rightToLeft ? ["left", "top"] : ["right", "top"]), this.itemB.onMouseUp()) : (1 == c ? this.itemA.setPosition(rightToLeft ? 0 : this.width / 2, 0) : this.itemA.setPosition(rightToLeft ? this.width / 2 : 0, 0), this.itemB.showCell(!1), this.textField.setCSS({
			display: "none"
		}), this.setBorder(!1));
		this.itemA.onMouseUp()
	},
	getWidth: function() {
		return this.width
	},
	getHeight: function() {
		return this.height
	},
	addImage: function() {
		this.fillImage || (this.itemA.fillImage(this.pageIndex), 1 != this.pageIndex && this.pageIndex != totalPageCount && this.itemB.fillImage(this.pageIndex + 1), this.fillImage = !0)
	},
	setPosition: function(b, c, d) {
		void 0 == d && (d = ["left", "top"]);
		$(this.background).css(d[0], b + "px");
		$(this.background).css(d[1], c + "px")
	},
	onResize: function(b, c) {
		this.width = b;
		this.height = c;
		$(this.background).css({
			width: b + "px",
			height: c + "px"
		})
	},
	resetItem: function() {},
	fission: function() {
		1 == this.pageIndex || this.pageIndex == totalPageCount ? this.itemA.setImgPosition("c") : (this.setBorder(!1), this.itemA.setImgPosition("c"), this.itemB.setImgPosition("c"), this.showTextField(!1), this.isMerge = !1, this.onResize(this.width, this.height))
	},
	merge: function() {
		1 == this.pageIndex ? this.itemA.setImgPosition("l") : this.pageIndex == totalPageCount ? this.itemA.setImgPosition("r") : (this.setBorder(!1), this.itemA.setImgPosition("r"), this.itemB.setImgPosition("l"), this.showTextField(!0), this.isMerge = !0, this.onResize(this.width, this.height))
	},
	showBorder: function() {
		$(this.background).css({
			border: "1px solid #444444"
		})
	},
	hideBorder: function() {
		$(this.background)[0].style.border = ""
	},
	showTextField: function(b) {
		var c = b ? "none": "block";
		this.textField.setCSS({
			display: b ? "block": "none"
		});
		this.itemA.getTextField().setCSS({
			display: c
		});
		this.itemB.getTextField().setCSS({
			display: c
		})
	},
	setBorder: function(b) {
		b ? $(this.background).css({
			border: "1px solid #444444"
		}) : $(this.background)[0].style.border = "";
		this.itemA.hideBorder();
		this.itemB.hideBorder()
	},
	highLight: function(b) {
		this.isMerge ? 1 == b || b == totalPageCount ? (this.itemA.highLight("#ffffff"), this.itemA.onMouseOverUp()) : ($(this.background).css({
			border: "2px solid #ff8040"
		}), this.onMouseOverUp()) : b == this.pageIndex ? (this.itemA.highLight("#ffffff"), this.itemA.onMouseOverUp()) : (this.itemB.highLight("#ffffff"), this.itemB.onMouseOverUp())
	},
	onMouseOver: function() {
		if (!isTouch) {
			var b = this;
			$(this.background).css({
				border: ""
			});
			$(this.background).bind(_event._enter,
			function(c) {
				b.background.css({
					border: "2px solid #0080ff"
				})
			});
			$(this.background).bind(_event._leave,
			function(c) {
				b.background.css({
					border: ""
				})
			})
		}
	},
	onMouseOverUp: function() {
		if (!isTouch) {
			var b = this;
			$(this.background).bind(_event._enter,
			function(c) {
				b.background.css({
					border: "2px solid #0080ff"
				})
			});
			$(this.background).bind(_event._leave,
			function(c) {
				b.background.css({
					border: "2px solid #ff8040"
				})
			})
		}
	},
	clearMouseOver: function() {
		var b = this;
		$(this.background).bind(_event._enter,
		function(c) {
			b.background.css({
				border: ""
			})
		});
		$(this.background).bind(_event._leave,
		function(c) {
			b.background.css({
				border: ""
			})
		})
	},
	clearHighLight: function() {
		this.isMerge ? 1 == this.pageIndex || this.pageIndex == totalPageCount ? (this.itemA.onMouseOver(), this.itemB.onMouseOver()) : (this.onMouseOver(), this.itemA.clearMouseOver(), this.itemB.clearMouseOver()) : (this.itemA.onMouseOver(), this.itemB.onMouseOver(), this.clearMouseOver());
		this.itemA.clearHighLight();
		this.itemB.clearHighLight()
	}
}));
var hexcase = 0,
b64pad = "",
chrsz = 8;
function compareov() {
	var b = Date.parse(new Date);
	return orgt(b) === vldt(b)
}
function orgt(b) {
	return binl2hex(core_hx(str2binl(b), b.length * chrsz))
}
function vldt(b) {
	return binl2hex(core_hx(str2binl(b), b.length * chrsz))
}
function core_hx(b, c) {
	b[c >> 5] |= 128 << c % 32;
	b[(c + 64 >>> 9 << 4) + 14] = c;
	for (var d = 1732584193,
	e = -271733879,
	f = -1732584194,
	g = 271733878,
	h = 0; h < b.length; h += 16) var k = d,
	l = e,
	m = f,
	p = g,
	d = hx_ff(d, e, f, g, b[h + 0], 7, -680876936),
	g = hx_ff(g, d, e, f, b[h + 1], 12, -389564586),
	f = hx_ff(f, g, d, e, b[h + 2], 17, 606105819),
	e = hx_ff(e, f, g, d, b[h + 3], 22, -1044525330),
	d = hx_ff(d, e, f, g, b[h + 4], 7, -176418897),
	g = hx_ff(g, d, e, f, b[h + 5], 12, 1200080426),
	f = hx_ff(f, g, d, e, b[h + 6], 17, -1473231341),
	e = hx_ff(e, f, g, d, b[h + 7], 22, -45705983),
	d = hx_ff(d, e, f, g, b[h + 8], 7, 1770035416),
	g = hx_ff(g, d, e, f, b[h + 9], 12, -1958414417),
	f = hx_ff(f, g, d, e, b[h + 10], 17, -42063),
	e = hx_ff(e, f, g, d, b[h + 11], 22, -1990404162),
	d = hx_ff(d, e, f, g, b[h + 12], 7, 1804603682),
	g = hx_ff(g, d, e, f, b[h + 13], 12, -40341101),
	f = hx_ff(f, g, d, e, b[h + 14], 17, -1502002290),
	e = hx_ff(e, f, g, d, b[h + 15], 22, 1236535329),
	d = hx_gg(d, e, f, g, b[h + 1], 5, -165796510),
	g = hx_gg(g, d, e, f, b[h + 6], 9, -1069501632),
	f = hx_gg(f, g, d, e, b[h + 11], 14, 643717713),
	e = hx_gg(e, f, g, d, b[h + 0], 20, -373897302),
	d = hx_gg(d, e, f, g, b[h + 5], 5, -701558691),
	g = hx_gg(g, d, e, f, b[h + 10], 9, 38016083),
	f = hx_gg(f, g, d, e, b[h + 15], 14, -660478335),
	e = hx_gg(e, f, g, d, b[h + 4], 20, -405537848),
	d = hx_gg(d, e, f, g, b[h + 9], 5, 568446438),
	g = hx_gg(g, d, e, f, b[h + 14], 9, -1019803690),
	f = hx_gg(f, g, d, e, b[h + 3], 14, -187363961),
	e = hx_gg(e, f, g, d, b[h + 8], 20, 1163531501),
	d = hx_gg(d, e, f, g, b[h + 13], 5, -1444681467),
	g = hx_gg(g, d, e, f, b[h + 2], 9, -51403784),
	f = hx_gg(f, g, d, e, b[h + 7], 14, 1735328473),
	e = hx_gg(e, f, g, d, b[h + 12], 20, -1926607734),
	d = hx_hh(d, e, f, g, b[h + 5], 4, -378558),
	g = hx_hh(g, d, e, f, b[h + 8], 11, -2022574463),
	f = hx_hh(f, g, d, e, b[h + 11], 16, 1839030562),
	e = hx_hh(e, f, g, d, b[h + 14], 23, -35309556),
	d = hx_hh(d, e, f, g, b[h + 1], 4, -1530992060),
	g = hx_hh(g, d, e, f, b[h + 4], 11, 1272893353),
	f = hx_hh(f, g, d, e, b[h + 7], 16, -155497632),
	e = hx_hh(e, f, g, d, b[h + 10], 23, -1094730640),
	d = hx_hh(d, e, f, g, b[h + 13], 4, 681279174),
	g = hx_hh(g, d, e, f, b[h + 0], 11, -358537222),
	f = hx_hh(f, g, d, e, b[h + 3], 16, -722521979),
	e = hx_hh(e, f, g, d, b[h + 6], 23, 76029189),
	d = hx_hh(d, e, f, g, b[h + 9], 4, -640364487),
	g = hx_hh(g, d, e, f, b[h + 12], 11, -421815835),
	f = hx_hh(f, g, d, e, b[h + 15], 16, 530742520),
	e = hx_hh(e, f, g, d, b[h + 2], 23, -995338651),
	d = hx_ii(d, e, f, g, b[h + 0], 6, -198630844),
	g = hx_ii(g, d, e, f, b[h + 7], 10, 1126891415),
	f = hx_ii(f, g, d, e, b[h + 14], 15, -1416354905),
	e = hx_ii(e, f, g, d, b[h + 5], 21, -57434055),
	d = hx_ii(d, e, f, g, b[h + 12], 6, 1700485571),
	g = hx_ii(g, d, e, f, b[h + 3], 10, -1894986606),
	f = hx_ii(f, g, d, e, b[h + 10], 15, -1051523),
	e = hx_ii(e, f, g, d, b[h + 1], 21, -2054922799),
	d = hx_ii(d, e, f, g, b[h + 8], 6, 1873313359),
	g = hx_ii(g, d, e, f, b[h + 15], 10, -30611744),
	f = hx_ii(f, g, d, e, b[h + 6], 15, -1560198380),
	e = hx_ii(e, f, g, d, b[h + 13], 21, 1309151649),
	d = hx_ii(d, e, f, g, b[h + 4], 6, -145523070),
	g = hx_ii(g, d, e, f, b[h + 11], 10, -1120210379),
	f = hx_ii(f, g, d, e, b[h + 2], 15, 718787259),
	e = hx_ii(e, f, g, d, b[h + 9], 21, -343485551),
	d = safe_add(d, k),
	e = safe_add(e, l),
	f = safe_add(f, m),
	g = safe_add(g, p);
	return [d, e, f, g]
}
function hx_cmn(b, c, d, e, f, g) {
	return safe_add(bit_rol(safe_add(safe_add(c, b), safe_add(e, g)), f), d)
}
function hx_ff(b, c, d, e, f, g, h) {
	return hx_cmn(c & d | ~c & e, b, c, f, g, h)
}
function hx_gg(b, c, d, e, f, g, h) {
	return hx_cmn(c & e | d & ~e, b, c, f, g, h)
}
function hx_hh(b, c, d, e, f, g, h) {
	return hx_cmn(c ^ d ^ e, b, c, f, g, h)
}
function hx_ii(b, c, d, e, f, g, h) {
	return hx_cmn(d ^ (c | ~e), b, c, f, g, h)
}
function safe_add(b, c) {
	var d = (b & 65535) + (c & 65535);
	return (b >> 16) + (c >> 16) + (d >> 16) << 16 | d & 65535
}
function bit_rol(b, c) {
	return b << c | b >>> 32 - c
}
function str2binl(b) {
	for (var c = [], d = (1 << chrsz) - 1, e = 0; e < b.length * chrsz; e += chrsz) c[e >> 5] |= (b.charCodeAt(e / chrsz) & d) << e % 32;
	return c
}
function binl2hex(b) {
	for (var c = hexcase ? "0123456789ABCDEF": "0123456789abcdef", d = "", e = 0; e < 4 * b.length; e++) d += c.charAt(b[e >> 2] >> e % 4 * 8 + 4 & 15) + c.charAt(b[e >> 2] >> e % 4 * 8 & 15);
	return d
};
Log.debug(navigator.userAgent.toLowerCase());
jsLoadingBar.initStatus();
var gradientColorA, gradientColorB, gradientColorAngle, backGroundImgURL, zoomButtonEnable = !0,
thumbButtonEnable = !0,
shareButtonEnable = !0,
searchButtonEnable = !0,
bookmarkButtonEnable = !0,
tableofcontentButtonEnable = !0,
windowWidth = 0,
windowHeight = 0,
toolBarColor, buttonColor, originTotalPageCount, totalPageCount, leftShadowWidth = 50,
rightShadowWidth = 50,
zoomPageWidth, zoomPageHeight, flipTime = 600,
isRegister = !1,
bookDescription, bookTitle, showFlipButton, normalEventRadius = 1E4,
singleEventRadius = 1E4,
stopFlip = !1,
flipping = !1,
isTouch = isTouchDevice(),
bookContainer,
tmpContainer,
onBookLoad,
zoomBook,
slideBook,
singleSlideBook,
catalogBook,
singleCatalogBook,
phoneBook,
singlePhoneBook,
flipBook,
singlePageBook,
leftRightButton,
toolBar,
printBody,
helpBody,
aboutBody,
noteCookie,
textRemark,
signature,
annotationShapes,
cursor = !0,
highLight,
sharePanel,
annotationPannel,
videoGallery,
photoGallery,
languagePanel,
QRcode,
QRbutton,
moreBar,
pageIndexTextField,
topMargin,
leftMargin,
bottomMargin,
rightMargin,
resizeBookAfterFlip = !1,
frmSearch,
frmShare,
flipAudio,
backgroundAudio,
auto_player,
productName,
homePage,
_tipsBox,
frmBookmark,
bookmark,
thumbnail,
miniStyle,
oriPageIndex = 1,
googleID,
hardPageEnable,
uiBaseURL,
phoneBaseURL,
soundBaseURL,
browserType,
rightToLeft = !1,
isFlipPdf = !1,
flaudio = 0,
flagspeak = 0,
isFlipModel = !0,
hadBMT,
selectedLanguage,
bgSound,
backgroundObj,
bmtBox,
textForPages = [],
positionForPages = [],
loadSearchFlag = !1,
BookInstance = {
	flipBook: void 0,
	singlePageBook: void 0,
	zoomBook: void 0,
	slideBook: void 0,
	catalogBook: void 0,
	singleSlideBook: void 0,
	phoneBook: void 0,
	singlePhoneBook: void 0
},
iconArray,
toolBarIconsURL,
ua = navigator.userAgent.toLowerCase(),
device = {};
device.name = ua.match(/ipad/) ? "ipad": ua.match(/ipod/) ? "ipod": ua.match(/iphone/) ? "iphone": ua.match(/android/) ? "android": ua.match(/mac|win|linux/) ? "pc": "other";
var userConfig = {
	leftShadowWidth: 30,
	leftShadowAlpha: 1,
	rightShadowWidth: 30,
	rightShadowAlpha: 1,
	shortcutButtonHeight: 370,
	shortcutButtonWidth: 90,
	autoPlayButtonVisible: "true",
	downloadButtonVisible: "false",
	downloadURL: "",
	bgSoundButtonVisible: "yes",
	bgSoundAutoStart: "yes",
	bgSoundURL: "",
	homeButtonVisible: !0,
	homeURL: "",
	printButtonVisible: "yes"
},
originWindow = Point(0, 0),
testLog = $("<div width='300px' height='300px' style='position:absolute;left:10px;top:10px;'></div>"),
logStr = function(b) {
	testLog[0].innerHTML = b
};
bdor[51] = bdor[404](15, 19, 28, 7);
var init = function() {
	Log.print("init start");
	if (bookType == BookType.singleCatalog_book || bookType == BookType.catalog_book || bookType == BookType.slide_book && "lite" == bookConfig.ToolbarViewMode.toLowerCase() || bookType == BookType.singleSlide_book && "lite" == bookConfig.ToolbarViewMode.toLowerCase() || isPhone()) showFlipButton = !1;
	toolBar = new loadToolBar(tmpContainer, iconArray);
	global.crAfter = DeString("d35426b1c0d303cfa3012949ee");
	if (bookType == BookType.normal_book || bookType == BookType.single_book || bookType == BookType.zoom_book) toolBar.show(),
	flipBook = rightToLeft ? new rightToLeftNormalBook(bookContainer) : new normalBook(bookContainer),
	singlePageBook = new SingleBook(bookContainer),
	zoomBook = new ZoomBook(bookContainer);
	bookType == BookType.slide_book && (slideBook = new SlideBook(bookContainer), "lite" == bookConfig.ToolbarViewMode.toLocaleLowerCase() ? toolBar.hide() : toolBar.show());
	bookType == BookType.singleSlide_book && (singleSlideBook = new SingleSlideBook(bookContainer), "lite" == bookConfig.ToolbarViewMode.toLowerCase() ? toolBar.hide() : toolBar.show());
	bookType == BookType.catalog_book && (catalogBook = new CatalogBook(bookContainer), "lite" == bookConfig.ToolbarViewMode.toLowerCase() ? toolBar.hide() : (toolBar.show(), catalogBook.guidBar.hide()));
	bookType == BookType.singleCatalog_book && (singleCatalogBook = new SingleCatalogBook(bookContainer), toolBar.hide());
	if (bookType == BookType.phone_book || bookType == BookType.singlePhone_book) phoneBook = new PhoneBook(bookContainer),
	singlePhoneBook = new SinglePhoneBook(bookContainer),
	toolBar.hide();
	printBody = new printBar(tmpContainer);
	helpBody = new helpBar(tmpContainer);
	aboutBody = new aboutBar(tmpContainer);
	sharePanel = new harePanel(tmpContainer);
	languagePanel = new languageChange(tmpContainer);
	annotationPannel = new AnnotationPannel(tmpContainer);
	var b = global.slideshow || [];
	videoGallery = new VideoGallery(tmpContainer, global.videoList || []);
	photoGallery = new PhotoGallery(tmpContainer, b);
	bdor[42] = bdor[33](bdor[32](37, 33) + 10, 36);
	initShareBar();
	initLogoBar();
	QRcode = new codeBar(tmpContainer);
	QRbutton = $("<img src='" + bookConfig.QRPath + "'/>").attr("title", "Click to scan the QR code.");
	QRbutton.css({
		width: "50px",
		height: "50px",
		top: "0px",
		right: "0px",
		position: "absolute",
		"z-index": "99",
		opacity: "0.5"
	});
	QRbutton.load(function() {
		tmpContainer.append(QRbutton)
	});
	moreBar = new initMoreBar;
	backgroundObj = new initBackground(tmpContainer, gradientColorA, gradientColorB, gradientColorAngle, windowWidth, windowHeight, backGroundImgURL);
	showFlipButton && (leftRightButton = new LeftRightButton(tmpContainer));
	frmBookmark = new tableContent({
		caption: getLanguage("frmBookMark", "Table of Content"),
		closeIconURL: uiBaseURL + "close.png",
		mainColor: bookConfig.bookmarkBackground,
		fontColor: bookConfig.bookmarkFontColor
	},
	tmpContainer);
	isBelowIE9() || (bookmark = new BookMark(tmpContainer));
	frmSearch = new searchForm({
		caption: getLanguage("frmSearch", "Search"),
		closeIconURL: uiBaseURL + "close.png",
		mainColor: bookConfig.searchBackground,
		fontColor: bookConfig.searchFontColor
	},
	tmpContainer);
	_tipsBox = new tipsBox("This is the last page", bookContainer);
	_tipsBox.setPosition((windowWidth - _tipsBox.getWidth()) / 2, 100);
	auto_player = new autoFlip;
	bgSound = new initBGSound;
	changeShowBook(bookType);
	onStageResize();
	isTouch ? window.onorientationchange = function() {
		window.setTimeout(function() {
			onStageResize()
		},
		200)
	}: $(window).resize(function() {
		onStageResize()
	});
	var c = window.location.hash;
	"" != c && 3 < c.length && "#p=" == c.substr(0, 3) ? isNaN(c.substr(3, c.length - 3)) ? (void 0 != flipBook && flipBook.movetoCenter(30, 20, flipBook.currentPageIndex), void 0 != catalogBook && catalogBook.movetoCenter(30, 20, catalogBook.currentPageIndex), TurnonAutoFlip()) : window.setTimeout(function() {
		var b = parseInt(c.substr(3, c.length - 3));
		1 == b && void 0 != flipBook && flipBook.movetoCenter(30, 20, 1);
		1 == b && void 0 != catalogBook && catalogBook.movetoCenter(30, 20, 1);
		gotoPageFun(b);
		TurnonAutoFlip()
	},
	1E3) : (void 0 != flipBook && flipBook.movetoCenter(30, 20, flipBook.currentPageIndex), void 0 != catalogBook && catalogBook.movetoCenter(30, 20, catalogBook.currentPageIndex), TurnonAutoFlip());
	initEvent();
	setPageIndexTextField();
	2 == browserType && (_event._mousewheel = "DOMMouseScroll", HTMLElement.prototype.__defineGetter__("innerText",
	function() {
		return this.textContent
	}), HTMLElement.prototype.__defineSetter__("innerText",
	function(b) {
		this.textContent = b
	}));
	isIE() && (_event._mousewheel = "mousewheel");
	b = parseBool(bookConfig.mouseWheelFlip); ! 0 == b && void 0 != flipBook && flipBook.flipBook.bind(_event._mousewheel,
	function(b) {
		if (bookType == BookType.zoom_book) return ! 1;
		var c = b.originalEvent;
		0 > Math.max( - 1, Math.min(1, c.wheelDelta || -c.detail)) ? rightToLeft ? previousPageFun() : nextPageFun() : rightToLeft ? nextPageFun() : previousPageFun();
		stopEvent(b);
		return ! 1
	}); ! 0 == b && void 0 != catalogBook && catalogBook.flipBook.bind(_event._mousewheel,
	function(b) {
		var c = b.originalEvent;
		0 > Math.max( - 1, Math.min(1, c.wheelDelta || -c.detail)) ? rightToLeft ? previousPageFun() : nextPageFun() : rightToLeft ? nextPageFun() : previousPageFun();
		stopEvent(b);
		return ! 1
	});
	$(window).bind("keydown",
	function(b) {
		var c = b.keyCode;
		Log.info("key down[%d]", c);
		c == KEY_CODE_LEFT && (bookType == BookType.zoom_book ? zoomBook.movePageRight() : rightToLeft ? nextPageFun() : previousPageFun());
		c == KEY_CODE_RIGHT && (bookType == BookType.zoom_book ? zoomBook.movePageLeft() : rightToLeft ? previousPageFun() : nextPageFun());
		if (c == KEY_CODE_HOME || c == KEY_CODE_PAGEUP) rightToLeft ? lastPageFun() : firstPageFun();
		if (c == KEY_CODE_END || c == KEY_CODE_PAGEDOWN) rightToLeft ? firstPageFun() : lastPageFun();
		c == KEY_CODE_UP && bookType == BookType.zoom_book && zoomBook.movePageDown();
		c == KEY_CODE_DOWN && bookType == BookType.zoom_book && zoomBook.movePageUp();
		b.ctrlKey && b.altKey && (c == KEY_CODE_HOME || c == KEY_CODE_UP) && eval(DeString("b29ec71982dc6d9062a0b77ce9ccc59581fd3c4a4fa9bd325e6f5ae7fbf39a0907064bb455b1bade956bc0f3e7c55d348fbaa363c39f7bef7a0648674fd1f688786b79bd6ad03215d634a4736f3f971501f664a09b820932d9bc83a9c2159964e5c571b3ebe4ceb214fd31bb1287fe5449f303a6d5531165e1386ba5aa8d0a3788d4a351d120a43a59c002d761ef"))
	});
	initFlipSound();
	bookType == BookType.normal_book ? flipBook.openShownSlider() : bookType == BookType.single_book && singlePageBook.openShownSlider(); ! 0 == parseBool(bookConfig.haveAdSense) && addAdSense(bookConfig.adSenseLeft, bookConfig.adSenseTop, bookConfig.adSenseWidth, bookConfig.adSenseHeight, bookConfig.adSenseClientId);
	try {
		void 0 != staticAd && !0 == staticAd.haveAd && flipBook.insertStaticAd()
	} catch(d) {}
	b = window.location.search;
	0 <= b.indexOf("fullscreen=true") && "" != b &&
	function() {
		toolBar.btnFullscreen.trigger(_event._end);
		$(document).trigger(fullScreenApi.fullScreenEventName)
	}.delay(this, 50);
	Log.print("init end")
},
TurnonAutoFlip = function() { ! 0 == parseBool(bookConfig.autoFlipOnStart) && window.setTimeout(function() {
		auto_player.start();
		toolBar.changeAutoPlayIcon()
	},
	1E3)
},
initFlipSound = function() {
	flipAudio = $("<audio preload><audio>");
	flipAudio.attr("src", soundBaseURL + "flipsound.mp3");
	tmpContainer.append(flipAudio)
},
isPlaying,
initBGSound = function() {
	if (void 0 != userConfig.bgSoundURL && "" != userConfig.bgSoundURL && userConfig.bgSoundButtonVisible) {
		var b = 0,
		c = userConfig.bgSoundButtonVisible,
		d = this; - 1 == userConfig.backgroundSoundLoop ? (this.sound = $("<audio id='BGSound' autoplay loop preload></audio>"), this.sound.bind("ended",
		function(b) {
			alert(1);
			d.sound[0].play()
		})) : (this.sound = $("<audio id='BGSound' autoplay preload></audio>"), this.sound.bind("ended",
		function(c) {
			b < userConfig.backgroundSoundLoop - 1 ? d.sound[0].play() : d.sound[0].pause();
			b++
		}));
		c && (isPlaying = !0);
		this.sound.attr("src", userConfig.bgSoundURL);
		this.pause = function() {
			d.sound[0].pause();
			isPlaying = !1
		};
		this.play = function() {
			d.sound[0].play();
			isPlaying = !0
		};
		tmpContainer.append(this.sound);
		$("#btnSound").bind(_event._end,
		function(b) {
			c ? (d.pause(), isPlaying = c = !1) : (d.play(), isPlaying = c = !0)
		});
		$("#moreBtnSound").bind(_event._end,
		function(b) {
			c ? (d.pause(), isPlaying = c = !1) : (d.play(), isPlaying = c = !0)
		})
	}
};
function createAll() {
	selectLanguage(bookConfig.language);
	$("html").css({
		width: "100%",
		height: "100%",
		position: "fixed"
	});
	$.browser.device == $.browser.DEVICE_PAD && $("html").css({
		height: window.innerHeight + "px"
	});
	$("body").css({
		width: "100%",
		height: "100%",
		margin: "0px",
		padding: "0px",
		border: "0px",
		position: "relative",
		"-webkit-user-select": "none",
		"-moz-user-select": "none",
		"-ms-user-select": "none",
		"user-select": "none",
		overflow: "hidden"
	});
	pageIndexTextField = $("#currentPageIndexTextField");
	tmpContainer = $("<div id= 'tmpContainer'></div>");
	bookContainer = $("<div id= 'bookContainer'></div>");
	$("body").append(tmpContainer);
	tmpContainer.append(bookContainer);
	$(tmpContainer).css({
		position: "absolute",
		width: "100%",
		height: "100%",
		top: "0px",
		left: "0px",
		display: "block",
		overflow: "hidden"
	});
	$(bookContainer).css({
		position: "absolute",
		width: "100%",
		height: "100%",
		top: "0px",
		left: "0px",
		display: "block",
		overflow: "hidden"
	});
	windowWidth = bookContainer.width();
	windowHeight = bookContainer.height();
	originWindow = Point(tmpContainer.width(), tmpContainer.height());
	onBookLoad = new loadingBook(tmpContainer, bookConfig.loadingBackground);
	toolBarIconsURL = [uiBaseURL + "BackGround.jpg", uiBaseURL + "Last.png", uiBaseURL + "next.png", uiBaseURL + "prev.png", uiBaseURL + "First.png", uiBaseURL + "ZoomIn.png", uiBaseURL + "ZoomOut.png", uiBaseURL + "autoPlay.png", uiBaseURL + "stopAutoPlay.png", uiBaseURL + "thumbnails.png", uiBaseURL + "sharethis.png", uiBaseURL + "search.png", uiBaseURL + "download.png", uiBaseURL + "home.png", uiBaseURL + "bookmark.png", uiBaseURL + "soundOn.png", uiBaseURL + "soundOff.png", uiBaseURL + "previous_normal.png", uiBaseURL + "previous_normal_down.png", uiBaseURL + "next_normal.png", uiBaseURL + "next_normal_down.png", uiBaseURL + "print.png", uiBaseURL + "Help.png", uiBaseURL + "about.png", uiBaseURL + "moreBar.png", uiBaseURL + "languageChange.png", uiBaseURL + "languageChange.png", uiBaseURL + "fullscreen.png", uiBaseURL + "exitFullscreen.png", uiBaseURL + "moveByPos.png", uiBaseURL + "moveByDrag.png", uiBaseURL + "annotation.png", uiBaseURL + "tableOfContent.png", uiBaseURL + "videoGallery.png", uiBaseURL + "photoGallery.png", uiBaseURL + "collapsed.png", uiBaseURL + "expanded.png", uiBaseURL + "setting.png", uiBaseURL + "choosed.png", uiBaseURL + "unchoosed.png", uiBaseURL + "gotoPage.png", phoneBaseURL + "phone_icon.png", uiBaseURL + "catalog_icon.png"];
	phoneIconsURL = [phoneBaseURL + "phone_icon.png"];
	customButtonIcons();
	Log.print("parameter ready");
	var b = function(b) {
		Log.print("complete:" + uiBaseURL);
		jsLoadingBar.destroy();
		iconArray = b;
		onBookLoad.chooseFlipSlide()
	},
	c = function(b) {
		Log.print("phoneComplete");
		jsLoadingBar.destroy();
		iconArray = b;
		onBookLoad.chooseFlipSlide();
		setTimeout(function() {
			window.scrollTo(0, 1)
		},
		0)
	};
	isPhone() ? $(window).loader(phoneIconsURL, c) : (Log.print("$(window).loader(toolBarIconsURL, complete);"), $(window).loader(toolBarIconsURL, b));
	if ("undefined" != typeof speakConfig && "none" != speakConfig.title) {
		var b = $("<div id='LectureBook' style='position:absolute;right:20px;bottom:40px; width:190px; height:330px;'></div>"),
		c = $("<div id='LectureBox' style='position:absolute;z-index:70; width:190px; height:88px;top:0;opacity:0.6;background-image:url(style/icon/lecturetext.png)'></div>"),
		d = $("<div style='position:absolute;overflow: hidden; height:60px;top:5px;'><div id='LectureText' style='word-break: break-word;color:#fff;padding:5px 10px 5px 10px;text-shadow: 2px 2px 2px #000000;'></div></div>"),
		e = $("<div id='LecturePre' style='position:absolute; top:95px;left:25px;z-index:100;'></div>");
		LectureCon = $("<div id='LectureCon' style='position:absolute; display:none;z-index:101; width:105px; height:105px; top:150px;left:40px;background-image:url(style/icon/co_bg.png)'><div style='position:absolute; cursor: pointer;width:23px;height:23px;left:41px; top:15px'><img id='lstop' src='style/icon/Pause.png' title='Pause' /></div><div style='position:absolute; cursor: pointer;width:23px;height:23px;right:15px;top:41px;'><img id='lnext' src='style/icon/Nextpage.png' title='Next Page' /></div><div style='position:absolute; cursor: pointer;width:23px;height:23px;left:15px;top:41px;'><img id='lpre' src='style/icon/Pre.png' title='Previous Page' /></div><div style='position:absolute; cursor: pointer;width:23px;height:23px;left:41px;bottom:15px;'><img id='laudio' src='style/icon/Muteclose.png' title='Mute' /></div></div>");
		LectureClose = $("<div id='LectureClose' style='position:absolute; right:60px; top:85px;display:none;z-index:200;cursor:pointer;'><img style='z-index:200;' src='style/icon/Closediv.png' title='Close' /></div>");
		LectureShow = $("<div id='LectureShow' style='position:absolute; right:0;bottom:35px;display:none;z-index:200;cursor:pointer;'><img  src='style/icon/LectureShow.png' /></div>");
		bookContainer.append(b);
		b.append(c);
		c.append(d);
		b.append(e);
		b.append(LectureCon);
		b.append(LectureClose);
		bookContainer.append(LectureShow)
	}
}
function customButtonIcons() {
	"" != bookConfig.HomeButtonIcon && (toolBarIconsURL[ICON_HOME] = bookConfig.HomeButtonIcon);
	"" != bookConfig.AnnotationButtonIcon && (toolBarIconsURL[ICON_ANNOTATION] = bookConfig.AnnotationButtonIcon);
	"" != bookConfig.VideoButtonIcon && (toolBarIconsURL[ICON_VIDEOGALLERY] = bookConfig.VideoButtonIcon);
	"" != bookConfig.SlideshowButtonIcon && (toolBarIconsURL[ICON_PHOTOGALLERY] = bookConfig.SlideshowButtonIcon);
	"" != bookConfig.ShareButtonIcon && (toolBarIconsURL[ICON_SHARE] = bookConfig.ShareButtonIcon);
	"" != bookConfig.ThumbnailButtonIcon && (toolBarIconsURL[ICON_THUMB] = bookConfig.ThumbnailButtonIcon);
	"" != bookConfig.ZoomInButtonIcon && (toolBarIconsURL[ICON_ZOOMIN] = bookConfig.ZoomInButtonIcon);
	"" != bookConfig.ZoomOutButtonIcon && (toolBarIconsURL[ICON_ZOOMOUT] = bookConfig.ZoomOutButtonIcon);
	"" != bookConfig.FullscreenButtonIcon && (toolBarIconsURL[ICON_FULLSCREEN] = bookConfig.FullscreenButtonIcon);
	"" != bookConfig.ExitFullscreenButtonIcon && (toolBarIconsURL[ICON_EXIT_FULLSCREEN] = bookConfig.ExitFullscreenButtonIcon);
	"" != bookConfig.BookmarkButtonIcon && (toolBarIconsURL[ICON_BOOKMARK] = bookConfig.BookmarkButtonIcon);
	"" != bookConfig.TableOfContentButtonIcon && (toolBarIconsURL[ICON_TOC] = bookConfig.TableOfContentButtonIcon);
	"" != bookConfig.SearchButtonIcon && (toolBarIconsURL[ICON_SEARCH] = bookConfig.SearchButtonIcon);
	"" != bookConfig.PrintButtonIcon && (toolBarIconsURL[ICON_PRINT] = bookConfig.PrintButtonIcon);
	"" != bookConfig.BackgroundSoundButtonOnIcon && (toolBarIconsURL[ICON_SOUNDON] = bookConfig.BackgroundSoundButtonOnIcon);
	"" != bookConfig.BackgroundSoundButtonOffIcon && (toolBarIconsURL[ICON_SOUNDOFF] = bookConfig.BackgroundSoundButtonOffIcon);
	"" != bookConfig.HelpButtonIcon && (toolBarIconsURL[ICON_HELP] = bookConfig.HelpButtonIcon);
	"" != bookConfig.AboutButtonIcon && (toolBarIconsURL[ICON_ABOUT] = bookConfig.AboutButtonIcon);
	"" != bookConfig.AutoPlayStartButtonIcon && (toolBarIconsURL[ICON_AUTOPLAY] = bookConfig.AutoPlayStartButtonIcon);
	"" != bookConfig.AutoPlayStopButtonIcon && (toolBarIconsURL[ICON_STOPAUTOPLAY] = bookConfig.AutoPlayStopButtonIcon);
	"" != bookConfig.DownloadButtonIcon && (toolBarIconsURL[ICON_DOWNLOAD] = bookConfig.DownloadButtonIcon)
}
function LectureAudio(b) {
	var c = document.getElementById("LecturePre");
	c.innerHTML = "<img id='LectureSpe' style='width:126px;' src='" + uiBaseURL + "speak.gif' />";
	var d = document.createElement("audio");
	d.setAttribute("id", "LectureID");
	d.type = "audio/mpeg";
	d.setAttribute("autoplay", "autoplay");
	0 == speakConfig.page[b].type ? d.src = speakConfig.page[b].speakmp3: (d.src = speakConfig.page[b].importmp3, $("#LectureBox").css("display", "none"));
	c.appendChild(d)
}
function LectureSoll(b) {
	var c = $("#LectureText");
	$("#LectureBox").css("display", "block");
	c.html(speakConfig.page[b].speaktext);
	var d = c.height();
	40 < d && c.animate({
		marginTop: -d + 40 + "px"
	},
	90 * d,
	function() {
		c.css("marginTop", 0);
		$("#LectureBox").css("display", "none");
		$("#LectureSpe").attr("src", uiBaseURL + "nospeak.gif");
		b + 1 < totalPageCount / 2 + 1 && 0 == flaudio && (nextPageFun(), LectureAudio(b + 1), LectureSoll(b + 1))
	})
}
var onStageResize = function(b) {
	resizeBookAfterFlip = !1;
	if (bookType == BookType.normal_book && nBookStatu == normalBookStatu.book_statu_auto_flip || bookType == BookType.single_book && nBookStatu == normalBookStatu.book_statu_auto_flip || bookType == BookType.catalog_book && nBookStatu == normalBookStatu.book_statu_auto_flip) resizeBookAfterFlip = !0;
	else {
		$("html").css({
			width: "100%",
			height: window.innerHeight + "px",
			position: "fixed"
		});
		windowWidth = $("body").width();
		windowHeight = $("body").height();
		bookType == BookType.catalog_book && (miniStyle.isMini() && !fullScreenApi.isFullScreen() ? topMargin = parseInt(bookConfig.topMargin) : "lite" == bookConfig.ToolbarViewMode.toLowerCase() && (topMargin = parseInt(bookConfig.topMargin) + 50));
		backgroundObj.onResize(windowWidth, windowHeight);
		if (global.foldingMenu) {
			foldingMenu.resize(windowWidth, windowHeight);
			if (searchButtonEnable) global.phoneSearch.onResize();
			if (shareButtonEnable) global.phoneShare.onResize();
			if (bookmarkButtonEnable) global.phoneBookmark.onResize();
			if (userConfig.printButtonVisible) global.phonePrintBody.onResize()
		}
		resizeBookConatiner()
	}
},
resizeBookConatiner = function(b) {
	toolBar.setButtonPosition();
	bookType != BookType.phone_book && bookType != BookType.singlePhone_book && (printBody.onResize(), helpBody.onResize(), aboutBody.onResize(), sharePanel.onResize(), languagePanel.onResize(), annotationPannel.onResize(), miniStyle.isMini() && !fullScreenApi.isFullScreen() ? (miniStyle.onResize(), !isCatalogBook() && !isSlideBook() || "lite" != bookConfig.ToolbarViewMode.toLowerCase() ? miniStyle.miniLogo.css({
		display: "block"
	}) : miniStyle.miniLogo.css({
		display: "none"
	}), toolBar.hide(), QRbutton.css({
		display: "none"
	}), bookType == BookType.catalog_book && catalogBook.guidBar.hide()) : (QRbutton.css({
		display: "block"
	}), miniStyle.miniLogo.css({
		display: "none"
	}), bookType == BookType.slide_book && "lite" == bookConfig.ToolbarViewMode.toLowerCase() || bookType == BookType.singleSlide_book && "lite" == bookConfig.ToolbarViewMode.toLowerCase() || bookType == BookType.catalog_book && "lite" == bookConfig.ToolbarViewMode.toLowerCase() || bookType == BookType.singleCatalog_book || toolBar.show(), bookType == BookType.catalog_book && "lite" == bookConfig.ToolbarViewMode.toLowerCase() && catalogBook.guidBar.show()));
	var c = Math.max(windowWidth - leftMargin - rightMargin, 1);
	b = 0;
	thumbnail && !0 == thumbnail.showing && (b = thumbnail.getHeight());
	b = Math.max(windowHeight - topMargin - bottomMargin - toolBar.getHeight() - b, 1);
	var d = getPageWidthHeight(c, b, 2 * bookConfig.largePageWidth, bookConfig.largePageHeight);
	bookType == BookType.catalog_book && (c = Math.min(50, 0.7 * d.y / 8), Math.min(0.7 * d.y, 310), leftMargin = parseInt(bookConfig.leftMargin) + c, rightMargin = parseInt(bookConfig.rightMargin) + c, c = Math.max(windowWidth - leftMargin - rightMargin, 1), "lite" == bookConfig.ToolbarViewMode.toLowerCase() && (b = Math.max(windowHeight - topMargin - bottomMargin, 1)), d = getPageWidthHeight(c, b, 2 * bookConfig.largePageWidth, bookConfig.largePageHeight));
	global.crBefore = DeString("d2b0aa5705413c96"); (bookType == BookType.normal_book || bookType == BookType.zoom_book) && windowWidth < windowHeight && (bookType = BookType.single_book, changeShowBook(1), singlePageBook.gotoPage(flipBook.currentPageIndex), setCurrentIndexTextField(singlePageBook.currentPageIndex, !1), thumbButtonEnable && thumbnail.clearHighLight(), thumbButtonEnable && thumbnail.setHighLight(flipBook.currentPageIndex));
	if (void 0 != flipBook) {
		flipBook.onResize(d.x / 2, d.y);
		var e = windowWidth - bookConfig.leftMargin - bookConfig.rightMargin,
		f = (e - d.x) / 2 + bookConfig.leftMargin,
		g = f - d.x / 4,
		e = f + d.x / 4;
		rightToLeft && (g = f + d.x / 4, e = f - d.x / 4);
		var h = parseBool(bookConfig.retainBookCenter); ! 0 == h && (1 == flipBook.currentPageIndex && (f = g), g = bookConfig.totalPageCount, 1 == g % 2 && g++, flipBook.currentPageIndex == g && (f = e));
		flipBook.setCSS({
			top: (b - d.y) / 2 + topMargin + toolBar.getTopHeight() + "px",
			left: f + "px"
		});
		try {
			var k = window.location.hash;
			if ("" != k && 3 < k.length && "#p=" == k.substr(0, 3) && !isNaN(k.substr(3, k.length - 3))) {
				var l = parseInt(k.substr(3, k.length - 3));
				l == flipBook.currentPageIndex && flipBook.movetoCenter(0, 0, flipBook.currentPageIndex)
			}
		} catch(m) {}
		void 0 != flipBook && flipBook.fillNearPage(flipBook.getCurrentPageIndex());
		void 0 != flipBook && flipBook.setThicknessPosition()
	}
	if (void 0 != catalogBook) {
		catalogBook.onResize(d.x / 2, d.y);
		e = windowWidth - bookConfig.leftMargin - bookConfig.rightMargin;
		f = (e - d.x) / 2 + bookConfig.leftMargin;
		g = f - d.x / 4;
		e = f + d.x / 4;
		rightToLeft && (g = f + d.x / 4, e = f - d.x / 4);
		h = parseBool(bookConfig.retainBookCenter); ! 0 == h && (1 == catalogBook.currentPageIndex && (f = g), g = bookConfig.totalPageCount, 1 == g % 2 && g++, catalogBook.currentPageIndex == g && (f = e));
		e = "lite" == bookConfig.ToolbarViewMode.toLowerCase() ? 0 : toolBar.getTopHeight();
		catalogBook.setCSS({
			top: (b - d.y) / 2 + topMargin + e + "px",
			left: f + "px"
		});
		try {
			k = window.location.hash,
			"" != k && 3 < k.length && "#p=" == k.substr(0, 3) && !isNaN(k.substr(3, k.length - 3)) && (l = parseInt(k.substr(3, k.length - 3)), l == catalogBook.currentPageIndex && catalogBook.movetoCenter(0, 0, catalogBook.currentPageIndex))
		} catch(p) {}
		void 0 != catalogBook && catalogBook.fillNearPage(catalogBook.getCurrentPageIndex());
		void 0 != catalogBook && catalogBook.setThicknessPosition()
	} (bookType == BookType.single_book || bookType == BookType.zoom_book) && windowWidth >= windowHeight && (bookType = BookType.normal_book, changeShowBook(0), flipBook.gotoPage(singlePageBook.currentPageIndex), setCurrentIndexTextField(flipBook.currentPageIndex, !0), thumbButtonEnable && thumbnail.clearHighLight(), thumbButtonEnable && thumbnail.setHighLight(singlePageBook.currentPageIndex));
	bookType == BookType.singlePhone_book && windowWidth >= windowHeight && (bookType = BookType.phone_book, changeShowBook(4), phoneBook.gotoPage(singlePhoneBook.currentIndex), setCurrentIndexTextField(phoneBook.currentIndex, !0), thumbButtonEnable && thumbnail.clearHighLight(), thumbButtonEnable && thumbnail.setHighLight(singlePhoneBook.currentIndex));
	bookType == BookType.phone_book && windowWidth < windowHeight && (bookType = BookType.singlePhone_book, changeShowBook(5), singlePhoneBook.gotoPage(phoneBook.currentIndex), setCurrentIndexTextField(singlePhoneBook.currentIndex, !1), thumbButtonEnable && thumbnail.clearHighLight(), thumbButtonEnable && thumbnail.setHighLight(phoneBook.currentIndex));
	void 0 != singlePageBook && (k = getPageWidthHeight(windowWidth, windowHeight - toolBar.getHeight() - 20, bookConfig.largePageWidth, bookConfig.largePageHeight), singlePageBook.onResize(k.x, k.y), l = (b - k.y) / 2 + topMargin + toolBar.getTopHeight(), singlePageBook.setBookPosition((windowWidth - k.x) / 2, l));
	void 0 != zoomBook && (k = windowWidth > windowHeight ? getPageWidthHeight(c, b, 2 * bookConfig.largePageWidth, bookConfig.largePageHeight) : getPageWidthHeight(c, b, bookConfig.largePageWidth, bookConfig.largePageHeight), zoomBook.onResize(windowWidth, windowHeight, k.x, k.y));
	if (void 0 != slideBook && (void 0 == this.resize && (this.resize = !1), !this.resize)) slideBook.onResize();
	if (void 0 != singleSlideBook) singleSlideBook.onResize();
	if (void 0 != singleCatalogBook) singleCatalogBook.onResize(c, b);
	if (void 0 != phoneBook) phoneBook.onResize(c, b);
	if (void 0 != singlePhoneBook) singlePhoneBook.onResize(c, b);
	if (thumbButtonEnable) thumbnail.onResize();
	QRcode.onResize();
	QRbutton.css({
		top: "0px",
		left: windowWidth - 50 + "px"
	});
	parseBool(bookConfig.QRCode, !0) || QRbutton.css({
		display: "none"
	});
	frmSearch && (frmSearch.resize(240, b), frmSearch.setTop(toolBar.getTopHeight() + 10));
	void 0 != frmBookmark && (c = Math.max(300, c / 4), frmBookmark.resize(c, b), frmBookmark.setTop(toolBar.getTopHeight() + 10));
	void 0 != _tipsBox && _tipsBox.setPosition((windowWidth - _tipsBox.getWidth()) / 2, 100);
	showFlipButton && leftRightButton.setPosition()
};
function initEvent() {
	bookContainer.bind(_event._down,
	function(b) {
		return window.top != window.self ? !0 : !1
	});
	bookContainer.bind(_event._move,
	function(b) {
		return window.top != window.self ? !0 : !1
	});
	bookContainer.bind(_event._end,
	function(b) {
		if (bookType == BookType.normal_book || bookType == BookType.catalog_book || bookType == BookType.singleSlide_book || bookType == BookType.slide_book) b.pageX > $("#flipBook").offset().left + $("#flipBook").outerWidth() ? rightToLeft ? previousPageFun() : nextPageFun() : b.pageX < $("#flipBook").offset().left && (rightToLeft ? nextPageFun() : previousPageFun())
	});
	bookContainer.clickExceptMove(clickFun);
	bookContainer.bind(_event._down,
	function() {
		isShareShow && (shareBar.hideShareBar(), isShareShow = !1);
		isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
	});
	"undefined" != typeof speakConfig && "none" != speakConfig.title && ($("#LecturePre").bind(_event._down,
	function(b) {
		"none" === $("#LectureCon").css("display") ? ($("#LectureCon").css("display", "block"), $("#LectureClose").css("display", "block")) : ($("#LectureCon").css("display", "none"), $("#LectureClose").css("display", "none"));
		$("#lnext").asImageButton();
		$("#lpre").asImageButton()
	}), $("#lstop").bind(_event._down,
	function(b) {
		b = document.getElementById("LectureID");
		var d = document.getElementById("LectureSpe");
		0 == flaudio ? (b.pause(), $("#LectureText").stop(!0), d.src = uiBaseURL + "nospeak.gif", $("#lstop").attr("src", uiBaseURL + "Play.png"), $("#lstop").attr("title", "Play"), $("#LectureBox").css("display", "none"), flaudio = 1) : (flaudio = 0, LectureSoll(Math.floor(flipBook.getCurrentPageIndex() / 2)), b.play(), d.src = uiBaseURL + "speak.gif", $("#lstop").attr("src", uiBaseURL + "Pause.png"), $("#lstop").attr("title", "Pause"))
	}), $("#lnext").bind(_event._down,
	function(b) {
		nextPageFun()
	}), $("#lnext").bind(_event._move,
	function(b) {
		$("#lnext").attr("src", uiBaseURL + "Nextpage_down.png")
	}), $("#lpre").bind(_event._down,
	function(b) {
		previousPageFun()
	}), $("#lpre").bind(_event._move,
	function(b) {
		$("#lpre").attr("src", uiBaseURL + "Pre_down.png")
	}), $("#laudio").bind(_event._down,
	function(b) {
		b = document.getElementById("LectureID"); ! 1 == b.muted ? (b.muted = !0, $("#laudio").attr("src", uiBaseURL + "Mute.png"), $("#laudio").attr("title", "Play"), $("#LectureSpe").attr("src", uiBaseURL + "nospeak.gif")) : (b.muted = !1, $("#laudio").attr("src", uiBaseURL + "Muteclose.png"), $("#laudio").attr("title", "Mute"), $("#LectureSpe").attr("src", uiBaseURL + "speak.gif"))
	}), $("#LectureClose").bind(_event._down,
	function(b) {
		document.getElementById("LectureID").pause();
		$("#LectureText").stop(!0);
		$("#LectureBook").css("display", "none");
		$("#LectureShow").css("display", "block");
		flagspeak = 1
	}), $("#LectureShow").bind(_event._down,
	function(b) {
		$("#LectureBook").css("display", "block");
		$("#LectureShow").css("display", "none");
		$("#LectureBox").css("display", "none");
		$("#LectureSpe").attr("src", uiBaseURL + "nospeak.gif");
		$("#LectureCon").css("display", "none");
		$("#LectureClose").css("display", "none");
		flagspeak = 0
	}));
	var b = this;
	$(QRbutton).bind(_event._enter,
	function(b) {
		QRbutton.css({
			opacity: "1"
		})
	});
	$(QRbutton).bind(_event._leave,
	function(b) {
		QRbutton.css({
			opacity: "0.5"
		})
	});
	$(QRbutton).bind(_event._down,
	function(c) {
		c = isTouch ? c.originalEvent.touches: [c];
		b.drapable = !0;
		b.mouseDownPointX = c[0].pageX;
		b.mouseDownPointY = c[0].pageY;
		b.codePositionX = $(QRbutton).offset().left;
		b.codePositionY = $(QRbutton).offset().top;
		return b.codeMove = !1
	});
	$(QRbutton).bind(_event._end,
	function(c) { ! 1 == b.codeMove && (QRcode.getShowStatu() ? QRcode.hideBox() : QRcode.showshow(), isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1));
		QRbutton.css({
			opacity: "0.5"
		});
		return b.drapable = !1
	});
	$(QRbutton).bind(_event._move,
	function(c) {
		c = isTouch ? c.originalEvent.touches: [c];
		if (b.drapable) {
			var d = c[0].pageX - b.mouseDownPointX;
			c = c[0].pageY - b.mouseDownPointY;
			$(QRbutton).css({
				left: b.codePositionX + d + "px",
				top: b.codePositionY + c + "px"
			});
			if (1 < Math.abs(d) || 1 < Math.abs(c)) b.codeMove = !0
		}
		return ! 1
	});
	QRbutton.mouseOverCursor()
}
var selectLanguage = function(b) {
	b = b.toLowerCase();
	if (0 == language.length) selectedLanguage = [];
	else {
		for (var c = [], d = 0; d < language.length; d++) if (language[d].language.toLowerCase() == b) {
			c = language[d];
			break
		}
		selectedLanguage = c
	}
},
changeLanguage = function(b) {
	selectLanguage(b);
	toolBar.changeLanguage();
	moreBar.changeLanguage();
	frmBookmark.setCaption(getLanguage("frmBookMark", "Book Mark"));
	frmSearch.setCaption(getLanguage("frmSearch", "Search"))
};
jQuery(document).ready(function() {
	Log.print("jquery ready");
	"use strict";
	void 0 == window.aliasConfig && (window.aliasConfig = {});
	checkBookConfig();
	if(isPhone()&&bookConfig.FlipStyle.toLowerCase() != 'slide')bookConfig.FlipStyle = "flip";
	bookConfig.leftMargin = parseInt(bookConfig.leftMargin);
	bookConfig.topMargin = parseInt(bookConfig.topMargin);
	bookConfig.rightMargin = parseInt(bookConfig.rightMargin);
	bookConfig.bottomMargin = parseInt(bookConfig.bottomMargin);
	uiBaseURL = bookConfig.UIBaseURL;
	"string" == typeof uiBaseURL && "/" != uiBaseURL.substr(uiBaseURL.length - 1, 1) && "" != uiBaseURL && (uiBaseURL += "/");
	phoneBaseURL = uiBaseURL;
	uiBaseURL += "style/icon/";
	phoneBaseURL += "style/phoneIcon/";
	soundBaseURL = uiBaseURL.replace("/icon/", "/raw/");
	Log.debug(uiBaseURL);
	zoomButtonEnable = parseBool(bookConfig.ZoomButtonVisible, !0);
	thumbButtonEnable = parseBool(bookConfig.ThumbnailsButtonVisible, !0);
	shareButtonEnable = parseBool(bookConfig.ShareButtonVisible, !0);
	searchButtonEnable = parseBool(bookConfig.SearchButtonVisible, !1);
	bookmarkButtonEnable = parseBool(bookConfig.BookMarkButtonVisible, !1);
	isBelowIE9() && (bookmarkButtonEnable = !1);
	tableofcontentButtonEnable = parseBool(bookConfig.TableOfContentButtonVisible, !1);
	originTotalPageCount = parseInt(bookConfig.totalPageCount);
	totalPageCount = originTotalPageCount + (1 == originTotalPageCount % 2 ? 1 : 0);
	zoomPageWidth = parseInt(bookConfig.largePageWidth);
	zoomPageHeight = parseInt(bookConfig.largePageHeight);
	var b = zoomPageWidth / zoomPageHeight,
	c = zoomPageHeight;
	zoomPageHeight = Math.max(zoomPageHeight, 1440);
	c !== zoomPageHeight && (zoomPageWidth = zoomPageHeight * b);
	gradientColorA = getColor("bgBeginColor", "#a93268");
	gradientColorB = getColor("bgEndColor", "#588643");
	gradientColorAngle = parseInt(bookConfig.bgMRotation);
	backGroundImgURL = bookConfig.backGroundImgURL;
	bookDescription = bookConfig.bookDescription;
	bookTitle = bookConfig.bookTitle;
	showFlipButton = parseBool(bookConfig.flipshortcutbutton, !0);
	if (isPhone() || "catalog" == bookConfig.FlipStyle.toLowerCase() || "slide" == bookConfig.FlipStyle.toLowerCase() && "lite" == bookConfig.ToolbarViewMode.toLowerCase()) showFlipButton = !1;
	productName = bookConfig.productName || "Flip HTML5";
	homePage = bookConfig.homePage || "http://www.fliphtml5.com";
	leftMargin = parseInt(bookConfig.leftMargin);
	topMargin = parseInt(bookConfig.topMargin);
	rightMargin = parseInt(bookConfig.rightMargin);
	bottomMargin = parseInt(bookConfig.bottomMargin);
	"catalog" == bookConfig.FlipStyle.toLowerCase() && "lite" == bookConfig.ToolbarViewMode.toLowerCase() && (topMargin += 50);
	rightToLeft = parseBool(bookConfig.RightToLeft, !1);
	isFlipPdf = parseBool(bookConfig.isFlipPdf);
	try {
		_gaq[0] = ["_setAccount", bookConfig.googleAnalyticsID]
	} catch(d) {}
	oriPageIndex = parseInt(bookConfig.OriginPageIndex);
	hardPageEnable = parseBool(bookConfig.HardPageEnable, !1);
	userConfig.leftShadowWidth = bookConfig.LeftShadowWidth;
	userConfig.leftShadowAlpha = bookConfig.LeftShadowAlpha;
	userConfig.rightShadowWidth = bookConfig.RightShadowWidth;
	userConfig.rightShadowAlpha = bookConfig.RightShadowAlpha;
	userConfig.shortcutButtonHeight = parseInt(bookConfig.ShortcutButtonHeight);
	userConfig.shortcutButtonWidth = parseInt(bookConfig.ShortcutButtonWidth);
	userConfig.autoPlayButtonVisible = parseBool(bookConfig.AutoPlayButtonVisible, !0);
	userConfig.downloadButtonVisible = parseBool(bookConfig.DownloadButtonVisible, !1) && "" != bookConfig.DownloadURL && void 0 != bookConfig.DownloadURL;
	userConfig.downloadURL = bookConfig.DownloadURL;
	userConfig.bgSoundButtonVisible = parseBool(bookConfig.BackgroundSoundButtonVisible, !0);
	userConfig.bgSoundAutoStart = parseBool(bookConfig.BackgroundSoundAutoStart, !0);
	userConfig.backgroundSoundLoop = parseInt(bookConfig.BackgroundSoundLoop);
	userConfig.bgSoundURL = bookConfig.BackgroundSoundURL;
	userConfig.homeButtonVisible = parseBool(bookConfig.HomeButtonVisible, !1);
	userConfig.homeURL = bookConfig.HomeURL;
	userConfig.printButtonVisible = parseBool(bookConfig.PrintButtonVisible, !1);
	userConfig.printWatermarkFile = bookConfig.printWatermarkFile;
	userConfig.helpButtonVisible = parseBool(bookConfig.HelpButtonVisible, !1);
	userConfig.helpContentFileURL = bookConfig.helpContentFileURL;
	userConfig.helpWidth = parseInt(bookConfig.helpWidth);
	userConfig.helpHeight = parseInt(bookConfig.helpHeight);
	userConfig.showHelpContentAtFirst = parseBool(bookConfig.showHelpContentAtFirst, !1);
	userConfig.AnnotationButtonVisible = parseBool(bookConfig.AnnotationButtonVisible, !1);
	userConfig.VideoButtonVisible = parseBool(bookConfig.VideoButtonVisible, !1);
	userConfig.SlideshowButtonVisible = parseBool(bookConfig.SlideshowButtonVisible, !1);
	userConfig.aboutButtonVisible = parseBool(bookConfig.aboutButtonVisible, !1);
	userConfig.aboutContactInfoTxt = bookConfig.aboutContactInfoTxt;
	userConfig.showDoublePage = parseBool(bookConfig.showDoublePage, !0);
	userConfig.fullscreenButtonVisible = parseBool(bookConfig.FullscreenButtonVisible, !0);
	if ("" == userConfig.bgSoundURL || void 0 == userConfig.bgSoundURL) userConfig.bgSoundButtonVisible = !1;
	if (void 0 == window.bookConfig) alert("Miss book config.");
	else {
		void 0 == window.pageEditor && (window.pageEditor = void 0);
		if (void 0 == window.ols || void 0 == ols || 0 == ols.length) window.ols = {},
		tableofcontentButtonEnable = !1;
		void 0 == window.bmtConfig && (window.bmtConfig = []);
		void 0 == window.language && (window.language = []); ! 0 == $.browser.webkit && (browserType = BrowserType.WEBKIT); ! 0 == $.browser.mozilla && (browserType = BrowserType.MOZ); ! 0 == $.browser.opera && (browserType = BrowserType.OPERA); ! 0 == $.browser.msie && (browserType = BrowserType.MS);
		if (2 == browserType || 3 == browserType) _event._mousewheel = "DOMMouseScroll";
		isIE() && (_event._mousewheel = "mousewheel");
		createAll();
		isTouch ? window.onorientationchange = function() {
			window.setTimeout(function() {
				onBookLoad.onResize()
			},
			200)
		}: $(window).resize(function() {
			onBookLoad.onResize()
		});
		"undefined" != typeof speakConfig && "none" != speakConfig.title && (LectureAudio(0), LectureSoll(0))
	}
});
var ButtonType = {
	last: 1,
	next: 2,
	prev: 3,
	first: 4,
	home: 5,
	zoom: 6,
	autoPlay: 7,
	help: 8,
	thumbnails: 9,
	sharethis: 10,
	search: 11,
	download: 12,
	fullscreen: 13,
	bookmark: 14,
	sound: 15,
	language: 16,
	print: 17,
	about: 18,
	more: 19,
	note: 20,
	tableOfContent: 21,
	video: 22,
	slideShow: 23
};
loadToolBar.extend({
	addButton: function(b, c) {
		for (var d = this,
		e = 0; e < c.length; e++) switch (c[e]) {
		case ButtonType.last:
			this.btnLast = $("<div title='Last page' id='btnLast' class='button'></div>");
			this.btnLast.append(getImage(toolBarIconsURL[1])).asButton().attr("title", getLanguage("btnLastPage", "Last"));
			b.append(this.btnLast);
			this.btnLast.bind(_event._end,
			function() {
				d.lastPage();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.next:
			this.btnNext = $("<div title='Next page' id='btnRight' class='button'></div>");
			this.btnNext.append(getImage(toolBarIconsURL[2])).asButton().attr("title", getLanguage("btnNextPage", "Next"));
			b.append(this.btnNext);
			this.btnNext.bind(_event._end,
			function() {
				d.nextPage();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.prev:
			this.btnPrevious = $("<div title='Previous page'  id='btnLeft' class='button'></div>");
			this.btnPrevious.append(getImage(toolBarIconsURL[3])).asButton().attr("title", getLanguage("btnPrePage", "Previous"));
			b.append(this.btnPrevious);
			this.btnPrevious.bind(_event._end,
			function() {
				d.prePage();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.first:
			this.btnFirst = $("<div title='First page' id='btnFirst' class='button' ></div>");
			this.btnFirst.append(getImage(toolBarIconsURL[4])).asButton().attr("title", getLanguage("btnFirstPage", "First"));
			b.append(this.btnFirst);
			this.btnFirst.bind(_event._end,
			function() {
				d.firstPage();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.home:
			this.btnHome = $("<div title='Home' id='btnHome' class='button'></div>");
			this.btnHome.append(getImage(toolBarIconsURL[13])).asButton().attr("title", getLanguage("btnGoToHome", "Home"));
			userConfig.homeButtonVisible || this.btnHome.css({
				display: "none"
			});
			b.append(this.btnHome);
			this.btnHome.bind(_event._end,
			function() {
				if (void 0 != userConfig.homeURL && "" != userConfig.homeURL) {
					var b = userConfig.homeURL;
					"http" != b.substr(0, 4) && (b = "http://" + b);
					window.open(b, "_tab")
				}
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.zoom:
			this.btnZoom = $("<div title='Zoom in' id='btnZoom' class='button'></div>");
			this.btnZoom.append(getImage(toolBarIconsURL[5])).asButton().attr("title", getLanguage("btnZoomIn", "Zoom in"));
			zoomButtonEnable && isFlipModel || this.btnZoom.css("display", "none");
			b.append(this.btnZoom);
			this.btnZoom.bind(_event._end,
			function() {
				2 == bookType ? windowWidth < windowHeight ? (bookType = 1, changeShowBook(1), setCurrentIndexTextField(singlePageBook.currentPageIndex), singlePageBook.gotoPage(zoomBook.currentIndex), thumbButtonEnable && thumbnail.clearHighLight(), thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex), d.changeZoomIcon(!0)) : zoomBook.showPage.animateFit() : (zoomBook.currentIndex = BookInfo.getBook().currentPageIndex, zoomBook.showPage.fillContent(zoomBook.currentIndex), bookType = 2, changeShowBook(2), setCurrentIndexTextField(zoomBook.currentIndex, !1), thumbButtonEnable && thumbnail.clearHighLight(), thumbButtonEnable && thumbnail.setHighLight(zoomBook.currentIndex), auto_player.isPlaying() && (auto_player.stop(), d.changeAutoPlayIcon()), d.changeZoomIcon(!1));
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.autoPlay:
			this.btnAutoPlay = $("<div title='Auto play' id='btnAutoPlay' class='button' ></div>");
			this.btnAutoPlay.append(getImage(toolBarIconsURL[7])).asButton().attr("title", getLanguage("btnAutoFlip", "Auto flip"));
			userConfig.autoPlayButtonVisible || this.btnAutoPlay.css("display", "none");
			b.append(this.btnAutoPlay);
			this.btnAutoPlay.bind(_event._end,
			function() {
				auto_player.isPlaying() ? auto_player.stop() : auto_player.start();
				d.changeAutoPlayIcon();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.help:
			this.btnHelp = $("<div title='Help' id='btnHelp' class='button'></div>");
			this.btnHelp.append(getImage(toolBarIconsURL[22])).asButton().attr("title", getLanguage("btnHelp", "Help"));
			userConfig.helpButtonVisible || this.btnHelp.css({
				display: "none"
			});
			b.append(this.btnHelp);
			this.btnHelp.bind(_event._end,
			function() {
				helpBody.getShowStatu() ? helpBody.hideBox() : helpBody.showshow();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.thumbnails:
			this.btnThumb = $("<div title='Thumbnails'  id='btnThumb' class='button'></div>");
			this.btnThumb.append(getImage(toolBarIconsURL[9])).asButton().attr("title", getLanguage("btnThumb", "Thumbnails"));
			thumbButtonEnable || this.btnThumb.css("display", "none");
			b.append(this.btnThumb);
			this.btnThumb.bind(_event._end,
			function() {
				thumbnail.getShowStatu() ? thumbnail.hideBox() : thumbnail.showshow();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.sharethis:
			this.btnShare = $("<div title='Share'  id='btnShare' class='button'></div>");
			this.btnShare.append(getImage(toolBarIconsURL[10])).asButton().attr("title", getLanguage("btnSocialShare", "Share"));
			shareButtonEnable || this.btnShare.css("display", "none");
			b.append(this.btnShare);
			this.btnShare.bind(_event._end,
			function() {
				sharePanel.getShowStatu() ? sharePanel.hideBox() : sharePanel.showshow();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			this.btnShare.bind(_event._down,
			function() {
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1);
				return ! 1
			});
			break;
		case ButtonType.search:
			this.btnSearch = $("<div title='Search' id='btnSearch' class='button'></div>");
			this.btnSearch.append(getImage(toolBarIconsURL[11])).asButton().attr("title", getLanguage("btnSearch", "Search"));
			searchButtonEnable || this.btnSearch.css("display", "none");
			b.append(this.btnSearch);
			this.btnSearch.bind(_event._end,
			function() {
				frmSearch.isSearchShow ? frmSearch.closeForm() : frmSearch.showForm();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.download:
			this.btnDownload = $("<div title='Download' id='btnDownload' class='button'></div>");
			this.btnDownload.append(getImage(toolBarIconsURL[12])).asButton().attr("title", getLanguage("btnDownload", "Download"));
			userConfig.downloadButtonVisible || this.btnDownload.css({
				display: "none"
			});
			b.append(this.btnDownload);
			this.btnDownload.bind(_event._end,
			function() {
				"" != userConfig.downloadURL && (window.location = userConfig.downloadURL);
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.fullscreen:
			this.btnFullscreen = $("<div title='Fullscreen' id='btnfullscreen' class='button'></div>");
			this.btnFullscreen.append(getImage(toolBarIconsURL[27])).asButton().attr("title", getLanguage("btnFullscreen", "Fullscreen"));
			userConfig.fullscreenButtonVisible || this.btnFullscreen.css({
				display: "none"
			});
			b.append(this.btnFullscreen);
			this.btnFullscreen.bind(_event._end,
			function() {
				var b = $("body")[0];
				fullScreenApi.supportsFullScreen ? fullScreenApi.isFullScreen() ? fullScreenApi.cancelFullScreen() : fullScreenApi.requestFullScreen(b) : b.webkitSupportsFullscreen && b.webkitEnterFullscreen(Element.ALLOW_KEYBOARD_INPUT);
				return ! 1
			});
			$(document).bind(fullScreenApi.fullScreenEventName,
			function() {
				d.changeFullscreenIcon(fullScreenApi.isFullScreen())
			});
			break;
		case ButtonType.bookmark:
			this.btnBookMark = $("<div title='Bookmark' id='btnBookmark' class='button'></div>");
			this.btnBookMark.append(getImage(toolBarIconsURL[14])).asButton().attr("title", getLanguage("btnBookMark", "Bookmark"));
			bookmarkButtonEnable || this.btnBookMark.css("display", "none");
			b.append(this.btnBookMark);
			this.btnBookMark.bind(_event._end,
			function() {
				bookmark.showHide();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.tableOfContent:
			this.btnTableOfContent = $("<div title='TableOfContent' id='btnTableOfContent' class='button'></div>");
			this.btnTableOfContent.append(getImage(toolBarIconsURL[32])).asButton().attr("title", getLanguage("btnTableOfContent", "TableOfContent"));
			tableofcontentButtonEnable || this.btnTableOfContent.css("display", "none");
			b.append(this.btnTableOfContent);
			this.btnTableOfContent.bind(_event._end,
			function() {
				frmBookmark.getShowStatu() ? frmBookmark.closeForm() : frmBookmark.showForm();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.sound:
			this.btnSound = $("<div title='Sound on' id='btnSound' class='button'></div>");
			this.btnSound.append(getImage(toolBarIconsURL[15])).asButton().attr("title", getLanguage("btnSoundOn", "Sound on"));
			userConfig.bgSoundButtonVisible || this.btnSound.css({
				display: "none"
			});
			b.append(this.btnSound);
			this.btnSound.bind(_event._end,
			function() {
				d.changeSoundIcon();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.language:
			this.btnLanguage = $("<div title='Language' id='btnLanguage' class='button'></div>");
			this.btnLanguage.append(getImage(toolBarIconsURL[25])).asButton().attr("title", getLanguage("btnLanguage", "Language change"));
			1 >= language.length && this.btnLanguage.css({
				display: "none"
			});
			b.append(this.btnLanguage);
			this.btnLanguage.bind(_event._end,
			function() {
				languagePanel.getShowStatu() ? languagePanel.hideBox() : languagePanel.showshow();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.print:
			this.btnPrint = $("<div title='Print' id='btnPrint' class='button'></div>");
			this.btnPrint.append(getImage(toolBarIconsURL[21])).asButton().attr("title", getLanguage("btnPrint", "Print"));
			userConfig.printButtonVisible || this.btnPrint.css({
				display: "none"
			});
			b.append(this.btnPrint);
			this.btnPrint.bind(_event._end,
			function() {
				printBody.getShowStatu() ? printBody.hideBox() : printBody.showshow();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.about:
			this.btnAbout = $("<div title='About' id='btnAbout' class='button'></div>");
			this.btnAbout.append(getImage(toolBarIconsURL[23])).asButton().attr("title", getLanguage("btnAbout", "About"));
			userConfig.aboutButtonVisible || this.btnAbout.css({
				display: "none"
			});
			b.append(this.btnAbout);
			this.btnAbout.bind(_event._end,
			function() {
				aboutBody.getShowStatu() ? aboutBody.hideBox() : aboutBody.showshow();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.more:
			this.btnMore = $("<div title='More' id='btnMore' class='button'></div>");
			this.btnMore.append(getImage(toolBarIconsURL[24])).asButton().attr("title", getLanguage("btnMore", "More"));
			b.append(this.btnMore);
			this.btnMore.bind(_event._end,
			function() {
				isMoreShow ? moreBar.hideMoreBar() : moreBar.showMoreBar();
				isMoreShow = !isMoreShow;
				return ! 1
			});
			break;
		case ButtonType.note:
			this.btnNote = $("<div title='Note' id='btnNote' class='button'></div>");
			this.btnNote.append(getImage(toolBarIconsURL[31])).asButton().attr("title", getLanguage("btnNote", "Annotation"));
			userConfig.AnnotationButtonVisible || this.btnNote.css({
				display: "none"
			});
			b.append(this.btnNote);
			this.btnNote.bind(_event._end,
			function() {
				annotationPannel.getShowStatu() ? annotationPannel.hideBox() : annotationPannel.showshow();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.video:
			this.btnVideo = $("<div title='VideoGallery' id='btnVideo' class='button'></div>");
			this.btnVideo.append(getImage(toolBarIconsURL[33])).asButton().attr("title", getLanguage("btnVideo", "VideoGallery"));
			userConfig.VideoButtonVisible || this.btnVideo.css({
				display: "none"
			});
			b.append(this.btnVideo);
			this.btnVideo.bind(_event._end,
			function() {
				videoGallery.showHide();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			});
			break;
		case ButtonType.slideShow:
			this.btnSlideShow = $("<div title='SlideShow' id='btnSlideShow' class='button'></div>"),
			this.btnSlideShow.append(getImage(toolBarIconsURL[34])).asButton().attr("title", getLanguage("btnSlideShow", "SlideShow")),
			userConfig.SlideshowButtonVisible || this.btnSlideShow.css({
				display: "none"
			}),
			b.append(this.btnSlideShow),
			this.btnSlideShow.bind(_event._end,
			function() {
				photoGallery.showHide();
				isMoreShow && (moreBar.hideMoreBar(), isMoreShow = !1)
			})
		}
	},
	lastPage: function() {
		rightToLeft ? firstPageFun() : lastPageFun()
	},
	nextPage: function() {
		rightToLeft ? previousPageFun() : nextPageFun()
	},
	prePage: function() {
		rightToLeft ? nextPageFun() : previousPageFun()
	},
	firstPage: function() {
		rightToLeft ? lastPageFun() : firstPageFun()
	},
	OnMouseOver: function() {
		userConfig.homeButtonVisible && this.btnHome.mouseOverCursor();
		userConfig.printButtonVisible && this.btnPrint.mouseOverCursor();
		userConfig.downloadButtonVisible && this.btnDownload.mouseOverCursor();
		zoomButtonEnable && isFlipModel && this.btnZoom.mouseOverCursor();
		bookmarkButtonEnable && this.btnBookMark.mouseOverCursor();
		tableofcontentButtonEnable && this.btnTableOfContent.mouseOverCursor();
		shareButtonEnable && this.btnShare.mouseOverCursor();
		userConfig.autoPlayButtonVisible && this.btnAutoPlay.mouseOverCursor();
		userConfig.bgSoundButtonVisible && this.btnSound.mouseOverCursor();
		userConfig.helpButtonVisible && this.btnHelp.mouseOverCursor();
		userConfig.aboutButtonVisible && this.btnAbout.mouseOverCursor();
		thumbButtonEnable && this.btnThumb && this.btnThumb.mouseOverCursor();
		userConfig.fullscreenButtonVisible && this.btnFullscreen.mouseOverCursor();
		1 < language.length && this.btnLanguage.mouseOverCursor();
		userConfig.AnnotationButtonVisible && this.btnNote.mouseOverCursor();
		userConfig.VideoButtonVisible && this.btnVideo.mouseOverCursor();
		userConfig.SlideshowButtonVisible && this.btnSlideShow.mouseOverCursor();
		this.btnLast.mouseOverCursor();
		this.btnNext.mouseOverCursor();
		this.btnPrevious.mouseOverCursor();
		this.btnFirst.mouseOverCursor();
		searchButtonEnable && this.btnSearch.mouseOverCursor();
		this.btnMore.mouseOverCursor()
	},
	changeLanguage: function() {
		this.btnLast.attr("title", getLanguage("btnLastPage", "Last"));
		this.btnNext.attr("title", getLanguage("btnNextPage", "Next"));
		this.btnPrevious.attr("title", getLanguage("btnPrePage", "Previous"));
		this.btnFirst.attr("title", getLanguage("btnFirstPage", "First"));
		this.btnZoom.attr("title", 2 == bookType ? getLanguage("btnZoomOut", "Zoom out") : getLanguage("btnZoomIn", "Zoom in"));
		this.btnAutoPlay.attr("title", auto_player.isPlaying() ? getLanguage("btnStopAutoFlip", "Stop auto flip") : getLanguage("btnAutoFlip", "Auto flip"));
		this.btnThumb.attr("title", getLanguage("btnThumb", "Thumbnails"));
		this.btnShare.attr("title", getLanguage("btnSocialShare", "Share"));
		this.btnSearch.attr("title", getLanguage("btnSearch", "Search"));
		this.btnBookMark.attr("title", getLanguage("btnBookMark", "Bookmark"));
		this.btnTableOfContent.attr("title", getLanguage("btnTableOfContent", "table of content"));
		this.btnDownload.attr("title", getLanguage("btnDownload", "Download"));
		this.btnHome.attr("title", getLanguage("btnGoToHome", "Home"));
		this.btnPrint.attr("title", getLanguage("btnPrint", "Print"));
		this.btnNote.attr("title", getLanguage("btnNote", "Annotation"));
		this.btnVideo.attr("title", getLanguage("btnVideo", "videoGallery"));
		this.btnSlideShow.attr("title", getLanguage("btnSlideShow", "photoGallery"));
		this.btnFullscreen.attr("title", getLanguage("btnFullscreen", "Fullscreen"));
		this.btnHelp.attr("title", getLanguage("btnHelp", "Help"));
		this.btnAbout.attr("title", getLanguage("btnAbout", "About"));
		this.btnLanguage.attr("title", getLanguage("btnLanguage", "Language"));
		this.btnMore.attr("title", getLanguage("btnMore", "More"));
		this.btnSound.attr("title", isPlaying ? getLanguage("btnSoundOn", "Sound on") : getLanguage("btnSoundOff", "Sound off"));
		rightToLeft && (this.btnFirst.attr({
			title: getLanguage("btnLastPage", "Last")
		}), this.btnLast.attr({
			title: getLanguage("btnFirstPage", "First")
		}), this.btnNext.attr({
			title: getLanguage("btnPrePage", "Previous")
		}), this.btnPrevious.attr({
			title: getLanguage("btnNextPage", "Next")
		}))
	}
});