(this||(0,eval)("(this)")).bdor=[];
(function(b){function c(b){b=f.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)}function d(b){b=f.match(b);if(null==b||0==b.length)return 0;b=b[0].replace("_",".").match(/\d+\.?\d?/);if(null==b||0==b.length)return 0;b=b[0];return""==b?0:parseFloat(b)}var f=navigator.userAgent.toLowerCase();b.browser={};b.browser.webkit=/webkit/.test(f);b.browser.mozilla=/firefox/.test(f);b.browser.firefox=b.browser.mozilla;b.browser.msie=/msie/.test(f)||
/trident/.test(f)||/edge/.test(f);b.browser.edge=/edge/.test(f);b.browser.opera=/opera/.test(f)||/opr/.test(f);b.browser.chrome=/chrome/.test(f)&&!b.browser.opera&&!b.browser.edge;b.browser.uc=/ucbrowser/.test(f);b.browser.safari=/safari/.test(f)&&!b.browser.chrome&&!b.browser.uc&&!b.browser.opera;b.browser.version=0;bdor[1]="p";b.browser.firefox&&(b.browser.version=c(/firefox\/\d+/));if(b.browser.msie){var g=f.match(/msie\s?\d+\.0/);null==g?(g=f.match(/trident\/\d+\.0/),null!=g&&0<g.length&&(g=parseInt(g[0].replace("trident/",
"")),b.browser.version=g+4)):(g=parseInt(g[0].replace("msie","")),b.browser.version=g)}b.browser.opera&&(b.browser.version=c(/opera\/\d+/)||c(/opr\/\d+/));b.browser.chrome&&(b.browser.version=c(/chrome\/\d+/));b.browser.uc&&(b.browser.version=c(/ucbrowser\/\d+/));b.browser.safari&&(b.browser.version=c(/safari\/\d+/));if(void 0==b.browser.device){b.browser.DEVICE_PC=0;b.browser.DEVICE_PAD=1;b.browser.DEVICE_PHONE=2;var g=/pad/.test(f)||/ipod/.test(f),h=/iphone/.test(f),k=/wpdesktop/.test(f)||/windows phone/.test(f),
l=/blackberry/.test(f),m=/mobile/.test(f)||/phone/.test(f);b.browser.device=b.browser.DEVICE_PC;if(g)b.browser.device=b.browser.DEVICE_PAD;else if(h||k||l||m)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.WP="WinPhone";b.system.WP_DESKTOP="WinPhoneDesktop";b.system.MAC="Mac OS";b.system.IOS="iPhone OS";b.system.LINUX="Linux";b.system.ANDROID="Android";b.system.BLACKBERRY="BlackBerry";/windows/.test(f)&&(b.system.name=b.system.WINDOWS,b.system.version=d(/windows nt\s?\d+\.?\d?/));/windows phone/.test(f)&&(b.system.name=b.system.WP,b.system.version=d(/windows phone\s?\d+\.?\d?/));/wpdesktop/.test(f)&&(b.system.name=b.system.WP_DESKTOP,
b.system.version=d(/wpdesktop\s?\d+\.?\d?/));if(b.system.name!=b.system.WP){if(/iphone/.test(f)||/ipad/.test(f))b.system.name=b.system.IOS,b.system.version=d(/os\s?\d+_?\d?/);/android/.test(f)&&(b.system.name=b.system.ANDROID,b.system.version=d(/android\s?\d+\.?\d?/))}/mac/.test(f)&&b.browser.system!=b.browser.IOS&&(b.system.name=b.system.MAC,b.system.version=d(/os x\s?\d+\.?\d?/));/linux/.test(f)&&!/android/.test(f)&&(b.system.name=b.system.LINUX);/blackberry/.test(f)&&(b.system.name=b.system.BLACKBERRY,
b.system.version=d(/blackberry\s?\d+/))}})(jQuery);
var isIE=function(){return $.browser.msie},isIE8=function(){return $.browser.msie&&8==$.browser.version},isIE9=function(){return $.browser.msie&&9==$.browser.version},isIE11=function(){return $.browser.msie&&11==$.browser.version},isBelowIE11=function(){return $.browser.msie&&11>$.browser.version},isPad=function(){return $.browser.device==$.browser.DEVICE_PAD||$.browser.device==$.browser.DEVICE_PC&&$.system.name==$.system.ANDROID?!0:!1},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<=b.toLowerCase().indexOf("phone=true")||
0<=b.toLowerCase().indexOf("phonebook=true")?!0:!1},isAndroidWeChat=function(){return $.system.name==$.system.ANDROID&&$.browser.chrome&&40>$.browser.version},isAndroidDefault=function(){return $.system.name==$.system.ANDROID&&$.browser.safari},isPhoneBook=function(){if($.system.name==$.system.ANDROID&&$.browser.uc)return!0;var b=window.location.search;return(isPhone()||isPad())&&$.system.name==$.system.ANDROID&&4>parseInt($.system.version)||0<=b.toLowerCase().indexOf("phonebook=true")||(isPhone()||
isPad())&&"slide"==bookConfig.FlipStyle.toLowerCase()?!0:!1},isHigherThanIOS8=function(){return $.system.name==$.system.IOS&&8<=$.system.version},isInTheFrame=function(){return window.top!=window};function isBelowIE9(){return $.browser.msie?9>$.browser.version?!0:!1:!1}function isBelowIE8(){return $.browser.msie?8>$.browser.version?!0:!1:!1}function isBelowIE10(){return $.browser.msie?10>$.browser.version?!0:!1:!1}var global=function(){return this||(0,eval)("(this)")}(),virtual_function=function(){};
function getPackageByName(b){if(void 0==b||""==b)return global;var c=global;b=b.split(".");for(var d=0;d<b.length;d++){var f=b[d];c[f]||(c[f]={IS_PACKAGE_OBJECT:!0});c=c[f]}return c}function getClassByFullName(b){if(-1==b.indexOf("."))return global[b];var c=b.split(".");b=c.pop();c=c.join(".");return getPackageByName(c)[b]}
function classof(b,c){if(!b)return"";c||(c=global);"string"==typeof c&&(c=getPackageByName(c));var d=["webkitStorageInfo","webkitIndexedDB"],f;for(f in c)try{if(!(-1<d.indexOf(f))&&c[f]instanceof Function)try{if(b instanceof c[f])return f}catch(g){}}catch(h){}for(f in c)if("object"==typeof c[f]&&c[f].IS_PACKAGE_OBJECT&&(d=classof(b,c[f]),""!=d))return f+"."+d;return""}
function nameof(b,c){if(!b)return"";c||(c=global);"string"==typeof c&&(c=getPackageByName(c));var d=["webkitStorageInfo","webkitIndexedDB"],f;for(f in c)try{if(!(-1<d.indexOf(f))&&c[f]==b)return f}catch(g){}for(f in c)if("object"==typeof c[f]&&c[f].IS_PACKAGE_OBJECT&&(d=nameof(b,c[f]),""!=d))return f+"."+d;return""}
function Class(b,c){if("string"===typeof b){var d=c,f=getPackageByName(d.Package);f[b]=Class(d);return f[b]}var g=function(){if(this.Import){"string"==typeof this.Import&&(this.Import=[this.Import]);for(var b=0;b<this.Import.length;b++){var c=this.Import[b],d=getPackageByName(c);if(d instanceof Function)this[c.split(".").pop()]=d;else for(var f in d)d[f]instanceof Function&&(this[f]=d[f])}}d=getPackageByName(this.Package);if(d!=global)for(f in d)this.getClassName()!=f&&d[f]instanceof Function&&(this[f]=
d[f]);this.create&&this.create instanceof Function&&this.create.apply(this,arguments)};g.prototype=b||{};var h;g.prototype.getClassName=function(){h||(h=nameof(g,this.Package));return h};g.prototype.getClass=function(){return g};d=g.prototype.statics;if(void 0!=d){for(f in d)void 0==g[f]&&(g[f]=d[f]);delete g.prototype.statics}return g}
Function.prototype.extend=function(b){if(!b)return this;if("string"==typeof b)if(-1<b.indexOf(".")){if(b=getClassByFullName(b),!b)return this}else{var c=this.prototype.Package,d=b;c&&""!=c&&(b=c+"."+d);b=getClassByFullName(b);if(!b&&(b=getClassByFullName(d),!b))return this}if(b instanceof Function){for(var f in b)void 0==this[f]&&(this[f]=b[f]);for(f in b.prototype)void 0==this.prototype[f]?b.prototype[f]==virtual_function?console&&console.error&&console.error("virtual function [%s] must be override.",
f):this.prototype[f]=b.prototype[f]:(d=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/,this.prototype[f]instanceof Function&&b.prototype[f]instanceof Function&&d.test(this.prototype[f])&&(this.prototype[f]=function(b,c){return function(){var d=this._super;this._super=b;var f=c.apply(this,arguments);this._super=d;return f}}(b.prototype[f],this.prototype[f])));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))};
var Instance={copy:function(b){if(!b||"object"!==typeof b)return b;var c={};b instanceof Array&&(c=[]);for(property in b)c[property]="object"==typeof b[property]?Instance.copy(b[property]):b[property];return c},create:function(b,c){c||(c=[]);var d=b;"string"==typeof b&&(d=getClassByFullName(d));if(!d)return null;var f=d.prototype.create;d.prototype.create=function(){};var g=new d;d.prototype.create=f;g.create&&g.create instanceof Function&&g.create.apply(g,c);return g},JSON:function(b){if(void 0===
b)return"undefined";if(null===b)return"null";if(b instanceof Array){var c=[];c.push("[");for(var d=0;d<b.length;d++)c.push(Instance.JSON(b[d])),c.push(", ");1<c.length&&c.pop();c.push("]");return c.join("")}if(b instanceof Function)return b;if("string"===typeof b)return'"'+b.toString()+'"';if("number"===typeof b)return Number(b).toString();if("boolean"===typeof b)return Boolean(b).toString();if("object"===typeof b){c=[];c.push("{");for(d in b){var f='"'+d+'":'+Instance.JSON(b[d]);c.push(f);c.push(", ")}1<
c.length&&c.pop();c.push("}");return c.join("")}},parse:function(b,c){return b&&"undefined"!=b&&"null"!=b&&""!=b?eval("("+b+")"):c}};Object.create=Object.create||function(){function b(){}return function(c){if(1!=arguments.length)throw Error("Object.create implementation only accepts one parameter.");b.prototype=c;return new b}}();
Object.keys=Object.keys||function(b){if(b!==Object(b))throw new TypeError("Object.keys called on a non-object");var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push(d);return c};
(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(),h=Math.max(0,16.7-(d-b)),k=window.setTimeout(function(){c(d+h)},h);b=d+h;return k});window.cancelAnimationFrame||(window.cancelAnimationFrame=
function(b){clearTimeout(b)})})();
var ColorTable={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff0",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",
darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdC",
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",
lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",value:function(b){if(!b||"string"!=typeof b)return b;var c=b.toLowerCase();return this[c]?this[c]: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=global);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=global);c=c||1;d=d||[];var f=this;return{intervalId:setInterval(function(){this.apply(b,d)}.bind(this),c),stop:function(){clearInterval(this.intervalId);this.intervalId=void 0},isRunning:function(){return void 0!=
this.intervalId},start:function(){this.intervalId=setInterval(function(){f.apply(b,d)},c)}}},animation:function(b,c){"object"!==typeof b&&(c=b,b=global);var d={stopFlag:!1,stop:function(){this.stopFlag=!0}},f=this,g=0,h=Math.ceil(c/16.7),k=function(){!0!==d.stopFlag&&(g++,!1!==f.apply(b,[g,h])&&(g<h||void 0==c)&&window.requestAnimationFrame(k))};k();return d},once:function(b,c){b||(b=global);this.executed||(this.executed=!1);this.executed||(this.apply(b,c),this.executed=!0)}});
String.expand({trim:function(){return this.replace(/(^\s*)|(\s*$)/g,"")},replaceAll:function(b,c,d){void 0==d&&(d=!1);if(!b||!c)return this;if(RegExp&&!d)return this.replace(RegExp(b,"g"),c);var f=this.indexOf(b);d=[];for(var g=this;-1!=f;){var f=f+b.length,h=g.substring(0,f),g=g.substring(f),h=h.replace(b,c);d.push(h);f=g.indexOf(b)}""!==g&&d.push(g);return d.join("")},subBetween:function(b,c){if(void 0==b||void 0==c)return"";var d=this.length,f=this.indexOf(b);if(-1==f)return"";f+=b.length;d=this.substring(f,
d).indexOf(c);return-1==d?"":this.substring(f,d+f)},isUrl:function(){if(""==this.trim()||!RegExp)return!1;var b=/((((ht|f)tp(s?))\:\/\/)|(www\.))\w+\.\w+\/?\w*/gi,c=this.toLowerCase();return!!c.match(/(((ht|f)tp(s?))\:\/\/)?(www\.)?\w+\.\w+\/\w*/gi)||c.match(b)},isEmail:function(){return""==this?!1:!!this.toLowerCase().match(/^([A-Za-z0-9])(\w)+@(\w)+(\.)(com|com\.cn|net|cn|net\.cn|org|biz|info|gov|gov\.cn|edu|edu\.cn)/)},toArray:function(b){b||(b="");return this.split(b)},reverse:function(){var b=
this.split("");b.reverse();return b.join("")},equals:function(b){return this.trim()==b.trim()},equalsIgnoreCase:function(b){return this.toLowerCase().trim()==b.toLowerCase().trim()},like:function(b){if(!b)return!1;b=this.toLowerCase().trim();var c=this.toLowerCase().trim();return-1<b.indexOf(c)||-1<c.indexOf(b)},contain:function(b){return-1<this.indexOf(b)},startsWith:function(b){return""===b?!1:this.substr(0,b.length)===b},endsWith:function(b){return""===b?!1:this.substr(-b.length,b.length)===b},
isEnglish:function(){return/[\x00-\xff]/.test(this)},overflow:function(b){if(void 0==b)return this.toString();var c=2;/[^\x00-\xff]/.test(this)&&(b=Math.floor(b/2),c=Math.floor(c/2));return this.length-b>c?this.substr(0,b)+"...":this.toString()},remove:function(b){if("string"!=typeof b||!b)return this;var c=this.indexOf(b);if(0>c)return this;b=b.length;return this.substring(0,c)+this.substring(c+b,this.length)},removeStartFrom:function(b){if("string"==typeof b&&b)return b=this.indexOf(b),0>b?this:
this.substring(0,b)},cycleToLength:function(b){if(!isNaN(b)){for(var c=parseInt(b/this.length),d=this;0<c;)d+=this,c--;return d.substring(0,b)}},firstUpperCase:function(){return 1>this.length?this:this.substring(0,1).toUpperCase()+this.substring(1)},firstLowerCase:function(){return 1>this.length?this:this.substring(0,1).toLowerCase()+this.substring(1)},extract:function(){if(0==this.length||0==arguments.length)return[];for(var b=[],c=this.toString(),d=0;d<c.length;){for(var f=!1,g=0;g<arguments.length;g++){var h=
arguments[g];if(c.substr(d,h.length)==h){b.push(h);d+=h.length;f=!0;break}}f||d++}return b},statics:{format:function(){if(0==arguments.length)return"";if(1==arguments.length)return arguments[0];for(var b=arguments[0],c=b.extract("%s","%d","%f","%b","%o"),d=1;d<arguments.length;d++){var f=arguments[d],g=c[d-1];"%s"==g&&("string"==typeof f?b=b.replace("%s",f):b=b.replace("%s",""));if("%d"==g){isNaN(f)&&(f=0);var h;h="number"==typeof f?-1==Number(f).toString().indexOf("."):!1;h?b=b.replace("%d",f+""):
b=b.replace("%d","")}"%f"==g&&(isNaN(f)&&(f=0),"number"==typeof f?b=b.replace("%f",f+""):b=b.replace("%f",""));"%b"==g&&(f=!!f,"boolean"==typeof f?b=b.replace("%b",f+""):b=b.replace("%b",""));"%o"==g&&("object"==typeof f?b=b.replace("%o",Instance.JSON(f)):b=b.replace("%o",""))}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},removeElement:function(b){b=this.indexOf(b);-1<b&&this.remove(b)},lastIndexOf:function(b){for(var c=-1,d=0;d<this.length;d++)this[d]===b&&(c=d);return c},statics:{isArray:function(b){return"[object Array]"==Object.prototype.toString.call(b)}}});
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 f in d)RegExp("("+f+")").test(b)&&(b=!0===c?b.replace(RegExp.$1,d[f]):b.replace(RegExp.$1,1==RegExp.$1.length?d[f]:("00"+d[f]).substr((""+d[f]).length)));return b},
statics:{now:function(){return(new Date).getTime()}}});
Number.expand({statics:{between:function(b,c,d){if(isNaN(b)||isNaN(c)||isNaN(d))return b;var f=Math.min(c,d);c=Math.max(c,d);b<f&&(b=f);b>c&&(b=c);return b},fixed:function(b,c){if(isNaN(b))return b;isNaN(c)&&(c=0);var d=Math.pow(10,c);return Math.round(b*d)/d},decimals:function(b){if(isNaN(b))return-1;b=Number(b).toString();var c=b.indexOf(".");return-1==c?0:b.length-c-1},random:function(b,c,d){if(isNaN(b)||isNaN(c))return 0;void 0==d&&Number.decimals(b)==Number.decimals(c)&&(d=Number.decimals(b));
var f=Math.min(b,c);b=Math.max(b,c);c=Math.random();f+=(b-f)*c;return!d||0>d||isNaN(d)?Math.floor(f):Number.fixed(f,d)}}});
var Color=function(b){b&&"object"==typeof b&&b.toString&&(b=b.toString());return{value:ColorTable.value(b),toString:function(){function b(c,d,h){if(c.length<h&&c.length>d)for(;c.length<h;)c="0"+c;return c}var d=this.value;d||(d=0);if("string"==typeof d){if(0==d.indexOf("#"))return d;if(0==d.indexOf("0x"))return d.replace("0x","#")}d=parseInt(d);d=0>d?Number(0):d;d=d.toString(16);8<d.length&&(d=d.substr(0,8));d=b(d,6,8);d=b(d,3,6);d=b(d,0,3);return"#"+d},valueOf:toString,split:function(){var b={r:0,
g:0,b:0,a:255};if(!this.value)return b;var d=this.toString(),f="FF",g="FF",h="FF",k="FF";switch(d.length){case 9:k=d.substr(1,2);f=d.substr(3,2);g=d.substr(5,2);h=d.substr(7,2);break;case 7:f=d.substr(1,2);g=d.substr(3,2);h=d.substr(5,2);break;case 4:f=d.substr(1,1);g=d.substr(2,1);h=d.substr(3,1);f+=f;g+=g;h+=h;break;default:return b}return{r:parseInt(f,16),g:parseInt(g,16),b:parseInt(h,16),a:parseInt(k,16)}},add:function(b){var d;d="object"==typeof b?b:{r:b,g:b,b:b,a:1};var f=this.split();b=Number.between(f.r+
d.r,0,255).toString(16).toUpperCase();var g=Number.between(f.g+d.g,0,255).toString(16).toUpperCase();d=Number.between(f.b+d.b,0,255).toString(16).toUpperCase();f=Number(f.a).toString(16).toUpperCase();b=1>=b.length?"0"+b:b;g=1>=g.length?"0"+g:g;d=1>=d.length?"0"+d:d;f=1>=f.length?"0"+f:f;return"FF"==f?"#"+b+g+d:"#"+f+b+g+d},reduce:function(b){return this.add("object"==typeof b?b:{r:-b,g:-b,b:-b,a:1})},rgba:function(b){var d=this.split();b=void 0==b||""===b?d.a:parseFloat(b);1<b&&(b=Number.fixed(b/
255,2));return String.format("rgba(%d,%d,%d,%f)",d.r,d.g,d.b,b)},equals:function(b){return this.toString()==Color(b).toString()},difference:function(b){var d=this.split();b=Color(b).split();return{r:Math.abs(d.r-b.r),g:Math.abs(d.g-b.g),b:Math.abs(d.b-b.b),a:Math.abs(d.a-b.a)}}}};function colorSplit(b){return Color(b).split()}function colorAdd(b,c){return Color(b).add(c)}function colorDiv(b,c){return Color(b).reduce(c)}function equals(b,c){return 1E-7>Math.abs(b-c)}
var Point=function(b,c){return{x:b,y:c,isNearTo:function(b,c){if(!b)return!1;void 0==c&&(c=5);return Math.abs(this.x-b.x)<c&&Math.abs(this.y-b.y)<c},equals:function(b){return b?equals(this.x,b.x)&&equals(this.y,b.y):!1},toString:function(){return"("+this.x+","+this.y+")"},clone:function(){return Point(this.x,this.y)},getX:function(){return this.x},getY:function(){return this.y},isNaP:function(){return isNaN(this.x)||isNaN(this.y)}}};Point.NaP=function(){return Point(Number.NaN,Number.NaN)};
$.browser.mozilla&&(HTMLElement.prototype.__defineGetter__("innerText",function(){return this.textContent}),HTMLElement.prototype.__defineSetter__("innerText",function(b){this.textContent=b}));bdor[30]=function(b,c){return bdor[b]-c};
Class("RangeSlider",{create:function(b,c){this.slider=b;this.min=0;this.max=c.max?c.max:1;isNaN(this.max)&&(this.max=100);this.onChange=c.onChange;this.init();void 0==c.range||isNaN(c.range)?(this.currentRange=0,this.setRange(0)):(this.currentRange=c.range,this.setRange(c.range))},init:function(){this.slider_total=$('<div class="slider-total"></div>');this.slider_range=$('<div class="slider-range"></div>');this.slider_hander=$('<div class="slider-handle"></div>');this.slider_range.css("pointer-events",
"none");this.slider_hander.css("pointer-events","none");this.slider.append(this.slider_total);this.slider.append(this.slider_range);this.slider.append(this.slider_hander);this.initEvents()},initEvents:function(){this.isMouseDown=!1;this.slider_total.bind(_event._down,function(b){this.isMouseDown=!0;b=isTouch?b.originalEvent?b.originalEvent.changedTouches:b.changedTouches:[b];this.onChangeRange(b);return!1}.bind(this));this.slider_total.bind(_event._move,function(b){if(this.isMouseDown)return b=isTouch?
b.originalEvent?b.originalEvent.changedTouches:b.changedTouches:[b],this.onChangeRange(b),!1}.bind(this));this.slider_total.bind(_event._up,function(b){return this.isMouseDown=!1}.bind(this));this.slider_total.bind(_event._leave,function(b){this.isMouseDown=!1}.bind(this));this.slider_hander.bind(_event._down,function(b){b=isTouch?b.originalEvent?b.originalEvent.changedTouches:b.changedTouches:[b];this.onChangeRange(b);return!1}.bind(this))},setMax:function(b){this.max=b},setRange:function(b){if(void 0!=
b){this.range=parseFloat(b);this.animation&&this.animation.stop();var c=this.currentRange,d=this.range;this.animation=function(b,g){this.currentRange=$.easing.swing(null,b,c,d-c,g);this.moveToRange(this.currentRange);this.currentRange==this.range&&this.animation&&this.animation.stop()}.animation(this,200)}},onChangeRange:virtual_function,moveToRange:virtual_function});
Class("VerticalSlider",{onChangeRange:function(b){b=b[0];if(void 0!=b){var c=$(b.target),d=b.offsetY;void 0==d&&(d=b.pageY-c.offset().top);b=(c.height()-d)/this.slider_total.height()*this.max;this.setRange(b);if(this.onChange)this.onChange(b)}},moveToRange:function(b){this.slider_total.offset();this.slider.offset();var c=parseInt(this.slider_range.css("bottom").replace("px","")),d=this.slider_hander.width(),f=this.slider_total.height()-d;b=Math.floor(b*f/this.max);b=Math.min(b,f);d=b+d/2;this.slider_hander.css({bottom:b+
c});this.slider_range.css({height:d})}}).extend("RangeSlider");
Class("HorizontalSlider",{onChangeRange:function(b){b=b[0];if(void 0!=b){var c=$(b.target),d=b.offsetX;void 0==d&&(d=b.pageX-c.offset().left);b=d/this.slider_total.width()*this.max;this.setRange(b);if(this.onChange)this.onChange(b)}},moveToRange:function(b){var c=this.slider_total.offset().left-this.slider.offset().left;parseInt(this.slider_range.css("bottom").replace("px",""));var d=this.slider_hander.width(),f=this.slider_total.width()-d;b=Math.floor(b*f/this.max);b=Math.min(b,f);d=b+d/2;this.slider_hander.css({left:b+
c});this.slider_range.css({width:d})}}).extend("RangeSlider");(function(b){b.fn.slider=function(b){if(b){this.empty();var d=null;(d="horizontal"==b.direction?new HorizontalSlider(this,b):new VerticalSlider(this,b))||(d=new HorizontalSlider(this,b));return d}}})(jQuery);
(function(b){var c="object"==typeof exports&&exports,d="object"==typeof module&&module&&module.exports==c&&module,f="object"==typeof global&&global;if(f.global===f||f.window===f)b=f;var g=function(b){this.message=b};g.prototype=Error();g.prototype.name="InvalidCharacterError";var h={encode:function(b){b=String(b);if(/[^\0-\xFF]/.test(b))throw new g("The string to be encoded contains characters outside of the Latin1 range.");for(var c=b.length%3,d="",f=-1,h,k,r,s=b.length-c;++f<s;)h=b.charCodeAt(f)<<
16,k=b.charCodeAt(++f)<<8,r=b.charCodeAt(++f),h=h+k+r,d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h>>18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h&63);2==c?(h=b.charCodeAt(f)<<8,k=b.charCodeAt(++f),h+=k,d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h>>
10)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h>>4&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h<<2&63)+"="):1==c&&(h=b.charCodeAt(f),d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h<<4&63)+"==");return d},decode:function(b){b=String(b);for(var c=b.length,d=0,f,g,h="",k=-1;++k<c;)g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(k)),
f=d%4?64*f+g:g,d++%4&&(h+=String.fromCharCode(255&f>>(-2*d&6)));return h},version:"0.1.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return h});else if(c&&!c.nodeType)if(d)d.exports=h;else for(var k in h)h.hasOwnProperty(k)&&(c[k]=h[k]);else b.base64=h})(this);function parsHexToNormalString(b){for(var c="";2<=b.length;)c+=String.fromCharCode(parseInt(b.substring(0,2),16)),b=b.substring(2,b.length);return c}
function parseHexString(b){for(var c=[];2<=b.length;)c.push(parseInt(b.substring(0,2),16)),b=b.substring(2,b.length);return c}function byteArray2String(b){for(var c="",d=0;d<b.length;d++)c+=String.fromCharCode(b[d]);return c}
function rc4(b,c){for(var d=[],f=[],g=0;256>g;g++)d[g]=g,f[g]=b.charCodeAt(g%b.length);for(var h=0,g=0;256>g;g++){var h=h+d[g]+f[g]&255,k=d[g];d[g]=d[h];d[h]=k}for(var l=h=f=0,m,k="",g=0;g<c.length;g++)f=f+1&255,h=h+d[f]&255,l=d[f],d[f]=d[h],d[h]=l,l=d[f]+d[h]&255,m=c.charCodeAt(g),m^=d[l],k+=String.fromCharCode(m);return k}
String.prototype.MD5=function(b){function c(b,c){var d,f,g,h,k;g=b&2147483648;h=c&2147483648;d=b&1073741824;f=c&1073741824;k=(b&1073741823)+(c&1073741823);return d&f?k^2147483648^g^h:d|f?k&1073741824?k^3221225472^g^h:k^1073741824^g^h:k^g^h}function d(b,d,f,g,h,k,l){b=c(b,c(c(d&f|~d&g,h),l));return c(b<<k|b>>>32-k,d)}function f(b,d,f,g,h,k,l){b=c(b,c(c(d&g|f&~g,h),l));return c(b<<k|b>>>32-k,d)}function g(b,d,f,g,h,k,l){b=c(b,c(c(d^f^g,h),l));return c(b<<k|b>>>32-k,d)}function h(b,d,f,g,h,k,l){b=c(b,
c(c(f^(d|~g),h),l));return c(b<<k|b>>>32-k,d)}function k(b){var c="",d="",f;for(f=0;3>=f;f++)d=b>>>8*f&255,d="0"+d.toString(16),c+=d.substr(d.length-2,2);return c}var l=[],m,n,p,q,t,r,s,v,u,l=function(b){var c,d=b.length;c=d+8;for(var f=16*((c-c%64)/64+1),g=Array(f-1),h=0,k=0;k<d;)c=(k-k%4)/4,h=k%4*8,g[c]|=b.charCodeAt(k)<<h,k++;c=(k-k%4)/4;g[c]|=128<<k%4*8;g[f-2]=d<<3;g[f-1]=d>>>29;return g}(this);r=1732584193;s=4023233417;v=2562383102;u=271733878;for(m=0;m<l.length;m+=16)n=r,p=s,q=v,t=u,r=d(r,s,
v,u,l[m+0],7,3614090360),u=d(u,r,s,v,l[m+1],12,3905402710),v=d(v,u,r,s,l[m+2],17,606105819),s=d(s,v,u,r,l[m+3],22,3250441966),r=d(r,s,v,u,l[m+4],7,4118548399),u=d(u,r,s,v,l[m+5],12,1200080426),v=d(v,u,r,s,l[m+6],17,2821735955),s=d(s,v,u,r,l[m+7],22,4249261313),r=d(r,s,v,u,l[m+8],7,1770035416),u=d(u,r,s,v,l[m+9],12,2336552879),v=d(v,u,r,s,l[m+10],17,4294925233),s=d(s,v,u,r,l[m+11],22,2304563134),r=d(r,s,v,u,l[m+12],7,1804603682),u=d(u,r,s,v,l[m+13],12,4254626195),v=d(v,u,r,s,l[m+14],17,2792965006),
s=d(s,v,u,r,l[m+15],22,1236535329),r=f(r,s,v,u,l[m+1],5,4129170786),u=f(u,r,s,v,l[m+6],9,3225465664),v=f(v,u,r,s,l[m+11],14,643717713),s=f(s,v,u,r,l[m+0],20,3921069994),r=f(r,s,v,u,l[m+5],5,3593408605),u=f(u,r,s,v,l[m+10],9,38016083),v=f(v,u,r,s,l[m+15],14,3634488961),s=f(s,v,u,r,l[m+4],20,3889429448),r=f(r,s,v,u,l[m+9],5,568446438),u=f(u,r,s,v,l[m+14],9,3275163606),v=f(v,u,r,s,l[m+3],14,4107603335),s=f(s,v,u,r,l[m+8],20,1163531501),r=f(r,s,v,u,l[m+13],5,2850285829),u=f(u,r,s,v,l[m+2],9,4243563512),
v=f(v,u,r,s,l[m+7],14,1735328473),s=f(s,v,u,r,l[m+12],20,2368359562),r=g(r,s,v,u,l[m+5],4,4294588738),u=g(u,r,s,v,l[m+8],11,2272392833),v=g(v,u,r,s,l[m+11],16,1839030562),s=g(s,v,u,r,l[m+14],23,4259657740),r=g(r,s,v,u,l[m+1],4,2763975236),u=g(u,r,s,v,l[m+4],11,1272893353),v=g(v,u,r,s,l[m+7],16,4139469664),s=g(s,v,u,r,l[m+10],23,3200236656),r=g(r,s,v,u,l[m+13],4,681279174),u=g(u,r,s,v,l[m+0],11,3936430074),v=g(v,u,r,s,l[m+3],16,3572445317),s=g(s,v,u,r,l[m+6],23,76029189),r=g(r,s,v,u,l[m+9],4,3654602809),
u=g(u,r,s,v,l[m+12],11,3873151461),v=g(v,u,r,s,l[m+15],16,530742520),s=g(s,v,u,r,l[m+2],23,3299628645),r=h(r,s,v,u,l[m+0],6,4096336452),u=h(u,r,s,v,l[m+7],10,1126891415),v=h(v,u,r,s,l[m+14],15,2878612391),s=h(s,v,u,r,l[m+5],21,4237533241),r=h(r,s,v,u,l[m+12],6,1700485571),u=h(u,r,s,v,l[m+3],10,2399980690),v=h(v,u,r,s,l[m+10],15,4293915773),s=h(s,v,u,r,l[m+1],21,2240044497),r=h(r,s,v,u,l[m+8],6,1873313359),u=h(u,r,s,v,l[m+15],10,4264355552),v=h(v,u,r,s,l[m+6],15,2734768916),s=h(s,v,u,r,l[m+13],21,
1309151649),r=h(r,s,v,u,l[m+4],6,4149444226),u=h(u,r,s,v,l[m+11],10,3174756917),v=h(v,u,r,s,l[m+2],15,718787259),s=h(s,v,u,r,l[m+9],21,3951481745),r=c(r,n),s=c(s,p),v=c(v,q),u=c(u,t);return 32==b?k(r)+k(s)+k(v)+k(u):k(s)+k(v)};function QR8bitByte(b){this.mode=QRMode.MODE_8BIT_BYTE;this.data=b}QR8bitByte.prototype={getLength:function(b){return this.data.length},write:function(b){for(var c=0;c<this.data.length;c++)b.put(this.data.charCodeAt(c),8)}};
function QRCode(b,c){this.typeNumber=b;this.errorCorrectLevel=c;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}
QRCode.prototype={addData:function(b){b=new QR8bitByte(b);this.dataList.push(b);this.dataCache=null},isDark:function(b,c){if(0>b||this.moduleCount<=b||0>c||this.moduleCount<=c)throw Error(b+","+c);return this.modules[b][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var b=1,b=1;40>b;b++){for(var c=QRRSBlock.getRSBlocks(b,this.errorCorrectLevel),d=new QRBitBuffer,f=0,g=0;g<c.length;g++)f+=c[g].dataCount;for(g=0;g<this.dataList.length;g++)c=this.dataList[g],
d.put(c.mode,4),d.put(c.getLength(),QRUtil.getLengthInBits(c.mode,b)),c.write(d);if(d.getLengthInBits()<=8*f)break}this.typeNumber=b}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(b,c){this.moduleCount=4*this.typeNumber+17;this.modules=Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++)this.modules[d][f]=null}this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-7,0);this.setupPositionProbePattern(0,
this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(b,c);7<=this.typeNumber&&this.setupTypeNumber(b);null==this.dataCache&&(this.dataCache=QRCode.createData(this.typeNumber,this.errorCorrectLevel,this.dataList));this.mapData(this.dataCache,c)},setupPositionProbePattern:function(b,c){for(var d=-1;7>=d;d++)if(!(-1>=b+d||this.moduleCount<=b+d))for(var f=-1;7>=f;f++)-1>=c+f||this.moduleCount<=c+f||(this.modules[b+d][c+f]=0<=d&&6>=d&&(0==f||6==f)||0<=f&&6>=
f&&(0==d||6==d)||2<=d&&4>=d&&2<=f&&4>=f?!0:!1)},getBestMaskPattern:function(){for(var b=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var f=QRUtil.getLostPoint(this);if(0==d||b>f)b=f,c=d}return c},createMovieClip:function(b,c,d){b=b.createEmptyMovieClip(c,d);this.make();for(c=0;c<this.modules.length;c++){d=1*c;for(var f=0;f<this.modules[c].length;f++){var g=1*f;this.modules[c][f]&&(b.beginFill(0,100),b.moveTo(g,d),b.lineTo(g+1,d),b.lineTo(g+1,d+1),b.lineTo(g,d+1),b.endFill())}}return b},setupTimingPattern:function(){for(var b=
8;b<this.moduleCount-8;b++)null==this.modules[b][6]&&(this.modules[b][6]=0==b%2);for(b=8;b<this.moduleCount-8;b++)null==this.modules[6][b]&&(this.modules[6][b]=0==b%2)},setupPositionAdjustPattern:function(){for(var b=QRUtil.getPatternPosition(this.typeNumber),c=0;c<b.length;c++)for(var d=0;d<b.length;d++){var f=b[c],g=b[d];if(null==this.modules[f][g])for(var h=-2;2>=h;h++)for(var k=-2;2>=k;k++)this.modules[f+h][g+k]=-2==h||2==h||-2==k||2==k||0==h&&0==k?!0:!1}},setupTypeNumber:function(b){for(var c=
QRUtil.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var f=!b&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=f}for(d=0;18>d;d++)f=!b&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=f},setupTypeInfo:function(b,c){for(var d=QRUtil.getBCHTypeInfo(this.errorCorrectLevel<<3|c),f=0;15>f;f++){var g=!b&&1==(d>>f&1);6>f?this.modules[f][8]=g:8>f?this.modules[f+1][8]=g:this.modules[this.moduleCount-15+f][8]=g}for(f=0;15>f;f++)g=!b&&1==(d>>f&1),8>f?this.modules[8][this.moduleCount-
f-1]=g:9>f?this.modules[8][15-f-1+1]=g:this.modules[8][15-f-1]=g;this.modules[this.moduleCount-8][8]=!b},mapData:function(b,c){for(var d=-1,f=this.moduleCount-1,g=7,h=0,k=this.moduleCount-1;0<k;k-=2)for(6==k&&k--;;){for(var l=0;2>l;l++)if(null==this.modules[f][k-l]){var m=!1;h<b.length&&(m=1==(b[h]>>>g&1));QRUtil.getMask(c,f,k-l)&&(m=!m);this.modules[f][k-l]=m;g--; -1==g&&(h++,g=7)}f+=d;if(0>f||this.moduleCount<=f){f-=d;d=-d;break}}}};QRCode.PAD0=236;QRCode.PAD1=17;
QRCode.createData=function(b,c,d){c=QRRSBlock.getRSBlocks(b,c);for(var f=new QRBitBuffer,g=0;g<d.length;g++){var h=d[g];f.put(h.mode,4);f.put(h.getLength(),QRUtil.getLengthInBits(h.mode,b));h.write(f)}for(g=b=0;g<c.length;g++)b+=c[g].dataCount;if(f.getLengthInBits()>8*b)throw Error("code length overflow. ("+f.getLengthInBits()+">"+8*b+")");for(f.getLengthInBits()+4<=8*b&&f.put(0,4);0!=f.getLengthInBits()%8;)f.putBit(!1);for(;!(f.getLengthInBits()>=8*b);){f.put(QRCode.PAD0,8);if(f.getLengthInBits()>=
8*b)break;f.put(QRCode.PAD1,8)}return QRCode.createBytes(f,c)};
QRCode.createBytes=function(b,c){for(var d=0,f=0,g=0,h=Array(c.length),k=Array(c.length),l=0;l<c.length;l++){var m=c[l].dataCount,n=c[l].totalCount-m,f=Math.max(f,m),g=Math.max(g,n);h[l]=Array(m);for(var p=0;p<h[l].length;p++)h[l][p]=255&b.buffer[p+d];d+=m;p=QRUtil.getErrorCorrectPolynomial(n);m=(new QRPolynomial(h[l],p.getLength()-1)).mod(p);k[l]=Array(p.getLength()-1);for(p=0;p<k[l].length;p++)n=p+m.getLength()-k[l].length,k[l][p]=0<=n?m.get(n):0}for(p=l=0;p<c.length;p++)l+=c[p].totalCount;d=Array(l);
for(p=m=0;p<f;p++)for(l=0;l<c.length;l++)p<h[l].length&&(d[m++]=h[l][p]);for(p=0;p<g;p++)for(l=0;l<c.length;l++)p<k[l].length&&(d[m++]=k[l][p]);return d};
for(var QRMode={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},QRErrorCorrectLevel={L:1,M:0,Q:3,H:2},QRMaskPattern={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},QRUtil={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,
30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(b){for(var c=b<<10;0<=QRUtil.getBCHDigit(c)-QRUtil.getBCHDigit(QRUtil.G15);)c^=
QRUtil.G15<<QRUtil.getBCHDigit(c)-QRUtil.getBCHDigit(QRUtil.G15);return(b<<10|c)^QRUtil.G15_MASK},getBCHTypeNumber:function(b){for(var c=b<<12;0<=QRUtil.getBCHDigit(c)-QRUtil.getBCHDigit(QRUtil.G18);)c^=QRUtil.G18<<QRUtil.getBCHDigit(c)-QRUtil.getBCHDigit(QRUtil.G18);return b<<12|c},getBCHDigit:function(b){for(var c=0;0!=b;)c++,b>>>=1;return c},getPatternPosition:function(b){return QRUtil.PATTERN_POSITION_TABLE[b-1]},getMask:function(b,c,d){switch(b){case QRMaskPattern.PATTERN000:return 0==(c+d)%
2;case QRMaskPattern.PATTERN001:return 0==c%2;case QRMaskPattern.PATTERN010:return 0==d%3;case QRMaskPattern.PATTERN011:return 0==(c+d)%3;case QRMaskPattern.PATTERN100:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case QRMaskPattern.PATTERN101:return 0==c*d%2+c*d%3;case QRMaskPattern.PATTERN110:return 0==(c*d%2+c*d%3)%2;case QRMaskPattern.PATTERN111:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+b);}},getErrorCorrectPolynomial:function(b){for(var c=new QRPolynomial([1],0),d=0;d<
b;d++)c=c.multiply(new QRPolynomial([1,QRMath.gexp(d)],0));return c},getLengthInBits:function(b,c){if(1<=c&&10>c)switch(b){case QRMode.MODE_NUMBER:return 10;case QRMode.MODE_ALPHA_NUM:return 9;case QRMode.MODE_8BIT_BYTE:return 8;case QRMode.MODE_KANJI:return 8;default:throw Error("mode:"+b);}else if(27>c)switch(b){case QRMode.MODE_NUMBER:return 12;case QRMode.MODE_ALPHA_NUM:return 11;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 10;default:throw Error("mode:"+b);}else if(41>c)switch(b){case QRMode.MODE_NUMBER:return 14;
case QRMode.MODE_ALPHA_NUM:return 13;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 12;default:throw Error("mode:"+b);}else throw Error("type:"+c);},getLostPoint:function(b){for(var c=b.getModuleCount(),d=0,f=0;f<c;f++)for(var g=0;g<c;g++){for(var h=0,k=b.isDark(f,g),l=-1;1>=l;l++)if(!(0>f+l||c<=f+l))for(var m=-1;1>=m;m++)0>g+m||c<=g+m||0==l&&0==m||k!=b.isDark(f+l,g+m)||h++;5<h&&(d+=3+h-5)}for(f=0;f<c-1;f++)for(g=0;g<c-1;g++)if(h=0,b.isDark(f,g)&&h++,b.isDark(f+1,g)&&h++,b.isDark(f,
g+1)&&h++,b.isDark(f+1,g+1)&&h++,0==h||4==h)d+=3;for(f=0;f<c;f++)for(g=0;g<c-6;g++)b.isDark(f,g)&&!b.isDark(f,g+1)&&b.isDark(f,g+2)&&b.isDark(f,g+3)&&b.isDark(f,g+4)&&!b.isDark(f,g+5)&&b.isDark(f,g+6)&&(d+=40);for(g=0;g<c;g++)for(f=0;f<c-6;f++)b.isDark(f,g)&&!b.isDark(f+1,g)&&b.isDark(f+2,g)&&b.isDark(f+3,g)&&b.isDark(f+4,g)&&!b.isDark(f+5,g)&&b.isDark(f+6,g)&&(d+=40);for(g=h=0;g<c;g++)for(f=0;f<c;f++)b.isDark(f,g)&&h++;b=Math.abs(100*h/c/c-50)/5;return d+10*b}},QRMath={glog:function(b){if(1>b)throw Error("glog("+
b+")");return QRMath.LOG_TABLE[b]},gexp:function(b){for(;0>b;)b+=255;for(;256<=b;)b-=255;return QRMath.EXP_TABLE[b]},EXP_TABLE:Array(256),LOG_TABLE:Array(256)},i=0;8>i;i++)QRMath.EXP_TABLE[i]=1<<i;for(i=8;256>i;i++)QRMath.EXP_TABLE[i]=QRMath.EXP_TABLE[i-4]^QRMath.EXP_TABLE[i-5]^QRMath.EXP_TABLE[i-6]^QRMath.EXP_TABLE[i-8];for(i=0;255>i;i++)QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]]=i;
function QRPolynomial(b,c){if(void 0==b.length)throw Error(b.length+"/"+c);for(var d=0;d<b.length&&0==b[d];)d++;this.num=Array(b.length-d+c);for(var f=0;f<b.length-d;f++)this.num[f]=b[f+d]}
QRPolynomial.prototype={get:function(b){return this.num[b]},getLength:function(){return this.num.length},multiply:function(b){for(var c=Array(this.getLength()+b.getLength()-1),d=0;d<this.getLength();d++)for(var f=0;f<b.getLength();f++)c[d+f]^=QRMath.gexp(QRMath.glog(this.get(d))+QRMath.glog(b.get(f)));return new QRPolynomial(c,0)},mod:function(b){if(0>this.getLength()-b.getLength())return this;for(var c=QRMath.glog(this.get(0))-QRMath.glog(b.get(0)),d=Array(this.getLength()),f=0;f<this.getLength();f++)d[f]=
this.get(f);for(f=0;f<b.getLength();f++)d[f]^=QRMath.gexp(QRMath.glog(b.get(f))+c);return(new QRPolynomial(d,0)).mod(b)}};function QRRSBlock(b,c){this.totalCount=b;this.dataCount=c}
QRRSBlock.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,
44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,
75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,
117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,
75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,
54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];
QRRSBlock.getRSBlocks=function(b,c){var d=QRRSBlock.getRsBlockTable(b,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+b+"/errorCorrectLevel:"+c);for(var f=d.length/3,g=[],h=0;h<f;h++)for(var k=d[3*h+0],l=d[3*h+1],m=d[3*h+2],n=0;n<k;n++)g.push(new QRRSBlock(l,m));return g};
QRRSBlock.getRsBlockTable=function(b,c){switch(c){case QRErrorCorrectLevel.L:return QRRSBlock.RS_BLOCK_TABLE[4*(b-1)+0];case QRErrorCorrectLevel.M:return QRRSBlock.RS_BLOCK_TABLE[4*(b-1)+1];case QRErrorCorrectLevel.Q:return QRRSBlock.RS_BLOCK_TABLE[4*(b-1)+2];case QRErrorCorrectLevel.H:return QRRSBlock.RS_BLOCK_TABLE[4*(b-1)+3]}};function QRBitBuffer(){this.buffer=[];this.length=0}
QRBitBuffer.prototype={get:function(b){return 1==(this.buffer[Math.floor(b/8)]>>>7-b%8&1)},put:function(b,c){for(var d=0;d<c;d++)this.putBit(1==(b>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(b){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);b&&(this.buffer[c]|=128>>>this.length%8);this.length++}};
(function(b){b.fn.qrcode=function(c){"string"===typeof c&&(c={text:c});c=b.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,correctLevel:QRErrorCorrectLevel.H,background:"#ffffff",foreground:"#000000"},c);return this.each(function(){var d;if("canvas"==c.render){d=new QRCode(c.typeNumber,c.correctLevel);d.addData(c.text);d.make();var f=document.createElement("canvas");f.width=c.width;f.height=c.height;for(var g=f.getContext("2d"),h=c.width/d.getModuleCount(),k=c.height/d.getModuleCount(),
l=0;l<d.getModuleCount();l++)for(var m=0;m<d.getModuleCount();m++){g.fillStyle=d.isDark(l,m)?c.foreground:c.background;var n=Math.ceil((m+1)*h)-Math.floor(m*h),p=Math.ceil((l+1)*h)-Math.floor(l*h);g.fillRect(Math.round(m*h),Math.round(l*k),n,p)}}else for(d=new QRCode(c.typeNumber,c.correctLevel),d.addData(c.text),d.make(),f=b("<table></table>").css("width",c.width+"px").css("height",c.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",c.background),g=c.width/
d.getModuleCount(),h=c.height/d.getModuleCount(),k=0;k<d.getModuleCount();k++)for(l=b("<tr></tr>").css("height",h+"px").appendTo(f),m=0;m<d.getModuleCount();m++)b("<td></td>").css("width",g+"px").css("background-color",d.isDark(k,m)?c.foreground:c.background).appendTo(l);d=f;jQuery(d).appendTo(this)})}})(jQuery);
!function(b,c,d,f){function g(b,c,d){return Array.isArray(b)?(h(b,d[c],d),!0):!1}function h(b,c,d){var g;if(b)if(b.forEach)b.forEach(c,d);else if(b.length!==f)for(g=0;g<b.length;)c.call(d,b[g],g,b),g++;else for(g in b)b.hasOwnProperty(g)&&c.call(d,b[g],g,b)}function k(c,d,f){var g="DEPRECATED METHOD: "+d+"\n"+f+" AT \n";return function(){var d=Error("get-stack-trace"),d=d&&d.stack?d.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):
"Unknown Stack Trace",f=b.console&&(b.console.warn||b.console.log);return f&&f.call(b.console,g,d),c.apply(this,arguments)}}function l(b,c,d){var f=c.prototype;c=b.prototype=Object.create(f);c.constructor=b;c._super=f;d&&N(c,d)}function m(b,c){return function(){return b.apply(c,arguments)}}function n(b,c){return typeof b==Ma?b.apply(c?c[0]||f:f,c):b}function p(b,c,d){h(r(c),function(c){"undefined"!=typeof window.addEventListener?b.addEventListener(c,d,!1):b.attachEvent(c,d)})}function q(b,c,d){h(r(c),
function(c){"undefined"!=typeof window.removeEventListener?b.removeEventListener(c,d,!1):b.detachEvent(c,d)})}function t(b,c){for(;b;){if(b==c)return!0;b=b.parentNode}return!1}function r(b){return b.trim().split(/\s+/g)}function s(b,c,d){if(b.indexOf&&!d)return b.indexOf(c);for(var f=0;f<b.length;){if(d&&b[f][d]==c||!d&&b[f]===c)return f;f++}return-1}function v(b){return Array.prototype.slice.call(b,0)}function u(b,c,d){for(var f=[],g=[],h=0;h<b.length;){var k=c?b[h][c]:b[h];0>s(g,k)&&f.push(b[h]);
g[h]=k;h++}return d&&(f=c?f.sort(function(b,d){return b[c]>d[c]}):f.sort()),f}function x(b,c){if(c&&c[0]){for(var d,g,h=c[0].toUpperCase()+c.slice(1),k=0;k<za.length;){if(d=za[k],g=d?d+h:c,g in b)return g;k++}return f}}function y(c){c=c.ownerDocument||c;return c.defaultView||c.parentWindow||b}function w(b,c){var d=this;this.manager=b;this.callback=c;this.element=b.element;this.target=b.options.inputTarget;this.domHandler=function(c){n(b.options.enable,[b])&&d.handler(c)};this.init()}function z(b){var c=
b.options.inputClass;return new (c?c:Na?J:Oa?V:Aa?O:E)(b,B)}function B(b,c,d){var g=d.pointers.length,h=d.changedPointers.length,k=c&G&&0===g-h,g=c&(C|H)&&0===g-h;d.isFirst=!!k;d.isFinal=!!g;k&&(b.session={});d.eventType=c;c=b.session;k=d.pointers;g=k.length;c.firstInput||(c.firstInput=F(d));1<g&&!c.firstMultiple?c.firstMultiple=F(d):1===g&&(c.firstMultiple=!1);var h=c.firstInput,l=(g=c.firstMultiple)?g.center:h.center,m=d.center=D(k);d.timeStamp=sa();d.deltaTime=d.timeStamp-h.timeStamp;d.angle=S(l,
m);d.distance=A(l,m);var h=d.center,l=c.offsetDelta||{},m=c.prevDelta||{},w=c.prevInput||{};d.eventType!==G&&w.eventType!==C||(m=c.prevDelta={x:w.deltaX||0,y:w.deltaY||0},l=c.offsetDelta={x:h.x,y:h.y});d.deltaX=m.x+(h.x-l.x);d.deltaY=m.y+(h.y-l.y);d.offsetDirection=L(d.deltaX,d.deltaY);h=d.deltaX/d.deltaTime||0;l=d.deltaY/d.deltaTime||0;d.overallVelocityX=h;d.overallVelocityY=l;d.overallVelocity=W(h)>W(l)?h:l;d.scale=g?A(k[0],k[1],ka)/A(g.pointers[0],g.pointers[1],ka):1;d.rotation=g?S(k[1],k[0],ka)+
S(g.pointers[1],g.pointers[0],ka):0;d.maxPointers=c.prevInput?d.pointers.length>c.prevInput.maxPointers?d.pointers.length:c.prevInput.maxPointers:d.pointers.length;l=c.lastInterval||d;k=d.timeStamp-l.timeStamp;d.eventType!=H&&(k>Pa||l.velocity===f)?(h=d.deltaX-l.deltaX,l=d.deltaY-l.deltaY,m=h/k||0,w=l/k||0,k=m,g=w,m=W(m)>W(w)?m:w,h=L(h,l),c.lastInterval=d):(m=l.velocity,k=l.velocityX,g=l.velocityY,h=l.direction);d.velocity=m;d.velocityX=k;d.velocityY=g;d.direction=h;c=b.element;t(d.srcEvent.target,
c)&&(c=d.srcEvent.target);d.target=c;b.emit("hammer.input",d);b.recognize(d);b.session.prevInput=d}function F(b){for(var c=[],d=0;d<b.pointers.length;)c[d]={clientX:aa(b.pointers[d].clientX),clientY:aa(b.pointers[d].clientY)},d++;return{timeStamp:sa(),pointers:c,center:D(c),deltaX:b.deltaX,deltaY:b.deltaY}}function D(b){var c=b.length;if(1===c)return{x:aa(b[0].clientX),y:aa(b[0].clientY)};for(var d=0,f=0,g=0;c>g;)d+=b[g].clientX,f+=b[g].clientY,g++;return{x:aa(d/c),y:aa(f/c)}}function L(b,c){return b===
c?la:W(b)>=W(c)?0>b?da:ea:0>c?fa:ga}function A(b,c,d){d||(d=Ba);var f=c[d[0]]-b[d[0]];b=c[d[1]]-b[d[1]];return Math.sqrt(f*f+b*b)}function S(b,c,d){d||(d=Ba);return 180*Math.atan2(c[d[1]]-b[d[1]],c[d[0]]-b[d[0]])/Math.PI}function E(){this.evEl=Qa;this.evWin=Ra;this.pressed=!1;w.apply(this,arguments)}function J(){this.evEl=Ca;this.evWin=Da;w.apply(this,arguments);this.store=this.manager.session.pointerEvents=[]}function ha(){this.evTarget=Sa;this.evWin=Ta;this.started=!1;w.apply(this,arguments)}function V(){this.evTarget=
Ua;this.targetIds={};w.apply(this,arguments)}function X(b,c){var d=v(b.touches),f=this.targetIds;if(c&(G|Y)&&1===d.length)return f[d[0].identifier]=!0,[d,d];var g,h=v(b.changedTouches),k=[],l=this.target;if(g=d.filter(function(b){return t(b.target,l)}),c===G)for(d=0;d<g.length;)f[g[d].identifier]=!0,d++;for(d=0;d<h.length;)f[h[d].identifier]&&k.push(h[d]),c&(C|H)&&delete f[h[d].identifier],d++;return k.length?[u(g.concat(k),"identifier",!0),k]:void 0}function O(){w.apply(this,arguments);var b=m(this.handler,
this);this.touch=new V(this.manager,b);this.mouse=new E(this.manager,b);this.primaryTouch=null;this.lastTouches=[]}function ia(b){b=b.changedPointers[0];if(b.identifier===this.primaryTouch){var c={x:b.clientX,y:b.clientY};this.lastTouches.push(c);var d=this.lastTouches;setTimeout(function(){var b=d.indexOf(c);-1<b&&d.splice(b,1)},Va)}}function T(b,c){this.manager=b;this.set(c)}function Wa(b){if(-1<b.indexOf(ba))return ba;var c=-1<b.indexOf(ma),d=-1<b.indexOf(na);return c&&d?ba:c||d?c?ma:na:-1<b.indexOf(ta)?
ta:Ea}function P(b){this.options=N({},this.defaults,b||{});this.id=Xa++;this.manager=null;this.options.enable=this.options.enable===f?!0:this.options.enable;this.state=oa;this.simultaneous={};this.requireFail=[]}function Fa(b){return b&ja?"cancel":b&U?"end":b&ca?"move":b&I?"start":""}function Ga(b){return b==ga?"down":b==fa?"up":b==da?"left":b==ea?"right":""}function pa(b,c){var d=c.manager;return d?d.get(b):b}function K(){P.apply(this,arguments)}function qa(){K.apply(this,arguments);this.pY=this.pX=
null}function ua(){K.apply(this,arguments)}function va(){P.apply(this,arguments);this._input=this._timer=null}function wa(){K.apply(this,arguments)}function xa(){K.apply(this,arguments)}function ra(){P.apply(this,arguments);this.pCenter=this.pTime=!1;this._input=this._timer=null;this.count=0}function Q(b,c){return c=c||{},c.recognizers=c.recognizers===f?Q.defaults.preset:c.recognizers,new ya(b,c)}function ya(b,c){this.options=N({},Q.defaults,c||{});this.options.inputTarget=this.options.inputTarget||
b;this.handlers={};this.session={};this.recognizers=[];this.element=b;this.input=z(this);this.touchAction=new T(this,this.options.touchAction);Ha(this,!0);h(this.options.recognizers,function(b){var c=this.add(new b[0](b[1]));b[2]&&c.recognizeWith(b[2]);b[3]&&c.requireFailure(b[3])},this)}function Ha(b,c){var d=b.element;d.style&&h(b.options.cssProps,function(b,f){d.style[x(d.style,f)]=c?b:""})}function Ya(b,d){var f=c.createEvent("Event");f.initEvent(b,!0,!0);f.gesture=d;d.target.dispatchEvent(f)}
var N,za=" webkit Moz MS ms o".split(" "),Za=c.createElement("div"),Ma="function",aa=Math.round,W=Math.abs,sa=Date.now;N="function"!=typeof Object.assign?function(b){if(b===f||null===b)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(b),d=1;d<arguments.length;d++){var g=arguments[d];if(g!==f&&null!==g)for(var h in g)g.hasOwnProperty(h)&&(c[h]=g[h])}return c}:Object.assign;var Ia=k(function(b,c,d){for(var g=Object.keys(c),h=0;h<g.length;)(!d||d&&b[g[h]]===f)&&(b[g[h]]=
c[g[h]]),h++;return b},"extend","Use `assign`."),$a=k(function(b,c){return Ia(b,c,!0)},"merge","Use `assign`."),Xa=1,ab=/mobile|tablet|ip(ad|hone|od)|android/i,Aa="ontouchstart"in b,Na=x(b,"PointerEvent")!==f,Oa=Aa&&ab.test(navigator.userAgent),Pa=25,G=1,Y=2,C=4,H=8,la=1,da=2,ea=4,fa=8,ga=16,M=da|ea,Z=fa|ga,Ja=M|Z,Ba=["x","y"],ka=["clientX","clientY"];w.prototype={handler:function(){},init:function(){this.evEl&&p(this.element,this.evEl,this.domHandler);this.evTarget&&p(this.target,this.evTarget,this.domHandler);
this.evWin&&p(y(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&q(this.element,this.evEl,this.domHandler);this.evTarget&&q(this.target,this.evTarget,this.domHandler);this.evWin&&q(y(this.element),this.evWin,this.domHandler)}};var bb={mousedown:G,mousemove:Y,mouseup:C},Qa="mousedown",Ra="mousemove mouseup";l(E,w,{handler:function(b){var c=bb[b.type];c&G&&0===b.button&&(this.pressed=!0);c&Y&&1!==b.which&&(c=C);this.pressed&&(c&C&&(this.pressed=!1),this.callback(this.manager,
c,{pointers:[b],changedPointers:[b],pointerType:"mouse",srcEvent:b}))}});var cb={pointerdown:G,pointermove:Y,pointerup:C,pointercancel:H,pointerout:H},db={2:"touch",3:"pen",4:"mouse",5:"kinect"},Ca="pointerdown",Da="pointermove pointerup pointercancel";b.MSPointerEvent&&!b.PointerEvent&&(Ca="MSPointerDown",Da="MSPointerMove MSPointerUp MSPointerCancel");l(J,w,{handler:function(b){var c=this.store,d=!1,f=b.type.toLowerCase().replace("ms",""),f=cb[f],g=db[b.pointerType]||b.pointerType,h="touch"==g,
k=s(c,b.pointerId,"pointerId");f&G&&(0===b.button||h)?0>k&&(c.push(b),k=c.length-1):f&(C|H)&&(d=!0);0>k||(c[k]=b,this.callback(this.manager,f,{pointers:c,changedPointers:[b],pointerType:g,srcEvent:b}),d&&c.splice(k,1))}});var eb={touchstart:G,touchmove:Y,touchend:C,touchcancel:H},Sa="touchstart",Ta="touchstart touchmove touchend touchcancel";l(ha,w,{handler:function(b){var c=eb[b.type];if(c===G&&(this.started=!0),this.started){var d,f=v(b.touches);d=v(b.changedTouches);d=(c&(C|H)&&(f=u(f.concat(d),
"identifier",!0)),[f,d]);c&(C|H)&&0===d[0].length-d[1].length&&(this.started=!1);this.callback(this.manager,c,{pointers:d[0],changedPointers:d[1],pointerType:"touch",srcEvent:b})}}});var fb={touchstart:G,touchmove:Y,touchend:C,touchcancel:H},Ua="touchstart touchmove touchend touchcancel";l(V,w,{handler:function(b){var c=fb[b.type],d=X.call(this,b,c);d&&this.callback(this.manager,c,{pointers:d[0],changedPointers:d[1],pointerType:"touch",srcEvent:b})}});var Va=2500;l(O,w,{handler:function(b,c,d){var f=
"touch"==d.pointerType,g="mouse"==d.pointerType;if(!(g&&d.sourceCapabilities&&d.sourceCapabilities.firesTouchEvents)){if(f)c&G?(this.primaryTouch=d.changedPointers[0].identifier,ia.call(this,d)):c&(C|H)&&ia.call(this,d);else{if(f=g)a:{for(var f=d.srcEvent.clientX,g=d.srcEvent.clientY,h=0;h<this.lastTouches.length;h++){var k=this.lastTouches[h],l=Math.abs(f-k.x),k=Math.abs(g-k.y);if(25>=l&&25>=k){f=!0;break a}}f=!1}if(f)return}this.callback(b,c,d)}},destroy:function(){this.touch.destroy();this.mouse.destroy()}});
var Ka=x(Za.style,"touchAction"),La=Ka!==f,Ea="auto",ta="manipulation",ba="none",ma="pan-x",na="pan-y";T.prototype={set:function(b){"compute"==b&&(b=this.compute());La&&this.manager.element.style&&(this.manager.element.style[Ka]=b);this.actions=b.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var b=[];return h(this.manager.recognizers,function(c){n(c.options.enable,[c])&&(b=b.concat(c.getTouchAction()))}),Wa(b.join(" "))},preventDefaults:function(b){if(!La){var c=
b.srcEvent,d=b.offsetDirection;if(!this.manager.session.prevented){void c.preventDefault();var f=this.actions,g=-1<f.indexOf(ba),h=-1<f.indexOf(na),f=-1<f.indexOf(ma);if(g){var k=2>b.distance,l=250>b.deltaTime;if(1===b.pointers.length&&k&&l)return}if(!f||!h)return g||h&&d&M||f&&d&Z?this.preventSrc(c):void 0}}},preventSrc:function(b){this.manager.session.prevented=!0;b.preventDefault()}};var oa=1,I=2,ca=4,U=8,R=U,ja=16;P.prototype={defaults:{},set:function(b){return N(this.options,b),this.manager&&
this.manager.touchAction.update(),this},recognizeWith:function(b){if(g(b,"recognizeWith",this))return this;var c=this.simultaneous;return b=pa(b,this),c[b.id]||(c[b.id]=b,b.recognizeWith(this)),this},dropRecognizeWith:function(b){return g(b,"dropRecognizeWith",this)?this:(b=pa(b,this),delete this.simultaneous[b.id],this)},requireFailure:function(b){if(g(b,"requireFailure",this))return this;var c=this.requireFail;return b=pa(b,this),-1===s(c,b)&&(c.push(b),b.requireFailure(this)),this},dropRequireFailure:function(b){if(g(b,
"dropRequireFailure",this))return this;b=pa(b,this);b=s(this.requireFail,b);return-1<b&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return 0<this.requireFail.length},canRecognizeWith:function(b){return!!this.simultaneous[b.id]},emit:function(b){function c(f){d.manager.emit(f,b)}var d=this,f=this.state;U>f&&c(d.options.event+Fa(f));c(d.options.event);b.additionalEvent&&c(b.additionalEvent);f>=U&&c(d.options.event+Fa(f))},tryEmit:function(b){return this.canEmit()?this.emit(b):void(this.state=
32)},canEmit:function(){for(var b=0;b<this.requireFail.length;){if(!(this.requireFail[b].state&(32|oa)))return!1;b++}return!0},recognize:function(b){b=N({},b);return n(this.options.enable,[this,b])?(this.state&(R|ja|32)&&(this.state=oa),this.state=this.process(b),void(this.state&(I|ca|U|ja)&&this.tryEmit(b))):(this.reset(),void(this.state=32))},process:function(b){},getTouchAction:function(){},reset:function(){}};l(K,P,{defaults:{pointers:1},attrTest:function(b){var c=this.options.pointers;return 0===
c||b.pointers.length===c},process:function(b){var c=this.state,d=b.eventType,f=c&(I|ca);b=this.attrTest(b);return f&&(d&H||!b)?c|ja:f||b?d&C?c|U:c&I?c|ca:I:32}});l(qa,K,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ja},getTouchAction:function(){var b=this.options.direction,c=[];return b&M&&c.push(na),b&Z&&c.push(ma),c},directionTest:function(b){var c=this.options,d=!0,f=b.distance,g=b.direction,h=b.deltaX,k=b.deltaY;return g&c.direction||(c.direction&M?(g=0===h?la:0>h?da:ea,d=h!=this.pX,
f=Math.abs(b.deltaX)):(g=0===k?la:0>k?fa:ga,d=k!=this.pY,f=Math.abs(b.deltaY))),b.direction=g,d&&f>c.threshold&&g&c.direction},attrTest:function(b){return K.prototype.attrTest.call(this,b)&&(this.state&I||!(this.state&I)&&this.directionTest(b))},emit:function(b){this.pX=b.deltaX;this.pY=b.deltaY;var c=Ga(b.direction);c&&(b.additionalEvent=this.options.event+c);this._super.emit.call(this,b)}});l(ua,K,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ba]},attrTest:function(b){return this._super.attrTest.call(this,
b)&&(Math.abs(b.scale-1)>this.options.threshold||this.state&I)},emit:function(b){1!==b.scale&&(b.additionalEvent=this.options.event+(1>b.scale?"in":"out"));this._super.emit.call(this,b)}});l(va,P,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ea]},process:function(b){var c=this.options,d=b.pointers.length===c.pointers,f=b.distance<c.threshold,g=b.deltaTime>c.time;if(this._input=b,!f||!d||b.eventType&(C|H)&&!g)this.reset();else if(b.eventType&G)this.reset(),
this._timer=setTimeout(m(function(){this.state=R;this.tryEmit()},this),c.time);else if(b.eventType&C)return R;return 32},reset:function(){clearTimeout(this._timer)},emit:function(b){this.state===R&&(b&&b.eventType&C?this.manager.emit(this.options.event+"up",b):(this._input.timeStamp=sa(),this.manager.emit(this.options.event,this._input)))}});l(wa,K,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ba]},attrTest:function(b){return this._super.attrTest.call(this,b)&&
(Math.abs(b.rotation)>this.options.threshold||this.state&I)}});l(xa,K,{defaults:{event:"swipe",threshold:10,velocity:0.3,direction:M|Z,pointers:1},getTouchAction:function(){return qa.prototype.getTouchAction.call(this)},attrTest:function(b){var c,d=this.options.direction;return d&(M|Z)?c=b.overallVelocity:d&M?c=b.overallVelocityX:d&Z&&(c=b.overallVelocityY),this._super.attrTest.call(this,b)&&d&b.offsetDirection&&b.distance>this.options.threshold&&b.maxPointers==this.options.pointers&&W(c)>this.options.velocity&&
b.eventType&C},emit:function(b){var c=Ga(b.offsetDirection);c&&this.manager.emit(this.options.event+c,b);this.manager.emit(this.options.event,b)}});l(ra,P,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ta]},process:function(b){var c=this.options,d=b.pointers.length===c.pointers,f=b.distance<c.threshold,g=b.deltaTime<c.time;if(this.reset(),b.eventType&G&&0===this.count)return this.failTimeout();if(f&&g&&d){if(b.eventType!=
C)return this.failTimeout();d=this.pTime?b.timeStamp-this.pTime<c.interval:!0;f=!this.pCenter||A(this.pCenter,b.center)<c.posThreshold;this.pTime=b.timeStamp;this.pCenter=b.center;f&&d?this.count+=1:this.count=1;this._input=b;if(0===this.count%c.taps)return this.hasRequireFailures()?(this._timer=setTimeout(m(function(){this.state=R;this.tryEmit()},this),c.interval),I):R}return 32},failTimeout:function(){return this._timer=setTimeout(m(function(){this.state=32},this),this.options.interval),32},reset:function(){clearTimeout(this._timer)},
emit:function(){this.state==R&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});Q.VERSION="2.0.7";Q.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[wa,{enable:!1}],[ua,{enable:!1},["rotate"]],[xa,{direction:M}],[qa,{direction:M},["swipe"]],[ra],[ra,{event:"doubletap",taps:2},["tap"]],[va]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};
ya.prototype={set:function(b){return N(this.options,b),b.touchAction&&this.touchAction.update(),b.inputTarget&&(this.input.destroy(),this.input.target=b.inputTarget,this.input.init()),this},stop:function(b){this.session.stopped=b?2:1},recognize:function(b){var c=this.session;if(!c.stopped){this.touchAction.preventDefaults(b);var d,f=this.recognizers,g=c.curRecognizer;(!g||g&&g.state&R)&&(g=c.curRecognizer=null);for(var h=0;h<f.length;)d=f[h],2===c.stopped||g&&d!=g&&!d.canRecognizeWith(g)?d.reset():
d.recognize(b),!g&&d.state&(I|ca|U)&&(g=c.curRecognizer=d),h++}},get:function(b){if(b instanceof P)return b;for(var c=this.recognizers,d=0;d<c.length;d++)if(c[d].options.event==b)return c[d];return null},add:function(b){if(g(b,"add",this))return this;var c=this.get(b.options.event);return c&&this.remove(c),this.recognizers.push(b),b.manager=this,this.touchAction.update(),b},remove:function(b){if(g(b,"remove",this))return this;if(b=this.get(b)){var c=this.recognizers;b=s(c,b);-1!==b&&(c.splice(b,1),
this.touchAction.update())}return this},on:function(b,c){var d=this.handlers;return h(r(b),function(b){d[b]=d[b]||[];d[b].push(c)}),this},off:function(b,c){var d=this.handlers;return h(r(b),function(b){c?d[b]&&d[b].splice(s(d[b],c),1):delete d[b]}),this},emit:function(b,c){this.options.domEvents&&Ya(b,c);var d=this.handlers[b]&&this.handlers[b].slice();if(d&&d.length){c.type=b;c.preventDefault=function(){c.srcEvent.preventDefault()};for(var f=0;f<d.length;)d[f](c),f++}},destroy:function(){this.element&&
Ha(this,!1);this.handlers={};this.session={};this.input.destroy();this.element=null}};N(Q,{INPUT_START:G,INPUT_MOVE:Y,INPUT_END:C,INPUT_CANCEL:H,STATE_POSSIBLE:oa,STATE_BEGAN:I,STATE_CHANGED:ca,STATE_ENDED:U,STATE_RECOGNIZED:R,STATE_CANCELLED:ja,STATE_FAILED:32,DIRECTION_NONE:la,DIRECTION_LEFT:da,DIRECTION_RIGHT:ea,DIRECTION_UP:fa,DIRECTION_DOWN:ga,DIRECTION_HORIZONTAL:M,DIRECTION_VERTICAL:Z,DIRECTION_ALL:Ja,Manager:ya,Input:w,TouchAction:T,TouchInput:V,MouseInput:E,PointerEventInput:J,TouchMouseInput:O,
SingleTouchInput:ha,Recognizer:P,AttrRecognizer:K,Tap:ra,Pan:qa,Swipe:xa,Pinch:ua,Rotate:wa,Press:va,on:p,off:q,each:h,merge:$a,extend:Ia,assign:N,inherit:l,bindFn:m,prefixed:x});("undefined"!=typeof b?b:"undefined"!=typeof self?self:{}).Hammer=Q;"function"==typeof define&&define.amd?define(function(){return Q}):"undefined"!=typeof module&&module.exports?module.exports=Q:b[d]=Q}(window,document,"Hammer");
jQuery.fn.IEZoom=function(b){this.options=b;this.middleScale=3;this.maxScale=6;this.side=b.side;this.parameters={width:$(this).width()||0,height:$(this).height()||0,naturalWidth:$(this).width()||0,naturalHeight:$(this).height()||0,left:parseInt($(this).css("left"))||0,top:parseInt($(this).css("top"))||0,naturalLeft:parseInt($(this).css("left"))||0,naturalTop:parseInt($(this).css("top"))||0,scale:1,rotate:0,toScale:1,tran:{x:0,y:0},origin:{x:50,y:50},zoomFlag:!1,zoomming:!1,zoonOut:!1,resize:!1,eventCancel:!1};
this.onPan=function(b){if(!this.parameters.resize&&!this.parameters.eventCancel&&!this.parameters.zoomming&&b&&b.pointers&&1==b.pointers.length&&(this.swipeInterval&&this.swipeInterval.stop(),this.animateInterval&&this.animateInterval.stop(),this.parameters.zoomFlag&&(this.panForMove(this,b.deltaX,b.deltaY,!0),this.options&&this.options.onPan)))this.options.onPan()};this.onDoubleTap=function(b){if(!(BookInfo.getBook().status_resize||BookInfo.getBook().flipping||(BookInfo.getBook().endFlip(),global.windowTapInterval&&
window.clearTimeout(global.windowTapInterval),this.parameters.resize||this.parameters.eventCancel||this.parameters.zoomming)))if(this.status_zoom=!0,!this.parameters.zoomFlag)this.zoomIn(this),this.parameters.zoomOut=!1,this.animateToScale(this,this.middleScale,b);else if(this.parameters.zoomFlag){var c=this.parameters.naturalWidth/this.parameters.width;this.parameters.zoomOut=!0;this.animateToScale(this,c,b)}};this.zoomIn=function(b){b.parameters.left=parseInt($(b).css("left"));b.parameters.top=
parseInt($(b).css("top"));b.parameters.naturalLeft=b.parameters.left;b.parameters.naturalTop=b.parameters.top;b.parameters.width=$(b).width();b.parameters.height=$(b).height();b.parameters.naturalWidth=$(b).width();b.parameters.naturalHeight=$(b).height();b.parameters.zoomFlag=!0;b.parameters.zoomOut=!1;b.options&&b.options.zoomIn&&b.options.zoomIn()};this.zoomOut=function(b){b.swipeInterval&&b.swipeInterval.stop();b.animateInterval&&b.animateInterval.stop();b.parameters.zoomFlag=!1;b.parameters.zoomOut=
!0;b.parameters.toScale=1;b.parameters.scale=1;b.options&&b.options.zoomOut&&b.options.zoomOut()};this.animateToScale=function(b,c,d){if(!b.parameters.eventCancel&&!b.parameters.zoomming){b.options&&b.options.zoomStart&&b.options.zoomStart();b.parameters.zoomming=!0;var f=0,m=0,n=0,p=0,q=0;b.animateInterval=function(d,k){f=$.easing.swing(null,n,b.parameters.width,b.parameters.width*(c-1),20);m=$.easing.swing(null,n,b.parameters.height,b.parameters.height*(c-1),20);p=$.easing.swing(null,n,b.parameters.left,
b.parameters.naturalLeft+50*(b.parameters.naturalWidth-b.parameters.width*c)/100-b.parameters.left,20);q=$.easing.swing(null,n,b.parameters.top,b.parameters.naturalTop+50*(b.parameters.naturalHeight-b.parameters.height*c)/100-b.parameters.top,20);b.css({width:f+"px",height:m+"px",left:p+"px",top:q+"px"});for(var s=0;s<b.side.pageArray.length;s++)if(b.side.pageArray[s])b.side.pageArray[s].onResize(f/2,m);n++;if(20<=n||d>=k){b.animateInterval.stop();b.parameters.left=b.parameters.naturalLeft+50*(b.parameters.naturalWidth-
b.parameters.width*c)/100;b.parameters.top=b.parameters.naturalTop+50*(b.parameters.naturalHeight-b.parameters.height*c)/100;b.parameters.width*=c;b.parameters.height*=c;b.css({width:b.parameters.width+"px",height:b.parameters.height+"px",left:b.parameters.left+"px",top:b.parameters.top+"px"});for(s=0;s<b.side.pageArray.length;s++)if(b.side.pageArray[s])b.side.pageArray[s].onResize(b.parameters.width/2,b.parameters.height);b.parameters.zoomming=!1;1>=b.parameters.width*b.parameters.scale/b.parameters.naturalWidth&&
b.zoomOut(b)}}.animation(this,320)}};this.panForMove=function(b,c,d,f){b.css({left:b.parameters.left+c+"px",top:b.parameters.top+d+"px"})};var c=!1,d=0,f=0;this.dblclick(function(b){b.pointers=[{pageX:b.pageX,pageY:b.pageY}];this.onDoubleTap(b)}.bind(this));this.bind(_event._down,function(b){c=!0;d=b.pageX;f=b.pageY}.bind(this));this.bind(_event._move,function(b){b.pointers=[{pageX:b.pageX,pageY:b.pageY}];c&&(b.deltaX=b.pageX-d,b.deltaY=b.pageY-f,this.onPan(b))}.bind(this));this.bind(_event._end,
function(b){c=!1;this.parameters.left+=b.pageX-d;this.parameters.top+=b.pageY-f}.bind(this))};
jQuery.fn.zoom=function(b){this.options=b;this.middleScale=3;this.maxScale=6;this.parameters={width:$(this).width()||0,height:$(this).height()||0,naturalWidth:$(this).width()||0,naturalHeight:$(this).height()||0,left:$(this).offset().left-0||0,top:$(this).offset().top-0||0,toScale:1,scale:1,rotate:0,tran:{x:0,y:0},origin:{x:50,y:50},zoomFlag:!1,zoomming:!1,zoomOut:!1,resize:!1,eventCancel:!1,zoomArea:{left:0,top:0,right:0,bottom:0}};this.onPan=function(b){if(!this.parameters.resize&&!this.parameters.eventCancel&&
!this.parameters.zoomming&&b&&b.pointers&&1==b.pointers.length&&(this.swipeInterval&&this.swipeInterval.stop(),this.animateInterval&&this.animateInterval.stop(),this.parameters.zoomFlag)){var d=this.panForMove(this,b.deltaX,b.deltaY,!0);if(this.options&&this.options.onPan)this.options.onPan();if("panend"==b.type||"pancancel"==b.type)this.setZoomParameters(this,d),this.restrictInBoundary(this)}};this.onSwipe=function(b){if(!this.parameters.resize&&!this.parameters.eventCancel&&!this.parameters.zoomming)if(this.parameters.zoomFlag){var d=
this.parameters.tran,f=this.tranLimit(this,this.parameters.scale,this.parameters.tran);if(f.x==parseInt(d.x)&&f.y==parseInt(d.y)){this.animateInterval&&this.animateInterval.stop();this.swipeInterval&&this.swipeInterval.stop();var g=0,h=0;0!=b.velocityX&&(g=b.velocityX);0!=b.velocityY&&(h=b.velocityY);this.swipeInterval=function(b,c){var d=this.parameters.tran,f=this.tranLimit(this,this.parameters.scale,this.parameters.tran);f.x!=parseInt(d.x)||f.y!=parseInt(d.y)?(this.swipeInterval.stop(),this.restrictInBoundary(this)):
(d=(c-b)/c,d=this.panForMove(this,g*d*16.7,h*d*16.7,!0),this.setZoomParameters(this,d),b>=c&&(this.swipeInterval.stop(),this.restrictInBoundary(this)))}.animation(this,320)}}else b.direction&Hammer.DIRECTION_RIGHT&&(d="right"),b.direction&Hammer.DIRECTION_LEFT&&(d="left"),b.direction&Hammer.DIRECTION_UP&&(d="up"),b.direction&Hammer.DIRECTION_DOWN&&(d="down"),this.options&&this.options.swipeend&&this.options.swipeend(d)};this.onDoubleTap=function(b){if(!(BookInfo.getBook().status_resize||BookInfo.getBook().flipping||
(BookInfo.getBook().endFlip(),global.windowTapInterval&&window.clearTimeout(global.windowTapInterval),this.parameters.resize||this.parameters.eventCancel||this.parameters.zoomming)))if(this.status_zoom=!0,!this.parameters.zoomFlag)this.zoomIn(this),this.parameters.origin=this.mathOrigin(this,b),this.originObj(this,this.parameters.origin),this.parameters.zoomOut=!1,this.animateToScale(this,this.middleScale,b);else if(this.parameters.zoomFlag){var d=this.parameters.naturalWidth/this.parameters.width;
this.parameters.zoomOut=!0;this.animateToScale(this,d,b)}};this.onPinch=function(b){"pinchstart"==b.type&&(this.pinchStart=!0);if(!(this.parameters.resize||this.parameters.eventCancel||this.parameters.zoomming||!this.parameters.zoomFlag&&1>=b.scale)&&b&&b.pointers){this.animateInterval&&this.animateInterval.stop();this.swipeInterval&&this.swipeInterval.stop();var d=function(){this.pinchStart=!1;this.parameters.zoomFlag||(this.parameters.zoomOut=!1,this.zoomIn(this));this.scale=this.parameters.toScale;
this.parameters.origin=this.mathOrigin(this,b);this.originObj(this,this.parameters.origin);this.pinchMoveIn(this,parseFloat(this.scale)*parseFloat(b.scale),b,this.parameters.origin)}.bind(this);"pinchstart"==b.type&&d(b);"pinchend"==b.type&&(this.parameters.scale=this.parameters.toScale,this.exceedScale(this,b),this.pinchStart=!1);"pinchmove"==b.type&&(this.pinchStart&&d(b),this.pinchMoveIn(this,parseFloat(this.scale)*parseFloat(b.scale),b,this.parameters.origin));"pinchcancel"==b.type&&(this.parameters.scale=
this.parameters.toScale,this.exceedScale(this,b),this.pinchStart=!1)}};this.exceedScale=function(b,d){var f=b.parameters.width*b.parameters.toScale/b.parameters.naturalWidth,g=b.parameters.width*b.parameters.toScale,h=b.parameters.height*b.parameters.toScale,k=b.parameters.naturalWidth*b.maxScale/b.parameters.width,l=b.parameters.naturalWidth/b.parameters.width,m=b.parameters.toScale;f>b.maxScale&&(m=k);if(1>f||g<windowWidth&&h<windowHeight)b.parameters.zoomOut=!0,m=l;b.animateToScale(b,m,d)};this.zoomIn=
function(b){b.parameters.tran=getTransform(b[0]);b.parameters.left=$(b).offset().left-b.parameters.tran.x;b.parameters.top=$(b).offset().top-b.parameters.tran.y;b.parameters.width=$(b).width();b.parameters.height=$(b).height();b.parameters.naturalWidth=$(b).width();b.parameters.naturalHeight=$(b).height();b.parameters.zoomFlag=!0;b.parameters.zoomOut=!1;b.options&&b.options.zoomIn&&b.options.zoomIn()};this.zoomOut=function(b){b.swipeInterval&&b.swipeInterval.stop();b.animateInterval&&b.animateInterval.stop();
b.parameters.zoomFlag=!1;b.parameters.zoomOut=!0;b.parameters.toScale=1;b.parameters.scale=1;b.options&&b.options.zoomOut&&b.options.zoomOut()};this.tranLimit=function(b,d,f){if(f){if(b.parameters.zoomOut){f={x:0,y:0};f.x=b.parameters.width*(d-1)*b.parameters.origin.x/100;f.y=b.parameters.height*(d-1)*b.parameters.origin.y/100;if((bookType==BookType.normal_book||bookType==BookType.catalog_book)&&bookConfig.retainBookCenter){var g=BookInfo.getBook().getCurrentPageIndex();if(1==g&&!rightToLeft||rightToLeft&&
g==totalPageCount)f.x-=b.parameters.width*d/4;if(1==g&&rightToLeft||!rightToLeft&&g==totalPageCount)f.x+=b.parameters.width*d/4}return f}b.parameters.origin||(b.parameters.origin={x:0,y:0});g=f.x;f=f.y;var h,k,l,m;h=b.parameters.width;k=b.parameters.height;l=b.parameters.left-b.parameters.origin.x*(d-1)*h/100;m=b.parameters.top-b.parameters.origin.y*(d-1)*k/100;var n=0,p=0,q=0,t=0,p=d*h;k*=d;p>windowWidth?(n=windowWidth-p-l+h*d*b.parameters.zoomArea.right/100,q=-l-h*d*b.parameters.zoomArea.left/100):
(n=-l-h*d*b.parameters.zoomArea.left/100,q=windowWidth-p-l+h*d*b.parameters.zoomArea.right/100);k>windowHeight?(p=windowHeight-k-m+h*d*b.parameters.zoomArea.bottom/100,t=-m-h*d*b.parameters.zoomArea.top/100):(p=-m-h*d*b.parameters.zoomArea.top/100,t=windowHeight-k-m+h*d*b.parameters.zoomArea.bottom/100);g=Number.between(g,n,q);f=Number.between(f,p,t);return{x:parseInt(g),y:parseInt(f)}}};this.pinchMoveIn=function(b,d,f){if(!b.parameters.eventCancel&&!b.parameters.zoomming&&f&&f.pointers&&2==f.pointers.length){var g=
{};g.scale=d;g.tran=b.mathTran(b,f,b.parameters.origin);b.transformSetting(b,g);b.parameters.toScale=d}};this.mathTran=function(b,d,f){if(!d||!d.pointers||0>=d.pointers.length||!f)return{x:0,y:0};var g,h;1==d.pointers.length&&(g=d.pointers[0].pageX,h=d.pointers[0].pageY);1<d.pointers.length&&(g=(d.pointers[0].pageX+d.pointers[1].pageX)/2,h=(d.pointers[0].pageY+d.pointers[1].pageY)/2);var k,l;l=b.parameters.width;d=b.parameters.height;k=b.parameters.left;b=b.parameters.top;k=(f.x*l/100+k).toFixed(2);
f=(f.y*d/100+b).toFixed(2);tranX=g-parseFloat(k);tranY=h-parseFloat(f);return{x:parseFloat(tranX.toFixed(2)),y:parseFloat(tranY.toFixed(2))}};this.mathOrigin=function(b,d){if(!d||!d.pointers||0>=d.pointers.length)return{x:50,y:50};var f,g;1==d.pointers.length&&(f=d.pointers[0].pageX,g=d.pointers[0].pageY);1<d.pointers.length&&(f=(d.pointers[0].pageX+d.pointers[1].pageX)/2,g=(d.pointers[0].pageY+d.pointers[1].pageY)/2);var h,k;h=b.parameters.width;k=b.parameters.height;f=(f-parseInt(b.offset().left))/
(h*b.parameters.scale);g=(g-parseInt(b.offset().top))/(k*b.parameters.scale);return{x:(100*f).toFixed(2),y:(100*g).toFixed(2)}};this.animateToScale=function(b,d,f){if(!b.parameters.eventCancel&&!b.parameters.zoomming){b.options&&b.options.zoomStart&&b.options.zoomStart();b.parameters.zoomming=!0;var g={};g.origin=b.parameters.origin;g.scale=d;g.tran=this.mathTran(b,f,g.origin);g.tran=this.tranLimit(b,d,g.tran);f=transformCSS(g);b.originObj(b,g.origin);animateOnce(b,f,300,function(){getTransform(b[0]);
b.transformSetting(b,g);b.parameters.scale=d;b.parameters.toScale=d;b.parameters.zoomming=!1;if(b.options.onZoomed)b.options.onZoomed(g);1>=b.parameters.width*b.parameters.toScale/b.parameters.naturalWidth&&b.zoomOut(b)}.bind(b),"%stransform","ease-in-out")}};this.restrictInBoundary=function(b,d){if(!b.parameters.eventCancel&&!b.parameters.zoomming){var f=b.parameters.tran,g=this.tranLimit(b,b.parameters.scale,f);if(g.x!=parseInt(f.x)||g.y!=parseInt(f.y)){b.animateInterval&&b.animateInterval.stop();
var h=0,k=0,l=0;g.x!=f.x&&(h=g.x-f.x);g.y!=f.y&&(k=g.y-f.y);b.animateInterval=function(f,g){var p=$.easing.easeOutBack(null,l,0,h,20),q=$.easing.easeOutBack(null,l,0,k,20);0<l&&(p-=$.easing.easeOutBack(null,l-1,0,h,20),q-=$.easing.easeOutBack(null,l-1,0,k,20));p=b.panForMove(b,p,q);b.setZoomParameters(b,p);l++;if(20<=l||f>=g)b.animateInterval.stop(),d&&"function"==typeof d&&d()}.animation(this,320)}}};this.transformSetting=function(b,d){b.setZoomParameters(b,d);var f=transformCSS(d);b.css(f)};this.panForMove=
function(b,d,f,g){var h=b.parameters?b.parameters.tran:{x:0,y:0};g=b.parameters?b.parameters.scale:1;h||(h={x:0,y:0});g||0==g||(g=1);d={x:h.x+d,y:h.y+f};f=transformCSS({tran:d,scale:g});b.css(f);return{tran:d,scale:g}};this.originObj=function(b,d){b.css({"-webkit-transform-origin":d.x+"% "+d.y+"%","-moz-transform-origin":d.x+"% "+d.y+"%","-ms-transform-origin":d.x+"% "+d.y+"%","-o-transform-origin":d.x+"% "+d.y+"%"})};this.setZoomParameters=function(b,d){function f(f){return void 0===d[f]||null===
d[f]||isNaN(d[f])?b.parameters[f]:d[f]}function g(f){return void 0!==d[f]&&null!==d[f]?d[f]:b.parameters[f]}b&&b.parameters&&d&&(b.parameters={width:f("width"),height:f("height"),naturalWidth:f("naturalWidth"),naturalHeight:f("naturalHeight"),left:f("left"),top:f("top"),scale:f("scale"),rotate:f("rotate"),toScale:f("toScale"),tran:g("tran"),origin:g("origin"),zoomFlag:g("zoomFlag"),zoomming:g("zoomming"),zoomOut:g("zoomOut"),resize:g("resize"),eventCancel:g("eventCancel"),zoomArea:g("zoomArea")})};
this.animateToTransform=function(b,d,f){if(!this.parameters.eventCancel&&!this.parameters.zoomming){this.options&&this.options.zoomStart&&this.options.zoomStart();this.parameters.zoomming=!0;this.parameters.tran=getTransform(this[0]);this.parameters.left=$(this).offset().left-this.parameters.tran.x;this.parameters.top=$(this).offset().top-this.parameters.tran.y;this.parameters.width=$(this).width();this.parameters.height=$(this).height();this.parameters.naturalWidth=$(this).width();this.parameters.naturalHeight=
$(this).height();var g={};g.origin=this.parameters.origin;g.scale=b;g.tran=d;g.origin=f;d=transformCSS(g);this.originObj(this,g.origin);animateOnce(this,d,300,function(){getTransform(this[0]);this.transformSetting(this,g);this.parameters.scale=b;this.parameters.toScale=b;this.parameters.zoomming=!1;if(this.options.onZoomed)this.options.onZoomed(g)}.bind(this),"%stransform","ease-in-out")}};this.registerPatamers=function(b){b&&(void 0!=b.width&&(this.parameters.width=b.width),void 0!=b.height&&(this.parameters.height=
b.height),void 0!=b.left&&(this.parameters.left=b.left),void 0!=b.top&&(this.parameters.top=b.top),void 0!=b.scale&&(this.parameters.scale=b.scale),void 0!=b.tran&&(this.parameters.tran=b.tran),void 0!=b.origin&&(this.parameters.origin=b.origin))};b=new Hammer.Manager($(this)[0]);b.add(new Hammer.Pan);b.add((new Hammer.Swipe({velocity:0.15})).recognizeWith(b.get("pan")));b.add(new Hammer.Pinch);isPhone()||isPad()?b.add(new Hammer.Tap({event:"doubletap",taps:2,interval:400,posThreshold:30})):b.add(new Hammer.Tap({event:"doubletap",
taps:2}));b.on("panstart panmove panend pancancel",this.onPan.bind(this));if(isPhone()||isPad()||isSlideBook())b.on("pinchstart pinchmove pinchcancel pinchend",this.onPinch.bind(this));b.on("swipe swipeup",this.onSwipe.bind(this));if(!isAndroidWeChat())b.on("doubletap",this.onDoubleTap.bind(this))};
Class("VideoSkin",{create:function(b){this.content=b;this.video=b.find("video:first");this.html_video=this.video[0];this.initPlayer();this.initControlBar();this.initSkin();this.initEvents();this.onResize()},initPlayer:function(){this.player=this.html_video;var b=this.video.find("source:first");b&&(b=b.attr("src"),(b.endsWith(".flv")||b.endsWith(".f4v"))&&this.content.html('<video class="video-js vjs-default-skin" preload="auto" width="100%" height="100%" data-setup=\'{}\'><source src='+b+" type='video/x-flv'></video>"))},
initControlBar:function(){this.content.addClass("video-player");this.controlBar=$('<div class="video-controls slider-action"></div>');this.controlBorder=$('<div class="control-border"></div>');this.content.append(this.controlBar);this.controlBar.append(this.controlBorder);this.btnPlay=$('<div class="video-play"></div>');this.bevel1=$('<div class="bevel"></div>');this.video_timer=$('<div class="video-timer">00:00</div>');this.video_seek=$('<div class="video-seek"></div>');this.bevel2=$('<div class="bevel"></div>');
this.volume_seek=$('<div class="volume-seek"></div>');this.btnVolume=$('<div class="volume-button"></div>');this.btnFullscreen=$('<div class="player-fullscreen"></div>');this.controlBar.append(this.btnPlay);this.controlBar.append(this.bevel1);this.controlBar.append(this.video_timer);this.controlBar.append(this.video_seek);this.controlBar.append(this.bevel2);this.controlBar.append(this.volume_seek);this.controlBar.append(this.btnVolume);this.controlBar.append(this.btnFullscreen);this.createVideoSeekSlider();
this.createVolumeSeekSlider();$.system.name!=$.system.IOS&&(this.btnCenter=$('<div class="video-center-button"></div>'),this.content.append(this.btnCenter))},createVideoSeekSlider:function(){var b=this.html_video.duration;b||(b=100);this.video_seek_slider=this.video_seek.slider({range:0,max:b,direction:"horizontal",onChange:function(b){try{this.html_video.currentTime=parseFloat(b)}catch(d){}}.bind(this)})},createVolumeSeekSlider:function(){this.volume_value=1;this.volume_seek_slider=this.volume_seek.slider({range:1,
max:1,direction:"vertical",onChange:function(b){b=parseFloat(b);try{this.volume_value=b,equals(b,0)?(this.html_video.muted=!0,this.btnVolume.addClass("volume-mute")):(this.html_video.muted=!1,this.btnVolume.removeClass("volume-mute")),this.html_video.volume=b}catch(c){}}.bind(this)})},initEvents:function(){this.initControlBarEvents();this.initPlayEvents();this.initVolumeEvents();this.initFullscreenEvents()},initControlBarEvents:function(){var b=function(){var b="visible";!0==this.html_video.paused&&
(b="hidden");this.controlBar.css({visibility:b,opacity:1})}.bind(this),c=function(){this.controlBar.css({visibility:"hidden",opacity:0})}.bind(this);$.browser.device==$.browser.DEVICE_PC?(this.video.bind(_event._enter,b),this.video.bind(_event._leave,c),this.controlBar.bind(_event._enter,b),this.controlBar.bind(_event._leave,c)):(this.video.bind(_event._down,function(){b();this.hideControlbarFlag=!1}.bind(this)),this.video.bind(_event._move,function(){b();this.hideControlbarFlag=!1}.bind(this)),this.video.bind(_event._up,
function(){this.hideControlbarFlag=!0;(function(){!0==this.hideControlbarFlag&&c()}).delay(this,5E3)}.bind(this)))},initPlayEvents:function(){var b=function(b){!1==this.html_video.paused?this.pause():(this.play(),this.controlBar.css({visibility:"visible",opacity:1}));return!1};this.video.bind(_event._click,b.bind(this));this.btnPlay.bind(_event._click,b.bind(this));this.btnCenter&&this.btnCenter.bind(_event._click,b.bind(this));this.video.bind("play",function(){this.btnPlay.addClass("paused-button");
this.btnCenter&&this.btnCenter.css("display","none")}.bind(this));this.video.bind("pause",function(){this.btnPlay.removeClass("paused-button");this.btnCenter&&this.btnCenter.css("display","block")}.bind(this));this.video.bind("ended",function(){this.btnPlay.removeClass("paused-button");this.btnCenter&&this.btnCenter.css("display","block")}.bind(this));this.video.bind("timeupdate",function(){var b=this.html_video.currentTime,d=this.html_video.duration;d||(d=100);this.video_seek_slider&&(this.video_seek_slider.setMax(d),
this.video_seek_slider.setRange(b));this.video_timer.text(this.timeFormat(b))}.bind(this))},initVolumeEvents:function(){this.btnVolume.bind(_event._click,function(){!0==this.html_video.muted?(this.html_video.muted=!1,this.volume_seek_slider.setRange(this.volume_value),this.btnVolume.removeClass("volume-mute")):(this.html_video.muted=!0,this.volume_seek_slider.setRange(0),this.btnVolume.addClass("volume-mute"));return!1}.bind(this));this.btnVolume.bind("mouseenter",function(b){b=isTouch?b.originalEvent?
b.originalEvent.changedTouches:b.changedTouches:[b];b=b[0].pageX-b[0].offsetX-this.controlBar.offset().left;b+=(this.btnVolume.width()-this.volume_seek.width())/2;this.volume_seek.css({left:b+"px"});this.volume_seek.css({visibility:"visible",opacity:"1"})}.bind(this));this.btnVolume.bind("mouseleave",function(){this.volume_seek.css({visibility:"hidden",opacity:"0"})}.bind(this));this.volume_seek.bind("mouseenter",function(){this.volume_seek.css({visibility:"visible",opacity:"1"})}.bind(this));this.volume_seek.bind("mouseleave",
function(){this.volume_seek.css({visibility:"hidden",opacity:"0"})}.bind(this))},initFullscreenEvents:function(){this.btnFullscreen.bind(_event._click,function(){fullScreenApi.supportsFullScreen?fullScreenApi.isFullScreen()?fullScreenApi.cancelFullScreen():fullScreenApi.requestFullScreen(this.html_video):html_player.webkitSupportsFullscreen&&this.html_video.webkitEnterFullscreen();return!1}.bind(this));this.video.bind(fullScreenApi.fullScreenEventName,function(){fullScreenApi.isFullScreen()?this.fullscreen_btn.addClass("player-exit-fullscreen"):
this.fullscreen_btn.removeClass("player-exit-fullscreen")}.bind(this))},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))},initSkin:virtual_function,onResize:function(){var b=this.controlBar.width();b||(b=this.content.width());var c=Math.max(0,b-this.seekWidth);0>=c?this.video_seek.css({display:"none"}):(this.video_seek.css({width:c,display:"block"}),this.video_seek_slider.setRange(this.html_video.currentTime));
c=this.btnVolume.position().left+this.controlBar.position().left+(this.btnVolume.width()-this.volume_seek.width())/2;b<this.fullscreenWidth?(this.btnFullscreen.css({display:"none"}),b<this.volumeWidth?(this.bevel2.css({display:"none"}),this.btnVolume.css({display:"none"}),this.volume_seek.css({left:"-45px"})):(this.bevel2.css({display:"block"}),this.btnVolume.css({display:"block"}),this.volume_seek.css({left:c+"px"}))):(this.btnVolume.css({display:"block"}),this.btnFullscreen.css({display:"block"}),
this.volume_seek.css({left:c+"px"}));!0==this.html_video.muted?this.volume_seek_slider.setRange(0):this.volume_seek_slider.setRange(this.volume_value)},play:function(){this.player.play()},pause:function(){this.player.pause()},stop:function(){this.pause();this.player.currentTime=0}});Class("RoundVideoSkin",{create:function(b){this.seekWidth=185;this.volumeWidth=125;this.fullscreenWidth=170;this._super(b)},initSkin:function(){this.content.addClass("round")}}).extend("VideoSkin");
Class("ClassicVideoSkin",{create:function(b){this.seekWidth=195;this.volumeWidth=135;this.fullscreenWidth=170;this.initEventMonitor();this._super(b);this.btnCenter&&this.btnCenter.css("display","none")},initSkin:function(){this.content.addClass("classic")},initEventMonitor:function(){this.eventTime;var b=function(){void 0==this.eventTime?b.stop():5E3<new Date-this.eventTime&&(this.controlBar.css({visibility:"hidden",opacity:0}),b.stop())}.interval(this,300);this.keeyWatchEvent=function(){$.browser.device!=
$.browser.DEVICE_PC&&(this.eventTime=new Date,b.isRunning()||b.start())}.bind(this)},initControlBarEvents:function(){var b=function(){this.controlBar.css({visibility:"visible",opacity:1})}.bind(this),c=function(){this.controlBar.css({visibility:"hidden",opacity:0})}.bind(this);$.browser.device==$.browser.DEVICE_PC?(this.video.bind(_event._enter,b),this.video.bind(_event._leave,c),this.controlBar.bind(_event._enter,b),this.controlBar.bind(_event._leave,c)):(this.video.bind(_event._down,function(){b();
this.keeyWatchEvent()}.bind(this)),this.video.bind(_event._move,function(){b();this.keeyWatchEvent()}.bind(this)),this.video.bind(_event._up,this.keeyWatchEvent));b()},initPlayEvents:function(){var b=function(b){!1==this.html_video.paused?this.pause():(this.play(),this.controlBar.css({visibility:"visible",opacity:1}));this.keeyWatchEvent();return!1};this.video.bind(_event._click,b.bind(this));this.btnPlay.bind(_event._click,b.bind(this));this.video.bind("play",function(){this.btnPlay.addClass("paused-button")}.bind(this));
this.video.bind("pause",function(){this.btnPlay.removeClass("paused-button")}.bind(this));this.video.bind("ended",function(){this.btnPlay.removeClass("paused-button")}.bind(this));this.video.bind("timeupdate",function(){var b=this.html_video.currentTime,d=this.html_video.duration;d||(d=100);this.video_seek_slider&&(this.video_seek_slider.setMax(d),this.video_seek_slider.setRange(b));this.video_timer.text(this.timeFormat(b))}.bind(this))},onResize:function(){this._super();var b=this.controlBar.width();
b||(b=this.content.width());110>b?this.video_timer.css("display","none"):this.video_timer.css("display","block")}}).extend("VideoSkin");Class("SmallBlackVideoSkin",{create:function(b){this.seekWidth=145;this.volumeWidth=85;this.fullscreenWidth=110;this._super(b)},initSkin:function(){this.content.addClass("smallblack")}}).extend("VideoSkin");
Class("AudioSkin",{create:function(b,c){this.content=b;this.audio=b.find("audio:first");this.html_audio=this.audio[0];this.resources=c;this.audioIndex=0;this.init();this.initSkin();this.initEvents();this.onResize();0<this.resources.length&&this.changeMusic(0)},init:function(){this.content.addClass("audio-player");this.btnPlay=$('<div class="audio-play slider-action"></div>');this.btnBack=$('<div class="back_button slider-action"></div>');this.btnForward=$('<div class="forward_button slider-action"></div>');
this.volume_seek=$('<div class="volume-seek slider-action"></div>');this.btnVolume=$('<div class="volume-button slider-action"></div>');this.btnVolumeUp=$('<div class="volume-up-button slider-action"></div>');this.btnVolumeDown=$('<div class="volume-down-button slider-action"></div>');this.audio_timer=$('<div class="audio-timer">00:00/00:00</div>');this.audio_seek=$('<div class="audio-seek slider-action"></div>');this.audio_name=$('<div class="audio-file"></div>');this.content.append(this.btnPlay);
this.content.append(this.btnBack);this.content.append(this.btnForward);this.content.append(this.volume_seek);this.content.append(this.btnVolume);this.content.append(this.btnVolumeUp);this.content.append(this.btnVolumeDown);this.content.append(this.audio_timer);this.content.append(this.audio_seek);this.content.append(this.audio_name);this.createAudioSeekSlider();this.createVolumeSeekSlider()},createAudioSeekSlider:function(){var b=this.html_audio.duration;b||(b=100);this.audio_seek_slider=this.audio_seek.slider({range:0,
max:b,direction:"horizontal",onChange:function(b){try{this.html_audio.currentTime=parseFloat(b)}catch(d){}}.bind(this)})},createVolumeSeekSlider:function(){this.volume_value=1;this.volume_seek_slider=this.volume_seek.slider({range:1,max:1,direction:this.volumeDirection,onChange:function(b){b=parseFloat(b);try{this.volume_value=b,0==b?(this.html_audio.muted=!0,this.volume_btn.addClass("volume-mute")):(this.html_audio.muted=!1,this.volume_btn.removeClass("volume-mute")),this.html_audio.volume=b}catch(c){}}.bind(this)})},
initEvents:function(){this.initPlayEvents();this.initVolumeEvents()},initPlayEvents:function(){this.btnPlay.bind(_event._click,function(b){!1==this.html_audio.paused?this.html_audio.pause():this.html_audio.play();return!1}.bind(this));this.audio.bind("play",function(){this.btnPlay.addClass("paused-button")}.bind(this));this.audio.bind("pause",function(){this.btnPlay.removeClass("paused-button")}.bind(this));this.audio.bind("ended",function(){this.btnPlay.removeClass("paused-button");this.audioIndex<
this.resources.length-1&&this.changeMusicByStep(1)}.bind(this));this.btnBack.bind(_event._click,function(b){this.changeMusicByStep(-1);return!1}.bind(this));this.btnForward.bind(_event._click,function(b){this.changeMusicByStep(1);return!1}.bind(this));this.audio.bind("timeupdate",function(){var b=this.html_audio.currentTime,c=this.html_audio.duration;this.audio_seek_slider.setMax(c);this.audio_seek_slider.setRange(b);this.audio_timer.text(this.timeFormat(b)+"/"+this.timeFormat(c))}.bind(this))},changeMusicByStep:function(b){0!=
this.resources.length&&(b=this.audioIndex+1,0>b&&(b+=this.resources.length),b%=this.resources.length,this.changeMusic(b),this.html_audio.play())},changeMusic:function(b){this.audioIndex=b;b=this.resources[b];this.html_audio.src=b;this.audio_name.text(this.getAudioTitle(b))},getAudioTitle: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)},initVolumeEvents:function(){this.btnVolume.bind(_event._click,
function(b){!0==this.html_audio.muted?(this.html_audio.muted=!1,this.volume_seek_slider.setRange(this.volume_value),this.btnVolume.removeClass("volume-mute")):(this.html_audio.muted=!0,this.volume_seek_slider.setRange(0),this.btnVolume.addClass("volume-mute"));return!1}.bind(this));this.btnVolumeUp.bind(_event._click,function(){this.changeVolumeByStep(0.1)}.bind(this));this.btnVolumeDown.bind(_event._click,function(){this.changeVolumeByStep(-0.1)}.bind(this))},changeVolumeByStep:function(b){this.volume_value=
this.html_audio.volume+b;this.volume_value=Math.max(0,this.volume_value);this.volume_value=Math.min(1,this.volume_value);this.html_audio.volume=this.volume_value},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))},initSkin:virtual_function,onResize:function(){if(this.audioSeek){var b=parseInt(this.content.width()),b=Math.max(0,b-this.audioSeek);0>=b?this.audio_seek.css({display:"none"}):
(this.audio_seek.css({width:b,display:"block"}),this.audio_seek_slider.setRange(this.html_audio.currentTime))}!1==this.html_audio.muted?this.volume_seek_slider.setRange(this.volume_value):this.volume_seek_slider.setRange(0);b=this.volumeWidth;void 0!=b&&(this.content.width()<b?(this.btnVolume.css({display:"none"}),this.volume_seek.css({display:"none"})):(this.btnVolume.css({display:"block"}),this.volume_seek.css({display:"block"})))},refreshSeek:function(){this.audio_seek_slider.setRange(this.html_audio.currentTime);
!1==this.html_audio.muted?this.volume_seek_slider.setRange(this.volume_value):this.volume_seek_slider.setRange(0)}});
Class("AudioListSkin",{init:function(){this._super();this.btnList=$("<div class='list-button'></div>");this.pnlListBackground=$("<div class='list-panel-bk'></div>");this.pnlList=$("<div class='list-panel'></div>");this.content.append(this.btnList);this.content.append(this.pnlListBackground);this.pnlListBackground.append(this.pnlList);this.addAudioItems();this.listVisible=!1;this.items[0]&&this.items[0].addClass("selected");1==this.resources.length&&(this.btnList.css("display","none"),this.pnlListBackground.css("display",
"none"))},addAudioItems:function(){this.items=[];for(var b=0;b<this.resources.length;b++){var c=this.resources[b],d=c.lastIndexOf("/")+1,f=c.lastIndexOf("."),c=c.substring(d,f);this.items[b]=$("<div class='list-item'></div>");this.items[b].text(c);this.pnlList.append(this.items[b])}},initEvents:function(){this._super();this.initListEvents()},initListEvents:function(){this.btnList.bind(_event._click,function(){this.listVisible?this.hideListPanel():this.showListPanel();this.listVisible=!this.listVisible;
return!1}.bind(this));for(var b=0;b<this.items.length;b++){var c=function(b,c){return function(){b.changeMusic(c);b.html_audio.play()}}(this,b);this.items[b].bind(_event._click,c)}},showListPanel:function(){this.pnlListBackground.css("display","block")},hideListPanel:function(){this.pnlListBackground.css("display","none")},changeMusic:function(b){this._super(b);if(this.items)for(var c=0;c<this.resources.length&&this.items[c];c++)c==b?this.items[c].addClass("selected"):this.items[c].removeClass("selected")},
initSkin:virtual_function}).extend("AudioSkin");Class("DefaultAudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this.audioSeek=20;this.volumeWidth=170;this._super(b,c)},initSkin:function(){this.content.addClass("default")}}).extend("AudioSkin");Class("AdvancedAudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this._super(b,c)},initSkin:function(){this.content.addClass("advanced")}}).extend("AudioListSkin");
Class("WaveAudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this.audioSeek=125;this._super(b,c)},initSkin:function(){this.content.addClass("wave")},onResize:function(){this._super();var b=this.content.height();this.pnlListBackground.css("height",b-44+"px");b=this.pnlList.width()-20;if(this.items)for(var c=0;c<this.items.length;c++)this.items[c]&&this.items[c].css("width",b+"px")}}).extend("AudioListSkin");
Class("GlassAudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this._super(b,c)},initSkin:function(){this.content.addClass("glass")}}).extend("AudioListSkin");Class("SimpleAudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this._super(b,c)},initSkin:function(){this.content.addClass("simple")}}).extend("AudioSkin");Class("EnjoyAudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this._super(b,c)},initSkin:function(){this.content.addClass("enjoy")}}).extend("AudioSkin");
Class("DecentAudioSkin",{create:function(b,c){this.volumeDirection="vertical";this._super(b,c)},initSkin:function(){this.content.addClass("decent")}}).extend("AudioSkin");Class("TreeAudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this._super(b,c)},initSkin:function(){this.content.addClass("tree")}}).extend("AudioSkin");Class("ChristmasAudioSkin",{create:function(b,c){this.volumeDirection="vertical";this._super(b,c)},initSkin:function(){this.content.addClass("christmas")}}).extend("AudioSkin");
Class("TurnonoffAudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this._super(b,c)},init:function(){this._super();this.volume_status=$("<div class='volume-status'>Music On</div>");this.content.append(this.volume_status)},initPlayEvents:function(){this._super();this.volume_status.bind(_event._click,function(b){!1==this.html_audio.paused?this.html_audio.pause():this.html_audio.play();return!1}.bind(this));this.audio.bind("play",function(){this.volume_status.text("Music Off")}.bind(this));
this.audio.bind("pause",function(){this.volume_status.text("Music On")}.bind(this))},initSkin:function(){this.content.addClass("turnonoff")}}).extend("AudioSkin");Class("FadeAudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this._super(b,c)},initSkin:function(){this.content.addClass("fade")}}).extend("AudioSkin");Class("BackgroundAudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this._super(b,c)},initSkin:function(){this.content.addClass("background")}}).extend("AudioSkin");
Class("Skin1AudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this.audioSeek=130;this._super(b,c)},initSkin:function(){this.content.addClass("skin1")}}).extend("AudioSkin");Class("Skin2AudioSkin",{create:function(b,c){this.volumeDirection="horizontal";this.audioSeek=80;this._super(b,c)},initSkin:function(){this.content.addClass("skin2")}}).extend("AudioSkin");bdor[7]="m";
(function(b){b.fn.addVideoSkin=function(b){var d=null;switch(b){case "round":d=new RoundVideoSkin(this);break;case "classic":d=new ClassicVideoSkin(this);break;case "smallblack":d=new SmallBlackVideoSkin(this);break;default:d=new ClassicVideoSkin(this)}return d};bdor.i=function(b){return bdor[b]};bdor.f="f";b.fn.addAudioSkin=function(b){var d=null;(b=global[b.firstUpperCase()+"AudioSkin"])&&(d=new b(this,this.audioResources));d||(d=new DefaultAudioSkin(this,this.audioResources));return d};this.skin=
this.bdor})(jQuery);var audioThemeNames={GlassAudioPlayer:"",SimpleAudioPlayer:"",StandardAudioPlayer:"",StandardAudioPlayer02:"",StandardAudioPlayer03:"",StandardAudioPlayer04:"",StandardAudioPlayer05:"",StandardAudioPlayer06:""};bdor[8]="o";
(function(b,c,d){function f(b,c){var d=(b[0]||0)-(c[0]||0);return 0<d||!d&&0<b.length&&f(b.slice(1),c.slice(1))}function g(b){if(typeof b!=k)return b;var c=[],d="",f;for(f in b)d=typeof b[f]==k?g(b[f]):[f,l?encodeURI(b[f]):b[f]].join("="),c.push(d);return c.join("&")}function h(b){var c=[],d;for(d in b)c.push(['<param name="',d,'" value="',g(b[d]),'" />'].join(""));return c.join("")}var k="object",l=!0;try{var m=d.description||(new d("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}catch(n){m=
"Unavailable"}var p=m.match(/\d+/g)||[0];b[c]={available:0<p[0],activeX:d&&!d.name,version:{original:m,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 f(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||""};l="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 f=[],g;for(g in d)d[g]&&f.push([g,'="',d[g],'"'].join(""));d=f.join(" ");c.innerHTML=["<object ",d,">",h(b),"</object>"].join("");return c.firstChild}};
b.fn[c]=function(d){var f=this.find(k).andSelf().filter(k);/string|object/.test(typeof d)&&this.each(function(){var f=b(this),g;d=typeof d==k?d:{swf:d};d.fallback=this;if(g=b[c].create(d))f.children().remove(),f.html(g)});"function"==typeof d&&f.each(function(){var f=this;f.jsInteractionTimeoutMs=f.jsInteractionTimeoutMs||0;660>f.jsInteractionTimeoutMs&&(f.clientWidth||f.clientHeight?d.call(f):setTimeout(function(){b(f)[c](d)},f.jsInteractionTimeoutMs+66))});return f}})(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,f,g){return jQuery.easing[jQuery.easing.def](b,c,d,f,g)},easeInQuad:function(b,c,d,f,g){return f*(c/=g)*c+d},easeOutQuad:function(b,c,d,f,g){return-f*(c/=g)*(c-2)+d},easeInOutQuad:function(b,c,d,f,g){return 1>(c/=g/2)?f/2*c*c+d:-f/2*(--c*(c-2)-1)+d},easeInCubic:function(b,c,d,f,g){return f*(c/=g)*c*c+d},easeOutCubic:function(b,c,d,f,g){return f*((c=c/g-1)*c*c+1)+d},easeInOutCubic:function(b,c,d,f,g){return 1>(c/=g/2)?f/2*c*c*c+d:
f/2*((c-=2)*c*c+2)+d},easeInQuart:function(b,c,d,f,g){return f*(c/=g)*c*c*c+d},easeOutQuart:function(b,c,d,f,g){return-f*((c=c/g-1)*c*c*c-1)+d},easeInOutQuart:function(b,c,d,f,g){return 1>(c/=g/2)?f/2*c*c*c*c+d:-f/2*((c-=2)*c*c*c-2)+d},easeInQuint:function(b,c,d,f,g){return f*(c/=g)*c*c*c*c+d},easeOutQuint:function(b,c,d,f,g){return f*((c=c/g-1)*c*c*c*c+1)+d},easeInOutQuint:function(b,c,d,f,g){return 1>(c/=g/2)?f/2*c*c*c*c*c+d:f/2*((c-=2)*c*c*c*c+2)+d},easeInSine:function(b,c,d,f,g){return-f*Math.cos(c/
g*(Math.PI/2))+f+d},easeOutSine:function(b,c,d,f,g){return f*Math.sin(c/g*(Math.PI/2))+d},easeInOutSine:function(b,c,d,f,g){return-f/2*(Math.cos(Math.PI*c/g)-1)+d},easeInExpo:function(b,c,d,f,g){return 0==c?d:f*Math.pow(2,10*(c/g-1))+d},easeOutExpo:function(b,c,d,f,g){return c==g?d+f:f*(-Math.pow(2,-10*c/g)+1)+d},easeInOutExpo:function(b,c,d,f,g){return 0==c?d:c==g?d+f:1>(c/=g/2)?f/2*Math.pow(2,10*(c-1))+d:f/2*(-Math.pow(2,-10*--c)+2)+d},easeInCirc:function(b,c,d,f,g){return-f*(Math.sqrt(1-(c/=g)*
c)-1)+d},easeOutCirc:function(b,c,d,f,g){return f*Math.sqrt(1-(c=c/g-1)*c)+d},easeInOutCirc:function(b,c,d,f,g){return 1>(c/=g/2)?-f/2*(Math.sqrt(1-c*c)-1)+d:f/2*(Math.sqrt(1-(c-=2)*c)+1)+d},easeInElastic:function(b,c,d,f,g){b=1.70158;var h=0,k=f;if(0==c)return d;if(1==(c/=g))return d+f;h||(h=0.3*g);k<Math.abs(f)?(k=f,b=h/4):b=h/(2*Math.PI)*Math.asin(f/k);return-(k*Math.pow(2,10*(c-=1))*Math.sin(2*(c*g-b)*Math.PI/h))+d},easeOutElastic:function(b,c,d,f,g){b=1.70158;var h=0,k=f;if(0==c)return d;if(1==
(c/=g))return d+f;h||(h=0.3*g);k<Math.abs(f)?(k=f,b=h/4):b=h/(2*Math.PI)*Math.asin(f/k);return k*Math.pow(2,-10*c)*Math.sin(2*(c*g-b)*Math.PI/h)+f+d},easeInOutElastic:function(b,c,d,f,g){b=1.70158;var h=0,k=f;if(0==c)return d;if(2==(c/=g/2))return d+f;h||(h=0.3*g*1.5);k<Math.abs(f)?(k=f,b=h/4):b=h/(2*Math.PI)*Math.asin(f/k);return 1>c?-0.5*k*Math.pow(2,10*(c-=1))*Math.sin(2*(c*g-b)*Math.PI/h)+d:k*Math.pow(2,-10*(c-=1))*Math.sin(2*(c*g-b)*Math.PI/h)*0.5+f+d},easeInBack:function(b,c,d,f,g,h){void 0==
h&&(h=1.70158);return f*(c/=g)*c*((h+1)*c-h)+d},easeOutBack:function(b,c,d,f,g,h){void 0==h&&(h=1.70158);return f*((c=c/g-1)*c*((h+1)*c+h)+1)+d},easeInOutBack:function(b,c,d,f,g,h){void 0==h&&(h=1.70158);return 1>(c/=g/2)?f/2*c*c*(((h*=1.525)+1)*c-h)+d:f/2*((c-=2)*c*(((h*=1.525)+1)*c+h)+2)+d},easeInBounce:function(b,c,d,f,g){return f-jQuery.easing.easeOutBounce(b,g-c,0,f,g)+d},easeOutBounce:function(b,c,d,f,g){return(c/=g)<1/2.75?7.5625*f*c*c+d:c<2/2.75?f*(7.5625*(c-=1.5/2.75)*c+0.75)+d:c<2.5/2.75?
f*(7.5625*(c-=2.25/2.75)*c+0.9375)+d:f*(7.5625*(c-=2.625/2.75)*c+0.984375)+d},easeInOutBounce:function(b,c,d,f,g){return c<g/2?0.5*jQuery.easing.easeInBounce(b,2*c,0,f,g)+d:0.5*jQuery.easing.easeOutBounce(b,2*c-g,0,f,g)+0.5*f+d}});
(function(b){var c=[],d=function(){},f=0,g=[],h=function(){f++;f>=c.length&&(d(g),d=function(){})},k=function(c){var d=new Image;b(d).load(function(){g.push({url:c,img:d});h()}).error(function(){g.push(d);h()}).attr("src",c)};b.fn.loader=function(f,g,h){f&&b.extend(c,f);"function"==typeof g&&(d=g);for(f=0;f<c.length;f++)k(c[f])}})(jQuery);
var phoneIconInfo={width:600,height:1E3,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:"searchButton",position:{x:540,y:630},width:35,height:35},{id:"tableOfContent",position:{x:255,y:21},width:48,height:48},{id:"ZoomIn",position:{x:19,y:106},width:48,height:48},{id:"addBookmark",position:{x:542,y:17},width:48,height:48},{id:"bookmark",position:{x:483,y:17},width:48,height:48},
{id:"miBookmark",position:{x:552,y:284},width:32,height:32},{id:"miBookmark_close",position:{x:402,y:429},width:40,height:40},{id:"miBookmark_close_enter",position:{x:462,y:429},width:40,height:40},{id:"thumbnails",position:{x:19,y:18},width:48,height:48},{id:"moreBar",position:{x:97,y:19},width:48,height:48},{id:"miSearch",position:{x:20,y:284},width:32,height:32},{id:"miTableOfContent",position:{x:373,y:284},width:32,height:32},{id:"sharethis",position:{x:87,y:284},width:32,height:32},{id:"home",
position:{x:495,y:284},width:32,height:32},{id:"facebook",position:{x:20,y:412},width:65,height:65},{id:"twitter",position:{x:92,y:412},width:65,height:65},{id:"google",position:{x:164,y:412},width:65,height:65},{id:"addthis",position:{x:309,y:412},width:65,height:65},{id:"linkedin",position:{x:236,y:412},width:65,height:65},{id:"share_more",position:{x:308,y:412},width:65,height:65},{id:"reddit",position:{x:192,y:610},width:65,height:65},{id:"digg",position:{x:265,y:610},width:65,height:65},{id:"email",
position:{x:340,y:610},width:65,height:65},{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:158,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:"shoppingCart",position:{x:407,y:104},width:48,height:48},{id:"instructions",position:{x:419,y:620},width:48,
height:48},{id:"annotation",position:{x:482,y:620},width:48,height:48},{id:"goBtn",position:{x:338,y:110},width:48,height:48},{id:"forward",position:{x:482,y:620},width:48,height:48},{id:"backward",position:{x:482,y:620},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:"soundOn",position:{x:197,y:535},width:45,height:45},{id:"soundOff",position:{x:197,y:535},width:45,height:45},{id:"First",position:{x:194,
y:194},width:45,height:45},{id:"prev",position:{x:291,y:194},width:45,height:45},{id:"next",position:{x:383,y:194},width:45,height:45},{id:"Last",position:{x:475,y:194},width:45,height:45},{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:414,y:20},width:48,height:48},{id:"ZoomOut",position:{x:101,y:107},width:48,height:48},{id:"passward",position:{x:8,y:547},width:170,height:170},{id:"fullScreen",position:{x:482,
y:104},width:48,height:48},{id:"exitFullScreen",position:{x:540,y:104},width:48,height:48},{id:"firstBtn",position:{x:194,y:190},width:45,height:45},{id:"prevBtn",position:{x:291,y:190},width:45,height:45},{id:"nextBtn",position:{x:383,y:190},width:45,height:45},{id:"lastBtn",position:{x:475,y:190},width:45,height:45},{id:"backwardBtn",position:{x:494,y:344},width:45,height:45},{id:"forwardBtn",position:{x:548,y:344},width:45,height:45}]},catalogIconInfo={width:520,height:220,iconInfo:[{id:"background",
position:{x:3,y:9},width:420,height:50},{id:"thumb",position:{x:144,y:143},width:38,height:38},{id:"thumb_down",position:{x:144,y:179},width:38,height:38},{id:"share",position:{x:213,y:143},width:38,height:38},{id:"share_down",position:{x:213,y:179},width:38,height:38},{id:"search",position:{x:179,y:143},width:38,height:38},{id:"search_down",position:{x:179,y:179},width:38,height:38},{id:"more",position:{x:252,y:143},width:38,height:38},{id:"more_down",position:{x:252,y:179},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:"prev_down",position:{x:240,y:106},width:38,height:38},{id:"next_down",position:{x:288,y:106},width:38,height:38},{id:"fullScreen",position:{x:290,y:143},width:38,height:38},{id:"fullScreen_down",position:{x:290,y:179},width:38,height:38},{id:"exitFullScreen",position:{x:328,y:143},width:38,height:38},{id:"exitFullScreen_down",position:{x:328,y:179},width:38,height:38}]};
jQuery.fn.loading=function(b,c){this.initLoadingHtml=function(b){this.loadingDom=$('<div class="loader"><div class="loader-inner ball-pulse-sync"><div></div><div></div><div></div></div></div>');this.append(this.loadingDom)}.bind(this);this.createLoading=function(b){this.initLoadingHtml(b)}.bind(this);this.finishedLoading=function(){this.hideLoading()}.bind(this);this.initLoading=function(){}.bind(this);this.showLoading=function(){this.loadingDom&&this.loadingDom.show()}.bind(this);this.hideLoading=
function(){this.loadingDom&&this.loadingDom.remove()}.bind(this);this.createLoading(b)};
(function(b){var c=function(){return Hammer.HAS_TOUCHEVENTS&&navigator.userAgent.match(Hammer.MOBILE_REGEX)};bdor[3]="f";var d=function(b){this.theButton=b;this.eventSource=b[0];c()?(b.bind("touchstart",this.mouseDown.bind(this)),b.bind("touchend",this.mouseUp.bind(this))):(b.bind("mouseenter",this.mouseEnter.bind(this)),b.bind("mouseleave",this.mouseLeave.bind(this)),b.bind("blur",this.mouseLeave.bind(this)),b.bind("mousedown",this.mouseDown.bind(this)),b.bind("mouseup",this.mouseUp.bind(this)))};
d.prototype.mouseEnter=function(){this.setAlpha(80)};d.prototype.mouseLeave=function(){this.setAlpha(100)};d.prototype.mouseDown=function(){this.setAlpha(60)};d.prototype.mouseUp=function(){this.setAlpha(80)};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 f=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;c()?(b.bind("touchstart",this.mouseOver.bind(this)),b.bind("touchend",this.mouseLeave.bind(this))):(b.bind("mouseenter",this.mouseOver.bind(this)),b.bind("mousedown",this.mouseDown.bind(this)),b.bind("mouseup",this.mouseUp.bind(this)),b.bind("mouseleave",this.mouseLeave.bind(this)),b.bind("blur",this.mouseLeave.bind(this)))};f.prototype.mouseOver=function(){this.eventSource.src=this.pictureDown};f.prototype.mouseDown=function(){b(this.eventSource).css("opacity",
0.8)};f.prototype.mouseUp=function(){b(this.eventSource).css("opacity",1)};f.prototype.mouseLeave=function(){this.eventSource.src=this.origPicture};b.fn.asImageButton=function(){new f(this);return this};var g=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;c()?(b.bind("touchstart",this.mouseOver.bind(this)),b.bind("touchend",this.mouseUp.bind(this))):(b.bind("mouseenter",
this.mouseOver.bind(this)),b.bind("mousedown",this.mouseDown.bind(this)),b.bind("mouseup",this.mouseUp.bind(this)),b.bind("mouseleave",this.mouseUp.bind(this)))};bdor[10]="l";g.prototype.mouseOver=function(){this.eventSource.src=this.pictureDown};g.prototype.mouseDown=function(){this.eventSource.src=this.pictureDown};g.prototype.mouseUp=function(){var b=this;window.setTimeout(function(){b.eventSource.src=b.origPicture},100)};b.fn.asImageChangeButton=function(){new g(this);return this};var h=function(b){this.theButton=
b;this.eventSource=b[0];var c=this.theButton.css("top");this.iOrigTop=parseInt(c.replace("px",""));this.iJumpTop=this.iOrigTop-5;b.bind("mouseenter",this.MouseEnter.bind(this));b.bind("mouseleave",this.MouseLeave.bind(this))};h.prototype.MouseEnter=function(){this.theButton.animate({top:this.iJumpTop},50)};h.prototype.MouseLeave=function(){this.theButton.animate({top:this.iOrigTop},50)};b.fn.mouseEnterJump=function(){new h(this);return this};b.fn.mouseOverCursor=function(){new k(this);return this};
var k=function(b){b.bind("mouseover",function(){b.css({cursor:"pointer"})})},l=function(b){this.theButton=b;this.eventSource=b[0];var c=this.theButton.css("top");this.iOrigTop=parseInt(c.replace("px",""));c=this.theButton.css("left");this.iOrigLeft=parseInt(c.replace("px",""));this.iZoomTop=this.iOrigTop-3;this.iZoomLeft=this.iOrigLeft-1;b.bind("mouseenter",this.MouseEnter.bind(this));b.bind("mouseleave",this.MouseLeave.bind(this))};l.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)"})};l.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)"})};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)"})};var m=function(b){this.theButton=b;this.eventSource=b[0];var c=this.theButton.css("top");this.iOrigTop=parseInt(c.replace("px",""));c=this.theButton.css("left");this.iOrigLeft=parseInt(c.replace("px",""));this.iZoomTop=this.iOrigTop-1;this.iZoomLeft=this.iOrigLeft-1;b.bind("mouseenter",this.MouseEnter.bind(this));b.bind("mouseleave",this.MouseLeave.bind(this))};
m.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)"})};m.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 m(this);return this};b.fn.mouseEnterUp=function(){new n(this);return this};var n=function(b){this.theButton=b;this.eventSource=b[0];var c=this.theButton.css("bottom");this.iOrigTop=parseInt(c.replace("px",""));c=this.theButton.css("left");this.iOrigLeft=parseInt(c.replace("px",""));this.iZoomTop=this.iOrigTop-1;this.iZoomLeft=this.iOrigLeft-1;b.bind("mouseenter",this.MouseEnter.bind(this));b.bind("mouseleave",this.MouseLeave.bind(this))};n.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)"})};n.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 l(this);return this};b.fn.mouseEnterLight=function(b){b||(b="#EEEEEE");var d=this;this.bind(_event._enter,
function(){d.css({background:b})});this.bind(_event._down,function(){d.css({background:b})});c()?this.bind(_event._end,function(){d.css({background:"transparent"})}):this.bind(_event._end,function(){d.css({background:b})});this.bind(_event._leave,function(){d.css({background:"transparent"})});return this};b.fn.mouseEnterShine=function(b,d,f){var g=this,h=colorDiv(b,10);this.bind(_event._enter,function(){g.css({background:h});g.css({border:""});g.css({"border-left":"1px solid "+f,"border-top":"1px solid "+
f});g.css({"border-right":"1px solid "+d,"border-bottom":"1px solid "+d})});this.bind(_event._down,function(){g.css({background:h});g.css({border:""});g.css({"border-left":"1px solid "+d,"border-top":"1px solid "+d});g.css({"border-right":"1px solid "+f,"border-bottom":"1px solid "+f})});c()?this.bind(_event._end,function(){g.css({background:"transparent"});g.css({border:""})}):this.bind(_event._end,function(){g.css({background:h});g.css({border:""});g.css({"border-left":"1px solid "+f,"border-top":"1px solid "+
f});g.css({"border-right":"1px solid "+d,"border-bottom":"1px solid "+d})});this.bind(_event._leave,function(){g.css({background:"transparent"});g.css({border:""})});return this};b.fn.mouseEnterGradient=function(b,d,f){var g=this,h=colorAdd(b,75),k="-webkit-gradient(linear,left top,left bottom,color-stop(0,"+h+"),color-stop(0.19,"+colorAdd(h,2)+"),color-stop(0.35,"+colorAdd(h,28)+"),color-stop(0.55, "+colorAdd(h,6)+"),color-stop(0.75,"+colorAdd(h,4)+"),color-stop(0.85,"+colorAdd(h,2)+"),color-stop(1, "+
h+"))";this.bind(_event._enter,function(){g.css("background",k);g.css({border:""});g.css({"border-left":"1px solid "+f,"border-top":"1px solid "+f});g.css({"border-right":"1px solid "+d,"border-bottom":"1px solid "+d})});this.bind(_event._down,function(){g.setGradient(h,!1);g.css({border:""});g.css({"border-left":"1px solid "+d,"border-top":"1px solid "+d});g.css({"border-right":"1px solid "+f,"border-bottom":"1px solid "+f})});c()?this.bind(_event._end,function(){g.css({background:"transparent"});
g.css({border:""})}):this.bind(_event._end,function(){g.css("background",k);g[0].style.removeAttribute&&g[0].style.removeAttribute("filter");g.css({border:""});g.css({"border-left":"1px solid "+f,"border-top":"1px solid "+f});g.css({"border-right":"1px solid "+d,"border-bottom":"1px solid "+d})});this.bind(_event._leave,function(){g[0].style.removeAttribute&&g[0].style.removeAttribute("filter");g.css({background:"transparent"});g.css({border:""})});return this};b.fn.dragToMove=function(c,d,f){var g=
!1,h=0,k=0,l=0,m=0;b(this).bind(_event._down,function(d){var f=b(this)[0];f.setCapture?f.setCapture():window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);d=isTouch?d.originalEvent.changedTouches:[d];g=!0;h=d[0].pageX;k=d[0].pageY;l=b(c).offset().left;m=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);g=!1});b(this).bind(_event._move,function(n){n=isTouch?n.originalEvent.touches:[n];if(g){var w=
l+(n[0].pageX-h);n=m+(n[0].pageY-k);void 0!=d&&(w=Math.max(d.x,w),w=Math.min(d.y,w));void 0!=f&&(n=Math.max(f.x,n),n=Math.min(f.y,n));b(c).css({left:w+"px",top:n+"px"})}});b(this).bind("mouseleave",function(){return g=!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,f){var g=this;this.bind(_event._enter,function(){var h=b("<img src='"+f+"'>");g.empty().append(h);g.css({background:d});g.changeButtonColor(c)});this.bind(_event._end,function(){var c=b("<img src='"+f+"'>");g.empty().append(c);
g.css({background:"transparent"});g.changeButtonColor(d)});this.bind(_event._leave,function(){var c=b("<img src='"+f+"'>");g.empty().append(c);g.css({background:"transparent"});g.changeButtonColor(d)});return this};b.fn.clickExceptMove=function(b){var c=!1,d=!1,f=new Point(0,0);this.bind(_event._down,function(b){b=isTouch?b.originalEvent.touches:[b];c=!0;d=!1;f.x=b[0].pageX;f.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-
f.x)&&1>=Math.abs(b[0].pageY-f.y)?!1:!0});this.bind(_event._end,function(f){c&&!d&&b();d=c=!1})};b.fn.enterToChange=function(b,c,d,f,g){var h=this.children();this.bind(_event._down,function(k){h.cssSprite(b,c+"_down",d,f,g)});this.bind(_event._enter,function(k){h.cssSprite(b,c+"_down",d,f,g)});this.bind(_event._leave,function(k){h.cssSprite(b,c,d,f,g)})};b.fn.addCssSprite=function(c,d,f,g,h){var k=b("<div></div>");k.cssSprite(c,d,f,g,h);this.append(k)};b.fn.changeCssSprite=function(b,c,d,f,g){this.children().cssSprite(b,
c,d,f,g)};b.fn.cssSprite=function(b,c,d,f,g){if(g.iconInfo){for(var h=0,k=0;k<g.iconInfo.length;k++)if(g.iconInfo[k].id==c){h=k;break}c=g.iconInfo[h].position;var k="",k=g.width,l=g.height,m=0,w=0,m=d*k/g.iconInfo[h].width,w=f*l/g.iconInfo[h].height;c=-c.x*m/k+"px "+-c.y*w/l+"px";k=m+"px "+w+"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=[];
jQuery.fn.drag=function(){this.create=function(){this.initEvent()}.bind(this);this.initEvent=function(){var b=new Hammer.Manager(this[0]);b.add(new Hammer.Pan);b.add((new Hammer.Swipe).recognizeWith(b.get("pan")));b.on("panstart panmove panend pancancel",this.onPan.bind(this))}.bind(this);this.onPan=function(b){b&&b.pointers&&1==b.pointers.length&&(this.animateInterval&&this.animateInterval.stop(),"panstart"==b.type&&(this.onPanStart=!0,$(this).css({cursor:"move"}),this.startX=this.getLeft(),this.startY=
this.getTop()),this.onPanStart&&(this.moveTo(this.startX+b.deltaX,this.startY+b.deltaY),"panend"==b.type||"pancancel"==b.type))&&(this.restrictInBoundary(),$(this).css({cursor:"default"}),this.onPanStart=!1)}.bind(this);this.getLeft=function(){return parseInt($(this).css("left"))}.bind(this);this.getTop=function(){return parseInt($(this).css("top"))}.bind(this);this.moveTo=function(b,c){var d=this.offset(),f=this.getLeft(),g=this.getTop();d.left-f+b+this.width()>windowWidth&&(b=windowWidth-d.left+
f-this.width());d.top-g+c+this.height()>windowHeight&&(c=windowHeight-d.top+g-this.height());0>d.left-f+b&&(b=f-d.left);0>d.top-g+c&&(c=g-d.top);$(this).css({left:b+"px",top:c+"px"})}.bind(this);this.restrictInBoundary=function(){}.bind(this);this.create()};
jQuery.fn.scroll=function(b,c){this.create=function(b,c){this.swiper=this.find(".swiper");this.items=this.find(".item");this.progress=this.find(".progress");this.progressBar=this.find(".progressBar");this.EVENT_CANCEL=!1;this.direction=c;this.swiper.css(c,0);this.progress.css(c,0);this.progressBar.css(c,0);this.refreshData();this.initEvent();this.initProgressEvent()}.bind(this);this.refreshData=function(){this.stageWidth=$(this).width();this.stageHeight=$(this).height();"top"==c||"bottom"==c?(this.totalLength=
this.swiper.height(),this.stageLength=this.stageHeight,this.progress.css({height:this.stageLength+"px"}),this.progressBar.css({height:Math.pow(this.stageLength,2)/this.totalLength+"px"})):(this.totalLength=this.swiper.width(),this.stageLength=this.stageWidth,this.progress.css({width:this.stageLength+"px"}),this.progressBar.css({width:Math.pow(this.stageLength,2)/this.totalLength+"px"}));this.refreshSwiper();this.totalLength<=this.stageLength?(this.progress.hide(),this.EVENT_CANCEL=!0):(this.progress.show(),
this.EVENT_CANCEL=!1)}.bind(this);this.refreshSwiper=function(){var b=this.getCurrentLength(),b=Math.max(this.stageLength-this.totalLength,b),b=Math.min(0,b);this.moveTo(b)}.bind(this);this.initEvent=function(){$(this).bind("mousedown touchstart",this.onDown);var b=new Hammer.Manager(this.swiper[0]);b.add(new Hammer.Pan);b.add((new Hammer.Swipe).recognizeWith(b.get("pan")));b.on("panstart panmove panend pancancel",this.onPan);b.on("swipe",this.onSwipe);this.bind("mousewheel",this.onMouseWheel);this.bind("pointerdown",
function(b){b.stopPropagation()})}.bind(this);this.initProgressEvent=function(){var b=new Hammer.Manager(this.progressBar[0]);b.add(new Hammer.Pan);b.add((new Hammer.Swipe).recognizeWith(b.get("pan")));b.on("panstart panmove panend pancancel",this.onProgressPan.bind(this));b.on("swipe",this.onProgressSwipe.bind(this));b=new Hammer.Manager(this.progress[0]);b.add(new Hammer.Tap);b.on("tap",this.onProgressTap.bind(this))}.bind(this);this.onDown=function(b){this.EVENT_CANCEL||b.stopPropagation()}.bind(this);
this.onPan=function(b){if(!this.EVENT_CANCEL&&b&&b.pointers&&1==b.pointers.length){this.animateInterval&&this.animateInterval.stop();"panstart"==b.type&&(this.startLength=this.getCurrentLength());var c=0;switch(this.direction){case "left":c=b.deltaX;break;case "right":c=-b.deltaX;break;case "top":c=b.deltaY;break;case "bottom":c=-b.deltaY}this.moveTo(this.startLength+c);"panend"!=b.type&&"pancancel"!=b.type||this.restrictInBoundary()}}.bind(this);this.onSwipe=function(b){if(!this.EVENT_CANCEL){this.animateInterval&&
this.animateInterval.stop();var c=0;switch(this.direction){case "left":c=b.velocityX;break;case "right":c=-b.velocityX;break;case "top":c=b.velocityY;break;case "bottom":c=-b.velocityY}this.startLength=this.getCurrentLength();this.animateToPosition(this.startLength+20*c)}}.bind(this);this.onProgressPan=function(b){this.EVENT_CANCEL||(b.deltaX=-b.deltaX*this.totalLength/this.stageLength,b.deltaY=-b.deltaY*this.totalLength/this.stageLength,this.onPan(b))}.bind(this);this.onProgressSwipe=function(b){this.EVENT_CANCEL||
(b.velocityX=-b.velocityX*this.totalLength/this.stageLength,b.velocityY=-b.velocityY*this.totalLength/this.stageLength,this.onSwipe(b))}.bind(this);this.onProgressTap=function(b){if(!this.EVENT_CANCEL&&b&&b.pointers&&1==b.pointers.length){var c=this.progress.offset(),g=0;switch(this.direction){case "left":g=-(b.pointers[0].pageX-c.left)*this.totalLength/this.stageLength;break;case "right":g=-(this.stageLength-b.pointers[0].pageX+c.left)*this.totalLength/this.stageLength;break;case "top":g=-(b.pointers[0].pageY-
c.top)*this.totalLength/this.stageLength;break;case "bottom":g=-(this.stageLength-b.pointers[0].pageY+c.top)*this.totalLength/this.stageLength}this.animateToPosition(g)}}.bind(this);this.onMouseWheel=function(b){if(!this.EVENT_CANCEL){b=b.originalEvent;var c=Math.max(-1,Math.min(1,b.wheelDelta||-b.detail));if(!this.animateInterval||this.animateInterval.stopFlag)c=this.getCurrentLength()+(0>c?-15:15),c=this.getEffectiveLength(c),this.moveTo(c),b.stopPropagation()}}.bind(this);this.getLeft=function(){return parseInt(this.swiper.css("left"))}.bind(this);
this.getRight=function(){return parseInt(this.swiper.css("right"))}.bind(this);this.getBottom=function(){return parseInt(this.swiper.css("bottom"))}.bind(this);this.getTop=function(){return parseInt(this.swiper.css("top"))}.bind(this);this.animateToPosition=function(b){var c=this.getCurrentLength();b=this.getEffectiveLength(b);var g=function(g,k,l){l=(0,$.easing["easeOut"+l])(null,g,c,b-c,k);g<k?this.moveTo(l):(this.moveTo(l),this.animateInterval.stop())}.bind(this);this.animateInterval=function(b,
c){g(b,c,"Sine")}.animation(this,300)}.bind(this);this.animateToCenterItem=function(){var b=this.getCurrentItem();if(b[0]){var c=b.offset(),g=0,h=c.left-this.swiper.offset().left,c=c.top-this.swiper.offset().top;switch(this.direction){case "left":g=-(h+b.width()/2)+this.stageLength/2;break;case "top":g=-(c+b.height()/2)+this.stageLength/2;break;case "bottom":g=c-this.totalLength+b.height()/2+this.stageLength/2;break;case "right":g=h-this.totalLength+b.width()/2+this.stageLength/2}this.animateToPosition(g)}}.bind(this);
this.getCurrentItem=function(){var b=this.swiper.find(".focus.highlight");b[0]||(b=this.swiper.find(".highlight"));return b}.bind(this);this.moveTo=function(b){var c=this.direction;this.swiper.css(c,b+"px");this.progressBar.css(c,-b*this.stageLength/this.totalLength+"px")}.bind(this);this.getCurrentLength=function(){switch(this.direction){case "left":return this.getLeft();case "top":return this.getTop();case "bottom":return this.getBottom();case "right":return this.getRight()}}.bind(this);this.restrictInBoundary=
function(){this.animateInterval&&this.animateInterval.stop();var b=this.getCurrentLength(),c=this.getEffectiveLength(b);b!=c&&this.animateToPosition(c)}.bind(this);this.getEffectiveLength=function(b){return b?b=Number.between(b,-this.totalLength+this.stageLength,0):0}.bind(this);this.move=function(b){var c=this.getCurrentLength();this.animateToPosition(c+b)}.bind(this);this.create(b,c)};
jQuery.fn.appearance=function(b,c){this.background=$("<div class='appear_win10'></div>");this.addClass("main_dom");this.background.append(this);this.show=function(){this.background.show();this.background.animate({opacity:1},function(){$(this).show();b&&b()})}.bind(this);this.hide=function(){this.background.animate({opacity:0},function(){$(this).hide();c&&c()})}.bind(this);this.getDom=function(){return this.background}.bind(this);this.background.click(function(b){b.target==b.currentTarget&&this.hide()}.bind(this));
return this.background};jQuery.fn.onTap=function(b){if(isPhone()||isPad())this.click(b);else{var c=new Hammer.Manager(this[0]);c.add(new Hammer.Tap({event:"tap",taps:1,threshold:5,time:400}));c.on("tap",b)}};jQuery.fn.onDoubleTap=function(b){var c=new Hammer.Manager(this[0]);c.add(new Hammer.Tap({event:"doubletap",taps:2}));c.on("doubletap",b)};var flipping=!1;
(function(b){bdor[5]="i";var c=function(c,f,g,h,k){if(void 0!=c&&null!=c){0>=h.length&&(k=b.extend({background:"green",cornersTop:!0,scale:"noresize"},k));c.prev();var l=0,m=!1,n=k.background,p=k.cornersTop,q=k.gradientColors||["#ddd","#eee","#fff"],t=k.scale,r=0,s=[],v,u,x;try{v=c.clone(),u=v[0].getContext("2d"),x=c[0].getContext("2d"),r=0}catch(y){x=u=v=null}h=h.each(function(c){if(!s[c]&&null!=x){var d=this;d.onload=function(){var k=1;if("noresize"!=t){var l=0==this.width?this.naturalWidth:this.width,
w=0==this.height?this.naturalHeight:this.height,n=f/l,z=g/w;"fit"==t&&(k=1>n||1>z?Math.min(n,z):1);"fill"==t&&(k=Math.min(n,z))}b(d).data("flip.scale",k);s[c]=x.createPattern(d,"no-repeat");s[c].width=l;s[c].height=w;r++;r!=h.length||m||(m=!0,J())};d.complete&&window.setTimeout(function(){d.onload()},10)}}).get();var w=f,z=g,B=b.browser.msie?c.offset():null,F,D,L,A;b.browser.msie&&function(){var h=b("<div>").width(f).height(g).css({position:"absolute",cursor:"default",zIndex:1}).appendTo(tmpContainer);
7==parseInt(b.browser.version)&&h.css({opacity:1E-6,background:"#FFF"});var k=function(){B=c.offset();return h.css({left:B.left+"px",top:B.top+"px"})};b(window).resize(k);return k()}();setInterval(function(){window.clearInterval(F);D=(new Date).getTime();L=w;A=z/50;F=window.setInterval(S,0);l+=1;0>l&&(l=h.length-1);l==h.length&&(l=0)},3E3);var S=function(){var b=(new Date).getTime()-D;700<=b?(window.clearInterval(F),h.push(h.shift()),s.push(s.shift()),w=f,z=g):(w=L-2*f*b/700,z=A+2*g*b/700/3);J()},
E=function(c,d){if(null!=x){var h=c*f+d,k=-d/c;b.browser.msie&&(h=Math.round(h),k=Math.round(k));x.beginPath();x.moveTo(f,Math.min(h,g));x.lineTo(f,0);x.lineTo(Math.max(k,0),0);0>k?(x.lineTo(0,Math.min(d,g)),d<g&&x.lineTo((g-d)/c,g),x.lineTo(f,g)):h<g?x.lineTo(f,h):(x.lineTo((g-d)/c,g),x.lineTo(f,g))}},J=function(){if(m&&null!=x&&null!=u){b.browser.msie&&x.clearRect(0,0,f,g);x.fillStyle=n;x.fillRect(0,0,f,g);var c=h[0],d=b(c).data("flip.scale");if(b.browser.msie)try{x.drawImage(c,0,0,c.width,c.height,
0,0,f,g)}catch(k){x.fillStyle=s[0],x.fillStyle.width2=x.fillStyle.width*d,x.fillStyle.height2=x.fillStyle.height*d,x.fillRect(0,0,f,g)}else x.drawImage(c,(f-c.width*d)/2,(g-c.height*d)/2,c.width*d,c.height*d);if(z&&w!=f&&(c=(z-2*(w+f))/2,m2=z/(f-w),q2=w*m2,2!=m2)){var l=1,r=0;x.save();p||(r=g,l=-1);x.translate(0,r);x.scale(1,l);var B=(q2-c)/(2-m2),D=2*B+c,F=(2*D+B+4*w-2*z)/5,t=-F/2+D+B/2,d=Math.sqrt(Math.pow(B-F,2)+Math.pow(D-t,2)),L=Math.min(0.5*d,30),A;b.browser.mozilla&&1.9>parseFloat(b.browser.version)?
(A=u,A.clearRect(0,0,f,g),A.save(),A.translate(1,0)):A=x;B=A.createLinearGradient(B,D,F,t);B.addColorStop(0,q[0]);B.addColorStop(L/d,q[1]);B.addColorStop(1,q[2]);A.fillStyle=B;A.beginPath();A.moveTo(-c/2,0);A.quadraticCurveTo((-c/2+w)/2+0.02*w,z/2,w,z);A.quadraticCurveTo((f+w)/2,(2*f+c+z)/2-0.02*(g-z),f,2*f+c);b.browser.mozilla&&1.9>parseFloat(b.browser.version)?(A.save(),A.clip(),A.fillRect(0,0,f,g),A.restore(),x.drawImage(v[0],0,0),A.restore()):A.fill();x.fillStyle=n;E(2,c);x.fill();E(2,c);b.browser.safari||
b.browser.opera||x.restore();h[1]||(h[1]=h[0]);c=h[1];d=b(c).data("flip.scale");if(b.browser.msie)x.fillStyle=s[1],x.fillStyle.width2=x.fillStyle.width*d,x.fillStyle.height2=x.fillStyle.height*d,x.fill();else{x.save();x.clip();if(b.browser.safari||b.browser.opera)x.scale(1,1/l),x.translate(-0,-r);x.drawImage(c,(f-c.width*d)/2,(g-c.height*d)/2,c.width*d,c.height*d);x.restore();(b.browser.safari||b.browser.opera)&&x.restore()}}}}}};b.fn.jFlip=function(d,f,g,h,k){return this.each(function(){b(this).wrap("<div class='bannerdiv' style='position: absolute;width:"+
d+"px;height:"+f+"px;top:"+k+"px;left:"+h+"px'>");var l=b(this).find("img"),m=b(document.createElement("canvas")).attr({width:d,height:f}).css({margin:0,width:d+"px",height:f+"px"});b(this).css({position:"absolute",left:"-9000px",top:"-9000px",display:"none"}).after(m);new c(b(this).next(),d||300,f||300,l,g)})}})(jQuery);
function searchFromPages(b,c){var d=[];c=c.trim().toLowerCase();for(var f=null,f=-1==c.indexOf(" ")?[c]:c.split(" "),g=0,g=0;g<b.length;g++){var h=b[g].trim().toLowerCase(),k=h,l=-1,m=-1,n=-1,p=0,q=!0,t;for(t=0;t<f.length;t++)if(f[t]){var k=new KMP(k,f[t]),r=f[t].length;if(k.match()){var s=p+k.getIndex();if(s>n)n=s,p=s+f[t].length,k=h.substring(p),0==t&&(l=s),t==f.length-1&&(m=s+r);else{q=!1;break}}else{q=!1;break}}q&&(n=[],n.search_page=g+1,n.search_title="page "+(g+1),l=h.substring(0,l).lastIndexOf("."),
-1==l?l=0:l++,p=h.substring(m),q=p.indexOf(".")+1,q=-1==q?p.length():m+q,h=h.substring(l,q),n.search_text=h,d.push(n))}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 f=this.__next[c];-1!=f&&this.__pattern.charAt(f)==this.__pattern.charAt(c);)f=this.__next[f];c=f;-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,f=Math.min(c,d),g=this.split("");b=b.split("");var h=0,k=0;if(h==k)for(k=h,f+=h;k<f;){var l=g[k],m=b[k];if(l!=m)return l-m;k++}else for(;0!=f--;)if(l=g[h++],m=b[k++],l!=m)return l-m;return c-d};
$.fn.setGradient=function(b,c){var d=colorAdd(b,15),f=colorDiv(b,15);void 0==c&&(c=!1);var g="",h="0";c&&(g="left,",h="1");this.css({background:"linear-gradient("+g+d+", "+f+")"});switch(browserType){case 1:this.css({background:"-webkit-linear-gradient("+g+d+", "+f+")"});break;case 2:this.css({background:"-moz-linear-gradient("+g+d+", "+f+")"});break;case 3:this.css({background:"-ms-linear-gradient("+g+d+", "+f+")"});this.css("filter","progid:DXImageTransform.Microsoft.Gradient(GradientType="+h+", EndColorStr="+
f+", StartColorStr="+d+")");break;case 4:this.css({background:"-o-linear-gradient("+g+d+", "+f+")"})}};
$.fn.setGradientByDir=function(b,c,d){void 0==d&&(d=!1);var f="",g="0";d&&(f="left,",g="1");this.css({background:"linear-gradient("+f+b+", "+c+")"});switch(browserType){case 1:this.css({background:"-webkit-linear-gradient("+f+b+", "+c+")"});break;case 2:this.css({background:"-moz-linear-gradient("+f+b+", "+c+")"});break;case 3:this.css({background:"-ms-linear-gradient("+f+b+", "+c+")"});this.css("filter","progid:DXImageTransform.Microsoft.Gradient(GradientType="+g+", EndColorStr="+c+", StartColorStr="+
b+")");break;case 4:this.css({background:"-o-linear-gradient("+f+b+", "+c+")"})}};$.fn.addBorderShadow=function(b,c,d){var f=c+"px",g=d+"px";c=2*(Math.abs(c)+Math.abs(d))+"px";this.css({"-moz-box-shadow":f+" "+g+" "+c+" "+b,"box-shadow":f+" "+g+" "+c+" "+b,"-webkit-box-shadow":f+" "+g+" "+c+" "+b,"-o-box-shadow":f+" "+g+" "+c+" "+b,"-ms-box-shadow":f+" "+g+" "+c+" "+b})};
var 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 f=this;if("none"!=this.css("display")){var g=this;0<this.children().length&&(g=this.find("img:first"));if(window.ActiveXObject){if("complete"!=g[0].readyState){$(g).load(function(){try{f.changeButtonColor(b,c,d)}catch(g){}});return}}else if(!g[0].complete){$(g).load(function(){try{f.changeButtonColor(b,c,d)}catch(g){}});return}if(void 0!=g[0]){var h,k;try{h=$("<canvas></canvas>")[0],k=h.getContext("2d")}catch(l){return}var m=g.width(),n=g.height(),g=g[0];
void 0==c&&(c=!1);var p=getHost(g.src),q=getHost();if(p&&q!==p)h=g.src.replace(p,q),g.src=h,!1==c&&$(g).load(function(){try{f.changeButtonColor(b,!0,d)}catch(c){}});else{h.width=m;h.height=n;try{k.drawImage(g,0,0,g.naturalWidth,g.naturalHeight,0,0,m,n);var t=k.getImageData(0,0,m,n),r=k.getImageData(0,0,m,n);if(!0!=g.colorChanged&&t){for(var s=Color(b).split(),m=0,v=t.data.length;m<v;m+=4)0<r.data[m+3]&&(t.data[m]!=s.r&&(r.data[m]=t.data[m]/255*s.r),t.data[m+1]!=s.g&&(r.data[m+1]=t.data[m+1]/255*s.g),
t.data[m+2]!=s.b&&(r.data[m+2]=t.data[m+2]/255*s.b));k.putImageData(r,0,0);g.src=h.toDataURL("image/png");void 0!=d&&d(f);g.colorChanged=!0}}catch(u){!1==c&&$(g).load(function(){try{f.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){function c(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=new Date;-1!=p&&window.clearInterval(p);p=window.setInterval(function(){g=k;h=l;m=new Date},300)}function d(b){if(-1==p||!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==p)return!0;c=void 0!=c.originalEvent.touches==!1?[c]:c.originalEvent.touches;if(!0==q)return q=1<c.length,
!0;n=new Date;c=(n-m)/20;var d=k-g,f=l-h;0==c?iSpeedY=iSpeedX=0:(iSpeedX=d/c,iSpeedY=f/c);void 0!=b&&b(iSpeedX,iSpeedY);window.clearInterval(p);p=-1}var g,h,k,l,m,n,p=-1,q=!1;try{this.bind("mousedown",c),this.bind("mousemove",d),this.bind("mouseup",f),this.bind("mouseleave",f)}catch(t){}try{this.bind("touchstart",c),this.bind("touchmove",d),this.bind("touchend",f),this.bind("touchleave",f)}catch(r){}};
var MutexMedias=function(){for(var b=function(){if(window.mutexMedias&&0<window.mutexMedias.length)for(var b=0;b<window.mutexMedias.length;b++)window.mutexMedias[b]&&window.mutexMedias[b]!=this&&!window.mutexMedias[b].paused&&window.mutexMedias[b].pause()},c=function(){if(isPlaying&&this!=$("#BGSound")[0]){for(var b=!0,c=0;c<window.mutexMedias.length;c++)window.mutexMedias[c]&&!window.mutexMedias[c].paused&&(b=!1);b&&global.bgSound.play()}},d=$("audio"),f=$("video"),g=[],h=0;h<d.length;h++){var k=
d[h];g.push(k);!k||k==$("#flipSound")[0]||0<=window.mutexMedias.indexOf(k)||($(k)[0].paused||b.bind($(k))(),$(k).bind("play",function(){b.bind(this)()}),$(k).bind("pause",function(){c.bind(this)()}),window.mutexMedias.push(k))}for(h=0;h<f.length;h++)d=f[h],g.push(d),!d||0<=window.mutexMedias.indexOf(d)||($(d).bind("play",function(){b.bind(this)()}),$(d).bind("pause",function(){c.bind(this)()}),window.mutexMedias.push(d));for(h=0;h<window.mutexMedias.length;h++)0>g.indexOf(window.mutexMedias[h])&&
window.mutexMedias.remove(h),isPlaying&&window.mutexMedias[h]!=$("#BGSound")[0]&&!window.mutexMedias[h].paused&&$("#BGSound")[0].pause()};window.mutexMedias=[];window.setInterval(MutexMedias,1E3);
(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,f=c.length;d<f;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 readAsFullscreen(){isPhone()||isPad()?window.top!=window&&window.open(window.location.href):fullScreenApi&&fullScreenApi.supportsFullScreen?($(document).unbind(fullScreenApi.fullScreenEventName,onFullscreenEvent),$(document).bind(fullScreenApi.fullScreenEventName,onFullscreenEvent),fullscreenFun()):window.top!=window?window.open(window.location.href):alert("Press F11 to View FlipBook in Full Screen")}
function onFullscreenEvent(){StateSynchronous.instance().findButtons("FullscreenButton").each(function(b){fullScreenApi.isFullScreen()?b.setAsExitFullScreen():b.setAsFullScreen();b.executeCallback()});(function(){if(global.toolBar&&global.toolBar.onResize)toolBar.onResize()}).delay(100)}
function fullscreenFun(){var b=$("body")[0];fullScreenApi.supportsFullScreen&&(fullScreenApi.isFullScreen()?fullScreenApi.cancelFullScreen():fullScreenApi.requestFullScreen(b));b.webkitSupportsFullscreen&&b.webkitEnterFullscreen(Element.ALLOW_KEYBOARD_INPUT)}
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="",f=0;f<c.length;f++)d+=c.charCodeAt(f).toString();var g=Math.floor(d.length/5),g=parseInt(d.charAt(g)+d.charAt(2*g)+d.charAt(3*g)+d.charAt(4*g)+d.charAt(5*
g),10),h=Math.round(c.length/2),k=Math.pow(2,31)-1,f=parseInt(b.substring(b.length-8,b.length),16);b=b.substring(0,b.length-8);for(d+=f;10<d.length;)d=(parseInt(d.substring(0,10),10)+parseInt(d.substring(10,d.length),10)).toString();for(var d=(g*d+h)%k,l="",m="",f=0;f<b.length;f+=2)l=parseInt(parseInt(b.substring(f,f+2),16)^Math.floor(d/k*255),10),m+=String.fromCharCode(l),d=(g*d+h)%k;return unescape(m)}}
function loadJavascript(b,c,d){var f=this,g=document.createElement("script");g.type="text/javascript";g.async=!0;g.onload=g.onreadystatechange=function(){f.readyState&&"loaded"!=f.readyState&&"complete"!=f.readyState||(g.onload=g.onreadystatechange=null,void 0!=c&&c(g))};g.onerror=function(){void 0!=d&&d(g)};$("body")[0].appendChild(g);g.src=b;return g}
var HTMLString={riseAWord:function(b,c,d){var f=null,f=-1==c.indexOf(" ")?[c]:c.trim().split(" ");c=b;for(var g=0;g<f.length;g++)0>b.indexOf(f[g])||(c=c.replaceAll(f[g],"<span style='color:"+d+";'>"+f[g]+"</span></font>"));return c},isHTML:function(b){return b?!!b.match(/^(<\w+>?).*((<\/\w+>)|(\/>))$/g):!1},toText:function(b){return b.replace(/<\/?\w+>/g,"")},toLabel:function(b){b=b.replaceAll("<","&lt;");return b.replaceAll(">","&gt;")}},LanguageTool={isEnglish:function(b){return/[\x00-\xff]/.test(b)},
isChinese:function(b){return/[\u4E00-\u9FBF]/.test(b)},isArabic:function(b){return/[\u0600-\u06FF]|[\u0750-\u077F]/.test(b)},isUrdu:function(b){return this.isArabic(b)||/[\uFE70-\uFEFF]/.test(b)},isHebrew:function(b){return/[\u0590-\u05FF]|[\uFB00-\uFB4F]/.test(b)},isFarsi:function(b){return this.isUrdu(b)||/[\u0400-\u04FF]|[\u0500-\u052F]/.test(b)},isTai:function(b){return/[\u0E00-\u0E7F]/.test(b)},isHindi:function(b){return/[\u0900-\u097F]/.test(b)},isTamil:function(b){return/[\u0B80-\u0BFF]/.test(b)},
isHimalayaRahm:function(b){return/[\u0D00-\u0D7F]/.test(b)},isRightToLeft:function(b){return this.isArabic(b)||this.isUrdu(b)||this.isHebrew(b)||this.isFarsi(b)||this.isTai(b)||this.isHindi(b)||this.isHimalayaRahm(b)}},Directory={getFileName:function(b){b=b.replaceAll("\\","/",!0);if(""==Directory.getFileSuffix(b))return"index.html";var c=b.lastIndexOf("/");return-1==c?b:b.substr(c+1)},getFilePath:function(b){b=b.replaceAll("\\","/",!0);var c=b.lastIndexOf("/");return-1==c?"":b.substr(0,c+1)},getFileSuffix:function(b){b=
b.replaceAll("\\","/",!0);var c=b.lastIndexOf(".");return-1==c?"":b.substr(c)},getFolderName:function(b){b=Directory.getFilePath(b);if(""==b)return"";b=Directory.removeSlash(b);var c=b.lastIndexOf("/");return-1==c?b:b.substr(c+1)},addSlash:function(b){b=b.replaceAll("\\","/",!0);return b.endsWith("/")?b:b+"/"},removeSlash:function(b){b=b.replaceAll("\\","/",!0);return b.endsWith("/")?b.substring(0,b.length-1):b},getUpperFilePath:function(b){b=b.replaceAll("\\","/",!0);var c=b.split("/"),d=c.length;
return b=b.endsWith(".html")||b.endsWith("/")?b.remove(c[d-2]+"/"+c[d-1]):b.remove(c[d-1])}};function animateOnce(b,c,d,f,g,h){if(b&&c)if(void 0==d||0===d||isIE9())b.css(c),f&&f instanceof Function&&f();else{var k=!1;setAnimation(b,d,g,h);b.one("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){!0!=k&&(k=!0,setAnimation(b,0),f&&f instanceof Function&&f())});b.css(c)}}
function setAnimation(b,c,d,f){if(b&&void 0!=c){100>c&&(c*=1E3);if(void 0==d||""==d)d="all";void 0==f&&(f="ease-in-out");f=d+" %dms "+f;0<c?"all"!=d?b.css({"-moz-transition":String.format(f,"-moz-",c),"-webkit-transition":String.format(f,"-webkit-",c),"-o-transition":String.format(f,"-o-",c),"-ms-transition":String.format(f,"-ms-",c),transition:String.format(f,"",c)}):b.css({"-moz-transition":String.format(f,c),"-webkit-transition":String.format(f,c),"-o-transition":String.format(f,c),"-ms-transition":String.format(f,
c),transition:String.format(f,c)}):b.css({"-moz-transition":"","-webkit-transition":"","-o-transition":"","-ms-transition":"",transition:""})}}
var 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){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)}}}),divHint=Class({create:function(b,c,d,f){this.instance=$("<div class='hint'></div>");this.setText(b);void 0==f&&(f=$("body"));f.append(this.instance);this.instance.css({display:"none",opacity:0});this.moveto(c,d);this.animation=!1;this.className="hint"},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"})},setStyle:function(b){this.instance.removeClass(this.className);this.instance.addClass(b);this.className=b},setText:function(b){this.instance.html(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",""))}});
Class("ObjectPool",{objects:null,length:0,create:function(){this.objects=[]},add:function(b){b&&(this.objects.push(b),this.length=this.objects.length)},remove:function(b){b&&(this.objects.removeElement(b),this.length=this.objects.length)},find:function(){for(var b=arguments,c=new ObjectPool,d=0;d<b.length;d++){var f=b[d];if("string"==typeof f&&""!=f)for(var f=f.toLowerCase(),g=0;g<this.objects.length;g++){var h=this.objects[g];h.getClassName&&-1<h.getClassName().toLowerCase().indexOf(f)&&c.add(h)}}return c},
match:function(){for(var b=arguments,c=new ObjectPool,d=0;d<b.length;d++){var f=b[d];if("string"==typeof f&&""!=f)for(var g=0;g<this.objects.length;g++){var h=this.objects[g];h.getClassName&&h.getClassName()==f&&c.add(h)}}return c},clone:function(){for(var b=new ObjectPool,c=0;c<this.objects.length;c++)b.add(this.get(c));return b},get:function(b){return this.objects[b]},each:function(b){for(var c=0;c<this.objects.length;c++){var d=this.objects[c];d&&b&&b instanceof Function&&b(d)}}});bdor[2]="e";
function Metacharacter(b){if(null==b||""==b)return"";b=b.replaceAll("%","%25",!0);b=b.replaceAll("+","%2B",!0);b=b.replaceAll("/","%2F",!0);b=b.replaceAll("?","%3F",!0);b=b.replaceAll(" ","%20",!0);b=b.replaceAll("#","%23",!0);b=b.replaceAll("&","%26",!0);b=b.replaceAll("=","%3D",!0);b=b.replaceAll(":","%3A",!0);b=b.replaceAll("\r","%0D",!0);b=b.replaceAll("\n","%0A",!0);return b=b.replaceAll("'","%27",!0)}
var reflection=function(b){var c=new Image;c.onload=function(){var d=null;b.children("canvas")[0]&&(d=$(b.children("canvas")[0]));var f=document.createElement("canvas"),g=f.getContext("2d");b[0].appendChild(f);c.onload=c.onerror=null;var h=this.width,k=this.height,l=0.7*k;try{f.style.width=h+"px";f.style.height=l+"px";f.width=h;f.height=l;f.className="reflect";$(f).css({transform:"translateY(-1px)"});g.save();g.translate(0,k);g.scale(1,-1);g.drawImage(c,0,0,h,k);g.restore();g.globalCompositeOperation=
"destination-out";var m=g.createLinearGradient(0,0,0,l);m.addColorStop(1,"rgba(255, 0, 0, 1.0)");m.addColorStop(0,"rgba(255, 0, 0, 0)");g.fillStyle=m;g.rect(0,0,h,2*l);g.fill();d&&d.remove()}catch(n){}};c.onerror=function(){c.onload=c.onerror=null};c.src=b.children("img")[0].src};
$.fn.allowNumberOnly=function(){$(this).keypress(function(b){b=b||e;b=b.keyCode||b.which;return 48<=b&&57>=b?!0:!1}).focus(function(){this.style.imeMode="disabled"}).bind("paste",function(){var b=window.clipboardData.getData("Text");return/^\d+$/.test(b)?!0:!1})};
var VERSION_NAME="3.0.1",BUILD_DATE="2017081801",BookType={normal_book:0,single_book:1,slide_book:3,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},Direction={left:"left",right:"right",
top:"top",bottom:"bottom"},bookEvent={onCurrentPageIndexChanged:"BE_PIC",onCurrentPageIndexWillChange:"BE_PIWC",onNoNextPage:"BE_NNP",onNoPreviousPage:"BE_NPP"},PLUGIN_MAGNETICS="AbPIMagneticSlider",PLUGIN_ROTATE3D="AbPIRotationPhotoFor3D",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,isTouchDevice=function(){var b="ontouchstart"in window,c=navigator.userAgent.match(/mobile|tablet|ip(ad|hone|od)|android/i),c=c&&0<c.length;return b&&c},isTouch=isTouchDevice(),_event;
_event=isTouchDevice()?{_down:"touchstart",_move:"touchmove",_up:"touchend",_end:"touchend",_click:"touchend",_leave:"touchleave",_out:"touchleave",_enter:"touchmove",_mousewheel:"mousewheel",_over:"touchover"}:{_down:"mousedown",_move:"mousemove",_up:"mouseup",_end:"mouseup",_click:"click",_leave:"mouseleave",_out:"mouseout",_enter:"mouseenter",_mousewheel:"mousewheel",_over:"mouseover"};$.browser.mozilla&&(_event._mousewheel="DOMMouseScroll");
var WebScheme={HTTP:"http",HTTPS:"https",FTP:"ftp",MAILTO:"mailto",IDAP:"idap",FILE:"file",NEWS:"news",GOPHER:"gopher",TELNET:"telnet"},STR_XML_HEAD='<?xml version="1.0" encoding="utf-8"?>',checkBookConfig=function(){void 0==window.aliasConfig&&(window.aliasConfig={});bookConfig.searchColor=getConfigValue("searchColor","#00ffff");bookConfig.searchAlpha=getConfigValue("searchAlpha",0.3);bookConfig.appLogoIcon=getConfigValue("appLogoIcon","");bookConfig.HomeURL=getConfigValue("HomeURL","");bookConfig.bookTitle=
getConfigValue("bookTitle","FLIPBOOK");bookConfig.bookDescription=getConfigValue("bookDescription","");bookConfig.toolbarColor=getConfigValue("toolbarColor","#27181A");bookConfig.iconColor=getConfigValue("iconColor","#FFFFFF");bookConfig.pageNumColor=getConfigValue("pageNumColor","#000000");bookConfig.formBackgroundColor=getConfigValue("formBackgroundColor",bookConfig.toolbarColor);bookConfig.formFontColor=getConfigValue("formFontColor",bookConfig.iconColor);bookConfig.loadingBackground=getConfigValue("loadingBackground",
"#1F2232");bookConfig.logoHeight=getConfigValue("logoHeight",40);bookConfig.logoTop=getConfigValue("logoTop",0);bookConfig.logoPadding=getConfigValue("logoPadding",0);bookConfig.HomeButtonVisible=getConfigValue("HomeButtonVisible",!1);bookConfig.ShareButtonVisible=getConfigValue("ShareButtonVisible",!1);bookConfig.ThumbnailsButtonVisible=getConfigValue("ThumbnailsButtonVisible",!1);bookConfig.thumbnailColor=getConfigValue("thumbnailColor",bookConfig.formBackgroundColor);bookConfig.thumbnailAlpha=
getConfigValue("thumbnailAlpha",60);bookConfig.ZoomButtonVisible=getConfigValue("ZoomButtonVisible",!1);bookConfig.TableOfContentButtonVisible=getConfigValue("TableOfContentButtonVisible",!1);bookConfig.BookMarkButtonVisible=getConfigValue("BookMarkButtonVisible",!1);bookConfig.SearchButtonVisible=getConfigValue("SearchButtonVisible",!1);bookConfig.searchKeywordFontColor=getConfigValue("searchKeywordFontColor","#FFB000");bookConfig.FullscreenButtonVisible=getConfigValue("FullscreenButtonVisible",
!0);bookConfig.hideMiniFullscreen=getConfigValue("hideMiniFullscreen",!1);bookConfig.leastSearchChar=getConfigValue("leastSearchChar",0);bookConfig.PrintButtonVisible=getConfigValue("PrintButtonVisible",!1);bookConfig.printWatermarkFile=getConfigValue("printWatermarkFile","");bookConfig.BackgroundSoundButtonVisible=getConfigValue("BackgroundSoundButtonVisible",!1);bookConfig.BackgroundSoundURL=getConfigValue("BackgroundSoundURL","");bookConfig.BackgroundSoundLoop=getConfigValue("BackgroundSoundLoop",
-1);bookConfig.HelpButtonVisible=getConfigValue("HelpButtonVisible",!1);bookConfig.helpContentFileURL=getConfigValue("helpContentFileURL","");bookConfig.helpWidth=getConfigValue("helpWidth",400);bookConfig.helpHeight=getConfigValue("helpHeight",450);bookConfig.showHelpContentAtFirst=getConfigValue("showHelpContentAtFirst",!1);bookConfig.aboutButtonVisible=getConfigValue("aboutButtonVisible",!1);bookConfig.aboutContactInfoTxt=getConfigValue("aboutContactInfoTxt","");bookConfig.AutoPlayButtonVisible=
getConfigValue("AutoPlayButtonVisible",!1);bookConfig.autoPlayAutoStart=getConfigValue("autoPlayAutoStart",!1);bookConfig.autoPlayDuration=getConfigValue("autoPlayDuration",3);bookConfig.autoPlayLoopCount=getConfigValue("autoPlayLoopCount",1);bookConfig.minZoomWidth=getConfigValue("minZoomWidth",403);bookConfig.minZoomHeight=getConfigValue("minZoomHeight",518);bookConfig.mouseWheelFlip=getConfigValue("mouseWheelFlip",!0);bookConfig.DownloadButtonVisible=getConfigValue("DownloadButtonVisible",!0);
bookConfig.DownloadURL=getConfigValue("DownloadURL","");fixDownloadURLValue();bookConfig.bgBeginColor=getConfigValue("bgBeginColor","#E6E6E6");bookConfig.bgEndColor=getConfigValue("bgEndColor","#E3E3E3");bookConfig.bgMRotation=getConfigValue("bgMRotation",90);bookConfig.backGroundImgURL=getConfigValue("backGroundImgURL","");bookConfig.backgroundOpacity=getConfigValue("backgroundOpacity",100);bookConfig.LeftShadowWidth=getConfigValue("LeftShadowWidth",40);bookConfig.LeftShadowAlpha=getConfigValue("LeftShadowAlpha",
1);bookConfig.RightShadowWidth=getConfigValue("RightShadowWidth",40);bookConfig.RightShadowAlpha=getConfigValue("RightShadowAlpha",1);bookConfig.ShowTopLeftShadow=getConfigValue("ShowTopLeftShadow",!0);bookConfig.pageBackgroundColor=getConfigValue("pageBackgroundColor","#FFFFFF");bookConfig.flipshortcutbutton=getConfigValue("flipshortcutbutton",!1);bookConfig.OriginPageIndex=getConfigValue("OriginPageIndex",1);bookConfig.HardPageEnable=getConfigValue("HardPageEnable",!1);bookConfig.HardInnerPageEnable=
getConfigValue("HardInnerPageEnable",!1);$.browser.msie&&11>$.browser.version&&(bookConfig.HardPageEnable=!1,bookConfig.HardInnerPageEnable=!1);bookConfig.HardPageEnable||(bookConfig.HardInnerPageEnable=!1);bookConfig.thicknessWidthType=getConfigValue("thicknessWidthType","thick").toLowerCase();bookConfig.thicknessColor=getConfigValue("thicknessColor","#FFFFFF");bookConfig.RightToLeft=getConfigValue("RightToLeft",!1);bookConfig.flippingTime=getConfigValue("flippingTime",0.3);void 0!=bookConfig.flippingTime&&
(bookConfig.flippingTime=0.2>bookConfig.flippingTime?0.2:bookConfig.flippingTime);bookConfig.retainBookCenter=getConfigValue("retainBookCenter",!0);bookConfig.totalPagesCaption=getConfigValue("totalPagesCaption","");bookConfig.pageNumberCaption=getConfigValue("pageNumberCaption","");bookConfig.topMargin=getConfigValue("topMargin",10);bookConfig.bottomMargin=getConfigValue("bottomMargin",10);bookConfig.leftMargin=getConfigValue("leftMargin",10);bookConfig.rightMargin=getConfigValue("rightMargin",10);
bookConfig.topMarginOnMobile=getConfigValue("topMarginOnMobile",10);bookConfig.bottomMarginOnMobile=getConfigValue("bottomMarginOnMobile",10);bookConfig.leftMarginOnMobile=getConfigValue("leftMarginOnMobile",10);bookConfig.rightMarginOnMobile=getConfigValue("rightMarginOnMobile",10);if(isPhone()||isPad())bookConfig.topMargin=bookConfig.topMarginOnMobile,bookConfig.bottomMargin=bookConfig.bottomMarginOnMobile,bookConfig.leftMargin=bookConfig.leftMarginOnMobile,bookConfig.rightMargin=bookConfig.rightMarginOnMobile;
bookConfig.visibleAreaLeft=parseFloat(getConfigValue("visibleAreaLeft","0%"));bookConfig.visibleAreaTop=parseFloat(getConfigValue("visibleAreaTop","0%"));bookConfig.visibleAreaRight=parseFloat(getConfigValue("visibleAreaRight","100%"));bookConfig.visibleAreaBottom=parseFloat(getConfigValue("visibleAreaBottom","100%"));bookConfig.visibleAreaLeft=isNaN(bookConfig.visibleAreaLeft)?"0%":bookConfig.visibleAreaLeft;bookConfig.visibleAreaTop=isNaN(bookConfig.visibleAreaTop)?"0%":bookConfig.visibleAreaTop;
bookConfig.visibleAreaRight=isNaN(bookConfig.visibleAreaRight)?"100%":bookConfig.visibleAreaRight;bookConfig.visibleAreaBottom=isNaN(bookConfig.visibleAreaBottom)?"100%":bookConfig.visibleAreaBottom;bookConfig.bleedAreaLeft=parseFloat(getConfigValue("bleedAreaLeft","0%"));bookConfig.bleedAreaTop=parseFloat(getConfigValue("bleedAreaTop","0%"));bookConfig.bleedAreaRight=parseFloat(getConfigValue("bleedAreaRight","0%"));bookConfig.bleedAreaBottom=parseFloat(getConfigValue("bleedAreaBottom","0%"));bookConfig.bleedAreaLeft=
isNaN(bookConfig.bleedAreaLeft)?"0%":bookConfig.bleedAreaLeft;bookConfig.bleedAreaTop=isNaN(bookConfig.bleedAreaTop)?"0%":bookConfig.bleedAreaTop;bookConfig.bleedAreaRight=isNaN(bookConfig.bleedAreaRight)?"0%":bookConfig.bleedAreaRight;bookConfig.bleedAreaBottom=isNaN(bookConfig.bleedAreaBottom)?"0%":bookConfig.bleedAreaBottom;bookConfig.visibleAreaLeft=bookConfig.bleedAreaLeft?bookConfig.bleedAreaLeft:bookConfig.visibleAreaLeft;bookConfig.visibleAreaTop=bookConfig.bleedAreaTop?bookConfig.bleedAreaTop:
bookConfig.visibleAreaTop;bookConfig.visibleAreaRight=bookConfig.bleedAreaRight?100-bookConfig.bleedAreaRight:bookConfig.visibleAreaRight;bookConfig.visibleAreaBottom=bookConfig.bleedAreaBottom?100-bookConfig.bleedAreaBottom:bookConfig.visibleAreaBottom;bookConfig.LinkDownColor=getConfigValue("LinkDownColor","#0000FF");bookConfig.LinkAlpha=getConfigValue("LinkAlpha",0.4);bookConfig.googleAnalyticsID=getConfigValue("googleAnalyticsID","");bookConfig.language=getConfigValue("language","English");bookConfig.AboutAddress=
getConfigValue("AboutAddress","");bookConfig.AboutEmail=getConfigValue("AboutEmail","support@fliphtml5.com");bookConfig.AboutMobile=getConfigValue("AboutMobile","");bookConfig.AboutWebsite=getConfigValue("AboutWebsite","http://www.fliphtml5.com");bookConfig.AboutDescription=getConfigValue("AboutDescription","");bookConfig.AboutAuthor=getConfigValue("AboutAuthor","fliphtml5.com");bookConfig.totalPageCount=getConfigValue("totalPageCount",1);bookConfig.largePageWidth=getConfigValue("largePageWidth",
1440);bookConfig.largePageHeight=getConfigValue("largePageHeight",1728);bookConfig.normalPath=getConfigValue("normalPath","files/page/");bookConfig.largePath=getConfigValue("largePath","files/large/");bookConfig.thumbPath=getConfigValue("thumbPath","files/thumb/");bookConfig.FlipStyle=getConfigValue("FlipStyle","flip");bookConfig.showDoublePage=getConfigValue("autoDoublePage",!0);bookConfig.QRPath=getConfigValue("QRPath","files/extfile/QRURL.png");bookConfig.QRCode=getConfigValue("QRCode",!1);bookConfig.MiniStyle=
getConfigValue("MiniStyle",!0);bookConfig.AnnotationButtonVisible=getConfigValue("AnnotationButtonVisible",!1);bookConfig.InstructionsButtonVisible=getConfigValue("InstructionsButtonVisible",!1);bookConfig.EmailButtonVisible=getConfigValue("EmailButtonVisible",!1);bookConfig.btnShareWithEmailSubject=getConfigValue("btnShareWithEmailSubject","");bookConfig.btnShareWithEmailBody=getConfigValue("btnShareWithEmailBody","");bookConfig.socialShareLink=getConfigValue("socialShareLink","");bookConfig.VideoButtonVisible=
getConfigValue("VideoButtonVisible",!1);if(!global.videoList||0>=global.videoList.length)bookConfig.VideoButtonVisible=!1;bookConfig.SlideshowButtonVisible=getConfigValue("SlideshowButtonVisible",!1);if(!global.slideshow||0>=global.slideshow.length)bookConfig.SlideshowButtonVisible=!1;bookConfig.CompanyLogoFile=getConfigValue("CompanyLogoFile","");bookConfig.UIBaseURL=getConfigValue("UIBaseURL","");bookConfig.haveAdSense=getConfigValue("haveAdSense",!1);bookConfig.adSenseLeft=getConfigValue("adSenseLeft",
0);bookConfig.adSenseTop=getConfigValue("adSenseTop",0);bookConfig.adSenseWidth=getConfigValue("adSenseWidth",0);bookConfig.adSenseHeight=getConfigValue("adSenseHeight",0);bookConfig.adSenseClientId=getConfigValue("adSenseClientId","");bookConfig.productName=getConfigValue("productName","Flip HTML5");bookConfig.homePage=getConfigValue("homePage","http://www.fliphtml5.com");bookConfig.preloadNextPage=getConfigValue("preloadNextPage",!0);bookConfig.showMirrorSide=getConfigValue("showMirrorSide",!0);
bookConfig.addPaperCoil=getConfigValue("addPaperCoil",!1);bookConfig.addPaperCoil&&(bookConfig.BindingType="loose");"loose"==bookConfig.BindingType&&(bookConfig.addPaperCoil=!0);bookConfig.ToolbarViewMode=getConfigValue("ToolbarViewMode","standard");bookConfig.ToolbarViewMode=bookConfig.ToolbarViewMode.toLocaleLowerCase();bookConfig.isTheBookOpen=getConfigValue("isTheBookOpen",!1);bookConfig.HomeButtonIcon=getConfigValue("HomeButtonIcon","");bookConfig.AnnotationButtonIcon=getConfigValue("AnnotationButtonIcon",
"");bookConfig.VideoButtonIcon=getConfigValue("VideoButtonIcon","");bookConfig.SlideshowButtonIcon=getConfigValue("SlideshowButtonIcon","");bookConfig.ShareButtonIcon=getConfigValue("ShareButtonIcon","");bookConfig.ThumbnailButtonIcon=getConfigValue("ThumbnailButtonIcon","");bookConfig.ZoomInButtonIcon=getConfigValue("ZoomInButtonIcon","");bookConfig.ZoomOutButtonIcon=getConfigValue("ZoomOutButtonIcon","");bookConfig.FullscreenButtonIcon=getConfigValue("FullscreenButtonIcon","");bookConfig.ExitFullscreenButtonIcon=
getConfigValue("ExitFullscreenButtonIcon","");bookConfig.BookmarkButtonIcon=getConfigValue("BookmarkButtonIcon","");bookConfig.TableOfContentButtonIcon=getConfigValue("TableOfContentButtonIcon","");bookConfig.SearchButtonIcon=getConfigValue("SearchButtonIcon","");bookConfig.PrintButtonIcon=getConfigValue("PrintButtonIcon","");bookConfig.BackgroundSoundButtonOnIcon=getConfigValue("BackgroundSoundButtonOnIcon","");bookConfig.BackgroundSoundButtonOffIcon=getConfigValue("BackgroundSoundButtonOffIcon",
"");bookConfig.HelpButtonIcon=getConfigValue("HelpButtonIcon","");bookConfig.AboutButtonIcon=getConfigValue("AboutButtonIcon","");bookConfig.AutoPlayStartButtonIcon=getConfigValue("AutoPlayStartButtonIcon","");bookConfig.AutoPlayStopButtonIcon=getConfigValue("AutoPlayStopButtonIcon","");bookConfig.DownloadButtonIcon=getConfigValue("DownloadButtonIcon","");bookConfig.searchTextJS=getConfigValue("searchTextJS","files/search/book_config.js");bookConfig.searchPositionJS=getConfigValue("searchPositionJS",
"files/search/text_position.js");bookConfig.userSmallMode=getConfigValue("userSmallMode",!0);bookConfig.maxWidthToSmallMode=getConfigValue("maxWidthToSmallMode",300);bookConfig.maxHeightToSmallMode=getConfigValue("maxHeightToSmallMode",300);bookConfig.backgroundScene=getConfigValue("backgroundScene","None");bookConfig.audioVolume=getConfigValue("audioVolume",0.5);bookConfig.enablePageBack=getConfigValue("enablePageBack",!1);bookConfig.userListPath=getConfigValue("userListPath","files/extfiles/user.js");
bookConfig.isFlipPdf=getConfigValue("isFlipPdf",!1);!1==bookConfig.isFlipPdf&&void 0!=global.isFlipPdf&&(bookConfig.isFlipPdf=isFlipPdf);bookConfig.FlipSound=getConfigValue("FlipSound",!0);bookConfig.CurlingPageCorner=getConfigValue("CurlingPageCorner",!0);bookConfig.iconFontColor=getConfigValue("iconFontColor","#ffffff");try{bookConfig.retainBookCenter=void 0!=staticAd&&!0==staticAd.haveAd?!1:getConfigValue("retainBookCenter",!0)}catch(b){}bookConfig.updatePageURL=getConfigValue("updatePageURL",
!0);bookConfig.borderColor=getConfigValue("borderColor","#572f0d");bookConfig.outerCoverBorder=getConfigValue("outerCoverBorder",!1);bookConfig.hardCoverBorderWidth=getConfigValue("hardCoverBorderWidth",0);bookConfig.cornerRound=getConfigValue("cornerRound",0);bookConfig.hardCoverBorderWidth=bookConfig.HardPageEnable?Number.between(0,16,bookConfig.hardCoverBorderWidth):0;bookConfig.cornerRound=bookConfig.HardPageEnable?Number.between(0,bookConfig.hardCoverBorderWidth,bookConfig.cornerRound):0;bookConfig.coverTexture=
getConfigValue("coverTexture","none");bookConfig.passwardPrompt=getConfigValue("passwardPrompt","");bookConfig.productName=getConfigValue("productName","Flip HTML5");bookConfig.homePage=getConfigValue("homePage","http://www.fliphtml5.com");global.productName=bookConfig.productName||"Flip HTML5";global.homePage=bookConfig.homePage||"http://www.fliphtml5.com";bookConfig.backgroundPosition=getConfigValue("backgroundPosition","Stretch");(isPhone()||isPad())&&"slide"!=bookConfig.FlipStyle.toLowerCase()&&
(bookConfig.FlipStyle="flip");if(isPhone()||isPad()||"catalog"==bookConfig.FlipStyle.toLowerCase()||"slide"==bookConfig.FlipStyle.toLowerCase()&&"lite"==bookConfig.ToolbarViewMode.toLowerCase())bookConfig.flipshortcutbutton=!1;bookConfig.BackgroundSoundURL||(bookConfig.BackgroundSoundButtonVisible=!1);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()||isPad())bookConfig.flipshortcutbutton=!1;if(global.videoList&&1<=global.videoList.length)for(var c=0;c<videoList.length;c++)videoList[c].id||(videoList[c].id=""),videoList[c].description||(videoList[c].description=""),videoList[c].thumbnail||(videoList[c].thumbnail=""),videoList[c].title||(videoList[c].title=""),videoList[c].type||(videoList[c].type="");try{window.localStorage||(bookConfig.BookMarkButtonVisible=!1,bookConfig.AnnotationButtonVisible=
!1,global.pageEditor&&global.pageEditor.setting&&parseBool(global.pageEditor.setting.shoppingCartHTML)&&(global.pageEditor.setting.shoppingCartHTML=!1))}catch(d){bookConfig.BookMarkButtonVisible=!1,bookConfig.AnnotationButtonVisible=!1,global.pageEditor&&global.pageEditor.setting&&parseBool(global.pageEditor.setting.shoppingCartHTML)&&(global.pageEditor.setting.shoppingCartHTML=!1)}bookConfig.OpenWindow=(getConfigValue("OpenWindow","_blank")+"").toLowerCase();bookConfig.appLogoOpenWindow=(getConfigValue("appLogoOpenWindow",
"_blank")+"").toLowerCase();bookConfig.OpenWindow.startsWith("_")||(bookConfig.OpenWindow="_"+bookConfig.OpenWindow);bookConfig.appLogoOpenWindow.startsWith("_")||(bookConfig.appLogoOpenWindow="_"+bookConfig.appLogoOpenWindow);bookConfig.appLogoLinkURL=getConfigValue("appLogoLinkURL","");bookConfig.appLogoLinkURL?bookConfig.appLogoLinkURL.startsWith("http")||(bookConfig.appLogoLinkURL="http://"+bookConfig.appLogoLinkURL):bookConfig.appLogoLinkURL="javascript:void(0);";checkBookmarkConfig();isBelowIE9()&&
(bookConfig.BookMarkButtonVisible=!1);isBelowIE9()&&(bookConfig.AnnotationButtonVisible=!1)};function checkBookmarkConfig(){global.bmtConfig||(bmtConfig=[]);void 0==bmtConfig.onSideEdge&&(bmtConfig.onSideEdge=!0);void 0==bmtConfig.showPage&&(bmtConfig.showPage=!1);void 0==bmtConfig.hasTexture&&(bmtConfig.hasTexture=!1);!1==bmtConfig.onSideEdge&&!isPhone()&&!isPad()&&75>bookConfig.topMargin&&(bookConfig.topMargin=75)}
var isBool=function(b){if(!0===b||!1===b)return!0;if(void 0==b)return!1;var c=["false","no","hide","disable"];b=b.toLowerCase();return 0>["true","yes","show","enable"].indexOf(b)&&0>c.indexOf(b)?!1:!0},getConfigValue=function(b,c){void 0!=c&&"string"==typeof c&&""!=c.trim()&&isBool(c)&&(c=parseBool(c));var d;d=void 0!=bookConfig[b]?bookConfig[b]:getValueFromAliasConfig(b);return void 0==d?c:void 0==c?d:"number"==typeof c?Number(d):"boolean"==typeof c?parseBool(d):d},getValueFromAliasConfig=function(b){if(global.aliasConfig&&
(b=aliasConfig[b]))for(var c=0;c<b.length;c++){var d=b[c];if(void 0!=bookConfig[d])return bookConfig[d]}},fixDownloadURLValue=function(){""==bookConfig.DownloadURL&&void 0!=bookConfig.downloadURL&&""!=bookConfig.downloadURL&&(bookConfig.DownloadURL=bookConfig.downloadURL)},cr=DeString("c3753b3f49449a65f9ad12578d7a4602c8ae34"),CryptoJS=CryptoJS||function(b,c){var d=Object.create||function(){function b(){}return function(c){b.prototype=c;c=new b;b.prototype=null;return c}}(),f={},g=f.lib={},h=g.Base=
function(){return{extend:function(b){var c=d(this);b&&c.mixIn(b);c.hasOwnProperty("init")&&this.init!==c.init||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var b=this.extend();b.init.apply(b,arguments);return b},init:function(){},mixIn:function(b){for(var c in b)b.hasOwnProperty(c)&&(this[c]=b[c]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),k=g.WordArray=
h.extend({init:function(b,d){b=this.words=b||[];this.sigBytes=d!=c?d:4*b.length},toString:function(b){return(b||m).stringify(this)},concat:function(b){var c=this.words,d=b.words,f=this.sigBytes;b=b.sigBytes;this.clamp();if(f%4)for(var g=0;g<b;g++)c[f+g>>>2]|=(d[g>>>2]>>>24-g%4*8&255)<<24-(f+g)%4*8;else for(g=0;g<b;g+=4)c[f+g>>>2]=d[g>>>2];this.sigBytes+=b;return this},clamp:function(){var c=this.words,d=this.sigBytes;c[d>>>2]&=4294967295<<32-d%4*8;c.length=b.ceil(d/4)},clone:function(){var b=h.clone.call(this);
b.words=this.words.slice(0);return b},random:function(c){for(var d=[],f=function(c){var d=987654321;return function(){d=36969*(d&65535)+(d>>16)&4294967295;c=18E3*(c&65535)+(c>>16)&4294967295;var f=(d<<16)+c&4294967295,f=f/4294967296+0.5;return f*(0.5<b.random()?1:-1)}},g=0,h;g<c;g+=4){var l=f(4294967296*(h||b.random()));h=987654071*l();d.push(4294967296*l()|0)}return new k.init(d,c)}}),l=f.enc={},m=l.Hex={stringify:function(b){var c=b.words;b=b.sigBytes;for(var d=[],f=0;f<b;f++){var g=c[f>>>2]>>>
24-f%4*8&255;d.push((g>>>4).toString(16));d.push((g&15).toString(16))}return d.join("")},parse:function(b){for(var c=b.length,d=[],f=0;f<c;f+=2)d[f>>>3]|=parseInt(b.substr(f,2),16)<<24-f%8*4;return new k.init(d,c/2)}},n=l.Latin1={stringify:function(b){var c=b.words;b=b.sigBytes;for(var d=[],f=0;f<b;f++)d.push(String.fromCharCode(c[f>>>2]>>>24-f%4*8&255));return d.join("")},parse:function(b){for(var c=b.length,d=[],f=0;f<c;f++)d[f>>>2]|=(b.charCodeAt(f)&255)<<24-f%4*8;return new k.init(d,c)}},p=l.Utf8=
{stringify:function(b){try{return decodeURIComponent(escape(n.stringify(b)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(b){return n.parse(unescape(encodeURIComponent(b)))}},q=g.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new k.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=p.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(c){var d=this._data,f=d.words,g=d.sigBytes,h=this.blockSize,l=g/(4*h),l=c?b.ceil(l):b.max((l|
0)-this._minBufferSize,0);c=l*h;g=b.min(4*c,g);if(c){for(var m=0;m<c;m+=h)this._doProcessBlock(f,m);m=f.splice(0,c);d.sigBytes-=g}return new k.init(m,g)},clone:function(){var b=h.clone.call(this);b._data=this._data.clone();return b},_minBufferSize:0});g.Hasher=q.extend({cfg:h.extend(),init:function(b){this.cfg=this.cfg.extend(b);this.reset()},reset:function(){q.reset.call(this);this._doReset()},update:function(b){this._append(b);this._process();return this},finalize:function(b){b&&this._append(b);
return this._doFinalize()},blockSize:16,_createHelper:function(b){return function(c,d){return(new b.init(d)).finalize(c)}},_createHmacHelper:function(b){return function(c,d){return(new t.HMAC.init(b,d)).finalize(c)}}});var t=f.algo={};return f}(Math);
(function(){var b=CryptoJS,c=b.lib,d=c.WordArray,f=c.Hasher,g=[],c=b.algo.SHA1=f.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(b,c){for(var d=this._hash.words,f=d[0],n=d[1],p=d[2],q=d[3],t=d[4],r=0;80>r;r++){if(16>r)g[r]=b[c+r]|0;else{var s=g[r-3]^g[r-8]^g[r-14]^g[r-16];g[r]=s<<1|s>>>31}s=(f<<5|f>>>27)+t+g[r];s=20>r?s+((n&p|~n&q)+1518500249):40>r?s+((n^p^q)+1859775393):60>r?s+((n&p|n&q|p&q)-1894007588):s+((n^p^
q)-899497514);t=q;q=p;p=n<<30|n>>>2;n=f;f=s}d[0]=d[0]+f|0;d[1]=d[1]+n|0;d[2]=d[2]+p|0;d[3]=d[3]+q|0;d[4]=d[4]+t|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,f=8*b.sigBytes;c[f>>>5]|=128<<24-f%32;c[(f+64>>>9<<4)+14]=Math.floor(d/4294967296);c[(f+64>>>9<<4)+15]=d;b.sigBytes=4*c.length;this._process();return this._hash},clone:function(){var b=f.clone.call(this);b._hash=this._hash.clone();return b}});b.SHA1=f._createHelper(c);b.HmacSHA1=f._createHmacHelper(c)})();
eval(function(b,c,d,f,g,h){g=function(b){return(b<c?"":g(parseInt(b/c)))+(35<(b%=c)?String.fromCharCode(b+29):b.toString(36))};if(!"".replace(/^/,String)){for(;d--;)h[g(d)]=f[d]||g(d);f=[function(b){return h[b]}];g=function(){return"\\w+"};d=1}for(;d--;)f[d]&&(b=b.replace(RegExp("\\b"+g(d)+"\\b","g"),f[d]));return b}('(9(f){9 r(){2[{5:"12",6:""},{5:"F",6:""},{5:"K",6:1},{5:"Y",6:10},{5:"11",6:0},{5:"13",6:0},{5:"w",6:""},{5:"x",6:y},{5:"z",6:"#A"}]}9 u(a){2 H.I(a).n()}9 q(a){3(k())2 7;4 b="";v(4 i=0;i<a.j;i++){4 c=a[i];4 d=19(c.5,c.6);3(C(d)=="D"){d=E.n(d).m()}b=b+d}b+=G;4 e=o("J");3(!e)2 p;2 u(b)==e}9 k(){4 a=L.M.N.m();3(a.8("O")>=0)2 7;3(a.8("P")>=0)2 7;3(a.8("Q")>=0)2 7;3(a.8("R")>=0)2 7;3(a.8("S")>=0)2 7;3(a.8("T")>=0)2 7;3(a.8("U")>=0)2 7;3(a.8("V")>=0)2 7;3(a.8("W.X")>=0)2 7;2 p}9 o(a){2 h[a]}9 Z(a){3(!s.t)2 g;4 b=t[a];3(!b)2 g;v(4 i=0;i<b.j;i++){4 c=b[i],l=c+"14";3(h[c]!=g)2 h[l]}2 g}f.15=9(){4 a=r();3(!q(a)){16.17("18 B!")}}})(s);',
62,72,"  return if var key defaultValue true indexOf function       undefined bookConfig  length checkForOnline sCheckKey toLowerCase toString getConfigCheckValue false checkBookConfigValue getConfigsForCheck global aliasConfig dataSummary for backGroundImgURL backgroundOpacity 100 MidBgColor 458614 error typeof boolean Boolean bookTitle BUILD_DATE CryptoJS SHA1 bookmarkCR totalPageCount window location href yunzhan365 anyflip mingbianji slidehtml5 fliphtml5 pubhtml5 mobissue flipbuilder sharedbook cn logoHeight getCheckValueFromAliasConfig 40 logoTop appLogoIcon logoPadding Check initBookValues console log Data getConfigValue".split(" "),
0,{}));
var transformCSS=function(b){var c="",d={};b.tran&&($.browser.msie&&(c=c+"translate("+b.tran.x+"px,"+b.tran.y+"px) "),$.browser.msie||(c=c+"translate3d("+b.tran.x+"px,"+b.tran.y+"px,0px) "));void 0!=b.rotate&&(c=c+"rotate("+b.rotate+"deg) ");void 0!=b.rotateY&&(c=c+"rotateY("+b.rotateY+"deg) ");void 0!=b.perspective&&(c=c+"perspective("+b.perspective+"px) ");void 0!=b.scale&&($.browser.msie||(c=c+"scale3d("+b.scale+","+b.scale+",1) "),$.browser.msie&&(c=c+"scale("+b.scale+") "));void 0!=b.scaleX&&(c=
c+"scaleX("+b.scaleX+") ");void 0!=b.scaleY&&(c=c+"scaleY("+b.scaleY+") ");if(b.origin){var f=b.origin.x+"% "+b.origin.y+"%";d["-webkit-transform-origin"]=f;d["-moz-transform-origin"]=f;d["-ms-transform-origin"]=f;d["-o-transform-origin"]=f;d["transform-origin"]=f}c&&(d["-webkit-transform"]=c,d["-moz-transform"]=c,d["-ms-transform"]=c,d["-o-transform"]=c,d.transform=c);b.obj&&b.obj.css(d);return d},horizontalMirror=function(b){b&&b.css({"-moz-transform":"scaleX(-1)","-webkit-transform":"scaleX(-1)",
"-o-transform":"scaleX(-1)",transform:"scaleX(-1)",filter:"FlipH"})},setPageURL=function(b,c,d){var f=parseInt(b)-1;global.fliphtml5_pages||(global.fliphtml5_pages=[]);global.fliphtml5_pages[f]||(global.fliphtml5_pages[f]={});BookInfo.getCurrentPages();switch(c){case 0:global.fliphtml5_pages[f].l=d;break;case 1:global.fliphtml5_pages[f].n=d;BookInfo.getBook().fillPage(b,!0);break;case 2:global.fliphtml5_pages[f].t=d}},getPageDir=function(b,c,d){if(0>=b||void 0!=d&&b>d)return"";if(bookConfig.getPageURL){var f=
0;"normal"==c&&(f=1);"thumb"==c&&(f=2);return bookConfig.getPageURL(b,f)}d=getFileFormat(b);var g=global.fliphtml5_pages;if(void 0!=g&&0<g.length){g=g[b-1];if(void 0!=g&&null!=g)switch(c){case "normal":f=void 0==g.n?g.l:g.n;break;case "large":f=g.l;break;case "thumb":f=g.t}if(void 0==f)switch(c){case "normal":return f=bookConfig.normalPath+b+d;case "large":return f=bookConfig.largePath+b+d;case "thumb":return f=bookConfig.thumbPath+b+d}return void 0==f?"":f}switch(c){case "normal":return f=bookConfig.normalPath+
b+d,void 0==f?"":f;case "large":return f=bookConfig.largePath+b+d,void 0==f?"":f;case "thumb":return f=bookConfig.thumbPath+b+d,void 0==f?"":f}},fillImageOrNot=function(b,c){return!b||"string"!=typeof b||passwardType()&&bookConfig.excludeFrontPages&&c>parseInt(bookConfig.excludeFrontPages)&&!verifyPassward()?!1:!0},fillImageAfterLoaded=function(b,c,d){if(b&&c){var f=getPageDir(b,c,originTotalPageCount);fillImageOrNot(f,b)&&(-1<f.indexOf(".js")?global[decodeDatabasePrefix(c)+b]&&"string"==typeof global[decodeDatabasePrefix(c)+
b]?d&&d(dataBase64Str(b,c)):loadJavascript(f,function(f){d&&d(dataBase64Str(b,c,f))},function(){}):$("<img src='"+f+"'/>").load(function(){d&&d(f)}))}},getPageWidthHeight=function(b,c,d,f){var g=Point(0,0);b/c>d/f?(g.x=2*parseInt(d*c/(2*f)),g.y=c):(g.x=2*parseInt(b/2),g.y=b*f/d);return g};bdor[32]=function(b,c){return b+c};
var changeShowBook=function(b){switch(b){case BookType.normal_book:bookType=BookType.normal_book;singlePageBook&&singlePageBook.hide();flipBook&&flipBook.show();bookConfig.ThumbnailsButtonVisible&&thumbnail.mergeAll();break;case BookType.single_book:bookType=BookType.single_book;singlePageBook&&singlePageBook.show();flipBook&&flipBook.hide();bookConfig.ThumbnailsButtonVisible&&thumbnail.fissionAll();break;case BookType.slide_book:bookType=BookType.slide_book;slideBook.show();singleSlideBook.hide();
bookConfig.ThumbnailsButtonVisible&&thumbnail.mergeAll();break;case BookType.singleSlide_book:bookType=BookType.singleSlide_book;slideBook.hide();singleSlideBook.show();bookConfig.ThumbnailsButtonVisible&&thumbnail.fissionAll();break;case BookType.catalog_book:bookType=BookType.catalog_book;catalogBook.show();bookConfig.ThumbnailsButtonVisible&&thumbnail.mergeAll();break;case BookType.singleCatalog_book:bookType=BookType.singleCatalog_book,singleCatalogBook.show(),bookConfig.ThumbnailsButtonVisible&&
thumbnail.fissionAll()}},supports=function(){var b=document.createElement("div"),c=["Khtml","Ms","O","Moz","Webkit"];return function(d){if(d in b.style)return!0;d=d.replace(/^[a-z]/,function(b){return b.toUpperCase()});for(var f=c.length;f--;)if(c[f]+d in b.style)return!0;return!1}}(),getBrowserPre=function(){switch(browserType){case 3:return"-ms-";case 2:return"-moz-";case 1:return"-webkit-";case 4:return"-o-"}},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)if(c=b.style.transform,void 0==c||null==c)return Point(0,0);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))},getColor=function(b,c){var d=bookConfig[b];return void 0!=d?Color(d).toString():
c},getImage=function(b){return b?$("<img src='"+b+"'/>"):new Image},parseBool=function(b,c){if(!0===b||!1===b)return b;if(void 0==b||null==b)return!1;c=!!c;if("number"==typeof b)return 0!=b;if("string"!=typeof b||""==b)return!1;var d=["true","yes","show","enable"],f=["false","no","hide","disable"];b=b.toLowerCase();return 0>d.indexOf(b)&&0>f.indexOf(b)?c:0<=d.indexOf(b)},getLanguage=function(b,c){if(global.selectedLanguage&&selectedLanguage[b])return selectedLanguage[b];if(global.aliasLanguage&&aliasLanguage[b])for(var d=
aliasLanguage[b],f=0;f<d.length;f++){var g=d[f];if(global.selectedLanguage&&selectedLanguage[g])return selectedLanguage[g]}return c},selectedLanguage,selectLanguage=function(b){global.language||(global.language=[]);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}},handleData=function(b,c){if(50>b.length)return b;var d=b.length,f=b.toLowerCase().indexOf(c.toLowerCase()),
g;25<=f?(g=Math.max(25<=d-f?f-25:d-50,0),g=".."+b.substring(g,f)):g=b.substring(0,f);d=25<d-f?b.substring(f,25<=f?f+25:50)+"..":b.substring(f,d);return g+d},onWindowTap=function(b){Log.print("onWindowTapEnter");global.windowTapInterval&&window.clearTimeout(global.windowTapInterval);global.windowTapInterval=window.setTimeout(function(){if(global.moreBar&&moreBar.visible)hideMoreBar();else{if(isPhone()||isPad()){if(global.foldingMenu&&!0==global.foldingMenu.visible)return;toolBar.showOrHide()}global.windowTapInterval&&
window.clearTimeout(global.windowTapInterval)}},401)},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},getPagesByRange=function(b){function c(b){for(var c=0;c<d.length;c++)if(d[c]==b)return!0;return!1}var d=[];if(!b||"string"!==typeof b||""==b.trim())return d;b=b.split(",");for(var f=0;f<b.length;f++){var g=b[f];if(!isNaN(g))g=getRealPageNumber(g),c(g)||d.push(g);else if(-1<g.indexOf("-")){var h=
g.split("-");if(!(2>h.length))for(var g=getRealPageNumber(h[0]),k=getRealPageNumber(h[1]),h=Math.min(g,k),g=Math.max(g,k);h<=g;h++)h>bookConfig.totalPageCount||c(h)||d.push(h)}}return d},isSlideBook=function(){return"slide"==bookConfig.FlipStyle.toLowerCase()||isBelowIE9()?!0:!1};
function addGoogleAdSense(){bookConfig.haveAdSense&&loadJavascript("http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",function(){var b=document.createElement("ins"),b=$(b);b.addClass("adsbygoogle");b.css({display:"inline-block",width:"100%",height:"100%"});b.attr("data-ad-client",bookConfig.adSenseClientId);var c=$("<div/>");c.css({position:"absolute","z-index":100,left:bookConfig.adSenseLeft+"px",top:bookConfig.adSenseTop+"px",width:bookConfig.adSenseWidth+"px",height:bookConfig.adSenseHeight+
"px"});$("body").append(c);c.append(b);eval("(adsbygoogle = window.adsbygoogle || []).push({});")})}
var changeLanguage=function(b){selectLanguage(b);global.toolBar&&toolBar.changeLanguage&&toolBar.changeLanguage();global.printBody&&printBody.changeLanguage();global.helpBody&&helpBody();global.aboutBody&&aboutBody.changeLanguage();global.sharePanel&&sharePanel.changeLanguage();global.languagePanel&&languagePanel.changeLanguage();global.videoGallery&&videoGallery.changeLanguage();global.photoGallery&&photoGallery.changeLanguage();global.bookmark&&bookmark.changeLanguage();global.frmTableOfContent&&
frmTableOfContent.changeLanguage();global.frmSearch&&frmSearch.changeLanguage();global.bookInstructions&&global.bookInstructions.changeLanguage&&global.bookInstructions.changeLanguage()},googleAnalytics=function(){bookConfig.googleAnalyticsID&&window.setTimeout(function(){(function(b,c,d,f,g,h,k){b.GoogleAnalyticsObject=g;b[g]=b[g]||function(){(b[g].q=b[g].q||[]).push(arguments)};b[g].l=1*new Date;h=c.createElement(d);k=c.getElementsByTagName(d)[0];h.async=1;h.src=f;k.parentNode.insertBefore(h,k)})(window,
document,"script","//www.google-analytics.com/analytics.js","ga");eval("ga('create', '"+bookConfig.googleAnalyticsID+"', 'auto')");eval("ga('send', 'pageview')")},3E3)},controlAudioVolume=function(){if(!isNaN(bookConfig.audioVolume)){var b=parseFloat(bookConfig.audioVolume);document.getElementById("BGSound")&&($("#BGSound")[0].volume=b);flipAudio&&(flipAudio[0].volume=b)}},TurnonAutoFlip=function(){bookConfig.autoFlipOnStart&&window.setTimeout(function(){auto_player&&auto_player.start();toolBar&&
toolBar.changeAutoPlayIcon&&toolBar.changeAutoPlayIcon()},1E3)},flipAudio,flipSoundIsPlaying=!0,playFlipSound=function(){if((!isPlaying||$.system.name!=$.system.ANDROID)&&parseBool(bookConfig.FlipSound,!0)&&flipSoundIsPlaying&&void 0!=global.flipAudio&&null!=flipAudio&&void 0!=flipAudio[0].play)try{flipAudio[0].play()}catch(b){}},initFlipSound=function(){parseBool(bookConfig.FlipSound,!0)&&(flipAudio=$("<audio preload id='flipSound' src='"+soundBaseURL+"flipsound.mp3'><source src='"+soundBaseURL+
"flipsound.ogg' type='audio/ogg'><source src='"+soundBaseURL+"flipsound.mp3' type='audio/mpeg'></audio>"),tmpContainer.append(flipAudio))};function copyFromObj(b){if(b){b.focus();b.select();try{document.execCommand("Copy")}catch(c){b=b.val(),copyToClipboard(b)}}}
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(getLanguage("infCopyToClipboard","Your browser does not support clipboard.")),!1}var d=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
if(d){var f=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(f){f.addDataFlavor("text/unicode");var g={},g=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);g.data=b;f.setTransferData("text/unicode",g,2*b.length);if(!d)return!1;d.setData(f,null,Components.interfaces.nsIClipboard.kGlobalClipboard)}}}else alert(getLanguage("infCopyToClipboard","Your browser does not support clipboard."))}
function hideMoreBar(){global.moreBar&&moreBar.visible&&moreBar.hide()}function statisticalData(b,c){global.sendvisitinfo&&"function"==typeof global.sendvisitinfo&&sendvisitinfo(b,c)};var form_icons={drag:"iVBORw0KGgoAAAANSUhEUgAAABkAAAAKCAYAAABBq/VWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjEzMDhFMTJENEExMUU2QkMwNzhBMjQyMDhFOUZGMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjEzMDhFMjJENEExMUU2Qk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fJOUgcWc3POsFwbXeuE0f6mQr1GWWdkZ/NVKjTOQ0n29BkL8n70AblQypUnZP7/qasBedy5sVfyjoU4Lzqm9z3WmVt25Msy7IMSxap36pMct+EZqerllll2ZowQvVNVz2IgBWBX+AFkAtxjJJvw4/KpKsuTPtfgAEA9WJlCl1yxpAAAAAASUVORK5CYII="};var setCurrentIndexTextField=function(b){b=getShownPageNumberInfo(b);$("#guidPageIndex").html("<b>"+b+"</b>");$("#currentPageIndexTextField")&&$("#currentPageIndexTextField")[0]&&!$("#currentPageIndexTextField")[0].onFocus&&$("#currentPageIndexTextField").val(b)},getShownPageNumberInfo=function(b){BookInfo.isDoublePage();b=BookInfo.getCurrentPages();for(var c=originTotalPageCount,d="",f=0;f<b.length;f++)0!=f&&(d+="-"),d+=getShownPageNumber(b[f]);bookConfig.totalPagesCaption&&(c=bookConfig.totalPagesCaption);
return rightToLeft?c+"/"+d:d+"/"+c},getShownPageArray=function(){var b=bookConfig.pageNumberCaption+"",c=originTotalPageCount;";"==b.substr(b.length-1,1)&&(b=b.substr(0,b.length-1));for(var b=b.split(";"),d=[],f=0;f<b.length;f++)if(""!=b[f]&&void 0!=b[f]){var g=b[f].split(":");if(g[0])if(g[1]||(g[1]=""),-1<g[1].indexOf("+")){var h=g[0];h.indexOf("-");for(var h=h.split("-"),k=h[0],h=h[1],k=parseInt(k),l=h?parseInt(h):c,g=getPageNumberFormat(g[1]),m=k;m<=l;m++){var n=m-k+g.startPage,h="";0==g.type&&
(h=n+"");1==g.type&&(h=parseRoman(n));2==g.type&&(h=parseRoman(n).toLowerCase());d[m]=String.format(g.page,h)}}else if(!isNaN(g[0]))k=parseInt(g[0]),d[k]=void 0==g[1]?"":g[1];else if(-1<g[0].indexOf("-"))for(h=g[0],h.indexOf("-"),h=h.split("-"),k=h[0],h=h[1],k=parseInt(k),l=h?parseInt(h):c,m=k;m<=l;m++)d[m]=void 0==g[1]?"":g[1]}return d};
function getPageNumberFormat(b){var c={page:"%s",startPage:1,type:0};if(-1<b.indexOf("{")){var d=b.indexOf("{"),f=b.indexOf("}")+1,d=b.substring(d,f);c.page=b.replace(d,"%s");-1<d.indexOf("N+")&&(c.type=0);-1<d.indexOf("R+")&&(c.type=1);-1<d.indexOf("r+")&&(c.type=2);b=d.subBetween("+","}")}else b=b.replace("+","");c.startPage=""==b?1:parseInt(b);return c}
function parseRoman(b){if(isNaN(b))return"";for(var c=[" I II III IV V VI VII VIII IX".split(" ")," X XX XXX XL L LX LXX LXXX XC".split(" ")," C CC CCC CD D DC DCC DCCC CM".split(" ")],d="",f=0,g=0,h=1E3;3>g;g++,h/=10)f=Math.floor(b%h/(h/10)),d+=c[2-g][f];return d}
var getShownPageNumber=function(b){var c=bookConfig.pageNumberCaption;if(""==c||void 0==c)return b;b=parseInt(b);c=getShownPageArray();return void 0==c[b]?b:c[b]},getRealPageNumber=function(b){b=getRealPage(b);isNaN(b)&&(b=1);return b},getRealPage=function(b){var c=bookConfig.pageNumberCaption;if(""==c||void 0==c)return parseInt(b);b+="";for(var c=getShownPageArray(),d=-1,f=c.length,g=1;g<=f;g++)if(c[g]+="",c[g]==b){d=g;break}return-1==d?parseInt(b):d},setLocationHash=function(b){bookConfig.updatePageURL&&
(window.location.hash="#p="+getShownPageNumber(b))};var nextPageFun=function(){switch(bookType){case BookType.normal_book:gotoPageFun(2*Math.floor(flipBook.getCurrentPageIndex()/2+1));break;case BookType.single_book:gotoPageFun(parseInt(singlePageBook.currentPageIndex)+1);break;case BookType.slide_book:gotoPageFun(2*Math.floor(slideBook.getRealPageIndex()/2+1));break;case BookType.singleSlide_book:gotoPageFun(parseInt(singleSlideBook.getRealPageIndex())+1);break;case BookType.catalog_book:gotoPageFun(2*Math.floor(catalogBook.getCurrentPageIndex()/
2+1));break;case BookType.singleCatalog_book:gotoPageFun(parseInt(singleCatalogBook.currentIndex)+1)}},previousPageFun=function(){switch(bookType){case BookType.normal_book:gotoPageFun(2*Math.floor(flipBook.getCurrentPageIndex()/2-1)+1);break;case BookType.catalog_book:gotoPageFun(2*Math.floor(catalogBook.getCurrentPageIndex()/2-1)+1);break;case BookType.single_book:gotoPageFun(parseInt(singlePageBook.currentPageIndex)-1);break;case BookType.slide_book:gotoPageFun(2*Math.floor(slideBook.getRealPageIndex()/
2-1)+1);break;case BookType.singleSlide_book:gotoPageFun(singleSlideBook.getRealPageIndex()-1);break;case BookType.singleCatalog_book:gotoPageFun(parseInt(singleCatalogBook.currentIndex)-1)}},firstPageFun=function(){gotoPageFun(1)},lastPageFun=function(){gotoPageFun(originTotalPageCount)},gotoPageFun=function(b,c){if(!isNaN(b))if(statisticalData(1,b),b=parseInt(b),1>b||b>bookConfig.totalPageCount)if(0>BookInfo.getCurrentPages().indexOf(bookConfig.totalPageCount)&&b>bookConfig.totalPageCount)gotoPageFun(bookConfig.totalPageCount);
else if(1!=BookInfo.getCurrentPageIndex()&&1>b)gotoPageFun(1);else{var d=1>b?getLanguage("lblFirst","This is the first page"):getLanguage("lblLast","This is the last page");global._tipsBox||(_tipsBox=new TipsBox(d,bookContainer));_tipsBox.setCaption(d);_tipsBox.showTipsBox()}else if(d=b,BookInfo.isDoublePage()&&(d=2*Math.floor(d/2)+1),passwardType()&&bookConfig.excludeFrontPages&&d>parseInt(bookConfig.excludeFrontPages)&&!verifyPassward())passwardPannel.show();else{switch(bookType){case BookType.normal_book:flipBook.gotoPage(b,
c);break;case BookType.single_book:singlePageBook.gotoPage(b,c);break;case BookType.slide_book:slideBook.gotoPage(b,c);break;case BookType.singleSlide_book:singleSlideBook.gotoPage(b,c);break;case BookType.catalog_book:catalogBook.gotoPage(b,c);break;case BookType.singleCatalog_book:singleCatalogBook.gotoPage(b,c)}global.bookmark&&global.bookmark.elements.refreshElements()}};var BookInfo=Class({statics:{getCurrentPages:function(){function b(b){1<=b&&b<=bookConfig.totalPageCount&&c.push(b)}var c=[];if(this.isDoublePage()){var d=this.getCurrentPageIndex(),d=2*Math.floor(d/2),f=d+1;rightToLeft?(b(f),b(d)):(b(d),b(f))}else d=this.getCurrentPageIndex(),c.push(d);return c},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=
global.flipBook;break;case BookType.single_book:b=global.singlePageBook;break;case BookType.slide_book:b=global.slideBook;break;case BookType.singleSlide_book:b=global.singleSlideBook;break;case BookType.catalog_book:b=global.catalogBook;break;case BookType.singleCatalog_book:b=global.singleCatalogBook}return b},getCurrentPageIndex:function(){var b=this.getBook();return b&&b.getCurrentPageIndex?b.getCurrentPageIndex():-1},isDoublePage:function(){switch(this.getBookType()){case BookType.single_book:return!1;
case BookType.singleSlide_book:return!1;case BookType.singleCatalog_book:return!1}return!0},left:function(){var b=this.getBook();return b&&b.getLeft?b.getLeft():0},top:function(){var b=this.getBook();return b&&b.getTop?b.getTop():0},width:function(){var b=this.getBook();return b&&b.getWidth?b.getWidth():0},height:function(){var b=this.getBook();return b&&b.getHeight?b.getHeight():0},scale:function(){var b=this.getBook();return b&&b.getScale?b.getScale():0},isZoomming:function(){return this.getBook().showPage.parameters.zoomming},
zoomStatus:function(){return this.getBook()&&this.getBook().status_zoom?!0:!1},container:function(){return bookContainer},getThumbnailPages:function(){for(var b=[],c=parseInt(totalPageCount/2),d=0;d<=c;d++){var f=2*d;0==f&&(f=1);f>bookConfig.totalPageCount||b.push(this.getPagesByIndex(f))}return b},getPagesByIndex:function(b){if(1==b||b==totalPageCount)return[b];b=2*parseInt(b/2);return rightToLeft?[b+1,b]:[b,b+1]},isLeftPage:function(b,c){c=void 0==c?this.isDoublePage():c;if(!c&&!rightToLeft)return!1;
if(!c&&rightToLeft||0==b%2&&!rightToLeft||0!=b%2&&rightToLeft)return!0;if(0==b%2&&rightToLeft||0!=b%2&&!rightToLeft)return!1}}});var FormElements=Class({rightToLeft:!1,create:function(b){this.rightToLeft=global.rightToLeft},initElements:virtual_function,initEvent:virtual_function,pickElements:virtual_function,changeLanguage:virtual_function}),FormInfo=Class({statics:{getFormCssClassName:function(b){if(!b)return"";b=b.toLowerCase();return b+"_form"},getFormTitle:function(b){if(!b)return"";b=b.toLowerCase();switch(b){case "about":return getLanguage("btnAbout","About");case "bookmark":return getLanguage("frmBookMark","Bookmark");
case "help":return getLanguage("btnHelp","Help");case "language":return getLanguage("btnLanguage","Language change");case "print":return getLanguage("frmPrintCaption","Print");case "search":return getLanguage("frmSearch","Search");case "setting":return getLanguage("btnSettings","Settings");case "share":return getLanguage("frmShareCaption","Share");case "tableofcontent":return getLanguage("frmToc","Table of Contents");case "videogallery":return getLanguage("frmVideoTitle","Video")}}}}),FormFrame=Class({parent:void 0,
rightToLeft:!1,visible:!1,formType:"",mainColor:"",fontColor:"",mainColorObj:null,fontColorObj:null,elements:null,closeUrl:"",create:function(b){this.options=b;this.parent=this.options.parent;this.formType=this.options.formType;this.rightToLeft=this.options.rightToLeft;this.mainColor=bookConfig.formBackgroundColor?bookConfig.formBackgroundColor:bookConfig.toolbarColor;this.fontColor=bookConfig.formFontColor?bookConfig.formFontColor:bookConfig.iconColor;this.mainColorObj=Color(this.mainColor);this.fontColorObj=
Color(this.fontColor)},onCreate:function(){},setStyle:function(b){this.stage.css(b)},showOrHide:function(){this.visible?this.hide():this.show()},show:function(){this.visible=!0;this.stage.show();this.onShow()},hide:function(){this.visible=!1;this.stage.hide();this.onHide()},onResize:function(){},destroy:function(){},changeLanguage:function(){this.elements&&this.elements.changeLanguage();this.title&&this.title.find("span").html(FormInfo.getFormTitle(this.formType))}}),PhoneFormFrame=Class({create:function(b){this._super(b);
this.closeUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1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ONGW0DwOWMgwmIFWqWi0sBu1ADsACDAA1jMSLYufr4AAAAAASUVORK5CYII=";
this.stage=$("<div class='"+FormInfo.getFormCssClassName(this.formType)+" phone'></div>");this.title=$("<p class='form_title'><span>"+FormInfo.getFormTitle(this.formType)+"</span></p>");this.close=$("<img class='close' src='"+this.closeUrl+"'/>");this.rightToLeft&&this.stage.addClass("rightToLeft");this.close.bind("click",this.hide.bind(this));this.initHtml();this.initEvent();this.onCreate()},onCreate:function(){this.stage.insertBefore(this.parent);this.stage.css({position:"absolute",left:-this.width+
"px",top:0,width:this.width+"px",height:this.height+"px","background-color":colorDiv(this.mainColor,20),color:this.fontColor,overflow:"hidden"})},show:function(){this.visible||(this.visible=!0,this.animate(this.width),this.mask||(this.mask=$("<div class='form_mask_phone'></div>"),this.mask.click(this.hide.bind(this)),this.parent.append(this.mask)),this.mask&&this.mask.show(),BookInfo.getBook().addSearchHighlight())},hide:function(){this.visible&&(this.visible=!1,this.animate(0),this.mask&&this.mask.hide(),
BookInfo.getBook().clearSearchHighlight())},animate:function(b){this.animating=!0;b=transformCSS({tran:{x:b,y:0}});animateOnce(this.stage,b,0.2,function(){this.animating=!1}.bind(this));animateOnce(this.parent,b,0.2,function(){this.animating=!1}.bind(this))},onResize:function(){this.width=Math.min(windowWidth-65,340);this.height=windowHeight;this.stage.css({left:-this.width+"px",width:this.width+"px",height:this.height+"px"});var b=this.visible?transformCSS({tran:{x:this.width,y:0}}):transformCSS({tran:{x:0,
y:0}});this.stage.css(b);this.parent.css(b)},showOrHide:function(){!0===this.visible?this.hide():this.show(this.width)}}).extend(FormFrame),FadeOutFadeForm=Class({create:function(b){this._super(b);this.closeUrl=form_icons.close?"data:image/png;base64,"+form_icons.close:uiBaseURL+"close.png";this.stage=$("<div class='"+FormInfo.getFormCssClassName(this.formType)+"'></div>");this.title=$("<p class='form_title'><span>"+FormInfo.getFormTitle(this.formType)+"</span></p>");this.close=$("<img class='close' src='"+
this.closeUrl+"'/>");this.rightToLeft&&this.stage.addClass("rightToLeft");this.initHtml();this.initEvent();this.onCreate()},onCreate:function(){this.stage.appearance("",function(){this.visible=!1}.bind(this));this.parent.append(this.stage.getDom());this.title&&this.title.css({cursor:"default"});this.hide()},initEvent:function(){this.stage.drag();this.stage.bind(_event._down,function(b){b.stopPropagation()});this.close.bind("click",this.hide.bind(this))},initHtml:virtual_function,onHide:function(){}}).extend(FormFrame),
SlideForm=Class({create:function(b){this._super(b);this.closeUrl=form_icons.close?"data:image/png;base64,"+form_icons.close:uiBaseURL+"close.png";this.stage=$("<div class='"+FormInfo.getFormCssClassName(this.formType)+"'></div>");this.title=$("<p class='form_title'><span>"+FormInfo.getFormTitle(this.formType)+"</span></p>");this.close=$("<img class='close' src='"+this.closeUrl+"'/>");this.rightToLeft&&this.stage.addClass("rightToLeft");this.initHtml();this.initEvent();this.onCreate()},onCreate:function(){this.parent.append(this.stage);
this.title&&this.title.css({cursor:"default"});this.hide()},initEvent:function(){this.stage.drag();this.stage.bind(_event._down,function(b){b.stopPropagation()});this.close.bind("click",this.hide.bind(this))},show:function(){this.visible=!0;this.stage.animate({left:10},400,function(){this.onShow()}.bind(this))},hide:function(){this.visible=!1;this.stage.animate({left:2*-this.width},400,function(){this.onHide()}.bind(this))},onHide:function(){}}).extend(FormFrame),LoadingBook=Class({create:function(b,
c){this.parent=b;this.backgroundColor||(this.backgroundColor="#1F2232")},chooseBookStyle:function(){var b=this.getBookTye();"normal_book"==b?this.init():this.initBookStyle(b)},initBookStyle:function(b){switch(b){case "slide_book":bookType=windowWidth>windowHeight&&bookConfig.showDoublePage?BookType.slide_book:BookType.singleSlide_book;init();if(isPhone()||isPad())toolBar.hide(),global.QRbutton&&QRbutton.hide();break;case "flip_book":bookType=windowWidth>windowHeight&&bookConfig.showDoublePage?BookType.normal_book:
BookType.single_book;init();bookConfig.flipshortcutbutton&&flipShotButton.animate();break;case "catalog_book":bookType=BookType.catalog_book,init()}},getBookTye:function(){var b="normal_book";if("slide"==bookConfig.FlipStyle.toLowerCase()||isBelowIE9())b="slide_book";"flip"!=bookConfig.FlipStyle.toLowerCase()||isBelowIE9()||(b="flip_book");""!=bookConfig.FlipStyle||isBelowIE9()||(b="flip_book");"catalog"!=bookConfig.FlipStyle.toLowerCase()||isBelowIE9()||(b="catalog_book");return b},init:function(){this.container=
$("<div class='book_style_choose_container'></div>");this.bookStyleBox=$("<div class='book_style_box'></div>");this.container.css({"background-color":this.backgroundColor});this.parent.append(this.container);this.container.append(this.bookStyleBox);this.initBookStyleBox()},initBookStyleBox:function(){this.title=$("<p class='title'></p>");this.description=$("<p class='description'></p>");this.flipModel=$("<div class='flipModel'></div>");this.slideModel=$("<div class='slideModel'></div>");this.flipModel.append($("<img src='"+
uiBaseURL+"pc.png'/>").asImageButton());this.slideModel.append($("<img src='"+uiBaseURL+"pad.png'/>").asImageButton());this.bookStyleBox.append(this.title);this.bookStyleBox.append(this.description);this.bookStyleBox.append(this.flipModel);this.bookStyleBox.append(this.slideModel);this.title.html(window.document.title);this.description.html(getLanguage("lblSelectMode","Select View Mode Please.")+"(10)");this.initEvent()},initEvent:function(){this.flipModel.bind(_event._end,function(){window.clearInterval(this.inteval);
this.destroy();this.initBookStyle("flip_book")}.bind(this));this.slideModel.bind(_event._end,function(){window.clearInterval(this.inteval);this.destroy();this.initBookStyle("slide_book")}.bind(this));this.initInterval()},initInterval:function(){var b=10,c=getLanguage("lblSelectMode","Select View Mode Please.");this.inteval=window.setInterval(function(){this.description.html(c+"("+b+")");b--;0>=b&&(window.clearInterval(this.inteval),this.destroy(),this.initBookStyle("flip_book"))}.bind(this),1E3)},
onResize:function(){},destroy:function(){this.container&&(this.container.hide(),this.container.remove(),this.slideModel=this.flipModel=this.bookStyleBox=this.container=void 0)}});
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"],f=0;f<d.length;f++)try{c=new ActiveXObject(d[f]);c.async=!1;c.loadXMLString(b);break}catch(g){}else if(window.DOMParser&&document.implementation&&document.implementation.createDocument)try{domParser=new DOMParser,c=domParser.parseFromString(b,"text/xml")}catch(h){}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"],f=0;f<d.length;f++)try{c=new ActiveXObject(d[f]);break}catch(g){}else if(document.implementation&&document.implementation.createDocument)try{c=document.implementation.createDocument("","",null)}catch(h){}else return null;null!=c&&(c.async=!1,c.load(b));return c}
var PictureListFrame=Class({create:function(){this.currentPageIndex=1;this.imageWidth=100;this.leftButtonUrl=form_icons.print_left?"data:image/png;base64,"+form_icons.print_left:uiBaseURL+"print_left.png";this.rightButtonUrl=form_icons.print_right?"data:image/png;base64,"+form_icons.print_right:uiBaseURL+"print_right.png";this.initDefaultDom();this.initHtml();this.initEvent();this.fillContent(this.currentPageIndex)},initDefaultDom:function(){this.thumbnail=$("<div class='thumbnail'></div>");this.page=
$("<div class='page'></div>");this.image=$("<img/>");this.leftBtn=$("<img class='leftBtn btn' src='"+this.leftButtonUrl+"'/>");this.rightBtn=$("<img class='rightBtn btn' src='"+this.rightButtonUrl+"'/>");this.thumbnail.append(this.image);this.thumbnail.append(this.page)},initEvent:function(){this.leftBtn.onTap(function(){this.fillContent(this.currentPageIndex-1)}.bind(this));this.rightBtn.onTap(function(){this.fillContent(this.currentPageIndex+1)}.bind(this))},fillContent:function(b){if(!(1>b||b>
bookConfig.totalPageCount)){this.currentPageIndex=b;var c=function(b){this.image.attr("src",b);this.image.css({width:this.imageWidth+"px"})}.bind(this);this.analysis=new AnalysisThumbnail(b,c);this.fillPage(b)}},fillPage:function(b){this.page.html(b+"/"+bookConfig.totalPageCount)}}),PictureListForm=Class({initHtml:function(){this.stage=$("<div class='pictureList_win10'></div>");this.stage.append(this.thumbnail);this.stage.append(this.leftBtn);this.stage.append(this.rightBtn)},getDom:function(){return this.stage}}).extend(PictureListFrame),
AnalysisPrint=Class({create:function(b){this.printArea=$("<div></div>");this.button=b;this.initPrintEvent()},getImageSizeForMM:function(b,c){return b/210>=c/297?{width:210,height:Math.floor(210*c/b)}:{width:Math.floor(297*b/c),height:297}},getImageSizeForInches:function(b,c){return b/8.26>=c/11.69?{width:8.26,height:Number.fixed(8.26*c/b,2)}:{width:Number.fixed(11.69*b/c,2),height:11.69}},getImageSizeForIE:function(b,c){return b/8>=c/11.3?{width:8,height:Number.fixed(8*c/b,2)}:{width:Number.fixed(11.3*
b/c,2),height:11.3}},printPages:function(b){var c=0;this.printArea.empty();for(var d=0;d<b.length;d++){var f=b[d],g=$("<div style='position:relative'></div>");0<d&&g.css({"page-break-before":"always"});var h=getPageDir(f,"normal",originTotalPageCount),f=$("<img style='width:100%;height:100%' />");g.append(f);this.printArea.append(g);var k=this;f.load(function(){c++;var d=isIE()?k.getImageSizeForIE(this.naturalWidth,this.naturalHeight):k.getImageSizeForInches(this.naturalWidth,this.naturalHeight);
$(this).parent().css({width:d.width+"in",height:d.height+"in"});c==b.length&&k.printArea.printArea()});f.attr("src",h);parseBool(bookConfig.PrintButtonVisible)&&""!=bookConfig.printWatermarkFile&&(g=$("<img src = '"+bookConfig.printWatermarkFile+"'/>"),g.css({"z-index":"201",left:"10",top:"10",position:"absolute"}),f.append(g))}},getPages:function(b){if("all"==b){b=[];for(var c=1;c<=bookConfig.totalPageCount;c++)b.push(c);return b}return"current"==b?BookInfo.getCurrentPages():getPagesByRange(b)},
initPrintEvent:function(){this.button.onTap(function(b){this.printType=this.button.printType;switch(this.printType){case "printAll":b=this.getPages("all");this.printPages(b);break;case "printCurrent":b=this.getPages("current");this.printPages(b);break;case "printRange":b=$("#print_range_num").val(),b=this.getPages(b),this.printPages(b)}}.bind(this))}}),PrintElements=Class({create:function(b){this._super(b);this.printOnUrl=form_icons.print_on?"data:image/png;base64,"+form_icons.print_on:uiBaseURL+
"print_on.png";this.printOffUrl=form_icons.print_off?"data:image/png;base64,"+form_icons.print_off:uiBaseURL+"print_off.png";this.initElements();this.initEvent(b);this.pickElements(b)},initElements:function(){this.printAll=$("<div class='printAll item' print='printAll'><img src='"+this.printOffUrl+"'/><span class='title'>"+getLanguage("frmPrintall","Print All Pages")+"</span></div>");this.printCurrent=$("<div class='printCurrent item on' print='printCurrent'><img src='"+this.printOnUrl+"'/><span class='title'>"+
getLanguage("frmPrintcurrent","Print Current Pages")+"</span></div>");this.printRange=this.rightToLeft?$("<div class='printRange item' print='printRange'><img src='"+this.printOffUrl+"'/><input id='print_range_num' dir='rtl' placeholder='"+getLanguage("frmPrintexample","Exzample:1,3-7,12")+"'></input><span class='title'>"+getLanguage("frmPrintRange","Print Range")+"</span></div>"):$("<div class='printRange item' print='printRange'><img src='"+this.printOffUrl+"'/><span class='title'>"+getLanguage("frmPrintRange",
"Print Range")+"</span><input id='print_range_num' placeholder='"+getLanguage("frmPrintexample","Example:1,3-7,12")+"'></input></div>");this.printButton=$("<div class='printButton title button_hover'>"+getLanguage("frmPrintbtn","Print")+"</div>");this.printButton.printType="printCurrent";this.analysis=new AnalysisPrint(this.printButton);this.pictureListForm=new PictureListForm},pickElements:function(b){b.printOnUrl=this.printOnUrl;b.printOffUrl=this.printOffUrl;b.printAll=this.printAll;b.printCurrent=
this.printCurrent;b.printRange=this.printRange;b.printButton=this.printButton;b.pictureListForm=this.pictureListForm},initEvent:function(b){this.printAll.click(function(c){this.buttonEvent(b,c.delegateTarget)}.bind(this));this.printCurrent.click(function(c){this.buttonEvent(b,c.delegateTarget)}.bind(this));this.printRange.click(function(c){this.buttonEvent(b,c.delegateTarget)}.bind(this));this.printRange.find("input").on("input propertychange change",function(){this.refreshPrintButton()}.bind(this));
this.printRange.find("input").bind("mousedown touchstart pointerdown mouseover mousemove",function(b){b.stopPropagation()})},buttonEvent:function(b,c){var d=b.stage.find(".on");d.find("img").attr("src",this.printOffUrl);d.find("img")[0].colorChanged=!1;d.removeClass("on");$(c).find("img").attr("src",this.printOnUrl);$(c).find("img")[0].colorChanged=!1;$(c).addClass("on");d=$(c).attr("print");b.printButton.printType=d;this.refreshPrintButton();b.changeItemColor()},refreshPrintButton:function(){"printRange"!=
this.printButton.printType||$("#print_range_num").val()?this.lightPrintButton():this.darkPrintButton()},lightPrintButton:function(){$(this.printButton).addClass("usable");$(this.printButton).removeClass("disable");$(this.printButton).addClass("button_hover")},darkPrintButton:function(){"printRange"==this.printButton.printType&&($(this.printButton).removeClass("usable"),$(this.printButton).removeClass("button_hover"),$(this.printButton).addClass("disable"))},changeLanguage:function(){this.printAll.find(".title").html(getLanguage("frmPrintall",
"Print All Pages"));this.printCurrent.find(".title").html(getLanguage("frmPrintcurrent","Print Current Pages"));this.printRange.find(".title").html(getLanguage("frmPrintRange","Print Range"));this.printRange.find("#print_range_num").attr("placeholder",getLanguage("frmPrintexample","Exzample:1,3-7,12"));this.printButton.html(getLanguage("frmPrintbtn","Print"))}}).extend(FormElements),PhonePrintElements=Class({create:function(b){this._super(b);this.printOnUrl=form_icons.print_on_phone?"data:image/png;base64,"+
form_icons.print_on_phone:phoneBaseURL+"print_on_phone.png";this.printOffUrl=form_icons.print_off_phone?"data:image/png;base64,"+form_icons.print_off_phone:phoneBaseURL+"print_off_phone.png";this.initElements();this.initEvent(b);this.pickElements(b)}}).extend(PrintElements),PhonePrintForm=Class({create:function(b){this.elements=new PhonePrintElements(this);this._super(b)},onCreate:function(){this.printAll.css({"background-color":this.fontColor,color:this.mainColor});this.printCurrent.css({"background-color":this.fontColor,
color:this.mainColor});this.printRange.css({"background-color":this.fontColor,color:this.mainColor});this.printButton.css({"background-color":this.fontColor,color:this.mainColor});this.close.changeButtonColor(this.fontColor);this._super()},initHtml:function(){this.title.append(this.close);this.stage.append(this.title);this.stage.append(this.printAll);this.stage.append(this.printCurrent);this.stage.append(this.printRange);this.stage.append(this.printButton)},changeItemColor:function(){},onShow:function(){this.close.changeButtonColor(this.fontColor)},
initEvent:function(){}}).extend(PhoneFormFrame);global.textForPages||(global.textForPages=[]);global.positionForPages||(global.positionForPages=[]);
var highlightSearchFun=function(b,c){if(0!=positionForPages.length&&b){var d=!1;window.frmSearch&&frmSearch.visible&&0!=frmSearch.getList().length||(d=!0);window.foldingMenu&&foldingMenu.visible&&foldingMenu.currentItem&&foldingMenu.currentItem.id&&"miSearch"==foldingMenu.currentItem.id&&(d=!1);var f=search_Text;""==f&&(d=!0);if(!0==d)clearHighlightFun(b);else{for(var g,d=0;d<positionForPages.length;d++)if(positionForPages[d]&&positionForPages[d].page&&positionForPages[d].page==c){g=positionForPages[d].positions;
break}if(void 0==g)clearHighlightFun(b);else{var h="url("+uiBaseURL+"highlight.png)",k="",l="",m="",n="";if(0<g.length){for(d=0;d<g.length;d++){var p=g[d];if(p&&p.word&&-1<p.word.toLowerCase().indexOf(f))var q=p.left/(1-p.width),t=p.top/(1-p.height),k=k+h+",",n=n+"no-repeat,",l=l+100*q+"% "+100*t+"%,",m=m+100*p.width+"% "+100*p.height+"%,"}0<k.length?(k=k.substr(0,k.length-1),n=n.substr(0,n.length-1),l=l.substr(0,l.length-1),m=m.substr(0,m.length-1),b.css({"background-image":k,"background-repeat":n,
"background-position":l,"-webkit-background-size":m,"-o-background-size":m,"background-size":m,display:"block"})):clearHighlightFun(b)}else clearHighlightFun(b)}}}},clearHighlightFun=function(b){b.css({"background-image":""});b.css({display:"none"})},search_Text="",SearchElements=Class({create:function(b){this._super(b);this.callBack=b;this.initElements();this.initEvent(b);this.pickElements(b)},initElements:function(){this.searchButtonUrl=form_icons.search_form?"data:image/png;base64,"+form_icons.search_form:
uiBaseURL+"search_form.png";this.searchList=[];this.searchText="";this.input=$("<input class='input_search'></input>");this.searchButton=$("<img class='searchButton' src='"+this.searchButtonUrl+"'/>");this.searchResult=$("<p class='result'></p>");if(isPhone()||isPad())this.searchButton=$("<div class='searchButton'></div>"),this.searchButton.addCssSprite(phoneIconsURL[0],"searchButton",15,15,phoneIconInfo);this.initSwiper()},initSwiper:function(){this.searchSwiper=$("<div class='stage'></div>");this.searchSwiperList=
$("<div class='swiper'></div>");this.searchSwiper.append(this.searchSwiperList);isPhone()||isPad()?this.searchSwiper.css({"overflow-y":"auto","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}):(this.progress=$("<div class='progress'></div>"),this.progressBar=$("<div class='progressBar'></div>"),this.searchSwiper.append(this.progress),this.progress.append(this.progressBar),this.searchSwiper.scroll({},Direction.top))},refreshSwiper:function(b,c){for(var d=c.length,f=0;f<d;f++)this.addItem(b,
c[f])},addItem:function(b,c){c.searchText=this.searchText;var d=new this.callBack.newSearchItem(b,c);this.searchList.push(d)},ewSearchItem:function(b,c){return new SearchItem(b,c)},initEvent:function(){this.searchButton.onTap(function(){this.searchStart()}.bind(this));this.input.bind("keydown",function(b){13==b.keyCode&&this.searchStart();b.stopPropagation()}.bind(this));this.input.bind("mousedown touchstart pointerdown mouseover mousemove",function(b){b.stopPropagation()})},refresh:function(){isPhone()||
isPad()||this.searchSwiper.refreshData()},search:function(b){b&&"string"==typeof b&&(this.input.val(b),this.searchStart())},searchStart:function(){statisticalData(6,BookInfo.getBook().getCurrentPageIndex());var b=this.input.val().toLowerCase();0==b.length?this.searchResult.html(getLanguage("frmSearchPrompt","Enter key to search.")):0<bookConfig.leastSearchChar&&b.length<bookConfig.leastSearchChar?this.searchResult.html(getLanguage("pnlSearchInputInvalid","The search text is too short.")):this.searchText!=
b&&(search_Text=this.searchText=b,this.searchSwiper.loading(),this.analysisData=new AnalysisSearch(b,this.doSearch.bind(this)))},doSearch:function(b){this.searchSwiper.hideLoading();this.searchList=b;this.searchSwiperList.empty();rightToLeft?this.searchResult.html("<span style='color:"+bookConfig.searchKeywordFontColor+";'>"+this.searchList.length+"</span> "+getLanguage("lblPages","Found Pages")):this.searchResult.html(getLanguage("lblPages","Found Pages")+" <span style='color:"+bookConfig.searchKeywordFontColor+
";'>"+this.searchList.length+"</span>");this.refreshSwiper(this.searchSwiperList,this.searchList);this.refresh();BookInfo.getBook().addSearchHighlight()},getSearchText:function(){return this.searchText},getList:function(){return this.searchList},clear:function(){search_Text=this.searchText="";this.input.val("");this.searchList=[];BookInfo.getBook().clearSearchHighlight();this.searchSwiperList.empty();this.searchResult.html(getLanguage("frmSearchPrompt","Enter key to search."));this.refresh()},pickElements:function(b){b.searchButtonUrl=
this.searchButtonUrl;b.searchList=this.searchList;b.searchText=this.searchText;b.input=this.input;b.searchButton=this.searchButton;b.searchResult=this.searchResult;b.searchSwiper=this.searchSwiper;b.searchSwiperList=this.searchSwiperList;b.progress=this.progress;b.progressBar=this.progressBar;b.search=this.search.bind(this)},changeLanguage:function(){}}).extend(FormElements),loadSearchFlag=!1,AnalysisSearch=Class({create:function(b,c){this.callback=c;this.results=[];this.search(b)},search:function(b){if(!1==
loadSearchFlag)if(isTouchDevice())loadJavascript(bookConfig.searchTextJS,function(){loadSearchFlag=!0;this.doSsearch(b)}.bind(this),function(){loadSearchFlag=!0;this.doSsearch(b)}.bind(this));else{var c=!1,d=!1,f=function(){c&&d&&(loadSearchFlag=!0,this.doSsearch(b))}.bind(this);loadJavascript(bookConfig.searchTextJS,function(){c=!0;f()},function(){c=!0;f()});var g=String.format(bookConfig.searchPositionJS,BookInfo.getCurrentPageIndex());loadJavascript(g,function(){d=!0;f()},function(){d=!0;f()})}else this.doSsearch(b)},
doSsearch:function(b){this.results=searchFromPages(textForPages,b);this.callback(this.results)},getList:function(){return this.results},clear:function(){this.results=[]}}),SearchItem=Class({create:function(b,c){this.fontColor=c.fontColor;this.parent=b;this.parm=c;this.sDescription=this.handleData(c.search_text,c.searchText);this.index=c.search_page;this.sPage=getShownPageNumber(c.search_page);this.sPageTitle=getLanguage("lblPage","Page");this.initHtml();this.initEvent()},initHtml:function(){this.initElement();
this.item.append(this.page);this.item.append(this.description);this.parent.append(this.item)},initElement:function(){this.item=$("<div class='item'></div>");rightToLeft?(this.page=$("<div class='page'>"+this.sPage+":"+this.sPageTitle+"</div>"),LanguageTool.isRightToLeft(this.parm.search_text)?this.description=$("<div class='description rtl'>"+this.sDescription+"</div>"):this.description=$("<div class='description'>"+this.sDescription+"</div>")):(this.page=$("<div class='page'>"+this.sPageTitle+":"+
this.sPage+"</div>"),this.description=$("<div class='description'>"+this.sDescription+"</div>"))},handleData:function(b,c){var d;d=HTMLString.toLabel(b);d=handleData(d,c);return d=HTMLString.riseAWord(d,c,bookConfig.searchKeywordFontColor)},initEvent:function(){this.item.bind("mouseover",function(){this.item.css({"background-color":Color(this.fontColor).rgba(0.25)})}.bind(this));this.item.bind("mouseleave",function(){this.item.css({"background-color":"transparent"})}.bind(this));this.item.onTap(function(){gotoPageFun(this.index);
(isPhone()||isPad())&&global.frmSearch.hide()}.bind(this))}}),PhoneSearchItem=Class({}).extend(SearchItem),PhoneSearchForm=Class({create:function(b){this.elements=new SearchElements(this);this._super(b)},onCreate:function(){this.stage.css({color:this.fontColor,"background-color":this.mainColor});this.input.css({color:"#000000",opacity:1});var b=new Color(this.mainColor),b=String.format("%s %s %s %s",b.reduce(40),b.reduce(40),b.add(40),b.add(40));this.input.css({"border-color":b});this.close.changeButtonColor(this.fontColor);
this._super()},initHtml:function(){this.title.append(this.close);this.stage.append(this.title);this.stage.append(this.input);this.stage.append(this.searchButton);this.stage.append(this.searchResult);this.stage.append(this.searchSwiper)},newSearchItem:function(b,c){return new PhoneSearchItem(b,c)},getList:function(){return this.elements.getList()},onShow:function(){this.close.changeButtonColor(this.fontColor)},onResize:function(){this._super();this.searchSwiper.css("height",this.height-125+"px");this.input.css("width",
this.width-60+"px");this.elements.refresh()},initEvent:function(){}}).extend(PhoneFormFrame),LanguageElements=Class({create:function(b){this._super(b);this.initElements();this.initEvent(b);this.pickElements(b)},initElements:function(){this.choosedUrl=uiBaseURL+"choosed.png";this.itemArray=[];this.scrollBox=$("<div class='scrollBox'></div>");for(var b=0;b<language.length;b++)language[b]&&language[b].language&&this.addItem(language[b].language)},addItem:function(b){if(b){var c=b;if(isPhone()||isPad())c=
"&nbsp;&nbsp;&nbsp;"+b;var d=$("<div class='item'><div class='title'>"+c+"<div/><img src='"+this.choosedUrl+"'/></div>");b.toLowerCase()===bookConfig.language.toLowerCase()&&(d.addClass("focus"),this.currentItem=d);d.bind(_event._end,function(){this.refreshLanguage(b);this.currentItem=d;this.scrollBox.find(".focus").removeClass("focus");d.addClass("focus")}.bind(this));this.scrollBox.append(d);this.itemArray.push(d)}},refreshLanguage:function(b){bookConfig.language=b;changeLanguage(bookConfig.language)},
initEvent:function(b){},pickElements:function(b){b.choosedUrl=this.choosedUrl;b.itemArray=this.itemArray;b.scrollBox=this.scrollBox},changeLanguage:function(){}}).extend(FormElements);
Class("PcLanguageForm",{create:function(b){this.elements=new LanguageElements(this);this._super(b)},onCreate:function(){this.close.changeButtonColor(this.color);this._super()},initEvent:function(){this._super();this.stage.bind(_event._end,function(){this.hide()}.bind(this));for(var b=0;b<this.itemArray.length;b++)this.itemArray[b].bind(_event._end,function(){this.hide()}.bind(this))},initHtml:function(){this.title.append(this.close);this.stage.append(this.title);this.stage.append(this.scrollBox)},
onResize:function(){},onShow:function(){}}).extend(FadeOutFadeForm);
var PhoneLanguageForm=Class({create:function(b){this.elements=new LanguageElements(this);this._super(b)},onCreate:function(){this._super();this.close.changeButtonColor(this.fontColor)},initEvent:function(){},initHtml:function(){this.title.append(this.close);this.stage.append(this.title);this.stage.append(this.scrollBox)},onResize:function(){this._super();this.scrollBox.css("height",this.height-36+"px")},onShow:function(){}}).extend(PhoneFormFrame),SettingElements=Class({create:function(b){this._super(b);
this.initElements();this.initEvent(b);this.pickElements(b)},initElements:function(){this.choosedUrl=uiBaseURL+"choosed.png";this.unChoosedUrl=uiBaseURL+"unchoosed.png";this.scrollBox=$("<div class='scrollBox'></div>");var b=this.choosedUrl,c="&nbsp;&nbsp;&nbsp;"+getLanguage("closeFlipSound","Close Flip Sound"),d="&nbsp;&nbsp;&nbsp;"+getLanguage("closeBackgroundSound","Close Background Sound");this.flipSoundBtn=$("<div class='item'><div class='title'>"+c+"<div/><img src='"+b+"'/></div>");this.backgroundSoundBtn=
$("<div class='item' id='btnSound'><div class='title'>"+d+"<div/><img src='"+b+"'/></div>");bookConfig.FlipSound&&this.scrollBox.append(this.flipSoundBtn);bookConfig.BackgroundSoundButtonVisible&&this.scrollBox.append(this.backgroundSoundBtn)},initEvent:function(b){this.flipSoundBtn.bind(_event._end,function(){(flipSoundIsPlaying=!flipSoundIsPlaying)?(this.flipSoundBtn.find("img").attr("src",this.choosedUrl),playFlipSound()):this.flipSoundBtn.find("img").attr("src",this.unChoosedUrl)}.bind(this));
this.backgroundSoundBtn.bind(_event._end,function(){!0===isPlaying?this.backgroundSoundBtn.find("img").attr("src",this.unChoosedUrl):this.backgroundSoundBtn.find("img").attr("src",this.choosedUrl)}.bind(this))},pickElements:function(b){b.choosedUrl=this.choosedUrl;b.unChoosedUrl=this.unChoosedUrl;b.scrollBox=this.scrollBox;b.flipSoundBtn=this.flipSoundBtn;b.backgroundSoundBtn=this.backgroundSoundBtn},changeLanguage:function(){this.itemArray[0].title.html("&nbsp;&nbsp;&nbsp;"+getLanguage("closeFlipSound",
"Close Flip Sound"));this.itemArray[1].title.html("&nbsp;&nbsp;&nbsp;"+getLanguage("closeBackgroundSound","Close Background Sound"))}}).extend(FormElements),PhoneSettingForm=Class({create:function(b){this.elements=new SettingElements(this);this._super(b)},onCreate:function(){this.close.changeButtonColor(this.fontColor);this._super()},initHtml:function(){this.title.append(this.close);this.stage.append(this.title);this.stage.append(this.scrollBox)},initEvent:function(){},onShow:function(){this.close.changeButtonColor(this.fontColor)},
changeLanguage:function(){this.elements.changeLanguage()}}).extend(PhoneFormFrame),HelpElements=Class({create:function(b){this._super(b);this.initElements();this.initEvent(b);this.pickElements(b)},initElements:function(){bookConfig.helpContentFileURL?this.image=$("<img class='logo' src='"+bookConfig.helpContentFileURL+"'/>"):(this.helpUrl=form_icons.help_form?"data:image/png;base64,"+form_icons.help_form:uiBaseURL+"help_form.png",this.image=$("<img class='logo' src='"+this.helpUrl+"'/>"),this.title1=
$("<p class='description'>"+getLanguage("lblHelp1","Drag the page corner to view")+"</p>"),this.title2=$("<p class='description'>"+getLanguage("lblHelp2","Double click to zoom in, out")+"</p>"))},initEvent:function(b){},pickElements:function(b){b.helpUrl=this.helpUrl;b.image=this.image;b.title1=this.title1;b.title2=this.title2},changeLanguage:function(){this.title1&&this.title1.html(getLanguage("lblHelp1","Drag the page corner to view"));this.title2&&this.title2.html(getLanguage("lblHelp2","Double click to zoom in, out"))}}).extend(FormElements);
(function(b){var c=window.location.href.toLowerCase();!(-1<c.indexOf("fliphtml5.com")||-1<c.indexOf("pubhtml5.com"))||-1<c.indexOf("amazonaws.com")||b.loadJavascript("//connect.facebook.net/en_US/sdk.js")})(global);
var share_url=window.location.href.removeStartFrom("#p="),share_title=window.document.title,share_description,share_screenshot,AnalysisShare=Class({create:function(){share_screenshot=Directory.getFilePath(share_url).substring(0,share_url.lastIndexOf("/"))+"/"+bookConfig.thumbPath+"1.jpg";0<=bookConfig.thumbPath.indexOf("../")&&(share_screenshot=Directory.getFilePath(share_url).substring(0,share_url.lastIndexOf("/")),share_screenshot=Directory.getUpperFilePath(share_screenshot)+bookConfig.thumbPath.remove("../")+
"1.jpg");share_description=bookConfig.bookDescription;bookConfig.socialShareLink&&(share_url=bookConfig.socialShareLink);this.refreshList()},getList:function(){return this.shareList},refreshList:function(){this.url=Metacharacter(share_url);this.title=Metacharacter(share_title);this.screenshot=Metacharacter(share_screenshot);this.description=Metacharacter(share_description);this.shareList=window.shareObj?this.initShareList():this.initDefaultShareList()},initShareList:function(){if(!window.shareObj||
0>=window.shareObj.length)return[];for(var b=window.shareObj.length,c=[],d=0;d<b;d++){var f=this.fixItemInfo(window.shareObj[d]);c.push(f)}return c},fixItemInfo:function(b){if(b){var c=share_url,d="",f="";try{d=window.parent.location.href,f=window.top.location.href}catch(g){}var h=window.document.title,k=c.substring(0,c.lastIndexOf("/"))+"/"+bookConfig.thumbPath+"1.jpg",l=b.url+"";0<=l.indexOf("${url_no_page}")&&(l=l.remove("${url_no_page}"),c=c.removeStartFrom("#p="),d=d.removeStartFrom("#p="),f=
f.removeStartFrom("#p="));l=l.replaceAll("${url}",c,!0);l=l.replaceAll("${url_parent}",d,!0);l=l.replaceAll("${url_top}",f,!0);l=l.replaceAll("${shot-img}",k,!0);l=l.replaceAll("${title}",h,!0);c=b.logo+"";bookConfig.isFlipPdf&&c.startsWith("./")&&(c="."+c);return{url:l,logo:c,title:b.title+""}}},initDefaultShareList:function(){return[{logo:uiBaseURL+"facebook.png",url:"javascript:ShareToFaceBook({url:share_url, title:share_title, screenshot:share_screenshot, description:share_description})",title:"Facebook",
name:"facebook"},{logo:uiBaseURL+"google.png",url:"https://plus.google.com/share?url="+this.url,title:"Google",name:"google"},{logo:uiBaseURL+"email.png",url:getEmailUrl(),title:"Email",name:"email"},{logo:uiBaseURL+"twitter.png",url:"https://twitter.com/intent/tweet?url="+this.url+"&text="+this.title,title:"Twitter",name:"twitter"},{logo:uiBaseURL+"linkedin.png",url:"http://www.linkedin.com/shareArticle?url="+this.url+"&title="+this.title,title:"Linkedin",name:"linkedin"},{logo:uiBaseURL+"digg.png",
url:"http://digg.com/submit?url="+this.url+"&title="+this.title,title:"Digg",name:"digg"},{logo:uiBaseURL+"reddit.png",url:"http://reddit.com/submit?url="+this.url+"&title="+this.title,title:"Reddit",name:"reddit"},{logo:uiBaseURL+"more.png",url:"http://www.addthis.com/bookmark.php?v=300&url="+this.url+"&title="+this.title+"&description="+this.description+"&screenshot="+this.screenshot,title:"More",name:"share_more"}]}}),ShareToFaceBook=function(b){var c=function(){var b=getHost(window.location.href).toLowerCase();
if(-1<b.indexOf("fliphtml5.com"))return"759223277462081";if(-1<b.indexOf("pubhtml5.com"))return"552959651503135"};(function(){var d=getHost(window.location.href).toLowerCase();(-1<d.indexOf("fliphtml5.com")||-1<d.indexOf("pubhtml5.com"))&&global.FB?(FB.init({appId:c(),status:!0,xfbml:!1,version:"v2.4"}),FB.ui({method:"feed",link:share_url.toString(),name:b.title,picture:b.screenshot,description:b.description})):window.open("http://www.facebook.com/sharer.php?u="+share_url.toString()+"&picture="+b.screenshot)})()},
getEmailUrl=function(){if(!bookConfig.btnShareWithEmailSubject&&!bookConfig.btnShareWithEmailBody)return"https://mail.google.com/mail/u/0/?view=cm&fs=1&tf=1&su="+share_title+"&body="+(share_title+"%0D%0A"+share_url);var b=bookConfig.btnShareWithEmailSubject?bookConfig.btnShareWithEmailSubject:share_title,c=bookConfig.btnShareWithEmailBody?bookConfig.btnShareWithEmailBody:share_description,c=c.replaceAll("{link}",share_url,!0),c=c.replaceAll("{thumb}",share_screenshot,!0),c=c.replaceAll("{title}",
share_title,!0);return"mailto:?subject="+b+"&body="+c},PhoneShareItem=Class({create:function(b){b&&(this.info=b,this.initItem())},initItem:function(){-1<this.info.url.indexOf("javascript")?this.link=$("<a target='_blank' href='#' onclick='"+this.info.url.remove("javascript:")+";return false;'></a>"):this.link=$("<a target='_blank' href='"+this.info.url+"'></a>");this.item=$("<div class='item'></div>");window.shareObj?this.logo=$("<img class='logo' src='"+this.info.logo+"'/>"):(this.logo=$("<div class='logo'></div>"),
this.logo.addCssSprite(phoneIconsURL[0],this.info.name,40,40,phoneIconInfo));this.title=$('<div class="logo_title">'+this.info.title+"</div>");this.link.append(this.item);this.info.logo&&this.item.append(this.logo);this.item.append(this.title);this.item.css({color:this.info.fontColor})},appendTo:function(b){this.parent=b;this.parent.append(this.link)}}),ShareElements=Class({create:function(b){this._super(b);this.itemArray=[];global.share_url=window.location.href.removeStartFrom("#p=");this.initElements();
this.initEvent(b);this.pickElements(b)},initElements:function(){this.analysisShare=new AnalysisShare;this.shareList=this.analysisShare.getList();this.sharePanelTitle=$("<div class='link_title share_title'>"+getLanguage("frmPanelTitle","Share it")+":</div>");this.linkTitle=$("<div class='link_title'>"+getLanguage("frmLinkLabel","Link")+":</div>");this.linkArea=$("<input class='link_input'></input>");this.copy1=$("<div class='copy button_hover'>"+getLanguage("lblCopy","Copy")+"</div>");this.insertToSite=
$("<div class='link_title'>"+getLanguage("frminsertLabel","Insert to Site")+":</div>");this.insertArea=$("<textarea class='insert_input'></textarea>");this.copy2=$("<div class='copy copy2 button_hover'>"+getLanguage("lblCopy","Copy")+"</div>");this.sharePanel=$("<div class='sharePanel'></div>");this.fillArea();this.addItem(this.sharePanel)},fillArea:function(){var b=share_url;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.linkArea&&this.linkArea.val(b);this.insertArea&&this.insertArea.val(c)},addItem:function(b){if(this.shareList&&!(0>this.shareList.length))for(b=0;b<this.shareList.length;b++){var c=-1<this.shareList[b].url.indexOf("javascript")?$("<a target = '_blank' href='#' onclick='"+this.shareList[b].url.remove("javascript:")+";return false;' title='"+this.shareList[b].title+"'><img src='"+this.shareList[b].logo+
"'/></a>"):$("<a target = '_blank' href='"+this.shareList[b].url+"' title='"+this.shareList[b].title+"'><img src='"+this.shareList[b].logo+"'/></a>");this.sharePanel.append(c);this.itemArray.push(c)}},initEvent:function(b){this.copy1.onTap(function(){this.copyFrom(this.linkArea)}.bind(this));this.copy2.onTap(function(){this.copyFrom(this.insertArea)}.bind(this));this.linkArea.onTap(function(){this.linkArea.select()}.bind(this));this.insertArea.onTap(function(){this.insertArea.select()}.bind(this));
this.linkArea.bind("mousedown touchstart pointerdown mouseover mousemove",function(b){b.stopPropagation()});this.insertArea.bind("mousedown touchstart pointerdown mouseover mousemove",function(b){b.stopPropagation()});this.linkInputChnagedEvent()},linkInputChnagedEvent:function(){if(this.linkArea)this.linkArea.on("input propertychange change",function(){var b=this.linkArea.val();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.insertArea&&this.insertArea.val(c);share_url=b;this.analysisShare.refreshList();this.shareList=this.analysisShare.getList();for(b=0;b<this.itemArray.length;b++)c=this.itemArray[b],-1<this.shareList[b].url.indexOf("javascript")?c.attr("onclick",this.shareList[b].url.remove("javascript:")+";return false;"):c.attr("href",this.shareList[b].url)}.bind(this))},copyFrom:function(b){if(b){b.focus();
b.select();try{document.execCommand("Copy")}catch(c){b=b.val(),copyToClipboard(b)}}},pickElements:function(b){b.itemArray=this.itemArray;b.analysisShare=this.analysisShare;b.shareList=this.shareList;b.linkTitle=this.linkTitle;b.linkArea=this.linkArea;b.copy1=this.copy1;b.insertToSite=this.insertToSite;b.insertArea=this.insertArea;b.copy2=this.copy2;b.sharePanel=this.sharePanel;b.sharePanelTitle=this.sharePanelTitle},changeLanguage:function(){this.sharePanelTitle.html(getLanguage("frmPanelTitle","Share it")+
":");this.linkTitle.html(getLanguage("frmLinkLabel","Link")+":");this.copy1.html(getLanguage("lblCopy","Copy"));this.insertToSite.html(getLanguage("frminsertLabel","Insert to Site")+":");this.copy2.html(getLanguage("lblCopy","Copy"))}}).extend(FormElements),PhoneShareForm=Class({create:function(b){this.elements=new ShareElements(this);this._super(b)},onCreate:function(){this.stage.css({color:this.fontColor});this.close.changeButtonColor(this.fontColor);this._super()},initHtml:function(){this.initSwiper();
this.title.append(this.close);this.stage.append(this.shareSwiper)},initSwiper:function(){this.shareSwiper=$("<div class='shareSwiper stage'></div>");this.shareSwiperList=$("<div class='swiper'></div>");this.refreshSwiper(this.shareSwiperList,this.shareList);this.shareSwiper.append(this.title);this.shareSwiper.append(this.shareSwiperList);isPhone()||isPad()?this.shareSwiper.css({"overflow-y":"auto","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}):(this.progress=$("<div class='progress'></div>"),
this.progressBar=$("<div class='progressBar'></div>"),this.shareSwiper.append(this.progress),this.progress.append(this.progressBar),this.shareSwiper.scroll({},Direction.top))},refreshSwiper:function(b,c){for(var d=c.length,f=0;f<d;f++)this.addItem(b,c[f])},addItem:function(b,c){c&&(c.fontColor=this.fontColor,(new PhoneShareItem(c)).appendTo(b))},refresh:function(){isPhone()||isPad()||this.shareSwiper.refreshData()},initEvent:function(){},onShow:function(){this.close.changeButtonColor(this.fontColor)}}).extend(PhoneFormFrame),
AboutElements=Class({create:function(b){this._super(b);this.initElements();this.initEvent(b);this.pickElements(b)},initElements:function(){this.contactTitle=$("<span class='content_title contact_title'>"+getLanguage("frmaboutcaption","Contact")+"</span>");this.descriptionTitle=$("<span class='content_title description_title'>"+getLanguage("frmaboutDESCRIPTION","Description")+"</span>");this.rightToLeft?this.initRightToLeftDom():this.initLeftToRightDom();this.logo=$("<a href='"+bookConfig.AboutWebsite+
"'><img class='logo' src='"+bookConfig.CompanyLogoFile+"'/></a>")},initRightToLeftDom:function(){this.author=$("<div class='author item'><div class='content rtl'>"+bookConfig.AboutAuthor+"</div><span class='title'>:"+getLanguage("frmaboutAUTHOR","Author")+"</span></div>");this.address=$("<div class='address item'><div class='content rtl'>"+bookConfig.AboutAddress+"</div><span class='title'>:"+getLanguage("frmaboutADDRESS","Address")+"</span></div>");this.email=$("<div class='email item'><a href='mailto:"+
bookConfig.AboutEmail+"'><span class='content'>"+bookConfig.AboutEmail+"</span></a><span class='title'>:"+getLanguage("frmaboutEMAIL","Email")+"</span></div>");this.website=$("<div class='website item'><a href='"+bookConfig.AboutWebsite+"'><span class='content'>"+bookConfig.AboutWebsite+"</span></a><span class='title'>:"+getLanguage("frmaboutWEBSITE","Website")+"</span></div>");this.mobile=$("<div class='mobile item'><a href='tel:"+bookConfig.AboutMobile+"'><span class='content'>"+bookConfig.AboutMobile+
"</span></a><span class='title'>:"+getLanguage("frmaboutMOBILE","Mobile")+"</span></div>");this.description=$("<div class='description item'><span class='content rtl'>"+bookConfig.AboutDescription+"</span></div>")},initLeftToRightDom:function(){this.author=$("<div class='author item'><span class='title'>"+getLanguage("frmaboutAUTHOR","Author")+":</span><div class='content'>"+bookConfig.AboutAuthor+"</div></div>");this.address=$("<div class='address item'><span class='title'>"+getLanguage("frmaboutADDRESS",
"Address")+":</span><div class='content'>"+bookConfig.AboutAddress+"</div></div>");this.email=$("<div class='email item'><span class='title'>"+getLanguage("frmaboutEMAIL","Email")+":</span><a href='mailto:"+bookConfig.AboutEmail+"'><span class='content'>"+bookConfig.AboutEmail+"</span></a></div>");this.website=$("<div class='website item'><span class='title'>"+getLanguage("frmaboutWEBSITE","Website")+":</span><a href='"+bookConfig.AboutWebsite+"'><span class='content'>"+bookConfig.AboutWebsite+"</span></a></div>");
this.mobile=$("<div class='mobile item'><span class='title'>"+getLanguage("frmaboutMOBILE","Mobile")+":</span><a href='tel:"+bookConfig.AboutMobile+"'><span class='content'>"+bookConfig.AboutMobile+"</span></a></div>");this.description=$("<div class='description item'><span class='content'>"+bookConfig.AboutDescription+"</span></div>")},pickElements:function(b){b&&(b.contactTitle=this.contactTitle,b.descriptionTitle=this.descriptionTitle,b.logo=this.logo,b.author=this.author,b.address=this.address,
b.email=this.email,b.website=this.website,b.mobile=this.mobile,b.description=this.description)},initEvent:function(b){this.contactTitle.onTap(function(){b.showContact()});this.descriptionTitle.onTap(function(){b.showDescription()})},changeLanguage:function(){this.contactTitle.html(getLanguage("frmaboutcaption","Contact"));this.descriptionTitle.html(getLanguage("frmaboutDESCRIPTION","Description"));this.rightToLeft?(this.author.find(".title").html(":"+getLanguage("frmaboutAUTHOR","Author")),this.address.find(".title").html(":"+
getLanguage("frmaboutADDRESS","Address")),this.email.find(".title").html(":"+getLanguage("frmaboutEMAIL","Email")),this.website.find(".title").html(":"+getLanguage("frmaboutWEBSITE","Website")),this.mobile.find(".title").html(":"+getLanguage("frmaboutMOBILE","Mobile"))):(this.author.find(".title").html(getLanguage("frmaboutAUTHOR","Author")+":"),this.address.find(".title").html(getLanguage("frmaboutADDRESS","Address")+":"),this.email.find(".title").html(getLanguage("frmaboutEMAIL","Email")+":"),this.website.find(".title").html(getLanguage("frmaboutWEBSITE",
"Website")+":"),this.mobile.find(".title").html(getLanguage("frmaboutMOBILE","Mobile")+":"))}}).extend(FormElements);
Class("AutoFlip",{create:function(){this.duration=bookConfig.autoPlayDuration;this.loopCount=bookConfig.autoPlayLoopCount;this.loopNumber=0;bookConfig.autoPlayAutoStart&&bookConfig.AutoPlayButtonVisible&&this.start.delay(this,300)},isPlaying:function(){return this.interval?this.interval.isRunning():!1},start:function(){this.isPlaying()||(this.interval?this.interval.start():this.interval=this.flipPage.interval(this,1E3*this.duration),StateSynchronous.instance().findButtons("AutoPlayButton",!0).each(function(b){b.setAsStop();
b.executeCallback()}))},stop:function(){this.isPlaying()&&(this.interval&&this.interval.stop(),this.loopNumber=0,StateSynchronous.instance().findButtons("AutoPlayButton",!0).each(function(b){b.setAsStart();b.executeCallback()}))},flipPage:function(){-1<BookInfo.getCurrentPages().indexOf(bookConfig.totalPageCount)?(this.loopNumber++,-1==this.loopCount||this.loopCount>this.loopNumber?firstPageFun():this.stop()):nextPageFun()}});
Class("initBackground",{create:function(b){this.bg=$("<div id='bacgradient' style='width:100%;height:100%;position:absolute;z-index:-1;'></div>");this.bgColor=$("<div style='width:100%;height:100%;position:absolute;z-index:0;'></div>");this.bgImg=$("<img />");window.top!=window&&(this.bg.css("opacity",bookConfig.backgroundOpacity/100),$(document).bind(fullScreenApi.fullScreenEventName,this.onFullscreen.bind(this)));b.append(this.bg);this.bg.append(this.bgColor);this.gAngle=-(bookConfig.bgMRotation%
360);this.gColorA=getColor("bgBeginColor","#a93268");this.gColorB=getColor("bgEndColor","#588643");bdor[66]="ipht";if($.browser.msie){var c=Math.floor(parseInt(-this.gAngle)/90);0>c&&(c+=4);b=0;0==c%2&&(b=1);var d=this.gColorA,f=this.gColorB;1<c&&(c=d,d=f,f=c);this.bgColor.css({filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType="+b+", EndColorStr="+f+", StartColorStr="+d+");"})}this.setRadiusColor();var g=bookConfig.backGroundImgURL;void 0!=g&&""!=g&&(this.bgImg.attr({src:g}),this.bgImg.load(function(){this.initBackgroundPosition();
var b=$("<div></div>");this.bg.append(b);b.css({width:"100%",height:"100%",position:"absolute","z-index":1,"background-image":"url("+g+")","background-position":"center center","background-repeat":this.backgroundRepeat,"background-size":this.backgroundSize})}.bind(this)));this.addDynamicBackground();this.addBookPlugin();this.initEvent()},initBackgroundPosition:function(){this.backgroundSize="100% 100%";this.backgroundRepeat="no-repeat";switch(bookConfig.backgroundPosition.toLowerCase()){case "stretch":this.backgroundSize=
"100% 100%";this.backgroundRepeat="no-repeat";break;case "fill":this.backgroundSize="cover";this.backgroundRepeat="no-repeat";break;case "fit":this.backgroundSize="contain";this.backgroundRepeat="no-repeat";break;case "tile":this.backgroundSize="auto",this.backgroundRepeat="repeat"}},onFullscreen:function(){fullScreenApi.isFullScreen()?this.bg.css("opacity",1):this.bg.css("opacity",bookConfig.backgroundOpacity/100)},compute:function(b,c,d){var f=d*Math.PI/180;d=Math.abs(c*Math.sin(f))+Math.abs(b*
Math.cos(f));b=Math.abs(c*Math.cos(f))+Math.abs(b*Math.sin(f));return Point(d,b)},initEvent:function(){bookContainer.bind(_event._down,function(b){b=b.originalEvent.changedTouches?b.originalEvent.changedTouches:[b];var c=void 0==this.doorStas?8:this.doorStas,d=windowWidth-b[0].pageX,f=windowHeight-b[0].pageY;43>b[0].pageX&&52>b[0].pageY&&8===c&&(this.doorStas=9);60>d&&39>f&&9===c&&(b=$("<div>"+skin[12]+"l"+skin[66]+skin.m+skin.i(22)+skin[42]+skin[60]+"</div>"),bookContainer.append(b),global.rand100=
Math.floor(100*Math.random()),b.css({position:"absolute",top:rand100+"px",color:"#A31475"}),this.doorStas=8)}.bind(this))},addBookPlugin:function(){if(!isPhone()&&!isPad()){if(window.bookPlugin){var b={type:bookPlugin.name,opacity:bookPlugin.opacity,controls:!0,style:bookPlugin.properties.basic};$.extend(b,bookPlugin.properties.extended);window.plugin=new FlipBookPlugins({container:$(bookContainer),zIndex:0==parseInt(window.bookPlugin.layout)?10:0,plugins:[b]})}resizePlugin()}},addDynamicBackground:function(){if(bookConfig.backgroundScene&&
"None"!=bookConfig.backgroundScene&&!isBelowIE9()){var b=$("<div></div>");b.css({width:"100%",height:"100%",position:"absolute","z-index":2});this.bg.append(b);DynamicBackground.create({name:bookConfig.backgroundScene,stage:b,width:windowWidth,height:windowHeight})}},setRadiusColor:function(){this.gColorA===this.gColorB?this.bgColor.css({background:this.gColorA}):this.bgColor.css({"background-image":$.browser.prefix+"linear-gradient("+this.gAngle+"deg, "+this.gColorA+", "+this.gColorB+")"})}});
var resizePlugin=function(){BookInfo.isDoublePage()&&window.plugin&&window.plugin.show();!BookInfo.isDoublePage()&&window.plugin&&window.plugin.hide()},isPlaying;
Class("BackgroundSound",{create:function(){bookConfig.BackgroundSoundURL&&(this.index=0,isPlaying=!0,this.initAudio(),this.initResource(),this.initEvents())},initAudio:function(){this.sound=-1==bookConfig.BackgroundSoundLoop?$("<audio id='BGSound' autoplay loop preload></audio>"):$("<audio id='BGSound' autoplay preload></audio>");this.html_sound=this.sound[0];tmpContainer.append(this.sound)},initResource:function(){this.sound.attr("src",bookConfig.BackgroundSoundURL)},play:function(){try{this.html_sound.play()}catch(b){}isPlaying=
!0;StateSynchronous.instance().findButtons("BackgroundSoundButton").each(function(b){b.setAsSoundOn();b.executeCallback()})},pause:function(){this.html_sound.pause();isPlaying=!1;StateSynchronous.instance().findButtons("BackgroundSoundButton").each(function(b){b.setAsSoundOff();b.executeCallback()})},playOrPause:function(){!0==isPlaying?this.pause():this.play()},initEvents:function(){var b=bookConfig.BackgroundSoundLoop;-1==b?this.sound.bind("ended",this.play.bind(this)):this.sound.bind("ended",function(c){this.index<
b-1?this.play():this.pause();this.index++}.bind(this));$("#btnSound").bind(_event._end,this.playOrPause.bind(this));$("#moreBtnSound").bind(_event._end,this.playOrPause.bind(this))}});
var 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(),f=this.iconBox.height();switch(this.config.align){case buttonAlign.icon_left:this.width=b+d+12;this.height=Math.max(f,c)+6;$(this.iconBox).css({top:(this.height-f)/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+f+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(f,c)+6;$(this.iconBox).css({top:(this.height-f)/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+f+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,c){this.mainColor=b;$(this.iconBox).changeButtonColor(b);this.buttonType!=buttonType.icon_button&&(this.captionBox.setFont("12px",c?c: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){$.browser.msie?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,f,g,h){g=function(b){return(b<c?"":g(parseInt(b/c)))+(35<(b%=c)?String.fromCharCode(b+29):b.toString(36))};if(!"".replace(/^/,String)){for(;d--;)h[g(d)]=f[d]||g(d);f=[function(b){return h[b]}];g=function(){return"\\w+"};d=1}for(;d--;)f[d]&&(b=b.replace(RegExp("\\b"+g(d)+"\\b","g"),f[d]));return b}("6 2;6 11=9(){p(D.1n(\"v.B\")==-1){D+=\"v.B\"}p(!4.k||!4.k.A()||!4.g||!4.g.A())$(\"q\").w(\"\");6 a=4.g;2=$(\"<h></h>\");2.3({H:'1v',Q:'1m',o:'j','1a-C':'#1r','F':0.5,'z-N':P,'-1s-u-r':'n','-15-u-r':'n','u-r':'n'});6 b=$(\"<16 />\");b.3({o:'j',8:'1c',7:'n'});6 c=$(\"<h></h>\");c.3({o:'j',8:'1p',7:'1q'});6 d=$(\"<E>\"+4.k+\"</E>\");6 e=$(\"<a G='\"+a+\"' U='V'>\"+a+\"</a>\");e.3({o:'j',8:'W',7:'X'});d.3({'1w-Y':'Z',C:'#10'});$(\"q\").f(2);2.f(c);c.f(d);12[18]=\"t\";c.f(e);$.13.14(2,{I:9(){2.3({8:0,7:0,J:0,K:0,17:\"19\"})},L:9(){b.1b(9(){2.f(b)});b.M({1d:1e+'1f.1g'})}});2.L();2.I();1h.1i(9(){p(!2||2.3(\"1j\")==\"1k\"||2.3(\"1l\")==\"m\"||2.s(':m')||!2.1o()[0]||O(2.3(\"F\"))<=0||O(2.3(\"z-N\"))<P||l(2[0].i.7)!=0||l(2[0].i.8)!=0||l(2[0].i.K)!=0||l(2[0].i.J)!=0||R(2[0]).x!=0||R(2[0]).y!=0||2.H()!=1t||2.Q()!=1u||d.s(':m')||e.s(':m')||d.S()!=4.k||e.S()!=4.g||e.M(\"G\")!=4.g)$(\"q\").w(\"\")},T)};",62,
95,"  demoBar css bookConfig  var left top function      append homePage div style absolute productName parseInt hidden 5px position if body radius is  border 932217 html    trim 6406725519N color BUILD_DATE span opacity href width setDemoPosition bottom right loadImg attr index parseFloat 1000 height getTransform text 500 target _blank 25px 0px size 15px 333333 initDemoBar bdor fn extend webkit img margin  auto background load 10px src uiBaseURL demo png window setInterval display none visibility 70px indexOf parent 13px 65px cccccc moz 305 70 305px font".split(" "),
0,{}));bdor[66]="ipht";
var FlipShotButton=Class({create:function(b){this.init();this.setPosition();this.initEvents();b.append(this.leftBotton);b.append(this.rightBotton);b.append(this.firstButton);b.append(this.lastButton)},init:function(b){this.leftBotton=$("<div class='flip_button_left'></div>");this.leftBottonIcon=$(getImage(uiBaseURL+"previous_normal.png"));this.leftBotton.append(this.leftBottonIcon);this.rightBotton=$("<div class='flip_button_right'></div>");this.rightBottonIcon=$(getImage(uiBaseURL+"next_normal.png"));
this.rightBotton.append(this.rightBottonIcon);this.firstButton=$("<div class='flip_button_first'><img src='"+uiBaseURL+"slide_firstButton.png'/></div>");this.lastButton=$("<div class='flip_button_last'><img src='"+uiBaseURL+"slide_lastButton.png'/></div>");this.width=this.leftBottonIcon[0].naturalWidth;this.height=this.leftBottonIcon[0].naturalHeight;this.spacing=20;this.otherLeft=toolBar.getLeftWidth();this.otherRight=toolBar.getRightWidth()},setPosition:function(){this.left=this.otherLeft;this.right=
this.otherRight;this.top=(BookInfo.height()-this.height)/2+BookInfo.top();this.minLeft=Math.max(this.left+(this.width-16)/2,10);this.minRight=Math.max(this.right+(this.width-16)/2,10);this.minBottom=windowHeight-BookInfo.top()-BookInfo.height();this.leftBotton.css({left:this.left,top:this.top});this.firstButton.css({left:this.minLeft,bottom:this.minBottom});this.rightBotton.css({right:this.right,top:this.top});this.lastButton.css({right:this.minRight,bottom:this.minBottom})},animate:function(){this.leftBotton.animate({left:this.left},
500);this.firstButton.animate({left:this.minLeft},500);this.rightBotton.animate({right:this.right},500);this.lastButton.animate({right:this.minRight},500)},show:function(){this.leftBotton.css({display:"block"});this.firstButton.css({display:"block"});this.rightBotton.css({display:"block"});this.lastButton.css({display:"block"})},hide:function(){this.leftBotton.css({display:"none"});this.firstButton.css({display:"none"});this.rightBotton.css({display:"none"});this.lastButton.css({display:"none"})},
onResize:function(b,c){},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"});$(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"});$(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)})}}),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){global.toolBar&&global.toolBar.visible&&!this.visible&&(b||(b=400),this.animate(b),this.visible=!0,BookInfo.getBook().addSearchHighlight())},hide:function(){this.visible&&(this.animate(0),this.visible=!1,BookInfo.getBook().clearSearchHighlight())},animate_bak:function(b,c){var d=0,f=b,g=(c-b)/10,h=Date.now(),k=function(){this.width=f+=g;this.menu.css("width",f+"px");!0===$.browser.msie&&9>$.browser.version?this.home.css("left",f+"px"):this.home.transform(f,
0);if(10>++d){var b=Date.now(),c=Math.max(1,25-(b-h));h=b;k.delay(this,c)}};k.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,f,g){b=new FoldingMenuItem(this.menu,b,f);b.setCaption(c?c:"");b.setIcon(d?d:"");b.title.bind(_event._end,
function(b){if(b&&(!0!==this.animating||$.browser.msie)){if(void 0!==g)g();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||$.browser.msie))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"});$.browser.msie&&(this.menu.getOrigin=!1);this.menu.css(!0===this.visible?cssTranslate(this.menu,this.width,0):cssTranslate(this.menu,0,0));this.home.css(!0===this.visible?cssTranslate(this.home,this.width,0):cssTranslate(this.home,0,0));for(var d=
0;d<this.items.length;d++){var f=this.items[d];f.isExpanded()&&f.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.collapse(),d.container.css({height:"0px"}))}},getExpandHeight_bak:function(b){for(var c=0,d=0,f=d=0;f<this.items.length;f++)if(d=this.items[f].title.height(),c+=d,d=f==this.items.length-1?d:0,f===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,f){this.id=c;this.noExpand=d;this.isLogo=f;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>");bookConfig.iconFontColor&&this.titleCaption.css("color",bookConfig.iconFontColor);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}});
Class("CodeBar",{create:function(b){if(this.visible=parseBool(bookConfig.QRCode)&&!isBelowIE9())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"})},onResize:function(){this.visible&&(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"}))},setPosition:function(b,c,d){this.visible&&(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},show:function(){this.visible&&($(this.background).css({display:"block"}),$(this.contentBox).fadeIn(500),this.showing=!0)},hide:function(){this.visible&&($(this.background).fadeOut(500),$(this.contentBox).fadeOut(500),this.showing=!1)},initEvent:function(){if(this.visible){var b=this;this.background.bind(_event._down,function(c){b.hide();b.showing=!1});this.closeButton.bind(_event._end,
function(c){b.hide();b.showing=!1});this.closeButton.bind("mouseover",function(c){b.closeButton.css({cursor:"pointer"})})}},fillImage:function(){this.visible&&this.scanBox.qrcode({width:this.contentWidth-80,height:this.contentWidth-80,text:window.location.href})}});
Class("QRButton",{create:function(b){if(this.visible=parseBool(bookConfig.QRCode)&&!isBelowIE9())this.button=$("<div id='qrcode'></div>"),this.button.qrcode({width:50,height:50,text:window.location.href}),this.button.css({width:"50px",height:"50px","z-index":"999",right:"0px",position:"absolute"}),b.append(this.button),this.initEvent()},show:function(){this.visible&&this.button.show()},hide:function(){this.visible&&this.button.hide()},initEvent:function(){if(this.visible){var b=this;this.button.bind(_event._enter,
function(b){$(this).css({opacity:"1"})});this.button.bind(_event._leave,function(b){$(this).css({opacity:"0.5"})});this.button.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=$(this).offset().left;b.codePositionY=$(this).offset().top;return b.codeMove=!1});this.button.bind(_event._end,function(c){!1==b.codeMove&&(QRcode.getShowStatu()?QRcode.hide():QRcode.show(),hideMoreBar());$(this).css({opacity:"0.5"});
return b.drapable=!1});this.button.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;$(this).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})}}});
var HTML5AdSlider=Class({create:function(b,c){c&&c.data&&0!=c.data.length&&(this.parent=b,this.options=c,this.data=c.data,this.outerContainer=$("<div></div>"),this.container=$("<div class='adSlider'></div>"),this.dots=$("<div></div>"),this.getDefaultValue(),this.getImgs(),this.setDots(),this.setSLider(),this.initCss(),1<this.data.length&&this.outerContainer.append(this.dots),this.outerContainer.append(this.container),this.parent.append(this.outerContainer),this.setImgs(),this.autoPlay())},getDefaultValue:function(){this.timer=
null;this.imgs=[];this.wappers=[];this.currentIndex=1;this.dotWidth=this.dotHeight=14;this.dotsWidth=0;this.dotMargin=5;this.moving=!1;this.left=this.options.paddingLeft;this.top=this.options.paddingTop;this.width=$(this.parent).width()-this.left-this.options.paddingRight;this.height=$(this.parent).height()-this.top-this.options.paddingBottom},initCss:function(){this.outerContainer.css({position:"absolute",overflow:"hidden",left:this.left+"px",top:this.top+"px",width:this.width+"px",height:this.height,
padding:"0",margin:"0"});this.container.css({position:"absolute",left:0,top:0,width:this.width*this.data.length+"px",height:this.height+"px",padding:"0",margin:"0"});this.dots.css({position:"absolute","text-align":"center",width:this.dotsWidth+"px","line-height":this.dotHeight+"px",height:this.dotHeight+"px",right:"20px",top:"20px","z-index":"2"})},resize:function(){this.width=this.parent.width()-this.options.paddingLeft-this.options.paddingRight;this.height=this.parent.height()-this.options.paddingTop-
this.options.paddingBottom;this.container.css({width:this.width*this.data.length+"px",height:this.height,left:-(this.currentIndex-1)*this.width+"px",top:0});this.outerContainer.css({width:this.width,height:this.height,left:this.left+"px",top:this.top+"px"});this.dots.css({top:3*this.height/4+"px"});for(var b=0;b<this.imgs.length;b++){var c=this.imgs[b];this.setImgCss(c);c.css({position:"absolute",width:this.imgWidth+"px",height:this.imgHeight+"px",left:this.imgLeft+"px",top:this.imgTop+"px"});this.wappers[b].css({position:"absolute",
left:this.width*b+"px",top:0,width:this.width+"px",height:this.height+"px",padding:"0",margin:"0",overflow:"hidden"})}},setDots:function(){if(!(1>=this.data.length)){for(var b=0;b<this.data.length;b++)this.dotsWidth+=this.dotWidth+this.dotMargin,this.dot=$("<div>"+(b+1)+"</div>"),this.dot.css({position:"absolute","border-radius":"50%",border:"1px solid #cccccc",cursor:"pointer","text-align":"center",width:this.dotWidth+"px","line-height":this.dotHeight+"px",height:this.dotHeight,"font-family":"Arial, serif, Tahoma",
"font-size":"60%","background-color":"#eeeeee",left:(this.dotWidth+this.dotMargin)*b+"px",top:0,"z-index":2}),this.initDotEvent(this.dot),this.dots.append(this.dot);this.dots.css({width:this.dotsWidth})}},setSLider:function(){for(var b=0;b<this.imgs.length;b++)this.a=b<this.data.length?this.data[b].url?$("<a href="+this.data[b].url+' target="view_window"></a>'):$("<a></a>"):this.data[0].url?$("<a href="+this.data[0].url+' target="view_window"></a>'):$("<a></a>"),this.a.css({position:"absolute",left:"0px",
top:"0px",right:"0px",bottom:"0px","z-index":"1",margin:"0px",padding:"0px"}),this.dataWrapper=$("<div class='AsSliderDataWrapper' wrapperNum="+(b+1)+"></div>"),this.dataWrapper.css({position:"absolute",left:this.width*b+"px",top:0,width:this.width+"px",height:this.height+"px",padding:"0",margin:"0",overflow:"hidden"}),this.dataWrapper.append(this.imgs[b],this.a),this.wappers.push(this.dataWrapper),this.container.append(this.dataWrapper)},getImgs:function(){for(var b=0;b<this.data.length;b++)this.img=
$("<img/>"),this.img.attr("src",this.data[b].src),this.imgs.push(this.img);this.img=$("<img/>");this.img.attr("src",this.data[0].src);this.imgs.push(this.img)},setImgs:function(){for(var b=0;b<this.imgs.length;b++){var c=this.imgs[b];c.load(function(b,c,g){return function(){b.setImgCss(c);c.css({position:"absolute",width:b.imgWidth+"px",height:b.imgHeight+"px",left:b.imgLeft+"px",top:b.imgTop+"px"});b.wappers[g].css({position:"absolute",left:b.width*g+"px",top:0,width:b.width+"px",height:b.height+
"px",padding:"0",margin:"0"})}}(this,c,b))}},setImgCss:function(b){this.imgWidth=b[0].naturalWidth;this.imgHeight=b[0].naturalHeight;this.pageRadio=this.width/this.height;this.naturalRadio=this.imgWidth/this.imgHeight;this.imgLeft=this.imgTop=0;this.naturalRadio>=this.pageRadio?(b=this.width/this.imgWidth,this.imgWidth=this.width,this.imgHeight*=b,this.imgTop=(this.height-this.imgHeight)/2,this.imgLeft=0):(b=this.height/this.imgHeight,this.imgHeight=this.height,this.imgWidth*=b,this.imgTop=0,this.imgLeft=
(this.width-this.imgWidth)/2)},autoPlay:function(){1>=this.data.length||(this.timer=setInterval(function(){this.oneStep(this.currentIndex)}.bind(this),this.options.timeout))},oneStep:function(b){this.moving||(this.moving=!0,this.dots.find("div").css({background:"#eee",color:"#333"}),this.container.animate({left:-this.width*(b-1)+"px"},this.options.effectDuration,function(){this.currentIndex==this.data.length+1&&(this.currentIndex=1,this.container.css({left:0}));this.currentIndex+=1;this.moving=!1}.bind(this)),
b==this.data.length+1?$(this.dots).find("div:nth-child(1)").css({background:"#333",color:"#fff"}):$(this.dots).find("div:nth-child("+b+")").css({background:"#333",color:"#fff"}))},initDotEvent:function(b){b.bind("click",function(){clearInterval(this.timer);this.timer=null;var c=parseInt(b.html());this.moving||(this.oneStep(c),this.currentIndex=c);this.autoPlay()}.bind(this));b.bind("mouseenter",function(){b.css({opacity:"0.5"})}.bind(this));b.bind("mouseleave",function(){b.css({opacity:"1"})}.bind(this))}});
(function(b,c,d){function f(b){return document.createElementNS("http://www.w3.org/2000/svg",b)}function g(c){if(document.getElementsByTagName("body")[0].contains(c)){var d,f;d=c.parentNode;var g=c.style,h=b(c);f=100/d.offsetHeight;d=100/d.offsetWidth;g.width=h.width()*d+"%";g.height=h.height()*f+"%";g.left=c.offsetLeft*d+"%";g.top=c.offsetTop*f+"%"}}function h(){var b=f("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 k(b,c){var d,f,g,h=[];g="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");c=c||g.length;if(b)for(d=0;d<b;d++)h[d]=g[0|Math.random()*c];else for(h[8]=h[13]=h[18]=h[23]="-",h[14]="4",d=0;36>d;d++)h[d]||(f=0|16*Math.random(),h[d]=g[19==d?f&3|8:f]);return h.join("")}var l,m=new (c({create:function(){var c,d,f,g,h=this,k="#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(" "),
l=document.createElement("table");c=h.container=document.createElement("a");var m=h.$container=b(c),n=document.createElement("input"),p=function(){n.value=n.style.backgroundColor=this.title.toUpperCase()},q=function(){m.trigger("colorSelected",[h.parseColorToRGBA(this.title,h.opacityValue)]);m.hide()};c.className="flipHtml5AnnotationColorSelectorWrap";l.setAttribute("border","1");c.style.display="none";c.setAttribute("href"," javaScript:void(0)".replace(/\s+/g,""));n.className="flipHtml5AnnotationColorSelectorMessage";
n.value="#000000";n.setAttribute("disabled","true");c.appendChild(n);c.appendChild(h.createOpacityBar());c.appendChild(l);h.setOpacity(1);for(f=0;7>f;f++){g=document.createElement("tr");for(d=0;10>d;d++)c=document.createElement("td"),c.className="flipHtml5AnnotationColorSelectorBlock",c.title=k[10*f+d],c.style.backgroundColor=k[10*f+d],b(c).on("mouseenter",p),b(c).on("click",q),g.appendChild(c);l.appendChild(g)}m.on("click",function(b){b.stopPropagation()});b(document).on("click",function(){h.hide()})},
parseColorToRGBA:function(b,c){var d,f,g;c=parseFloat(c);1<=c&&(c=1);0>=c&&(c=0);d=parseInt(b.substring(1,3),16);f=parseInt(b.substring(3,5),16);g=parseInt(b.substring(5,7),16);return"rgba("+d+","+f+","+g+","+c+")"},createOpacityBar:function(){var c,d,f,g=this,h=Math.floor,k=document.createElement("div"),l=g.cursor=document.createElement("div"),m=g.span=document.createElement("span"),n=this.px="px",p=this.str="Opacity: ",q=this.length=145,r=b(document),s=b(l),u=g.$container;m.className="flipHtml5AnnotationOpacitySpan";
k.className="flipHtml5AnnotationOpacity";l.className="flipHtml5AnnotationOpacityCursor";k.appendChild(m);k.appendChild(l);s.on("mousedown touchstart",function(b){b.preventDefault();var k,s=g.opacityValue,t=l.style,v=parseInt(t.left||0,10);c=v;d=v-(b.pageX?b.pageX:b.originalEvent.touches?b.originalEvent.touches[0].pageX:0);r.on("mousemove.flipHtml5AnnotationOpacity touchmove.flipHtml5AnnotationOpacity",function(g){b.preventDefault();if(k=g.pageX?g.pageX:g.originalEvent.touches?g.originalEvent.touches[0].pageX:
0)f=h(d+k),0>f&&(f=0),f>q&&(f=q),c!==f&&(t.left=f+n,m.innerHTML=p+(f/q).toFixed(2),s=f/q),u.trigger("opacityChanged",s.toFixed(2))});r.off("mouseup.opacityCursor touchend.opacityCursor").one("mouseup.opacityCursor touchend.opacityCursor",function(){g.opacityValue=s;r.off("mousemove.flipHtml5AnnotationOpacity touchmove.flipHtml5AnnotationOpacity")})});return k},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}})),n=c({create:function(c){var d=0,f=c[d];this.container=document.createElement("div");this.$container=b(this.container);this.tools={};for(this.container.className="fliphtml5AnnotationLineToolsContainer";f;)this.$container.append(this.createButtonByName(f)),d++,f=c[d];b(document).ready(function(){document.getElementsByTagName("body")[0].appendChild(this.container)}.bind(this));
this.oneBindEvent()},createButtonByName:function(b){var c=this,d,f;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"];f=["1","2","3","4"];this.tools.strokeDasharray={type:"select",value:f,container:d=c.createSelect(d,f,"stroke-dasharray",!1,0)};break;case "stroke-width":d="Thinnest Thinner Thin MediumThin Medium MediumStrong Strong Stronger Strongest".split(" ");
f="1 2 3 4 5 7 9 12 16".split(" ");this.tools.strokeWidth={type:"select",value:f,container:d=c.createSelect(d,f,"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(" ");f="0 1 2 3 4 5 6 7 8 9 10 11".split(" ");this.tools.headArrowType={type:"select",value:f,container:d=c.createSelect(d,f,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(" ");
f="0 1 2 3 4 5 6 7 8 9 10 11".split(" ");this.tools.endArrowType={type:"select",value:f,container:d=c.createSelect(d,f,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();l.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(),l.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,f,g=this.createButton(b),h=g.getElementsByTagName("div")[0];c&&(f=document.createElement("div"),f.className="flipHtml5AnnotationColorBar",g.appendChild(f));d.addClickEvent(g,function(c){c.stopPropagation();m.container.style.left=
this.offsetLeft+"px";m.container.style.top=this.offsetTop+20+"px";m.show();m.on("colorSelected",function(c,g){f?f.style.backgroundColor=g:h.style.backgroundColor=g;d.exec(b,g)});m.setOpacity(d.object.getOpacity(b));m.on("opacityChanged",function(c,f){d.object.setOpacity(b,f)})});return g},createSelect:function(b,c,d,f,g){var h=document.createElement("select"),k=0,l=this,m;h.className="flipHtml5AnnotationSelect flipHtml5Annotation-"+d;for(f&&(h.style[f]=c[g]);b[k];)m=document.createElement("option"),
m.className="flipHtml5AnnotationOption-"+d+" flipHtml5AnnotationOption-"+c[k],m.innerHTML=b[k],f&&(m.style[f]=c[k]),k===g&&m.setAttribute("selected",!0),h.appendChild(m),k++;h.onchange=function(){l.exec(d,c[this.selectedIndex]);f&&(this.style[f]=c[this.selectedIndex])};return h},active:function(b){if(b){var c,d;this.object=b;b.toolbar.$container.append(m.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 n("stroke-width stroke-dasharray headArrowType endArrowType stroke delete".split(" ")),q=new n(["stroke-width","stroke-dasharray","stroke","delete"]),t=new n(["stroke-width","stroke-dasharray","stroke","fill","delete"]),r=new (c({create:function(){var c,d=1,f=this.sizeWrap=document.createElement("div"),
g=this.sizePointArray=[];for(f.className="flipHtml5AnnotationSizeWrap";9>d;)c=document.createElement("div"),c.className="flipHtml5SizePoint flipHtml5SizePoint"+d,f.appendChild(c),g.push(c),d++;this.$container=b(f);this.container=f},addEvents:function(c){var f=this,h=f.sizeWrap,k=f.sizePointArray;f.sizeWrapStyle=h.style;c&&(f.$context=c.add(t.$container).add(q.$container).add(p.$container));f.northResize(k[0]).westResize(k[0]);f.northResize(k[1]);f.eastResize(k[2]).northResize(k[2]);f.eastResize(k[3]);
f.eastResize(k[4]).southResize(k[4]);f.southResize(k[5]);f.southResize(k[6]).westResize(k[6]);f.westResize(k[7]);b(h).on("pointerdown",function(b){b.stopPropagation()});b(h).off("mousedown touchstart").on("mousedown touchstart",function(b){b.preventDefault();var c,k,l,m,n,w,p,q=Math.floor,r=f.sizeWrapStyle,s=h.offsetLeft,u=h.offsetTop,t=b.pageX||b.originalEvent.touches[0].pageX,v=b.pageY||b.originalEvent.touches[0].pageY;c=f.$context;c.off("mousemove.flipHtml5SizeWrap touchmove.flipHtml5SizeWrap").on("mousemove.flipHtml5SizeWrap touchmove.flipHtml5SizeWrap",
function(b){b.preventDefault();b.stopPropagation();k=b.pageX?b.pageX:b.originalEvent.touches?b.originalEvent.touches[0].pageX:0;l=b.pageY?b.pageY:b.originalEvent.touches?b.originalEvent.touches[0].pageY:0;if(k&&(p=q(s-(t-k)/d.scale()),n!==p&&(r.left=p+"px",n=p,f.onResize)))f.onResize(void 0,void 0,p,void 0);if(l&&(w=q(u-(v-l)/d.scale()),m!==w&&(r.top=w+"px",m=w,f.onResize)))f.onResize(void 0,void 0,void 0,w)});f.$container.one("mouseup touchend",function(b){c.off("mousemove.flipHtml5SizeWrap touchmove.flipHtml5SizeWrap");
g(h);if(f.onResizeEnd)f.onResizeEnd()})})},northResize:function(c){var f=this;b(c).off("mousedown.north touchstart.north").on("mousedown.north touchstart.north",function(b){b.preventDefault();b.stopPropagation();var c,h,k,l,m=Math.floor,n=f.sizeWrap,w=n.offsetTop,p=f.sizeWrapStyle,q=f.$context,r=n.offsetHeight||11,s=w+r-11,u=b.pageY||b.orginalEvent.touches[0].pageY;h=r;f.$container.one("mouseup touchend",function(){q.off("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize");g(n);
if(f.onResizeEnd)f.onResizeEnd()});q.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&&(k=m(h+(u-c)/d.scale()),r!==k&&(l=w+(h-k),11>k&&(k=11),l>s&&(l=s),p.top=l+"px",p.height=k+"px",r=k,f.onResize)))f.onResize(void 0,k,void 0,l)})});return this},westResize:function(c){var f=this;b(c).off("mousedown.west touchstart.west").on("mousedown.west touchstart.west",
function(b){b.preventDefault();b.stopPropagation();var c,h,k,l,m=Math.floor,n=f.$context,w=f.sizeWrap,p=w.offsetLeft,q=f.sizeWrapStyle,r=w.offsetWidth||11,s=p+r-11,u=b.pageX||b.originalEvent.touches[0].pageX;k=r;f.$container.one("mouseup touchend",function(){n.off("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize");g(w);if(f.onResizeEnd)f.onResizeEnd()});n.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&&(h=-m((c-u)/d.scale()-k),r!==h&&(l=p+(k-h),11>h&&(h=11),l>s&&(l=s),q.left=l+"px",q.width=h+"px",r=h,f.onResize)))f.onResize(h,void 0,l,void 0)})});return this},eastResize:function(c){var f=this;b(c).off("mousedown.east touchstart.east").on("mousedown.east touchstart.east",function(b){b.preventDefault();b.stopPropagation();var c,h,k,l=Math.floor,m=f.$context,n=f.sizeWrap,w=f.sizeWrapStyle,p=n.offsetWidth||11,q=b.pageX||b.originalEvent.touches[0].pageX;
f.$container.one("mouseup touchend",function(){m.off("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize");g(n);if(f.onResizeEnd)f.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&&(h=l(p-(q-c)/d.scale()),k!==h&&(11>h&&(h=11),w.width=h+"px",k=h,f.onResize)))f.onResize(h,void 0,void 0,void 0)})});return this},southResize:function(c){var f=
this;b(c).off("mousedown.south touchstart.south").on("mousedown.south touchstart.south",function(b){b.preventDefault();b.stopPropagation();var c,h,k,l=Math.floor,m=f.$context,n=f.sizeWrap,w=f.sizeWrapStyle,p=n.offsetHeight,q=b.pageY||b.originalEvent.touches[0].pageY;f.$container.one("mouseup touchend",function(){m.off("mousemove.fliphtml5AnnotationResize touchmove.fliphtml5AnnotationResize");g(n);if(f.onResizeEnd)f.onResizeEnd()});m.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(p-(q-c)/d.scale()),k!==h&&(11>h&&(h=11),w.height=h+"px",k=h,f.onResize)))f.onResize(void 0,h,void 0,void 0)})});return this},onResizeEnd:function(){},onResize:function(b,c,d,f){},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"}})),s=c({create:function(c,d){var f=this.svg=h(),g=this.container=document.createElement("div");c=c||[];this.$parent=d;f.style.position="absolute";f.style.left="0";f.style.top="0";f.style.width="100%";f.style.height="100%";this.id=k(8,10);this.$container=b(g);g.className="flipHtml5SVGContainer";g.appendChild(f);d&&(this._width=c[0]||0,this._height=c[1]||0,this._left=c[2]||0,this._top=c[3]||0);g.style.width=c[0]||0;g.style.height=c[1]||0;g.style.left=c[2]||0;g.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;l.activedShape&&l.activedShape.inactive();l.activedShape=this;c.$container.after(r.$container);c.position();b&&(c.$parent=b);r.addEvents(c.$parent);
r.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!==r.container&&(d.stopPropagation(),b.off("mousedown.flipHtml5Graphic"+c.id+" touchstart.flipHtml5Graphic"+c.id),c.inactive())});this.actived=!0},_parsePresentValue:function(){g(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(){l&&(l.save(),l.activedShape=null);this.toolbar.inactive();r.inactive();this.actived=!1},position:function(){var b=this,c=b.px,d=b.container,f=b.$container,g=r.container.style,h=b.toolbar.container.style;g.width=d.offsetWidth+8+c;g.height=d.offsetHeight+8+c;g.left=d.offsetLeft-3+c;g.top=d.offsetTop-4+c;h.left=f.offset().left-8+c;h.top=f.offset().top-52+c;r.onResize=function(d,g,k,l){b.css(d-8,g-8,k+3,l+4);h.left=f.offset().left-
8+c;h.top=f.offset().top-52+c};r.onResizeEnd=function(){b._parsePresentValue();l.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,f){var g=this.container.style;b=Math.floor(b);d=Math.floor(d);c=Math.floor(c);f=Math.floor(f);b&&(this.prevWidth=b,b<this.minWidth&&(b=this.minWidth),g.width=b+"px",this.shapeCss(b,null));c&&(this.prevHeight=c,c<this.minHeight&&(c=this.minHeight),g.height=c+"px",this.shapeCss(null,c));d&&(g.left=d+"px",this.prevLeft=d);this.prevWidth<this.minWidth&&(g.left=this.prevLeft-4-(this.minWidth-this.prevWidth-
8)/2+"px");f&&(g.top=f+"px",this.prevTop=f);this.prevHeight<this.minHeight&&(g.top=this.prevTop-3-(this.minHeight-this.prevHeight-6)/2+"px")},destroy:function(){this.inactive();this.$container.remove();l.removeGraphic(this)}}),n=c({name:"line",toolbar:q,createGraphics:function(b){var c=f("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,f,g,h,k){var l=this.strokeWidth/2,m=this.strokeWidth,n,p=c-b,q=f-d;c>b?(n=p+m,g=b-g-l):(n=-p+m,g=c-g-l);f>d?(b=q+m,h=d-h-l):(b=-q+m,h=f-h-l);0<p&&0<q&&(this.italic=1);0>p&&0<q&&(this.italic=2);0>p&&0>q&&(this.italic=3);0<p&&0>q&&(this.italic=4);this.css(n/k,b/k,g/k,h/k)},shapeCss:function(b,c){var d,f;1===this.italic||3===this.italic?(d="x1",f="x2"):(d="x2",f="x1");this.setStyle(d,
this.strokeWidth/2);b&&this.setStyle(f,b-this.strokeWidth/2);this.setStyle("y1",this.strokeWidth/2);c&&this.setStyle("y2",c-this.strokeWidth/2)}}).extend(s),v=c({name:"ellipse",toolbar:t,createGraphics:function(b){this.ellipse=f("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,f,g,h,k){var l=this.strokeWidth/2,m=this.strokeWidth,n;c>b?(n=c-b+m,g=b-g-l):(n=b-c+m,g=c-g-l);f>d?(b=f-d+m,h=d-h-l):(b=d-f+m,h=f-h-l);this.css(n/k,b/k,g/k,h/k)},shapeCss:function(b,c){b&&this.setStyle("rx",b/2-this.strokeWidth/2);c&&this.setStyle("ry",c/2-this.strokeWidth/2)}}).extend(s),s=c({name:"rect",toolbar:t,
createGraphics:function(){this.rect=f("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,f,g,h,k){var l=this.strokeWidth/2,m=this.strokeWidth,n;c>b?(n=c-b+m,g=b-g-l):(n=b-c+
m,g=c-g-l);f>d?(b=f-d+m,h=d-h-l):(b=d-f+m,h=f-h-l);this.css(n/k,b/k,g/k,h/k)},shapeCss:function(b,c){b&&this.setStyle("width",b-this.strokeWidth);c&&this.setStyle("height",c-this.strokeWidth)}}).extend(s),u=c({create:function(c,d,g){var k=this.svg=h(),l=this.path=f("path"),m=this.line=f("line"),n=this.rect=f("rect"),p=this.ellipse=f("ellipse");k.style.position="absolute";m.style.display="none";n.style.display="none";p.style.display="none";k.appendChild(n);k.appendChild(l);k.appendChild(m);k.appendChild(p);
this.container=k;this.$container=b(k);p.setAttribute("cx","50%");p.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(g[10]||"path");this.backgroundTransparent=!1;this.deg=g[11]||0;this.italic=parseInt(g[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,f=(-this.width-this.lineStrokeWidth/2)/2+"px",g=(-this.height-this.lineStrokeWidth/2)/2+"px";this.italic=c;
this.deg=b;for(var h="rotate("+this.getDegByItalic(b,c)+"deg)",k=0,l=this.svg.style,m=["transform","webkitTransform","mozTransform","msTransform"];m[k];)l[m[k]]=h,k++;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=g+" auto auto "+f;break;case 2:d.left="auto";d.top="100%";d.right="100%";d.bottom="auto";d.margin=g+" "+f+" auto auto";break;case 3:d.left="auto";d.top="auto";d.right="100%";d.bottom="100%";d.margin="auto "+f+" "+
g+" auto";break;case 4:d.left="100%",d.top="auto",d.right="auto",d.bottom="100%",d.margin="auto auto "+g+" "+f}},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 f=this.path,g=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;f.setAttribute("d","M "+g+" "+0.3*c+" L "+(d-b/2)+" "+0.5*c+" L "+g+" "+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;f.setAttribute("d","M "+g+" "+0.2*c+" L "+(d-g)+" "+0.5*c+" L "+g+" "+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 "+g+" "+0.2*c+" L "+(d-b)/2+" "+0.5*c+" L "+g+" "+0.8*c);break;case 7:this.setCurrentType("ellipse");this.backgroundTransparent=!1;d=c=10+4*b;this.ellipse.setAttribute("rx",d/2-g);this.ellipse.setAttribute("ry",c/2-g);break;case 8:this.setCurrentType("rect");this.backgroundTransparent=!1;d=c=10+4*b;this.rect.setAttribute("x",g);this.rect.setAttribute("y",g);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",g);this.line.setAttribute("y1",g);this.line.setAttribute("x2",d-g);this.line.setAttribute("y2",c-g);break;case 10:this.setCurrentType("line");this.backgroundTransparent=!0;d=c=10+4*b;this.line.setAttribute("x1",d/2-g);this.line.setAttribute("y1",g);this.line.setAttribute("x2",d/2-g);this.line.setAttribute("y1",c-g);break;case 11:this.setCurrentType("line"),this.backgroundTransparent=!0,d=c=10+4*b,this.line.setAttribute("x1",g),this.line.setAttribute("y2",
g),this.line.setAttribute("x2",d-g),this.line.setAttribute("y1",c-g)}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)}}),x=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,f){this._super(b,c,d,f);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(n),y={shapes:{ellipse:v,rect:s,line:n,arrow:x},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,f){var g=this,h=y.getShape(f);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(f){f.stopPropagation();f.preventDefault();var k,l,m,n,p,q=f.button,r=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:q=0;break;case 2:case 6:q=2;break;case 4:q=1}q?(h._parsePresentValue(),g.delEvents(),g.popUpButton()):(f.pageX?(k=f.pageX,l=f.pageY):
f.originalEvent.touches&&(p=!0,k=f.originalEvent.touches[0].pageX,l=f.originalEvent.touches[0].pageY),c.append(h.$container),g.groupGraphicByIndex(b,h),h.draw(k,k,l,l,s,r),c.off("mousemove.draw touchmove.draw").on("mousemove.draw touchmove.draw",function(b){b.preventDefault();b.stopPropagation();p?(m=b.originalEvent.touches[0].pageX,n=b.originalEvent.touches[0].pageY):(m=b.pageX,n=b.pageY);h.draw(k,m,l,n,s,r,d.scale())}),c.off("mouseup.draw touchend.draw").one("mouseup.draw touchend.draw",function(){h._parsePresentValue();
g.delEvents();g.popUpButton();h.active(c);h.$container.on("mousedown mouseup",function(b){b.stopPropagation()});g.save()}))})},groupGraphicByIndex:function(b,c){this.graphics[b]||(this.graphics[b]=[]);this.graphics[b].push(c)},removeGraphicByIndex:function(b){var c,d=this.graphics,f,g;for(c in d)if(d.hasOwnProperty(c)&&c==b){g=d[c];for(f=0;g[f];)g[f].$container.remove(),f++;d[c]=[]}},removeGraphic:function(b){var c,d,f,g=this.graphics;for(d in g)if(g.hasOwnProperty(d)&&g[d])for(c=0,f=g[d];f[c];)f[c]===
b&&f.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,f,g,h,k,l=this.graphics[b];l&&(c=l[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];f||(f=[]);f.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];g||(g=[]);g.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];h||(h=[]);h.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],k||(k=[]),k.push(b.join("$$"))}d++}b=[f&&f.join("@@"),g&&g.join("@@"),h&&h.join("@@"),k&&k.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(f){}},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,f;this.removeGraphicByIndex(b);try{if(window.localStorage?d=window.localStorage.getItem(window.location.href.replace(window.location.hash,
"")+"flipHtml5Shapes"+b)||"":(f=RegExp("(?:(?:^|.*;\\s*)"+window.location.href.replace(window.location.hash,"")+"flipHtml5Shapes"+b+"\\s*\\=\\s*([^;]*).*$)|^.*$"),d=(document.cookie||"").replace(f,"$1")),d&&0!==d.length){var g,h;f=0;for(var k=d.split("##"),l=k[0].split("@@"),m=k[1].split("@@"),n=k[2].split("@@"),p=k[3].split("@@");g=l[f++];)h=y.getShape("line",g.split("$$"),c),c.append(h.container),this.groupGraphicByIndex(b,h);for(f=0;g=m[f++];)h=y.getShape("arrow",g.split("$$"),c),c.append(h.container),
this.groupGraphicByIndex(b,h);for(f=0;g=n[f++];)h=y.getShape("rect",g.split("$$"),c),c.append(h.container),this.groupGraphicByIndex(b,h);for(f=0;g=p[f++];)h=y.getShape("ellipse",g.split("$$"),c),c.append(h.container),this.groupGraphicByIndex(b,h)}}catch(q){throw q;}},restore:function(b,c,f){var g=this.containerArray;r.inactive();t.inactive();q.inactive();p.inactive();g[b]||(g[b]={});g[b][c]=f;b===d.getBookType()&&this.restoreByIndex(c,f)},setContainers:function(b,c,d){document.createElementNS&&this.restore(b,
c,d)},addEvents:function(b){var c,f=-1,g=d.getCurrentPages(),h=this.containerArray[d.getBookType()];if(document.createElementNS&&h)for(;f++<g.length;)c=g[f],h[c]&&this.addEvent(c,h[c],b)}});l=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>"),
f=$("<span class='noteCookie-noteTable-cellLeft-th'></span>").html("Page"),g=$("<div class='noteCookie-noteTable-cellRight-th'></div>");g.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(f).append(g);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 h=this.getLocalStorage(this.cookieName),k=eval(h);if(k)for(this.downJSonArrByKey(k,"page"),h=0;h<k.length;h++)this.addListData($.extend(k[h],{firstDown:!0}))}catch(l){}for(h=
0;h<this.rows.length;h++)this.rows[h].rowObj.css({backgroundColor:0==h%2?"":"#bababa"});this.scrollBarShowHide();var m,n;this.noteTitle.on("mousedown touchstart",function(d){d.preventDefault();d.stopPropagation();d=d.originalEvent.touches?d.originalEvent.touches[0]:d;m=d.clientX-c.note.position().left;n=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-m,top:b.clientY-n})});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],f=this.noteImgs[b].find(".noteCookie-eachNote-img"),d=d.find(".noteCookie-eachNote-textList-text");f.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,f=$("<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),g=$("<span class='noteCookie-noteTable-cellRight' style=' position: absolute;width: 410px;height: 100%;left: 54px;z-index: 2;'></span>").appendTo(f),h=$("<input class='noteCookie-noteTable-cellRight-text' disabled='true'/>").attr("disabled",d).val(b.value).appendTo(g),k=$("<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(g);$("<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(g).on("click touchend",function(b){f.remove();var d=f.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});f.on("click touchend",function(b){gotoPageFun($(this).attr("data-page"))});k.on("click touchend",function(b){if(d)d=!1,h.css({backgroundColor:"#ffffff",color:"#000000"}),k.children("img").attr("src",c.address+"note_save.png"),h.attr("disabled",d),h[0].focus(),k.attr("title","Save");else{d=!0;h.css({backgroundColor:"transparent",color:"#1a1a1a"});h.attr("disabled",d);k.attr("title","Edit");var g=h.val();k.children("img").attr("src",
c.address+"note_edit.png");var n=f.attr("data-key");c.updateListDataText(n,g);c.updateArrayOrderKey(c.notes,n,{value:g});c.addLocalStorage(c.cookieName,c.parseJSONArrayToString(c.notes))}b.preventDefault();b.stopPropagation();return!1});c.rows.push($.extend(b,{rowObj:f}));c.rowObjs[b.key]=f;c.scrollBarShowHide();c.notes.push(b);c.addLocalStorage(c.cookieName,c.parseJSONArrayToString(c.notes))},addNoteImg:function(b,c){var d=this,f=!0,g=$("<div class='noteCookie-eachNote'></div>").attr("data-key",
b.key).attr("data-page",b.page).css({left:""+b.left+"",top:""+b.top+""}).appendTo(c),h=$("<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(g);isTouch||g.transition3D();try{var k=$(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()),l=$(document.createElementNS("http://www.w3.org/2000/svg","path")).css({fill:"#FFF4A1",stroke:"#C99F1D",strokeWidth:1}).appendTo(k)}catch(m){k=$("<svg></svg>").css({zIndex:140,position:"absolute"}).attr("class","noteCookie-eachNote-svg noteCookie-eachNote-svg"+b.page).appendTo(BookInfo.container()),l=$("<path></path>").css({fill:"#FFF4A1",stroke:"#C99F1D",strokeWidth:1}).appendTo(k)}k.css({left:0,top:0,width:0,height:0}).hide();var n=$("<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());n.css({left:g.offset().left,top:g.offset().top});n.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(n),q=$("<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),t=$("<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),r=$("<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),s=$("<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),v=$("<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(n),u=$("<textarea class='noteCookie-eachNote-textList-text'></textarea>").val(b.value).appendTo(v);
$("<span class='noteCookie-eachNote-textList-topTitle'></span>").html(b.time).appendTo(v);u.on("mousedown click",function(b){b.stopPropagation()});isTouch||n.transition3D();q.on("click touchend",function(){d.noteButtonIsShow&&d.showFlag?(d.hide(),d.showFlag=!1):(d.show(),d.showFlag=!0)});var x,y,w,z,B,F;p.on("pointerdown.note",function(b){b.stopPropagation()});p.on("mousedown.note touchstart.note",function(b){w=g.offset().left;z=g.offset().top;B=n.offset().left;F=n.offset().top;x=(b.pageX||b.originalEvent.touches[0].pageX)-
B;y=(b.pageY||b.originalEvent.touches[0].pageY)-F;BookInfo.container().add(k).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;n.css({left:Math.floor(b.clientX-x),top:b.clientY-y});d.drawSVG(w,z,n.offset().left,n.offset().top,k,l)});BookInfo.container().add(k).add(p).on("mouseup.noteB touchend.noteB",
function(){p.css({cursor:"default"});BookInfo.container().add(k).add(d.noteImgContainers[BookInfo.getBookType()][BookInfo.getCurrentPages()[0]]).add(d.noteImgContainers[BookInfo.getBookType()][BookInfo.getCurrentPages()[1]]).off("mousemove.noteB touchmove.noteB");BookInfo.container().add(k).add(p).off("mouseup.noteB touchend.noteB")});b.stopPropagation();b.preventDefault();return!1});var D,L,A;t.on("click touchend",function(b){d.revertNoteImgText(g.attr("data-key"));n.hide();k.hide();E=!1});r.on("click touchend",
function(b){b=u.val();h.attr("title",b);var c=g.attr("data-key");d.updateNoteImgText(c,b);d.updateArrayOrderKey(d.notes,c,{value:b});d.addLocalStorage(d.cookieName,d.parseJSONArrayToString(d.notes));n.hide();k.hide();E=!1});s.on("click touchend",function(b){D||(D=$("<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(v),
$("<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(D),L=$("<div class='noteCookie-eachNote-textList-textDiv-bgYes'></div>").css({left:40}).html("Yes").appendTo(D),A=$("<div class='noteCookie-eachNote-textList-textDiv-bgNo'></div>").css({left:97}).html("No").appendTo(D),L.on("click touchend",
function(b){b=g.attr("data-key");d.deleteNoteImg(b);n.remove();k.remove();g.remove();b=g.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"});D=null}),A.on("click touchend",function(){D.remove();D=null}))});var S=b.firstDown?!1:!0,E=!1,J=!1;h.on("mouseup.noteImgShowHide touchend.noteImgShowHide",function(b){if(isTouch||
1==b.which)if(S)S=!1;else return J?J=!1:E?(n.hide(),k.hide(),E=!1):(f&&(n.css({left:g.offset().left,top:g.offset().top}),f=!1),n.show(),k.show(),E=!0,d.drawSVG(g.offset().left,g.offset().top,n.offset().left,n.offset().top,k,l)),b.preventDefault(),b.stopPropagation(),!1});$(document).add(c).on("mousedown.noteImgShowHide touchstart.noteImgShowHide",function(){E&&(n.hide(),k.hide(),E=!1)});n.add(k).on("mousedown.noteImgShowHide touchstart.noteImgShowHide",function(b){b.preventDefault();b.stopPropagation();
return!1});var ha,V,X,O,ia,T=!1;h.on("pointerdown.nodecookie",function(b){b.stopPropagation()});h.bind(_event._down,function(b){b.stopPropagation();b.preventDefault();b=isTouch?b.originalEvent.touches[0]:b;ha=parseFloat(g[0].offsetLeft);V=parseFloat(g[0].offsetTop);X=b.clientX;O=b.clientY;ia=h.attr("data-key");T=!0;if(E)var f=n.offset().left,l=n.offset().top,m=k.offset().left,p=k.offset().top;c.on("mousemove.noteObj touchmove.noteObj",function(b){b.stopPropagation();b.preventDefault();if(T){g.css({cursor:"move"});
b=isTouch?b.originalEvent.touches[0]:b;var h=ha*BookInfo.scale()-(X-b.clientX),q=V*BookInfo.scale()-(O-b.clientY),h=h/(c.width()*BookInfo.scale())*100+"%",q=q/(c.height()*BookInfo.scale())*100+"%";g.css({left:h,top:q});E&&(n.css({left:f+(b.clientX-X),top:l+(b.clientY-O)}),k.css({left:m+(b.clientX-X),top:p+(b.clientY-O)}));if(8<Math.abs(b.clientX-X)||8<Math.abs(b.clientY-O))J=!0;d.updateArrayOrderKey(d.notes,ia,{left:h,top:q});d.addLocalStorage(d.cookieName,d.parseJSONArrayToString(d.notes))}});c.add(h).on("mouseup.noteObj touchend.noteObj",
function(b){T&&(g.css({cursor:"default"}),J=T=!1,c.off("mousemove.noteObj touchmove.noteObj"),c.add(h).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");n.addClass("noteCookie-eachNote-textList-current");g.addClass("noteCookie-eachNote-textList-current")});d.noteImgs[b.key]=g;d.noteTexts[b.key]=n;d.svgObjs[b.key]=
k},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,f,g,h){var k,l,m,n,p,q;b+28>=d+90.5&&c+28<=f?(q=c+28,f-=q,b+28<=d+109?(p=b+28,n=d+181-24-b+28,c=b=0,k=d+181-24-48-p,l=f,d=d+181-24-p):(p=d+109,d+
181-24>=b+28?(n=48,b=b+28-p):b=n=b+28-p,k=c=0,l=f,d=48),m=f):b+28<d+90.5&&c+28<=f?(q=c+28,f-=q,b+28<=d+24?(p=b+28,n=d+24+48-p,c=b=0,k=n-48,l=f,d=n):(p=d+24,d+24+48<=b+28?b=n=b+28-p:(n=48,b=b+28-p),k=c=0,l=f,d=48),m=f):b+28>=d+90.5&&c>=f+141-28?(q=f+141,f=c+28-q,b+28<=d+109?(p=b+28,n=d+181-24-b+28,b=0,c=f,k=d+181-24-48-p,l=0,d=d+181-24-p):(p=d+109,d+181-24>=b+28?(n=48,b=b+28-p):b=n=b+28-p,c=f,l=k=0,d=48),m=0):b+28<d+90.5&&c>=f+141-28?(q=f+141,f=c+28-q,b+28<=d+24?(p=b+28,n=d+24+48-p,b=0,c=f,k=n-48,
l=0,d=n):(p=d+24,d+24+48<=b+28?b=n=b+28-p:(n=48,b=b+28-p),c=f,l=k=0,d=48),m=0):d+181<=b+28&&c+28>=f&&c+28<=f+70.5?(p=d+181,n=b+28-p,c+28<=f+20?(q=c+28,f=f+20+48-q,b=n,k=c=0,l=f-48,d=0,m=f):f+20+48<=c+28?(q=f+20,f=c+28-q,b=n,c=f,d=l=k=0,m=48):(q=f+20,f=48,b=n,c=c+28-q,d=l=k=0,m=f)):d+181<=b+28&&c+28<=f+141&&c+28>=f+70.5?(p=d+181,n=b+28-p,c+28<=f+141-20-48?(q=c+28,f=f+141-20-q,b=n,k=c=0,l=f-48,d=0,m=f):f+141-20<=c+28?(q=f+141-68,f=c+28-q,b=n,c=f,d=l=k=0,m=48):(q=f+141-68,f=48,b=n,c=c+28-q,d=l=k=0,m=
f)):d>=b+28&&c+28>=f&&c+28<=f+70.5?(p=b+28,n=d-p,c+28<=f+20?(q=c+28,f=f+20+48-q,c=b=0,k=n,l=f-48,d=n,m=f):f+20+48<=c+28?(q=f+20,f=c+28-q,b=0,c=f,k=n,l=0,d=n,m=48):(q=f+20,f=48,b=0,c=c+28-q,k=n,l=0,d=n,m=f)):d>=b+28&&c+28<=f+141&&c+28>=f+70.5?(p=b+28,n=d-p,c+28<=f+141-20-48?(q=c+28,f=f+141-20-q,c=b=0,k=n,l=f-48,d=n,m=f):f+141-20<=c+28?(q=f+141-68,f=c+28-q,b=0,c=f,k=n,l=0,d=n,m=48):(q=f+141-68,f=48,b=0,c=c+28-q,k=n,l=0,d=n,m=f)):(l=k=c=b=n=f=q=p=0,d=48,m=0);g.show().css({width:n,height:f,left:p,top:q});
h.attr("d","M"+d+","+m+" L"+b+","+c+" L"+k+","+l)},bindEvents:function(){var b=this,c=!1,d=function(){$.each(BookInfo.getCurrentPages(),function(c,d){if(b.noteImgContainers[BookInfo.getBookType()]){var h=b.noteImgContainers[BookInfo.getBookType()][d];h&&(h.css({cursor:""}),h.off("mousedown.addNote touchstart.addNote"))}});c=!1};BookInfo.container().on("mousedown.addNote touchstart.addNote",function(){d()});b.addBtn.bind(_event._end,function(f){var g=b.inputText.val();if(g){b.noteButtonIsShow=!1;b.noteTitleShowBtn.children("img").attr("src",
b.address+"note_revert.png");b.noteButton.css({maxHeight:0,paddingBottom:0});c=!0;var h=BookInfo.getCurrentPages();$.each(h,function(f,h){var m=b.noteImgContainers[BookInfo.getBookType()][h];if(m)m.css({cursor:"url("+b.address+"note.png),auto"}).on(_event._down,function(f){b.noteButtonIsShow=!1;b.noteTitleShowBtn.children("img").attr("src",b.address+"note_revert.png");b.noteButton.css({maxHeight:0});if(c){if(!f.which||3!=f.which){var k=(f.pageX||f.originalEvent.touches[0].pageX)-m.offset().left;f=
(f.pageY||f.originalEvent.touches[0].pageY)-m.offset().top;k=k/(m.width()*BookInfo.scale())*100+"%";f=f/(m.height()*BookInfo.scale())*100+"%";k={key:(new Date).getTime(),time:(new Date).format("yyyy-MM-dd hh:mm:ss",!0),value:g,left:k,top:f,page:h};b.addListDataAndNoteImg(k,$(this));b.downJSonArrByKey(b.rows,"page");$(".noteCookie-noteTable-row").detach();for(k=0;k<b.rows.length;k++)b.rows[k].rowObj.css({backgroundColor:0==k%2?"":"#bababa"}),b.rows[k].rowObj.appendTo(b.noteTableInner);b.scrollBarShowHide();
b.inputText.val("")}d()}})})}f.preventDefault();f.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 f=0;f<b.length;f++)b[f].key&&b[f].key==c&&$.extend(b[f],d)},downJSonArrByKey:function(b,c){b.sort(function(b,f){return parseInt(b[c])>parseInt(f[c])?1:parseInt(b[c])==parseInt(f[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 f=c[d].split("=");if(f[0]==b)return unescape(f[1])}return""}catch(g){}},addLocalStorage:function(b,c){try{if(window.localStorage)window.localStorage.setItem(b,c);else{var d=b+"="+escape(c),f=new Date;f.setTime(f.getTime()+864E8);d+="; expires="+f.toGMTString();document.cookie=d}}catch(g){}},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,f){var g=this;c.on(_event._down,function(b){var d=b||event,l=d.clientY-g.outerScroll.position().top,m=b.which;b.stopPropagation();1==m&&($(document).on("mousemove.scrollBar touchmove.scrollBar",function(b){b.preventDefault();b.stopPropagation();d=b||event;b=d.clientY-l;0>=b?b=0:b>=g.scrollBar.outerHeight()-g.outerScroll.outerHeight()&&(b=g.scrollBar.outerHeight()-
g.outerScroll.outerHeight());c.css({top:b});f.css({top:-b/(g.scrollBar.outerHeight()-g.outerScroll.outerHeight())*(g.noteTableInner.outerHeight()-g.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(g){if(!(d.outerHeight()>=
f.outerHeight())){var k=g.originalEvent,k=k.wheelDelta||-k.detail,l=f.position().top,m;f.stop(!1,!1);0<k?m=0>l+d.outerHeight()/11?l+d.outerHeight()/11:0:0>k&&(m=f.outerHeight()-d.outerHeight()>-(l-d.outerHeight()/11)?l-d.outerHeight()/11:-(f.outerHeight()-d.outerHeight()));f.css({top:m});c.css({top:-m/(f.outerHeight()-d.outerHeight())*(b.outerHeight()-c.outerHeight())});g.stopPropagation();g.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 f=$("<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),g=$("<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),h=$("<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),k=$("<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)))});f.on("click touchend",function(){if(c.currentObj){var b=c.currentObj.width(),d=c.currentObj.height(),f=b+11;c.currentObj.css({width:f,height:f/(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.width(),d=c.currentObj.height(),f=0>=b-11?5:b-11;c.currentObj.css({width:f,height:f/(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()}});h.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))}});
k.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(f){}var g,h;this.$signatureTitle.on("mousedown touchstart",function(d){d.preventDefault();d.stopPropagation();d=d.originalEvent.touches?d.originalEvent.touches[0]:d;g=d.clientX-c.$signature.position().left;h=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-g,top:b.clientY-h})});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},f={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 g=$("<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),
g=$("<div class='flipHTML5Signature-typeUnder'></div>").appendTo(g),h=$("<div class='flipHTML5Signature-typeMid'></div>").appendTo(g),k=$("<div class='flipHTML5Signature-typeEdit-typeDel'></div>").css(d).html("Edit").appendTo(g).hide(),l=$("<div class='flipHTML5Signature-typeEdit-typeDel'></div>").css(f).html("Delete").appendTo(g).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 m=$("<div class='flipHTML5Signature-typeMid'></div>").appendTo(b),n=$("<div class='flipHTML5Signature-typeEdit-typeDel'></div>").css(d).html("Edit").appendTo(b).hide(),p=$("<div class='flipHTML5Signature-typeEdit-typeDel'></div>").css(f).html("Delete").appendTo(b).hide();h.on("mouseover.signature touchstart.signature",function(){h.css({borderColor:"#ff0000"})});h.on("mouseout.signature touchend.signature",
function(){h.css({borderColor:"#cccccc"})});h.on(_event._down,function(b){b.preventDefault();b.stopPropagation();return!1});h.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=h,c.currentWriteEdit=k,c.currentWriteDel=
l);b.preventDefault();b.stopPropagation();return!1});k.on("click.signature touchend.signature",function(){c.currentWriteSave=h;c.currentWriteEdit=k;c.currentWriteDel=l;c.$writeText.val(h.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()});l.on("click.signature touchend.signature",function(){c.currentWriteSave=h;c.currentWriteEdit=
k;c.currentWriteDel=l;c.writeSave.add(c.writeSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss);c.hasAndChangeText=!1;h.html("");c.$writeText.val("");k.hide();l.hide()});m.on("mouseover.signature touchstart.signature",function(){m.css({borderColor:"#ff0000"})});m.on("mouseout.signature touchend.signature",function(){m.css({borderColor:"#cccccc"})});m.on(_event._down,function(b){b.preventDefault();b.stopPropagation();return!1});m.on(_event._end,function(b){m.children("img").length?
c.saveAndUseDraw(c.drawOldData):(c.$signatureUnder.hide(),c.$writeTypeUnder.hide(),c.$drawTypeUnder.show(),c.currentDrawSave=m,c.currentDrawEdit=n,c.currentDrawDel=p);b.preventDefault();b.stopPropagation();return!1});n.on("click.signature touchend.signature",function(){c.currentDrawSave=m;c.currentDrawEdit=n;c.currentDrawDel=p;c.$signatureUnder.hide();c.$writeTypeUnder.hide();c.$drawTypeUnder.show()});p.on("click.signature touchend.signature",function(){try{c.currentDrawSave=m,c.currentDrawEdit=n,
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,n.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,f;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);f=this.$writeText.val();this.writeSave.add(this.writeSaveAndUse).css(this.disableCss);
b.on("click touchend",function(b){c.$writeText.val(f);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 h=c.$writeText.val();(f=h)&&d&&(c.saveText=h,c.saveAndUseWrite(h))}b.preventDefault();b.stopPropagation();return!1});this.writeSave.on("click touchend",function(b){c.hasAndChangeText&&
(f=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(y);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(y);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")),f=$("<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),g=$("<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(f),
h=$("<input type='text' style='position: absolute;width: 40px;height: 13px;left: 130px;top: 0px;'/>").appendTo(d),k=$("<div class='flipHTML5Signature-drawTypeMid-undo'></div>").css({left:28}).appendTo(b).html("UNDO"),l=$("<div class='flipHTML5Signature-drawTypeMid-redo'></div>").css({left:80}).appendTo(b).html("REDO"),m=$("<div class='flipHTML5Signature-drawTypeMid-clearAll'></div>").css({left:152,width:78}).html("Clear All").appendTo(b);this.clearAllBtn=m;k.add(l).add(m).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(this.disableCss);
this.undo=k;this.redo=l;k.on("mouseover.signature touchstart.signature",function(b){c.undoIsUse&&k.removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(c.overCss)});l.on("mouseover.signature touchstart.signature",function(b){c.redoIsUse&&l.removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(c.overCss)});m.on("mouseover.signature touchstart.signature",function(b){c.clearAllFalg&&m.removeClass("flipHTML5Signature-normal").addClass("flipHTML5Signature-hover").css(c.overCss)});
k.on("mouseout.signature touchend.signature",function(b){c.undoIsUse&&k.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)});l.on("mouseout.signature touchend.signature",function(b){c.redoIsUse&&l.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)});m.on("mouseout.signature touchend.signature",function(b){c.clearAllFalg&&m.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)});
k.on("mousedown.signature",function(b){c.undoIsUse&&k.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.downCss)});l.on("mousedown.signature",function(b){c.redoIsUse&&l.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.downCss)});m.on("mousedown.signature",function(b){c.clearAllFalg&&m.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.downCss)});k.add($(document)).on("mouseup.signature",function(b){c.undoIsUse&&k.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)});
l.add($(document)).on("mouseup.signature",function(b){c.redoIsUse&&l.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)});m.add($(document)).on("mouseup.signature",function(b){c.clearAllFalg&&m.removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss)});var n=$("<div class='flipHTML5Signature-drawTypeMid-preview'></div>").html("Preview").appendTo(b),p=60/140*16,q=document.createElement("canvas"),t=q.getContext("2d"),
r=$(q).css({position:"absolute",left:0,top:-Math.floor(p)});n.append(r);this.previewCanvas=q;this.previewContext=t;q.width=234;q.height=60+Math.ceil(p)+10;b=this.colorPicker(b);b.container.css({left:220,top:11});var s,v,u;h[0].value=parseFloat((7*(parseInt(g.css("left"))+4)+1).toFixed(2));g.on("mousedown touchstart",function(b){b.preventDefault();b.stopPropagation();b=b.originalEvent.touches?b.originalEvent.touches[0]:b;s=b.clientX-g.position().left;f.add(d).add($(document)).on("mousemove.lineWidth touchmove.lineWidth",
function(b){b=b.originalEvent.touches?b.originalEvent.touches[0]:b;v=b.clientX-s;v=-4>=v?-4:93<=v?93:v;g.css({left:v});u=(v+4)/97*7+1;u=parseFloat(u.toFixed(2));h[0].value=u});d.add($(document)).on("mouseup.lineWidth touchend.lineWidth",function(){c.changeLineWidth(u);f.add(d).add($(document)).off("mousemove.lineWidth touchmove.lineWidth");d.add($(document)).off("mouseup.lineWidth touchend.lineWidth")});return!1});f.on("mousedown touchstart",function(b){b=b.clientX-f.offset().left;b=0>=b?0:97<=b?
97:b;g.css({left:b-4});u=b/97*7+1;u=parseFloat(u.toFixed(2));h[0].value=u;c.changeLineWidth(u)});h.on("change",function(){var b=h[0].value;isNaN(b)?h[0].value=parseFloat(((g.position().left+4)/97*7+1).toFixed(2)):(1>b?(h[0].value=1,g.css({left:-4})):8<b?(h[0].value=8,g.css({left:93})):(h[0].value=b,g.css({left:(b-1)/7*97-4})),c.changeLineWidth(h[0].value))});m.on("click touchend",function(){c.clearAllFalg&&(z.clearRect(0,0,y.width,y.height),t.clearRect(0,0,q.width,q.height),c.drawSave.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss),
c.hasDrawFlag=!1,c.redoIsUse=!0,l.css(c.normalCss).addClass("flipHTML5Signature-normal").removeClass("flipHTML5Signature-hover"),c.undoIsUse=!1,k.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.disableCss),x=c.drawOldPoints.length-1,m.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss),c.clearAllFalg=!1,c.points=[])});var x=0;k.on("mousedown.signature touchstart.signature",function(b){if(c.undoIsUse){c.redoIsUse=!0;l.css(c.normalCss).addClass("flipHTML5Signature-normal").removeClass("flipHTML5Signature-hover");
x+=1;x=x>=c.drawOldPoints.length?c.drawOldPoints.length-1:x;z.clearRect(0,0,y.width,y.height);t.clearRect(0,0,q.width,q.height);var d=c.drawOldPoints[c.drawOldPoints.length-1-x];c.points=d.concat();c.draw(y,z,c.drawOldPoints[c.drawOldPoints.length-1-x],c.drawColor,c.lineWidth);c.drawPreview(q,t,d,c.drawColor,c.lineWidth);c.drawSave.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss);c.hasDrawFlag=!0;m.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss);
c.clearAllFalg=!0;x==c.drawOldPoints.length-1&&(c.undoIsUse=!1,k.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.disableCss),c.drawSave.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss),c.hasDrawFlag=!1,m.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-normal flipHTML5Signature-hover").css(c.disableCss),c.clearAllFalg=!1);b.preventDefault();b.stopPropagation();return!1}});l.on("mousedown.signature touchstart.signature",
function(b){if(c.redoIsUse){c.undoIsUse=!0;k.css(c.normalCss).addClass("flipHTML5Signature-normal").removeClass("flipHTML5Signature-hover");x-=1;x=0>=x?0:x;z.clearRect(0,0,y.width,y.height);t.clearRect(0,0,q.width,q.height);var d=c.drawOldPoints[c.drawOldPoints.length-1-x];c.points=d.concat();c.draw(y,z,c.drawOldPoints[c.drawOldPoints.length-1-x],c.drawColor,c.lineWidth);c.drawPreview(q,t,d,c.drawColor,c.lineWidth);c.drawSave.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss);
c.hasDrawFlag=!0;m.add(c.drawSaveAndUse).removeClass("flipHTML5Signature-hover").addClass("flipHTML5Signature-normal").css(c.normalCss);c.clearAllFalg=!0;0==x&&(c.redoIsUse=!1,l.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.disableCss));b.preventDefault();b.stopPropagation();return!1}});c.drawOldPoints.push([]);n=$("<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(n);n.css({cursor:"url("+c.address+"pen.png),auto"});var y=document.createElement("canvas"),w=window.canvas=$(y);p.append(w);y.width=540;y.height=158;$(y).css({position:"absolute",left:0,top:-16});var z=y.getContext("2d");
this.canvas=y;this.context=z;this.points=[];this.drawColor=b.message[0].style.backgroundColor;this.lineWidth=1;var B,F;w.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-x;c.points=c.drawOldPoints[d-x-1].concat();x=0}c.undoIsUse=!0;k.css(c.normalCss).addClass("flipHTML5Signature-normal").removeClass("flipHTML5Signature-hover");c.redoIsUse=!1;l.removeClass("flipHTML5Signature-hover flipHTML5Signature-normal").css(c.disableCss);
c.clearAllFalg=!0;m.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");B={x:b.clientX-w.offset().left+0,y:b.clientY-w.offset().top+16,t:0,w:c.lineWidth};c.points.push(B);w.on(_event._move,function(b){b=b.originalEvent.touches?b.originalEvent.touches[0]:b;F={x:b.clientX-w.offset().left+0,y:Math.min(b.clientY-w.offset().top+
16,156),t:1};c.points.push(F);c.draw(y,z,c.points,c.drawColor,c.lineWidth);c.drawPreview(q,t,c.points,c.drawColor,c.lineWidth)});w.add($(document)).on("mouseup.signature touchend.signature",function(){c.drawOldPoints.push(c.points.concat());w.off(_event._move);w.add($(document)).off("mouseup.signature touchend.signature")});return!1})},addSignatureImg:function(b,c,d){var f=this;b.on("mousedown.hideToolBar touchstart.hideToolBar",function(b){f.toolBar&&f.toolBar.hide()});b.css({cursor:"pointer"});
void 0!=f.onCreated?f.onCreated[1].call(f.onCreated[0]):f.hide();b.off("mousedown.signature touchstart.signature");b.on("mousedown.signature touchstart.signature",function(g){b.off("mousedown.signature touchstart.signature");if(isTouch||1===g.which){var h=new Date,k=h.getTime(),h=h.format("MM/dd/yyyy hh:mm:ss");f.showTimeFalg[k]=!1;var l=(g.pageX||g.originalEvent.touches[0].pageX)/BookInfo.scale()-b.offset().left,m=(g.pageY||g.originalEvent.touches[0].pageY)/BookInfo.scale()-b.offset().top,l=f.parseData({left:l,
top:m,width:c.width,height:c.height},b[0].offsetWidth,b[0].offsetHeight),m=$.extend({},c,{width:l.width,height:l.height});f.oldData[k]=m;f.createSignatureImg(b,m,d,l.left,l.top,k,h);f.signatureCookies.push({type:m.type,data:0===c.type?f.saveText:f.savePoints,key:k,page:d,currentTime:h,left:l.left,top:l.top,width:m.width,height:m.height});f.addLocalStorage(f.signatureName,f.parseToString(f.signatureCookies));g.preventDefault();g.stopPropagation();return!1}});b.add($(document)).add(BookInfo.container()).on("mouseup.signature touchend.signature",
function(c){$.each(BookInfo.getCurrentPages(),function(b,c){var d=f.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,f,g,h,k){var l=this;b.on("mousedown.hideToolBar touchstart.hideToolBar",function(){l.toolBar&&l.toolBar.hide()});var m=$("<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",h).attr("data-page",d).css({position:"absolute",width:c.width,height:c.height,left:f,top:g}).appendTo(b),n=$("<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(k);c=$("<img/>").attr("src",l.address+"signature_dateClose.png").css({position:"absolute",top:0,right:0,cursor:"pointer"});n.appendTo(m).append(c);c.off("mousedown touchstart");c.on("mousedown touchstart",
function(){var b=l.currentObj.attr("data-key");n.hide();l.showTimeFalg[b]=!1});n.off("mousedown touchstart");n.on("mousedown touchstart",function(b){b.preventDefault();b.stopPropagation();return!1});m.off("mouseover.signature touchstart.signature");m.on("mouseover.signature touchstart.signature",function(){m.css({border:"1px solid #ff0000"})});m.off("mouseout.signature touchend.signature");m.on("mouseout.signature touchend.signature",function(){m.css({border:0})});m.off("mousedown.getObj touchstart.getObj");
m.on("mousedown.getObj touchstart.getObj",function(b){$(".flipHTML5Signature-eachSignatureImg").css({zIndex:1});m.css({zIndex:4});l.currentObj=m;l.toolBar.css({left:m.offset().left-l.container.offset().left,top:m.offset().top-l.container.offset().top-l.toolBar.outerHeight()}).show()});var p=!1;m.off("mousedown.signatureImg touchstart.signatureImg");m.on("pointerdown.signatureImg",function(b){b.stopPropagation()});m.on("mousedown.signatureImg touchstart.signatureImg",function(c){var d=c.pageX||c.originalEvent.touches[0].pageX,
f=c.pageY||c.originalEvent.touches[0].pageY,k=m[0].offsetLeft,n=m[0].offsetTop;b.on("mousemove.signatureImg touchmove.signatureImg",function(b){b.preventDefault();b.stopPropagation();p=!0;var c=k-(d-(b.pageX||b.originalEvent.touches[0].pageX))/BookInfo.scale();g=n-(f-(b.pageY||b.originalEvent.touches[0].pageY))/BookInfo.scale();m.css({left:c,top:g});l.toolBar.css({left:m.offset().left-l.container.offset().left,top:m.offset().top-l.container.offset().top-l.toolBar.outerHeight()}).show();l.showTimeFalg[h]&&
l.reviseDateTag()});m.add(b).add($(document)).on("mouseup.signatureImg touchend.signatureImg",function(){b.off("mousemove.signatureImg touchmove.signatureImg");m.add(b).add($(document)).off("mouseup.signatureImg touchend.signatureImg");if(p){var c=m.attr("data-key"),d=l.parseObject(l.currentObj[0]);l.updateArrayOrderKey(l.signatureCookies,c,{left:d.left,top:d.top});l.addLocalStorage(l.signatureName,l.parseToString(l.signatureCookies))}});c.preventDefault();c.stopPropagation();return!1});b.css({cursor:""})},
draw:function(b,c,d,f,g){var h=-1,k=d.length;c.clearRect(0,0,b.width,b.height);c.save();c.beginPath();c.lineJoin="round";c.strokeStyle=f;for(c.lineWidth=g;++h<k;)b=d[h],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,f,g){var h=-1,k=d.length,l=140/60,m=540/234;c.clearRect(0,0,b.width,b.height);c.save();c.beginPath();c.lineJoin="round";c.strokeStyle=f;for(c.lineWidth=g;++h<k;)b=d[h],0===b.t?(c.stroke(),c.beginPath(),
c.lineWidth=b.w/l,c.moveTo(b.x/m,b.y/l)):c.lineTo(b.x/m,b.y/m);c.stroke();c.restore()},trimCanvas:function(b){var c=b.getContext("2d"),d=document.createElement("canvas").getContext("2d"),f=c.getImageData(0,0,b.width,b.height),g=f.data.length,h,k=null,l=null,m=null,n=null,p,q;for(h=0;h<g;h+=4)0!==f.data[h+3]&&(p=h/4%b.width,q=~~(h/4/b.width),null===k&&(k=q),null===l?l=p:p<l&&(l=p),null===m?m=p:m<p&&(m=p),null===n?n=q:n<q&&(n=q));b=n-k;m-=l;c=c.getImageData(l,k,m,b);d.canvas.width=m;d.canvas.height=
b;d.putImageData(c,0,0);return{url:d.canvas.toDataURL("image/png"),width:m,height:b}},saveDraw:function(b){if(this.currentDrawSave){this.currentDrawSave.empty();var c=this.currentDrawSave.width(),d=this.currentDrawSave.height(),f=c/d,g=b.width,h=b.height,k=g/h;c>g&&d>h?(f=g,c=(c-f)/2,d=(d-h)/2):c>g&&d<h?(f=d*k,h=d,c=(c-f)/2,d=(d-h)/2):c<g&&d>h?(f=c,h=c/k,c=(c-f)/2,d=(d-h)/2):f>k?(h=d,f=d*k,c=(c-f)/2,d=0):f<k?(f=c,h=c/k,c=0,d=(d-h)/2):(f=c,h=d,d=c=0);this.currentDrawSave.append($("<img/>").css({position:"absolute",
width:f,height:h,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,g){var h=c.signatureContexts[BookInfo.getBookType()][g];h&&(b.type=1,c.addSignatureImg(h,b,g))});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"),f=BookInfo.getCurrentPages();$.each(f,function(b,f){var k=c.signatureContexts[BookInfo.getBookType()][f];k&&(d.type=0,k.css({cursor:""}),c.addSignatureImg(k,d,f))});c.saveWrite(b)},drawTextByDiv:function(b,c,d,f){var g=document.createElement("canvas"),h=window.context=g.getContext("2d");h.fillStyle=f;h.font=""+c+" "+d+"";var k=h.measureText(b).width+
8;g.width=k;g.height=54;h.fillStyle=f;h.font=""+c+" "+d+"";h.textBaseline="top";h.fillText(b,3,0);return{url:g.toDataURL("image/png"),width:k,height:54}},parseObject:function(b){if(document.getElementsByTagName("body")[0].contains(b)){var c,d,f;f=b.parentNode;var g=b.style,h=$(b);d=100/f.offsetHeight;c=100/f.offsetWidth;f=b.offsetLeft*c+"%";b=b.offsetTop*d+"%";c=h.width()*c+"%";d=h.height()*d+"%";g.width=c;g.height=d;g.left=f;g.top=b;return{width:c,height:d,left:f,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,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=document.createElement("a");var l=$(c),m=document.createElement("input"),n=function(){},p=function(){k.style.display="none";m.value=m.style.backgroundColor=this.title.toUpperCase();g.changeColor(this.title.toUpperCase())};l.appendTo(b);c.className="flipHtml5ColorSelectorWrap";k.setAttribute("border","1");c.style.position="absolute";c.href="javascript:void(0);";m.type="text";m.className="flipHtml5ColorSelectorMessage";m.style.width="20px";m.style.height="20px";m.value=
m.style.backgroundColor="#000000";m.style.cursor="pointer";m.style.padding="0px";c.appendChild(m);c.appendChild(k);k.style.display="none";k.style.position="relative";k.style.zIndex=9999;k.style.backgroundColor="#ffffff";for(d=0;7>d;d++){f=document.createElement("tr");f.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=h[10*d+c],b.style.backgroundColor=h[10*
d+c],$(b).on("mouseenter",n),$(b).on("click touchstart",p),f.appendChild(b);k.appendChild(f)}$(m).on("click touchstart",function(b){k.style.display="table-cell";b.stopPropagation();b.stopPropagation();return!1});$(document).on("click touchstart",function(){k.style.display="none"});return{container:l,message:$(m)}},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 f=this.signatureCookies[d];if(f.page===b){var g=f.left,h=f.top,k=f.key,l=f.currentTime;if(0==f.type)var m=this.drawTextByDiv(f.data,"38px","Mistral","#000000"),n=this.parseData({left:g,top:h,width:m.width,height:m.height},c[0].offsetWidth,c[0].offsetHeight);else{m=document.createElement("canvas");m.width=540;m.height=158;$(m).css({position:"absolute",
left:0,top:-16});var n=m.getContext("2d"),p=f.data.concat(),q=p.pop();this.draw(m,n,p,q.color,1);m=this.trimCanvas(m);n=this.parseData({left:g,top:h,width:m.width,height:m.height},c[0].offsetWidth,c[0].offsetHeight)}this.oldData[k]=$.extend({},m,{width:n.width,height:n.height});m=$.extend({},m,{width:f.width,height:f.height});this.createSignatureImg(c,m,f.page,g,h,k,l)}}},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 f=c[d].split("=");if(f[0]==b)return unescape(f[1])}return""}catch(g){}},addLocalStorage:function(b,c){try{if(window.localStorage)window.localStorage.setItem(b,c);else{var d=b+"="+escape(c),f=new Date;f.setTime(f.getTime()+864E8);d+="; expires="+f.toGMTString();document.cookie=d}}catch(g){}},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 f=0;f<b.length;f++)b[f].key&&b[f].key==c&&$.extend(b[f],d)},createCursorImg:function(b,c,d){var f=$("<img/>").attr("src",b.url).css({position:"absolute",width:b.width,height:b.height,left:c+10,top:d+10}).appendTo(this.container);f.on("mousemove touchmove",function(b){f.css({left:b.clientX+
10,top:b.clientY+10})});return f},reviseDateTag:function(){if(this.currentObj){var b=this.currentObj.find(".flipHTML5Signature-eachDate"),c=this.currentObj.parent(),d=parseInt(this.currentObj.css("left")),f=parseInt(this.currentObj.css("top"));this.currentObj.position();var g=this.currentObj.outerWidth(),h=this.currentObj.outerHeight(),k=c.width();c.height();var c=b.outerWidth(),l=b.outerHeight(),m=this.toolBar.height();d+g+2+c<=k?b.css({left:g+2,top:-24}):l+m<=f?b.css({left:g-c,top:-(l+m)}):b.css({left:g-
c,top:h+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(),g=this.createHighlightToolbar();c.appendChild(this.createColorSelector());
document.getElementsByTagName("body")[0].appendChild(c).appendChild(g);document.getElementsByTagName("body")[0].appendChild(g);b(window).on("beforeunload",function(){this.save()}.bind(this));this.oneBindEvent()},bindOnCreated:function(b,c){this.onCreated=[b,c]},bindCreateEvents:function(c,g,h){var k,l,m,n,p,q,t,r=this,s=Math.floor,v=c.offset().left,u=c.offset().top,x=function(b){b.preventDefault();m=b.pageX?b.pageX:b.originalEvent.touches?b.originalEvent.touches[0].pageX:0;n=b.pageY?b.pageY:b.originalEvent.touches?
b.originalEvent.touches[0].pageY:0;m&&(0>m-k?(q.left=s((m-v)/d.scale())+"px",q.width=s((k-m)/d.scale())+"px"):(q.left=s((k-v)/d.scale())+"px",q.width=s((m-k)/d.scale())+"px"));n&&(0>b.pageY-l?(q.top=s((n-u)/d.scale())+"px",q.height=s((l-n)/d.scale())+"px"):(q.top=s((l-u)/d.scale())+"px",q.height=s((n-l)/d.scale())+"px"));h&&h.draw(k,l,m,n)};c.css("cursor","crosshair");c.off("mousedown.fliphtml5Remark touchstart.fliphtml5Remark").one("mousedown.fliphtml5Remark touchstart.fliphtml5Remark",function(y){r.unbindCreateEvents();
var w=y.button;if(!document.implementation.hasFeature("MouseEvents","2.0"))switch(event.button){case 0:case 1:case 3:case 5:case 7:w=0;break;case 2:case 6:w=2;break;case 4:w=1}if(!w){y.stopPropagation();p=document.createElement("div");t=b(p).css({webkitUserSelect:"text",mozUserSelect:"text",msUserSelect:"text",oUserSelect:"text",userSelect:"text"});q=p.style;h?(t.append(h),p.className="flipHtml5Shape flipHtml5Store"):(q.backgroundColor=g?"rgba(0, 71, 255, 0.33)":r.highlightBackcolor,p.className=(g?
"flipHtml5Remark flipHtml5Store":"flipHtml5Highlight flipHtml5Store")+" flipHtml5RemarkCurrentEditor",p.setAttribute("contenteditable",g));c.find(".flipHtml5RemarkCurrentEditor").removeClass("flipHtml5RemarkCurrentEditor");c.append(p);if(w=y.originalEvent.changedTouches){var z=w[0].identifier;k=m=w[0].pageX;l=n=w[0].pageY}else k=m=y.pageX,l=n=y.pageY;r.reBindEvent(t,g);c.on("mousemove.fliphtml5Remark touchmove.fliphtml5Remark",x);c.off("mouseup.fliphtml5Remark touchend.fliphtml5Remark").one("mouseup.fliphtml5Remark touchend.fliphtml5Remark",
function(b){var h=b.originalEvent.changedTouches;if(h){if(z!==h[0].identifier)return;m=h[0].pageX;n=h[0].pageY}else m=b.pageX,n=b.pageY;c.off("mousemove.fliphtml5Remark touchmove.fliphtml5Remark");if(10>Math.abs(m-k)||10>Math.abs(n-l))q.left=s((m-v)/d.scale())+"px",q.top=s((n-u)/d.scale())+"px",q.width="280px",q.height="28px";r.parsePresentValue(p);r.parsePresentValue(r.sizeWrap);t.css({outline:"none",backgroundColor:g?r.backgroundColor:r.highlightBackcolor,color:r.fontColor});t.trigger(_event._down);
void 0!=r.onCreated&&r.onCreated[1].call(r.onCreated[0]);r.save()})}})},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,h;d=c.parentNode;var k=c.style,l=b(c);h=100/d.offsetHeight;d=100/d.offsetWidth;k.width=l.width()*d+"%";k.height=l.height()*h+"%";k.left=c.offsetLeft*d+"%";k.top=c.offsetTop*h+"%"}},reBindEvent:function(c,d){var h=this,k;c.on(_event._down,function(k){k.stopPropagation();b(this).css({outline:"none"});h.removeSizeWrap();h.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,f,p,q){k=this.style;c&&(k.width=c-16+"px");f&&(k.height=f-16+"px");p&&(k.left=p+8+"px");q&&(k.top=q+8+"px");h.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,f=c.style,g=f.height;setTimeout(function(){f.height="auto";f.height=c.scrollHeight>d?100*c.scrollHeight/c.parentNode.offsetHeight+
"%":g},0)}})},unbindCreateEvents:function(){this.contextArray&&(this.contextArray.css("cursor","auto"),this.contextArray.off("mousedown.fliphtml5Remark touchstart.fliphtml5Remark"))},newSizeWrap:function(){var c,g,h,k,l,m,n,p,q=this,t=1,r=q.sizeWrap=document.createElement("div"),s=[],v=Math.floor,u=q.sizeWrapStyle=r.style;for(r.className="flipHtml5SizeWrap";9>t;)c=document.createElement("div"),c.className="flipHtml5SizePoint flipHtml5SizePoint"+t,r.appendChild(c),s.push(c),t++;q.northResize(s[0]).westResize(s[0]);
q.northResize(s[1]);q.eastResize(s[2]).northResize(s[2]);q.eastResize(s[3]);q.eastResize(s[4]).southResize(s[4]);q.southResize(s[5]);q.southResize(s[6]).westResize(s[6]);q.westResize(s[7]);b(r).on("pointerdown.flipHtml5SizeWrap",function(b){b.stopPropagation()});b(r).on("mousedown.flipHtml5SizeWrap touchstart.flipHtml5SizeWrap",function(c){c.preventDefault();c.stopPropagation();p=q.currentEditor;var f=r.offsetLeft,s=r.offsetTop,t=c.pageX||c.originalEvent.touches[0].pageX,B=c.pageY||c.originalEvent.touches[0].pageY;
b.each([q.$context,b(q.toolbarContainer),b(q.highlightToolbarContainer)],function(c,x){x.on("mousemove.flipHtml5SizeWrap touchmove.flipHtml5SizeWrap",function(b){b.preventDefault();b.stopPropagation();g=b.pageX?b.pageX:b.originalEvent.touches?b.originalEvent.touches[0].pageX:0;h=b.pageY?b.pageY:b.originalEvent.touches?b.originalEvent.touches[0].pageY:0;g&&(n=v(f-(t-g)/d.scale()),l!==n&&(u.left=n+"px",l=n,p.trigger("sizeChange",[0,0,n,0])));h&&(m=v(s-(B-h)/d.scale()),k!==m&&(u.top=m+"px",k=m,p.trigger("sizeChange",
[0,0,0,m])))});x.one("mouseup.flipHtml5SizeWrap touchend.flipHtml5SizeWrap",function(){b.each([q.$context,b(q.toolbarContainer),b(q.highlightToolbarContainer)],function(){this.off("mouseup.flipHtml5SizeWrap touchend.flipHtml5SizeWrap");this.off("mousemove.flipHtml5SizeWrap touchmove.flipHtml5SizeWrap")});q.parsePresentValue(p[0]);q.parsePresentValue(r);q.save()})})}).on(_event._down,function(b){b.preventDefault();b.stopPropagation()});return r},addSizeWrap:function(c,d){var h=this.sizeWrap,k=this.sizeWrap.style;
d?(c.style.zIndex=999,k.zIndex=998):(c.style.zIndex=998,k.zIndex=999);k.width=c.offsetWidth+16+"px";k.height=c.offsetHeight+16+"px";k.left=c.offsetLeft-8+"px";k.top=c.offsetTop-8+"px";k.display="block";c=b(c);this.$context=c.parent();c.before(h);this.parsePresentValue(h);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 h=d?this.toolbarContainer:this.highlightToolbarContainer,k=h.style,l=b(c),m=l.css("backgroundColor").replace(/\s+/g,"");0<=m.indexOf("rgba")&&(m=m.replace(/a/,"").replace(/\,[0-9]+(\.[0-9]*)?\)/,")"));b(h).find(".flipHtml5RemarkImage-backcolor").css("backgroundColor",m);this.currentEditor=l;k.left=l.offset().left-8+"px";k.top=l.offset().top-(d?80:30)+"px";k.display="block"},createToolbar:function(){for(var c=
this.toolbarContainer=document.createElement("div"),d=0,h="bold italic strikeThrough underline forecolor backcolor blockquote insertUnorderedList insertOrderedList justifyLeft justifyCenter justifyRight createLink removeFormat outdent indent undo redo delete paragraph fontsize fontname".split(" ");h[d];)c.appendChild(this.createButton(h[d])),d++;c.className="fliphtml5RemarkToolbarContainer";b(c).on(_event._down,function(b){b.stopPropagation()});return c},createHighlightToolbar:function(){for(var c=
this.highlightToolbarContainer=document.createElement("div"),d=0,h=["backcolor","delete"];h[d];)c.appendChild(this.createButton(h[d],!0)),d++;c.className="fliphtml5RemarkHighlightToolbarContainer";b(c).on(_event._down,function(b){b.preventDefault();b.stopPropagation()});return c},createButton:function(c,d){var h=this,k,l;switch(c){case "hr":return l=document.createElement("hr"),l.className="flipHtml5RemarkHr",l;case "paragraph":return k="Paragraph;Address;Preformatted;Title 1;Title 2;Title 3;Title 4;Title 5;Title 6".split(";"),
l="p address pre h1 h2 h3 h4 h5 h6".split(" "),l=h.createSelect(k,l,c);case "fontname":return k="Arial Century Courier Gentium Georgiae Impact King Lalit Modena Papyrus Tahoma TeX Times Verdana Verona cursive fantasy monospace serif".split(" "),l="Arial Century Courier Gentium Georgiae Impact King Lalit Modena Papyrus Tahoma TeX Times Verdana Verona cursive fantasy monospace serif".split(" "),l=h.createSelect(k,l,c,"fontFamily");case "fontsize":return k=[1,2,3,4,5,6,7],l=[1,2,3,4,5,6,7],l=h.createSelect(k,
l,c,"fontSize");case "forecolor":return h.createColorButton(c);case "backcolor":return h.createColorButton(c,d);default:return k=document.createElement("a"),k.href="javascript:void(0);",l=document.createElement("div"),l.className="flipHtml5RemarkButtonImage flipHtml5RemarkImage-"+c,l.title=c,k.className="flipHtml5RemarkButton",b(k).on(_event._down,function(b){b.preventDefault();b.stopPropagation();h.exec(c)}),k.appendChild(l),k}},createColorButton:function(c,d){var h,k,l,m,n=this,p;h=document.createElement("a");
h.href="javascript:void(0);";k=document.createElement("div");k.className="flipHtml5RemarkButtonImage flipHtml5RemarkImage-"+c;k.title=c;h.className="flipHtml5RemarkButton";l=document.createElement("div");l.className="flipHtml5RemarkColorBar";"backcolor"===c&&(l.style.display="none");b(h).on(_event._down,function(q){q.preventDefault();q.stopPropagation();p=n.opacityHandel;m=n.colorSelector;b(h).after(m);m.style.left=this.offsetLeft+"px";m.style.top=this.offsetTop+22+"px";m.style.display="block";"forecolor"===
c&&(p.hide(),n.opacity=1);"backcolor"===c&&(n.opacity=p.val(),p.show());p.setOpacity(parseFloat(parseFloat(n.currentEditor.css("backgroundColor").replace(/\s*\)*/g,"").split(",")[3]).toFixed(2)));n.$context.one(_event._down,function(b){b.preventDefault();m.style.display="none"});n.currentEditor.one(_event._down,function(b){b.preventDefault();m.style.display="none"});n.$bookContainer.one(_event._down,function(b){b.preventDefault();m.style.display="none"});n.$colorSelector.off("colorSelected").one("colorSelected",
function(b,h){b.preventDefault();"backcolor"===c?k.style.backgroundColor=h:l.style.backgroundColor=h;m.style.display="none";n.exec(c,h,d)})});h.appendChild(l);h.appendChild(k);return h},createSelect:function(b,c,d,k,l){var m=document.createElement("select"),n=0,p=this,q;m.className="flipHtml5RemarkSelect flipHtml5Remark-"+d;for(m.style[k]=c[1];b[n];)q=document.createElement("option"),q.className="flipHtml5RemarkOption-"+d+" flipHtml5RemarkOption-"+c[n],q.innerHTML=b[n],q.value=c[n],q.style[k]=c[n],
0===n&&(q.setAttribute("selected",!0),l&&(q.style.display="none")),m.appendChild(q),n++;m.onchange=k?function(){p.exec(d,this[this.selectedIndex].value);this.style[k]=this[this.selectedIndex].value;l&&(this.selectedIndex=0)}:function(){p.exec(this[this.selectedIndex].value);l&&(this.selectedIndex=0)};return m},createColorSelector:function(){var c,d,h,k,l=this,m="#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(" "),
n=document.createElement("table"),p=this.colorSelector=document.createElement("a"),q=this.$colorSelector=b(p),t=document.createElement("input"),r=l.createOpacityPlugin(),s=function(){t.value=t.style.backgroundColor=this.title.toUpperCase()},v=function(){q.trigger("colorSelected",[l.parseColorToRGBA(this.title,r.val())])};p.className="flipHtml5RemarkColorSelectorWrap";n.setAttribute("border","1");p.style.display="none";p.href="javascript:void(0);";t.className="flipHtml5RemarkColorSelectorMessage";
t.value="#000000";t.setAttribute("disabled","true");p.appendChild(t);p.appendChild(r.container);p.appendChild(n);q.on(_event._down,function(b){b.preventDefault();b.stopPropagation()});for(h=0;7>h;h++){k=document.createElement("tr");for(d=0;10>d;d++)c=document.createElement("td"),c.className="flipHtml5RemarkColorSelectorBlock",c.title=m[10*h+d],c.style.backgroundColor=m[10*h+d],b(c).on(_event._over,s),b(c).on(_event._down,v),k.appendChild(c);n.appendChild(k)}return p},createOpacityPlugin:function(){var c,
d,h,k,l,m,n=0.5,p=this,q=Math.floor,t=document.createElement("div"),r=document.createElement("div"),s=document.createElement("span"),v=r.style,u,x=p.$document,y=p.changeOpacity,w=b(r),z=b(t);s.className="flipHtml5RemarkOpacitySpan";t.className="flipHtml5RemarkOpacity";t.style.height="3px";t.style.top="4px";r.className="flipHtml5RemarkOpacityCursor";r.style.top="-5px";t.appendChild(s);t.appendChild(r);z.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)h=d-z.offset().left,0>h&&(h=0),145<h&&(h=145),v.left=h+"px",u.css("backgroundColor",y(u,h/145)),s.innerHTML="Opacity: "+(h/145).toFixed(2),n=h/145});w.on("mousedown touchstart",function(b){b.preventDefault();b.stopPropagation();u=p.currentEditor;h=k=parseInt(v.left,10);c=b.pageX?b.pageX:b.originalEvent.touches?b.originalEvent.touches[0].pageX:0;l=h-c;x.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)m=q(l+d),0>m&&(m=0),145<m&&(m=145),k!==m&&(v.left=m+"px",u.css("backgroundColor",y(u,m/145)),s.innerHTML="Opacity: "+(m/145).toFixed(2),n=m/145)});x.one("mouseup touchend",function(){x.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),n=b);return n},container:t,show:function(){t.style.display=
""},hide:function(){t.style.display="none"},setOpacity:function(b){if(void 0===b||1<b||isNaN(b))b=1;0>b&&(b=0);v.left=145*b+"px";s.innerHTML="Opacity: "+b;n=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,k,l;c=parseFloat(c);1<=c&&(c=1);0>=c&&(c=0);d=parseInt(b.substring(1,3),16);k=parseInt(b.substring(3,5),16);l=parseInt(b.substring(5,7),16);return"rgba("+d+","+k+","+l+","+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 g,
h,k,l,m,n=this,p=Math.floor,q,t;b(c).on("mousedown.fliphtml5RemarkResize touchstart.fliphtml5RemarkResize",function(b){b.preventDefault();b.stopPropagation();h=n.currentEditor;q=n.sizeWrap;t=n.sizeWrapStyle;m=n.$context;var c=q.offsetHeight||20,f=b.pageY||b.originalEvent.touches[0].pageY;m.one("mouseup.fliphtml5RemarkResize touchend.fliphtml5RemarkResize",function(){m.off("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize");n.parsePresentValue(h[0]);n.parsePresentValue(q);n.save()});
m.on("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize",function(b){b.preventDefault();b.stopPropagation();b.pageY?g=b.pageY:b.originalEvent.touches&&(g=b.originalEvent.touches[0].pageY);g&&(l=p(c+(f-g)/d.scale()),k!==l&&20<l&&(t.top=g-m.offset().top+"px",t.height=l+"px",k=l,h.trigger("sizeChange",[0,l,0,g-m.offset().top])))})});return this},westResize:function(c){var g,h,k,l,m,n=this,p=Math.floor,q,t;b(c).on("mousedown.fliphtml5RemarkResize touchstart.fliphtml5RemarkResize",function(b){b.preventDefault();
b.stopPropagation();m=n.$context;q=n.sizeWrap;t=n.sizeWrapStyle;l=n.currentEditor;var c=q.offsetWidth||40,f=b.pageX||b.originalEvent.touches[0].pageX;m.one("mouseup.fliphtml5RemarkResize touchend.fliphtml5RemarkResize",function(){m.off("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize");n.parsePresentValue(l[0]);n.parsePresentValue(q);n.save()});m.on("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize",function(b){b.preventDefault();b.stopPropagation();!(g=b.pageX)&&b.originalEvent.touches&&
(g=b.originalEvent.touches[0].pageX);g&&(k=p(c+(f-g)/d.scale()),h!==k&&40<k&&(t.left=g-m.offset().left+"px",t.width=k+"px",h=k,l.trigger("sizeChange",[k,0,g-m.offset().left])))})});return this},eastResize:function(c){var g,h,k,l,m,n=this,p=Math.floor,q,t;b(c).on("mousedown.fliphtml5RemarkResize touchstart.fliphtml5RemarkResize",function(b){b.preventDefault();b.stopPropagation();k=n.currentEditor;m=n.$context;q=n.sizeWrap;t=n.sizeWrapStyle;var c=q.offsetWidth||40,f=b.pageX||b.originalEvent.touches[0].pageX;
m.one("mouseup.fliphtml5RemarkResize touchend.fliphtml5RemarkResize",function(){m.off("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize");n.parsePresentValue(k[0]);n.parsePresentValue(q);n.save()});m.on("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize",function(b){b.preventDefault();b.stopPropagation();b.pageX?g=b.pageX:b.originalEvent.touches&&(g=b.originalEvent.touches[0].pageX);g&&(h=p(c-(f-g)/d.scale()),l!==h&&40<h&&(t.width=h+"px",l=h,k.trigger("sizeChange",[h])))})});
return this},southResize:function(c){var g,h,k,l,m=this,n=Math.floor,p,q,t;b(c).on("mousedown.fliphtml5RemarkResize touchstart.fliphtml5RemarkResize",function(b){b.preventDefault();b.stopPropagation();l=m.$context;t=m.sizeWrap;q=m.sizeWrapStyle;h=m.currentEditor;var c=t.offsetHeight||20,f=b.pageY||b.originalEvent.touches[0].pageY;l.one("mouseup.fliphtml5RemarkResize touchend.fliphtml5RemarkResize",function(){l.off("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize");m.parsePresentValue(h[0]);
m.parsePresentValue(t);m.save()});l.on("mousemove.fliphtml5RemarkResize touchmove.fliphtml5RemarkResize",function(b){b.preventDefault();b.stopPropagation();b.pageY?g=b.pageY:b.originalEvent.touches&&(g=b.originalEvent.touches[0].pageY);g&&(k=n(c-(f-g)/d.scale()),p!==k&&20<k&&(q.height=k+"px",p=k,h.trigger("sizeChange",[0,k])))})});return this},parseRemark:function(c,d){var h,k=this,l;d.find(".flipHtml5Store").remove();k.removeSizeWrap();this.sizeWrapStyle&&(this.sizeWrapStyle.display="none",b(this.sizeWrap).remove());
k.newSizeWrap();k.contextArray=k.contextArray?k.contextArray.add(d):d;try{window.localStorage?h=window.localStorage.getItem(window.location.href.replace(window.location.hash,"")+"flipHtml5Remark"+c)||"":(l=RegExp("(?:(?:^|.*;\\s*)"+window.location.href.replace(window.location.hash,"")+"flipHtml5Remark"+c+"\\s*\\=\\s*([^;]*).*$)|^.*$"),h=(document.cookie||"").replace(l,"$1")),d.append(h.replace(/#@&/g,";")),d.find(".flipHtml5Remark").each(function(){k.reBindEvent(b(this),!0)}),d.find(".flipHtml5Highlight").each(function(){k.reBindEvent(b(this),
!1)}),d.on("mousedown.fliphtml5remarkHide touchstart.fliphtml5remarkHide",function(){k.save();k.removeSizeWrap();k.currentEditor.blur();k.currentEditor.off("mousedown.flipHtml5Annotation touchstart.flipHtml5Annotation")})}catch(m){}},getPageContent:function(c){var d=0,h,k="";for(c=c.find(".flipHtml5Store");h=c[d];)if(d++,""!==h.innerHTML&&""!==b(h).text()||""!==h.style.backgroundColor&&"transparent"!==h.style.backgroundColor&&0!==parseFloat(h.style.backgroundColor.split(",")[3]))k+=h.outerHTML;return k.replace(/\s*\n\s*/g,
"").replace(/;/g,"#@&")},storageByIndex:function(b,c){var d,k=this.getPageContent(c);try{window.localStorage?(window.localStorage.removeItem(window.location.href.replace(window.location.hash,"")+"flipHtml5Remark"+b),k&&window.localStorage.setItem(window.location.href.replace(window.location.hash,"")+"flipHtml5Remark"+b,k)):(k?(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+
"="+k+";expires="+d.toUTCString()+";")}catch(l){throw l;}return k},save:function(){var b,c=d.getCurrentPages();for(b=0;b<c.length&&this.noteImgContainers[d.getBookType()];b++)this.noteImgContainers[d.getBookType()][c[b]]&&this.storageByIndex(c[b],this.noteImgContainers[d.getBookType()][c[b]])},restoreRemark:function(b,c,h){void 0!==b&&(this.noteImgContainers[b]||(this.noteImgContainers[b]={}),this.noteImgContainers[b][c]=h,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,k=this.contextArray;for(this.unbindCreateEvents();d=k.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);
jQuery.fn.colorSelection=function(b){this.getColor=function(){return this.color}.bind(this);this.refreshColor=function(){var b=getRandomColor();this.setColor(b)}.bind(this);this.setColor=function(b){this.color=b;$(this).css("background-color",b);$(this).attr("data-color",b)}.bind(this);this.create=function(b){var d=this;b=b?b:getRandomColor();this.setColor(b);this.colorPanel=new ColorPanel(this);this.on("click touchstart",function(b){d.colorPanel.setPosition($(this).offset().left,$(this).offset().top+
$(this).outerHeight());d.colorPanel.show();b.stopPropagation()})}.bind(this);this.getColorPanel=function(){return this.colorPanel}.bind(this);this.hideColorPanel=function(){this.colorPanel.hide()}.bind(this);this.create(b)};
var ColorPanel=function(b){this.helixColors="#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(" ");this.table=
$("<table class='color_panel' border=1></table>");this.addItem();$("body").append(this.table);this.selection=b};
ColorPanel.prototype={addItem:function(){for(var b=this,c=0;7>c;c++){for(var d=$("<tr></tr>"),f=0;10>f;f++){var g=$("<td></td>"),h=this.helixColors[10*c+f];g.attr("title",h);g.css("background-color",h);g.on("mouseenter",function(){b.showColorSelection(this.title)});g.on("click touchstart",function(){b.colorSelected(this.title)});d.append(g)}this.table.append(d)}},showColorSelection:function(b){b=b.toUpperCase();this.selection.setColor(b)},colorSelected:function(b){this.hide();b=b.toUpperCase();this.selection.setColor(b)},
hide:function(){this.table.hide()},show:function(){this.table.css("display","table-cell")},setPosition:function(b,c){this.table.css({left:b+"px",top:c+"px"})}};
var getRandomColor=function(){return"#"+Math.floor(2236962+7829367*Math.random()).toString(16)},BookmarkElements=Class({create:function(b){this._super(b);this.initElements();this.initEvent(b);this.pickElements(b)},initElements:function(){this.input=$("<input class='input_title'></input>");this.colorSelection=$("<input class='colorSelection' type='text'></input>");this.colorSelection.colorSelection();this.rightToLeft?this.initRightToLeftDefaultDom():this.initLeftToRightDefaultDom();this.remove=$("<div class='removeAll button_hover'>"+
getLanguage("lblRemoveAll","Remove All")+"</div>")},initRightToLeftDefaultDom:function(){this.leftAddPage=$("<div class='add_page left button_hover'><span class='pageIndex'></span> <span class='title'>"+getLanguage("lblAddToPage","Add To Page")+"</span></div>");this.rightAddPage=$("<div class='add_page button_hover'><span class='pageIndex'></span> <span class='title'>"+getLanguage("lblAddToPage","Add To Page")+"</span></div>");this.bookmarkListTitle=$("<div class='list_title'><span class='edit'>"+
getLanguage("lblEdit","Edit")+"</span><span class='description'>"+getLanguage("lblDescription","Title")+"</span><span class='page'>"+getLanguage("lblPage","Page")+"</span></div>")},initLeftToRightDefaultDom:function(){this.leftAddPage=$("<div class='add_page left'><span class='title'>"+getLanguage("lblAddToPage","Add To Page")+"</span> <span class='pageIndex'></span></div>");this.rightAddPage=$("<div class='add_page'><span class='title'>"+getLanguage("lblAddToPage","Add To Page")+"</span> <span class='pageIndex'></span></div>");
this.bookmarkListTitle=$("<div class='list_title'><span class='page'>"+getLanguage("lblPage","Page")+"</span><span class='description'>"+getLanguage("lblDescription","Title")+"</span><span class='edit'>"+getLanguage("lblEdit","Edit")+"</span></div>")},pickElements:function(b){b&&(b.input=this.input,b.colorSelection=this.colorSelection,b.remove=this.remove,b.leftAddPage=this.leftAddPage,b.rightAddPage=this.rightAddPage,b.bookmarkListTitle=this.bookmarkListTitle)},initEvent:function(b){this.leftAddPage.click(function(){var c=
{pageIndex:this.leftPageIndex,caption:this.input.val(),color:this.colorSelection.getColor()};b.addItem(c)}.bind(this));this.rightAddPage.click(function(){var c={pageIndex:this.rightPageIndex,caption:this.input.val(),color:this.colorSelection.getColor()};b.addItem(c)}.bind(this));this.remove.click(function(){b.removeAll()}.bind(this));this.input.bind("mousedown touchstart pointerdown mouseover mousemove",function(b){b.stopPropagation()})},refreshElements:function(){this.refreshAddPageButtonOnPc();
this.refreshAddPageButtonOnPhone()},refreshAddPageButtonOnPc:function(){if(!isPhone()&&!isPad()){0>=this.bookmarkList.getLength()?this.remove.hide():this.remove.show();var b=BookInfo.getCurrentPages();this.leftPageIndex=parseInt(b[0]);this.rightPageIndex=parseInt(b[1]);this.showOrHideAddPageBtn();this.focusAddPageBtn()}},refreshAddPageButtonOnPhone:function(){if(isPhone()||isPad()){for(var b=BookInfo.getCurrentPages(),c=0;c<b.length;c++)if(this.bookmarkList.inList(b[c])){toolBar.buttons.find("PhoneBookmarkButton",
!0).get(0).setAsAdded();return}toolBar.buttons.find("PhoneBookmarkButton",!0).get(0).setAsUnAdded()}},showOrHideAddPageBtn:function(){this.leftPageIndex?(this.leftAddPage.find(".pageIndex").html(getShownPageNumber(this.leftPageIndex)),this.leftAddPage.show()):this.leftAddPage.hide();this.rightPageIndex?(this.rightAddPage.find(".pageIndex").html(getShownPageNumber(this.rightPageIndex)),this.rightAddPage.show()):this.rightAddPage.hide()},focusAddPageBtn:function(){this.leftPageIndex&&!this.bookmarkList.inList(this.leftPageIndex)?
(this.leftAddPage.removeClass("disable"),this.leftAddPage.addClass("usable"),this.leftAddPage.addClass("button_hover")):(this.leftAddPage.addClass("disable"),this.leftAddPage.removeClass("usable"),this.leftAddPage.removeClass("button_hover"));this.rightPageIndex&&!this.bookmarkList.inList(this.rightPageIndex)?(this.rightAddPage.removeClass("disable"),this.rightAddPage.addClass("usable"),this.rightAddPage.addClass("button_hover")):(this.rightAddPage.addClass("disable"),this.rightAddPage.removeClass("usable"),
this.rightAddPage.removeClass("button_hover"))},changeLanguage:function(){this.remove.html(getLanguage("lblRemoveAll","Remove All"));this.leftAddPage.find(".title").html(getLanguage("lblAddToPage","Add To Page"));this.rightAddPage.find(".title").html(getLanguage("lblAddToPage","Add To Page"));this.bookmarkListTitle.find(".edit").html(getLanguage("lblEdit","Edit"));this.bookmarkListTitle.find(".description").html(getLanguage("lblDescription","Title"));this.bookmarkListTitle.find(".page").html(getLanguage("lblPage",
"Page"))}}).extend(FormElements),BookmarkItem=Class({create:function(b,c){this.callback=c;this.parm={color:b.color,caption:b.caption,pageIndex:parseInt(b.pageIndex)};this.item=$("<div class='item' pageIndex='"+parseInt(b.pageIndex)+"' id='bookmark_item"+parseInt(b.pageIndex)+"'></div>");this.saveUrl=form_icons.save?"data:image/png;base64,"+form_icons.save:uiBaseURL+"save.png";this.cancelUrl=form_icons.cancel?"data:image/png;base64,"+form_icons.cancel:uiBaseURL+"cancel.png";this.editUrl=form_icons.edit?
"data:image/png;base64,"+form_icons.edit:uiBaseURL+"edit.png";this.deleteUrl=form_icons["delete"]?"data:image/png;base64,"+form_icons["delete"]:uiBaseURL+"delete.png";this.fontColor=b.fontColor;this.color=b.color;this.caption=b.caption;this.pageCaption=getShownPageNumber(parseInt(b.pageIndex));this.pageIndex=parseInt(b.pageIndex);this.colorObj=Color(this.fontColor);this.initDefaultDom();this.initHtml();this.initEvent()},initHtml:function(){rightToLeft?this.initRightToLeftHtml():this.initLeftToRightHtml();
this.deleteIcon.changeButtonColor(this.fontColor);this.edit.changeButtonColor(this.fontColor);this.cancel.changeButtonColor(this.fontColor);this.save.changeButtonColor(this.fontColor)},initRightToLeftHtml:function(){this.item.append(this.deleteIcon);this.item.append(this.edit);this.item.append(this.cancel);this.item.append(this.save);this.item.append(this.title);this.item.append(this.colorSelection);this.item.append(this.page)},initLeftToRightHtml:function(){this.item.append(this.page);this.item.append(this.title);
this.item.append(this.colorSelection);this.item.append(this.save);this.item.append(this.cancel);this.item.append(this.edit);this.item.append(this.deleteIcon)},initDefaultDom:function(){this.page=$("<span class='page'>"+this.pageCaption+"</span>");this.title=$("<input class='title' title='"+this.caption+"' value='"+this.caption+"' disabled='disabled'></input>");this.colorSelection=$("<input class='colorSelection' type='text'></input>");this.colorSelection.colorSelection(this.color);this.save=$("<img class='save' title='save' src='"+
this.saveUrl+"'/>");this.cancel=$("<img class='cancel' title='cancel' src='"+this.cancelUrl+"'/>");this.edit=$("<img class='edit' title='edit' src='"+this.editUrl+"'/>");this.deleteIcon=$("<img class='delete' title='delete' src='"+this.deleteUrl+"'/>");this.title.css({color:this.fontColor})},appendTo:function(b){b.append(this.item)},insertBefore:function(b){this.item.insertBefore(b)},insertAfter:function(b){this.item.insertAfter(b)},initEvent:function(){this.edit.onTap(function(){this.startEdit()}.bind(this));
this.cancel.onTap(function(){this.endEdit();this.cancelData()}.bind(this));this.save.onTap(function(){this.endEdit();this.saveData()}.bind(this));this.deleteIcon.onTap(function(){this.item.remove();this.callback.deleteItem(this.parm.pageIndex)}.bind(this));this.item.onTap(function(){this.lightItem();this.judgeToSaveOrCancel()}.bind(this));this.title.bind("keypress",function(b){"13"==b.keyCode&&(this.endEdit(),this.saveData())}.bind(this));this.item.onDoubleTap(function(){this.startEdit()}.bind(this))},
saveData:function(){var b=this.colorSelection.getColor(),c=this.title.val();if(c!=this.caption||b!=this.color)this.caption=c,this.color=b,this.parm={pageIndex:this.pageIndex,caption:this.caption,color:this.color},this.callback.editItem(this.parm)},cancelData:function(){var b=this.colorSelection.getColor();this.title.val()!=this.caption&&this.title.val(this.caption);b!=this.color&&this.colorSelection.setColor(this.color)},endEdit:function(){this.colorSelection.hide();this.colorSelection.hideColorPanel();
this.cancel.hide();this.save.hide();this.edit.show();this.title.css({background:"transparent",color:this.fontColor});this.title.attr("disabled","disabled");global.bookmark.editingItem=null},startEdit:function(){this.judgeToSaveOrCancel();this.lightItem();this.colorSelection.show();this.cancel.show();this.save.show();this.edit.hide();this.title.css({background:"#ffffff",color:"#000000"});this.title.removeAttr("disabled");global.bookmark.editingItem=this;this.cancel.changeButtonColor(this.fontColor);
this.save.changeButtonColor(this.fontColor)},judgeToSaveOrCancel:function(){global.bookmark.editingItem&&global.bookmark.editingItem!=this&&(global.bookmark.editingItem.cancelData(),global.bookmark.editingItem.endEdit())},lightItem:function(){$(".bookmarkItem_focus").css({background:"transparent"});$(".bookmarkItem_focus").removeClass("bookmarkItem_focus");this.item.addClass("bookmarkItem_focus");this.item.css({background:this.colorObj.rgba(0.25)})}}),PhoneBookmarkItem=Class({create:function(b,c){this.parm=
b;this.color=b.color;this.caption=b.caption;this.pageCaption="P:"+parseInt(b.pageIndex);this.pageIndex=parseInt(b.pageIndex);this.callback=c;this.item=$("<div class='item'></div>");this.page=$("<span class='page'>P:"+this.pageIndex+"</span>");this.image=$("<img class='thumbnail' src='"+getPageDir(this.pageIndex,"thumb",originTotalPageCount)+"'/>");this.caption=$("<span class='title'>"+this.caption+"</span>");this.deleteBtn=$("<div class='delete'></div>");this.item.append(this.page);this.item.append(this.image);
this.item.append(this.caption);this.item.append(this.deleteBtn);this.initEvent()},appendTo:function(b){b.append(this.item)},initEvent:function(){this.deleteBtn.click(function(){this.item.remove();this.callback.deleteItem(this.pageIndex)}.bind(this));this.item.click(function(){gotoPageFun(this.pageIndex)}.bind(this))}}),AnalysisBookmark=Class({create:function(){this.bookmarkList=[];this.bookmarkDetaildList=[];this.key=window.location.href.replace(window.location.hash,"")+"BookMark";this.refresh()},
refresh:function(){var b=this.getListFromLocalStorage();if(b&&0!=b.length){for(var c=0;c<b.length;c++)parseInt(b[c].pageIndex)&&this.bookmarkList.push(parseInt(b[c].pageIndex));this.bookmarkDetaildList=b}},getListFromLocalStorage:function(){var b=this.getLocalStorage(this.key);return Instance.parse(b)},getList:function(){return this.bookmarkList},getItem:function(b){for(var c,d=0;d<this.bookmarkDetaildList.length;d++)if(parseInt(this.bookmarkDetaildList[d].pageIndex)==parseInt(b)){c=this.bookmarkDetaildList[d];
break}return c},editItem:function(b){for(var c=b.pageIndex,d=0;d<this.bookmarkDetaildList.length;d++)if(parseInt(this.bookmarkDetaildList[d].pageIndex)==parseInt(c)){this.bookmarkDetaildList[d].caption=b.caption;this.bookmarkDetaildList[d].color=b.color;break}this.refreshLocalStorage()},addItem:function(b){var c=b.pageIndex;0>this.bookmarkList.indexOf(c)&&(this.bookmarkList.push(c),this.bookmarkDetaildList.push(b),this.sortList())},deleteItem:function(b){for(var c=0;c<this.bookmarkDetaildList.length;c++)if(parseInt(this.bookmarkDetaildList[c].pageIndex)==
parseInt(b)){this.bookmarkDetaildList.remove(c);this.bookmarkList.remove(c);break}this.refreshLocalStorage()},removeAll:function(){this.bookmarkList=[];this.bookmarkDetaildList=[];this.deleteLocalStorage(this.key)},sortList:function(){this.bookmarkList.sort(function(b,c){return b-c});for(var b=[],c=0;c<this.bookmarkList.length;c++)for(var d=this.bookmarkList[c],f=0;f<this.bookmarkDetaildList.length;f++)if(parseInt(this.bookmarkDetaildList[f].pageIndex)==parseInt(d)){b.push(this.bookmarkDetaildList[f]);
break}this.bookmarkDetaildList=b;this.refreshLocalStorage()},getLocalStorage:function(b){try{if(window.localStorage[b])return window.localStorage.getItem(b)}catch(c){}},refreshLocalStorage:function(){try{window.localStorage&&window.localStorage.setItem(this.key,Instance.JSON(this.bookmarkDetaildList))}catch(b){}},deleteLocalStorage:function(b){try{window.localStorage[b]&&window.localStorage.setItem(b,"")}catch(c){}}}),BookmarkListData=Class({create:function(){this.initStaticList();this.initBookmarkList()},
initBookmarkList:function(){this.analysisData=new AnalysisBookmark;this.bookmarkList=this.analysisData.getList()},initStaticList:function(){this.staticList=[];if(bmtConfig&&0!=bmtConfig.length)for(var b=bmtConfig.length,c=0;c<b;c++)this.staticList.push(bmtConfig[c].pageIndex)},addItem:function(b){this.inList(b.pageIndex)||this.analysisData.addItem(b)},deleteItem:function(b){this.analysisData.deleteItem(b)},editItem:function(b){this.analysisData.editItem(b)},refresh:function(){this.bookmarkList=this.analysisData.getList()},
inList:function(b){return 0<=this.staticList.indexOf(b)||0<=this.bookmarkList.indexOf(b)?!0:!1},removeAll:function(){this.analysisData.removeAll()},getItem:function(b){return this.analysisData.getItem(b)},getList:function(){return this.bookmarkList},getNextItem:function(b){for(var c=0,d=this.bookmarkList.length,f=0;f<d;f++)if(this.bookmarkList[f]>b){c=this.bookmarkList[f];break}return c},getPrevItem:function(b){for(var c=0,d=this.bookmarkList.length,f=0;f<d;f++)if(this.bookmarkList[f]>b){c=this.bookmarkList[f-
1];break}return c},getLength:function(){return this.bookmarkList.length}}),BookmarkListPanel=Class({create:function(b){this.callback=b;this.bookmarkList=new BookmarkListData;this.initSwiper()},onCreate:function(){},initSwiper:function(){this.bookmarkSwiper=$("<div class='bookmarkSwiper stage'></div>");this.bookmarkSwiperList=$("<div class='swiper'></div>");this.progress=$("<div class='progress'></div>");this.progressBar=$("<div class='progressBar'></div>");this.refreshSwiper();this.bookmarkSwiper.append(this.bookmarkSwiperList);
isPhone()||isPad()?this.bookmarkSwiper.css({"overflow-y":"auto","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}):(this.progress=$("<div class='progress'></div>"),this.progressBar=$("<div class='progressBar'></div>"),this.bookmarkSwiper.append(this.progress),this.progress.append(this.progressBar),this.bookmarkSwiper.scroll({},Direction.top))},refreshSwiper:function(){for(var b=this.bookmarkList.getList(),c=b.length,d=0;d<c;d++)this.refreshItem(b[d])},refreshItem:function(b){b=this.bookmarkList.getItem(b);
this.newItem(b).appendTo(this.bookmarkSwiperList)},newItem:function(b){return new BookmarkItem(b,this.callback)},refreshListPanel:function(){if(!isPhone()&&!isPad()){this.bookmarkSwiper.css({height:"auto"});this.bookmarkSwiperList.css({position:"relative"});var b=this.bookmarkSwiper.height();this.bookmarkSwiper.find(".swiper").height();b>=this.maxHeight?(this.bookmarkSwiper.css({height:this.maxHeight+"px"}),this.bookmarkSwiperList.css({position:"absolute"})):this.bookmarkSwiperList.css({top:0});this.bookmarkSwiper.refreshData&&
this.bookmarkSwiper.refreshData()}},addItem:function(b){if(!this.bookmarkList.inList(b.pageIndex)){var c=this.newItem(b);this.bookmarkList.addItem(b);if(1==this.bookmarkList.getLength())c.appendTo(this.bookmarkSwiperList);else{var d=this.getPrevItem(b.pageIndex);b=this.getNextItem(b.pageIndex);d.attr("pageIndex")?c.insertAfter(d):b.attr("pageIndex")?c.insertBefore(b):c.appendTo(this.bookmarkSwiperList)}this.refreshPanel()}},deleteItem:function(b){this.bookmarkList.deleteItem(b);this.refreshPanel()},
editItem:function(b){this.bookmarkList.editItem(b);this.refreshPanel()},refresh:function(){this.bookmarkList.refresh()},getLength:function(){},inList:function(b){return this.bookmarkList.inList(b)?!0:!1},removeAll:function(){this.bookmarkSwiperList.empty();this.bookmarkList.removeAll()},getNextItem:function(b){b=this.bookmarkList.getNextItem(b);return $("#bookmark_item"+b)},getPrevItem:function(b){b=this.bookmarkList.getPrevItem(b);return $("#bookmark_item"+b)},refreshPanel:function(){this.refresh();
this.refreshListPanel();BookInfo.getBook()&&BookInfo.getBook().bmt&&BookInfo.getBook().bmt.reload()},onResize:function(b,c){this.maxHeight=c;this.bookmarkSwiper.css("height",c+"px")}}),PhoneBookmarkListPanel=Class({create:function(b){this._super(b)},onCreate:function(){},newItem:function(b){return new PhoneBookmarkItem(b,this.callback)}}).extend(BookmarkListPanel),PcBookmarkFrame=Class({create:function(b){this.elements=new BookmarkElements(this);this.bookmarkListPanel=new PcBookmarkListPanel(this);
this.elements.bookmarkList=this.bookmarkListPanel.bookmarkList;this._super(b)},onCreate:function(){},initHtml:function(){this.stage.append(this.title);this.stage.append(this.close);this.content=$("<div class='bookmark_content'></div>");this.stage.append(this.content);var b=$("<p class='inputForm'></p>");b.append(this.input);b.append(this.colorSelection);this.content.append(b);this.content.append(this.leftAddPage);this.content.append(this.rightAddPage);this.content.append(this.bookmarkListPanel.bookmarkListTitle);
this.content.append(this.bookmarkListPanel.bookmarkSwiper);this.content.append(this.remove);this.parent.append(this.stage);this.refreshPanel()},refreshPanel:function(){this.bookmarkListPanel.refreshPanel();this.elements.refreshElements()},addItem:function(b){b&&b.caption&&b.pageIndex&&!this.bookmarkListPanel.inList(b.pageIndex)&&(this.bookmarkListPanel.addItem(b),this.colorSelection.refreshColor(),this.input.val(""),this.refreshPanel())},deleteItem:function(b){this.bookmarkListPanel.deleteItem(b);
this.refreshPanel()},editItem:function(b){this.bookmarkListPanel.editItem(b);this.refreshPanel()},refreshItem:function(b){this.bookmarkListPanel.refreshItem(b)},removeAll:function(){this.bookmarkListPanel.removeAll();this.refreshPanel()},onResize:function(){this.refreshPanel()},onShow:function(){this.close.changeButtonColor(this.fontColor)}}).extend(SlideForm),PhoneBookmarkFrame=Class({create:function(b){this.elements=new BookmarkElements(this);this.bookmarkListPanel=new PhoneBookmarkListPanel(this);
this.elements.bookmarkList=this.bookmarkListPanel.bookmarkList;this._super(b)},onCreate:function(){this.close.changeButtonColor(this.fontColor);this._super()},initHtml:function(){this.title.append(this.close);this.stage.append(this.title);this.stage.append(this.bookmarkListPanel.bookmarkSwiper);this.refreshPanel()},refreshPanel:function(){this.bookmarkListPanel.refreshPanel();this.elements.refreshElements()},addItem:function(b){b&&b.pageIndex&&!this.bookmarkListPanel.inList(b.pageIndex)&&(this.bookmarkListPanel.addItem(b),
this.refreshPanel())},deleteItem:function(b){this.bookmarkListPanel.deleteItem(b);this.refreshPanel()},refreshItem:function(b){this.bookmarkListPanel.refreshItem(b)},onResize:function(){this._super();this.bookmarkListPanel.onResize(this.width,windowHeight-36);this.refreshPanel()},initEvent:function(){},onShow:function(){this.close.changeButtonColor(this.fontColor)}}).extend(PhoneFormFrame),PhoneBookmarkForm=Class({}).extend(PhoneBookmarkFrame);
function grayBackground(b,c,d,f,g){this.sw=f;this.sh=g;this.background=$("<div ></div>");this.background.css({width:f+"px",height:g+"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 f=Point(d.width(),d.height());d.remove();return f};
function label(b,c){this.labelBox=$('<div style = "position : absolute;font-family:Tahoma,Georgia,Serif;font-size:12px">'+b+"</div>");if("null"!=b&&""!=b){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 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})};
var BookShadow=Class({create:function(b){this.background=$("<div class='bookShadow'></div>");$(b).append(this.background);this.visible=!0},doubleWidth:function(b){$(this.background).attr("class",b?"doubleWidth":"singleWidth");$(this.background).addClass("bookShadow")},right:function(b){$(this.background).css({right:"auto"});b&&$(this.background).css({right:"0px"})},show:function(){this.visible||($(this.background).show(),this.visible=!0)},hide:function(){this.visible&&($(this.background).hide(),this.visible=
!1)}});bdor[26]="h";
Class("BookmarkList",{create:function(){this.bookmarks=[];this.bookPageCount=bookConfig.totalPageCount},reload:function(){this.bookmarks=[];this.loadBasicData();this.loadUserData();this.sort()},loadBasicData:function(){if(global.bmtConfig)for(var b=0;b<bmtConfig.length;b++)this.isShow(bmtConfig[b])&&this.bookmarks.push(bmtConfig[b])},loadUserData:function(){for(var b=Instance.parse(this.getUserDataFromLocal(),[]),c=0;c<b.length;c++)this.isShow(b[c])&&this.bookmarks.push(b[c])},isShow:function(b){return parseInt(b.pageIndex)<=
this.bookPageCount&&!this.exists(b)},getUserDataFromLocal:function(){var b=window.location.href.replace(window.location.hash,"")+"BookMark";try{if(window.localStorage&&window.localStorage[b])return window.localStorage.getItem(b)}catch(c){}},sort:function(){this.bookmarks=this.bookmarks.sort(function(b,c){return parseInt(b.pageIndex)-parseInt(c.pageIndex)})},count:function(){return this.bookmarks.length},item:function(b){return this.bookmarks[b]},exists:function(b){for(var c=0;c<this.count();c++)if(this.item(c).pageIndex==
b.pageIndex)return!0;return!1}});
Class("BookmarkTabItem",{$body:null,$parent:null,create:function(b){this.data=b;this.$body=$("<div class='bookmark_item'></div>");this.$caption=$("<div class='bookmark_caption'></div>");this.$body.append(this.$caption);this.initStyle();this.update()},initStyle:function(){bmtConfig.showPage&&this.$body.attr("title",getShownPageNumber(this.data.pageIndex));bmtConfig.hasTexture&&this.$body.css({"background-image":"url("+(uiBaseURL+"leather1.png")+")","background-repeat":"repeat"})},getData:function(){return this.data},
setData:function(b){this.data=b;this.update()},update:function(){this.$body.css("background-color",this.data.color);this.$caption.text(this.data.caption)},moveTo:function(b){this.$parent!=b&&(this.remove(),this.$parent=b,this.$parent.append(this.$body),this.$body.bind("click",this.onBookmarkClick.bind(this)),this.$body.bind("mouseenter",this.onBookmarkMouseEnter.bind(this)),this.$body.bind("mouseleave",this.onBookmarkMouseLeave.bind(this)))},remove:function(){null!=this.$parent&&(this.$body.remove(),
this.$body.unbind(),this.$parent=null)},onBookmarkClick:function(b){gotoPageFun(this.data.pageIndex)},onBookmarkMouseEnter:function(b){this.$body.animate({top:"5px"},300)},onBookmarkMouseLeave:function(b){this.$body.animate({top:"40px"},300)},setPosition:function(b){this.$body.css({left:"",right:"","z-index":""});this.$body.css(b)}});
Class("BookmarkItemPool",{create:function(){this.items=[]},getBookmarkItem:function(b){var c=this.getItemFromList(b);c||(c=this.createNewItem(b));return c},getItemFromList:function(b){for(var c=0;c<this.items.length;c++){var d=this.items[c];if(d.getData().pageIndex==b.pageIndex)return d.setData(b),d}return null},createNewItem:function(b){b=new BookmarkTabItem(b);this.items.push(b);return b},clean:function(b){for(var c=0;c<this.items.length;c++){var d=this.items[c],f=d.getData();b.exists(f)||d.remove()}}});
Class("BookmarkTab",{$parent:null,visible:!0,onSideEdge:!0,zIndex:0,create:function(b,c){this.$parent=b;this.hideSmallTab=!!c;this.onSideEdge=bmtConfig.onSideEdge;this.zIndex=2*(bookConfig.totalPageCount+5);this.bookmarkPool=new BookmarkItemPool;this.bookmarkList=new BookmarkList;this.initBookmarkBar();this.reload()},initBookmarkBar:function(){this.leftBar=$("<div class='left_bookmark_bar'></div>");this.rightBar=$("<div class='right_bookmark_bar'></div>");this.leftBar.on("mouseup touchstart",function(b){b.stopPropagation()});
this.rightBar.on("mouseup touchstart",function(b){b.stopPropagation()});this.onSideEdge&&(this.leftBar.addClass("vertical"),this.rightBar.addClass("vertical"));this.leftBar.css("z-index",this.zIndex);this.rightBar.css("z-index",this.zIndex);this.$parent.append(this.leftBar);this.$parent.append(this.rightBar)},reload:function(){!1!=this.visible&&(this.bookmarkList.reload(),this.refresh())},refresh:function(){!1!=this.visible&&(this.separate(),this.adjustBar(),this.onResize())},separate:function(){this.refreshShownPage();
this.bookmarkPool.clean(this.bookmarkList);for(var b=0;b<this.bookmarkList.count();b++){var c=this.bookmarkList.item(b),d=this.bookmarkPool.getBookmarkItem(c);c.pageIndex>=this.bigShownPage?rightToLeft?d.moveTo(this.leftBar):d.moveTo(this.rightBar):c.pageIndex<=this.smallShownPage&&(rightToLeft?d.moveTo(this.rightBar):d.moveTo(this.leftBar))}},refreshShownPage:function(){var b=BookInfo.getCurrentPages();1==b.length?(this.smallShownPage=b[0],this.bigShownPage=b[0]):(this.smallShownPage=Math.min(b[0],
b[1]),this.bigShownPage=Math.max(b[0],b[1]))},isTheFirstPage:function(){this.refreshShownPage();return 1==this.bigShownPage},isTheLastPage:function(){this.refreshShownPage();return this.smallShownPage==totalPageCount},setAttachmentBefore:function(b){1>=b&&(parseBool(bookConfig.RightToLeft)?this.hideRightBar():this.hideLeftBar());b>=originTotalPageCount&&(parseBool(bookConfig.RightToLeft)?this.hideLeftBar():this.hideRightBar())},adjustBar:function(){var b=this.leftBar.children().length,c=this.rightBar.children().length;
this.hideSmallTab?rightToLeft?(this.hideRightBar(),0==b?this.hideLeftBar():this.showLeftBar()):(this.hideLeftBar(),0==c?this.hideRightBar():this.showRightBar()):rightToLeft?(0==c||this.isTheFirstPage()?this.hideRightBar():this.showRightBar(),0==b||this.isTheLastPage()?this.hideLeftBar():this.showLeftBar()):(0==b||this.isTheFirstPage()?this.hideLeftBar():this.showLeftBar(),0==c||this.isTheLastPage()?this.hideRightBar():this.showRightBar());bookConfig.HardPageEnable&&this.adjustZindex()},adjustZindex:function(){this.leftBar.css("z-index",
this.zIndex);this.rightBar.css("z-index",this.zIndex);rightToLeft?(this.isTheLastPage()&&this.rightBar.css("z-index",1),this.isTheFirstPage()&&this.leftBar.css("z-index",1)):(this.isTheLastPage()&&this.leftBar.css("z-index",1),this.isTheFirstPage()&&this.rightBar.css("z-index",1))},onResize:function(){if(this.onSideEdge){var b=this.$parent.height(),c=this.$parent.width();this.leftBar.css({width:b+"px",left:-b+"px"});this.rightBar.css({width:b+"px",left:c+"px"});rightToLeft?(this.resizeItemsOfBar(this.rightBar,
"left",1),this.resizeItemsOfBar(this.leftBar,"right",-1)):(this.resizeItemsOfBar(this.leftBar,"right",1),this.resizeItemsOfBar(this.rightBar,"left",-1))}else b=this.$parent.width(),c=this.$parent.width(),this.hideSmallTab||(b/=2),this.leftBar.css({width:b+"px",left:"0px"}),this.rightBar.css({width:b+"px",left:c-b+"px"}),rightToLeft?(this.resizeItemsOfBar(this.rightBar,"left",1),this.resizeItemsOfBar(this.leftBar,"left",-1)):(this.resizeItemsOfBar(this.leftBar,"left",1),this.resizeItemsOfBar(this.rightBar,
"left",-1))},resizeItemsOfBar:function(b,c,d){for(var f=b.width(),g=b.children().length,f=Math.floor((f-4-110)/(g-1)),f=Number.between(f,10,70),g=iPos=0;g<this.bookmarkList.count();g++){var h=this.bookmarkList.item(g),k=this.bookmarkPool.getBookmarkItem(h);if(k.$parent==b){var l={};l[c]=f*iPos;l["z-index"]=d*h.pageIndex;k.setPosition(l);iPos++}}},show:function(){this.visible=!0;this.refresh()},hide:function(){this.hideLeftBar();this.hideRightBar();this.visible=!1},showLeftBar:function(){0<this.leftBar.children().length?
this.leftBar.css("display","block"):this.leftBar.css("display","none")},hideLeftBar:function(){this.leftBar.css("display","none")},showRightBar:function(){0<this.rightBar.children().length?this.rightBar.css("display","block"):this.rightBar.css("display","none")},hideRightBar:function(){this.rightBar.css("display","none")}});
var TableOfContentElements=Class({create:function(b){this._super(b);this.callBack=b;this.initElements();this.initEvent(b);this.pickElements(b)},initElements:function(){this.tableofcontentSwiper=$("<div class='stage'></div>");this.tableofcontentSwiperList=$("<div class='swiper'></div>");this.refreshSwiper(this.tableofcontentSwiperList,ols);this.tableofcontentSwiper.append(this.tableofcontentSwiperList);isPhone()||isPad()?this.tableofcontentSwiper.css({"overflow-y":"auto","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}):
(this.progress=$("<div class='progress'></div>"),this.progressBar=$("<div class='progressBar'></div>"),this.tableofcontentSwiper.append(this.progress),this.progress.append(this.progressBar),this.tableofcontentSwiper.scroll({},Direction.top))},refreshSwiper:function(b,c){for(var d=c.length,f=0;f<d;f++)this.addItem(b,c[f])},addItem:function(b,c){var d=new this.callBack.newItem(b,c,this.refresh.bind(this));b.append(d.getItem())},refresh:function(){isPhone()||isPad()||this.tableofcontentSwiper.refreshData()},
initEvent:function(b){},pickElements:function(b){b.tableofcontentSwiper=this.tableofcontentSwiper;b.tableofcontentSwiperList=this.tableofcontentSwiperList;b.progress=this.progress;b.progressBar=this.progressBar},changeLanguage:function(){}}).extend(FormElements),TableOfContentItem=Class({create:function(b,c,d){this.item=$("<div class='item'></div>");this.callback=d;this.level=parseInt(ols[0].level)?parseInt(c.level):parseInt(c.level)+1;this.children=[];this.parent=b;this.parm=c;this.parm.caption=
HTMLString.toText(this.parm.caption);this.hasChild=c.children&&0<c.children.length;this.expandUrl=form_icons.arrow?"data:image/png;base64,"+form_icons.arrow:uiBaseURL+"arrow.png";this.collapseUrl=rightToLeft?form_icons.arrow3?"data:image/png;base64,"+form_icons.arrow3:uiBaseURL+"arrow3.png":form_icons.arrow2?"data:image/png;base64,"+form_icons.arrow2:uiBaseURL+"arrow2.png";this.fontColor=c.fontColor;this.colorObj=Color(this.fontColor);this.initDefaultDom();this.initHtml(b,c);this.initEvent()},getItem:function(){return this.item},
initDefaultDom:function(){rightToLeft?this.initRightToLeftDefaultDom():this.initLeftToRightDefaultDom();this.arrow&&(this.arrow[0].colorChanged=!1,this.arrow.changeButtonColor(this.fontColor))},initRightToLeftDefaultDom:function(){LanguageTool.isRightToLeft(this.parm.caption)?this.description=$("<p class='description rtl'>"+this.parm.caption+"</p>"):this.description=$("<p class='description'>"+this.parm.caption+"</p>");this.hasChild&&(this.arrow=$("<img class='arrow' src='"+this.collapseUrl+"'/>"),
this.arrow.css("right",10*(this.level-1)+"px"));this.description.css("margin-right",10*(this.level-1)+15+"px")},initLeftToRightDefaultDom:function(){this.description=$("<p class='description'>"+this.parm.caption+"</p>");this.hasChild&&(this.arrow=$("<img class='arrow' src='"+this.collapseUrl+"'/>"),this.arrow.css("left",10*(this.level-1)+"px"));this.description.css("margin-left",10*(this.level-1)+15+"px")},initHtml:function(b,c){rightToLeft?this.initRightToLeftHtml():this.initLeftToRightHtml()},initRightToLeftHtml:function(){this.item.append(this.description);
this.arrow&&this.item.append(this.arrow)},initLeftToRightHtml:function(){this.arrow&&this.item.append(this.arrow);this.item.append(this.description)},initEvent:function(){this.item.onTap(function(){this.parm.url?window.open(this.parm.url,"_blank"):(gotoPageFun(parseInt(this.parm.page)),(isPhone()||isPad())&&global.frmTableOfContent.hide())}.bind(this));this.item.bind("mouseover",function(){this.item.css({background:this.colorObj.rgba(0.1)})}.bind(this));this.item.bind("mouseleave",function(){this.isExpand||
this.item.css({"background-color":"transparent"})}.bind(this));if(this.hasChild){if(this.arrow)this.arrow.onTap(function(){this.onSwitch()}.bind(this));this.arrow.bind("mousedown touchstart pointerdown mouseover mousemove click",function(b){b.stopPropagation()})}},expand:function(b){this.hasChild&&(this.isExpand=!0,this.arrow&&this.arrow.attr("src",this.expandUrl),0==this.children.length?this.addChildren():this.showChildren(),this.item.css({"font-weight":"bold","background-color":this.colorObj.rgba(0.1)}),
b&&this.callback(),this.arrow&&(this.arrow[0].colorChanged=!1,this.arrow.changeButtonColor(this.fontColor)))},collapse:function(b){if(this.hasChild){this.isExpand=!1;this.arrow&&this.arrow.attr("src",this.collapseUrl);for(var c=0;c<this.children.length;c++)this.children[c].hide(),this.children[c].collapse();this.item.css({"font-weight":"","background-color":""});b&&this.callback();this.arrow&&(this.arrow[0].colorChanged=!1,this.arrow.changeButtonColor(this.fontColor))}},addChildren:function(){for(var b=
this.parm.children.length,c=0;c<b;c++){this.parm.children[c].fontColor=this.fontColor;var d=new (global[this.getClassName()])(this.parent,this.parm.children[c],this.callback);0==c?d.getItem().insertAfter(this.item):d.getItem().insertAfter(this.children[c-1].getItem());this.children.push(d)}},showChildren:function(){for(var b=this.children.length,c=0;c<b;c++)this.children[c].show(),this.children[c].getIsExpand()&&this.children[c].expand()},onSwitch:function(){this.opened?this.collapse(!0):this.expand(!0);
this.opened=!this.opened},getIsExpand:function(){return this.opened},show:function(){this.item.show()},hide:function(){this.item.hide()}}),PhoneTableOfContentItem=Class({create:function(b,c,d){c.fontColor=bookConfig.formFontColor?bookConfig.formFontColor:bookConfig.iconColor;this._super(b,c,d)}}).extend(TableOfContentItem),PhoneTableOfContentForm=Class({create:function(b){this.elements=new TableOfContentElements(this);this._super(b)},onCreate:function(){this.stage.css({color:this.fontColor});this.close.changeButtonColor(this.fontColor);
this._super()},initHtml:function(){this.title.append(this.close);this.stage.append(this.title);this.stage.append(this.tableofcontentSwiper)},newItem:function(b,c,d){return new PhoneTableOfContentItem(b,c,d)},onResize:function(){this._super();this.tableofcontentSwiper.css("height",this.height-36+"px");this.elements.refresh()},initEvent:function(){},onShow:function(){}}).extend(PhoneFormFrame),thickessPerBar=1,totalheight=300,originColor;
function drawThickeness(b,c,d,f,g){totalheight=d;var h=0;d=thickessPerBar/8/1.5;var k;k=Math.max(5*c/12,10);k=Math.min(k,32);k=0==k%2?k:k+1;var l=0,m=0;Math.max(k,4);for(Math.min(k,12);m<c;){k=getColorAtIdx(m,c);h=d*m-Math.sin(Math.PI/2/4*m/c)*d*m/2;h=d*m;l=totalheight-2*h;for(k=k.toString(16);6>k.length;)k="0"+k;b.fillStyle="#"+k;b.fillRect(f+g*m,h,1,l);b.fill();m++}}var COLOR_0=243,COLOR_1_1=209,COLOR_1_2=231,COLOR_2_1=209,COLOR_2_2=213;
function getColorAtIdx(b,c){var d=0,f=d=0,d=Math.max(3,c/6+c/4),d=Math.min(11,d),d=0==d%2?d-1:d;global.originColor||(global.originColor=Color(bookConfig.thicknessColor).split());var g=originColor.r/255,h=originColor.g/255,k=originColor.b/255;0==b?d=COLOR_0:b<d?d=0==b%2?COLOR_1_2:COLOR_1_1:(d=(b-d)/2,f=4<d/2?24:6*Math.floor(d/2),d=0==d%2?COLOR_2_1-f:COLOR_2_2-f);return d*k|d*h<<8|d*g<<16}
Class("Thickness",{create:function(b,c){this.thicknessWidth=this.getMaxThicknessWidth();this.totalPageCount=bookConfig.totalPageCount;this.endIndex=this.startIndex=this.pageCount=0;this.parent=b;this.isLeft=c;this.scale=1;this.init();this.initShadow();this.initEvent()},getMaxThicknessWidth:function(){switch(bookConfig.thicknessWidthType){case "none":return 0;case "thinner":return 2;case "thin":return 15;case "thicker":return 40}return 20},init:function(){this.thickness=$("<div class='thickness'></div>");
this.thicknessCanvas=$("<canvas style='position:absolute;top:0;left:0;' id='thickness'>");this.isLeft?this.thickness.addClass("left_thickness"):this.thickness.addClass("right_thickness");this.thickness.css({"z-index":2*(bookConfig.totalPageCount+5)-1});this.thickness.append(this.thicknessCanvas);this.parent.append(this.thickness);this.context=this.thicknessCanvas[0].getContext("2d")},initShadow:function(){this.shadow||$.browser.msie&&11>$.browser.version||(this.shadow=$("<div class='shadow'></div>"),
this.thickness.append(this.shadow))},refresh:function(b,c){this.startIndex=b;this.endIndex=c;this.pageCount=this.endIndex-this.startIndex;this.width=this.getThicknessWidth(Math.abs(this.pageCount));this.thickness.css({width:this.width+"px"});this.thicknessCanvas.attr("width",this.width+"px");this.context.clearRect(0,0,this.thicknessWidth,this.height);this.isLeft?(this.thickness.css({left:-this.width+"px"}),drawThickeness(this.context,this.width,this.height,this.width,-1)):drawThickeness(this.context,
this.width,this.height,0,1)},onResize:function(b,c){this.resizeThickness(b,c);this.resizeShadow(b,c)},show:function(){this.thickness.show()},hide:function(){this.thickness.hide()},resizeShadow:function(b,c){},resizeThickness:function(b,c){this.height=c;var d="100%";this.isLeft&&(d=-this.width+"px");this.thickness.css({left:d});this.thicknessCanvas.attr("height",c+"px");this.thicknessCanvas.attr("width",this.thicknessWidth+"px");this.context.clearRect(0,0,this.thicknessWidth,this.height);this.isLeft?
drawThickeness(this.context,this.thicknessWidth,c,this.thicknessWidth,-1):drawThickeness(this.context,this.thicknessWidth,c,0,1);this.resetTotalWidth(b,c)},resetTotalWidth:function(b,c){var d=Math.min(this.totalPageCount,100);this.totalWidth=$.easing.easeOutQuad(null,d,0,this.thicknessWidth,100);this.totalWidth=Math.floor(this.totalWidth);scale=1;scale=$.easing.swing(null,Math.max(this.totalWidth-8,0),1,scale-1,this.thicknessWidth-8);this.totalWidth=Math.floor(this.totalWidth*scale)},getPageIndexByPosition:function(b){b=
this.getDistance(b);return this.startIndex+parseInt(b*this.pageCount/this.width)},getDistance:function(b){b=b.pageX;var c=$(this.thickness).offset().left;return b-c},getThicknessWidth:function(b){return this.width=Math.floor(this.totalWidth*b/this.totalPageCount)},getWidth:function(){return this.width},getHeight:function(){return this.height},initEvent:function(){this.thickness.bind("mousemove",function(b){if(0!=this.pageCount){var c=this.getPageIndexByPosition(b);if(!c||0>=c)this.hint&&this.hint.hide();
else{var c=" "+getShownPageNumber(c)+" ",d=b.pageX;b=b.pageY-30;this.hint||(this.hint=new divHint(c,d,b));this.hint.setText(c);this.hint.show(d,b);this.hint.moveto(d,b)}}}.bind(this));this.thickness.bind("mouseleave",function(){null!=this.hint&&this.hint.hide()}.bind(this));this.thickness.bind(_event._down+" "+_event._end,function(b){b.stopPropagation()}.bind(this));this.thickness.click(function(b){0!=this.pageCount&&(b=this.getPageIndexByPosition(b),!b||0>=b||gotoPageFun(b))}.bind(this))},doSetMovingScale:function(b,
c,d,f,g){if(!(!this.totalWidth||0>=this.totalWidth||(g=g?0:Math.min(5/this.totalWidth,1),1==g||1!=b&&1!=c&&b!=totalPageCount&&c!=totalPageCount))){var h=1,k=1;if(1==b||b==totalPageCount)h=g;if(1==c||c==totalPageCount)k=g;b=$.easing.easeInOutSine(null,d,h,k-h,f);this.setScale(b)}},setScale:function(b){this.thickness.css({transform:"scaleX("+b+") scaleZ(1)","-webkit-transform":"scaleX("+b+") scaleZ(1)","-moz-transform":"scaleX("+b+") scaleZ(1)","-ms-transform":"scaleX("+b+") scaleZ(1)","-o-transform":"scaleX("+
b+") scaleZ(1)"});this.scale=b}});
var ThicknessManager=Class({create:function(b,c){this.book=c;this.leftThickness=new Thickness(b,!0);this.rightThickness=new Thickness(b,!1)},setAttachmentBefore:function(b){bookConfig.RightToLeft?this.book.currentPageIndex<b?this.leftThickness&&this.leftThickness.refresh(bookConfig.totalPageCount,this.getMaxCurrentIndex(b)):this.rightThickness&&this.rightThickness.refresh(this.getMinCurrentIndex(b),0):this.book.currentPageIndex<b?this.rightThickness&&this.rightThickness.refresh(this.getMaxCurrentIndex(b),bookConfig.totalPageCount):
this.leftThickness&&this.leftThickness.refresh(0,this.getMinCurrentIndex(b))},afterCurling:function(){this.refreshThickness()},setAttachmentIn:function(b){},setAttachmentAfter:function(){this._super();this.afterCurling()},followToPoint:function(b,c,d){this.leftThickness&&this.leftThickness.doSetMovingScale(b,c,d,this.book.width,bookConfig.HardPageEnable);this.rightThickness&&this.rightThickness.doSetMovingScale(b,c,d,this.book.width,bookConfig.HardPageEnable)},refreshThickness:function(){bookConfig.RightToLeft?
(this.leftThickness&&this.leftThickness.refresh(bookConfig.totalPageCount,this.getMaxCurrentIndex()),this.rightThickness&&this.rightThickness.refresh(this.getMinCurrentIndex(),0)):(this.leftThickness&&this.leftThickness.refresh(0,this.getMinCurrentIndex()),this.rightThickness&&this.rightThickness.refresh(this.getMaxCurrentIndex(),bookConfig.totalPageCount));this.leftThickness&&this.leftThickness.doSetMovingScale(this.book.currentPageIndex,this.book.currentPageIndex,this.book.width,this.book.width,
bookConfig.HardPageEnable);this.rightThickness&&this.rightThickness.doSetMovingScale(this.book.currentPageIndex,this.book.currentPageIndex,this.book.width,this.book.width,bookConfig.HardPageEnable)},resizeAttachment:function(b,c){if(this.leftThickness)this.leftThickness.onResize(b,c);if(this.rightThickness)this.rightThickness.onResize(b,c);this.refreshThickness()},getThicknessWidth:function(){return[this.leftThickness.getWidth()*this.leftThickness.scale,this.rightThickness.getWidth()*this.rightThickness.scale]},
getMinCurrentIndex:function(b){if(void 0==b||null==b)b=this.book.currentPageIndex;return 2*parseInt(b/2)},getMaxCurrentIndex:function(b){if(void 0==b||null==b)b=this.book.currentPageIndex;b=2*parseInt(b/2)+1;return Math.min(b,bookConfig.totalPageCount)}}),FlipShotBar=Class({create:function(b){this.flipShotObj=$("<div id='flipShotBar' class='flipShotBar'></div>");this.flipShotObj.css({"z-index":2*(bookConfig.totalPageCount+5)+1});this.isLeft=b;this.visible=!0;this.width=50;this.height=0;this.init();
this.initEvents();this.flipShotObj.append(this.firstDiv);this.flipShotObj.append(this.prevDiv)},init:function(){this.firstDiv=$("<div class='flipbutton upbutton'></div>");this.prevDiv=$("<div class='flipbutton downbutton'></div>");this.isLeft?(this.firstDiv.addClass("left"),this.prevDiv.addClass("left"),this.prevImageUrl=uiBaseURL+"slide_leftButton.png",this.firstImageUrl=uiBaseURL+"slide_firstButton.png"):(this.firstDiv.addClass("right"),this.prevDiv.addClass("right"),this.prevImageUrl=uiBaseURL+
"slide_rightButton.png",this.firstImageUrl=uiBaseURL+"slide_lastButton.png");this.prevDiv.append("<img src='"+this.prevImageUrl+"'/>");this.firstDiv.append("<img src='"+this.firstImageUrl+"'/>")},onResize:function(b,c){var d=Math.min(50,0.7*c/8),f=Math.min(0.7*c,310);this.width=d;this.height=f;this.flipShotObj.css({width:d,height:f});this.setPosition(b,c)},setPosition:function(b,c){this.flipShotObj.css({left:this.isLeft?1-this.width:"100%",top:(c-this.height)/2})},setScale:function(b){this.width*=
b;this.height*=b;this.flipShotObj.css({width:this.width,height:this.height})},setVisible:function(b){this.flipShotObj.css({display:b?"block":"none"});this.visible=b},getContainer:function(){return this.flipShotObj},initEvents:function(){this.isLeft?(this.prevDiv.bind(_event._end,function(b){rightToLeft?nextPageFun():previousPageFun()}),this.firstDiv.bind(_event._end,function(b){rightToLeft?lastPageFun():firstPageFun()})):(this.prevDiv.bind(_event._end,function(b){rightToLeft?previousPageFun():nextPageFun()}),
this.firstDiv.bind(_event._end,function(b){rightToLeft?firstPageFun():lastPageFun()}));this.prevDiv.on("mousedown mouseup touchstart",function(b){b.stopPropagation()});this.firstDiv.on("mousedown mouseup touchstart",function(b){b.stopPropagation()})},setVisibleByIndex:function(b){this.isLeft?(1<b&&(rightToLeft||this.setVisible(!0)),b<originTotalPageCount-1&&rightToLeft&&this.setVisible(!0),3>=b&&(bookConfig.RightToLeft||1>=b&&this.setVisible(!1)),b>=originTotalPageCount-2&&bookConfig.RightToLeft&&
b>=originTotalPageCount-1&&this.setVisible(!1)):(1<b&&rightToLeft&&this.setVisible(!0),b<originTotalPageCount-1&&(rightToLeft||this.setVisible(!0)),3>=b&&bookConfig.RightToLeft&&1>=b&&this.setVisible(!1),b>=originTotalPageCount-2&&(bookConfig.RightToLeft||b>=originTotalPageCount-1&&this.setVisible(!1)))},refresh:function(){}}),FlipShotBarManager=Class({create:function(b,c){this.book=c;this.leftFlipShotBar=new FlipShotBar(!0);this.rightFlipShotBar=new FlipShotBar(!1)},appendTo:function(b){b.append(this.leftFlipShotBar.getContainer());
b.append(this.rightFlipShotBar.getContainer())},setVisibleByIndex:function(b){bookConfig.RightToLeft?(b>=this.book.currentPageIndex&&this.leftFlipShotBar.setVisibleByIndex(b),b<=this.book.currentPageIndex&&this.rightFlipShotBar.setVisibleByIndex(b)):(b<=this.book.currentPageIndex&&this.leftFlipShotBar.setVisibleByIndex(b),b>=this.book.currentPageIndex&&this.rightFlipShotBar.setVisibleByIndex(b))},refresh:function(){this.leftFlipShotBar&&this.leftFlipShotBar.setVisibleByIndex(this.book.currentPageIndex);
this.rightFlipShotBar&&this.rightFlipShotBar.setVisibleByIndex(this.book.currentPageIndex)},onResize:function(b,c){if(this.leftFlipShotBar)this.leftFlipShotBar.onResize(b,c);if(this.rightFlipShotBar)this.rightFlipShotBar.onResize(b,c)},getWidth:function(){return this.leftFlipShotBar?this.leftFlipShotBar.width:this.rightFlipShotBar?this.rightFlipShotBar.width:0},getHeight:function(){return this.leftFlipShotBar?this.leftFlipShotBar.height:this.rightFlipShotBar?this.rightFlipShotBar.height:0},resizeAttachment:function(b,
c,d){this.leftFlipShotBar&&this.leftFlipShotBar.setScale(d);this.rightFlipShotBar&&this.rightFlipShotBar.setScale(d);if(this.leftFlipShotBar)this.leftFlipShotBar.onResize(b,c);if(this.rightFlipShotBar)this.rightFlipShotBar.onResize(b,c)}}),VideoGalleryElements=Class({create:function(b){this._super(b);this.initVideoList();this.videoList&&0!=this.videoList.length&&(this.initElements(),this.initEvent(b),this.pickElements(b))},initVideoList:function(){this.videoList=videoList},initElements:function(){this.content=
$("<div class='video_content'></div>");this.video=$("<iframe type='text/html' class='video' src='' allowfullscreen frameborder='0'></iframe>");rightToLeft?this.initRightToLeftDefaultDom():this.initLeftToRightDefaultDom();this.initSwiper()},initRightToLeftDefaultDom:function(){this.info=$("<div class='info'><span class='title rtl'>"+this.videoList[0].title+"</span><p class='description rtl'>"+this.videoList[0].description+"</p></div>")},initLeftToRightDefaultDom:function(){this.info=$("<div class='info'><span class='title'>"+
this.videoList[0].title+"</span><p class='description'>"+this.videoList[0].description+"</p></div>")},initSwiper:function(){if(this.videoList&&!(1>=this.videoList.length)){this.videoListTitle=$("<sapn class='title'>"+getLanguage("frmVideoListTitle","Video list")+"</span>");this.videoSwiper=$("<div class='videoSwiper stage'></div>");var b=$("<div class='swiper'></div>");this.progress=$("<div class='progress'></div>");var c=$("<div class='progressBar'></div>");this.refreshSwiper(b,this.videoList);this.videoSwiper.append(b);
this.videoSwiper.append(this.progress);this.progress.append(c)}},refreshSwiper:function(b,c){for(var d=c.length,f=0;f<d;f++)this.addItem(b,c[f])},addItem:function(b,c){if(b&&c){var d=function(){this.playVideo(c)}.bind(this),d=new VideoGalleryItem(c,d);b.append(d.getDom())}},playVideo:function(b){var c,d="http";window.location.href.startsWith("https")&&(d="https");"youtube"===b.type&&(c=d+"://www.youtube.com/embed/"+b.id+"?autoplay=1&wmode=transparent");"vimeo"===b.type&&(c=d+"://player.vimeo.com/video/"+
b.id+"?autoplay=1&wmode=transparent&portrait=0");this.video.attr("src",c);c=this.info.find(".description");this.info.find(".title").html(b.title);c.html(b.description)},initEvent:function(b){this.videoSwiper&&this.videoSwiper.scroll({},Direction.top,"win10")},pickElements:function(b){b.videoList=this.videoList;b.content=this.content;b.video=this.video;b.info=this.info;b.videoListTitle=this.videoListTitle;b.videoSwiper=this.videoSwiper;b.progress=this.progress},changeLanguage:function(){this.videoListTitle&&
this.videoListTitle.html(getLanguage("frmVideoListTitle","Video list"))}}).extend(FormElements),VideoGalleryItem=Class({create:function(b,c){b&&(this.parm=b,this.callback=c,this.initDom(),this.initEvent())},initDom:function(){this.item=$("<div class='item'></div>");this.image=$("<div class='thumbnail'></div>");this.parm.thumbnail&&this.image.css({"background-image":"url("+this.parm.thumbnail+")"});this.parm.title&&(this.title=rightToLeft?$("<div class='title rtl'>"+this.parm.title+"</div>"):$("<div class='title'>"+
this.parm.title+"</div>"));this.parm.description&&(this.description=rightToLeft?$("<div class='description rtl'>"+this.handleData(this.parm.description)+"</div>"):$("<div class='description'>"+this.handleData(this.parm.description)+"</div>"));this.item.append(this.image);this.title&&this.item.append(this.title);this.description&&this.item.append(this.description)},handleData:function(b){b=b.replaceAll("<","&lt");b=b.replaceAll(">","&gt");return b=handleData(b,"")},initEvent:function(){this.item.onTap(this.callback)},
getDom:function(){return this.item}}),PhotoGallery=Class({create:function(b,c){!c||0>=c.length||(this.parent=b,this.photoArray=c,this.index=0,this.visible=!1,this.pageWidth=$(window).width(),this.pageHeight=$(window).height(),this.images=[],this.thumbnails=[],this.initHtml(),this.initEvent())},initHtml:function(){this.leftBtnUrl=uiBaseURL+"photo_prev.png";this.rightBtnUrl=uiBaseURL+"photo_next.png";this.closeBtnUrl=uiBaseURL+"photoGallery_close.png";this.stage=$("<div class='photogallery' style=\"display:none\"></div>");
this.close=$("<div class='close'><img src=\""+this.closeBtnUrl+'" /></div>');this.stage.append(this.close);this.initImgThumb();this.initImgContainer();this.initImages();this.setThumbnal();this.setPhotoImage();this.imgChange();this.parent.append(this.stage)},initImgContainer:function(){this.imgContainer=$("<div class='imgContainer'></div>");this.leftBtn=$("<div class='leftBtn'><img src=' "+this.leftBtnUrl+"' /></div>");this.rightBtn=$("<div class='rightBtn'><img src='"+this.rightBtnUrl+"'/></div>");
this.containerBG=$("<div class='photoBG'></div>");this.imgContainer.append(this.leftBtn);this.imgContainer.append(this.rightBtn);this.stage.append(this.imgContainer).append(this.containerBG)},initImgThumb:function(){this.thumbContainer=$("<div class='thumbContainer'></div>");this.stage.append(this.thumbContainer)},initEvent:function(){this.stage.bind("mousedown touchstart",function(b){b.stopPropagation()});this.imgContainer.bind("mouseenter",function(){this.leftBtn.animate({left:"0"},300);this.rightBtn.animate({right:"0"},
300)}.bind(this));this.imgContainer.bind("mouseleave",function(){this.leftBtn.animate({left:"-32px"},300);this.rightBtn.animate({right:"-32px"},300)}.bind(this));this.imgContainer.bind("click",function(b){this.index+=1;this.index>this.images.length-1&&(this.index=0);this.imgChange()}.bind(this));this.containerBG.onTap(function(){this.hide();this.visible=!1}.bind(this));this.leftBtn.bind("click",function(b){b.stopPropagation();this.index-=1;0>this.index&&(this.index=this.images.length-1);this.imgChange()}.bind(this));
this.rightBtn.bind("click",function(b){b.stopPropagation();this.index+=1;this.index>this.images.length-1&&(this.index=0);this.imgChange()}.bind(this));this.close.onTap(function(){this.hide();this.visible=!1}.bind(this));$(window).resize(function(){this.onResize()}.bind(this))},onResize:function(){this.pageWidth=$(window).width();this.pageHeight=$(window).height();this.setImageCss(this.images[this.index]);this.setThumbnal()},thumbEvent:function(b){b.onTap(function(){this.index=parseInt(b.attr("id").substring(5));
this.imgChange(b)}.bind(this,b))},imgChange:function(b){b||(b=this.thumbnails[this.index]);b.siblings().removeClass("focus");b.addClass("focus");this.imgContainer.children("img").remove();this.setImageCss(this.images[this.index])},initImages:function(){for(var b=0;b<this.photoArray.length;b++){var c=$("<img src='"+this.photoArray[b]+"'/>"),d=$('<div id="thumb'+b+'" class="thumbBox"><img src=\''+this.photoArray[b]+'\'/><div class="thumbBG"></div></div>');this.images.push(c);this.thumbnails.push(d)}},
setThumbnal:function(){this.thumbLeft=0;this.thumbLeft=65*this.thumbnails.length>this.pageWidth?this.thumbLeft:(this.pageWidth-65*this.thumbnails.length)/2;for(var b=0;b<this.thumbnails.length;b++){var c=this.thumbnails[b],d=c.find("img");this.thumbEvent(c);this.setThumbImg(d,c);c.css({left:this.thumbLeft+"px"});this.thumbContainer.append(c);this.thumbLeft+=65}},setThumbImg:function(b,c){b.load(function(b,c){var g=0,h=0,k=g=0,l=0;b[0].naturalWidth/b[0].naturalHeight>=50/46?(g=50/b[0].naturalWidth,
k=50,l=g*b[0].naturalHeight,h=(46-g*b[0].naturalHeight)/2,g=0):(g=46/b[0].naturalHeight,k=g*b[0].naturalWidth,l=46,h=0,g=(50-g*b[0].naturalWidth)/2);b.css({width:k+"px",height:l+"px",left:g+"px",top:h+"px"});c.append(b)}.bind(this,b,c))},setPhotoImage:function(){var b=this.images[this.index];b.load(function(b,d){return function(){b.setImageCss(d)}}(this,b))},setImageCss:function(b){this.imgTop=this.imgLeft=0;this.imgRadio=b[0].naturalWidth/b[0].naturalHeight;this.windowRadio=this.pageWidth/(this.pageHeight-
80);this.imgHeight=this.imgWidth=this.radio=0;this.resetImageCss(b);b.css({width:this.imgWidth+"px",height:this.imgHeight+"px",left:0,top:0});this.imgContainer.css({width:this.imgWidth+"px",height:this.imgHeight+"px",left:this.imgLeft,top:this.imgTop+"px"});this.leftBtn.css({top:(this.imgHeight-38)/2+"px"});this.rightBtn.css({top:(this.imgHeight-38)/2+"px"});this.imgContainer.append(b)},resetImageCss:function(b){this.imgRadio>this.windowRadio?(b[0].naturalWidth<this.pageWidth?(this.imgHeight=b[0].naturalHeight,
this.imgWidth=b[0].naturalWidth,this.imgLeft=(this.pageWidth-this.imgWidth-16)/2):(this.imgWidth=this.pageWidth-16,this.radio=this.pageWidth/b[0].naturalWidth,this.imgHeight=b[0].naturalHeight*this.radio,this.imgLeft=0),this.imgTop=(this.pageHeight-this.imgHeight-80)/2):b[0].naturalHeight<this.pageHeight-80?(this.imgWidth=b[0].naturalWidth,this.imgHeight=b[0].naturalHeight,this.imgLeft=(this.pageWidth-this.imgWidth-16)/2,this.imgTop=(this.pageHeight-this.imgHeight-80)/2):(this.imgHeight=this.pageHeight-
80,this.radio=this.imgHeight/b[0].naturalHeight,this.imgWidth=b[0].naturalWidth*this.radio,this.imgLeft=(this.pageWidth-this.imgWidth-16)/2,this.imgTop=0)},show:function(){this.visible=!0;this.stage.fadeIn(200)},hide:function(){this.visible=!1;this.stage.fadeOut(200);this.interval&&this.interval.stop()},showOrHide:function(){this.visible?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 f=$("<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)))});
f.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 f=
$("<div></div>").addClass("flipHTML5Point flipHTML5ZoomPoint"+d).appendTo(b);c.push(f)}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 f=c[b];this.fileCookies.push({key:f.key,page:f.page,fileLeft:f.fL,fileTop:f.fT,fileWidth:f.fW,fileHeight:f.fH,imgWidth:f.iW,imgHeight:f.iH,src:f.src});this.imageDatas[f.key]={width:f.iW,height:f.iH}}},addFile:function(b,c){var d=b.src,f=b.imgWidth,g=b.imgHeight,h=b.key,k=$("<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",h).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(k,c);f&&g&&d&&this.addImage(k,d,f,g,h)},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(f){f.stopPropagation();f.preventDefault();var g=(new Date).getTime(),h,k,l,m,n,p,q,t,r,s=b.offset().left,v=b.offset().top;$(".flipHTML5LocalFile-current").removeClass("flipHTML5LocalFile-current");h=$("<div style='position: absolute;cursor: move;'></div>").attr("data-key",g).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);
k=m=f.pageX||f.originalEvent.touches[0].pageX;l=n=f.pageY||f.originalEvent.touches[0].pageY;d.bindFileDivEvents(h,b);$(document).add(b).off("mousemove.addLocalFile touchmove.addLocalFile").on("mousemove.addLocalFile touchmove.addLocalFile",function(b){m=b.pageX?b.pageX:b.originalEvent.touches?b.originalEvent.touches[0].pageX:0;n=b.pageY?b.pageY:b.originalEvent.touches?b.originalEvent.touches[0].pageY:0;m&&(0>m-k?(p=Math.floor((m-s)/BookInfo.scale()),t=Math.floor((k-m)/BookInfo.scale())):(p=Math.floor((k-
s)/BookInfo.scale()),t=Math.floor((m-k)/BookInfo.scale())));n&&(0>b.pageY-l?(q=Math.floor((n-v)/BookInfo.scale()),r=Math.floor((l-n)/BookInfo.scale())):(q=Math.floor((l-v)/BookInfo.scale()),r=Math.floor((n-l)/BookInfo.scale())));h.css({left:p,top:q,width:t,height:r});d.resizeZoomFrame(h)});$(document).add(b).off("mouseup.addLocalFile touchend.addLocalFile").one("mouseup.addLocalFile touchend.addLocalFile",function(f){d.offCreateEvents();$(document).add(b).off("mousemove.addLocalFile touchmove.addLocalFile");
$(document).add(b).off("mouseup.addLocalFile touchend.addLocalFile");if(h){f=h.width();var k=h.height();32>f&&h.width(32);12>k&&h.height(12);h.find(".TextFile")[0].click();d.resizeZoomFrame(h);f=d.parseObject(h[0]);d.parseObject(d.zoomFrame[0]);d.fileCookies.push({key:g,page:c,fileLeft:f.left,fileTop:f.top,fileWidth:f.width,fileHeight:f.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,f,g){b.find(".LocalImage")&&b.find(".LocalImage").remove();var h=b.width()||40,k=b.height()||40;d=this.resizeImage("autoFit",d,f,h,k);$("<img class='LocalImage' style='position: absolute;z-index: 2;'/>").attr("data-key",g).css({width:d.width,height:d.height,left:d.left,top:d.top}).attr("src",c).appendTo(b)},resizeImage:function(b,c,d,f,g){c/=d;d=0===g?1:f/g;var h=g*c,k=f/c,l;switch(b){case "autoFit":l=h>f?{width:f,height:k,top:(g-k)/2,left:0}:k>g?{width:h,height:g,left:(f-
h)/2,top:0}:h/k==c?{width:h,height:k,left:0,top:0}:{width:1,height:1,left:0,top:0};break;case "scale":l={left:0,top:0,width:f,height:g};break;case "fullFill":c>d?l={left:(f-g*c)/2,top:0,width:g*c,height:g}:c<d?l={left:0,top:(g-f/c)/2,width:f,height:f/c}:c==d&&(l={left:0,top:0,width:f,height:g})}return l},bindFileDivEvents:function(b,c){var d=this,f=!1,g=b.attr("data-key");b.on("pointerdown.signatureImg",function(b){b.stopPropagation()});b.off("mousedown.addLocalFile touchstart.addLocalFile").on("mousedown.addLocalFile touchstart.addLocalFile",
function(h){h.preventDefault();h.stopPropagation();h=h.originalEvent.touches?h.originalEvent.touches[0]:h;var k,l,m,n,p,q;m=b[0].offsetLeft;n=b[0].offsetTop;k=h.pageX;l=h.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-k)||3<=Math.abs(c.pageY-l))f=!0;p=m-(k-c.pageX)/BookInfo.scale();q=n-(l-c.pageY)/BookInfo.scale();b.css({left:p,
top:q});d.moveFileDiv(p,q)});$(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(){f=!1},200);var h=d.parseObject(b[0]);d.parseObject(d.zoomFrame[0]);d.updateArrayOrderKey(d.fileCookies,g,{fileLeft:h.left,fileTop:h.top});d.addLocalStorage(d.fileName,d.parseJSON(d.fileCookies))})});
b.find(".TextFile").on({change:function(c){try{var f=c.target.files[0];if(f)if(f.type.match("image.*")){var l=new FileReader;l.onload=function(c){c=c.target.result;var f=new Image;f.src=c;var h=f.width,f=f.height;d.imageDatas[g]={width:h,height:f,src:c};d.addImage(b,c,h,f,g);d.updateArrayOrderKey(d.fileCookies,g,{imgWidth:h,imgHeight:f,src:c});d.addLocalStorage(d.fileName,d.parseJSON(d.fileCookies))};l.readAsDataURL(f)}else alert("not image!")}catch(m){alert("Does not support HTML5 FileReader!")}},
click:function(b){f&&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,f){var g=this.currentObject,h=this.zoomFrame,k=g.attr("data-key");this.toolBar&&this.toolBar&&this.toolBar.css({left:h.offset().left-this.container.offset().left+3,top:h.offset().top-this.container.offset().top-
this.toolBar.outerHeight()-2});if(g){b&&(h.css({left:b}),g.css({left:b+4+1}));c&&(h.css({top:c}),g.css({top:c+4+1}));d&&40<=d&&(h.css({width:d}),g.css({width:d-8}));f&&20<=f&&(h.css({height:f}),g.css({height:f-8}));try{var l=g.find(".LocalImage"),m=this.imageDatas[k],n=this.resizeImage("autoFit",m.width,m.height,g.width(),g.height());l.css({width:n.width,height:n.height,left:n.left,top:n.top})}catch(p){}n=this.parseObject(g[0]);this.parseObject(h[0]);this.updateArrayOrderKey(this.fileCookies,k,{fileLeft:n.left,
fileTop:n.top,fileWidth:n.width,fileHeight:n.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 g=d.parent(),h=d.width(),k=b.pageX;$(document).add(g).on("mousemove.addLocalFile touchmove.addLocalFile",function(b){b=b.originalEvent.touches?b.originalEvent.touches[0]:b;var d=b.clientX-k+h,d=Math.floor(h-(k-b.pageX)/BookInfo.scale());
c.resizeFileDiv(0,0,d,0)});$(document).add(g).on("mouseup.addLocalFile touchend.addLocalFile",function(){c.addLocalStorage(c.fileName,c.parseJSON(c.fileCookies));$(document).add(g).off("mousemove.addLocalFile touchmove.addLocalFile");$(document).add(g).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 g=d.parent(),h=d.height(),k=b.pageY;$(document).add(g).on("mousemove.addLocalFile touchmove.addLocalFile",function(b){b=b.originalEvent.touches?b.originalEvent.touches[0]:b;var d=b.clientY-k+h,d=Math.floor(h-(k-b.pageY)/BookInfo.scale());c.resizeFileDiv(0,0,0,d)});$(document).add(g).on("mouseup.addLocalFile touchend.addLocalFile",function(){c.addLocalStorage(c.fileName,c.parseJSON(c.fileCookies));$(document).add(g).off("mousemove.addLocalFile touchmove.addLocalFile");$(document).add(g).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 g=d.parent(),h=d.width(),k=d[0].offsetLeft,l=b.clientX;$(document).add(g).on("mousemove.addLocalFile touchmove.addLocalFile",function(b){b=b.originalEvent.touches?b.originalEvent.touches[0]:b;var d=b.pageX,f=k+d-l,g=-(d-l)+h,f=k+(d-l)/BookInfo.scale(),g=Math.floor(h+(l-b.pageX)/
BookInfo.scale());c.resizeFileDiv(f,0,g,0)});$(document).add(g).on("mouseup.addLocalFile touchend.addLocalFile",function(){c.addLocalStorage(c.fileName,c.parseJSON(c.fileCookies));$(document).add(g).off("mousemove.addLocalFile touchmove.addLocalFile");$(document).add(g).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 g=d.parent(),h=d.height(),k=d[0].offsetTop,l=b.pageY;$(document).add(g).on("mousemove.addLocalFile touchmove.addLocalFile",function(b){b=b.originalEvent.touches?b.originalEvent.touches[0]:b;b=b.pageY;var d=k+b-l,f=-(b-l)+h,d=k+(b-l)/BookInfo.scale(),f=Math.floor(h+(l-b)/BookInfo.scale());c.resizeFileDiv(0,d,0,f)});$(document).add(g).on("mouseup.addLocalFile touchend.addLocalFile",function(){c.addLocalStorage(c.fileName,c.parseJSON(c.fileCookies));$(document).add(g).off("mousemove.addLocalFile touchmove.addLocalFile");
$(document).add(g).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,f;f=b.parentNode;var g=b.style,h=$(b);d=100/f.offsetHeight;c=100/f.offsetWidth;f=b.offsetLeft*c+"%";b=b.offsetTop*d+"%";c=h.width()*c+"%";d=h.height()*d+"%";g.width=c;g.height=d;g.left=f;g.top=b;return{width:c,height:d,left:f,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 f=c[d].split("=");if(f[0]==b)return unescape(f[1])}return""}catch(g){}},addLocalStorage:function(b,c){try{if(window.localStorage)window.localStorage.setItem(b,c);else{var d=b+"="+escape(c),f=new Date;f.setTime(f.getTime()+864E8);d+="; expires="+f.toGMTString();document.cookie=d}}catch(g){}},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 f=0;f<b.length;f++)b[f].key&&b[f].key==c&&$.extend(b[f],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+"]"}}});
Class("VolumeControlBar",{statics:{LEFT:1,TOP:2,RIGHT:3,BOTTOM:4,DEFAULT:5},create:function(b){global.bgSound&&bgSound.sound&&!isPhone()&&!isPad()&&b&&(this.parent=b,this.initParam(),this.volumeBackground=$("<div class='volume-bar' style='visibility:hidden;z-index:1000'></div>"),this.volumeReduce=$("<img class='volume-reduce'  />"),this.volumeBar=$('<div class="volume-pgress"></div>'),this.volumeBg=$('<div class="volume-pgress-bg"></div>'),this.volumePoint=$("<span></span>"),this.volumeAdd=$("<img class='volume-add' />"),
this.parent.append(this.volumeBackground),this.volumeBackground.append(this.volumeReduce),this.volumeBar.append(this.volumePoint),this.volumeBg.append(this.volumeBar),this.volumeBackground.append(this.volumeBg),this.volumeBackground.append(this.volumeAdd),this.initEvent(),this.onResize(),this.initCss(),this.hide())},initParam:function(){this.length=58;this.rate=1;this.iconOn=this.visible=!0;this.initConfig()},initConfig:function(){VolumeControlBar.config||(VolumeControlBar.config={direction:VolumeControlBar.DEFAULT,
color:Color(bookConfig.toolbarColor).toString(),iconColor:Color(bookConfig.iconColor).toString()});this.deviation=VolumeControlBar.config.deviation||0;this.direction=VolumeControlBar.config.direction||VolumeControlBar.DEFAULT;this.color=VolumeControlBar.config.color||Color(bookConfig.toolbarColor).toString();this.iconColor=VolumeControlBar.config.iconColor||Color(bookConfig.iconColor).toString()},initCss:function(){this.setSrc(this.volumeAdd,"soundAdd");this.setSrc(this.volumeReduce,"soundReduce");
this.volumePoint.css({background:this.iconColor});this.volumeBar.css({cursor:"pointer"});this.volumeBg.css({cursor:"pointer"})},setSrc:function(b,c){toolbar_icons&&toolbar_icons[c]?b.attr("src","data:image/png;base64,"+toolbar_icons[c]):b.attr("src",uiBaseURL+c+".png");this.changeIconColor()},changeIconColor:function(){this.volumeAdd.changeButtonColor(this.iconColor);this.volumeReduce.changeButtonColor(this.iconColor)},volumeBarCSS:function(b){this.left=b.left;this.top=b.top;switch(this.direction){case VolumeControlBar.LEFT:this.position=
this.length-this.rate*this.length;this.top+=(b.height-30)/2+this.deviation;this.volumeBackground.css({top:this.top+"px",left:this.left-131+"px",width:"131px",height:"30px",background:this.color});this.volumeBg.css({position:"absolute",width:"70px",height:"10px",left:"30px",right:"auto",top:"10px",bottom:"auto"});this.volumeBar.css({width:"70px",height:"auto",border:"none","border-top":"2px solid "+this.iconColor,top:"4px"});this.volumePoint.css({top:"-7px",left:this.position+"px"});this.volumeReduce.css({right:"0",
top:"3px",left:"auto",bottom:"auto"});this.volumeAdd.css({left:"0",top:"3px",right:"auto",bottom:"auto"});break;case VolumeControlBar.TOP:this.position=this.length-this.rate*this.length;this.left+=(b.width-30)/2+this.deviation;this.volumeBackground.css({left:this.left+"px",top:this.top-131+"px",width:"30px",height:"131px",background:this.color});this.volumeBg.css({position:"absolute",height:"70px",width:"10px",bottom:"30px",top:"auto",left:"10px",right:"auto"});this.volumeBar.css({height:"70px",width:"auto",
top:"auto",border:"none","border-left":"2px solid "+this.iconColor,left:"4px"});this.volumePoint.css({left:"-7px",top:this.position+"px"}).css("");this.volumeReduce.css({left:"3px",bottom:"3px",right:"auto",top:"auto"});this.volumeAdd.css({right:"3px",top:"3px",left:"auto",bottom:"auto"});break;case VolumeControlBar.RIGHT:this.position=this.rate*this.length;this.top+=(b.height-30)/2+this.deviation;this.volumeBackground.css({top:this.top+"px",left:this.left+b.width+"px",width:"131px",height:"30px",
background:this.color});this.volumeBg.css({position:"absolute",width:"70px",height:"10px",left:"30px",right:"auto",top:"10px",bottom:"auto"});this.volumeBar.css({width:"70px",height:"auto",border:"none","border-top":"2px solid "+this.iconColor,top:"4px"});this.volumePoint.css({left:this.position+"px",top:"-7px"});this.volumeReduce.css({left:"0",top:"3px",right:"auto",bottom:"auto"});this.volumeAdd.css({right:"0",top:"3px",left:"auto",bottom:"auto"});break;case VolumeControlBar.BOTTOM:this.position=
this.rate*this.length;this.left+=(b.width-30)/2+this.deviation;this.volumeBackground.css({left:this.left+"px",top:this.top+b.height+"px",width:"30px",height:"131px",background:this.color});this.volumeBg.css({position:"absolute",height:"70px",width:"10px",bottom:"30px",top:"auto",left:"10px",right:"auto"});this.volumeBar.css({height:"70px",width:"auto",border:"none","border-left":"2px solid "+this.iconColor,left:"4px"});this.volumePoint.css({left:"-7px",top:this.position+"px"});this.volumeReduce.css({left:"3px",
top:"3px",right:"auto",bottom:"auto"});this.volumeAdd.css({right:"3px",bottom:"3px",left:"auto",top:"auto"});break;case VolumeControlBar.DEFAULT:this.volumeBackground.css({visibility:"hidden",opacity:"0"})}},setPosition:function(){this.change=this.startPosition=this.position=0;switch(this.direction){case VolumeControlBar.LEFT:this.leftPosition();break;case VolumeControlBar.TOP:this.topPosition();break;case VolumeControlBar.RIGHT:this.rightPosition();break;case VolumeControlBar.BOTTOM:this.bottomPosition()}},
onResize:function(){$(window).resize(function(){this.hide();this.direction=VolumeControlBar.config.direction||VolumeControlBar.DEFAULT;this.setPosition()}.bind(this))},initEvent:function(){this.parent.bind("click",function(b){b.stopPropagation();this.hide()}.bind(this));this.volumeBackground.bind("click",function(b){b.stopPropagation()}.bind(this));this.volumeBackground.bind("mouseenter",function(b){this.visible=!0;this.volumeBackground.css({visibility:"visbile",opacity:"1"})}.bind(this));this.volumeBackground.bind("mouseleave",
function(b){this.visible=!1;this.hide()}.bind(this));this.volumePoint.bind("click",function(b){b.stopPropagation()}.bind(this));this.volumeBg.bind("click",function(b){b.stopPropagation();this.direction==VolumeControlBar.RIGHT||this.direction==VolumeControlBar.LEFT?this.getRate(b.offsetX):this.getRate(b.offsetY);this.position=this.length-this.rate*this.length;this.volumePointCSS();this.setIcon();this.setVolume(this.rate)}.bind(this))},getRate:function(b){this.rate=0>=this.length+12-b?0:58<=this.length+
12-b?1:(this.length+12-b)/this.length},setEvent:function(){1==this.direction||3==this.direction?(this.volumePoint.bind("mousedown",function(b){b.stopPropagation();this.position=this.volumePoint.left();this.startPosition=b.pageX;this.focus=!0}.bind(this)),$("body").bind("mouseup",function(b){b.stopPropagation();this.focus=!1}.bind(this))):(this.volumePoint.bind("mousedown",function(b){b.stopPropagation();this.position=this.volumePoint.top();this.startPosition=b.pageY;this.focus=!0}.bind(this)),$("body").bind("mouseup",
function(b){b.stopPropagation();this.focus=!1}.bind(this)))},rightPosition:function(){this.setEvent();$("body").bind("mousemove",function(b){this.focus&&(this.startPosition&&(this.change=this.startPosition-b.pageX),this.position-=this.change,0<=this.position&&this.position<=this.length&&(this.rate=this.position/this.length,this.setIcon(),this.volumePointCSS()));this.startPosition=b.pageX}.bind(this));this.volumeAdd.unbind("click").bind("click",function(){this.position=this.volumePoint.left()+5.8>
this.length?this.length:this.volumePoint.left()+5.8;this.setIcon();this.volumePointCSS()}.bind(this));this.volumeReduce.unbind("click").bind("click",function(){this.position=0>this.volumePoint.left()-5.8?0:this.volumePoint.left()-5.8;this.setIcon();this.volumePointCSS()}.bind(this))},leftPosition:function(){this.setEvent();$("body").bind("mousemove",function(b){this.focus&&(this.startPosition&&(this.change=this.startPosition-b.pageX),this.position-=this.change,0<=this.position&&this.position<=this.length&&
(this.rate=(this.length-this.position)/this.length,this.setIcon(),this.volumePointCSS()));this.startPosition=b.pageX}.bind(this));this.volumeAdd.unbind("click").bind("click",function(){this.position=0>this.volumePoint.left()-5.8?0:this.volumePoint.left()-5.8;this.setIcon();this.volumePointCSS()}.bind(this));this.volumeReduce.unbind("click").bind("click",function(){this.position=this.volumePoint.left()+5.8>this.length?this.length:this.volumePoint.left()+5.8;this.setIcon();this.volumePointCSS()}.bind(this))},
topPosition:function(){this.setEvent();$("body").bind("mousemove",function(b){this.focus&&(this.startPosition&&(this.change=this.startPosition-b.pageY),this.position-=this.change,0<=this.position&&this.position<=this.length&&(this.rate=(this.length-this.position)/this.length,this.setIcon(),this.volumePointCSS()));this.startPosition=b.pageY}.bind(this));this.volumeAdd.unbind("click").bind("click",function(b){this.position=0>this.volumePoint.top()-5.8?0:this.volumePoint.top()-5.8;this.setIcon();this.volumePointCSS()}.bind(this));
this.volumeReduce.unbind("click").unbind("click").bind("click",function(b){this.position=this.volumePoint.top()+5.8>this.length?this.length:this.volumePoint.top()+5.8;this.setIcon();this.volumePointCSS()}.bind(this))},bottomPosition:function(){this.setEvent();$("body").bind("mousemove",function(b){this.focus&&(this.startPosition&&(this.change=this.startPosition-b.pageY),this.position-=this.change,0<=this.position&&this.position<=this.length&&(this.rate=this.position/this.length,this.setIcon(),this.volumePointCSS()));
this.startPosition=b.pageY}.bind(this));this.volumeAdd.unbind("click").bind("click",function(){this.position=this.volumePoint.top()+5.8>this.length?this.length:this.volumePoint.top()+5.8;this.setIcon();this.volumePointCSS()}.bind(this));this.volumeReduce.unbind("click").bind("click",function(){this.position=0>this.volumePoint.top()-5.8?0:this.volumePoint.top()-5.8;this.setIcon();this.volumePointCSS()}.bind(this))},setIcon:function(){this.direction==VolumeControlBar.LEFT||this.direction==VolumeControlBar.TOP?
this.position>=this.length?this.setIconOff():this.setIconOn():0>=this.position?this.setIconOff():this.setIconOn()},setIconOff:function(){this.iconOn=!1;StateSynchronous.instance().findButtons("BackgroundSoundButton").each(function(b){b.setAsSoundOff();b.executeCallback()})},setIconOn:function(){this.iconOn=!0;StateSynchronous.instance().findButtons("BackgroundSoundButton").each(function(b){b.setAsSoundOn();b.executeCallback()})},volumePointCSS:function(b){switch(this.direction){case VolumeControlBar.LEFT:this.volumePoint.css({left:this.position+
"px"});this.setVolume((this.length-this.position)/this.length);break;case VolumeControlBar.TOP:this.volumePoint.css({top:this.position+"px"});this.setVolume((this.length-this.position)/this.length);break;case VolumeControlBar.RIGHT:this.volumePoint.css({left:this.position+"px"});this.setVolume(this.position/this.length);break;case VolumeControlBar.BOTTOM:this.volumePoint.css({top:this.position+"px"}),this.setVolume(this.position/this.length)}},soundOn:function(b){this.setIconOn();this.setVolume(this.rate)},
soundOff:function(b){this.setIconOff();global.bgSound.sound[0].volume=0},setVolume:function(b){global.bgSound&&bgSound.sound&&!isPhone()&&!isPad()&&(this.rate=b,bgSound.sound[0].volume=b)},show:function(b){isPhone()||isPad()||(this.initConfig(),this.volumeBackground.css({visibility:"visible",opacity:"1"}),this.volumeBarCSS(b),this.setPosition(),this.visible=!1)},hide:function(){isPhone()||isPad()||(this.volumeBackground.css({visibility:"hidden",opacity:"0"}),this.visible=!0)}});
var BookInstructionsPage=Class({create:function(b,c){this.parent=b;this.initHtml(b,c);this.initEvent()},initHtml:function(b,c){this.container=$("<div class='bookInstructions helpPage'></div>");this.title=$("<h3 class='bookInstructions helpTitle'>"+this.getTitle()+"</h3>");this.image=$("<div class='bookInstructions helpPageImg'"+this.getImageURL(c)+"></div>");this.description=$("<div class='bookInstructions helpBottomText'>"+this.getDescription(c)+"</div>");b.append(this.container);this.container.append(this.title);
this.container.append(this.image);this.container.append(this.description);this.container.attr("bookInstructionPageNum",c)},getImageURL:function(b){return"style='background: url("+uiBaseURL+b+"-2x.png) no-repeat center  center ;background-size:contain;'"},getTitle:function(){return getLanguage("frmHowToUse","How to use")},getDescription:function(b){switch(b){case 1:return getLanguage("lblHelpPage1","Use scroll bar and move your fingers to turn pages");case 2:return getLanguage("lblHelpPage2","Use zoom gesture or double-click on a page to zoom in");
case 3:return getLanguage("lblHelpPage3","Open the table of contents and bookmarks saved");case 4:return getLanguage("lblHelpPage4","Share with your friends, use search function, and create bookmarks");case 5:return getLanguage("lblHelpPage5","Open the overview pages using buttons or moving the slide")}},initEvent:function(){(new Hammer(this.container[0])).on("swipe",function(b){10<=b.deltaX?bookInstructions.toNextPage():-10>=b.deltaX?bookInstructions.toPreviousPage():""}.bind(this))}}),BookInstructionsDot=
Class({create:function(b,c){this.parent=b;this.id=c;this.initHtml();this.initEvent()},initHtml:function(){this.dot=$("<li ></li>");this.dot.attr("bookInstructionDotNum",this.id);1==this.id?this.dot.attr("class","bookInstructions icon_active"):"";this.parent.append(this.dot)},initEvent:function(){(new Hammer(this.dot[0])).on("tap",function(){this.pageIndex=parseInt(this.dot.attr("bookInstructionDotNum"));bookInstructions.setCurrentPage(this.pageIndex)}.bind(this))}}),BookInstructions=Class({create:function(b){this.pageWidth=
document.body.clientWidth;this.pageIndex=1;this.totalPageCount=5;this.closeSrc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0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SEZK6gdClhW46UEoCoFVGW3E+uIJ5ohxrPFC2Jg/b66gre6iLMW9o0RBjhyIs9mxtQA6KAi2WonqBUSult3uWoT1pYKb/f5viDAEGAD4SFiVn1efjAAAAAElFTkSuQmCC";
this.visible=!1;this.parent=b;this.pages=[];this.initHtml(b);this.initCss();this.initEvent()},initHtml:function(b){this.container=$("<div class='bookInstructions helpBody hide'></div>");this.swiper=$("<div class='bookInstructions swiper'></div>");this.dots=$('<ul class="bookInstructions helpBullet"></ul>');for(var c=1;5>=c;c++)this.pages.push(new BookInstructionsPage(this.swiper,c)),new BookInstructionsDot(this.dots,c);this.closeBtn=$('<span class="bookInstructions icon_drop" ><img src='+this.closeSrc+
"></span>");b.append(this.container);this.container.append(this.swiper);this.container.append(this.dots);this.container.append(this.closeBtn)},initCss:function(){var b=transformCSS({tran:{x:this.pageWidth,y:0}});this.container.css({"background-image":"url("+uiBaseURL+'bg.png")no-repeat',"background-position":"bottom"});this.container.css(b);b=transformCSS({tran:{x:0,y:0}});this.swiper.css(b)},toNextPage:function(){this.setCurrentPage(1<this.pageIndex-1?this.pageIndex-1:1)},toPreviousPage:function(){this.setCurrentPage(this.pageIndex+
1>=this.totalPageCount?this.totalPageCount:this.pageIndex+1)},setCurrentPage:function(b){this.pageIndex=b?b:this.pageIndex;b=transformCSS({tran:{x:-(this.pageIndex-1)*this.pageWidth,y:0}});animateOnce(this.swiper,b,300,null);this.dots.find("li").removeClass("icon_active");this.dots.find("li[bookInstructionDotNum="+this.pageIndex+"]").addClass("icon_active")},showOrhide:function(){this.visible?this.hide():this.show()},show:function(){this.visible=!0;this.container.removeClass("hide");var b=transformCSS({tran:{x:0,
y:0}});animateOnce(this.container,b,300,function(){}.bind(this))},hide:function(){this.visible=!1;var b=transformCSS({tran:{x:this.pageWidth,y:0}});animateOnce(this.container,b,300,function(){this.container.addClass("hide")}.bind(this))},showOrHide:function(){this.visible?this.hide():this.show()},initEvent:function(){this.container.bind("touchstart",function(b){b.preventDefault()});this.closeBtn.bind(_event._end,function(){this.hide()}.bind(this));$(window).resize(function(b){this.pageWidth=document.body.clientWidth;
this.setCurrentPage()}.bind(this))},changeLanguage:function(){for(var b=0;b<this.pages.length;b++){var c=this.pages[b];c.title.html(c.getTitle());c.description.html(c.getDescription(b+1))}}});
Class("FlipByAudio",{EMPTY_CONFIG:{audioType:0,audioFile:"",showPlayer:!1,items:[]},SINGLE_AUDIO:0,MULTIPLE_AUDIOS:1,create:function(b,c){this.parent=b;this.config=c||this.EMPTY_CONFIG;0!=this.itemLength()&&this.init()},itemLength:function(){return this.config.items.length},init:function(){this.$audio=$("<audio controls></audio>");this.$audio.isPlaying=!1;this.audioIndex=0;this.config.audioType==this.SINGLE_AUDIO?(this.setSingleAudio(),this.initSingleAudioEvent()):(this.setMultipleAudio(this.audioIndex),
this.initMultipleAudioEvent())},play:function(){if(this.$audio)try{this.$audio[0].play()}catch(b){}},playByTouch:function(){if(this.$audio&&!this.$audio.isPlaying)try{this.$audio[0].play(),this.$audio.isPlaying=!0}catch(b){}},playAfterFlip:function(){this.play.delay(this,1E3*bookConfig.flippingTime)},start:function(){this.config.audioType==this.MULTIPLE_AUDIOS&&this.flipByIndex(0);this.playAfterFlip()},setSingleAudio:function(){this.$audio.attr("src",this.config.audioFile)},setMultipleAudio:function(b){(b=
this.config.items[b])&&this.$audio.attr("src",b.audioData)},initSingleAudioEvent:function(){this.$audio.bind("timeupdate",function(){var b=parseInt(this.getCurrentAudioData());this.$audio[0].currentTime>=b&&(this.flipByIndex(this.audioIndex),this.audioIndex++)}.bind(this))},getCurrentAudioData:function(){return this.config.items[this.audioIndex].audioData},initMultipleAudioEvent:function(){this.$audio.bind("ended",function(){this.audioIndex++;this.setMultipleAudio(this.audioIndex);this.flipByIndex(this.audioIndex);
this.playAfterFlip()}.bind(this))},flipByIndex:function(b){b=parseInt(this.config.items[b].pageIndex);gotoPageFun(b)}});var PcAboutForm=Class({create:function(b){this.elements=new AboutElements(this);this._super(b)},onCreate:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor});this._super()},initHtml:function(){this.dragUrl=form_icons.drag?"data:image/png;base64,"+form_icons.drag:uiBaseURL+"drag.png";this.stage.addClass("win10_border");this.stage.append(this.title);this.stage.append(this.close);this.stage.append($("<img class='drag' src='"+this.dragUrl+"'/>"));this.stage.append(this.descriptionTitle);
this.stage.append(this.contactTitle);this.content1=$("<div class='content content1'></div>");this.stage.append(this.content1);this.content1.append(this.author);this.content1.append(this.address);this.content1.append(this.email);this.content1.append(this.website);this.content1.append(this.mobile);this.content2=$("<div class='content content2'></div>");this.stage.append(this.content2);bookConfig.CompanyLogoFile&&this.content2.append(this.logo);this.content2.append(this.description);this._super()},showContact:function(){this.descriptionTitle.removeClass("focus");
this.contactTitle.addClass("focus");this.descriptionTitle.css("border","1px solid transparent");this.contactTitle.css("border","1px solid "+this.fontColor);this.content1.show();this.content2.hide()},showDescription:function(){this.contactTitle.removeClass("focus");this.descriptionTitle.addClass("focus");this.contactTitle.css("border","1px solid transparent");this.descriptionTitle.css("border","1px solid "+this.fontColor);this.content2.show();this.content1.hide()},onShow:function(){this.close.changeButtonColor(this.fontColor);
this.showDescription()}}).extend(FadeOutFadeForm);var PcBookmarkItem=Class({create:function(b,c){this.mainColor=bookConfig.formBackgroundColor?bookConfig.formBackgroundColor:bookConfig.toolbarColor;this.fontColor=bookConfig.formFontColor?bookConfig.formFontColor:bookConfig.iconColor;b.fontColor=this.fontColor;this._super(b,c)}}).extend(BookmarkItem);var PcBookmarkListPanel=Class({create:function(b){this.mainColor=bookConfig.formBackgroundColor?bookConfig.formBackgroundColor:bookConfig.toolbarColor;this.fontColor=bookConfig.formFontColor?bookConfig.formFontColor:bookConfig.iconColor;this.mainColorObj=Color(this.mainColor);this.fontColorObj=Color(this.fontColor);this._super(b)},onCreate:function(){},newItem:function(b){return new PcBookmarkItem(b,this.callback)}}).extend(BookmarkListPanel);var PcBookmarkForm=Class({create:function(b){this._super(b)},onCreate:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor});this.bookmarkListPanel.onCreate()},initHtml:function(){this.dragUrl=form_icons.drag?"data:image/png;base64,"+form_icons.drag:uiBaseURL+"drag.png";this.stage.addClass("win10_border");this.stage.append(this.title);this.stage.append(this.close);this.stage.append($("<img class='drag' src='"+this.dragUrl+"'/>"));var b=$("<p class='inputForm'></p>");b.append(this.input);
b.append(this.colorSelection);this.stage.append(b);this.stage.append(this.leftAddPage);this.stage.append(this.rightAddPage);this.stage.append(this.bookmarkListTitle);this.stage.append(this.bookmarkListPanel.bookmarkSwiper);this.stage.append(this.remove);this.parent.append(this.stage);this.refreshPanel()},onResize:function(){var b=Math.max(windowHeight-bookConfig.topMargin-bookConfig.bottomMargin-toolBar.getHeight(),1);Math.max(windowWidth-bookConfig.leftMargin-bookConfig.rightMargin-toolBar.getWidth(),
1);var c=toolBar.getTopHeight()+10;this.width=300;this.height=b-40;this.maxHeight=this.height-188;this.stage.find(".bookmark_content").css({height:b-87+"px"});this.stage.css({height:this.height+"px",top:c+"px"});this.bookmarkListPanel.onResize(this.width,this.maxHeight);this.refreshPanel()}}).extend(PcBookmarkFrame);var PcHelpForm=Class({create:function(b){this.elements=new HelpElements(this);this._super(b)},onCreate:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor});this._super();bookConfig.showHelpContentAtFirst?this.show():this.hide()},initHtml:function(){this.dragUrl=form_icons.drag?"data:image/png;base64,"+form_icons.drag:uiBaseURL+"drag.png";this.stage.addClass("win10_border");this.stage.append(this.title);this.stage.append(this.close);this.stage.append($("<img class='drag' src='"+
this.dragUrl+"'/>"));this.stage.append(this.image);this.title1&&this.stage.append(this.title1);this.title2&&this.stage.append(this.title2);this._super()},onShow:function(){this.close.changeButtonColor(this.fontColor);!bookConfig.helpContentFileURL&&this.image&&this.image.changeButtonColor(this.fontColor)}}).extend(FadeOutFadeForm);var PcPrintForm=Class({create:function(b){this.elements=new PrintElements(this);this._super(b)},onCreate:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor});this._super()},initHtml:function(){this.dragUrl=form_icons.drag?"data:image/png;base64,"+form_icons.drag:uiBaseURL+"drag.png";this.stage.addClass("win10_border");this.stage.append(this.title);this.stage.append(this.close);this.stage.append($("<img class='drag' src='"+this.dragUrl+"'/>"));this.stage.append(this.printAll);
this.stage.append(this.printCurrent);this.stage.append(this.printRange);this.stage.append(this.printButton);this._super()},changeItemColor:function(){this.printCurrent.changeButtonColor(this.fontColor);this.printRange.changeButtonColor(this.fontColor);this.printAll.changeButtonColor(this.fontColor)},initEvent:function(){this._super()},onShow:function(){this.close.changeButtonColor(this.fontColor);this.pictureListForm.leftBtn.changeButtonColor(this.fontColor);this.pictureListForm.rightBtn.changeButtonColor(this.fontColor);
this.changeItemColor()}}).extend(FadeOutFadeForm);var PcSearchItem=Class({create:function(b,c){c.fontColor=this.fontColor;this._super(b,c)}}).extend(SearchItem);var PcSearchForm=Class({create:function(b){this.elements=new SearchElements(this);this._super(b)},onCreate:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor})},initHtml:function(){this.dragUrl=form_icons.drag?"data:image/png;base64,"+form_icons.drag:uiBaseURL+"drag.png";this.stage.addClass("win10_border");this.stage.append(this.title);this.stage.append(this.close);this.stage.append($("<img class='drag' src='"+this.dragUrl+"'/>"));this.stage.append(this.input);this.stage.append(this.searchButton);
this.stage.append(this.searchResult);this.stage.append(this.searchSwiper);this.parent.append(this.stage)},newSearchItem:function(b,c){return new PcSearchItem(b,c)},onResize:function(){var b=Math.max(windowHeight-bookConfig.topMargin-bookConfig.bottomMargin-toolBar.getHeight(),1);Math.max(windowWidth-bookConfig.leftMargin-bookConfig.rightMargin-toolBar.getWidth(),1);var c=toolBar.getTopHeight()+10;this.width=250;this.height=b-40;this.stage.css({height:this.height+"px",top:c+"px"});this.searchSwiper.css("height",
this.height-88+"px");this.elements.refresh()},getList:function(){return this.elements.getList()},onShow:function(){this.close.changeButtonColor(this.fontColor);this.input.focus();BookInfo.getBook().addSearchHighlight()},onHide:function(){BookInfo.getBook().clearSearchHighlight()}}).extend(SlideForm);var PcShareForm=Class({create:function(b){this.elements=new ShareElements(this);this._super(b)},onCreate:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor});this._super()},initHtml:function(){this.dragUrl=form_icons.drag?"data:image/png;base64,"+form_icons.drag:uiBaseURL+"drag.png";this.stage.addClass("win10_border");this.stage.append(this.title);this.stage.append(this.close);this.stage.append($("<img class='drag' src='"+this.dragUrl+"'/>"));this.stage.append(this.linkTitle);
this.stage.append(this.linkArea);this.stage.append(this.copy1);this.stage.append(this.insertToSite);this.stage.append(this.insertArea);this.stage.append(this.copy2);this.stage.append(this.sharePanel);this._super()},onShow:function(){this.close.changeButtonColor(this.fontColor)}}).extend(FadeOutFadeForm);var PcTableOfContentItem=Class({create:function(b,c,d){c.fontColor=bookConfig.formFontColor?bookConfig.formFontColor:bookConfig.iconColor;this._super(b,c,d)}}).extend(TableOfContentItem);var PcTableOfContentForm=Class({create:function(b){this.elements=new TableOfContentElements(this);this._super(b)},onCreate:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor});this.close.changeButtonColor(this.fontColor)},initHtml:function(){this.dragUrl=form_icons.drag?"data:image/png;base64,"+form_icons.drag:uiBaseURL+"drag.png";this.stage.addClass("win10_border");this.stage.append(this.title);this.stage.append(this.close);this.stage.append($("<img class='drag' src='"+
this.dragUrl+"'/>"));this.stage.append(this.tableofcontentSwiper);this.parent.append(this.stage)},newItem:function(b,c,d){return new PcTableOfContentItem(b,c,d)},onResize:function(){var b=Math.max(windowHeight-bookConfig.topMargin-bookConfig.bottomMargin-toolBar.getHeight(),1);Math.max(windowWidth-bookConfig.leftMargin-bookConfig.rightMargin-toolBar.getWidth(),1);var c=toolBar.getTopHeight()+10;this.width=250;this.height=b-40;this.maxHeight=this.height-68;this.stage.css({height:this.height+"px",top:c+
"px"});this.tableofcontentSwiper.css("height",this.maxHeight+"px");this.elements.refresh()},onShow:function(){}}).extend(SlideForm);var PcVideoGalleryForm=Class({create:function(b){this.elements=new VideoGalleryElements(this);this._super(b)},onCreate:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor});this._super()},initHtml:function(){this.dragUrl=form_icons.drag?"data:image/png;base64,"+form_icons.drag:uiBaseURL+"drag.png";this.stage.addClass("win10_border");this.stage.append(this.title);this.stage.append(this.close);this.stage.append($("<img class='drag' src='"+this.dragUrl+"'/>"));this.stage.append(this.video);
this.stage.append(this.info);if(this.videoList&&1<this.videoList.length){var b=$("<div class='video_list'></div>");b.append(this.videoListTitle);b.append(this.videoSwiper);this.stage.append(b)}else this.stage.css("width","335px");this._super()},onShow:function(){this.close.changeButtonColor(this.fontColor);this.elements.playVideo(this.videoList[0])}}).extend(FadeOutFadeForm);Class("TextFormatAnalyzer",{create:function(b){this.$textForAnalysis=$("<div></div>");this.analysisResult=[];if(b&&HTMLString.isHTML(b)){var c=$(b);b.toLowerCase().startsWith("<textformat")?this.$textForAnalysis.append(c):(b=$("<textformat></textformat>"),this.$textForAnalysis.append(b),b.append(c));this.analysis()}else this.initFromText(b)},initFromText:function(b){b||(b=" ");var c={leading:0,leftMargin:0,rightMargin:0,paragraphs:[]};b={align:"LEFT",font:{},text:b};b.font.family="Arial";b.font.size=
12;b.font.color="#000000";b.font.letterSpacing=0;b.font.kerning=0;b.font.bold=!1;b.font.italic=!1;b.font.underline=!1;c.paragraphs.push(b);this.analysisResult.push(c)},analysis:function(){for(var b=this.$textForAnalysis.children(),c=0;c<b.length;c++){var d={leading:0,leftMargin:0,rightMargin:0,paragraphs:[]},f=$(b[c]);d.leading=f.attr("LEADING")?parseInt(f.attr("LEADING")):0;$.system.name!=$.system.IOS&&(d.leading+=5);d.leftMargin=f.attr("LEFTMARGIN")?parseInt(f.attr("LEFTMARGIN")):0;d.rightMargin=
f.attr("RIGHTMARGIN")?parseInt(f.attr("RIGHTMARGIN")):0;for(var f=f.children(),g=0;g<f.length;g++){var h=$(f[g]),k={align:"LEFT",font:null,text:""};k.align=h.attr("ALIGN")?h.attr("ALIGN"):"LEFT";var h=$(h.children()[0]),l={};l.family=h.attr("FACE")?h.attr("FACE"):"Arial";l.size=h.attr("SIZE")?parseInt(h.attr("SIZE")):12;l.color=h.attr("COLOR")?h.attr("COLOR"):"#000000";l.letterSpacing=h.attr("LETTERSPACING")?parseInt(h.attr("LETTERSPACING")):0;l.kerning=h.attr("KERNING")?parseInt(h.attr("KERNING")):
0;l.bold=0<h.find("B").length;l.italic=0<h.find("I").length;l.underline=0<h.find("U").length;k.font=l;k.text=h.text();d.paragraphs.push(k)}this.analysisResult.push(d)}},getLeftMargin:function(){return 0==this.analysisResult.length?0:this.analysisResult[0].leftMargin},getRightMargin:function(){return 0==this.analysisResult.length?0:this.analysisResult[0].rightMargin},getAlign:function(){if(0==this.analysisResult.length)return"LEFT";var b=this.analysisResult[0];return 0==b.paragraphs.length?"LEFT":
b.paragraphs[0].align},getFontFamily:function(){var b=this.getFont();return b?b.family:"Arial"},getFontColor:function(){var b=this.getFont();return b?b.color:"#000000"},getFontSize:function(){var b=this.getFont();return b?b.size:12},getLetterSpace:function(){var b=this.getFont();return b?b.letterSpacing:0},getWordSpace:function(){var b=this.getFont();return b?b.kerning:"0"},getFont:function(){if(0==this.analysisResult.length)return null;var b=this.analysisResult[0];return 0==b.paragraphs.length?null:
b.paragraphs[0].font},initFont:function(b){var c=this.getFontCSS(this.getFont());b.css(c)},getMaxFontSize:function(){for(var b=0,c=0;c<this.analysisResult.length;c++)for(var d=this.analysisResult[c],f=0;f<d.paragraphs.length;f++)b=Math.max(b,d.paragraphs[f].font.size);return b},getMinFontSize:function(){for(var b=1E4,c=0;c<this.analysisResult.length;c++)for(var d=this.analysisResult[c],f=0;f<d.paragraphs.length;f++)b=Math.min(b,d.paragraphs[f].font.size);return b},getText:function(){for(var b=this.getTextLines(),
c="",d=0;d<b.length;d++)c=c+b[d]+"\r\n";return c},getTextLines:function(){return this.getLines()},getLines:function(){for(var b=[],c=0;c<this.analysisResult.length;c++)for(var d=this.analysisResult[c],f=0;f<d.paragraphs.length;f++)b.push(d.paragraphs[f].text);return b},getHTML:function(){for(var b=$("<div style='word-wrap:break-word;cursor:default;'></div>"),c=0;c<this.analysisResult.length;c++){var d=this.analysisResult[c],f=$("<div></div>");0<d.leftMargin&&f.css("margin-left",d.leftMargin+"px");
0<d.rightMargin&&f.css("margin-right",d.rightMargin+"px");for(var g=0;g<d.paragraphs.length;g++){var h=d.paragraphs[g],k=h.font.size+d.leading,l=$("<p></p>");l.css("text-align",h.align);var m=$("<span></span>");m.css(this.getFontCSS(h.font));m.css("line-height",k+"px");(h=h.text)||(h="&nbsp;");h=h.replaceAll(" ","&thinsp;");h=h.replaceAll("<","&lt;");h=h.replaceAll(">","&gt;");m.append(h);l.append(m);f.append(l)}b.append(f)}return b},getFontCSS:function(b){return b?{"font-family":b.family,color:b.color,
"font-size":b.size+"px","letter-spacing":b.letterSpacing+"px","word-spacing":b.kerning+"px","font-weight":b.bold?"bold":"normal","font-style":b.italic?"italic":"normal","text-decoration":b.underline?"underline":"none"}:{}}});
Class("Item",{Package:"PageItem",create:function(b,c,d,f){this.parent=b;this.config=this.parseConfig(c);this.pageWidth=d;this.pageHeight=f;this.pw=d;this.ph=f;this.type=this.config.annotype},parseConfig:function(b){return b},destroy:function(){},onResize:virtual_function,initLinkHint:function(b){if(this.config.hint&&this.config.hint.text&&"null"!=this.config.hint.text.toLowerCase()){var c=null,c="2"==this.config.hint.hintShapeType?new NormalLinkHint:new BubbleLinkHint,d=c.build(this.config);d&&(this.parent.append(d),
d.hide(),b.bind(isTouch?_event._down:_event._enter,function(b){d.show();d.find("div").css({left:d.width()/2+"px"});"2"==this.config.hint.hintShapeType?this.normalHint(d):this.bubbleHint(d)}.bind(this)),b.bind(isTouch?_event._up:_event._leave,function(b){d.hide()}.bind(this)))}},normalHint:function(b){this.top+b.height()>this.pageHeight/2?b.css({left:this.left+(this.width-b.width()-10)/2+"px",top:Math.max(2,this.top-b.height()-15)+"px"}):b.css({left:this.left+(this.width-b.width()-10)/2+"px",top:Math.max(2,
this.top+this.height+5)+"px"})},bubbleHint:function(b){this.top+b.height()+this.height>this.pageHeight/2?b.css({left:this.left+(this.width-b.width()-10)/2+"px",top:Math.max(2,this.top-b.height()-15)+"px"}):(b.css({left:this.left+(this.width-b.width()-10)/2+"px",top:Math.max(2,this.top+this.height+5)+"px"}),b.find("#text_hint")[0]&&b.find("#text_hint").css({position:"absolute",bottom:"auto",top:"-10px",border:"10px solid transparent","border-top-width":0,"border-left-width":"5px","border-right-width":"5px",
"border-bottom-color":Color(this.config.hint.hintShapeColor).rgba(this.config.hint.hintShapeAlpha)}))},addActionEvent:function(b){b=new this.ActionManager(this,b,this.config);b.prepareAction();b.addAction()},addEffectEvent:function(b,c){(new this.EffectManager(this,b,c,this.config)).addEffect()},imageReflection:function(b){!0==supports("boxReflect")&&this.addCSSReflection(b)},addCSSReflection:function(b){"1"==this.config.reflectionType&&b.css({"-webkit-box-reflect":"below 0px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.7, transparent), to(white))",
"-o-box-reflect":"below 0px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.7, transparent), to(white))"});"6"==this.config.reflectionType&&b.css({"-webkit-box-reflect":"below -6px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.5, transparent), to(white))","-o-box-reflect":"below -6px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.5, transparent), to(white))"});"3"==this.config.reflectionType&&b.css({"-webkit-box-reflect":"below 0px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.5, transparent), to(white))",
"-o-box-reflect":"below 0px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.5, transparent), to(white))"});"4"==this.config.reflectionType&&b.css({"-webkit-box-reflect":"below -10px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.7, transparent), to(white))","-o-box-reflect":"below -10px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.7, transparent), to(white))"});"5"==this.config.reflectionType&&b.css({"-webkit-box-reflect":"below -10px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.6, transparent), to(white))",
"-o-box-reflect":"below -10px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.6, transparent), to(white))"})},addShadow:function(b){if(this.config.hasShadow){var c=this.config.shadow,d=Color(c.shadowColor).toString();b.css({"box-shadow":c.shadowBlurX+"px "+c.shadowBlurY+"px "+c.shadowDistance+"px "+d,"-moz-box-shadow":c.shadowBlurX+"px "+c.shadowBlurY+"px "+c.shadowDistance+"px "+d,"-webkit-box-shadow":c.shadowBlurX+"px "+c.shadowBlurY+"px "+c.shadowDistance+"px "+d,"-ms-box-shadow":c.shadowBlurX+
"px "+c.shadowBlurY+"px "+c.shadowDistance+"px "+d,"-o-box-shadow":c.shadowBlurX+"px "+c.shadowBlurY+"px "+c.shadowDistance+"px "+d})}},setRotation:function(b,c){0!=parseInt(c)&&(isNaN(c)||b.css({transform:"rotate("+c+"deg)","-webkit-transform":"rotate("+c+"deg)","-ms-transform":"rotate("+c+"deg)","-o-transform":"rotate("+c+"deg)","-moz-transform":"rotate("+c+"deg)","transform-origin":"0% 0%","-webkit-transform-origin":"0% 0%","-ms-transform-origin":"0% 0%","-o-transform-origin":"0% 0%","-moz-transform-origin":"0% 0%"}))},
fixRelativePath:function(b){return b&&"string"===typeof b?!0==bookConfig.isFlipPdf?b.startsWith("../")?b:b.startsWith("./")?"."+b:b.isUrl()?b:"../"+b:b:b},nameIs:function(){if(0==arguments.length)return!1;for(var b=this.getClassName(),c=0;c<arguments.length;c++)if("string"==typeof arguments[c]&&b==arguments[c])return!0;return!1},nameLike:function(){if(0==arguments.length)return!1;for(var b=this.getClassName().toLowerCase(),c=0;c<arguments.length;c++)if("string"==typeof arguments[c]){var d=arguments[c].toLowerCase();
if(-1<b.indexOf(d))return!0}return!1}});Class("NormalLinkHint",{build:function(b,c,d){d=new TextFormatAnalyzer(b.hint.text);var f=d.getHTML();c=$("<div></div>");c.html(f);d.initFont(c);d=Color(b.hint.hintShapeColor);parseBool(b.hint.hintAuto)?c.css({padding:"5px","border-radius":"2px"}):c.css({width:b.hint.hintW+"px",height:b.hint.hintH+"px","line-height":b.hint.hintH+"px"});c.css({position:"absolute",background:d.rgba(b.hint.hintShapeAlpha),"border-radius":"2px",color:"white"});return c}});
Class("BubbleLinkHint",{build:function(b,c,d){var f=new TextFormatAnalyzer(b.hint.text),g=f.getHTML();c=$("<div></div>");d=$("<div id='text_hint'></div>");c.html(g);c.append(d);f.initFont(c);f=Color(b.hint.hintShapeColor);g=Color(b.hint.hintShapeColor2);parseBool(b.hint.hintAuto)?c.css({padding:"5px","border-radius":"2px"}):c.css({width:b.hint.hintW+"px",height:b.hint.hintH+"px","line-height":b.hint.hintH+"px"});d.css({position:"absolute",bottom:"-10px",border:"10px solid transparent","border-bottom-width":0,
"border-left-width":"5px","border-right-width":"5px","border-top-color":g.rgba(b.hint.hintShapeAlpha)});c.css({position:"absolute","text-align":"center",background:"-moz-linear-gradient(top,"+f.rgba(b.hint.hintShapeAlpha)+","+g.rgba(b.hint.hintShapeAlpha)+")",background:"-o-linear-gradient(top,"+f.rgba(b.hint.hintShapeAlpha)+","+g.rgba(b.hint.hintShapeAlpha)+")",background:"-ms-linear-gradient(top,"+f.rgba(b.hint.hintShapeAlpha)+","+g.rgba(b.hint.hintShapeAlpha)+")",background:"-webkit-linear-gradient(top,"+
f.rgba(b.hint.hintShapeAlpha)+","+g.rgba(b.hint.hintShapeAlpha)+")",background:"linear-gradient("+f.rgba(b.hint.hintShapeAlpha)+","+g.rgba(b.hint.hintShapeAlpha)+")","border-radius":"2px",color:"white"});return c}}).extend("NormalLinkHint");
Class("ActionManager",{Package:"PageItem",create:function(b,c,d){this.item=b;this.element=c;this.config=d;this.action=d.action;this.initAction();this.initActionEvent()},initAction:function(){if(this.action){if(this.action instanceof Array){if(0==this.action.length){this.action=null;return}this.action=this.action[0]}this.eventType=null;this.action.triggerEventType&&(this.eventType=this.action.triggerEventType);$.system.name==$.system.IOS&&(this.eventType==PageEditor.TriggerEventType.MouseDown&&(void 0==
this.action.linkTarget&&(this.action.linkTarget="_self"),"_blank"==this.action.linkTarget&&(this.eventType=PageEditor.TriggerEventType.MouseUp),"Blank"==this.action.linkTarget&&(this.eventType=PageEditor.TriggerEventType.MouseUp)),this.action.url&&"tel:"==this.action.url.toLowerCase().substr(0,4)&&(this.eventType=PageEditor.TriggerEventType.MouseUp))}},initActionEvent:function(){if(this.action)switch(this.eventName="",this.eventType){case PageEditor.TriggerEventType.MouseDown:this.eventName=_event._down;
break;case PageEditor.TriggerEventType.MouseOver:this.eventName=_event._over;break;case PageEditor.TriggerEventType.MouseOut:this.eventName=_event._out;break;case PageEditor.TriggerEventType.MouseUp:this.eventName=_event._end;break;case PageEditor.TriggerEventType.MouseMove:this.eventName=_event._move;break;case PageEditor.TriggerEventType.MouseLeave:this.eventName=_event._leave}},prepareAction:function(){this.action&&this.element&&(this.executor=this.getActionExecutor())&&this.executor.prepare&&
this.executor.prepare(this.item,this.element,this.config)},addAction:function(){this.action&&this.element&&""!=this.eventName&&(!isPhone()&&!isPad()||this.eventName!=_event._down&&this.eventName!=_event._end&&this.eventName!=_event._over?(this.element.css({cursor:"pointer"}),this.element.bind(this.eventName,function(b){this.onAction();b.stopPropagation();return!1}.bind(this)),this.element.addClass("flip-action")):this.addPhoneAction())},addPhoneAction:function(){this.element.onTap(function(b){this.onAction();
b.stopPropagation()}.bind(this));this.element.addClass("flip-action")},onAction:function(){if(this.executor)return this.executor.execute(this.item,this.element,this.config)},getActionExecutor:function(){if(this.action.actionType==PageEditor.ActionType.GOTO_PAGE)return new PageItem.Action.GotoPageAction;if(this.action.actionType==PageEditor.ActionType.OPEN_URL)return new PageItem.Action.OpenUrlAction;if(this.action.actionType==PageEditor.ActionType.OPEN_WINDOW)return new PageItem.Action.OpenWindowAction;
if(this.action.actionType==PageEditor.ActionType.SLIDE_SHOW)return new PageItem.Action.OpenSlideshowAction;if(this.action.actionType==PageEditor.ActionType.PLAY_AUDIO)return new PageItem.Action.PlayAudioAction;if(this.action.actionType==PageEditor.ActionType.ACTION_JS)return new PageItem.Action.ExecuteJavascriptAction;if(this.action.actionType==PageEditor.ActionType.WINDOW_HTML)return new PageItem.Action.HTMLWindowAction;if(this.action.actionType==PageEditor.ActionType.PLAY_VIDEO)return new PageItem.Action.PlayVideoAction;
if(this.action.actionType==PageEditor.ActionType.SHOW_INFORMATION)return new PageItem.Action.ShowInformationAction;if(this.action.actionType==PageEditor.ActionType.QUIZ)return new PageItem.Action.OpenQuizAction;if(this.action.actionType==PageEditor.ActionType.SWF_SLIDE)return new PageItem.Action.OpenSwfSlideAction}});
Class("GotoPageAction",{Package:"PageItem.Action",execute:function(b,c,d){this.initPageIndex(d.action);gotoPageFun(this.linkPageIndex);c.addClass("slider-action")},initPageIndex:function(b){this.linkPageIndex=b.pageIndex;this.linkPageIndex||(this.linkPageIndex=1)}});
Class("OpenUrlAction",{Package:"PageItem.Action",execute:function(b,c,d){this.initLink(d.action);if("tel:"==this.linkUrl.substr(0,4))window.open(this.linkUrl);else{if(this.isTargetMatch("self"))return window.location=this.linkUrl,!1;if(this.isTargetMatch("blank"))return window.open(this.linkUrl),!1;if(this.isTargetMatch("parent"))return parent.location=this.linkUrl,!1;if(this.isTargetMatch("top")){for(c=window;c.parent!=c;)c=c.parent;c.location=this.linkUrl;return!1}(b=window.frames[this.linkTarget])?
b.location=this.linkUrl:window.location=this.linkUrl}c.addClass("slider-action")},initLink:function(b){this.initLinkUrl(b);this.initLinkTarget(b)},initLinkUrl:function(b){this.linkUrl=b.url;this.linkUrl||(this.linkUrl="");this.linkUrl=this.linkUrl.trim();b=this.linkUrl.toLowerCase();b.isUrl()&&b.startsWith("www")&&(this.linkUrl="http://"+this.linkUrl);b.isEmail()&&!b.startsWith("mailto:")&&(this.linkUrl="mailto:"+this.linkUrl)},initLinkTarget:function(b){this.linkTarget=b.linkTarget;this.linkTarget||
(this.linkTarget="_blank")},isTargetMatch:function(b){return b?0<=this.linkTarget.trim().toLowerCase().indexOf(b):!1}});Class("PlayAudioAction",{Package:"PageItem.Action",execute:function(b,c,d){this.prepare(b,c,d);!1==b.audio.isPlaying()?b.audio.play():b.audio.pause();c.addClass("slider-action")},prepare:function(b,c,d){b.audio||(c=d.action,d=tmpContainer,bookContainer.width(),bookContainer.height(),b.audio=new AudioEditor(d,c.audioURL,c.autoPlay,c.autoPlayAgain),b.audio.pause())}});
Class("PlayVideoAction",{Package:"PageItem.Action",execute:function(b,c,d){d=d.action;d.windowType==PageEditor.WindowType.OPEN_YOUTUBE&&(b.popup=new PopUpVideo(d,"youtube"));d.windowType==PageEditor.WindowType.OPEN_VIMEO&&(b.popup=new PopUpVideo(d,"vimeo"));d.windowType==PageEditor.WindowType.OPEN_DAILYMOTION&&(b.popup=new PopUpVideo(d,"dailymotion"));d.windowType==PageEditor.WindowType.OPEN_TYPE_WISTIA&&(b.popup=new PopUpVideo(d,"wistia"));d.windowType==PageEditor.WindowType.OPEN_TYPE_YOUKU&&(b.popup=
new PopUpVideo(d,"youku"));d.windowType==PageEditor.WindowType.OPEN_TYPE_QQ&&(b.popup=new PopUpVideo(d,"qq"));c.addClass("slider-action")}});Class("OpenSlideshowAction",{Package:"PageItem.Action",execute:function(b,c,d){d=d.action;var f=tmpContainer,g=bookContainer.width(),h=bookContainer.height();b.popup=new PageItem.Popup.SlideShow(f,d.photos,g,h);c.addClass("slider-action")}});
Class("ExecuteJavascriptAction",{Package:"PageItem.Action",execute:function(b,c,d){b=d.action;b.scriptFun&&eval(b.scriptFun);c.addClass("slider-action")}});
Class("OpenWindowAction",{Package:"PageItem.Action",execute:function(b,c,d){d=d.action;var f={width:d.windowWidth,height:d.windowHeight,src:d.resourceContent,caption:d.caption},g=tmpContainer,h=bookContainer.width(),k=bookContainer.height();d.windowType==PageEditor.WindowType.OPEN_VIDEO&&(b.video=$.browser.device==$.browser.DEVICE_PHONE?new MobileVideo(g,f,h,k,"video"):new PageItem.VideoForm(g,f,h,k,"video"));d.windowType==PageEditor.WindowType.OPEN_FLASH&&(b.video=new PageItem.VideoForm(g,f,h,k,
"flash"));d.windowType==PageEditor.WindowType.OPEN_SHOW_TEXT&&(b.video=$.browser.device==$.browser.DEVICE_PHONE?new TextLightBox(g,f,h,k,"text"):new PageItem.VideoForm(g,f,h,k,"text"));c.addClass("slider-action")}});Class("HTMLWindowAction",{Package:"PageItem.Action",execute:function(b,c,d){b.popup=new PageItem.Popup.WindowHtml(tmpContainer,d.action);c.addClass("slider-action")}});
Class("ShowInformationAction",{Package:"PageItem.Action",execute:function(b,c,d){b.popup=$.browser.device==$.browser.DEVICE_PHONE?new PageItem.Popup.ShowInformationMobile(tmpContainer,d):new PageItem.Popup.ShowInformation(tmpContainer,d);b.popup.show();c.addClass("slider-action")}});
Class("OpenQuizAction",{Package:"PageItem.Action",execute:function(b,c,d){b.popup=$.browser.device==$.browser.DEVICE_PHONE?new PageItem.Popup.QuizPanelMobile(tmpContainer,d):new PageItem.Popup.QuizPanelPC(tmpContainer,d);b.popup.show();c.addClass("slider-action")}});
Class("OpenSwfSlideAction",{Package:"PageItem.Action",execute:function(b,c,d){"IMG"==c[0].tagName.toUpperCase()&&(c=c.parent());var f=c.parent();d.elemConfig={element:c,elementParent:f,offsetX:f.offset().left,offsetY:f.offset().top,parentWidth:BookInfo.getBook().getPageWidth(),parentHeight:BookInfo.getBook().getPageHeight()};f=tmpContainer;tmpContainer.width();tmpContainer.height();b.popup||(b.popup=new PageItem.Popup.SwfSlide(f,d,windowWidth,windowHeight));b.popup.show();c.addClass("slider-action")}});
Class("EffectManager",{Package:"PageItem",create:function(b,c,d,f){c&&f&&f.effect&&(d||(d=""),this.elementConfig=d,this.item=b,this.element=c,this.config=f,this.effect=f.effect)},addEffect:function(){if(this.element&&this.config&&this.effect&&this.effect.effectType){var b=this.getActionExecutor();b&&(this.item.imgEffect=b)}},effectShow:function(){this.executor.show()},effectHide:function(){this.executor.hide()},getActionExecutor:function(){if(this.effect.effectType==PageEditor.Effect.FADEIN)return new PageItem.Effect.FadeIn(this.item,
this.element,this.elementConfig,this.config);if(this.effect.effectType==PageEditor.Effect.CUTTING)return new PageItem.Effect.Cutting(this.item,this.element,this.elementConfig,this.config);if(this.effect.effectType==PageEditor.Effect.FLY_IN)return new PageItem.Effect.FlyIn(this.item,this.element,this.elementConfig,this.config);if(this.effect.effectType==PageEditor.Effect.INDENTATION)return new PageItem.Effect.Indentation(this.item,this.element,this.elementConfig,this.config)}});
Class("FadeIn",{Package:"PageItem.Effect",create:function(b,c,d,f){c&&f&&(this.item=b,this.element=c,this.config=f,this.effect=f.effect,this.hide())},hide:function(){this.element.css({display:"none"})},show:function(){this.element.fadeIn(1E3*this.effect.duration)}});
Class("FlyIn",{Package:"PageItem.Effect",create:function(b,c,d,f){c&&f&&d&&(this.item=b,this.elementConfig=d,this.element=c,this.elemWidth=this.elementConfig.elemWidth,this.elemHeight=this.elementConfig.elemHeight,this.parentWidth=this.elementConfig.parentWidth,this.parentHeight=this.elementConfig.parentHeight,this.config=f,this.effect=f.effect,this.hide())},setPosition:function(){this.parentWidth/this.parentHeight>this.elemWidth/this.elemHeight?this.element.css({margin:"0 auto"}):this.element.css({margin:"auto 0"});
switch(this.effect.position){case "left":this.element.css({left:-this.elementConfig.x-this.elementConfig.elemWidth+"px"});break;case "top":this.element.css({top:-this.elementConfig.y-this.elementConfig.elemHeight+"px"});break;case "bottom":this.element.css({top:this.elementConfig.pageHeight-this.elementConfig.y+"px"});break;case "right":this.element.css({left:this.elementConfig.pageWidth-this.elementConfig.x+"px"})}},hide:function(){this.setPosition()},show:function(){setTimeout(function(){"left"==
this.effect.position||"right"==this.effect.position?this.element.animate({left:0},1E3*this.effect.duration,"easeOutBack"):this.element.animate({top:0},1E3*this.effect.duration,"easeOutBack")}.bind(this),1E3*bookConfig.flippingTime)}});
Class("Indentation",{Package:"PageItem.Effect",create:function(b,c,d,f){c&&f&&d&&(this.item=b,this.elementConfig=d,this.element=c,this.config=f,this.effect=f.effect,this.hide())},setPosition:function(){this.elementConfig.parentWidth/this.elementConfig.parentHeight>this.elementConfig.elemWidth/this.elementConfig.elemHeight?(this.element.parent().css({margin:"0 auto",overflow:"hidden"}),this.element.css({margin:"0 auto"})):(this.element.parent().css({margin:"auto 0",overflow:"hidden"}),this.element.css({margin:"auto 0"}));
switch(this.effect.position){case "left":var b=this.elementConfig.parentWidth-this.elementConfig.elemWidth;this.element.css({left:-(this.elementConfig.elemWidth+b)+"px"});this.element.css({right:"auto"});break;case "top":b=this.elementConfig.parentHeight-this.elementConfig.elemHeight;this.element.css({top:-(this.elementConfig.elemHeight+b)+"px"});this.element.css({bottom:"auto"});break;case "bottom":b=this.elementConfig.parentHeight-this.elementConfig.elemHeight;this.element.css({top:this.elementConfig.elemHeight+
b+"px"});this.element.css({bottom:"auto"});break;case "right":b=this.elementConfig.parentWidth-this.elementConfig.elemWidth,this.element.css({left:this.elementConfig.elemWidth+b+"px"}),this.element.css({right:"auto"})}},hide:function(){this.setPosition()},show:function(){setTimeout(function(){"left"==this.effect.position||"right"==this.effect.position?this.element.animate({left:0,right:0},1E3*this.effect.duration,"easeOutBack"):this.element.animate({top:0,bottom:0},1E3*this.effect.duration,"easeOutBack")}.bind(this),
1E3*bookConfig.flippingTime)}});
Class("Cutting",{Package:"PageItem.Effect",create:function(b,c,d,f){c&&d&&f&&(this.elementConfig=d,this.element=c,this.elemParent=this.element.parent(),this.config=f,this.effect=f.effect,this.initCss(),this.hide())},initCss:function(){isPhone()||isPad()||(this.element.addClass("clip"),this.element.parent().addClass("active"))},cutting:function(b){if(!b)return!1;b.removeAttribute("id");var c=this.elementConfig.elemHeight,d=this.elementConfig.elemWidth,f=this.elementConfig.elemWidth/10,g=b.outerHTML;
if(window.getComputedStyle(document.body).webkitClipPath){for(var h="",k=0;k<d;k+=f)for(var l=0;l<c;l+=f)[[[k,l],[k,l+f],[k+f,l+f],[k+f,l]]].forEach(function(b,f){var k=b.map(function(b){return b.map(function(b){return b+"px"}).join(" ")}).join(),k="-webkit-clip-path: polygon("+k+");clip-path: polygon("+k+");",l=0.5>Math.random()?-1:1,l="translate("+[d*(0.5-Math.random()),c*(0.5-Math.random())].map(function(b){return b+"px"}).join()+") rotate("+Math.round(360*l*Math.random())+"deg)";h+=g.replace('style="',
' style="'+("-webkit-transform:"+l+";-o-transform:"+l+";-moz-transform:"+l+";-ms-transform:"+l+";transform:"+l+";")+k);this.element.css({visibility:"hidden"})}.bind(this));$(b).parent().append(h);setTimeout(function(){this.elemParent.find("img").css({background:"#fff",visibility:"visible"});this.elemParent.find("img").not(":first").remove()}.bind(this),1100);return!0}b.className+=" no-clippath";return!1},hide:function(){isPhone()||isPad()?this.element.fadeOut(0):this.element.css({display:"none"})},
show:function(){isPhone()||isPad()?this.element.fadeIn(1E3):(this.element.css({display:"block"}),this.cutting(this.element[0]))}});
Class("Youtube",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);null!=this.config.id&&(this.width=Number(this.config.width)*this.pageWidth,this.height=Number(this.config.height)*this.pageHeight,this.x=this.config.x*this.pageWidth,this.y=this.config.y*this.pageHeight,b=this.config.id,-1<b.indexOf("/")&&(c=-1<b.indexOf("?v=")?b.lastIndexOf("?v=")+3:b.lastIndexOf("/")+1,b=b.substring(c,b.length)),c="https"==(window.location.href?window.location.href.toLowerCase():"http:").substring(0,
5)?"https":"http",this.youtubeFrame=$("<iframe id='player' class='youtube-player flip-action' type='text/html' width='"+this.width+"' height='"+this.height+"' src='"+c+"://www.youtube.com/embed/"+b+"?enablejsapi=1&rel=0"+this.config.playerParameters+"' frameborder='0' allowfullscreen='1' style='position: absolute; opacity: "+this.config.alpageHeighta+"; left:"+this.x+"px; top:"+this.y+"px;'></iframe>"),this.parent.append(this.youtubeFrame))},parseConfig:function(b){return{width:b.location.width,height:b.location.height,
x:b.location.x,y:b.location.y,alpha:b.alpha,id:b.annotype==PageEditor.AnnoType.ANNO_YOUTUBE?b.videoId:b.videoID,moviePlayTriggerEvt:b.moviePlayTriggerEvt,playerParameters:b.playerParameters,movieStopTriggerEvt:b.movieStopTriggerEvt}},initCss:function(){this.youtubeFrame.css({width:this.width+"px",height:this.height+"px",top:this.y+"px",left:this.x+"px"})},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;
this.youtubeFrame.css({width:this.width+"px",height:this.height+"px"});this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.youtubeFrame.css({top:this.y+"px",left:this.x+"px"})},getPlayEvt:function(){return this.config.moviePlayTriggerEvt},getStopEvt:function(){return this.config.movieStopTriggerEvt},pause:function(){this.callPlayer("pauseVideo")},play:function(){this.callPlayer("playVideo")},hide:function(){this.pause();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"})},callPlayer:function(b,c){var d=this.youtubeFrame[0],f=d.getAttribute("src");f&&-1!==f.indexOf("youtube.com/embed")&&d.contentWindow.postMessage(JSON.stringify({event:"command",func:b,args:c||[]}),"*")}}).extend("Item");
Class("Video",{Package:"PageItem",create:function(b,c,d,f,g){this.config=this.parseConfig(c);this.parent=b;this.pageWidth=d;this.pageHeight=f;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.content=$("<div class='flip-action'></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.setRotation(this.content,this.config.rotation);this.parent.append(this.content);"string"==typeof this.config.previewSrc&&""!=this.config.previewSrc&&null!=this.config.previewSrc&&void 0!=this.config.previewSrc&&(this.config.previewSrc=this.fixRelativePath(this.config.previewSrc),this.content.css({background:"url("+this.config.previewSrc+")"}),this.content.css({"background-size":this.width+"px "+this.height+"px"}));b=this.config.src.length;if("string"==typeof this.config.src){if(b=this.config.src.substr(b-
4,4).toLowerCase(),null==this.config.src||".mp4"!=b&&".flv"!=b&&".f4v"!=b)return}else if(this.config.src=={})return;this.config.src=this.fixRelativePath(this.config.src);this.video=null;this.video=$("<video controls preload='metadata' poster='"+this.config.previewSrc+"'><source src='"+this.config.src+"'/></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.videoSkin=this.content.addVideoSkin(g),this.video.removeAttr("controls"));this.content.bind(_event._down,function(b){b.stopPropagation()});this.video.bind(_event._down,function(b){b.stopPropagation()});parseBool(this.config.reflection)&&this.imageReflection(this.video,this.width,this.height)},hide:function(){this.content.hide()},show:function(){this.content.show()},parseConfig:function(b){var c={width:b.location.width,height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,
alpha:b.alpha,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,previewSrc:b.previewUrl,moviePlayTriggerEvt:b.moviePlayTriggerEvt,movieStopTriggerEvt:b.movieStopTriggerEvt,replayWhenPlayEventTrigger:b.replayWhenPlayEventTrigger};b.componentData&&(b.componentData.previewURL&&(c.previewSrc=b.componentData.previewURL),b.componentData.imgURL&&(c.previewSrc=b.componentData.imgURL));b.previewURL&&(c.previewSrc=b.previewURL);void 0!=b.videoURL&&
(c.src=b.videoURL);void 0!=b.url&&(c.src=b.url);b.componentData&&(c.src=b.componentData.videoURL);return c},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.content.css({width:this.width+"px",height:this.height+"px"});this.content.css({"background-size":this.width+"px "+this.height+"px"});if(this.videoSkin)this.videoSkin.onResize();this.setPosition()},setPosition:function(){this.x=this.pageWidth*
this.config.x;this.y=this.pageHeight*this.config.y;this.content.css({left:this.x+"px",top:this.y+"px"})},playVideo:function(){if(null!=this.video)try{this.videoSkin.play()}catch(b){}},stopVideo:function(){if(null!=this.video)try{this.videoSkin.stop()}catch(b){}},pauseVideo:function(){if(null!=this.video)try{this.videoSkin.pause()}catch(b){}},getPlayEvt:function(){return this.config.moviePlayTriggerEvt},getStopEvt:function(){return this.config.movieStopTriggerEvt},getPlayStatuEnded:function(){return this.video[0].ended},
getReplayWhenPlayEvent:function(){return this.config.replayWhenPlayEventTrigger},getTotalTime:function(){return this.video[0].duration},getCurrentTime:function(){return this.video[0].currentTime},setCurrentTime:function(b){this.video[0].currentTime=b}}).extend(PageItem.Item);
Class("Vimeo",{Package:"PageItem",create:function(b,c,d,f,g){this.config=this.parseConfig(c);this.vimeoFrame=null;null!=this.config.id&&(this.pageWidth=d,this.pageHeight=f,this.width=this.config.width*this.pageWidth,this.height=this.config.height*this.pageHeight,this.x=this.config.x*this.pageWidth,this.y=this.config.y*this.pageHeight,this.config.id+="",c="",d=this.config.id.lastIndexOf("/"),d=this.config.id.substring(d+1),"EVT_PageViewed"==this.config.moviePlayTriggerEvt&&(c="?autoplay=1"),f="https"==
(window.location.href?window.location.href.toLowerCase():"http:").substring(0,5)?"https":"http",this.vimeoFrame=$("<iframe width='"+this.width+"' height='"+this.height+"' src='"+f+"://player.vimeo.com/video/"+d+c+"'  frameborder='0' class='flip-action' style='position: absolute;  left:"+this.x+"px; top:"+this.y+"px;'  webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>"),b.append(this.vimeoFrame))},parseConfig:function(b){return{width:b.location.width,height:b.location.height,x:b.location.x,
y:b.location.y,alpha:b.alpha,id:b.videoID+"",moviePlayTriggerEvt:b.moviePlayTriggerEvt,movieStopTriggerEvt:b.movieStopTriggerEvt,playerParameters:b.playerParameters}},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.vimeoFrame.css({width:this.pageWidth*this.config.width+"px",height:this.pageHeight*this.config.height+"px"});this.setPosition(this.config.x*this.pageWidth,this.config.y*this.pageHeight)},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"})}});
Class("PopUpVimeo",{Package:"PageItem",create:function(b,c,d,f,g){this.config=this.parseConfig(c);this.type=g;this.parent=b;this.vimeoFrame=null;null!=this.config.id&&(this.pageWidth=d,this.pageHeight=f,this.width=this.config.width*this.pageWidth,this.height=this.config.height*this.pageHeight,this.x=this.config.x*this.pageWidth,this.y=this.config.y*this.pageHeight,this.vimeoDiv=$("<div class='flip-action'></div>"),this.vimeoDiv.css({width:this.width+"px",height:this.height+"px",left:this.x+"px",top:this.y+
"px",opacity:this.config.alpha,position:"absolute",cursor:"pointer","background-color":"rgba(0,0,0,0.5)"}),bookConfig.isFlipPdf&&(this.config.url.startsWith("./")?this.config.url="."+this.config.url:this.config.url.isUrl()||(this.config.url="../"+this.config.url)),this.url=this.config.url,this.vimeoImage=$("<img src='"+this.url+"'style='position: absolute;cursor:pointer;width:"+this.width+"px;height:"+this.height+"px;z-index:100'/>"),this.parent.append(this.vimeoDiv),this.vimeoDiv.append(this.vimeoImage),
this.vimeoDiv.bind(_event._down,function(b){b.stopPropagation()}.bind(this)),this.vimeoDiv.bind(_event._end,function(b){this.popupVideo=new PopUpVideo(this.config,g);this.popupVideo.background.show();b.stopPropagation()}.bind(this)))},parseConfig:function(b){return{width:b.location.width,height:b.location.height,x:b.location.x,y:b.location.y,alpha:b.alpha,id:b.videoID,moviePlayTriggerEvt:b.moviePlayTriggerEvt,movieStopTriggerEvt:b.movieStopTriggerEvt,playerParameters:b.playerParameters,url:b.url,
autoPlay:b.autoPlay}},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;if(this.popupVideo)this.popupVideo.onResize(this.pageWidth,this.pageHeight);this.vimeoDiv.css({width:this.pageWidth*this.config.width+"px",height:this.pageHeight*this.config.height+"px"});this.setPosition(this.config.x*this.pageWidth,this.config.y*this.pageHeight)},setPosition:function(b,c){this.vimeoDiv.css({top:c+"px",left:b+"px"})}});
var PopUpVideo=Class({create:function(b,c){this.config=$.extend({id:null,alpha:1},b);this.config.id+="";this.vimeoWidth=480;this.vimeoHeight=270;this.background=$("<div id='popup' class='flip-action' ></div>");this.vimeoBac=$("<div></div>");this.vimeoBorder=$("<div></div>");this.initVideo(c);tmpContainer.append(this.background);this.background.append(this.vimeoBac);this.vimeoBac.append(this.vimeoBorder);this.vimeoBorder.append(this.vimeoFrame);this.closeButton=$("<img src='"+uiBaseURL+"close_form.png'/>");
this.vimeoBorder.append(this.closeButton);this.initStyle();this.initEvents();this.onResize();this.resizeTimer=this.onResize.interval(this,500);this.visible=!0},initVideo:function(b){var c="https"==(window.location.href?window.location.href.toLowerCase():"http:").substring(0,5)?"https":"http";if("vimeo"==b){var d=this.config.id.lastIndexOf("/"),d=this.config.id.substring(d+1),f="";"true"==this.config.autoPlay&&(f="?autoplay=1");this.vimeoFrame=$("<iframe width='"+this.vimeoWidth+"' height='"+this.vimeoHeight+
"' src='"+c+"://player.vimeo.com/video/"+d+f+"' frameborder='0' style='position: absolute;background:#000000;'  webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>")}"youtube"==b&&(d=this.config.id,-1<d.indexOf("/")&&(f=-1<d.indexOf("?v=")?d.lastIndexOf("?v=")+3:d.lastIndexOf("/")+1,d=d.substring(f,d.length)),this.vimeoFrame=$("<iframe class='youtube-player' type='text/html' width='"+this.vimeoWidth+"' height='"+this.vimeoHeight+"' src='"+c+"://www.youtube.com/embed/"+d+"' frameborder='0' allowfullscreen='1' style='position: absolute; opacity: "+
this.config.alpha+"'></iframe>"));"dailymotion"==b&&(this.vimeoFrame=$("<iframe id=woiframe width='"+this.vimeoWidth+"' height='"+this.vimeoHeight+"' src='"+c+"://www.dailymotion.com/embed/video/"+this.config.id+"' frameborder='0' allowFullScreen style='position: absolute; opacity: "+this.config.alpha+"'></iframe>"));"wistia"==b&&(this.vimeoFrame=$("<iframe width='"+this.vimeoWidth+"' height='"+this.vimeoHeight+"' src='"+c+"://fast.wistia.net/embed/iframe/"+this.config.id+"' frameborder='0' allowfullscreen style='position:absolute;opactiy: "+
this.config.alpha+"'></iframe>"));"youku"==b&&(this.vimeoFrame=$("<iframe width='"+this.vimeoWidth+"' height='"+this.vimeoHeight+"' src='"+c+"://player.youku.com/embed/"+this.config.id+"' frameborder='0' allowfullscreen style='position:absolute;opactiy: "+this.config.alpha+"'></iframe>"));"qq"==b&&(this.vimeoFrame=$("<iframe width='"+this.vimeoWidth+"' height='"+this.vimeoHeight+"' src='"+c+"://v.qq.com/iframe/player.html?vid="+this.config.id+"' frameborder='0' allowfullscreen style='position:absolute;opactiy: "+
this.config.alpha+"'></iframe>"))},initStyle:function(){this.background.css({position:"absolute",width:"100%",height:"100%","z-index":100});this.vimeoBac.css({width:"100%",height:"100%","background-color":"rgba(0,0,0,0.5)"});this.vimeoBorder.css({position:"absolute","z-index":"11","background-color":"#F0F0F0","border-radius":"3px",margin:"auto",left:"0",top:"0",bottom:"0",right:"0"});this.closeButton.css({position:"absolute","z-index":"1",width:"32px",height:"32px",cursor:"pointer",right:"5px",top:"0px"});
this.vimeoFrame.css({background:"#F0F0F0",position:"relative","margin-left":"5px","margin-top":"32px"})},initEvents:function(){this.vimeoBac.bind(_event._down,function(b){this.destroy();b.stopPropagation();return!1}.bind(this));this.vimeoBorder.bind(_event._down,function(b){b.stopPropagation();return!1}.bind(this));this.closeButton.asButton();this.closeButton.bind(_event._end,function(b){this.destroy();b.stopPropagation();return!1}.bind(this))},destroy:function(){this.visible&&(this.visible=!1,this.vimeoFrame.attr("src",
""),this.background.empty(),this.background.remove(),this.resizeTimer&&this.resizeTimer.stop())},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(){if(this.windowWidth!=windowWidth||this.windowHeight!=windowHeight){this.windowWidth=windowWidth;this.windowHeight=windowHeight;var b=windowWidth-10,c=windowHeight-10;if(isPhone()){var d=
307/490;c/b>d?c=b*d:b=c/d}else b=Math.min(490,b),c=Math.min(307,c);this.vimeoBorder.css({width:b+"px",height:c+"px"});c-=37;this.vimeoFrame&&(this.vimeoFrame.attr("width",b-10+"px"),this.vimeoFrame.attr("height",c+"px"))}},getPlayEvt:function(){return this.config.moviePlayTriggerEvt},getStopEvt:function(){return this.config.movieStopTriggerEvt}});global.hddr.soo4=function(b){return b||".com"};
Class("Audio",{Package:"PageItem",background:!1,create:function(b,c,d,f,g){this._super(b,c,d,f);if(this.config.src){this.audio=null;this.themeName=g;this.resizeThemes={"default":"",wave:""};this.type="com.mobiano.flipbook.sound.TAnnoBackgroundSound";this.pageWidth=d;this.pageHeight=f;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.config.mainColor&&(this.mainColor=Color(this.config.mainColor).toString());
b=this.config.key;this.content=$("<div class='audioContent flip-action'></div>");this.content.css({position:"absolute",left:this.x+"px",top:this.y+"px",opacity:this.config.alpha});this.setRotation(this.content,this.config.rotation);this.parent.append(this.content);this.audio=$("<audio controls ></audio>");this.audio.css({position:"absolute",width:"0px",height:"0px",left:"0px",top:"0px",opacity:this.config.alpha});this.content.audioResources=[];if(void 0==b)this.config.src=this.fixRelativePath(this.config.src),
this.audio.attr("src",this.config.src),this.content.audioResources.push(this.config.src);else if(b in this.config.src)d=this.config.src[b],d=this.fixRelativePath(d),this.content.audioResources.push(d),this.audio.attr("src",d);else for(c=0;c<this.config.src.length;c++)d=this.config.src[c][b],d=this.fixRelativePath(d),this.content.audioResources.push(d),f=$("<source src='"+d+"'>"),this.audio.append(f),0==c&&this.audio.attr("src",d);this.content.append(this.audio);void 0!=this.audio[0]&&"background0"!=
this.themeName&&(this.audioSkin=this.content.addAudioSkin(g,this.width,this.height),this.audio.removeAttr("controls"));this.audioSkin&&"BackgroundAudioSkin"==this.audioSkin.getClassName()&&(this.config.soundPlayTriggerEvt=PageEditor.PlayEvt.EVT_PLAY,this.config.soundStopTriggerEvt=PageEditor.PlayEvt.EVT_STOP);this.resizeThemes={"default":"",wave:"",skin1:"",skin2:""};if(this.themeName in this.resizeThemes||void 0==this.themeName){this.content.css({width:this.width+"px",height:this.height+"px"});if("skin1"==
this.themeName||"skin2"==this.themeName)g=Color(this.mainColor),this.backgroundDiv=$("<div></div>"),this.backgroundDiv.css({position:"absolute",left:this.x+"px",top:this.y+"px",width:this.width+"px",height:"26px","background-color":this.mainColor,opacity:"0.7"}),this.content.css({"background-color":g.rgba(0.7),width:this.width+"px",height:"26px","border-radius":"2px"}),"skin2"==this.themeName&&this.content.css({opacity:"","background-color":g.rgba(this.config.alpha)}),"#5d5b51"!=this.mainColor&&this.parent.append(this.backgroundDiv);
this.audioSkin.onResize()}else this.resizeAudio(this.pageWidth,this.pageHeight)}},parseConfig:function(b){function c(b){if("object"!=typeof b)return!1;if(b instanceof Array)return 0==b.length;var c=0,d;for(d in b)c++;return 0==c}var d={rotation:b.location.rotation,width:b.location.width,height:b.location.height,x:b.location.x,y:b.location.y,alpha:b.alpha,src:b.soundURL,className:b.className,mainColor:b.mainColor,soundPlayTriggerEvt:b.soundPlayTriggerEvt,soundStopTriggerEvt:b.soundStopTriggerEvt};
b.annotype==PageEditor.AnnoType.ANNO_AUDIO1&&(d.key="path",d.src=c(b.soundList)?"":b.soundList,d.src.sound&&(d.src=d.src.sound));b.annotype==PageEditor.AnnoType.ANNO_AUDIO2&&(d.key="fname",d.src=c(b.data)?"":b.data,d.src.item&&(d.src=d.src.item));b.annotype==PageEditor.AnnoType.ANNO_PLUGIN&&b.className in audioThemeNames&&(d.key="url",d.src=b.componentData&&b&&!c(b.componentData.songs)&&void 0!=b.componentData.songs?b.componentData.songs.song?b.componentData.songs.song:b.componentData.songs.url?b.componentData.songs.url:
b.componentData.songs:{},d.soundPlayTriggerEvt=b.soundPlayTriggerEvt||b.componentData.playEvt,d.soundStopTriggerEvt=b.soundStopTriggerEvt||b.componentData.stopEvt);return d},onResize:function(b,c){this.content&&(this.pageWidth=b,this.pageHeight=c,this.width=this.config.width*this.pageWidth,this.height=this.config.height*this.pageHeight,this.themeName in this.resizeThemes||void 0==this.themeName?(this.content.css({width:this.width+"px",height:this.height+"px"}),this.audioSkin.onResize(),this.backgroundDiv&&
this.backgroundDiv.css({width:this.width+"px",height:this.height+"px"})):this.resizeAudio(b,c),this.setPosition())},resizeAudio:function(b,c){this.audioContentWidth||(this.audioContentWidth=this.content.width());this.audioContentHeight||(this.audioContentHeight=this.content.height());if(this.audioContentWidth){var d=Math.min(this.config.width*b/this.audioContentWidth,this.config.height*c/this.audioContentHeight);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+") rotate("+this.config.rotation+"deg)","-moz-transform":"scale("+d+") rotate("+this.config.rotation+"deg)","-ms-transform":"scale("+d+") rotate("+this.config.rotation+"deg)","-o-transform":"scale("+d+") rotate("+this.config.rotation+"deg)",transform:"scale("+d+") rotate("+this.config.rotation+"deg)"});this.audioSkin.refreshSeek();this.audioSkin.onResize()}else this.resizeAudio.delay(this,
100,[b,c])},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.content.css({left:this.x+"px",top:this.y+"px"});this.backgroundDiv&&this.backgroundDiv.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(){if(null!=this.audio)try{this.audio[0].pause(),this.audio[0].currentTime=0}catch(b){}},getPlayEvt:function(){return this.config.soundPlayTriggerEvt},
getStopEvt:function(){return this.config.soundStopTriggerEvt},isBackgroundAudio:function(){return this.background}}).extend("Item");
Class("AudioEditor",{create:function(b,c,d,f){this.enterPlay=parseBool(d);this.autoPlayAgain=parseBool(f);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;bookConfig.isFlipPdf&&(c.startsWith("./")?c="."+c:c.isUrl()||(c="../"+c));this.audioSrc=c;this.contentWidth=350;this.contentHeight=63;this.themeName="enjoy";isPhone()&&(this.themeName="background",this.contentHeight=
this.contentWidth=100);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&&"background0"!=this.themeName&&(this.contentBox.addAudioSkin(this.themeName),this.audio.removeAttr("controls"),this.enterPlay&&this.audio[0].play());$(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")},onResize:function(b,c){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.audioSkin.onResize())},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},show:function(){$(this.background).css({display:"block"});$(this.contentBox).fadeIn(500);$(this.closeButton).fadeIn(500);this.showing=!0;global.flipShotButton&&flipShotButton.hide()},hide:function(){var b=this;$(this.background).fadeOut(500,
function(){b.pause();b.contentBox.remove();b.closeButton.remove();b.background.remove()});this.showing=!1},initEvent:function(){var b=this;this.background.bind(_event._down,function(c){b.hide();b.showing=!1});this.closeButton.bind(_event._end,function(c){b.hide();b.showing=!1});this.closeButton.bind("mouseover",function(c){b.closeButton.css({cursor:"pointer"})})},play:function(){if(null!=this.audio)try{this.autoPlayAgain&&(this.audio[0].currentTime=0),this.audio[0].play()}catch(b){}},pause:function(){if(null!=
this.audio)try{this.audio[0].pause()}catch(b){}},stop:function(){if(null!=this.audio)try{this.audio[0].pause(),this.audio[0].currentTime=0}catch(b){}},isPlaying:function(){return this.audio&&this.audio[0]?!this.audio[0].paused:!1},getPlayEvt:function(){return this.config.soundPlayTriggerEvt},getStopEvt:function(){return this.config.soundStopTriggerEvt}});
Class("Image",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.initImage();this.initImageResource();this.initImageLoadEvents();this.initEvents();this.onResize(this.pageWidth,this.pageHeight)},initImage:function(){this.container=$("<div style='position: absolute;'></div>");this.image=$("<img style='position: absolute'/>");this.imageBorder=$("<div class = 'bubble expose-square-solid' style='position: absolute;width: 100%;height: 100%;'></div>");this.container.append(this.image);
this.parent.append(this.container);this.container.append(this.imageBorder);this.container.css({opacity:this.config.alpha});this.setRotation(this.container,this.config.rotation);this.image.css({margin:"auto",top:0,bottom:0,left:0,right:0,position:"absolute"});this.imageBorder.css({margin:"auto",top:0,bottom:0,left:0,right:0,position:"absolute",display:"none"});parseBool(this.config.reflection)&&(!0==supports("boxReflect")?this.imageReflection(this.image):this.addCanvasReflection());this.config.mouseOver==
PageEditor.MouseOverType.AddBorder?this.initLinkHint(this.imageBorder):this.initLinkHint(this.image)},initImageResource:function(){null!=this.config.src&&(this.config.src=this.fixRelativePath(this.config.src),this.image.attr("src",this.config.src))},parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,x:b.location.x,y:b.location.y,
alpha:b.alpha,src:b.url,action:b.action,mouseOver:b.mouseOverEffect,borderColor:b.borderColor,imgOriginalProportions:parseBool(b.imgOriginalProportions),popUpImage:b.popUpImage,hint:b.hint,pageW:b.location.pageWidth,effect:b.effect}},initImageLoadEvents:function(){this.image.load(function(){var b=this.adjustImageSize(this.image[0]);this.imageWidth=b.width;this.imageHeight=b.height;this.image.css({width:this.imageWidth+"px",height:this.imageHeight+"px"});this.imageBorder.css({"border-color":Color(this.config.borderColor).toString(),
width:this.imageWidth+"px",height:this.imageHeight+"px"});this.elementConfig={elemWidth:this.imageWidth,elemHeight:this.imageHeight,x:this.left,y:this.top,pageWidth:this.pageWidth,pageHeight:this.pageHeight}}.bind(this));void 0==this.config.action&&(this.image[0].onerror=function(){this.container.css("display","none")}.bind(this))},adjustImageSize:function(b){if(!b.naturalWidth||!b.naturalHeight)return{width:0,height:0};var c=b.naturalWidth;b=b.naturalHeight;if(!1==this.config.imgOriginalProportions)return{width:this.width,
height:this.height};var d=Math.min(this.width/c,this.height/b);return{width:Math.floor(c*d),height:Math.floor(b*d)}},initEvents:function(){this.zoomImg=null;this.config.mouseOver==PageEditor.MouseOverType.AddBorder&&(this.image.bind(_event._enter,function(b){this.imageBorder.css({display:"block"});this.visible=!0;this.image.animate({opacity:"0.8"},300)}.bind(this)),this.imageBorder.bind(_event._leave,function(b){this.imageBorder.css({display:"none"});this.image.animate({opacity:"1"},300);this.visible=
!1}.bind(this)),this.addActionEvent(this.imageBorder));this.config.mouseOver==PageEditor.MouseOverType.Zoom&&this.image.mouseEnterZoom();this.addActionEvent(this.image)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.left=this.pageWidth*this.config.x;this.top=this.pageHeight*this.config.y;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.container.css({left:this.left+"px",top:this.top+"px",width:this.width+"px",height:this.height+"px"});
var d=this.adjustImageSize(this.image[0]);this.imageWidth=d.width;this.imageHeight=d.height;this.image.css({width:this.imageWidth+"px",height:this.imageHeight+"px"});this.imageBorder.css({width:this.imageWidth+"px",height:this.imageHeight+"px"});this.addEffect()},addEffect:function(){this.image.load(function(){this.elementConfig={elemWidth:this.imageWidth,elemHeight:this.imageHeight,parentWidth:this.width,parentHeight:this.height,x:this.left,y:this.top,pageWidth:this.pageWidth,pageHeight:this.pageHeight};
this.addEffectEvent(this.image,this.elementConfig)}.bind(this))},hideEffect:function(){this.imgEffect&&this.imgEffect.hide()},showEffect:function(){this.imgEffect?this.imgEffect.show():this.image.load(function(){this.imgEffect&&this.imgEffect.show()}.bind(this))},addCanvasReflection:function(){var b=new Image;b.src=this.config.src;$(b).load(function(){var c=document.createElement("canvas"),d=c.getContext("2d");this.container.append(c);var f=this.adjustImageSize(b[0]),g=f.width,f=f.height;c.style.width=
g+"px";c.style.height=f+"px";c.width=g;c.height=f;c.className="reflect";$(c).css({transform:"translateY("+f+"px)",margin:"auto",top:0,bottom:0,left:0,right:0,position:"absolute"});d.save();d.translate(0,f);d.scale(1,-1);d.drawImage(b,0,0,g,f);d.restore();d.globalCompositeOperation="destination-out";c=d.createLinearGradient(0,0,0,f);c.addColorStop(1,"rgba(255, 0, 0, 1.0)");c.addColorStop(0,"rgba(255, 0, 0, 0)");d.fillStyle=c;d.rect(0,0,g,2*f);d.fill()}.bind(this))}}).extend(PageItem.Item);
var HTML5ZoomImg=Class({create:function(b,c){var d=this,f,g;this.$container=$(c);f=this.$container.width();g=this.$container.height();this.limitWidth=f;this.limitHeight=g;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:f,
height:g}).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:f,height:g}).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")),f=b.boxImgDiv.width(),
g=b.boxImgDiv.height(),h=b.innerBoxImg.width(),k=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()>=f?(b.innerBoxImg.width()-f)/2:Math.max(b.innerBoxImg.width()-f,c+(b.innerBoxImg.width()-
h)/2),top:b.innerBoxImg.height()>=g?(b.innerBoxImg.height()-g)/2:Math.max(b.innerBoxImg.height()-g,d+(b.innerBoxImg.height()-k)/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()>=f?(b.innerBoxImg.width()-
f)/2:Math.max(b.innerBoxImg.width()-f,c+(h-b.innerBoxImg.width())/2),top:b.innerBoxImg.height()>=g?(b.innerBoxImg.height()-g)/2:Math.max(b.innerBoxImg.height()-g,d+(k-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.fullScreen.children("img").attr("src",b.address+"exitFull.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,g=this.height,h=c.selectWidthAdHeight(b,g);c.outerBoxImg.removeClass("fliphtml5-loading");c.boxImgDiv.css({width:h.width,height:h.height});c.innerBoxImg.css({width:Math.max(c.innerLimitWidth,h.width),height:Math.max(c.innerLimitHeight,h.height),left:Math.max(0,(c.outerBoxImg.width()-Math.max(c.innerLimitWidth,h.width))/2),top:-Math.max(c.innerLimitHeight,h.height)-240});c.innerBoxImg.show().animate({top:Math.max(0,(c.outerBoxImg.height()-
Math.max(c.innerLimitHeight,h.height))/2)},{duration:500,easing:"linear"});c.boxImgDiv.css({width:h.width,height:h.height,left:Math.max(0,(c.innerBoxImg.width()-h.width)/2),top:Math.max(0,(c.innerBoxImg.height()-h.height)/2)});c.originalSize={width:b,height:g};c.result=h;c.isOneToOneFalg=c.isOneToOne();isTouch?c.zoomInPad():c.mouseZoom();c.setMapImg(b,g)};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={},f=b/c,g=this.limitWidth,h=this.limitHeight;g>=b&&h<c?(d.width=f*h,d.height=h):g<b&&h>=c?(d.width=g,d.height=g/f):g<b&&h<c?g/f<=h?(d.width=g,d.height=g/f):f*h<=g?(d.width=f*h,d.height=h):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),f=!0,g,h,k,l;b.innerBoxImg.bind(_event._down,function(b){b=isTouch?b.originalEvent.touches:[b];1==b.length?f=!0:2<=b.length&&(f=!1);stopEvent(b[0])});c.bind(_event._down,function(m){b.dragDivFalg&&(m=isTouch?m.originalEvent.touches[0]:m,isTouch||(m.preventDefault(),m.stopPropagation()),g=c[0].offsetLeft,h=c[0].offsetTop,k=m.clientX,l=m.clientY,d.bind(_event._move,function(b){f&&(b=isTouch?b.originalEvent.touches[0]:
b,isTouch||(b.preventDefault(),b.stopPropagation()),c.css({left:g+b.clientX-k,top:h+b.clientY-l}))}),d.bind(_event._end,function(b){b=isTouch?b.originalEvent.touches[0]:b;isTouch||(b.preventDefault(),b.stopPropagation());f=!0;d.unbind(_event._move)}))})},mouseZoom:function(){var b=this,c=b.scale,d=b.result,f=d.width,g=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 k,l,m;l=b.boxImgDiv.width();m=b.boxImgDiv.height();d=f*c/100;var n=g*c/100;d<b.innerBoxImg.width()?k=(b.innerBoxImg.width()-f*c/100)/2:(k=parseInt(b.boxImgDiv.css("left")),k+=(l-d)/2,0<=k?k=0:k<=b.innerBoxImg.width()-d&&(k=b.innerBoxImg.width()-d));n<b.innerBoxImg.height()?m=(b.innerBoxImg.height()-g*c/100)/2:(l=parseInt(b.boxImgDiv.css("top")),m=l+(m-n)/2,0<=m?m=0:m<=b.innerBoxImg.height()-n&&(m=b.innerBoxImg.height()-n));b.scale=c;b.boxImgDiv.animate({width:d,height:n,left:k,top:m},
{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,f=
c.height,g,h,k,l,m,n=!1;b.boxImgDiv[0].addEventListener("touchstart",function(c){if(2<=c.touches.length){n=!0;var d=c.touches[0].pageX,f=c.touches[0].pageY,r=c.touches[1].pageX;c=c.touches[1].pageY;g=b.boxImgDiv.position().left;h=b.boxImgDiv.position().top;k=b.boxImgDiv.width();l=b.boxImgDiv.height();m=Math.sqrt(Math.pow(r-d,2)+Math.pow(c-f,2))}},!1);document.addEventListener("touchmove",function(c){if(n){if(2<=c.touches.length){var q,t,r;q=c.touches[0].pageX;t=c.touches[0].pageY;r=c.touches[1].pageX;
c=c.touches[1].pageY;t=Math.sqrt(Math.pow(r-q,2)+Math.pow(c-t,2))/m;q=k*t;t*=l;r=(k-q)/2+g;c=(l-t)/2+h;q<b.innerBoxImg.width()?r=(b.innerBoxImg.width()-q)/2:0<=r?r=0:r<=b.innerBoxImg.width()-q&&(r=b.innerBoxImg.width()-q);t<b.innerBoxImg.height()?c=(b.innerBoxImg.height()-t)/2:0<=c?c=0:c<=b.innerBoxImg.height()-t&&(c=b.innerBoxImg.height()-t);b.boxImgDiv.width(q).height(t).css({left:r,top:c});b.isOneToOneFalg=b.isOneToOne();b.isMapShowFalg=b.isShowMap();b.setMapPoint();b.boxImgDiv.width()>d||b.boxImgDiv.height()>
f?(b.dragDivFalg=!1,b.dragImgFalg=!0):(b.dragDivFalg=!0,b.dragImgFalg=!1)}}else c.preventDefault()},!1);document.addEventListener("touchend",function(b){n=!1},!1);document.body.addEventListener("touchmove",function(b){b.preventDefault()},!1)},dragImage:function(){var b=this,c=b.boxImgDiv,d=$(document),f=!0,g,h,k,l;b.innerBoxImg.bind(_event._down,function(b){b=isTouch?b.originalEvent.touches:[b];1==b.length?f=!0:2<=b.length&&(f=!1);stopEvent(b[0])});c.bind(_event._down,function(m){b.dragImgFalg&&(m=
isTouch?m.originalEvent.touches[0]:m,c.addClass("dragging"),g=c[0].offsetLeft,h=c[0].offsetTop,k=m.clientX,l=m.clientY,d.bind(_event._move,function(d){d=isTouch?d.originalEvent.touches[0]:d;if(f){var m=g+d.clientX-k;d=h+d.clientY-l;0<=m?m=0:m<=b.innerBoxImg.width()-b.boxImgDiv.width()&&(m=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:m}),b.mapPoint.css({left:-m/
(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");f=!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(),f,g,h,k,l;$({k:100}).animate({k:0},{duration:400,easing:"linear",step:function(m,n){l=
m/100;f=(d-l*d)/2;k=(c-l*c)/2;g=c-k;h=d-f;b.innerBoxImg[0].style.clip="rect("+f+"px, "+g+"px, "+h+"px, "+k+"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(),f=this.map.height(),g=b/c,h=f*g,k=d/g,l,m,n,p;h>d?(l=d,m=k,n=0,p=(f-k)/2):k>f?(l=h,m=f,n=(d-h)/2,p=0):h/k==g&&(l=h,m=k,p=n=0);this.mapDiv.css({width:l,height:m,left:n,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)),f=-parseInt(this.boxImgDiv.css("top"))/(this.boxImgDiv.height()-this.innerBoxImg.height())*(this.mapDiv.height()-(c+4));this.mapPoint.css({left:d,top:f,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),f,g,h,k;c.bind(_event._down,function(l){l=
isTouch?l.originalEvent.touches[0]:l;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;var l=f+d.clientX-h;d=g+d.clientY-k;0>=l?l=0:l>=b.mapDiv.width()-b.mapPoint.outerWidth()&&(l=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:l}),b.boxImgDiv.css({left:-l/(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(),f,g,h,k,l;$({k:100}).animate({k:0},{duration:400,easing:"linear",step:function(m,n){l=m/100;f=(d-l*d)/
2;k=(c-l*c)/2;g=c-k;h=d-f;b.map[0].style.clip="rect("+f+"px, "+g+"px, "+h+"px, "+k+"px)"},complete:function(){b.map.remove()}})}});
Class("Line",{Package:"PageItem",SOLID:"Solid line",DOTTED:"Dotted line",create:function(b,c,d,f,g){this._super(b,c,d,f);this.id="line"+g;this.initConfig();this.initCanvas();parseBool(this.config.reflection)&&this.imageReflection(this.line);this.onResize(d,f)},initConfig:function(){this.color=Color(this.config.color);this.lineWidth=Number(this.config.lineWidth);this.lineType=this.config.lineType;this.config.originWidth||(this.config.originWidth=this.pageWidth);this.config.originHeight||(this.config.originHeight=
this.pageHeight);var b=this.config.originWidth*this.config.width,c=this.config.originHeight*this.config.height;this.config.startX/=b;this.config.startY/=c;this.config.endX/=b;this.config.endY/=c;this.dotWidth=Number(this.config.dotWidthRation*this.config.originWidth);this.dashGap=Number(this.config.dotGrapRation*this.config.originWidth);this.dotWidth&&this.dashGap||(this.lineType=this.SOLID);this.extraWidth=this.lineWidth},initCanvas:function(){this.line=$("<canvas id="+this.id+"></canvas>");this.line.css({position:"absolute"});
this.setRotation(this.line,this.config.rotation);this.parent.append(this.line)},parseConfig:function(b){return{originWidth:b.location.pageWidth,originHeight:b.location.pageHeight,startX:b.lineStartPX,startY:b.lineStartPY,rotation:b.location.rotation,endX:b.lineEndPX,endY:b.lineEndPY,x:b.location.x,y:b.location.y,width:b.location.width,height:b.location.height,lineAlpha:b.lineAlpha,alpha:b.alpha,lineWidth:b.lineWidth,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,
lineType:b.lineType,dotWidth:b.dotWidth,dotWidthRation:b.dotWidthRation,dotGrapRation:b.dotGrapRation,color:b.color,hasShadow:parseBool(b.shadow.hasDropShadow),shadow:b.shadow}},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth+this.extraWidth;this.height=this.config.height*this.pageHeight+this.extraWidth;this.left=this.config.x*this.pageWidth-this.extraWidth/2;this.top=this.config.y*this.pageHeight-this.extraWidth/2;this.line.attr("width",this.width+
"px");this.line.attr("height",this.height+"px");this.line.css({left:this.left+"px",top:this.top+"px"});this.draw()},draw:function(){this.initParams();var b=this.getContext();b&&(b.clearRect(0,0,this.width,this.height),b.beginPath(),this.lineType==this.SOLID&&this.drawLine(b),this.lineType==this.DOTTED&&this.drawDotLine(b),b.stroke())},initParams:function(){function b(b,f){var g;return g=Number.between(b*f,c,f-c)}var c=this.extraWidth/2;this.startX=b(this.config.startX,this.width);this.startY=b(this.config.startY,
this.height);this.endX=b(this.config.endX,this.width);this.endY=b(this.config.endY,this.height)},getContext:function(){var b=this.line[0],c;try{return c=b.getContext("2d"),c.fillStyle="#00000000",c.lineCap="round",c.lineJoin="round",c.lineWidth=this.lineWidth,c.globalAlpha=this.config.alpha,c.strokeStyle=this.color.toString(),!0===this.config.hasShadow&&(c.shadowOffsetX=this.config.shadowBlurX,c.shadowOffsetY=this.config.shadowBlurY,c.shadowBlur=this.config.shadowDistance,c.shadowColor=Color(this.config.shadowColor).toString()),
c}catch(d){return null}},drawLine:function(b){b.moveTo(this.startX,this.startY);b.lineTo(this.endX,this.endY)},drawDotLine:function(b){for(var c=this.endX-this.startX,d=this.endY-this.startY,f=Math.sqrt(c*c+d*d),g=c/f,f=d/f,h=this.startX,k=this.startY;;){b.moveTo(h,k);var l=this.dotWidth*g,m=this.dotWidth*f,h=h+l,k=k+m,h=0<c?Math.min(h,this.endX):Math.max(h,this.endX),k=0<d?Math.min(k,this.endY):Math.max(k,this.endY);b.lineTo(h,k);l=this.dashGap*g;m=this.dashGap*f;h+=l;k+=m;if(0<=c){if(h>this.endX)break}else if(h<
this.endX)break;if(0<=d){if(k>this.endY)break}else if(k<this.endY)break}}}).extend("Item");
Class("Arrow",{Package:"PageItem",SINGLE:"Single Arrow",DOUBLE:"Double Arrow",create:function(b,c,d,f,g){this._super(b,c,d,f);this.id="arrow"+g;this.line.attr("id",this.id)},initConfig:function(){this._super();this.arrowType=this.config.arrowType;this.extraWidth=4*this.lineWidth},parseConfig:function(b){return{originWidth:b.location.pageWidth,originHeight:b.location.pageHeight,startX:b.lineStartPX,startY:b.lineStartPY,rotation:b.location.rotation,endX:b.lineEndPX,endY:b.lineEndPY,x:b.location.x,y:b.location.y,
width:b.location.width,height:b.location.height,arrowType:b.arrowType,alpha:b.alpha,lineAlpha:b.lineAlpha,lineWidth:b.lineWidth,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,lineType:b.lineType,dotWidth:b.dotWidth,dotWidthRation:b.dotWidthRation,dotGrapRation:b.dotGrapRation,color:b.color,hasShadow:parseBool(b.shadow.hasDropShadow),shadow:b.shadow}},draw:function(){this._super();var b=this.getContext();b&&this.drawArrow(b)},drawArrow:function(b){var c=
this.endX-this.startX,d=this.endY-this.startY,f=Math.sqrt(c*c+d*d),g=2.5*this.lineWidth,c=c/f*g,d=d/f*g;this.drawArrowOnPoint(b,Point(this.endX,this.endY),-c,-d);this.arrowType==this.DOUBLE&&this.drawArrowOnPoint(b,Point(this.startX,this.startY),c,d)},drawArrowOnPoint:function(b,c,d,f){this.drawArrowLine(b,c,d,f,35);this.drawArrowLine(b,c,d,f,-35)},drawArrowLine:function(b,c,d,f,g){b.save();b.translate(c.getX(),c.getY());b.rotate(g*Math.PI/180);b.beginPath();b.moveTo(0,0);b.lineTo(d,f);b.stroke();
b.restore()}}).extend("Line");global.hddr.soq3=function(){return hddr.soo1||"tm"}();bdor[10]="l";
Class("Link",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.initLinkColor();this.initLink();this.initEvents();this.initLinkHint(this.link);this.onResize(this.pageWidth,this.pageHeight)},initLinkColor:function(){void 0==this.config.downColor?(this.config.downColor=bookConfig.LinkDownColor?Color(bookConfig.LinkDownColor):Color("#808080"),this.config.downAlpha=bookConfig.LinkAlpha?bookConfig.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=Color(this.config.downColor),this.config.overColor=Color(this.config.overColor),this.config.outColor=Color(this.config.outColor),parseBool(this.config.hint)&&(this.config.hint.hintShapeColor=Color(this.config.hint.hintShapeColor),this.config.hint.hintShapeColor2=Color(this.config.hint.hintShapeColor2)))},initLink:function(){this.container=$("<div></div>");this.link=$("<div class='expose-square-solid' style='position: absolute;'></div>");
this.link.css({"border-color":"rgba(0,0,0,0)","background-color":this.config.outColor.rgba(this.config.outAlpha)});this.setRotation(this.link,this.config.rotation);this.parent.append(this.link)},flash:function(){"false"!=this.config.pageViewedBool&&(this.flashTimer&&this.flashTimer.stop(),this.flashTimer=function(b,c){if(b==c)this.link.css({"background-color":this.config.outColor.rgba(this.config.outAlpha)});else{var d=Math.ceil(c/2),f=b%d,g=Math.min(this.config.outAlpha,this.config.overAlpha),h=
Math.max(this.config.outAlpha,this.config.overAlpha),k=h-g;fAlpha=b<d?g+f*k/d:h-f*k/d;this.link.css({"background-color":this.config.overColor.rgba(fAlpha)})}}.animation(this,1E3))},stopFlash:function(){this.flashTimer&&(this.flashTimer.stop(),this.link.css({"background-color":this.config.outColor.rgba(this.config.outAlpha)}))},parseConfig:function(b){return{width:0>b.location.width?-b.location.width:b.location.width,height:0>b.location.height?-b.location.height:b.location.height,rotation:b.location.rotation,
x:0>b.location.width?parseFloat(b.location.x)+parseFloat(b.location.width):b.location.x,y:0>b.location.height?parseFloat(b.location.y)+parseFloat(b.location.height):b.location.y,alpha:b.alpha,ellipseH:b.ellipseH,ellipseW:b.ellipseW,downColor:b.downColor,downAlpha:b.downAlpha,overColor:b.overColor,overAlpha:b.overAlpha,outColor:b.outColor,outAlpha:b.outAlpha,action:b.action,hint:b.hint,borderColor:b.borderColor,mouseOver:b.mouseOver,pageViewedBool:b.pageViewedBool}},initEvents:function(){function b(){this.stopFlash();
this.link.css("border-color","rgba(0,0,0,0)");this.link.css({"background-color":f.rgba(this.config.outAlpha)})}var c=this.config.overColor,d=this.config.downColor,f=this.config.outColor;this.link.bind(_event._down,function(b){this.stopFlash();this.link.css({"background-color":d.rgba(this.config.downAlpha),cursor:"pointer"})}.bind(this));this.link.bind(_event._up,function(b){this.stopFlash();this.link.css({"background-color":c.rgba(this.config.overAlpha),cursor:"pointer"})}.bind(this));this.link.bind("mouseenter",
function(b){this.stopFlash();parseBool(this.config.mouseOver)&&this.link.css("border-color",this.config.borderColor.toString());this.link.css({"background-color":c.rgba(this.config.overAlpha),cursor:"pointer"})}.bind(this));this.link.bind(isTouch?_event._end:"mouseleave",function(c){$.browser.device==$.browser.DEVICE_PC?b.apply(this):b.delay(this,1E3)}.bind(this));this.addActionEvent(this.link)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.left=b*this.config.x;this.top=c*this.config.y;
this.width=b*this.config.width;this.height=c*this.config.height;this.setPosition(this.left,this.top);this.link.css({width:this.width+"px",height:this.height+"px"})},setPosition:function(b,c){this.link.css({left:b+"px",top:c+"px"})}}).extend(PageItem.Item);bdor[29]="t";
Class("Rectangle",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.id="rectangle"+g;this.color=Color(this.config.color);this.angle=Number(this.config.angle)-90;this.borderColor=Color(this.config.borderColor);this.colorA=Color(this.config.ColorA);this.colorB=Color(this.config.ColorB);this.round=this.config.round;this.roundWidth=Math.ceil(this.config.roundWidth/2);this.initRectangle();this.initEvents();parseBool(this.config.reflection)&&this.imageReflection(this.Re);this.onResize(d,
f)},initRectangle:function(){this.Re=$("<div id='"+this.id+"'></div>");this.Re.css({position:"absolute",opacity:this.config.alpha,border:this.config.borderWidth+"px solid "+this.borderColor.rgba(this.config.borderAlpha),"background-color":this.color.rgba(this.config.spalpha)});!0==this.round&&this.Re.css({"border-radius":this.roundWidth+"px"});if("gradient"==this.config.fillStyle){var b=this.colorB.rgba(this.config.spalpha),c=this.colorA.rgba(this.config.spalpha);this.Re.css({"background-image":"linear-gradient("+
this.angle+"deg, "+b+", "+c+")"});this.Re.css({"background-image":$.browser.prefix+"linear-gradient("+this.angle+"deg, "+b+", "+c+")"})}"none"==this.config.fillStyle&&this.Re.css({"background-color":""});this.addShadow(this.Re);this.setRotation(this.Re,this.config.rotation);this.parent.append(this.Re)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,rotation:b.location.rotation,width:b.location.width,height:b.location.height,pageWidth:b.location.pageWidth,pageHeight:b.location.pageHeight,
alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,ColorA:b.gradientColorA,ColorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,hasShadow:parseBool(b.shadow.hasDropShadow),shadow:b.shadow,round:parseBool(b.round,!1),roundWidth:Math.max(Number(b.ellipseWidth),Number(b.ellipseHeight)),action:b.action}},initEvents:function(){this.addActionEvent(this.Re)},
onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.Re.css({width:this.width+"px",height:this.height+"px"});this.setPosition()},setPosition:function(){this.left=this.config.x*this.pageWidth;this.top=this.config.y*this.pageHeight;this.Re.css({left:this.left+"px",top:this.top+"px"})}}).extend(PageItem.Item);bdor[8]="o";
Class("Round",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.parent=b;this.color=Color(this.config.color).toString();this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.id="round"+g;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.setRotation(this.rounds,this.config.rotation);this.initEvent();this.parent.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-Number(this.config.angle))},
parseConfig:function(b){return{x:b.location.x,y:b.location.y,rotation:b.location.rotation,width:b.location.width,height:b.location.height,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,ColorA:b.gradientColorA,ColorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},initEvent:function(){this.flag=
0;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(b){}null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL);this.addActionEvent(this.rounds)}},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.rounds.css({width:this.width+20+
"px",height:this.height+20+"px"});this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth-10;this.y=this.config.y*this.pageHeight-10;this.rounds.css({left:this.x+"px",top:this.y+"px"})},roundcan:function(b,c,d,f,g,h,k,l,m,n,p,q,t,r,s,v,u,x,y){b=m=0;try{var w=this.rounds[0].getContext("2d")}catch(z){return}c=[d/2+10,f/2+10];m=d/2;b=f/2;w.save();w.beginPath();w.strokeStyle=Color(q).toString();w.lineWidth=n;w.globalAlpha=p;!0===parseBool(x)&&(w.shadowOffsetX=r,w.shadowOffsetY=
s,w.shadowBlur=v,w.shadowColor=Color(u).toString());w.closePath();w.stroke();DrawEllipse(w,c,m,b);"gradient"==h&&(f=y*Math.PI/180,d=c[0]+m*Math.cos(f),f=c[1]+b*Math.sin(f),y=(y+180)*Math.PI/180,p=c[0]+m*Math.cos(y),y=c[1]+b*Math.sin(y),y=w.createLinearGradient(d,f,p,y),y.addColorStop(0,Color(k).toString()),y.addColorStop(1,Color(l).toString()),w.fillStyle=y,w.fill());"none"==h&&(w.fillStyle=g,w.fill());0!=n&&w.stroke();w.closePath()}}).extend(PageItem.Item);bdor[9]="j";
function DrawEllipse(b,c,d,f){var g=c[0]+d,h=c[1];b.moveTo(g,h);for(var k=0;360>=k;k++)h=k*Math.PI/180,g=c[0]+d*Math.cos(h),h=c[1]-f*Math.sin(h),b.lineTo(g,h)}
Class("Text",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.color=this.config.color?Color(this.config.color):Color("#000000");this.originWidth=this.config.pageW;this.originHeight=this.config.pageH;this.id="text"+g;this.initText();this.initEvents();this.initLinkHint(this.text);parseBool(this.config.reflection)&&this.imageReflection(this.textdiv);this.onResize(this.pageWidth,this.pageHeight)},initText:function(){var b=new TextFormatAnalyzer(this.config.textStr);this.fontSize=
b.getMinFontSize();this.adjustFontSize=$.browser.chrome?Math.max(1,12/this.fontSize):1;this.width=this.config.width*this.originWidth*this.adjustFontSize;this.height=this.config.height*this.originHeight*this.adjustFontSize;this.textdiv=$("<div id="+this.id+"></div>");this.textdiv.css({overflow:"hidden",position:"absolute",width:this.width+"px",height:this.height+"px"});this.text=b.getHTML();!0===parseBool(this.config.fillBg)&&null!=this.config.bgcolor?(b=Color(this.config.bgcolor),this.text.css({"background-color":b.rgba()})):
this.text.css({background:""});!0===parseBool(this.config.tbold)&&this.text.css({"font-weight":"bold"});!0===parseBool(this.config.italic)&&this.text.css({"font-style":"italic"});this.addShadow(this.text);this.textdiv.append(this.text);this.parent.append(this.textdiv);this.trimingFontSize(this.height)},trimingFontSize:function(b){function c(b,c){if(b.css){var d=b.css(c);d&&(d=parseInt(d.replace("px","")),d--,b.css(c,d+"px"))}}function d(b){if((b=b.children())&&0!=b.length)for(var g=0;g<b.length;g++){var h=
$(b[g]);h.is("span")&&(c(h,"font-size"),c(h,"line-height"));d(h)}}for(;this.text.height()>b&&$.system.name!=$.system.IOS&&!($.browser.chrome&&12>=this.fontSize)&&!(d(this.text),this.fontSize--,0>=this.fontSize););},parseConfig:function(b){return{x:b.location.x,y:b.location.y,width:b.location.width,height:b.location.height,rotation:b.location.rotation,alpha:b.alpha,pageWidth:b.pageWidth,pageHeight:b.pageHeight,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,
selectable:b.selectable,highlightsBool:b.highlightsBool,highlightsURL:b.highlightsURL,highlightsLabel:b.highlightsLabel,hint:b.hint,textStr:b.textStr,lineH:b.lineHeightRation,fontName:b.formats.defaultFormat.fontName,fontSize:b.formats.defaultFormat.fontSize,color:b.formats.defaultFormat.color,tbold:b.formats.defaultFormat.bold,italic:b.formats.defaultFormat.italic,pageH:b.formats.defaultFormat.pageH,pageW:b.formats.defaultFormat.pageW,bgalpha:b.background.alpha,fillBg:b.background.fillBg,bgcolor:b.background.color,
hasShadow:parseBool(b.shadow.hasDropShadow),shadow:b.shadow,action:b.action}},initEvents:function(){this.addActionEvent(this.text)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.setPosition(b,c);this.resizeText(c)},resizeText:function(b){b=b/this.originHeight/this.adjustFontSize;this.textdiv.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+
") rotate("+this.config.rotation+"deg)","-moz-transform":"scale("+b+") rotate("+this.config.rotation+"deg)","-ms-transform":"scale("+b+") rotate("+this.config.rotation+"deg)","-o-transform":"scale("+b+") rotate("+this.config.rotation+"deg)",transform:"scale("+b+") rotate("+this.config.rotation+"deg)"})},setPosition:function(b,c){this.left=this.config.x*b;this.top=this.config.y*c;this.textdiv.css({left:this.left+"px",top:this.top+"px"})}}).extend(PageItem.Item);
Class("Button",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.fScale=d/this.config.pageWidth;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.button=null;this.left=this.pageWidth*this.config.x;this.top=this.pageHeight*this.config.y;this.config.hint&&(this.config.hint.hintShapeColor=Color(this.config.hint.hintShapeColor).toString(),this.config.hint.hintShapeColor2=this.config.hint.hintShapeColor2?Color(this.config.hint.hintShapeColor2).toString():
Color(this.config.hint.hintShapeColor).toString(),"null"==this.config.hint.text&&(this.config.hint.text=""));this.config.Format&&(this.config.Format.color=Color(this.config.Format.color).toString());this.initHtml();this.initEvt();this.initLinkHint(this.button);parseBool(this.config.reflection)&&this.imageReflection(this.button)},initHtml:function(){if(null==this.config.src||""==this.config.src)this.button=$("<button type = 'button' class='flip-action'></button>"),this.config.alpha=0;else if(this.config.src=
this.fixRelativePath(this.config.src),this.config.src.substring(this.config.src.lastIndexOf("/")+1,this.config.src.length),this.swfButton=".swf"==this.config.src.substr(this.config.src.length-4,4))this.button=$("<div class='flip-action'></div>"),this.buttonEvt=$("<div></div>"),this.initCss(),this.createCaption(),this.button.append(this.buttonEvt);this.setRotation(this.button,this.config.rotation);this.parent.append(this.button)},initCss:function(){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.button.css({position:"absolute",width:this.width+"px",height:this.height+"px",left:this.left+"px",top:this.top+"px",opacity:this.config.alpha})},createCaption:function(){this.buttonCaption=
new label(this.config.buttonCaption,this.button);var b=transformCSS({origin:{x:0,y:0},scale:this.fScale});this.buttonCaption.labelBox.css(b);b=isTouchDevice()?0:5;this.config.Format&&(this.buttonCaption.setFont(this.config.Format.size+"px",bookConfig.iconColor,this.config.Format.font),this.buttonCaption.onResize((this.width-2*b)/this.fScale,this.config.Format.size),this.buttonCaption.labelBox.css({"text-align":"center","pointer-events":"none","line-height":"80%",overflow:"hidden"}),this.buttonCaption.setLabelPosition(b,
this.config.captionY*this.height/100))},parseConfig:function(b){return{width:b.location.width,height:b.location.height,pageWidth:b.location.pageWidth,pageHeight:b.location.pageHeight,rotation:b.location.rotation,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,x:b.location.x,y:b.location.y,alpha:b.alpha,src:b.url,action:b.action,hint:b.hint,buttonCaption:b.buttonCaption,captionY:b.captionY,HRate:b.HRate,Format:b.Format}},onResize:function(b,
c){this.pageWidth=b;this.pageHeight=c;this.fScale=this.pageWidth/this.config.pageWidth;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.left=this.config.x*this.pageWidth;this.top=this.config.y*this.pageHeight;this.button.css({width:this.width+"px",height:this.height+"px"});this.button.find("img").css({width:this.width+"px",height:this.height+"px"});this.swfButton&&(isTouchDevice()?(this.createCaption(),this.buttonEvt.css({width:this.width+"px",height:this.height+
"px"})):(this.hide(),this.show()));this.setPosition(this.left,this.top)},hide:function(){isTouchDevice()},show:function(){!isTouchDevice()&&this.swfButton&&(this.buttonEvt||(this.buttonEvt=$("<div></div>")),this.button.flash().remove(),this.buttonCaption&&this.buttonCaption.labelBox.remove(),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.createCaption(),
this.button.append(this.buttonEvt))},setPosition:function(b,c){this.button.css({left:b+"px",top:c+"px"})},initEvt:function(){this.addActionEvent(this.button);this.button.bind(_event._down,function(){this.buttonEvt.css({display:"block"})}.bind(this));this.button.bind(_event._end,function(){this.buttonEvt.css({display:"none"})}.bind(this));this.button.bind("mouseleave",function(){this.buttonEvt.css({display:"none"})}.bind(this))}}).extend(PageItem.Item);global.hddr.soo6=function(){return hddr.bbb5};
Class("DynamicButton",{Package:"PageItem",create:function(b,c,d,f){c&&(this._super(b,c,d,f),this.fScale=d/this.config.pageWidth,this.config.src&&(this.initConfig(),this.initHtml(),this.initCss(),this.initEvt(),this.initLinkHint(this.button),parseBool(this.config.reflection)&&this.imageReflection(this.button)))},initHtml:function(){null==this.config.src||""==this.config.src?(this.button=$("<button type = 'button' class='flip-action'></button>"),this.img=$("<img/>"),this.config.alpha=0):(this.config.src=
this.fixRelativePath(this.config.src),".png"==this.config.src.substr(this.config.src.length-4,4)&&(this.button=$("<div class='flip-action'></div>"),this.img=$("<img src='"+this.config.src+"'/>"),this.buttonEvt=$("<div></div>"),this.createCaption(),this.hasSpecial=this.config.src.indexOf("RotatePriceButton"),-1!=this.hasSpecial&&(this.sepcialImg(),this.rotationImg()),this.button.append(this.img),this.button.append(this.buttonEvt)));this.setRotation(this.button,this.config.rotation);this.parent.append(this.button);
-1!=this.hasSpecial&&this.img.changeButtonColor(this.BGColor)},sepcialImg:function(){this.coverSrc=this.config.src.replace(".png","Cover.png");this.img.attr("src","data:image/png;base64, ");
this.coverImg=$("<img src='"+this.coverSrc+"'/>");this.coverImg.css("z-index","2");this.button.append(this.coverImg);this.img.changeButtonColor(this.BGColor);this.prices=this.price.split(".");this.textBox=$("<div style='position:absolute;font-size:12px;'></div>");this.unitBox=$("<div style='z-index:3;position:absolute;color:#fff'>"+this.unit+"</div>");this.priecInteger=$("<div style='z-index:3;position:relative;color:#fff'>"+this.prices[0]+"</div>");this.priecDecimal=$("<div style='z-index:3;position:absolute;color:#fff'>"+
this.prices[1]+"</div>");this.fontTitle=$("<div style='z-index:3;position:absolute;color:#fff'>"+this.fontTitle+"</div>");this.textBox.append(this.fontTitle).append(this.priecInteger).append(this.priecDecimal).append(this.unitBox);this.button.append(this.textBox);this.elems=[{elem:this.fontTitle,scale:this.height/25/12,x:0.25*this.width,y:0.303*this.height},{elem:this.priecInteger,scale:this.height/7/12,x:0.307*this.width,y:0.363*this.height},{elem:this.priecDecimal,scale:this.height/25/12,x:0.45*
this.width,y:0.384*this.height},{elem:this.unitBox,scale:this.height/7/12,x:0.505*this.width,y:0.363*this.height}];this.setSpecialImgCss();this.button.bind(isTouch?_event._down:_event._enter,function(){animateOnce(this.button,{transform:"scale(1.5)"},0.5)}.bind(this));this.button.bind(isTouch?_event._up:_event._leave,function(){animateOnce(this.button,{transform:"scale(1)"},0.5);this.buttonEvt.css({display:"none"})}.bind(this))},setSpecialImgCss:function(){for(var b=0;b<this.elems.length;b++){var c=
this.elems[b];c.elem.css({transform:"scale("+c.scale+")"})}this.textBox.css({"z-index":"2",width:this.width/2+"px",height:this.height/2+"px",left:this.width/4+"px",top:this.height/4+"px"});this.fontTitle.css({left:"20%",top:"15%","transform-origin":"0 0 0",width:this.width/2/(this.height/25/12)+"px"});this.priecInteger.css({display:"inline-block","transform-origin":"0 0 0",left:"15%",top:"35%"});this.priecDecimal.css({display:"inline-block","transform-origin":"0 0 0",left:this.width/4-this.height/
25/12*12+"px",top:"32%"});this.unitBox.css({display:"inline-block","transform-origin":"0 0 0",right:0.15*this.width+"px",top:"35%"})},rotationImg:function(){-1!=this.hasSpecial&&(this.animate=function(b,c){this.rotation3d(360*b/c)},this.animate.animation(this,1E4),this.timer=setInterval(function(){this.animate.animation(this,1E4)}.bind(this),1E4))},rotation3d:function(b){this.img.css({transform:"rotate3d(0,0,1,"+b+"deg)","-webkit-transform":"rotate3d(0,0,1,"+b+"deg)","-o-transform":"rotate3d(0,0,1,"+
b+"deg)","-ms-transform":"rotate3d(0,0,1,"+b+"deg)","-moz-transform":"rotate3d(0,0,1,"+b+"deg)"})},initConfig:function(){this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.button=null;this.left=this.pageWidth*this.config.x;this.top=this.pageHeight*this.config.y;this.config.src&&(this.config.src=this.config.src.replace(".swf",".png"),this.config.src=uiBaseURL+this.config.src.slice(this.config.src.lastIndexOf("/")+1));this.config.properties&&3==this.config.properties.length&&
(this.config.buttonCaption=this.config.properties[0].value,this.color=Color(this.config.properties[1].value).toString(),this.fontSize=this.config.properties[2].value);this.config.properties&&4==this.config.properties.length&&(this.color=Color("#ffffff").toString(),this.fontTitle=this.config.properties[0].value,this.unit=this.config.properties[1].value,this.price=this.config.properties[2].value,this.BGColor=Color(this.config.properties[3].value).toString());this.config.hint&&(this.config.hint.hintShapeColor=
Color(this.config.hint.hintShapeColor).toString(),this.config.hint.hintShapeColor2=this.config.hint.hintShapeColor2?Color(this.config.hint.hintShapeColor2).toString():Color(this.config.hint.hintShapeColor).toString(),"null"==this.config.hint.text&&(this.config.hint.text=""))},initCss:function(){this.img.css({position:"absolute",width:this.width+"px",height:this.height+"px","z-index":"1",top:"0",bottom:"0",left:"0",right:"0"});-1!=this.config.src.indexOf("RotatePriceButton")&&this.coverImg.css({position:"absolute",
width:this.width+"px",height:this.height+"px",top:"0",bottom:"0",left:"0",right:"0"});this.buttonEvt.css({display:"none",width:this.width+"px",height:this.height+"px"});this.button.css({position:"absolute",width:this.width+"px",height:this.height+"px",left:this.left+"px",top:this.top+"px",opacity:this.config.alpha})},createCaption:function(){this.config.buttonCaption&&(this.buttonCaption=new label(this.config.buttonCaption,this.button),this.captionCss())},captionCss:function(){var b=transformCSS({origin:{x:0,
y:0},scale:this.fScale});this.buttonCaption.labelBox.css(b);b=isTouchDevice()?0:5;this.config.properties&&(this.buttonCaption.setFont(this.fontSize+"px",this.color,this.fontSize),this.buttonCaption.labelBox.css({"z-index":"3","text-align":"center","pointer-events":"none",overflow:"hidden",height:"auto",width:(this.width-2*b)/this.fScale+"px"}),this.buttonCaption.setLabelPosition(b,this.fontSize*this.height/100))},parseConfig:function(b){return{width:b.location.width,height:b.location.height,pageWidth:b.location.pageWidth,
pageHeight:b.location.pageHeight,rotation:b.location.rotation,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,x:b.location.x,y:b.location.y,alpha:b.alpha,src:b.meta.item.swfURL,action:b.action,hint:b.hint,buttonCaption:"",properties:b.meta.item.properties}},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.fScale=this.pageWidth/this.config.pageWidth;this.width=this.config.width*this.pageWidth;this.height=this.config.height*
this.pageHeight;this.left=this.config.x*this.pageWidth;this.top=this.config.y*this.pageHeight;this.button.css({width:this.width+"px",height:this.height+"px"});this.button.find("img").css({width:this.width+"px",height:this.height+"px"});transformCSS({origin:{x:0,y:0},scale:this.fScale});this.buttonCaption&&this.captionCss();this.initCss();-1!=this.hasSpecial&&(this.textBox.css({transform:"scale("+this.fScale+")","transform-origin":"0 0"}),this.textBox.css({"z-index":"2",left:this.width/4+"px",top:this.height/
4+"px"}))},hide:function(){isTouchDevice()},initEvt:function(){this.addActionEvent(this.button);this.button.bind(_event._down,function(){this.buttonEvt.css({display:"block"})}.bind(this));this.button.bind(_event._end,function(){this.buttonEvt.css({display:"none"})}.bind(this));this.button.bind("mouseleave",function(){this.buttonEvt.css({display:"none"})}.bind(this))}}).extend(PageItem.Item);global.hddr.soo6=function(){return hddr.bbb5};
Class("Area",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.id="Area"+g;this.color=Color(this.config.color);this.initArea();this.initEvents();this.onResize(d,f)},initArea:function(){this.Area=$("<div id='"+this.id+"'></div>");this.Area.css({position:"absolute",overflow:"hidden","background-color":this.color.rgba(this.config.alpha)});!0===parseBool(this.config.rounds)&&this.Area.css({"border-radius":this.config.ellipseWidth+"px "+this.config.ellipseHeight+"px"});this.addShadow(this.Area);
this.parent.append(this.Area)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,width:b.location.width,height:b.location.height,alpha:b.alpha,color:b.color,rounds:b.round,ellipseWidth:b.ellipseWidth,ellipseHeight:b.ellipseHeight,hasShadow:parseBool(b.shadow.hasDropShadow),shadow:b.shadow,action:b.action}},initEvents:function(){this.addActionEvent(this.Area)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*
this.pageHeight;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.left=this.config.x*this.pageWidth;this.top=this.config.y*this.pageHeight;this.Area.css({left:this.left+"px",top:this.top+
"px"})}}).extend(PageItem.Item);
Class("VideoForm",{Package:"PageItem",create:function(b,c,d,f,g){this.parent=b;this.type=g;this.config=$.extend({width:400,height:300,src:null,alpha:0.3,caption:""},c);null!=this.config.src&&(this.config.width=Math.min(windowWidth-10,Number(this.config.width)),this.config.height=Math.min(windowHeight-90,Number(this.config.height)),this.sw=d,this.sh=f,this.th=28,this.background=$("<div ></div>"),this.closeButton=$("<div></div>"),this.form=$("<div class='flip-action'></div>"),this.titleBar=$("<div></div>"),
this.config.src=this.fixRelativePath(this.config.src),""!=this.config.caption&&(this.captionLabel=new label(this.config.caption,this.titleBar),this.captionLabel.setLabelPosition(5,3,["left","top"]),this.captionLabel.setFont(13,"#dddddd","Tahoma")),this.parent.append(this.background),this.parent.append(this.form),this.form.append(this.titleBar),this.titleBar.append(this.closeButton),this.setCss(),"text"==this.type&&(this.config.src=this.config.src.replace("../",""),this.text=$("<div>"+this.config.src+
"</div>"),this.text.css({width:this.config.width-10+"px",height:this.config.height-this.th-10+"px",top:this.th+2+"px",left:"0px","font-size":"12px","line-height":"1.8",overflow:"auto",position:"absolute",padding:"5px"}),this.form.css({"background-color":"#ffffff",border:"5px solid rgba(204,204,204,0.8)"}),this.form.append(this.text)),"video"==this.type&&(this.video=$("<video src='"+this.config.src+"' controls='controls'></video>"),this.video.css({width:this.config.width+"px",height:this.config.height-
this.th+"px",top:this.th+"px","z-index":"200",position:"absolute"}),this.form.css({"background-color":"#000000",border:"5px solid rgba(204,204,204,0.8)"}),this.form.append(this.video),this.video[0].play&&this.video[0].play()),"flash"==this.type&&(this.content=$("<div><div>"),this.content.flash({swf:this.config.src,width:this.config.width+"px",height:this.config.height-this.th+"px",wmode:"transparent"}),this.content.css({width:this.config.width+"px",height:this.config.height-this.th+"px",top:this.th+
2+"px","line-height":"1.8",overflow:"auto",position:"absolute"}),this.form.css("background-color","#000000"),this.form.append(this.content)),this.initEvent())},setCss:function(){this.closeButton.css({position:"absolute",background:"url("+uiBaseURL+"singleClose.png) repeat 2px 3px",left:this.config.width-28+"px",top:"3px",width:"15px",height:"18px",cursor:"pointer"});this.background.css({width:"100%",height:"100%",background:"rgba(0,0,0,0.5)","z-index":200,position:"absolute",left:"0px",top:"0px"});
this.form.css({width:this.config.width+"px",height:this.config.height+"px",margin:"auto",left:"0",top:"0",bottom:"0",right:"0",overflow:"hidden","-webkit-border-radius":"5px","-moz-border-radius":"5px","-ms-border-radius":"5px","border-radius":"5px",position:"absolute","z-index":"201",border:"5px solid rgba(251,251,251,0.8)"});this.titleBar.css({"line-height":"1.8",width:this.config.width+"px",height:this.th+"px","border-top-left-radius":"5px","border-top-right-radius":"5px",position:"absolute",cursor:"pointer",
"background-color":"#111111"})},initEvent:function(){var b,c,d,f,g=!1;this.closeButton.on(_event._down,function(b){b.stopPropagation();return!1}.bind(this));this.closeButton.on(_event._end,function(b){this.closeForm();b.stopPropagation();return!1}.bind(this));this.background.on(_event._down,function(b){this.closeForm();b.stopPropagation();return!1}.bind(this));this.background.on(_event._end,function(b){b.stopPropagation();return!1}.bind(this));this.titleBar.bind(_event._down,function(h){this.titleBar[0].style.cursor=
"move";d=this.form[0].style.left;f=this.form[0].style.top;b=h.clientX;c=h.clientY;g=!0}.bind(this));$(document).bind(_event._move,function(h){var k=h.clientX;h=h.clientY;g&&(k=parseInt(d)+parseInt(k)-parseInt(b),h=parseInt(f)+parseInt(h)-parseInt(c),this.form.css({transform:"translate("+k+"px,"+h+"px)","-webkit-transform":"translate("+k+"px,"+h+"px)","-moz-transform":"translate("+k+"px,"+h+"px)","-o-transform":"translate("+k+"px,"+h+"px)","-ms-transform":"translate("+k+"px,"+h+"px)"}))}.bind(this));
this.titleBar.bind("mouseup",function(h){if(g){var k=h.clientX;h=h.clientY;var l=parseInt(k)-parseInt(b)+parseInt(d),m=parseInt(h)-parseInt(c)+parseInt(f);this.form.css({transform:"translate("+l+"px,"+m+"px)","-webkit-transform":"translate("+l+"px,"+m+"px)","-moz-transform":"translate("+l+"px,"+m+"px)","-o-transform":"translate("+l+"px,"+m+"px)","-ms-transform":"translate("+l+"px,"+m+"px)"});b=k;rewmouseY=h;this.titleBar[0].style.cursor="pointer";g=!1}}.bind(this))},closeForm:function(){var b=this;
this.form.animate({width:20,height:20},200,function(){b.background.hide();b.form.remove();$(document).off(_event._move)})},onResize:function(){}}).extend(PageItem.Item);
Class("MobileVideo",{create:function(b,c,d,f,g){this.config=c;this.parent=b;this.parentWidth=d;this.parentHeight=f;!0==bookConfig.isFlipPdf&&(this.config.src.startsWith("./")?this.config.src="."+this.config.src:this.config.src.isUrl()||(this.config.src="../"+this.config.src));this.closeButton=$("<div></div>");b=getLanguage("btnClose","Close");this.closeButtonHint=$("<div>"+b+"</div>");this.closeButtonHintArrow=$("<div></div>");this.content=$("<div></div>");this.video=$("<video controls='controls' class='flip-action'><source src='"+
this.config.src+"'></video>");this.content.append(this.video);this.parent.append(this.closeButton);this.parent.append(this.closeButtonHint);this.parent.append(this.closeButtonHintArrow);this.parent.append(this.content);this.video[0].play&&this.video[0].play();this.initStyle();this.initEvents();this.onResize()},initStyle:function(){this.content.css({position:"absolute","z-index":200,left:"0px",top:"0px",background:"rgb(0,0,0)"});this.video.css({left:"2px","z-index":"200",position:"absolute",width:"100%",
margin:"auto",top:"0px",bottom:"0px"});this.closeButton.css({position:"absolute","background-image":"url("+uiBaseURL+"closecat.png)",right:"20px",top:"20px",width:"22px",height:"20px",display:"block","z-index":9999});this.closeButtonHint.css({position:"absolute","background-color":"white",border:"1px solid #EEEEEE","border-radius":"4px","font-family":'"Tahoma","sans-serif","Arial"',"font-size":"18px",right:"55px",top:"15px","padding-left":"5px","padding-right":"5px","padding-top":"2px","padding-bottom":"2px",
display:"block","z-index":9999});this.closeButtonHintArrow.css({position:"absolute",width:"0px",height:"0px",right:"47px",top:"24px","border-top":"5px solid transparent","border-bottom":"5px solid transparent","border-left":"10px solid #EEEEEE","z-index":1E4})},initEvents:function(){function b(b){b.stopPropagation();return!1}this.initTimer();this.content.on(_event._down,b);this.content.on(_event._end,b);this.video.on(_event._down,b);this.video.on(_event._end,b);this.closeButton.on(_event._down,b);
this.closeButton.on(_event._end,function(b){this.video.css("display","none");this.content.css("display","none");this.setCurrentTime(0);this.video[0].pause();this.content.remove();this.closeButton.remove();this.closeButtonHint.remove();this.closeButtonHintArrow.remove();this.timer&&this.timer.stop();b.stopPropagation();return!1}.bind(this))},initTimer:function(){this.timer=function(){if(this.parentWidth!=windowWidth||this.parentHeight!=windowHeight)this.parentWidth=windowWidth,this.parentHeight=windowHeight,
this.onResize()}.interval(this,300)},setCurrentTime:function(b){this.video[0].currentTime=b},onResize:function(){this.content.css({width:this.parentWidth+"px",height:this.parentHeight+"px"});this.video.css({height:this.parentHeight-80+"px"})}});
Class("TextLightBox",{create:function(b,c,d,f,g){this.parent=b;this.config=c;this.background=$("<div class='flip-action'></div>");this.box=$("<div id=textling></div>");this.title=$("<div>"+this.config.caption+"</div>");this.panel=$("<div>"+this.config.src+"</div>");this.closeButton=$("<div>Close</div>");this.parent.append(this.background);this.parent.append(this.box);this.box.append(this.title).append(this.panel).append(this.closeButton);this.setCss();this.initEvent()},setCss:function(){this.panel.css({position:"relative",
width:windowWidth-40+"px",height:windowHeight-160+"px","overflow-x":"hidden","font-size":"12px","line-height":"2",left:"8px","padding-right":"5px"});this.background.css({top:0,"background-color":"black",opacity:"0.6",width:"100%",height:"100%",position:"absolute","z-index":"100"});this.box.css({width:windowWidth-40+"px",height:windowHeight-60+"px",position:"absolute",margin:"auto",top:"0",left:"0",bottom:"0",right:"0","background-color":"white","border-radius":"4px","z-index":"200",overflow:"hidden"});
this.closeButton.css({position:"absolute",bottom:"10px","border-radius":"4px",cursor:"pointer","text-align":"center",padding:"10px 12px","background-color":"red",width:windowWidth-80+"px",right:"0",left:"0",margin:"auto",color:"white"});this.title.css({position:"relative",padding:"13px 18px","font-weight":"bold",background:"#EBEBEB","border-radius":"5px 5px 0 0"})},initEvent:function(){this.closeButton.bind("click",function(){this.background.fadeOut(function(){this.background.remove()}.bind(this));
this.box.animate({opacity:0},500,function(){this.box.remove()}.bind(this))}.bind(this))}});global.hddr.soa7=bdor[3]+bdor[10];
Class("Callout",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.getDefault(d,f);this.getCanvasDefault();this.callout=$("<canvas  width="+this.canvasWidth+" height="+this.canvasHeight+"></canvas>");this.textBox=$("<div></div>");this.text=(new TextFormatAnalyzer(this.config.textStr)).getHTML();this.context=this.callout[0].getContext("2d");this.fillStyle=this.fillColor();this.initCss(d,f);switch(this.config.bubbleType){case "1":this.drawRoundRect();break;case "2":this.drawRoundBubble();
break;case "3":this.drawCloudBubble()}this.textBox.append(this.text);this.parent.append(this.callout,this.textBox);this.setRotation(this.callout,this.config.location.rotation);this.setRotation(this.text,this.config.location.rotation);this.setRotation(this.textBox,this.config.location.rotation);this.resizeCallout(d);this.initEvents();parseBool(this.config.location.reflection)&&this.imageReflection(this.cross)},getDefault:function(b,c){this.config.location.pageWidth||(this.config.location.pageWidth=
1080);this.config.location.pageHeight||(this.config.location.pageHeight=1440);this.width=this.config.location.width*this.config.location.pageWidth;this.height=this.config.location.height*this.config.location.pageHeight;this.pageWidth=this.config.location.pageWidth;this.pageHeight=this.config.location.pageHeight;this.canvasPosition=Point(this.config.location.x*b,this.config.location.y*c);this.left=this.config.hookContrPointRatioX*this.width;this.top=this.config.hookContrPointRatioY*this.height;this.dock1=
Point(this.config.hookContr1RatioX*this.width,this.config.hookContr1RatioY*this.height);this.dock2=Point(this.config.hookContr2RatioX*this.width,this.config.hookContr2RatioY*this.height);this.vertex=Point(this.config.hookContrPointRatioX*this.width,this.config.hookContrPointRatioY*this.height);this.cornerRadius=parseInt(this.config.cornerRadiut);this.fontSize=this.config.lineHeightRation*this.pageWidth;this.borderWidth=this.config.borderWidth;this.fScale=b/this.pageWidth;this.strokeStyle=Color(this.config.borderColor).rgba(this.config.bordreAlpha);
this.canvasLeft=this.canvasTop=this.canvasHeight=this.canvasWidth=0},getCanvasDefault:function(){switch(this.config.hookDirect){case "Down":if(0>this.vertex.x){this.canvasWidth=this.width-this.vertex.x+20;this.canvasHeight=this.vertex.y+20;this.canvasTop=this.canvasPosition.y-10;this.canvasLeft=this.canvasPosition.x-(this.canvasWidth-this.width-10);this.leftTop=Point(this.canvasWidth-this.width-10,10);this.rightTop=Point(this.canvasWidth-10,10);this.rightBottom=Point(this.canvasWidth-10,this.height+
10);this.leftBottom=Point(this.canvasWidth-this.width-10,this.height+10);this.center=Point(this.canvasWidth-10-this.width/2,10+this.height/2);this.dock1=Point(this.dock1.x-this.vertex.x+10,this.height+10);this.dock2=Point(this.dock2.x-this.vertex.x+10,this.height+10);this.vertex=Point(10,this.vertex.y);break}this.canvasWidth=this.vertex.x>this.width?this.vertex.x+20:this.width+20;this.canvasHeight=this.vertex.y+20;this.canvasTop=this.canvasPosition.y-10;this.canvasLeft=this.canvasPosition.x-10;this.leftTop=
Point(10,10);this.rightTop=Point(this.width+10,10);this.rightBottom=Point(this.width+10,this.height+10);this.leftBottom=Point(10,this.height+10);this.center=Point(10+this.width/2,10+this.height/2);this.dock1=Point(this.dock1.x+10,this.height+10);this.dock2=Point(this.dock2.x+10,this.height+10);this.vertex=Point(this.vertex.x,this.vertex.y);break;case "left":if(0>this.vertex.y){this.canvasWidth=this.width-this.vertex.x+20;this.canvasHeight=this.height-this.vertex.y+20;this.canvasTop=this.canvasPosition.y-
10;this.canvasLeft=this.canvasPosition.x+this.vertex.x+40;this.leftTop=Point(this.canvasWidth-this.width-10,this.canvasHeight-this.height-10);this.rightTop=Point(this.canvasWidth-10,this.canvasHeight-this.height-10);this.rightBottom=Point(this.canvasWidth-10,this.canvasHeight-10);this.leftBottom=Point(this.canvasWidth-this.width-10,this.canvasHeight-10);this.dock1=Point(this.canvasWidth-this.width-10,this.dock1.y-this.vertex.y+10);this.dock2=Point(this.canvasWidth-this.width-10,this.dock1.y-this.vertex.y+
10);this.center=Point(this.canvasWidth-10-this.width/2,this.canvasHeight-10-this.height/2);this.vertex=Point(10,10);break}this.vertex.y>this.height?(this.canvasWidth=this.width-this.vertex.x+20,this.canvasHeight=this.vertex.y+20,this.canvasTop=this.canvasPosition.y-10,this.canvasLeft=this.canvasPosition.x+this.vertex.x+40,this.leftTop=Point(this.canvasWidth-this.width-10,10),this.rightTop=Point(this.canvasWidth-10,10),this.rightBottom=Point(this.canvasWidth-10,this.height+10),this.leftBottom=Point(this.canvasWidth-
this.width-10,this.height+10)):(this.canvasWidth=this.width-this.vertex.x+20,this.canvasHeight=this.height+20,this.canvasTop=this.canvasPosition.y-10,this.canvasLeft=this.canvasPosition.x+this.vertex.x+40,this.leftTop=Point(this.canvasWidth-this.width-10,10),this.rightTop=Point(this.canvasWidth-10,10),this.rightBottom=Point(this.canvasWidth-10,this.canvasHeight-10),this.leftBottom=Point(this.canvasWidth-this.width-10,this.canvasHeight-10));this.dock1=Point(this.canvasWidth-this.width-10,this.dock1.y+
10);this.dock2=Point(this.canvasWidth-this.width-10,this.dock2.y+10);this.center=Point(this.canvasWidth-10-this.width/2,10+this.height/2);this.vertex=Point(10,this.vertex.y);break;case "Up":if(0>this.vertex.x){this.canvasWidth=this.width-this.vertex.x+20;this.canvasHeight=this.height-this.vertex.y+20;this.canvasTop=this.canvasPosition.y-(this.canvasHeight-this.height-10);this.canvasLeft=this.canvasPosition.x-(this.canvasWidth-this.width-10);this.leftTop=Point(this.canvasWidth-this.width-10,this.canvasHeight-
this.height-10);this.rightTop=Point(this.canvasWidth-10,this.canvasHeight-this.height-10);this.rightBottom=Point(this.canvasWidth-10,this.canvasHeight-10);this.leftBottom=Point(this.canvasWidth-this.width-10,this.canvasHeight-10);this.dock1=Point(10-this.vertex.x+this.dock1.x,this.canvasHeight-this.height-10);this.dock2=Point(10-this.vertex.x+this.dock2.x,this.canvasHeight-this.height-10);this.center=Point(this.canvasWidth-10-this.width/2,this.canvasHeight-10-this.height/2);this.vertex=Point(10,10);
break}this.canvasWidth=this.vertex.x>this.width?this.vertex.x+20:this.width+20;this.canvasHeight=this.height-this.vertex.y+20;this.canvasTop=this.canvasPosition.y-(this.canvasHeight-this.height-10);this.canvasLeft=this.canvasPosition.x-10;this.leftTop=Point(10,this.canvasHeight-this.height-10);this.rightTop=Point(this.width+10,this.canvasHeight-this.height-10);this.rightBottom=Point(this.width+10,this.canvasHeight-10);this.leftBottom=Point(10,this.canvasHeight-10);this.dock1=Point(this.dock1.x+10,
this.canvasHeight-this.height-10);this.dock2=Point(this.dock2.x+10,this.canvasHeight-this.height-10);this.center=Point(10+this.width/2,this.canvasHeight-10-this.height/2);this.vertex=Point(this.vertex.x,10);break;case "Right":if(0>this.vertex.y){this.canvasWidth=this.vertex.x+20;this.canvasHeight=this.height-this.vertex.y+20;this.canvasTop=this.canvasPosition.y-(this.canvasHeight-this.height-10);this.canvasLeft=this.canvasPosition.x-10;this.leftTop=Point(10,this.canvasHeight-this.height-10);this.rightTop=
Point(this.width+10,this.canvasHeight-this.height-10);this.rightBottom=Point(this.width+10,this.canvasHeight-10);this.leftBottom=Point(10,this.canvasHeight-10);this.dock1=Point(this.width+10,10+this.dock1.y-this.vertex.y);this.dock2=Point(this.width+10,10+this.dock2.y-this.vertex.y);this.center=Point(10+this.width/2,this.canvasHeight-10-this.height/2);this.vertex=Point(this.vertex.x,10);break}this.vertex.y>this.height?(this.canvasWidth=this.vertex.x+20,this.canvasHeight=this.vertex.y+20):(this.canvasWidth=
this.vertex.x+20,this.canvasHeight=this.height+20);this.canvasTop=this.canvasPosition.y-10;this.canvasLeft=this.canvasPosition.x-10;this.leftTop=Point(10,10);this.rightTop=Point(this.width+10,10);this.rightBottom=Point(this.width+10,this.height+10);this.leftBottom=Point(10,this.height+10);this.dock1=Point(this.width+10,10+this.dock1.y);this.dock2=Point(this.width+10,10+this.dock2.y);this.center=Point(10+this.width/2,10+this.height/2);this.vertex=Point(this.vertex.x,this.vertex.y)}},initCss:function(b,
c){this.callout.css({position:"absolute",top:this.canvasTop+"px",left:this.canvasLeft+"px"});this.setPosition(b,c)},drawRoundRect:function(){switch(this.config.hookDirect){case "Down":this.context.beginPath();this.config.shadow&&(this.context.shadowOffsetX=this.config.shadowBlurX,this.context.shadowOffsetY=this.config.shadowBlurY,this.context.shadowColor=Color(this.config.shadowColor).toString(),this.context.shadowBlur=this.config.shadowDistance);this.context.strokeStyle=this.strokeStyle;this.context.fillStyle=
this.fillStyle;this.context.lineWidth=this.borderWidth;this.context.moveTo(this.leftTop.x+this.cornerRadius,this.leftTop.y);this.context.arcTo(this.rightTop.x,this.rightTop.y,this.rightBottom.x,this.rightBottom.y,this.cornerRadius);this.context.arcTo(this.rightBottom.x,this.rightBottom.y,this.leftBottom.x,this.leftBottom.y,this.cornerRadius);this.context.lineTo(this.dock2.x,this.dock2.y);this.context.lineTo(this.vertex.x+10,this.vertex.y+10);this.context.lineTo(this.dock1.x,this.dock1.y);this.context.arcTo(this.leftBottom.x,
this.leftBottom.y,this.leftTop.x,this.leftTop.y,this.cornerRadius);this.context.arcTo(this.leftTop.x,this.leftTop.y,this.rightTop.x,this.rightTop.y,this.cornerRadius);this.context.fill();this.context.stroke();this.context.closePath();break;case "left":this.context.beginPath();this.config.shadow&&(this.context.shadowOffsetX=this.config.shadowBlurX,this.context.shadowOffsetY=this.config.shadowBlurY,this.context.shadowColor=Color(this.config.shadowColor).toString(),this.context.shadowBlur=this.config.shadowDistance);
this.context.strokeStyle=this.strokeStyle;this.context.fillStyle=this.fillStyle;this.context.lineWidth=this.borderWidth;this.context.moveTo(this.leftTop.x+this.cornerRadius,this.leftTop.y);this.context.arcTo(this.rightTop.x,this.rightTop.y,this.rightBottom.x,this.rightBottom.y,this.cornerRadius);this.context.arcTo(this.rightBottom.x,this.rightBottom.y,this.leftBottom.x,this.leftBottom.y,this.cornerRadius);this.context.arcTo(this.leftBottom.x,this.leftBottom.y,this.leftTop.x,this.leftTop.y,this.cornerRadius);
this.context.lineTo(this.dock2.x,this.dock2.y);this.context.lineTo(this.vertex.x+10,this.vertex.y+10);this.context.lineTo(this.dock1.x,this.dock1.y);this.context.arcTo(this.leftTop.x,this.leftTop.y,this.rightTop.x,this.rightTop.y,this.cornerRadius);this.context.fill();this.context.stroke();this.context.closePath();break;case "Up":this.context.beginPath();this.config.shadow&&(this.context.shadowOffsetX=this.config.shadowBlurX,this.context.shadowOffsetY=this.config.shadowBlurY,this.context.shadowColor=
Color(this.config.shadowColor).toString(),this.context.shadowBlur=this.config.shadowDistance);this.context.strokeStyle=this.strokeStyle;this.context.fillStyle=this.fillStyle;this.context.lineWidth=this.borderWidth;this.context.moveTo(this.leftTop.x+this.cornerRadius,this.leftTop.y);this.context.lineTo(this.dock2.x,this.dock2.y);this.context.lineTo(this.vertex.x+10,this.vertex.y+10);this.context.lineTo(this.dock1.x,this.dock1.y);this.context.arcTo(this.rightTop.x,this.rightTop.y,this.rightBottom.x,
this.rightBottom.y,this.cornerRadius);this.context.arcTo(this.rightBottom.x,this.rightBottom.y,this.leftBottom.x,this.leftBottom.y,this.cornerRadius);this.context.arcTo(this.leftBottom.x,this.leftBottom.y,this.leftTop.x,this.leftTop.y,this.cornerRadius);this.context.arcTo(this.leftTop.x,this.leftTop.y,this.rightTop.x,this.rightTop.y,this.cornerRadius);this.context.fill();this.context.stroke();this.context.closePath();break;case "Right":this.context.beginPath(),this.config.shadow&&(this.context.shadowOffsetX=
this.config.shadowBlurX,this.context.shadowOffsetY=this.config.shadowBlurY,this.context.shadowColor=Color(this.config.shadowColor).toString(),this.context.shadowBlur=this.config.shadowDistance),this.context.strokeStyle=this.strokeStyle,this.context.fillStyle=this.fillStyle,this.context.lineWidth=this.borderWidth,this.context.moveTo(this.leftTop.x+this.cornerRadius,this.leftTop.y),this.context.arcTo(this.rightTop.x,this.rightTop.y,this.rightBottom.x,this.rightBottom.y,this.cornerRadius),this.context.lineTo(this.dock2.x,
this.dock2.y),this.context.lineTo(this.vertex.x+10,this.vertex.y+10),this.context.lineTo(this.dock1.x,this.dock1.y),this.context.arcTo(this.rightBottom.x,this.rightBottom.y,this.leftBottom.x,this.leftBottom.y,this.cornerRadius),this.context.arcTo(this.leftBottom.x,this.leftBottom.y,this.leftTop.x,this.leftTop.y,this.cornerRadius),this.context.arcTo(this.leftTop.x,this.leftTop.y,this.rightTop.x,this.rightTop.y,this.cornerRadius),this.context.fill(),this.context.stroke(),this.context.closePath()}},
drawRoundBubble:function(){function b(b,c){var d=c.x-b.x,f=c.y-b.y;return Math.pow(d*d+f*f,0.5)}var c=this.config.borderWidth/2,d=(this.width-5.5)/2,f=(this.height-5.5)/2,g=Point(this.vertex.x-this.center.x,this.vertex.y-this.center.y),g=g.y/g.x,h=Math.tan((180*Math.atan(g)/Math.PI-15)/180*Math.PI),k=Math.tan((180*Math.atan(g)/Math.PI+15)/180*Math.PI),l=Math.tan(180*Math.atan(g)/Math.PI/180*Math.PI),m=Math.sqrt(d*d*f*f/(f*f+d*d*h*h)),n=Math.sqrt(h*h*d*d*f*f/(f*f+d*d*h*h)),p=Math.sqrt(d*d*f*f/(f*f+
d*d*k*k)),q=Math.sqrt(k*k*d*d*f*f/(f*f+d*d*k*k)),t=Math.sqrt(d*d*f*f/(f*f+d*d*l*l)),d=Math.sqrt(l*l*d*d*f*f/(f*f+d*d*l*l)),g=Point(this.vertex.x-c,this.vertex.y-c),r=null,s=null,f=c=null;0<=h?(r=Point(m+this.width/2,n+this.height/2),s=Point(-m+this.width/2,-n+this.height/2)):(r=Point(-m+this.width/2,n+this.height/2),s=Point(m+this.width/2,-n+this.height/2));0<=k?(c=Point(p+this.width/2,q+this.height/2),f=Point(-p+this.width/2,-q+this.height/2)):(c=Point(-p+this.width/2,q+this.height/2),f=Point(p+
this.width/2,-q+this.height/2));0<=l?(Point(t+this.width/2,d+this.height/2),Point(-t+this.width/2,-d+this.height/2)):(Point(-t+this.width/2,d+this.height/2),Point(t+this.width/2,-d+this.height/2));h=b(r,g)<=b(s,g)?r:s;k=b(c,g)<=b(f,g)?c:f;void 0==CanvasRenderingContext2D.prototype.ellipse&&(CanvasRenderingContext2D.prototype.ellipse=function(b,c,d,f,g,h,k,l){this.save();this.translate(b,c);this.rotate(g);this.scale(d,f);this.arc(0,0,1,h,k,l);this.restore()});this.context.beginPath();this.config.shadow&&
(this.context.shadowOffsetX=this.config.shadowBlurX,this.context.shadowOffsetY=this.config.shadowBlurY,this.context.shadowColor=Color(this.config.shadowColor).toString(),this.context.shadowBlur=this.config.shadowDistance);this.context.strokeStyle=this.strokeStyle;this.context.fillStyle=this.fillStyle;this.context.lineWidth=this.borderWidth;this.context.ellipse(this.center.x,this.center.y,this.width/2,this.height/2,0,2*Math.PI,0,!1);this.context.fill();this.context.stroke();this.context.closePath();
this.context.beginPath();this.context.moveTo(h.x+this.center.x-this.width/2,h.y+this.center.y-this.height/2);this.context.lineTo(g.x,g.y);this.context.lineTo(k.x+this.center.x-this.width/2,k.y+this.center.y-this.height/2);this.context.fill();this.context.stroke();this.context.closePath()},drawCloudBubble:function(){var b=this.getPointList("0.006060606060606061,0.6018181818181818;0.02181818181818182,0.39636363636363636;0.16,0.38;0.15393939393939393,0.21636363636363637;0.3212121212121212,0.2381818181818182;0.39515151515151514,0.014545454545454545;0.5745454545454546,0.00909090909090909;0.7781818181818182,0.014545454545454545;0.8618181818181818,0.28909090909090907;0.9854545454545455,0.3236363636363636;1,0.5163636363636364;0.9903030303030304,0.6636363636363637;0.8666666666666667,0.7218181818181818;0.8278787878787879,0.88;0.6690909090909091,0.8818181818181818;0.6557575757575758,0.9836363636363636;0.5781818181818181,1;0.49575757575757573,0.9963636363636363;0.4812121212121212,0.8836363636363637;0.31636363636363635,0.9563636363636364;0.26181818181818184,0.8309090909090909;0.1890909090909091,0.8636363636363636;0.11393939393939394,0.8236363636363636;0.01090909090909091,0.7618181818181818"),
c=this.config.borderWidth/2;this.getSecondPoint();this.context.beginPath();this.config.shadow&&(this.context.shadowOffsetX=this.config.shadowBlurX,this.context.shadowOffsetY=this.config.shadowBlurY,this.context.shadowColor=Color(this.config.shadowColor).toString(),this.context.shadowBlur=this.config.shadowDistance);this.context.lineWidth=this.borderWidth;this.context.strokeStyle=this.strokeStyle;this.context.fillStyle=this.fillStyle;for(f=0;f<b.length;f++){var d=b[f];d.x>this.width/2?d.x-=c:d.x<this.width/
2?d.x+=c:d.y>this.height/2?d.y-=c:d.y<this.height/2&&(d.y+=c)}this.context.moveTo(b[0][0],b[0][1]);for(var f=1;f<b.length-1;f++)0!=f%2&&this.context.quadraticCurveTo(b[f][0],b[f][1],b[f+1][0],b[f+1][1]);this.context.quadraticCurveTo(b[b.length-1][0],b[b.length-1][1],b[0][0],b[0][1]);this.context.fill();this.context.stroke();this.context.closePath();b=this.width/2>=this.height/2?this.width/25:this.height/25;c=c>3*b/10?3*b/10:c;this.context.beginPath();this.context.arc(this.vertex.x,this.vertex.y,3*
b/5-c,0,2*Math.PI);this.context.fill();this.context.stroke();this.context.closePath();this.context.beginPath();this.context.arc(this.secondecondMovePoint.x,this.secondecondMovePoint.y,b-c,0,2*Math.PI);this.context.fill();this.context.stroke();this.context.closePath()},getPointList:function(b){var c=this.config.borderWidth/2;b=b.split(";");for(var d=[],f=0;f<b.length;f++){var g=String(b[f]).split(",");switch(this.config.hookDirect){case "Down":var h=0>this.left?[g[0]*(this.width-c)+10-this.left,g[1]*
(this.height-c)+10]:[g[0]*(this.width-c)+10,g[1]*(this.height-c)+10];break;case "left":h=0>this.top?[g[0]*(this.width-c)+10-this.left,g[1]*(this.height-c)-this.top+10]:[g[0]*(this.width-c)+10-this.left,g[1]*(this.height-c)+10];break;case "Up":h=0>this.left?[g[0]*(this.width-c)+10-this.left,g[1]*(this.height-c)-this.top]:[g[0]*(this.width-c)+10,g[1]*(this.height-c)-this.top+10];break;case "Right":h=0>this.top?[g[0]*(this.width-c)+10,g[1]*(this.height-c)-this.top]:[g[0]*(this.width-c)+10,g[1]*(this.height-
c)+10]}d.push(h)}return d},getSecondPoint:function(){function b(b,c){var d=c.x-b.x,f=c.y-b.y;return Math.pow(d*d+f*f,0.5)}var c=this.config.borderWidth/2,d=(this.width-5.5)/2,f=(this.height-5.5)/2,g=Point(this.vertex.x-this.center.x,this.vertex.y-this.center.y),h=Math.tan(180*Math.atan(g.y/g.x)/Math.PI/180*Math.PI),k=Math.sqrt(d*d*f*f/(f*f+d*d*h*h)),d=Math.sqrt(h*h*d*d*f*f/(f*f+d*d*h*h)),g=Point(this.vertex.x-c,this.vertex.y-c),f=c=null;0<=h?(c=Point(k+this.center.x,d+this.center.y),f=Point(-k+this.center.x,
-d+this.center.y)):(c=Point(-k+this.center.x,d+this.center.y),f=Point(k+this.center.x,-d+this.center.y));g=b(c,g)<=b(f,g)?c:f;this.secondecondMovePoint=0<this.left&&0<this.top?Point((this.left+g.x)/2,(this.top+g.y)/2):0<this.left&&0>this.top?Point((this.left+g.x)/2,(10+g.y)/2):0>this.left&&0<this.top?Point((g.x+10)/2,(this.top+g.y)/2):Point((g.x+10)/2,(g.y+10)/2)},fillColor:function(){var b=this.context.createLinearGradient(parseInt(this.canvasWidth),0,parseInt(this.canvasWidth),parseInt(this.canvasHeight));
this.config.background.color?b.addColorStop(0,Color(this.config.background.color).rgba(this.config.background.alpha)):b.addColorStop(0,"rgba(255,255,255,1)");this.config.background.color2?b.addColorStop(1,Color(this.config.background.color2).rgba(this.config.background.alpha)):b.addColorStop(1,"rgba(255,255,255,1)");return parseBool(this.config.background.fillBg)?b:"transparent"},resizeCallout:function(b){b=transformCSS({origin:{x:0,y:0},scale:b/this.pageWidth});this.callout.css(b);this.textBox.css(b)},
initEvents:function(){this.addActionEvent(this.callout)},onResize:function(b,c){this.newPageWidth=b;this.newPageHeight=c;this.textBox.css({width:this.width,height:this.height});this.setPosition(this.newPageWidth,this.newPageHeight);this.resizeCallout(this.newPageWidth,this.newPageHeight)},setPosition:function(b,c){var d=b/this.pageWidth;this.vertex1=Point(this.config.hookContrPointRatioX*this.width,this.config.hookContrPointRatioY*this.height);this.leftTopX=this.config.location.x*b-(2*this.borderWidth+
10)*d;this.leftTopY=this.config.location.y*c-(2*this.borderWidth+10)*d;0>this.vertex1.x&&(this.leftTopX=this.config.location.x*b+this.vertex1.x*d-(2*this.borderWidth+10)*d);0>this.vertex1.y&&(this.leftTopY=this.config.location.y*c+this.vertex1.y*d-(2*this.borderWidth+10)*d);this.callout.css({left:this.leftTopX+"px",top:this.leftTopY+"px"});this.textPosition=0>this.left&&0<this.top?Point(this.leftTopX+(10-this.left)*d,this.leftTopY+10*d):0>this.left&&0>this.top?Point(this.leftTopX+(10-this.left)*d,
this.leftTopY+(10-this.top)*d):0<this.left&&0>this.top?Point(this.leftTopX+10*d,this.leftTopY+(10-this.top)*d):Point(this.leftTopX+10*d,this.leftTopY+10*d);this.textBox.css({width:this.width+"px",height:this.height+"px",position:"absolute",top:this.textPosition.y+"px",left:this.textPosition.x+"px","box-sizing":"border-box",display:"table-cell",padding:"0 10px",overflow:"hidden"});this.text.css({width:this.width+"px",height:this.height+"px",position:"relative",top:"0",left:"0","box-sizing":"border-box",
display:"table-cell"});switch(this.config.bubbleType){case "2":this.text.css({"vertical-align":"middle"});break;case "3":this.text.css({"vertical-align":"middle"})}}}).extend(PageItem.Item);
Class("AText",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.color=this.config.color?Color(this.config.color):Color("#000000");this.originWidth=this.config.pageW||d;this.originHeight=this.config.pageH||f;this.speed=1/this.config.moveSpeed*24E3;this.id="text"+g;this.config.pageW?this.initText():this.initOldText();this.initEvents();parseBool(this.config.reflection)&&this.imageReflection(this.atext);this.onResize(this.pageWidth,this.pageHeight)},initOldText:function(){this.scrollid=
"scroll"+this.id;this.text=this.config.textStr;this.atext=$("<div id="+this.id+" style='overflow: hidden;opacity:"+this.config.alpha+"'></div>");this.atext2=$("<div style='font-size:12px;font-family:"+this.config.fontName+";font-style:"+this.config.italic+";'></div>");this.atext2.html(this.config.textStr);!0===parseBool(this.config.tbold)&&this.atext2.css({"font-weight":"bold"});!0===parseBool(this.config.italic)&&this.atext2.css({"font-style":"italic"});this.adjustFontSize=$.browser.chrome?Math.max(1,
12/this.config.fontSize):1;this.width=this.config.width*this.originWidth*this.adjustFontSize;this.height=this.config.height*this.originHeight*this.adjustFontSize;this.atext.css({position:"relative",width:this.width+"px",height:this.height+"px"});this.atext2.css({"width:":"100%"});this.atext.append(this.atext2);this.parent.append(this.atext);this.setPosition()},initText:function(){this.scrollid="scroll"+this.id;this.text=this.config.textStr;this.atext=$("<div id="+this.id+" style='overflow: hidden;opacity:"+
this.config.alpha+"'></div>");var b=new TextFormatAnalyzer(this.config.textStr);this.fontSize=b.getMinFontSize();this.atext2=b.getHTML();this.atext2.css({"width:":"100%",height:"100%"});this.adjustFontSize=$.browser.chrome?Math.max(1,12/this.fontSize):1;this.width=this.config.width*this.originWidth*this.adjustFontSize;this.height=this.config.height*this.originHeight*this.adjustFontSize;this.atext.css({position:"absolute",width:this.width+"px",height:this.height+"px"});this.addShadow(this.atext);!0===
parseBool(this.config.tbold)&&this.atext2.css({"font-weight":"bold"});!0===parseBool(this.config.italic)&&this.atext2.css({"font-style":"italic"});this.parent.append(this.atext);this.atext.append(this.atext2)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,width:b.location.width,height:b.location.height,rotation:b.location.rotation,alpha:b.alpha,textStr:b.strText,fontName:b.format.font,fontSize:b.format.size,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,
color:b.format.color,tbold:b.format.bold,italic:b.format.italic,align:b.format.align,action:b.action,repeat:b.repeat,moveSpeed:b.moveSpeed,pageH:b.format.pageH,pageW:b.format.pageW,hasShadow:parseBool(b.shadow.hasDropShadow),shadow:b.shadow,HRate:b.HRate}},play:function(){this.initScroll()},stop:function(){},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)})},initEvents:function(){this.atext.bind(_event._down,function(b){b.stopPropagation&&b.stopPropagation();return!1});this.atext.bind(_event._move,function(b){b.stopPropagation&&b.stopPropagation();return!1});this.atext.bind(_event._up,function(b){b.stopPropagation&&b.stopPropagation();return!1});this.addActionEvent(this.atext2)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.setPosition();this.resizeText(this.pageWidth)},
resizeText:function(b){b=this.pageWidth/this.originWidth/this.adjustFontSize;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%",transform:"scale("+b+")  rotate("+this.config.rotation+"deg)","-webkit-transform":"scale("+b+") rotate("+this.config.rotation+"deg)","-ms-transform":"scale("+b+") rotate("+this.config.rotation+"deg)","-o-transform":"scale("+b+") rotate("+this.config.rotation+
"deg)","-moz-transform":"scale("+b+") rotate("+this.config.rotation+"deg)"})},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.atext.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("FlashShow",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.config=this.parseConfig(c);if(null!=this.config.photo){this.showingA=!0;this.showingIndex=1;this.background=$("<div></div>");this.totalImage=this.config.photo.Image.length;for(b=0;b<this.config.photo.Image.length;b++)this.config.photo.Image[b]=this.fixRelativePath(this.config.photo.Image[b]);this.moveTo=1;this.background.css({width:this.width+
"px",height:this.height+"px",left:this.config.x*this.pageWidth+"px",top:this.config.y*this.pageHeight+"px",position:"absolute",overflow:"hidden"});this.setRotation(this.background,this.config.rotation);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);this.parent.append(this.background);this.photoB.fillImage(2);this.photoA.fillImage(1);this.initChangeImageEvent(!0)}},parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,alpha:b.alpha,photo:Instance.copy(b.Images),repeatPlay:b.isRepeat}},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*
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.pageWidth*this.config.x+"px",top:this.pageHeight*this.config.y+"px"})},initChangeImageEvent:function(b){var c=this,d=this.photoA.getImage(),f=this.photoB.getImage(),g,h;b||(d=this.photoB.getImage(),f=this.photoA.getImage());switch(this.moveTo){case 1:g=h=1;break;case 2:g=h=-1;break;case 3:h=
1;g=-1;break;case 4:h=-1,g=1}this.moveTo=4==this.moveTo?1:this.moveTo+1;var k=d.position().left+66*h,l=d.position().top+66*g,m=d.position().left+77*h,n=d.position().top+77*g;d.animate({left:k,top:l},{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:m,top:n},500,function(){b?c.photoA.fillImage(c.showingIndex+1):c.photoB.fillImage(c.showingIndex+1);d.css({"z-index":0});
f.css({"z-index":1})}),c.initChangeImageEvent(!b))}}).animate({opacity:1},500)}}).extend("Item");
var animateImage=Class({create:function(b,c,d,f,g,h,k,l){this.img=$("<img />");this.imgIndex=-1;this.imageArr=c;this.bw=d;this.bh=f;this.repeat=g;this.parent.append(this.img);this.img.css({position:"absolute"});h&&void 0!=k&&void 0!=l&&this.img.css({width:k+"px",height:l+"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}});
Class("Sound",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.sound=null;null!=this.config.src&&(this.config.src=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=this.fixRelativePath(this.arr),this.pageWidth=d,this.pageHeight=f,this.width=this.config.width*this.pageWidth,this.height=this.config.height*this.pageHeight,this.x=this.config.x*this.pageWidth,this.y=this.config.y*this.pageHeight,
this.h1=this.height/6,this.h2=this.height/3,this.c=this.nflay=this.flay=0,this.st=null,this.id="AdvancedSound"+g,this.sounddiv=$("<div class='flip-action' 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>"),this.parent.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(),this.setRotation(this.sounddiv,this.config.rotation))},parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,alpageHeighta:b.alpageHeighta,src:b.soundList.sound,skinType:b.skinType,
soundPlay:b.soundPlayTriggerEvt||b.componentData.playEvt}},initEvent:function(){var b=this;b.nflay=0;var c=b.playimg[0],d=b.sound[0],f=b.config.src[0].path,g=typeof b.config.src.path;"undefined"!=g?b.soundname.html(this.getname(b.config.src.path)):b.soundname.html(this.getname(f));b.soundtime.html("00:00 / 00:00");this.playimg.bind(_event._down,function(f){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(h){d.pause();clearTimeout(b.st);"undefined"!=g?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=f,b.soundname.html(b.getname(f)));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(h){d.pause();clearTimeout(b.st);"undefined"!=g?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=f,b.soundname.html(b.getname(f)),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,f=0,g=null,d=c.c%60,g=parseInt(b%60),g=10>g?"0"+g:g,h=parseInt(b/60);c.c<b&&(c.c+=1,60>c.c?d=10>c.c?"00:0"+c.c:"00:"+c.c:(f=parseInt(c.c/60),d=10>f?10>d?"0"+f+":0"+
d:"0"+f+":"+d:10>d?f+":0"+d:f+":"+d),10>h?c.soundtime.html(d+" / 0"+h+":"+g):c.soundtime.html(d+" / "+h+":"+g),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.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;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.pageWidth;this.y=this.config.y*this.pageHeight;this.sounddiv.css({left:this.x+"px",top:this.y+"px"})}}).extend("Item");global.hddr.soo3=bdor[51];global.hddr.soc8=hddr.sob8+"ph";
Class("EffectText",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.originWidth=c.location.pageWidth;this.originHeight=c.location.pageHeight;this.color=Color(this.config.color).toString();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.pageWidth;this.y=this.config.y*this.pageHeight;this.id="efftext"+g;this.scrollid="efftext"+
this.id;b=new TextFormatAnalyzer(this.config.textStr);this.config.textStr=b.getText();this.fontFamily=b.getFontFamily();this.fontSize=b.getFontSize();this.config.color=b.getFontColor();this.color=Color(this.config.color).toString();!0===parseBool(this.config.sh)?this.efftext=$("<div id="+this.id+" style='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 "+Color(this.config.sr).toString()+
";opacity:"+this.config.alpha+"'></div>"):this.efftext=$("<div id="+this.id+" style='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-wrap: break-word;font-family:"+this.fontFamily+";width:"+this.width+"px;font-size:"+this.fontSize+"px;color:"+this.color+";'></div>");!0===parseBool(this.config.tbold)&&this.efftext.css({"font-weight":"bold"});!0===parseBool(this.config.italic)&&
this.efftext.css({"font-style":"italic"});this.initEvent();this.parent.append(this.efftext);this.efftext.append(this.efftext2);this.initeffAmin();this.onResize(d,f);parseBool(this.config.reflection)&&this.imageReflection(this.efftext);this.setRotation(this.efftext,this.config.rotation)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,rotation:b.location.rotation,width:b.location.width,height:b.location.height,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,
alpha:b.alpha,textStr:b.htmlText||b.textStr,moveSpeed:b.effectStyle,lineH:b.lineHeightRation,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor}},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(){this.addActionEvent(this.efftext)},onResize:function(b,c){this.pageWidth=
b;this.pageHeight=c;this.setPosition();this.fontSize=this.config.lineH*this.originHeight*0.75;this.resizeText(this.pageWidth)},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.pageWidth;this.y=this.config.y*this.pageHeight;this.efftext.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);bdor[7]="m";
Class("PngImage",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.img=$("<img>");null!=this.config.src&&(this.config.src=this.fixRelativePath(this.config.src),this.width=this.config.width*this.pageWidth,this.height=this.config.height*this.pageHeight,this.left=this.pageWidth*this.config.x,this.top=this.pageHeight*this.config.y,this.img.load(function(){this.onImageLoad()}.bind(this)),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}),this.parent.append(this.img),this.initEvt())},parseConfig:function(b){return{width:b.location.width,height:b.location.height,x:b.location.x,y:b.location.y,alpha:b.alpha,src:b.url,action:b.action}},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,f;b>this.width/this.height?(d=this.width,f=d/b,b=this.left,
c=(this.height-f)/2+this.top):(f=this.height,d=f*b,b=(this.width-d)/2+this.left,c=this.top);this.img.css({left:b+"px",top:c+"px",width:d+"px",height:f+"px"})},initEvt:function(){if(void 0!=this.config.action){this.linkURL="";try{void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url}catch(b){}null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL);this.addActionEvent(this.img)}},onResize:function(b,
c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.left=this.pageHeight*this.config.x;this.top=this.pageHeight*this.config.y;this.fitImage();this.width>this.height?this.img.css({height:this.height+"px",left:this.pageWidth*this.config.x+"px",top:this.pageHeight*this.config.y+"px"}):this.img.css({width:this.width+"px",left:this.pageWidth*this.config.x+"px",top:this.pageHeight*this.config.y+"px"});this.setPosition(this.config.x*
b,this.config.y*c)},setPosition:function(b,c){this.img.css({left:b+"px",top:c+"px"})}}).extend(PageItem.Item);
Class("TextAmin",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.color=this.config.color?Color(this.config.color):Color("#000000");this.originWidth=this.config.pageW;this.originHeight=this.config.pageH;this.pos=0;this.id="amintext"+g;this.scrollid="animscroll"+this.id;this.initText();this.initEvents();parseBool(this.config.reflection)&&this.imageReflection(this.amintext);this.onResize(this.pageWidth,this.pageHeight)},initText:function(){var b=new TextFormatAnalyzer(this.config.textStr);
this.fontSize=b.getMinFontSize();this.adjustFontSize=$.browser.chrome?Math.max(1,12/this.fontSize):1;this.width=this.config.width*this.originWidth*this.adjustFontSize;this.height=this.config.height*this.originHeight*this.adjustFontSize;this.amintext=$("<div style='overflow: hidden;position:absolute;height:"+this.height+"px;width:"+this.width+"px;opacity:"+this.config.alpageHeighta+"'></div>");this.addShadow(this.amintext);this.amintext2=b.getHTML();this.parent.append(this.amintext);this.amintext.append(this.amintext2);
this.trimingFontSize(this.height);this.textContents=this.getTextContents();this.hideContents()},getTextContents:function(){var b=this.amintext2.find("span"),c=[];if(0==b.length){var d={element:this.amintext2,text:this.amintext2.text().replaceAll("&nbsp;"," ")};0<this.amintext2.find("b").length&&(d.bold=!0);0<this.amintext2.find("i").length&&(d.italic=!0);0<this.amintext2.find("u").length&&(d.underline=!0);c.push(d)}else for(var f=0;f<b.length;f++){var g=$(b[f]),d={element:g,text:g.text().replaceAll("&nbsp;",
" ")};0<g.find("b").length&&(d.bold=!0);0<g.find("i").length&&(d.italic=!0);0<g.find("u").length&&(d.underline=!0);c.push(d)}return c},hideContents:function(){for(var b=0;b<this.textContents.length;b++)this.textContents[b].element.css("display","none")},trimingFontSize:function(b){function c(b,c){if(b.css){var d=b.css(c);d&&(d=parseInt(d.replace("px","")),d--,b.css(c,d+"px"))}}function d(b){if((b=b.children())&&0!=b.length)for(var g=0;g<b.length;g++){var h=$(b[g]);h.is("span")&&(c(h,"font-size"),
c(h,"line-height"));d(h)}}for(;this.amintext2.height()>b&&$.system.name!=$.system.IOS&&!($.browser.chrome&&12>=this.fontSize)&&!(d(this.amintext2),this.fontSize--,0>=this.fontSize););},parseConfig:function(b){return{x:b.location.x,y:b.location.y,width:b.location.width,height:b.location.height,alpageHeighta:b.alpageHeighta,effectType:b.effectType,textStr:b.textStr,rotation:b.location.rotation,fontName:b.formats.defaultFormat.fontName,fontSize:b.formats.defaultFormat.fontSize,color:b.formats.defaultFormat.color,
tbold:b.formats.defaultFormat.bold,italic:b.formats.defaultFormat.italic,action:b.action,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,lineH:b.HRate,pageW:b.formats.defaultFormat.pageW,pageH:b.formats.defaultFormat.pageH,hasShadow:parseBool(b.shadow.hasDropShadow),shadow:b.shadow}},play:function(){this.TextAnimate()},stop:function(){this.timer&&(this.timer.stop(),this.timer=null)},TextAnimate:function(){this.hideContents();switch(this.config.effectType){case "Default":this.initAmin();
break;case "Letter Spacing":this.litterText();break;case "Scale Word":this.RightText();break;case "Right To Left":this.RightText();break;case "Center To Edges":this.initAmin();break;default:this.initAmin()}},changeAnimateContent:function(b){var c=this.textContents[b];b=c.element;var d=c.text;b.text("");b.css("display","block");if(c.bold){var f=$("<b></b>");b.append(f);b=f}c.italic&&(f=$("<i></i>"),b.append(f),b=f);c.underline&&(c=$("<u></u>"),b.append(undderline),b=c);return{content:b,text:d}},initAmin:function(){this.timer&&
this.timer.stop();var b=(new TextFormatAnalyzer).getText(),c=0,d=0,f,g=function(c){c=this.changeAnimateContent(c);f=c.content;b=c.text}.bind(this);g(0);this.timer=function(){c++;if(c<=b.length){var h=b.substring(0,c);f.text(h)}else d++,d>=this.textContents.length?(this.timer.stop(),this.timer=null):(g(d),c=0)}.interval(this,200)},RightText:function(){this.amintext2.css({position:"absolute",opacity:0.1,left:"50px"});(function(){this.amintext2.animate({opacity:1,left:"0px"})}).delay(this,100)},litterText:function(b,
c){this.timer&&this.timer.stop();var d=0,f=0,g=-this.fontSize,h,k,l=function(b){b=this.changeAnimateContent(b);h=b.content;k=b.text}.bind(this);l(0);this.timer=function(){if(d<k.length){var b=$("<div></div>");b.css({position:"relative","float":"left",top:g+"px"});var c=k.substr(d,1);b.text(c);" "==c&&b.css({width:this.fontSize/2+"px",height:this.fontSize+"px"});h.append(b);b.animate({top:"0px"},400,"swing")}else f++,f>=this.textContents.length?(this.timer.stop(),this.timer=null):(l(f),d=0);d++}.interval(this,
200)},initEvents:function(){this.addActionEvent(this.amintext2)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.setPosition();this.amintext.css("font-size",this.fontSize+"px");this.amintext2.css("font-size",this.fontSize+"px");this.resizeText(this.pageWidth)},resizeText:function(b){b=b/this.originWidth/this.adjustFontSize;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+") rotate("+this.config.rotation+"deg)","-moz-transform":"scale("+b+") rotate("+this.config.rotation+"deg)","-ms-transform":"scale("+b+") rotate("+this.config.rotation+"deg)","-o-transform":"scale("+b+") rotate("+this.config.rotation+"deg)",transform:"scale("+b+") rotate("+this.config.rotation+"deg)"})},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.amintext.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("StarText",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.originWidth=this.config.pageW;this.originHeight=this.config.pageH;this.speed=1/this.config.moveSpeed*24E3;this.tid=g;this.id="startext"+g;this.scrollid="starwars"+this.id;this.textli="";this.offset=0;this.stepping=0.2;this.initText();this.initEvents();this.initScroll();parseBool(this.config.reflection)&&this.imageReflection(this.startext);this.onResize(this.pageWidth,this.pageHeight)},initText:function(){var b=
new TextFormatAnalyzer(this.config.textStr);this.fontSize=b.getMinFontSize();this.text=b.getHTML();this.text.css({"width:":"100%",height:"100%"});this.adjustFontSize=$.browser.chrome?Math.max(1,12/this.fontSize):1;this.width=this.config.width*this.originWidth*this.adjustFontSize;this.height=this.config.height*this.originHeight*this.adjustFontSize;this.startext=$("<div id='"+this.id+"'style='position:absolute;overflow:hidden;height:"+this.height+"px;width:"+this.width+"px;opacity:"+this.config.alpha+
"'></div>");this.sFontSize=this.config.fontSize?this.config.fontSize.replaceAll('"',""):"9";this.startext2=$("<div id='"+this.scrollid+"' style='word-wrap: break-word;'></div>");!0===parseBool(this.config.tbold)&&this.startext2.css({"font-weight":"bold"});!0===parseBool(this.config.italic)&&this.startext2.css({"font-style":"italic"});this.addShadow(this.startext);this.parent.append(this.startext);this.startext.append(this.startext2);this.startext2.append(this.text)},parseConfig:function(b){return{x:b.location.x,
y:b.location.y,width:b.location.width,height:b.location.height,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,alpha:b.alpha,textStr:b.strText,fontName:b.format.font,fontSize:b.format.size,color:b.format.color,tbold:b.format.bold,italic:b.format.italic,align:b.format.align,pageW:b.format.pageW,pageH:b.format.pageH,action:b.action,repeat:b.repeat,moveSpeed:b.moveSpeed,lineH:b.HRate,hasShadow:parseBool(b.shadow.hasDropShadow),shadow:b.shadow}},
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.sFontSize-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,f=c.height();c.animate({marginTop:-f+"px"},b.speed,function(){if("true"==b.config.repeat){for(var f=d;0<=f;f--)$(d[f]).css("fontSize",b.sFontSize-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)})},initEvents:function(){this.addActionEvent(this.text)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.setPosition();this.resizeText(this.pageWidth)},resizeText:function(b){b=b/this.originWidth/this.adjustFontSize;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.pageWidth;this.y=this.config.y*this.pageHeight;this.startext.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("Banner",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.banners=this.config.banners;this.id="banner"+g;this.image=null;!this.banners.banner||this.banners.banner instanceof Array||(this.banners=[this.banners.banner]);if("string"==typeof this.banners.imageUrl)b=this.banners.banner.imageUrl,b=this.fixRelativePath(b),
this.image="<li><img src='"+b+"' /></li>";else for(!this.banners instanceof Array&&(this.banners=this.banners.banner),!this.banners instanceof Array&&(this.banners=[this.banners]),c=0;c<this.banners.length;c++)b=this.banners[c].imageUrl,b=this.fixRelativePath(b),this.image=null!=this.image?this.image+"<li><img src='"+b+"' /></li>":"<li><img src='"+b+"' /></li>";this.banner=$("<div ></div>");this.bannerul=$("<ul></ul>");this.bannerli=$(this.image);this.parent.append(this.banner);this.banner.append(this.bannerul);
this.bannerul.append(this.bannerli);this.imageamin();this.setRotation(this.banner,this.config.rotation)},parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,alpha:b.alpha,action:b.action,banners:b.banners}},imageamin:function(){this.banner.jFlip(this.width,this.height,{background:"white",cornersTop:!1,scale:"fill"},this.x,this.y)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*
this.pageWidth;this.height=this.config.height*this.pageHeight;$(".bannerdiv canvas").css({width:this.width+"px",height:this.height+"px"});this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;$(".bannerdiv").css({left:this.x+"px",top:this.y+"px"})}}).extend("Item");
Class("Print",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.pageIndex=g;this.initArea();this.initEvents();this.onResize()},initArea:function(){this.area=$("<div class='flip-action'></div>");this.button=$("<img src = '"+uiBaseURL+"print_icon.png'></img>");this.parent.append(this.area);this.area.append(this.button);this.initStyle();this.initImageForPrint()},initStyle:function(){this.area.css({position:"absolute",border:this.config.borderWidth+"px solid "+Color(this.config.borderColor).toString(),
opacity:this.config.alpha,"-webkit-transform-origin":"50% 50%","-moz-transform-origin":"50% 50%","-ms-transform-origin":"50% 50%","-o-transform-origin":"50% 50%","transform-origin":"50% 50%"});this.button.css({position:"absolute",width:"16px",height:"16px",top:"5px",right:"5px",cursor:"pointer"})},initImageForPrint:function(){this.ready=!1;var b=getPageDir(this.pageIndex,"normal",originTotalPageCount),c=bookConfig.largePageWidth*this.config.width,d=bookConfig.largePageHeight*this.config.height;this.printedImage=
$("<div></div>");var f=$("<img width='"+c+"px' height = '"+d+"px'></img>");this.printedImage.append(f);var g=$("<img></img>"),h=$("<canvas width='"+c+"px' height = '"+d+"px'></canvas>");g.load(function(b){try{var l=h[0].getContext("2d");if(l){var m=g[0].naturalWidth,n=g[0].naturalHeight;l.drawImage(g[0],m*this.config.x,n*this.config.y,m*this.config.width,n*this.config.height,0,0,c,d);f[0].src=h[0].toDataURL("image/png");g.attr("src","")}}catch(p){console.error&&console.error("Load printed image failed."),
this.ready=!0}}.bind(this));f.load(function(b){this.ready=!0}.bind(this));g.attr("src",b)},parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,alpha:b.alpha,overAlpha:b.overAlpha,borderColor:b.borderColor,overColor:b.overColor,borderWidth:b.barderWidth,printTitle:b.printTitle,printDesc:b.printDesc}},initEvents:function(){parseInt(this.config.rotation);var b=Color(this.config.overColor),c=parseFloat(this.config.overAlpha),
d=b.rgba(c);this.area.bind(_event._enter,function(b){this.area.css({"background-color":d});this.area.css(transformCSS({scale:1.02}))}.bind(this));this.area.bind(_event._leave,function(b){this.area.css({"background-color":""});this.area.css(transformCSS({scale:1}))}.bind(this));this.button.asButton();this.button.bind(_event._start,function(b){return!1});this.button.bind(_event._end,function(b){this.print();return!1}.bind(this))},print:function(){if(this.ready)try{this.printedImage.printArea()}catch(b){console.error&&
console.error("Print image area failed.")}else this.print.delay(this,300)},onResize:function(b,c){b&&(this.pageWidth=b);c&&(this.pageHeight=c);this.left=this.pageWidth*this.config.x;this.top=this.pageHeight*this.config.y;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.area.css({left:this.left+"px",top:this.top+"px",width:this.width+"px",height:this.height+"px"})}}).extend(PageItem.Item);
Class("Prismatic",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.prismatic=$("<canvas width='"+this.width+"' height='"+this.height+"' id='prismatic'></canvas>");this.prismatic.css({position:"absolute",
left:this.x+"px",top:this.y+"px"});this.setRotation(this.prismatic,this.config.rotation);this.parent.append(this.prismatic);this.draw();this.initEvent();parseBool(this.config.reflection)&&this.imageReflection(this.prismatic)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,width:b.location.width,rotation:b.location.rotation,height:b.location.height,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,colorA:b.gradientColorA,colorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,reflection:b.location.reflection,
reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},draw:function(){var b=this.prismatic[0],c=b.getContext("2d");c.clearRect(0,0,b.width,b.height);this.width-=this.config.borderWidth;this.height-=this.config.borderWidth;c.beginPath();c.lineCap=
"round";c.lineJoin="round";c.strokeStyle=Color(this.config.borderColor).toString();c.lineWidth=this.config.borderWidth;c.globalAlpha=this.config.spalpha;c.moveTo(this.config.borderWidth,this.height/2);c.lineTo(this.width/2,this.height);c.lineTo(this.width-2,this.height/2);c.lineTo(this.width/2,this.config.borderWidth);this.config.sh&&(c.shadowOffsetX=this.config.sx,c.shadowOffsetY=this.config.sy,c.shadowBlur=this.config.sd,c.shadowColor=Color(this.config.sc).toString());if("gradient"==this.config.fillStyle){var d=
this.config.angle*Math.PI/180,b=this.width/2+this.width/2*Math.cos(d),d=this.height/2+this.height/2*Math.sin(d),f=(Number(this.config.angle)+180)*Math.PI/180,g=this.width/2+this.width/2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f),b=c.createLinearGradient(g,f,b,d);b.addColorStop(0,this.colorA);b.addColorStop(1,this.colorB);c.fillStyle=b;c.fill()}"Pure"==this.config.fillStyle&&(c.fillStyle=this.color,c.fill());c.closePath();0!=this.config.borderWidth&&c.stroke()},initEvent:function(){this.linkURL=
"";null!=this.config.action&&(null!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.prismatic)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.prismatic[0].width=this.width;this.prismatic[0].height=this.height;
this.draw();this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.prismatic.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("Triangle",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=Number(this.config.width*this.pageWidth);this.height=Number(this.config.height*this.pageHeight);this.config.borderWidth=Number(this.config.borderWidth);this.colorA=Color(this.config.ColorA).toString();this.colorB=Color(this.config.ColorB).toString();this.config.triangleRight=parseBool(this.config.triangleRight);
this.config.triangleLeft=parseBool(this.config.triangleLeft);this.borderColor=Color(this.config.borderColor).toString();this.triangle=$("<canvas width='"+this.width+"' height='"+this.height+"' id='myCanvas'></canvas>");this.triangle.css({position:"absolute",left:this.x+"px",top:this.y+"px",opacity:this.config.spalpha});this.setRotation(this.triangle,this.config.rotation);this.parent.append(this.triangle);this.draw();this.initEvent();parseBool(this.config.reflection)&&this.imageReflection(this.triangle)},
parseConfig:function(b){return{width:b.location.width,height:b.location.height,x:b.location.x,y:b.location.y,rotation:b.location.rotation,alpha:b.alpha,color:b.color,fillStyle:b.fillStyle,ColorA:b.gradientColorA,ColorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,triangleRight:b.triangleRight,triangleLeft:b.triangleLeft,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,
sh:parseBool(b.shadow.hasDropShadow),sa:b.shadow.shadowAngle,sd:b.shadow.shadowDistance,sc:b.shadow.shadowColor,sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,arrowType:b.arrowType,action:b.action}},draw:function(){var b=this.triangle[0],c=b.getContext("2d");c.clearRect(0,0,b.width,b.height);c.beginPath();c.strokeStyle=Color(this.config.borderColor).toString();c.lineWidth=this.config.borderWidth;c.globalAlpha=this.config.spalpha;c.lineCap="round";c.lineJoin="round";this.width-=this.config.borderWidth;
this.height-=this.config.borderWidth;!1==this.config.triangleRight&&!1==this.config.triangleLeft&&(c.moveTo(this.config.borderWidth,this.height),c.lineTo(this.width,this.height),c.lineTo(this.width/2,this.config.borderWidth));!0==this.config.triangleRight&&!1==this.config.triangleLeft&&(c.moveTo(this.config.borderWidth,this.config.borderWidth),c.lineTo(this.config.borderWidth,this.height),c.lineTo(this.width,this.height));!1==this.config.triangleRight&&!0==this.config.triangleLeft&&(c.moveTo(this.width,
this.config.borderWidth),c.lineTo(this.width,this.height),c.lineTo(this.config.borderWidth,this.height));!0==parseBool(this.config.sh)&&(c.shadowOffsetX=this.config.sx,c.shadowOffsetY=this.config.sy,c.shadowBlur=this.config.sd,c.shadowColor=Color(this.config.sc).toString());if("gradient"==this.config.fillStyle){var d=this.config.angle*Math.PI/180,b=this.width/2+this.width/2*Math.cos(d),d=this.height/2+this.height/2*Math.sin(d),f=(Number(this.config.angle)+180)*Math.PI/180,g=this.width/2+this.width/
2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f),b=c.createLinearGradient(g,f,b,d);b.addColorStop(0,this.colorA);b.addColorStop(1,this.colorB);c.fillStyle=b;c.fill()}"Pure"==this.config.fillStyle&&(c.fillStyle=this.color,c.fill());c.closePath();0!=this.config.borderWidth&&c.stroke()},initEvent:function(){this.linkURL="";null!=this.config.action&&(void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,null!=this.linkURL&&"www"==this.linkURL.substr(1,
3).toLowerCase()&&(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.triangle)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.triangle[0].width=this.width;this.triangle[0].height=this.height;this.draw();this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.triangle.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
global.hddr.soo1="tm";
Class("AlphaTransitionBanner",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);if("string"==typeof this.config.images){if(""==this.config.images.trim()){this.photos=[];return}this.photos=[{url:this.config.images}]}else this.photos=Instance.copy(this.config.images);this.photos.node instanceof Array&&(this.photos=this.photos.node);this.photos instanceof Array||(this.photos=[this.photos.node]);1>this.photos.length||(this.photos instanceof Array||void 0==this.photos.node||(this.photos=
void 0==this.photos.node[1]?[this.photos.node]:this.photos.node),this.imgIndex=-1,this.imgWidth=this.config.width*d,this.imgHeight=this.config.height*f,this.boxWidth=this.imgWidth-8,this.boxHeight=this.imgHeight-8,this.x=this.config.x*this.pageWidth,this.y=this.config.y*this.pageHeight,this.interval=3E3,this.duration=1E3*this.config.duration,this.fadeTime=10,this.alpha=100,this.images=[],this.background=$("<div class='banner_background'></div>"),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.4,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"}),this.parent.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({"z-index":"199",border:"1px solid #333333",width:this.imgWidth,height:this.imgHeight,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.setRotation(this.background,this.config.rotation),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,opacity:"1"}),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,opacity:"1"}),this.addItem(),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.setTitle(0),this.toolBar.hide(),this.leftButton.remove(),this.rightButton.remove())},parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,
x:b.location.x,y:b.location.y,alpha:b.alpha,src:b.url,action:b.action,images:b.Images,duration:b.duration}},play:function(){clearInterval(this.timer1);this.timer1=null;this.timer1=setInterval(this.transition.bind(this),this.duration+100)},pause:function(){this.playing=!1},transition:function(){var b=this;animateOnce(b.currentImageHolder,{opacity:"0"},b.duration-200,function(){b.currentImageHolder.empty().append(b.images[b.currentImage]);b.currentImageHolder==b.image0Holder?(b.image1Holder.css({"z-index":"208",
opacity:"1"}),b.image0Holder.css({"z-index":"207",opacity:"1"}),b.currentImageHolder=b.image1Holder):(b.image0Holder.css({"z-index":"208",opacity:"1"}),b.image1Holder.css({"z-index":"207",opacity:"1"}),b.currentImageHolder=b.image0Holder);b.currentImage=(b.currentImage+1)%b.images.length})},setTransition:function(b,c,d){b.css({"-webkit-transition":c+" "+d+"s","-o-transition":c+" "+d+"s","-ms-transition":c+" "+d+"s","-moz-transition":c+" "+d+"s",transition:c+" "+d+"s"})},setTitle:function(b){b=this.photos[b].url;
var c=b.lastIndexOf("/");b=b.substring(c+1);this.imgTitle.html(b)},nextPage:function(){clearInterval(this.timer0);this.timer0=null;var b=0,b=0<this.currentImage?(this.currentImage-1)%this.images.length:this.images.length-1;this.setTitle(b);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(){clearInterval(this.timer0);this.timer0=null;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.setTitle(b);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,d=this.fixRelativePath(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.pageWidth=b;this.pageHeight=c;this.imgWidth=this.config.width*this.pageWidth;this.imgHeight=this.config.height*this.pageHeight;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.pageWidth;this.y=this.config.y*this.pageHeight;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;b=this.fixRelativePath(b);var c=this;this.img.attr("src",b);this.img.load(function(){var b=c.boxWidth,f=c.boxHeight;c.img.css({width:b+"px",height:f+"px"});c.boxWidth!=b||c.boxHeight!=f?c.image0Holder.animate({width:b+8,height:f+8,left:(c.pw-
b)/2,top:(c.ph-f)/2},300,function(){c.image0Holder.append(c.img)}):(c.image0Holder.append(c.img),c.image1Holder.append(c.img))})},setImagePosition:function(){},show:function(){},hide:function(){}}).extend("Item");global.hddr.soa8=hddr.soa7+"i";global.hddr.sov9=function(b,c){return b+"ph"+c+"l"};
Class("Carousel",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.width=Number(this.config.width)*this.pageWidth;this.height=Number(this.config.height)*this.pageHeight;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.config.duration||(this.config.duration=3);this.id="carousel"+g;this.imageItem=[];if(this.images=Instance.copy(this.config.images))this.images.node instanceof Array&&(this.images=this.images.node),this.images[0]||(this.images=[this.images.node]);
if(!(1>this.config.images)){if(this.images&&this.images.length)for(b=0;b<this.images.length;b++)this.imageItem.push(this.images[b]),this.imageItem[b].url=this.fixRelativePath(this.imageItem[b].url);this.content=$("<div class='initCarousel'></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.setRotation(this.content,this.config.rotation);this.currentIndex=0;this.parent.append(this.content);this.initImages();
this.config.showButton&&this.initButtons()}},parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,alpha:b.alpha,images:b.Images,duration:parseInt(b.duration),autoPlay:parseBool(b.autoBool),showButton:parseBool(b.selectBtn),hasShadow:parseBool(b.shadow.hasDropShadow),shadow:b.shadow}},initImages:function(){if(void 0!=this.images&&null!=this.images&&0!=this.images.length){this.refreshImageAndPosition();this.carouselList=
new CarouselImageList(this.imageItem.length);this.carouselList.setResources(this.aImages);this.carouselList.setImagesIndex(this.aImagesIndex);this.carouselList.setPositions(this.aPositions);for(var b=0;b<this.aPositions.length;b++){var c=new CarouselImage(this,this.aPositions[b]);c.setBoxIndex(b);this.carouselList.addInstance(c)}this.carouselList.loadResources();this.carouselList.blurAll()}},initButtons:function(){this.leftButton=$('<img class="flip-action" src="'+uiBaseURL+'pre_image.png" style="position:absolute;z-index:1000"></img>');
this.rightButton=$('<img class="flip-action" src="'+uiBaseURL+'next_image.png" style="position:absolute;z-index:1000"></img>');this.setButtonPosition();this.content.append(this.leftButton);this.content.append(this.rightButton);this.leftButton.bind(_event._down,function(){return!1});this.leftButton.bind(_event._end,function(b){this.move(1);b.stopPropagation&&b.stopPropagation();return!1}.bind(this));this.rightButton.bind(_event._down,function(){return!1});this.rightButton.bind(_event._end,function(b){this.move(-1);
b.stopPropagation&&b.stopPropagation();return!1}.bind(this))},refreshImageAndPosition:function(){void 0!=this.imageItem&&null!=this.imageItem&&0!=this.imageItem.length&&(this.instanceCount=5,5>this.imageItem.length&&(this.instanceCount=Math.min(this.imageItem.length)),this.refreshImages(),this.refreshPositions())},refreshImages:function(){this.refreshImagesIndex();this.aImages=[];for(var b=0;b<this.aImagesIndex.length;b++)this.aImages.push(this.imageItem[this.aImagesIndex[b]].url)},refreshImagesIndex:function(){this.aImagesIndex=
[];switch(this.instanceCount){case 1:this.aImagesIndex.push(0);break;case 2:this.aImagesIndex.push(this.currentIndex%this.imageItem.length);this.aImagesIndex.push((this.currentIndex+1)%this.imageItem.length);break;case 3:this.aImagesIndex.push((this.currentIndex-1+this.imageItem.length)%this.imageItem.length);this.aImagesIndex.push(this.currentIndex%this.imageItem.length);this.aImagesIndex.push((this.currentIndex+1)%this.imageItem.length);break;case 4:this.aImagesIndex.push((this.currentIndex-1+this.imageItem.length)%
this.imageItem.length);this.aImagesIndex.push(this.currentIndex%this.imageItem.length);this.aImagesIndex.push((this.currentIndex+1)%this.imageItem.length);break;default:this.aImagesIndex.push((this.currentIndex-2+this.imageItem.length)%this.imageItem.length),this.aImagesIndex.push((this.currentIndex-1+this.imageItem.length)%this.imageItem.length),this.aImagesIndex.push(this.currentIndex%this.imageItem.length),this.aImagesIndex.push((this.currentIndex+1)%this.imageItem.length),this.aImagesIndex.push((this.currentIndex+
2)%this.imageItem.length)}},refreshPositions:function(){this.aPositions=[];var b=this.width/5;switch(this.instanceCount){case 1:Math.ceil(this.width/2);this.aPositions.push(new CarouselPosition(0,0,this.width,this.height,1,1));break;case 2:var b=Math.ceil(this.width/2),c=Math.ceil(this.width/4);this.aPositions.push(new CarouselPosition(c,0,b,this.height,2,1));c=Math.ceil(b+0.1*b)/0.8;this.aPositions.push(new CarouselPosition(c,0.1*this.height/0.8,b,this.height,1,0.8));break;case 3:b=Math.ceil(this.width/
2);c=Math.ceil(0.05*b)/0.8;this.aPositions.push(new CarouselPosition(c,0.1*this.height/0.8,b,this.height,1,0.8));c=Math.ceil(this.width/4);this.aPositions.push(new CarouselPosition(c,0,b,this.height,2,1));c=Math.ceil(b)/0.8;this.aPositions.push(new CarouselPosition(c,0.1*this.height/0.8,b,this.height,1,0.8));break;case 4:b=Math.ceil(this.width/2);c=Math.ceil(0.05*b)/0.8;this.aPositions.push(new CarouselPosition(c,0.1*this.height/0.8,b,this.height,1,0.8));c=Math.ceil(this.width/4);this.aPositions.push(new CarouselPosition(c,
0,b,this.height,2,1));c=Math.ceil(b)/0.8;this.aPositions.push(new CarouselPosition(c,0.1*this.height/0.8,b,this.height,1,0.8));break;default:b=this.width/3,c=Math.ceil(0.2*b)/0.6,this.aPositions.push(new CarouselPosition(c,0.2*this.height/0.6,b,this.height,1,0.6)),c=Math.ceil(this.width/6+0.1*b)/0.8,this.aPositions.push(new CarouselPosition(c,0.1*this.height/0.8,b,this.height,2,0.8)),this.aPositions.push(new CarouselPosition(b,0,b,this.height,3,1)),c=Math.ceil(this.width/2)/0.8,this.aPositions.push(new CarouselPosition(c,
0.1*this.height/0.8,b,this.height,2,0.8)),c=Math.ceil(0.66*this.width)/0.6,this.aPositions.push(new CarouselPosition(c,0.2*this.height/0.6,b,this.height,1,0.6))}},play:function(){this.config.autoPlay&&(this.timer=window.setInterval(function(){this.move(1)}.bind(this),1E3*this.config.duration))},pause:function(){this.config.autoPlay&&(window.clearInterval(this.timer),this.timer=null)},move:function(b){this.isMoving||(this.isMoving=!0,this.currentIndex+=b,this.currentIndex>=this.imageItem.length&&(this.currentIndex%=
this.imageItem.length),0>this.currentIndex&&(this.currentIndex+=this.imageItem.length),this.instanceCount=this.carouselList.instanceCount(),this.refreshImages(),this.carouselList.setResources(this.aImages),this.carouselList.setImagesIndex(this.aImagesIndex),this.carouselList.move(b),function(){this.isMoving=!1}.delay(this,1E3))},moveTo:function(b){5<=this.imageItem.length?this.move(b-2):4==this.imageItem.length?this.move(b-1):this.move(b-this.currentIndex)},onResize:function(b,c){this.pageWidth=b;
this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.content.css({width:this.width+"px",height:this.height+"px"});this.setPosition();this.config.showButton&&this.setButtonPosition();this.refreshImageAndPosition();this.carouselList.setResources(this.aImages);this.carouselList.setImagesIndex(this.aImagesIndex);this.carouselList.setPositions(this.aPositions);this.carouselList.resizeAll()},setPosition:function(){this.x=this.config.x*this.pageWidth;
this.y=this.config.y*this.pageHeight;this.content.css({left:this.x+"px",top:this.y+"px"})},setButtonPosition:function(){var b=(this.height-32)/2;this.leftButton.css({left:"0px",top:b+"px"});this.rightButton.css({right:"0px",top:b+"px"})}}).extend("Item");
var CarouselImage=Class({create:function(b,c){this.parent=b;this.position=Instance.copy(c);this.instance=$('<img style="position:absolute"/>');this.parent.content.append(this.instance);this.parent.addShadow(this.instance);this.imageHeight=this.imageWidth=0;this.instance.load(this.onImageLoad.bind(this));this.instance.bind(_event._down,function(){return!1});this.instance.bind(_event._end,this.onClick.bind(this));this.setArea();this.setZindex(this.position.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},setIndex:function(b){this.imageIndex=b},setBoxIndex:function(b){this.boxIndex=b},onImageLoad:function(){var b=this.instance[0];this.imageWidth=b.naturalWidth;this.imageHeight=
b.naturalHeight;this.resetPosition();this.setArea(this.position)},onClick:function(){4>this.parent.imageItem.length?this.parent.moveTo(this.imageIndex):this.parent.moveTo(this.boxIndex);return!1},resetPosition:function(){if(0!=this.imageWidth&&0!=this.imageHeight){var b=Math.ceil(this.imageHeight*this.position.width/this.imageWidth);b>this.position.height?(b=Math.ceil(this.position.height*this.imageWidth/this.imageHeight),this.position.width=b):(this.position.height=b,this.position.top=(this.parent.height-
b)/2/this.position.scale)}},setArea:function(){this.instance.css({width:this.position.width+"px",height:this.position.height+"px"}).css(this.transformCSS({scale:this.position.scale,tran:{x:this.position.left,y:this.position.top}}))},setZindex:function(b){this.instance.css({"z-index":b})},gotoPosition:function(b){this.position=Instance.copy(b);this.setZindex(this.position.zindex);animateOnce(this.instance,this.transformCSS({tran:{x:this.position.left,y:this.position.top}}),0.5)},transformCSS:function(b){var c=
"",d={};void 0!=b.scale&&($.browser.msie||(c=c+"scale3d("+b.scale+","+b.scale+",1) "),$.browser.msie&&(c=c+"scale("+b.scale+") "));void 0!=b.rotate&&(c=c+"rotate("+b.rotate+"deg) ");void 0!=b.rotateY&&(c=c+"rotateY("+b.rotateY+"deg) ");b.tran&&($.browser.msie&&(c=c+"translate("+b.tran.x+"px,"+b.tran.y+"px) "),$.browser.msie||(c=c+"translate3d("+b.tran.x+"px,"+b.tran.y+"px,0px) "));void 0!=b.perspective&&(c=c+"perspective("+b.perspective+"px) ");void 0!=b.scaleX&&(c=c+"scaleX("+b.scaleX+") ");void 0!=
b.scaleY&&(c=c+"scaleY("+b.scaleY+") ");if(b.origin){var f=b.origin.x+"% "+b.origin.y+"%";d["-webkit-transform-origin"]=f;d["-moz-transform-origin"]=f;d["-ms-transform-origin"]=f;d["-o-transform-origin"]=f;d["transform-origin"]=f}c&&(d["-webkit-transform"]=c,d["-moz-transform"]=c,d["-ms-transform"]=c,d["-o-transform"]=c,d.transform=c);b.obj&&b.obj.css(d);return d}}),CarouselPosition=Class({create:function(b,c,d,f,g,h){this.left=Math.ceil(b);this.top=Math.ceil(c);this.width=Math.ceil(d);this.height=
Math.ceil(f);this.scale=parseFloat(h);this.zindex=g},asString:function(){return"transform:scale("+this.scale+") translate("+this.left+"px,"+this.top+"px),width:"+this.width+",height:"+this.height+",z-index:"+this.zindex}}),CarouselImageList=Class({create:function(b){this.imgLength=b;this.imageInstances=[]},setResources:function(b){this.imageResources=[];for(var c=0;c<b.length;c++)this.imageResources.push(b[c])},setImagesIndex:function(b){this.imagesIndex=[];for(var c=0;c<b.length;c++)this.imagesIndex.push(b[c])},
setPositions:function(b){this.imagePositions=[];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]),d.setIndex(this.imagesIndex[c]))}},move:function(b){var c=this.imageInstances.length;if(0!=c){for(var d=[],
f=0;f<c;f++)d[f]=this.imageInstances[f];for(f=0;f<c;f++){var g=f+b;0>g&&(g+=c);g>=c&&(g%=c);this.imageInstances[f]=d[g]}for(f=0;f<c;f++)b=this.imageInstances[f],b.setBoxIndex(f),b.gotoPosition(this.imagePositions[f]);this.loadResources();this.blurAll()}},resizeAll:function(){var b=this.imageInstances.length;if(0!=b)for(var c=0;c<b;c++){var d=this.imageInstances[c];d.gotoPosition(this.imagePositions[c]);d.resetPosition();d.setArea()}},blurAll:function(){for(var b=this.imageInstances.length,c=Math.floor((b+
1)/2)-1,d=0;d<b;d++){var f=this.imageInstances[d];d!=c?f.blur(!0):f.blur(!1)}}});global.hddr.sob8=hddr.soa8;global.hddr.soq2=hddr.sov9(hddr.soa8,hddr.soq3)+"5";
Class("DynamicShow",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.childWidth=Math.ceil(this.width/4);this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.borderWidth=this.config.borderWidth;this.id="dynshow"+g;this.images=Instance.copy(this.config.images);this.imageItem=[];this.images||(this.images=[]);this.images[0]||(this.images=[this.images.Image]);if(this.images&&
this.images.length)for(b=0;b<this.images.length;b++)this.imageItem.push(this.images[b]),this.imageItem[b]=this.fixRelativePath(this.imageItem[b]);this.maxZindex=this.images.length+1;this.content=$("<div id='DynamicShow'></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.setRotation(this.content,this.config.rotation);this.currentIndex=0;this.parent.append(this.content);this.init()},parseConfig:function(b){return{width:b.location.width,
height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,alpha:b.alpha,images:b.Images,borderWidth:b.borderWidth}},init:function(){this.imageInstances=[];if(0!=this.imageItem.length){for(var b=0;b<this.imageItem.length;b++){var c=new ImageInstance(this,b);c.setImage(this.imageItem[b]);this.content.append(c);this.imageInstances.push(c)}this.currentIndex=-1;this.initButtons()}},initButtons:function(){this.leftButton=$('<img class="flip-action" src="'+uiBaseURL+'pre_image.png" style="position:absolute;z-index:1000"></img>');
this.rightButton=$('<img class="flip-action" src="'+uiBaseURL+'next_image.png" style="position:absolute;z-index:1000"></img>');this.setButtonPosition();this.leftButton.bind(_event._click,function(){this.preImage()}.bind(this));this.rightButton.bind(_event._click,function(){this.nextImage()}.bind(this));this.leftButton.css({display:"none"});this.rightButton.css({display:"none"});this.content.append(this.leftButton);this.content.append(this.rightButton);isPhone()||isPad()||(this.content.bind(_event._enter,
function(){this.leftButton.css({display:"block"});this.rightButton.css({display:"block"})}.bind(this)),this.content.bind(_event._leave,function(){this.leftButton.css({display:"none"});this.rightButton.css({display:"none"})}.bind(this)))},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())},refreshZindex:function(){for(var b=this.imageInstances[this.currentIndex].zIndex,c=0;c<this.images.length;c++)if(c!=this.currentIndex){var d=this.imageInstances[c].zIndex;d>b&&(d--,this.imageInstances[c].setZindex(d))}this.imageInstances[this.currentIndex].setZindex(this.images.length-
1)},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){var d=b/this.pageWidth;this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.content.css({width:this.width+"px",height:this.height+"px"});this.setPosition();this.setButtonPosition();this.childWidth=Math.ceil(this.width/4);for(var f=0;f<this.imageInstances.length;f++)this.imageInstances[f].onResize(d)},
setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.content.css({left:this.x+"px",top:this.y+"px"})}}).extend("Item");
var ImageInstance=Class({create:function(b,c){this.parent=b;this.zIndex=this.index=c;this.imageHeight=this.imageWidth=0;this.borderWidth=Math.ceil(this.parent.borderWidth/2);this.height=this.width=this.parent.width-2*this.borderWidth;this.maxLeft=this.parent.width-this.width;this.maxTop=this.parent.height-this.height;this.randomPos=randomPosition(this.parent.width/2,this.parent.height/2);this.rotation=this.randomPos.rotation;this.animate=[];this.instance=$("<img></img>");this.instance.css({position:"absolute",
display:"none"});this.setTransform(this.instance,this.randomPos);this.setBorderWidth(this.borderWidth);this.initShadow();this.initEvents();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"})},initEvents:function(){this.instance.load(function(){this.onImageLoad()}.bind(this));this.instance.bind(_event._click,
function(){this.parent.currentIndex==this.index?(this.hide(),this.parent.currentIndex=-1):this.parent.showImage(this.index)}.bind(this))},onImageLoad:function(){var b=this.instance[0];this.imageWidth=b.naturalWidth;this.imageHeight=b.naturalHeight;this.getImgConfig();this.height=Math.ceil(this.imageHeight*this.width/this.imageWidth);this.maxTop=this.parent.height-this.height;this.instance.css({width:this.width+"px",height:this.height+"px",left:this.left+"px",top:this.top+"px",display:"block"})},setImage:function(b){this.instance.attr("src",
b)},onResize:function(b){this.instance.css("z-Index")!=this.parent.maxZindex&&(this.randomPos.left*=b,this.randomPos.top*=b,this.setTransform(this.instance,this.randomPos));this.getImgConfig();this.resize()},resize:function(){this.instance.css({width:this.width+"px",height:this.height+"px",left:this.left+"px",top:this.top+"px"})},setTransform:function(b,c){b.css({"-webkit-transform":"rotate("+c.rotation+"deg) scale("+c.scale+") translate("+c.left+"px,"+c.top+"px)","-ms-transform":"rotate("+c.rotation+
"deg) scale("+c.scale+") translate("+c.left+"px,"+c.top+"px)","-moz-transform":"rotate("+c.rotation+"deg) scale("+c.scale+") translate("+c.left+"px,"+c.top+"px)","-o-transform":"rotate("+c.rotation+"deg) scale("+c.scale+") translate("+c.left+"px,"+c.top+"px)",transform:"rotate("+c.rotation+"deg) scale("+c.scale+") translate("+c.left+"px,"+c.top+"px)"})},getTransform:function(b){return{"-webkit-transform":"rotate("+b.rotation+"deg) scale("+b.scale+") translate("+b.left+"px,"+b.top+"px)","-ms-transform":"rotate("+
b.rotation+"deg) scale("+b.scale+") translate("+b.left+"px,"+b.top+"px)","-moz-transform":"rotate("+b.rotation+"deg) scale("+b.scale+") translate("+b.left+"px,"+b.top+"px)","-o-transform":"rotate("+b.rotation+"deg) scale("+b.scale+") translate("+b.left+"px,"+b.top+"px)",transform:"rotate("+b.rotation+"deg) scale("+b.scale+") translate("+b.left+"px,"+b.top+"px)"}},move:function(){this.instance.css({left:this.left+"px",top:this.top+"px"})},setZindex:function(b){this.zIndex=b;this.instance.css({"z-index":b})},
setBorderWidth:function(b){this.instance.css({border:b+"px solid white"})},getImgConfig:function(){this.imageWidth/this.imageHeight>this.parent.width/this.parent.height?(this.width=this.parent.width-2*this.borderWidth,this.height=this.width*this.imageHeight/this.imageWidth,this.left=0,this.top=(this.parent.height-this.height-2*this.borderWidth)/2):(this.height=this.parent.height-2*this.borderWidth,this.width=this.height*this.imageWidth/this.imageHeight,this.left=(this.parent.width-this.width-2*this.borderWidth)/
2,this.top=0)},show:function(){0!=this.imageWidth&&0!=this.imageHeight&&(this.instance.css({"z-index":this.parent.maxZindex}),animateOnce(this.instance,this.getTransform({left:"0",top:"0",rotation:"0",scale:"1"}),500))},hide:function(){0!=this.imageWidth&&0!=this.imageHeight&&(this.randomPos=randomPosition(this.parent.width/2,this.parent.height/2),this.parent.refreshZindex(),animateOnce(this.instance,this.getTransform(this.randomPos),500))}});
function randomPosition(b,c){var d=Math.floor(Math.random()*b);0.5>=Math.random()&&(d=-d);var f=Math.floor(Math.random()*c);0.5>=Math.random()&&(f=-f);var g=75-Math.floor(150*Math.random());return{left:d,top:f,scale:0.25,rotation:g}}
Class("FocusJump",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.id="flip_jump_"+g;this.translate=0;this.initContent();this.initImages();this.initButtons();this.initEvents();parseBool(this.config.reflection)&&this.imageReflection(this.content);this.onResize(d,f)},initContent:function(){this.content=$("<div id='"+this.id+"'></div>");this.content.css({overflow:"hidden",position:"absolute","z-index":"1"});this.setRotation(this.content,this.config.rotation);this.imagesContent=
$("<div></div>");this.imagesContent.css({position:"absolute",left:"0px",top:"0px",height:"100%"}).css(transformCSS({tran:{x:0,y:0}}));this.parent.append(this.content);this.content.append(this.imagesContent);this.initBackground()},initBackground:function(){if(this.config.addBackground){var b=Color(this.config.backgroundColor);this.content.css({"background-color":b.rgba(this.config.backgroundAlpha)})}this.config.addBorder&&(b=Color(this.config.borderColor),this.content.css({border:this.config.borderWidth+
"px solid "+b.rgba(this.config.borderAlpha)}))},initButtons:function(){this.leftButton=$('<img class="flip-action" src="'+uiBaseURL+'pre_image.png" style="position:absolute;z-index:1000;left:0px;top:0px;bottom:0px;margin:auto"></img>');this.rightButton=$('<img class="flip-action" src="'+uiBaseURL+'next_image.png" style="position:absolute;z-index:1000;right:0px;top:0px;bottom:0px;margin:auto"></img>');isPhone()||isPad()||(this.leftButton.css({display:"none"}),this.rightButton.css({display:"none"}));
this.content.append(this.leftButton);this.content.append(this.rightButton)},initImages:function(){this.$images=[];this.images=this.config.images;if(""!=this.images){if(!(this.images instanceof Array)){if(""==this.images)return;this.images.node&&(this.images=[this.images.node])}for(var b=this,c=0;c<this.images.length;c++){var d=this.images[c].url,d=this.fixRelativePath(d),f=$("<img style='position:absolute;display:none;bottom:0px'></img>");f.load(function(){var c=$(this);b.resizeImage(c);c.css({display:"block"}).css(transformCSS({tran:{x:0,
y:0}}))});f.attr("src",d);this.imagesContent.append(f);this.$images.push(f)}}},resizeImage:function(b){if(b[0].naturalWidth&&b[0].naturalHeight){var c=this.getImageWidth();b.css({width:c+"px",height:Math.floor(c/b[0].naturalWidth*b[0].naturalHeight)+"px"})}},getImageWidth:function(){return Math.floor((this.width-3*this.margin)/3)},parseConfig:function(b){return{width:b.location.width,height:b.location.height,x:b.location.x,y:b.location.y,rotation:b.location.rotation,reflection:b.location.reflection,
reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,images:b.componentData.Images,addBackground:parseBool(b.componentData.addBack),addBorder:parseBool(b.componentData.addBorder),backgroundColor:b.componentData.backColor,backgroundAlpha:b.componentData.backAlpha,borderColor:b.componentData.borderColor,borderAlpha:b.componentData.borderAlpha,borderWidth:b.componentData.borderWidth}},initEvents:function(){this.content.bind(_event._enter,function(){3>=this.images.length||
(this.leftButton.css({display:"block"}),this.rightButton.css({display:"block"}))}.bind(this));this.content.bind(_event._leave,function(){this.leftButton.css({display:"none"});this.rightButton.css({display:"none"})}.bind(this));this.leftButton.bind(_event._click,function(b){this.moveLeft();b.stopPropagation&&b.stopPropagation();return!1}.bind(this));this.rightButton.bind(_event._click,function(b){this.moveRight();b.stopPropagation&&b.stopPropagation();return!1}.bind(this));for(var b=this,c=0;c<this.$images.length;c++){var d=
this.$images[c];isPhone()||isPad()?(d.bind(_event._down,function(){b.moveImageUp($(this))}),d.bind(_event._end,function(){b.moveImageDown($(this))})):(d.bind(_event._enter,function(){b.moveImageUp($(this))}),d.bind(_event._leave,function(){b.moveImageDown($(this))}))}},moveLeft:function(){this.translate+=this.getImageWidth();0<this.translate&&(this.translate=0);animateOnce(this.imagesContent,transformCSS({tran:{x:this.translate,y:0}}),1E3)},moveRight:function(){this.translate-=this.getImageWidth();
var b=this.width-this.imagesContent.width();this.translate<b&&(this.translate=b);animateOnce(this.imagesContent,transformCSS({tran:{x:this.translate,y:0}}),1E3)},moveImageUp:function(b){animateOnce(b,transformCSS({tran:{x:0,y:-Math.floor(this.height/4)}}),800)},moveImageDown:function(b){animateOnce(b,transformCSS({tran:{x:0,y:0}}),800)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.left=this.pageWidth*this.config.x;this.top=this.pageHeight*this.config.y;this.width=this.pageWidth*
this.config.width;this.height=this.pageHeight*this.config.height;this.margin=Math.floor(5*this.width/100);this.content.css({left:this.left+"px",top:this.top+"px",width:this.width+"px",height:this.height+"px"});this.resizeImages()},resizeImages:function(){var b=this.getImageWidth();this.imagesContent.css({width:this.margin+(this.margin+b)*this.$images.length+"px"});if(1==this.$images.length){var c=this.$images[0],d=this.margin+b;c.css({left:d+"px"});this.resizeImage(c)}else for(var f=0;f<this.$images.length;f++)c=
this.$images[f],d=this.margin+(this.margin+b)*f,c.css({left:d+"px"}),this.resizeImage(c)}}).extend("Item");
Class("FlipJump",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.id="jump"+g;this.itemHeight=Math.floor(0.7*this.height);this.images=this.config.images;this.images[0]||(this.images=[this.images.Image]);this.Items=[];this.imageCount=this.images.length;if(this.images&&this.images instanceof Array)for(b=0;b<this.images.length;b++)this.Items.push(this.images[b]),
this.Items[b]=this.fixRelativePath(this.Items[b]);this.minZindex=0;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","z-index":"1"});this.setRotation(this.content,this.config.rotation);this.initBackground();this.parent.append(this.content);this.init()},initBackground:function(){if(this.config.addBackground){var b=Color(this.config.backgroundColor);this.content.css({"background-color":b.rgba(this.config.backgroundAlpha)})}this.config.addBorder&&
(b=Color(this.config.borderColor),this.content.css({border:"1px solid "+b.rgba(this.config.borderAlpha)}))},parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,alpha:b.alpha,images:b.Images,addBackground:parseBool(b.addBack),addBorder:parseBool(b.addBorder),backgroundColor:b.backgroundColor,backgroundAlpha:b.backgroundColorAlpha,borderColor:b.backgroundBorderColor}},init:function(){this.busy=!1;this.imageItems=[];
for(var b=0;b<this.Items.length;b++){var c=new FlipJumpItem(this,0==b?!1:!0);c.setImage(this.Items[b]);this.imageItems.push(c)}this.resetZindex();this.resetJumpEvent();1<=this.imageCount&&this.initButtons()},initButtons:function(){this.leftButton=$('<img class="flip-action" src="'+uiBaseURL+'pre_image.png" style="position:absolute;z-index:1000"></img>');this.rightButton=$('<img class="flip-action" src="'+uiBaseURL+'next_image.png" style="position:absolute;z-index:1000"></img>');this.setButtonPosition();
var b=this;this.leftButton.bind(_event._click,function(b){this.preImage();b.stopPropagation&&b.stopPropagation();return!1}.bind(this));this.rightButton.bind(_event._click,function(b){this.nextImage();b.stopPropagation&&b.stopPropagation();return!1}.bind(this));this.leftButton.css({display:"none"});this.rightButton.css({display:"none"});this.content.append(this.leftButton);this.content.append(this.rightButton);isPhone()||isPad()||(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;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;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=0;b<this.imageItems.length;b++)this.imageItems[b].instance.bind(_event._click,function(){this.nextImage()}.bind(this))},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.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;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.pageWidth;this.y=this.config.y*this.pageHeight;this.content.css({left:this.x+
"px",top:this.y+"px"})}}).extend("Item");
var FlipJumpItem=Class({create:function(b,c){this.parent=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(){this.onImageLoad()}.bind(this));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.parent.width-this.width)/2);this.top=Math.ceil((this.parent.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.css(transformCSS({rotate:b,tran:{x:0,y:0}})),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,f=20;void 0!=c&&(f=c);var g=this,h=0,k=window.setInterval(function(){var c=
$.easing.swing(null,h,d,b-d,f);g.instance.rotate(c);g.rotation=c;h++>=f&&window.clearInterval(k)},20)},jumpUp:function(b){animateOnce(this.instance,transformCSS({rotate:0,tran:{x:0,y:Math.floor(1.5*-this.height)}}),400,b)},jumpDown:function(b){animateOnce(this.instance,transformCSS({rotate:this.getRandomRotation(),tran:{x:0,y:0}}),400,b)},resize:function(){if(0!=this.imageWith||0!=this.imageHeight)this.height=this.parent.itemHeight,this.width=Math.ceil(this.height*this.imageWidth/this.imageHeight),
this.left=Math.ceil((this.parent.width-this.width)/2),this.top=Math.ceil((this.parent.height-this.height)/2),this.instance.animate({left:this.left,top:this.top,width:this.width,height:this.height},400)}});
Class("Rotate3D",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.id="3d"+g;if(""!=this.config.images&&(this.images=this.config.images,this.images||(this.images=[]),this.Item=[],this.images instanceof Array||(this.images=[],this.images.node&&(this.images=[this.images.node]),this.images.Image&&(this.images=[this.image.Image])),
this.imageCount=this.images.length,0!=this.imageCount)){this.topZindex=this.imageCount;if(this.images&&this.images.length)for(b=0;b<this.images.length;b++)this.Item.push(this.images[b]),this.Item[b]=this.fixRelativePath(this.Item[b]);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 "+Color(this.config.borderColor).toString()});this.setRotation(this.content,
this.config.rotation);!0==this.config.addBackground&&this.content.css({background:Color(this.config.backgroundColor).toString(),opacity:this.config.backgroundAlpha/100});this.parent.append(this.content);this.init();this.rotateTimer=-1;this.step=0}},parseConfig:function(b){return{width:b.location.width,height:b.location.height,x:b.location.x,y:b.location.y,rotation:b.location.rotation,alpha:b.alpha,images:b.componentData.Images,addBackground:parseBool(b.componentData.addBack),addBorder:parseBool(b.componentData.addBorder),
backgroundColor:b.componentData.backColor,backgroundAlpha:b.componentData.backAlpha,borderColor:b.componentData.borderColor,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor}},init:function(){this.imageItems=[];for(var b=0;b<this.Item.length;b++){var c=new Rotate3DItem(this,b);c.setImage(this.Item[b]);this.imageItems.push(c)}this.imageItems[0].show();this.currentIndex=0;1<this.Item.length&&this.initButtons()},initButtons:function(){this.leftButton=
$('<img class="flip-action" src="'+uiBaseURL+'pre_image.png" style="position:absolute;z-index:1000"></img>');this.rightButton=$('<img class="flip-action" src="'+uiBaseURL+'next_image.png" style="position:absolute;z-index:1000"></img>');this.setButtonPosition();var b=this;this.leftButton.bind(_event._down,this.preImage.bind(this));this.rightButton.bind(_event._down,this.nextImage.bind(this));this.leftButton.bind(_event._end,this.stopRotate.bind(this));this.rightButton.bind(_event._end,this.stopRotate.bind(this));
this.leftButton.bind(_event._leave,this.stopRotate.bind(this));this.rightButton.bind(_event._leave,this.stopRotate.bind(this));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.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;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.pageWidth;this.y=this.config.y*this.pageHeight;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(){b.doRotate()},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}}).extend("Item");
var Rotate3DItem=Class({create:function(b,c){var d=this;this.parent=b;this.zIndex=c;this.height=this.parent.height;this.width=this.parent.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.parent.config;this.shadowColor=Color(b.sr).toString();!0==b.sh&&this.instance.css({"box-shadow":b.sx+"px "+b.sy+"px "+b.se+"px "+this.shadowColor,"-moz-box-shadow":b.sx+"px "+b.sy+"px "+b.se+"px "+this.shadowColor,"-webkit-box-shadow":b.sx+"px "+b.sy+"px "+b.se+"px "+this.shadowColor,"-ms-box-shadow":b.sx+"px "+b.sy+"px "+b.se+"px "+this.shadowColor,"-o-box-shadow":b.sx+"px "+b.sy+"px "+b.se+"px "+this.shadowColor})},onImageLoad:function(){var b=this.instance[0];this.imageWidth=b.naturalWidth;
this.imageHeight=b.naturalHeight;this.height=Math.floor(0.9*this.parent.height);this.width=Math.ceil(this.height*this.imageWidth/this.imageHeight);this.left=Math.ceil((this.parent.width-this.width)/2);this.top=Math.ceil((this.parent.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.parent.topZindex)},
hide:function(){this.setZindex(this.zIndex)},resize:function(){if(0!=this.imageWidth||0!=this.imageHeight)this.height=Math.floor(0.9*this.parent.height),this.width=Math.ceil(this.height*this.imageWidth/this.imageHeight),this.left=Math.ceil((this.parent.width-this.width)/2),this.top=Math.ceil((this.parent.height-this.height)/2),this.instance.animate({left:this.left,top:this.top,width:this.width,height:this.height},400)}});
Class("EmbeddedSlideshow",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);c=Instance.copy(this.config.images);this.photoItem=[];if(c.Image){if("string"==typeof c.Image&&this.photoItem.push(c.Image),c.Image instanceof Array)for(b=0;b<c.Image.length;b++)this.photoItem.push(c.Image[b].Image)}else for(b=0;b<c.length;b++)this.photoItem.push(c[b]);c=this.photoItem.length;for(b=0;b<c;b++)this.photoItem[b]=this.fixRelativePath(this.photoItem[b]);if(4>c)for(b=c;4>b;b++)this.photoItem[b]=
this.photoItem[0];2==c&&(this.photoItem[2]=this.photoItem[0],this.photoItem[3]=this.photoItem[1]);this.imgIndex=-1;this.imgWidth=this.config.width*this.pageWidth;this.imgHeight=this.config.height*this.pageHeight;this.boxWidth=this.imgWidth-8;this.boxHeight=this.imgHeight-8;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.interval=0;this.fadeTime=800;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",width:this.imgWidth,height:this.imgHeight});this.setRotation(this.background,this.config.rotation);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;' />");this.parent.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(transformCSS({tran:{x:this.moveLeft,y:this.moveTop}}));this.image1Holder.children().css(transformCSS({tran:{x:-this.moveLeft,y:-this.moveTop}}));this.image2Holder.children().css(transformCSS({tran:{x:-this.moveLeft,y:this.moveTop}}));this.image3Holder.children().css(transformCSS({tran:{x:this.moveLeft,
y:-this.moveTop}}));this.image0Holder.css({opacity:"0"});this.image1Holder.css({opacity:"0"});this.image2Holder.css({opacity:"0"});this.image3Holder.css({opacity:"1"})},play:function(){this.timer1=setTimeout(this.transition.bind(this),this.interval);this.playing=!0},pause:function(){this.playing=!1},parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,alpha:b.alpha,images:b.Images}},transition:function(){function b(){0<
c.fadeTime&&(c.fadeTime-=2,600<c.fadeTime&&800>=c.fadeTime&&0<c.nextAlpha&&100>=c.alpha&&(animateOnce(c.image0Holder,{opacity:1},2500,{},"%sopacity","linear"),animateOnce(c.image3Holder,{opacity:0},2500,{},"%sopacity","linear"),c.left=parseFloat($(c.image0Holder.children()).css("transform").slice(7,-1).split(",")[4])+c.tranLeft,c.top=parseFloat($(c.image0Holder.children()).css("transform").slice(7,-1).split(",")[5])+c.tranTop,c.nextLeft=parseFloat($(c.image3Holder.children()).css("transform").slice(7,
-1).split(",")[4])+c.tranLeft,c.nextTop=parseFloat($(c.image3Holder.children()).css("transform").slice(7,-1).split(",")[5])-c.tranTop,c.image0Holder.children().css(transformCSS({tran:{x:c.left,y:c.top}})),c.image1Holder.children().css(transformCSS({tran:{x:c.moveLeft,y:-c.moveTop}})),c.image2Holder.children().css(transformCSS({tran:{x:c.moveLeft,y:c.moveTop}})),c.image3Holder.children().css(transformCSS({tran:{x:c.nextLeft,y:c.nextTop}})),602==c.fadeTime&&(c.alpha=100,c.nextAlpha=0,c.currentImage=
(c.currentImage+1)%c.images.length,c.nextImage=(c.nextImage+1)%c.images.length,c.image1Holder.empty().append(c.images[c.currentImage]),c.image2Holder.empty().append(c.images[c.nextImage]),c.image1Holder.css({opacity:"0"}),c.image2Holder.css({opacity:"0"}),c.image1Holder.children().css(transformCSS({tran:{x:c.moveLeft,y:-c.moveTop}})),c.image2Holder.children().css(transformCSS({tran:{x:c.moveLeft,y:c.moveTop}})))),400<c.fadeTime&&600>=c.fadeTime&&0<c.alpha&&100>=c.nextAlpha&&(animateOnce(c.image0Holder,
{opacity:0},2500,{},"%sopacity","linear"),animateOnce(c.image1Holder,{opacity:1},2500,{},"%sopacity","linear"),c.left=parseFloat($(c.image0Holder.children()).css("transform").slice(7,-1).split(",")[4])+c.tranLeft,c.top=parseFloat($(c.image0Holder.children()).css("transform").slice(7,-1).split(",")[5])+c.tranTop,c.nextLeft=parseFloat($(c.image1Holder.children()).css("transform").slice(7,-1).split(",")[4])-c.tranLeft,c.nextTop=parseFloat($(c.image1Holder.children()).css("transform").slice(7,-1).split(",")[5])+
c.tranTop,c.image0Holder.children().css(transformCSS({tran:{x:c.left,y:c.top}})),c.image1Holder.children().css(transformCSS({tran:{x:c.nextLeft,y:c.nextTop}})),c.image2Holder.children().css(transformCSS({tran:{x:c.moveLeft,y:c.moveTop}})),c.image3Holder.children().css(transformCSS({tran:{x:-c.moveLeft,y:c.moveTop}})),402==c.fadeTime&&(c.nextAlpha=100,c.alpha=0,c.currentImage=(c.currentImage+1)%c.images.length,c.nextImage=(c.nextImage+1)%c.images.length,c.image2Holder.empty().append(c.images[c.currentImage]),
c.image3Holder.empty().append(c.images[c.nextImage]),c.image2Holder.css({opacity:"0"}),c.image3Holder.css({opacity:"0"}),c.image2Holder.children().css(transformCSS({tran:{x:c.moveLeft,y:c.moveTop}})),c.image3Holder.children().css(transformCSS({tran:{x:-c.moveLeft,y:c.moveTop}})))),200<c.fadeTime&&400>=c.fadeTime&&0<c.nextAlpha&&100>=c.alpha&&(animateOnce(c.image2Holder,{opacity:1},2500,{},"%sopacity","linear"),animateOnce(c.image1Holder,{opacity:0},2500,{},"%sopacity","linear"),c.left=parseFloat($(c.image2Holder.children()).css("transform").slice(7,
-1).split(",")[4])-c.tranLeft,c.top=parseFloat($(c.image2Holder.children()).css("transform").slice(7,-1).split(",")[5])-c.tranTop,c.nextLeft=parseFloat($(c.image1Holder.children()).css("transform").slice(7,-1).split(",")[4])-c.tranLeft,c.nextTop=parseFloat($(c.image1Holder.children()).css("transform").slice(7,-1).split(",")[5])+c.tranTop,c.image0Holder.children().css(transformCSS({tran:{x:-c.moveLeft,y:-c.moveTop}})),c.image1Holder.children().css(transformCSS({tran:{x:c.nextLeft,y:c.nextTop}})),c.image2Holder.children().css(transformCSS({tran:{x:c.left,
y:c.top}})),c.image3Holder.children().css(transformCSS({tran:{x:-c.moveLeft,y:c.moveTop}})),202==c.fadeTime&&(c.alpha=100,c.nextAlpha=0,c.currentImage=(c.currentImage+1)%c.images.length,c.nextImage=(c.nextImage+1)%c.images.length,c.image3Holder.empty().append(c.images[c.currentImage]),c.image0Holder.empty().append(c.images[c.nextImage]),c.image3Holder.css({opacity:"0"}),c.image0Holder.css({opacity:"0"}),c.image3Holder.children().css(transformCSS({tran:{x:-c.moveLeft,y:-c.moveTop}})),c.image0Holder.children().css(transformCSS({tran:{x:-c.moveLeft,
y:c.moveTop}})))),0<c.fadeTime&&200>=c.fadeTime&&0<c.alpha&&100>=c.nextAlpha&&(animateOnce(c.image2Holder,{opacity:0},2500,{},"%sopacity","linear"),animateOnce(c.image3Holder,{opacity:1},2500,{},"%sopacity","linear"),c.left=parseFloat($(c.image2Holder.children()).css("transform").slice(7,-1).split(",")[4])-c.tranLeft,c.top=parseFloat($(c.image2Holder.children()).css("transform").slice(7,-1).split(",")[5])-c.tranTop,c.nextLeft=parseFloat($(c.image3Holder.children()).css("transform").slice(7,-1).split(",")[4])+
c.tranLeft,c.nextTop=parseFloat($(c.image3Holder.children()).css("transform").slice(7,-1).split(",")[5])-c.tranTop,c.image0Holder.children().css(transformCSS({tran:{x:-c.moveLeft,y:-c.moveTop}})),c.image1Holder.children().css(transformCSS({tran:{x:c.moveLeft,y:-c.moveTop}})),c.image2Holder.children().css(transformCSS({tran:{x:c.left,y:c.top}})),c.image3Holder.children().css(transformCSS({tran:{x:c.nextLeft,y:c.nextTop}})),2==c.fadeTime&&(c.nextAlpha=100,c.alpha=0,c.currentImage=(c.currentImage+1)%
c.images.length,c.nextImage=(c.nextImage+1)%c.images.length,c.image0Holder.empty().append(c.images[c.currentImage]),c.image1Holder.empty().append(c.images[c.nextImage]),c.image0Holder.css({opacity:"0"}),c.image1Holder.css({opacity:"0"}),c.image0Holder.children().css(transformCSS({tran:{x:-c.moveLeft,y:-c.moveTop}})),c.image1Holder.children().css(transformCSS({tran:{x:c.moveLeft,y:-c.moveTop}})))));0>=c.fadeTime&&(clearInterval(c.timer0),c.fadeTime=800,c.playing&&(c.timer1=setTimeout(c.transition.bind(c),
c.interval)))}if(!(1>this.photoItem.length)){var c=this;c.timer0=setInterval(b,40)}},addItem:function(){for(var b=this,c=0;c<b.photoItem.length;c++){var d=$("<div></div>");d.css({width:b.boxWidth+"px",height:b.boxHeight+"px",position:"absolute"});var f=$('<img data-mask="'+uiBaseURL+'centerblur.png"/>');f.css("position","absolute");var g=b.photoItem[c];d.append(f);$(f).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",
g);b.images[c]=d}},resizeItem:function(){for(var b=0;b<this.photoItem.length;b++){var c=this.images[b],d=c.children(),f=d[0];void 0!=d&&null!=d&&$(d).css({left:(this.boxWidth-f.naturalWidth)/2+"px",top:(this.boxHeight-f.naturalHeight)/2+"px",position:"absolute"});this.images[b]=c}},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.imgWidth=this.config.width*this.pageWidth;this.imgHeight=this.config.height*this.pageHeight;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.pageWidth;this.y=this.config.y*this.pageHeight;this.background.css({left:this.x+"px",top:this.y+"px"});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()}}).extend("Item");
Class("FlashSwf",{Package:"PageItem",create:function(b,c,d,f){this.config=this.parseConfig(c);this.parent=b;this.pageWidth=d;this.pageHeight=f;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.left=this.pageWidth*this.config.x;this.top=this.pageHeight*this.config.y;this.config.src=this.config.src;this.config.hint&&(this.config.hint.hintShapeColor=Color(this.config.hint.hintShapeColor).toString(),this.config.hint.hintShapeColor2=Color(this.config.hint.hintShapeColor2).toString());
this.content=$("<div></div>");this.content.css({position:"absolute",left:this.left,top:this.top,width:this.width,height:this.height});this.setRotation(this.content,this.config.rotation);this.parent.append(this.content);isTouchDevice()||(this.config.src=this.fixRelativePath(this.config.src),this.initLinkHint(this.content),this.content.flash({swf:this.config.src,width:this.width+"px",height:this.height+"px",wmode:"transparent"}),parseBool(this.config.reflection)&&this.imageReflection(this.content))},
parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,x:b.location.x,y:b.location.y,alpha:b.alpha,src:b.swfURL,hint:b.hint,shadow:b.shadow}},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;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*this.pageWidth,this.config.y*this.pageHeight)},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"})}}).extend(PageItem.Item);
(function(b){var c=0,d={mode:"iframe",standard:"html5",popHt:500,popWd:400,popX:200,popY:200,popTitle:"",popClose:!1,extraCss:"",extraHead:"",retainAttr:["id","class","style"]},f={};b.fn.printArea=function(h){b.extend(f,d,h);c++;b("[id^=printArea_]").remove();f.id="printArea_"+c;h=b(this);var k=g.getPrintWindow();g.write(k.doc,h);setTimeout(function(){g.print(k)},1E3)};var g={print:function(c){var d=c.win;b(c.doc).ready(function(){d.focus();d.print();"popup"==f.mode&&f.popClose&&setTimeout(function(){d.close()},
2E3)})},write:function(b,c){b.open();b.write(g.docType()+"<html>"+g.getHead()+g.getBody(c)+"</html>");b.close()},docType:function(){return"iframe"==f.mode?"":"html5"==f.standard?"<!DOCTYPE html>":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01'+("loose"==f.standard?" Transitional":"")+'//EN" "http://www.w3.org/TR/html4/'+("loose"==f.standard?"loose":"strict")+'.dtd">'},getHead:function(){var b="";f.extraHead&&f.extraHead.replace(/([^,]+)/g,function(c){b+=c});return"<head><title>"+f.popTitle+"</title>"+
b+"</head>"},getBody:function(c){var d="",l=f.retainAttr;c.each(function(){for(var c=g.getFormData(b(this)),f="",h=0;h<l.length;h++){var q=b(c).attr(l[h]);q&&(f+=(0<f.length?" ":"")+l[h]+"='"+q+"'")}d+="<div "+f+">"+b(c).html()+"</div>"});return"<body>"+d+"</body>"},getFormData:function(c){var d=c.clone(),f=b("input,select,textarea",d);b("input,select,textarea",c).each(function(c){var d=b(this).attr("type");"undefined"===b.type(d)&&(d=b(this).is("select")?"select":b(this).is("textarea")?"textarea":
"");var g=f.eq(c);"radio"==d||"checkbox"==d?g.attr("checked",b(this).is(":checked")):"text"==d?g.attr("value",b(this).val()):"select"==d?b(this).find("option").each(function(c){b(this).is(":selected")&&b("option",g).eq(c).attr("selected",!0)}):"textarea"==d&&g.text(b(this).val())});return d},getPrintWindow:function(){switch(f.mode){case "iframe":var b=new g.Iframe;return{win:b.contentWindow||b,doc:b.doc};case "popup":return b=new g.Popup,{win:b,doc:b.doc}}},Iframe:function(){var c=f.id,d;try{d=document.createElement("iframe"),
document.body.appendChild(d),b(d).attr({style:"border:0;position:absolute;width:0px;height:0px;right:0px;top:0px;",id:c,src:"#"+(new Date).getTime()}),d.doc=null,d.doc=d.contentDocument?d.contentDocument:d.contentWindow?d.contentWindow.document:d.document}catch(g){throw g+". iframes may not be supported in this browser.";}if(null==d.doc)throw"Cannot find document.";return d},Popup:function(){var b;b="location=yes,statusbar=no,directories=no,menubar=no,titlebar=no,toolbar=no,dependent=no"+(",width="+
f.popWd+",height="+f.popHt);b+=",resizable=yes,screenX="+f.popX+",screenY="+f.popY+",personalbar=no,scrollbars=yes";b=window.open("","_blank",b);b.doc=b.document;return b}}})(jQuery);
Class("PageItemPopup",{Package:"PageItem.Popup",dialog:null,left:0,top:0,width:0,height:0,containerWidth:0,containerHeight:0,create:function(b,c){this.container=b||tmpContainer;this.containerWidth=b.width();this.containerHeight=b.height();this.zIndex=c||1E3},onResize:function(b,c){this.containerWidth=b;this.containerHeight=c;this.dialog.css({left:Math.floor((b-this.width)/2)+"px",top:Math.floor((c-this.height)/2)+"px","z-index":this.zIndex})},fixRelativePath:function(b){return b&&"string"===typeof b?
!0==bookConfig.isFlipPdf?b.startsWith("../")?b:b.startsWith("./")?"."+b:b.isUrl()?b:"../"+b:b:b},destroy:virtual_function,show:virtual_function,hide:virtual_function});Class("PageItemNormalPopup",{Package:"PageItem.Popup",create:function(b,c){this._super(b,c)},destroy:function(){this._super();this.hide();this.dialog=null},show:function(){this.container.append(this.dialog)},hide:function(){this.dialog.remove()}}).extend("PageItemPopup");
Class("PageItemModalPopup",{Package:"PageItem.Popup",modalBackground:null,create:function(b,c){this._super(b,c);this.createModalBackground()},createModalBackground:function(){this.modalBackground=$("<div name='modal_dialog_background'></div>");this.modalBackground.css({left:"0%",top:"0%",width:"100%",height:"100%",position:"absolute","background-color":"rgba(0, 0, 0, 0.5)","z-index":this.zIndex,cursor:"default"});this.initModalBackgroundEvents()},initModalBackgroundEvents:function(b){this.modalBackground.bind("click",
function(){this.hide();return!1}.bind(this));this.modalBackground.bind(_event._down,function(b){b.stopPropagation();return!1}.bind(this));this.modalBackground.bind(_event._up,function(b){b.stopPropagation();return!1}.bind(this))},destroy:function(){this._super();this.hide();this.modalBackground=this.dialog=null},show:function(){this.container.append(this.dialog);this.container.append(this.modalBackground)},hide:function(){this.dialog.remove();this.modalBackground.remove()}}).extend("PageItemPopup");
var QAF_UNKNOWN=-1,QAF_RIGHT=0,QAF_MISTAKE=1;
Class("QuizPanelPC",{Package:"PageItem.Popup",create:function(b,c){this._super(b);this.config=c;this.parent=b;this.quiz=this.config.action.quiz;this.quiz[0]||(this.quiz=[this.quiz.topic]);this.dialog=$("<div></div>");this.closeButton=$("<div></div>");this.content=$("<div></div>");this.title=$("<div class='titleDiv'></div>");this.button=$("<div></div>");this.rightSmile=$("<div style='background:url("+uiBaseURL+"quiz.png) no-repeat -5px -14px;position:absolute;left:25px;top:85px;width:38px;height:50px'></div>");this.mistakeSmile=
$("<div style='background:url("+uiBaseURL+"quiz.png) no-repeat -5px -74px;position:absolute;right:25px;top:85px;width:38px;height:50px'></div>");this.rightNumber=$("<div style='position:absolute;left:37px;top:145px;color:#03B503;font-size:25px;font-weight:bold'>0</div>");this.mistakeNumber=$("<div style='position:absolute;right:37px;top:145px;color:red;font-size:25px;font-weight:bold'>0</div>");this.nextPage=$("<div/></div>");this.prePage=$("<div><div>");this.advanceImg=$("<div></div>");this.progressBar=
new TopicProgressBar(this.quiz.length);this.dialog.append(this.content);this.dialog.append(this.closeButton);this.parent.append(this.dialog);this.initQuiz();this.content.append(this.title).append(this.changBox).append(this.rightSmile).append(this.mistakeSmile).append(this.rightNumber).append(this.mistakeNumber).append(this.nextPage).append(this.prePage).append(this.progressBar.progressContainer);this.title.html(this.config.action.guizTxt);""==this.config.action.guizURL?this.setQuestionURL(this.topicItem[0].QuizTopicPanel.content):
(this.advance=new SetAdvance(this.config.action,this),this.content.append(this.advance.QuizTopicPanel.content),this.hideButton(),this.progressBar.progressContainer.hide(),this.advance.start.on("click",function(){this.setQuestionURL(this.topicItem[0].QuizTopicPanel.content);this.showButton();this.topicItem[this.currentIndex].QuizTopicPanel.Animate();this.prePage.hide();this.progressBar.progressContainer.show();this.advance.QuizTopicPanel.content.remove()}.bind(this)));this.setCss();this.initEvent();
this.prePage.hide()},setQuestionURL:function(b){this.content.append(b)},initEvent:function(){this.currentIndex=0;var b=this.topicItem.length;this.OnNextPageClick=function(){if(!(this.currentIndex>b))if(this.currentIndex+=1,this.progressBar.setProgress(this.currentIndex+1),this.currentIndex<b)this.setQuestionURL(this.topicItem[this.currentIndex].QuizTopicPanel.content),this.topicItem[this.currentIndex].QuizTopicPanel.Animate(),this.prePage.show();else{var c=new Onclusion(this,this.config.action,this.rightNumber[0].innerText,
this.mistakeNumber[0].innerText);this.setQuestionURL(c.QuizTopicPanel.content);this.nextPage.hide()}}.bind(this);this.nextPage.on("click",this.OnNextPageClick);this.prePage.on("click",function(){0!=this.currentIndex&&(0==this.currentIndex&&(this.currentIndex+=b),this.currentIndex=(this.currentIndex-1)%b,this.setQuestionURL(this.topicItem[this.currentIndex].QuizTopicPanel.content),this.topicItem[this.currentIndex].QuizTopicPanel.Animate(),this.progressBar.setProgress(this.currentIndex+1),this.nextPage.show(),
0==this.currentIndex&&this.prePage.hide())}.bind(this));this.closeButton.bind("click",function(b){b.stopPropagation();this.hide()}.bind(this));this.nextPage.on("mouseover",function(){this.nextPage.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -257px -61px",cursor:"pointer"})}.bind(this));this.nextPage.on("mouseout",function(){this.nextPage.css("background","url("+uiBaseURL+"quiz.png) no-repeat -257px -16px")}.bind(this));this.prePage.on("mouseover",function(){this.prePage.css({background:"url("+
uiBaseURL+"quiz.png) no-repeat -310px -62px",cursor:"pointer"})}.bind(this));this.prePage.on("mouseout",function(){this.prePage.css("background","url("+uiBaseURL+"quiz.png) no-repeat -310px -17px")}.bind(this));$(window).resize(this.onResize.bind(this))},initQuiz:function(){this.topicItem=[];this.topicAnswer=[];for(var b=0;b<this.quiz.length;b++)this.topic=new SetQuestionPanel(this,this.quiz[b],b),this.topicItem.push(this.topic),this.topicAnswer[b]=null},getAnswerFlags:function(){for(var b=[],c=0;c<
this.quiz.length;c++)null===this.topicAnswer[c]?b[c]=QAF_UNKNOWN:this.topicAnswer[c]==this.topicItem[c].getRightAnswer()?b[c]=QAF_RIGHT:b[c]=QAF_MISTAKE;return b},statistics:function(){for(var b=this.getAnswerFlags(),c=0,d=0,f=0;f<b.length;f++)b[f]==QAF_RIGHT&&c++,b[f]==QAF_MISTAKE&&d++;this.rightNumber[0].innerText=Number(c).toString();this.mistakeNumber[0].innerText=Number(d).toString()},showButton:function(){this.rightSmile.show();this.mistakeSmile.show();this.rightNumber.show();this.mistakeNumber.show();
this.nextPage.show();this.prePage.show()},hideButton:function(){this.rightSmile.hide();this.mistakeSmile.hide();this.rightNumber.hide();this.mistakeNumber.hide();this.nextPage.hide();this.prePage.hide()},setCss:function(){this.title.css({position:"relative",margin:"auto",width:"570px",height:"25px","margin-top":"20px","text-align":"center","font-size":"20px","font-family":"-webkit-pictograph"});this.closeButton.asButton();this.closeButton.css({position:"absolute","background-image":"url("+uiBaseURL+
"close_form.png)",width:"32px",height:"32px","z-index":"500",cursor:"pointer",right:"30px","margin-top":"24px"});this.dialog.css({position:"absolute",width:"760px",height:"550px",margin:"auto",left:"0",top:"0",right:"0",bottom:"0","z-index":"1001"});this.nextPage.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -257px -16px",position:"absolute",margin:"auto",right:"22px",top:"210px",width:"36px",height:"36px"});this.prePage.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -310px -17px",
position:"absolute",margin:"auto",left:"27px",top:"210px",width:"36px",height:"36px"});this.content.css({position:"absolute",background:"url("+uiBaseURL+"quiz.png) no-repeat -6px -148px","max-width":"722px","max-height":"502px",width:"100%",height:"100%",margin:"auto",left:"0",top:"0",right:"0",bottom:"0"})},onResize:function(){},show:function(){this._super();this.modalBackground.css("display","block")},hide:function(){this.modalBackground.css("display","none");this.dialog.css({transform:"scale(0)",
"-webkit-transform":"scale(0)","-moz-transform":"scale(0)","-ms-transform":"scale(0)","-o-transform":"scale(0)"});animateOnce(this.dialog,{},0.6);this._super.delay(this,600)}}).extend("PageItemModalPopup");
Class("QuizTopicPanel",{create:function(b){this.config=b;this.content=$("<div></div>");this.deg=10;this.setCss();this.Animate()},getQuizTopicPanel:function(){return this.content},setCss:function(){this.content.css({transform:"rotateZ(10deg) rotateX(10deg)","-weblkit-transform":"rotateZ(10deg) rotateX(10deg)","-moz-transform":"rotateZ(10deg) rotateX(10deg)","-ms-transform":"rotateZ(10deg) rotateX(10deg)","-o-transform":"rotateZ(10deg) rotateX(10deg)","transform-origin":"50% 80%","-webkit-transform-origin":"50% 80%",
"-ms-transform-origin":"50% 80%","-moz-transform-origin":"50% 80%","-o-transform-origin":"50% 80%",position:"absolute",background:"white",margin:"auto","margin-top":"40px",left:0,right:0,width:"560px",height:"360px",border:"3px solid #b8d0da","border-radius":"14px"})},Animate:function(){this.show.animation(this,300)},show:function(b,c){var d=$.easing.easeOutCubic(null,b,10,-10,c),f=$.easing.easeOutCubic(null,b,45,-45,c);this.content.css("transform","rotateX("+f+"deg) rotateY("+f+"deg) rotateZ("+d+
"deg) ")}});
Class("SetQuestionPanel",{create:function(b,c,d){this.config=c;this.index=d;this.quizPanel=b;this.questionPanel=$("<div></div>");this.question=$("<span style='color:rgb(0,153,255);font-size:30px;font-weight:bold;font-family:Verdana;position:absolute;top:15px;left:15px'>Q:</span>");this.initAnswer();this.questionTitle=$("<span style='color:rgb(0,153,255);font-size:20px;position:absolute;top:25px;left:70px'>"+this.config.title+"</span>");this.mediaImg=$("<img src='"+this.config.media+"' style='max-width:280px;max-height:220px;position:absolute;bottom: 0px;top:0px;margin:auto;left:50px;'/>");this.noImgAnswerPanel=
$("<div></div>");this.imgAnswerPanel=$("<div></div>");this.QuizTopicPanel=new QuizTopicPanel;this.QuizTopicPanel.getQuizTopicPanel().append(this.questionPanel.append(this.question).append(this.questionTitle).append(this.mediaImg));""==this.config.media?(this.mediaImg.remove(),this.questionPanel.append(this.noImgAnswerPanel)):this.questionPanel.append(this.imgAnswerPanel);this.setCss();this.getRightAnswer();this.addTopicAnswer()},initAnswer:function(){this.Items=[];for(var b in this.config)b.startsWith("answer")&&
this.Items.push(this.config[b])},getRightAnswer:function(){for(var b=0;b<this.Items.length;b++)"true"==this.Items[b].dataRight&&(this.dataRight=this.Items[b].value);return this.dataRight},addTopicAnswer:function(){for(var b=0;b<this.Items.length;b++){var c=new TopicAnswer(this.quizPanel,this.Items[b],this.config,this.dataRight,this.index);""==this.config.media?(0==(b+1)%2&&c.answerPanel.css("margin-left","20px"),this.noImgAnswerPanel.append(c.answerPanel)):this.imgAnswerPanel.append(c.answerPanel)}},
setCss:function(){this.imgAnswerPanel.css({width:"210PX",position:"absolute",right:"0px",top:"80px","overflow-x":"hidden",height:"250px"});this.noImgAnswerPanel.css({top:"125px",position:"absolute",width:"455px",left:"95px","overflow-x":"hidden",height:"230px"});this.questionPanel.css({position:"absolute",width:"560px",height:"350px",margin:"auto",right:0,left:0,top:0,bottom:0})}});
Class("TopicAnswer",{create:function(b,c,d,f,g){this.index=g;this.quizPanel=b;this.config=d;this.answer=c;this.dataRight=f;this.answerPanel=$("<div></div>");this.checkBox=$("<div class='check-box'><div>");this.answerValue=$("<div>"+this.answer.value+"</div>");this.answerPanel.append(this.checkBox);this.answerPanel.append(this.answerValue);this.initEvent();this.setCss()},initEvent:function(){this.checkBox.on("click",function(){this.quizPanel.topicAnswer[this.index]=this.answer.value;this.quizPanel.statistics();
this.answerResult=new TopicAnswerResult(this.quizPanel,this.config,this.answer,this.dataRight);this.quizPanel.content.append(this.answerResult.content)}.bind(this));this.checkBox.on("mouseover",function(){this.checkBox.css({width:"26px",height:"26px",cursor:"pointer",background:"url("+uiBaseURL+"quiz.png) no-repeat -630px -63px"})}.bind(this));this.checkBox.on("mouseleave",function(){this.checkBox.css({width:"20px",height:"20px",cursor:"pointer",background:"url("+uiBaseURL+"quiz.png) no-repeat -465px -67px"})}.bind(this))},
setCss:function(){this.answerValue.css({color:"#0f5177",position:"relative","margin-left":"30px","font-size":"15px",color:"#0f5177",width:"165px","font-family":"Verdana"});this.answerPanel.css({width:"200px","margin-top":"20px",position:"relative",display:"inline-block"});this.checkBox.css({position:"absolute",background:"url("+uiBaseURL+"quiz.png) no-repeat -465px -67px",width:"20px",height:"20px"})}});
Class("SetAdvance",{create:function(b){this.config=b;this.advanceImg=$("<img src='"+this.config.guizURL+"'/>");this.start=$("<div></div>");this.QuizTopicPanel=new QuizTopicPanel;this.QuizTopicPanel.getQuizTopicPanel().append(this.advanceImg).append(this.start);this.QuizTopicPanel.Animate();this.start.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -366px -20px",position:"absolute",width:"81px",height:"30px",right:0,left:0,bottom:"35px",margin:"auto"});this.advanceImg.css({"max-width":"360px",
"max-height":"250px",position:"absolute",top:"20px",right:0,left:0,margin:"auto"});this.start.on("mouseover",function(){this.start.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -366px -59px",cursor:"pointer"})}.bind(this));this.start.on("mouseout",function(){this.start.css("background","url("+uiBaseURL+"quiz.png) no-repeat -366px -20px")}.bind(this))}});
Class("TopicProgressBar",{create:function(b){this.quizLength=b;this.progressContainer=$("<div></div>");this.progressBar=$("<div></div>");this.progressContainer.append(this.progressBar);this.setCss();this.setProgress(1)},setCss:function(){this.progressContainer.css({position:"absolute",margin:"auto",right:"0",left:"0",bottom:"10px",width:"550px",border:"3px solid white",height:"18px","background-color":"rgb(229,233,236)","border-radius":"10px"});this.progressBar.css({background:"rgba(107,216,254,90)",
"float":"left",height:"18px","text-align":"center","line-height":"2","border-radius":"10px"})},setProgress:function(b){this.progressBar.css("width",100/(this.quizLength+1)*b+"%");this.progressBar.css("width").replace("px","")}});
Class("TopicAnswerResult",{create:function(b,c,d,f){this.quizPanel=b;this.dataRight=f;this.config=c;this.answer=d;this.content=$("<div></div>");this.nextQuestion=$("<div></div>");this.nextPage=$("<div></div>");this.nextText=$("<div>NEXT QUESTION</div>");this.answerOption=$("<span style='color:rgb(0,153,255);font-size:30px;font-weight:bold;font-family:Verdana;position:absolute;top:25px;left:35px'>A:</span>");this.answerResult=$("<span style='color:rgb(0,153,255);font-size:20px;position:absolute;top:35px;left:82px'></span>");
this.JudgeResult=$("<span></span>");this.content.append(this.nextQuestion.append(this.nextPage).append(this.nextText)).append(this.answerOption).append(this.answerResult).append(this.JudgeResult);this.setCss();this.initEvent();this.answerResult.text(this.dataRight);"true"==this.answer.dataRight?this.JudgeResult.text(this.config.rightTxt):this.JudgeResult.text(this.config.wrongTxt)},initEvent:function(){this.nextPage.on("click",this.quizPanel.OnNextPageClick);this.nextText.on("click",this.quizPanel.OnNextPageClick);
this.nextText.on("mouseover",function(){this.nextText.css({cursor:"pointer"})}.bind(this));this.nextPage.on("mouseover",function(){this.nextPage.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -257px -61px",cursor:"pointer"})}.bind(this));this.nextPage.on("mouseout",function(){this.nextPage.css("background","url("+uiBaseURL+"quiz.png) no-repeat -257px -16px")}.bind(this))},setCss:function(){this.content.css({position:"absolute",margin:"auto","margin-top":"43px",left:0,right:0,width:"460px",
height:"280px",border:"3px solid rgb(184, 208, 218)",bottom:"50px",background:"white","border-radius":"14px"});this.nextText.css({color:"rgb(0,153,255)","font-size":"14px","font-weight":"bold",width:"50px",position:"absolute",right:"110px",bottom:"30px","font-family":"Verdana"});this.nextPage.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -257px -16px",position:"absolute",bottom:"30px",right:"30px",width:"36px",height:"36px"});this.JudgeResult.css({position:"absolute",width:"460px","text-align":"center",
bottom:"140px",color:"black","font-family":"Verdana","font-size":"18px"})}});
Class("Onclusion",{create:function(b,c,d,f){this.quizPanel=b;this.mistakeNumber=f;this.config=c;this.rightNumber=d;this.percentageNumber=Math.floor(this.rightNumber/this.quizPanel.quiz.length*100);this.onclusionPanel=$("<div></div>");this.hint=$("<div>You haven't selected an answer,please select one</div>");this.clusion=$("<div>"+this.config.guizEndTxt+"</div>");this.Percentage=$("<div>"+getLanguage("TTActionQuiz_Ration","Your ration is")+" "+this.percentageNumber+"%</div>");this.scorePanel=$("<div></div>");
this.score=$("<div style='color: rgb(0, 152, 255);width: 315px;height: 45px;overflow-x: hidden'></div>");this.isAgain=$("<span>"+getLanguage("TTActionQuiz_PlayAgain","Do you wanna play it again?")+"</span>");this.button=$("<div></div>");this.yesButton=$("<div></div>");this.noButton=$("<div></div>");this.rightSmile=$("<div style='background:url("+uiBaseURL+"quiz.png) no-repeat -5px -14px;position:absolute;width:38px;height:50px'></div>");this.mistakeSmile=$("<div style='background:url("+uiBaseURL+
"quiz.png) no-repeat -5px -74px;position:absolute;width:38px;height:50px'></div>");this.byeBye=$("<div style='background:url("+uiBaseURL+"quiz.png) no-repeat -506px -66px;position:absolute;width:105px;height:20px;left:300px;top:230px'></div>");this.QuizTopicPanel=new QuizTopicPanel;this.QuizTopicPanel.content.append(this.onclusionPanel);0==this.mistakeNumber&&0==this.rightNumber?this.onclusionPanel.append(this.hint):this.onclusionPanel.append(this.clusion);this.onclusionPanel.append(this.Percentage).append(this.isAgain).append(this.scorePanel.append(this.score)).append(this.button.append(this.yesButton).append(this.noButton));
this.setCss();this.initEvent();0<=this.percentageNumber&&25>=this.percentageNumber&&this.score.text(this.config.score[3]);25<this.percentageNumber&&50>=this.percentageNumber&&this.score.text(this.config.score[2]);50<this.percentageNumber&&75>=this.percentageNumber&&this.score.text(this.config.score[1]);75<this.percentageNumber&&100>=this.percentageNumber&&(this.score.text(this.config.score[0]),100==this.percentageNumber&&this.score.css("color","#0098ff"))},initEvent:function(){this.yesButton.on("click",
function(){this.quizPanel.currentIndex=0;this.quizPanel.progressBar.setProgress(1);this.clearAllCount();this.quizPanel.statistics();this.quizPanel.setQuestionURL(this.quizPanel.topicItem[0].QuizTopicPanel.content);this.quizPanel.prePage.hide();this.quizPanel.nextPage.show()}.bind(this));this.noButton.on("click",function(){this.removeAllChild(this.quizPanel.content[0]);this.quizPanel.content.append(this.QuizTopicPanel.content);this.removeAllChild(this.QuizTopicPanel.content[0]);this.quizPanel.content.append(this.rightSmile).append(this.mistakeSmile).append(this.byeBye);
this.byeBye.animate("easeInElastic");this.rightSmile.animate({left:"210px"},400,"easeOutElastic");this.mistakeSmile.animate({right:"220px"},400,"easeOutElastic");this.quizPanel.hide()}.bind(this));this.yesButton.on("mouseover",function(){this.yesButton.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -71px -59px",cursor:"pointer"})}.bind(this));this.yesButton.on("mouseout",function(){this.yesButton.css("background","url("+uiBaseURL+"quiz.png) no-repeat -71px -20px")}.bind(this));this.noButton.on("mouseover",
function(){this.noButton.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -161px -59px",cursor:"pointer"})}.bind(this));this.noButton.on("mouseout",function(){this.noButton.css("background","url("+uiBaseURL+"quiz.png) no-repeat -161px -20px")}.bind(this))},clearAllCount:function(){for(var b=this.quizPanel.quiz.length,c=0;c<b;c++)this.quizPanel.topicAnswer[c]=null},removeAllChild:function(b){for(;b.hasChildNodes();)b.removeChild(b.firstChild)},setCss:function(){this.rightSmile.css({margin:"auto",
bottom:"0px",top:"0px",left:"45px",transform:"scale(3.5)","-webkit-transform":"scale(3.5)","-moz-transform":"scale(3.5)","-ms-transform":"scale(3.5)","-o-transform":"scale(3.5)"});this.mistakeSmile.css({margin:"auto",bottom:"0px",top:"0px",right:"50px",transform:"scale(3.5)","-webkit-transform":"scale(3.5)","-moz-transform":"scale(3.5)","-ms-transform":"scale(3.5)","-o-transform":"scale(3.5)"});this.scorePanel.css({position:"absolute",margin:"auto",right:"0px",left:"0px",top:"160px",color:"gray",
width:"300px","text-align":"center",height:"45px",overflow:"hidden","font-size":"20px"});this.Percentage.css({"font-weight":"bold","font-size":"20px",position:"absolute",margin:"auto",top:"120px",left:"0px",right:"0px",width:"200px",height:"20px"});this.clusion.css({width:"560px","font-size":"24px",color:"#045DD0","text-align":"center","margin-top":"40px"});this.isAgain.css({color:"#00a5ff","font-size":"20px","font-weight":"bold",width:"250px",position:"absolute","text-align":"center",bottom:"90px",
right:"0px",left:"0px",margin:"auto"});this.hint.css({width:"385px","font-size":"20px","font-weight":"bold",color:"#045DD0","text-align":"center","margin-left":"75px","margin-top":"35px"});this.onclusionPanel.css({position:"absolute","border-radius":"10px",background:$.browser.prefix+"linear-gradient(90deg,#f4f4f5,#FFFFFF)",margin:"auto",bottom:"0px",right:"0px",left:"0px",top:"0px"});this.yesButton.css({width:"81px",height:"30px",position:"absolute",background:"url("+uiBaseURL+"/quiz.png) no-repeat -71px -20px"});
this.noButton.css({width:"81px",height:"30px",right:"0px",position:"absolute",background:"url("+uiBaseURL+"/quiz.png) no-repeat -161px -20px"});this.button.css({margin:"auto",bottom:"25px",right:"0px",left:"0px",width:"204px",height:"30px",position:"absolute"})}});
Class("QuizPanelMobile",{Package:"PageItem.Popup",create:function(b,c){this._super(b);this.config=c;this.quiz=this.config.action.quiz;this.quiz[0]||(this.quiz=[this.quiz.topic]);this.dialog=$("<div></div>");this.content=$("<div class='container-box'></div>");this.contentMiddle=$("<div></div>");this.contentBottom=$("<div></div>");this.closeButton=$("<div></div>");this.title=$("<div>"+this.config.action.guizTxt+"</div>");this.rightNumber=$("<div>0</div>");this.mistakeNumber=$("<div>0</div>");this.questionContent=
$("<div></div>");this.initQuiz();this.setCss();this.initTransform();this.initEvent();this.setSwipe();this.progressBar=new TopicProgressBarMobile(this.quiz.length,this.currentIndex);this.dialog.append(this.contentMiddle).append(this.contentBottom).append(this.closeButton).append(this.content.append(this.title).append(this.questionContent)).append(this.progressBar.progressContainer);""==this.config.action.guizURL?this.setQuestionURL(this.topicItem[0].questionPanel):(this.advance=new SetAdvanceMobile(this.config.action,
this),this.content.append(this.advance.advanceImg).append(this.advance.start),this.progressBar.progressContainer.hide(),this.advance.start.on("click",function(){this.setQuestionURL(this.topicItem[0].questionPanel);this.progressBar.progressContainer.show();this.advance.advanceImg.remove();this.advance.start.remove()}.bind(this)))},initEvent:function(){this.currentIndex=0;var b=this.topicItem.length;this.OnNextPageClick=function(){if(!(this.currentIndex>b))if(this.currentIndex+=1,this.progressBar.setProgress(this.currentIndex+
1,b+1),this.currentIndex<b)this.setQuestionURL(this.topicItem[this.currentIndex].questionPanel);else{var c=new OnclusionMobile(this,this.config.action,this.rightNumber[0].innerText,this.mistakeNumber[0].innerText);this.setQuestionURL(c.onclusionPanel)}}.bind(this);this.closeButton.on("click",function(){this.hide()}.bind(this));$(window).resize(this.onResize.bind(this))},setQuestionURL:function(b){this.questionContent.append(b)},initQuiz:function(){this.topicItem=[];this.topicAnswer=[];for(var b=0;b<
this.quiz.length;b++)this.topic=new QuestionPanelMobile(this,this.quiz[b],b),this.topicItem.push(this.topic),this.topicAnswer[b]=null},getAnswerFlag:function(){for(var b=[],c=0;c<this.quiz.length;c++)null===this.topicAnswer?b[c]=QAF_UNKNOWN:this.topicAnswer[c]==this.topicItem[c].getRightAnswer()?b[c]=QAF_RIGHT:b[c]=QAF_MISTAKE;return b},flushCount:function(){for(var b=this.getAnswerFlag(),c=0,d=0,f=0;f<b.length;f++)b[f]==QAF_RIGHT&&c++,b[f]==QAF_MISTAKE&&d++;this.rightNumber[0].innerText=Number(c);
this.mistakeNumber[0].innerText=Number(d)},setSwipe:function(){this.currentIndex=0;var b=function(b,d){var f;f=30*windowWidth/1600;if(!(Math.abs(b)<=f)){var g=this.topicItem.length;if(b<-f){if(this.currentIndex>g)return;this.progressBar.setProgress(this.currentIndex+1,g+1);this.currentIndex+=1;this.progressBar.setProgress(this.currentIndex+1,g+1);if(this.currentIndex<g)this.setQuestionURL(this.topicItem[this.currentIndex].questionPanel);else{var h=new OnclusionMobile(this,this.config.action,this.rightNumber[0].innerText,
this.mistakeNumber[0].innerText);this.setQuestionURL(h.onclusionPanel)}}if(b>f){if(0>this.currentIndex)return;this.currentIndex-=1;this.setQuestionURL(this.topicItem[this.currentIndex].questionPanel);this.progressBar.setProgress(this.currentIndex+1,g+1)}$.browser.mise?event.cancelBubble=!0:event.stopPropagation()}}.bind(this);this.questionContent.speed(b)},show:function(){this._super();animateOnce(this.dialog,{transform:"translate(0,0)","-webkit-transform":"translate(0,0)","-moz-transform":"translate(0,0)",
"-o-transform":"translate(0,0)","-ms-transform":"translate(0,0)"},0.3,null,"","ease")},hide:function(){this._super();animateOnce(this.dialog,{transform:"translate(100%,0)","-webkit-transform":"translate(100%,0)","-moz-transform":"translate(100%,0)","-o-transform":"translate(100%,0)","-ms-transform":"translate(100%,0)"},0.3,null,"","ease")},setCss:function(){this.questionContent.css({position:"absolute","margin-top":"30px",background:"white",width:windowWidth-70+"px",left:"0px",right:"0px",margin:"auto",
"overflow-x":"hidden",height:windowHeight-150+"px"});this.title.css({position:"relative",margin:"auto",width:windowWidth-50+"px",height:"22px","margin-top":"20px","text-align":"center","font-size":"20px","font-family":"-webkit-pictograph"});this.closeButton.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -69px -100px",width:"42px",height:"47px","z-index":"100",position:"absolute",right:"0px"});this.contentBottom.css({position:"absolute",border:"1px solid rgba(221,221,221,0.6)",top:"34px",left:"0px",
right:"0px","background-color":"rgba(255,255,255,0.6)",width:windowWidth-90+"px",height:"50px",margin:"auto","border-radius":"5px"});this.contentMiddle.css({position:"absolute",border:"1px solid rgba(221,221,221,0.8)",top:"41px",left:"0px",right:"0px","background-color":"rgba(255,255,255,0.8)",width:windowWidth-70+"px",height:"50px",margin:"auto","border-radius":"5px","z-index":"100"});this.dialog.css({position:"absolute","background-color":"#eeeeee",width:windowWidth+"px",height:windowHeight+"px",
"z-index":"100"});this.content.css({position:"absolute",border:"1px solid #dddddd",bottom:"50px",left:"0px",right:"0px",margin:"auto","background-color":"#FFFFFF",width:windowWidth-50+"px",height:windowHeight-100+"px","border-radius":"5px","z-index":"100"})},initTransform:function(){this.dialog.css({transform:"translate(100%,0)","-webkit-transform":"translate(100%,0)","-moz-transform":"translate(100%,0)","-o-transform":"translate(100%,0)","-ms-transform":"translate(100%,0)"})},onResize:function(){this.setCss();
this.dialog.css({position:"absolute","background-color":"#eeeeee",width:windowWidth+"px",height:windowHeight+"px","z-index":"100"})}}).extend("PageItemNormalPopup");
Class("QuestionPanelMobile",{create:function(b,c,d){this.config=c;this.index=d;this.quizPanel=b;this.questionPanel=$("<div></div>");this.question=$("<span style='color:rgb(0,153,255);font-size:18px;font-weight:bold;font-family:Verdana;top:15px;left:15px'>Q:</span>");this.initAnswer();this.questionTitle=$("<span style='color:rgb(0,153,255);font-size:15px;top:19px;left:45px'>"+this.config.title+"</span>");this.mediaImg=$("<img src='"+this.config.media+"' style='max-width:"+(windowWidth-70)+"px;max-height:220px;margin-top:20px'/>");
this.questionPanel.append(this.question).append(this.questionTitle).append(this.mediaImg);this.getRightAnswer();this.addTopicAnswer();this.questionPanel.css({width:windowWidth-55+"px","overflow-x":"hidden","margin-top":"20px",position:"absolute","background-color":"white",height:windowHeight-170+"px"})},initAnswer:function(){this.Items=[];for(var b in this.config)b.startsWith("answer")&&this.Items.push(this.config[b])},getRightAnswer:function(){for(var b=0;b<this.Items.length;b++)if("true"==this.Items[b].dataRight)var c=
this.Items[b].value;return c},addTopicAnswer:function(){for(var b=0;b<this.Items.length;b++){var c=new TopicAnswerMoblie(this.quizPanel,this.Items[b],this.config,this.getRightAnswer(),this.index);this.questionPanel.append(c.answerPanel)}}});
Class("TopicAnswerResultMobile",{create:function(b,c,d,f){this.quizPanel=b;this.dataRight=f;this.config=c;this.answer=d;this.content=$("<div></div>");this.nextQuestion=$("<div></div>");this.nextPage=$("<div></div>");this.nextText=$("<div>NEXT QUESTION</div>");this.answerOption=$("<span style='color:rgb(0,153,255);font-size:30px;font-weight:bold;font-family:Verdana;position:absolute;top:25px;left:35px'>A:</span>");this.answerResult=$("<span style='color:rgb(0,153,255);font-size:20px;position:absolute;top:35px;left:82px'></span>");
this.JudgeResult=$("<span></span>");this.content.append(this.nextQuestion.append(this.nextPage).append(this.nextText)).append(this.answerOption).append(this.answerResult).append(this.JudgeResult);this.setCss();this.initEvent();this.answerResult.text(this.dataRight);"true"==this.answer.dataRight?this.JudgeResult.text(this.config.rightTxt):(this.JudgeResult.text(this.config.wrongTxt),this.JudgeResult.css("color","red"))},initEvent:function(){this.nextPage.on("click",this.quizPanel.OnNextPageClick);
this.nextPage.on("click",function(){this.content.remove()}.bind(this));this.nextText.on("click",this.quizPanel.OnNextPageClick);this.nextText.on("click",function(){this.content.remove()}.bind(this))},setCss:function(){this.content.css({position:"absolute",margin:"auto","margin-top":"43px",left:0,right:0,width:windowWidth-70+"px",height:windowHeight-200+"px",border:"1px solid #dddddd",bottom:"50px",background:"white","border-radius":"4px","z-index":100});this.nextText.css({color:"rgb(0,153,255)","font-size":"14px",
"font-weight":"bold",width:"50px",position:"absolute",right:"110px",bottom:"30px","font-family":"Verdana"});this.nextPage.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -257px -16px",position:"absolute",bottom:"30px",right:"30px",width:"36px",height:"36px"});this.JudgeResult.css({position:"absolute",width:windowWidth-70+"px","text-align":"center",bottom:"140px",color:"green","font-family":"Verdana","font-size":"18px"})}});
Class("TopicAnswerMoblie",{create:function(b,c,d,f,g){this.quizPanel=b;this.config=d;this.answer=c;this.index=g;this.dataRight=f;this.answerPanel=$("<div></div>");this.checkBox=$("<div><div>");this.answerValue=$("<div>"+this.answer.value+"</div>");this.answerPanel.append(this.checkBox);this.answerPanel.append(this.answerValue);this.initEvent();this.setCss()},initEvent:function(){this.checkBox.on("click",function(){this.quizPanel.topicAnswer[this.index]=this.answer.value;this.quizPanel.flushCount();
this.answerResult=new TopicAnswerResultMobile(this.quizPanel,this.config,this.answer,this.dataRight);this.quizPanel.content.append(this.answerResult.content)}.bind(this))},setCss:function(){this.answerValue.css({color:"#0f5177",position:"relative","margin-left":"30px","font-size":"15px",color:"#0f5177",width:"165px","font-family":"Verdana"});this.answerPanel.css({width:"200px","margin-top":"20px",position:"relative"});this.checkBox.css({position:"absolute",background:"url("+uiBaseURL+"quiz.png) no-repeat -465px -67px",
width:"20px",height:"20px"})}});
Class("OnclusionMobile",{create:function(b,c,d,f){this.quizPanel=b;this.config=c;this.rightNumber=d;this.mistakeNumber=f;this.percentageNumber=Math.floor(this.rightNumber/this.quizPanel.quiz.length*100);this.onclusionPanel=$("<div></div>");this.hint=$("<div>You haven't selected an answer,please select one</div>");this.clusion=$("<div>"+this.config.guizEndTxt+"</div>");this.Percentage=$("<div>"+getLanguage("TTActionQuiz_Ration","Your ration is")+" "+this.percentageNumber+"%</div>");this.scorePanel=
$("<div></div>");this.score=$("<div style='color:#DCAB1B;width: "+(windowWidth-70)+"px;height: 45px;overflow-x: hidden'></div>");this.isAgain=$("<span>"+getLanguage("TTActionQuiz_PlayAgain","Do you wanna play it again?")+"</span>");this.button=$("<div></div>");this.yesButton=$("<div></div>");this.noButton=$("<div></div>");0==this.mistakeNumber&&0==this.rightNumber?this.onclusionPanel.append(this.hint):this.onclusionPanel.append(this.clusion);this.onclusionPanel.append(this.Percentage).append(this.isAgain).append(this.scorePanel.append(this.score)).append(this.button.append(this.yesButton).append(this.noButton));
this.setCss();this.initEvent();0<=this.percentageNumber&&25>=this.percentageNumber&&this.score.text(this.config.score[3]);25<this.percentageNumber&&50>=this.percentageNumber&&this.score.text(this.config.score[2]);50<this.percentageNumber&&75>=this.percentageNumber&&this.score.text(this.config.score[1]);75<this.percentageNumber&&100>=this.percentageNumber&&(this.score.text(this.config.score[0]),100==this.percentageNumber&&this.score.css("color","#0098ff"))},initEvent:function(){this.yesButton.on("click",
function(){this.quizPanel.currentIndex=0;this.clearFlushCount();this.quizPanel.flushCount();this.quizPanel.progressBar.setProgress(1,this.quizPanel.quiz.length+1);this.quizPanel.setQuestionURL(this.quizPanel.topicItem[0].questionPanel)}.bind(this));this.noButton.on("click",function(){this.quizPanel.hide()}.bind(this))},clearFlushCount:function(){for(var b=this.quizPanel.quiz.length,c=0;c<b;c++)this.quizPanel.topicAnswer[c]=null},setCss:function(){this.scorePanel.css({position:"absolute",margin:"auto",
right:"0px",left:"0px",top:"160px",color:"gray",width:windowWidth-70+"px","text-align":"center",height:"45px",overflow:"hidden","font-size":"15px"});this.Percentage.css({"font-weight":"bold","font-size":"15px",position:"absolute",margin:"auto",top:"120px",left:"0px",right:"0px",width:windowWidth-70+"px","text-align":"center",height:"20px"});this.clusion.css({width:windowWidth-70+"px","font-size":"17px",color:"#045DD0","text-align":"center","margin-top":"40px"});this.isAgain.css({color:"#00a5ff","font-size":"15px",
"font-weight":"bold",width:"250px",position:"absolute","text-align":"center",bottom:"90px",right:"0px",left:"0px",margin:"auto"});this.hint.css({width:"250px","font-size":"15px","font-weight":"bold",color:"#045DD0","text-align":"center","margin-top":"35px"});this.onclusionPanel.css({position:"absolute",width:windowWidth-70+"px","border-radius":"10px",background:"white",margin:"auto",bottom:"0px",right:"0px",left:"0px",top:"0px"});this.yesButton.css({width:"81px",height:"30px",position:"absolute",
background:"url("+uiBaseURL+"/quiz.png) no-repeat -71px -20px"});this.noButton.css({width:"81px",height:"30px",right:"0px",position:"absolute",background:"url("+uiBaseURL+"/quiz.png) no-repeat -161px -20px"});this.button.css({margin:"auto",bottom:"25px",right:"0px",left:"0px",width:"204px",height:"30px",position:"absolute"})}});
Class("SetAdvanceMobile",{create:function(b){this.config=b;this.advanceImg=$("<img src='"+this.config.guizURL+"'/>");this.start=$("<div></div>");this.start.css({background:"url("+uiBaseURL+"quiz.png) no-repeat -366px -20px",position:"absolute",width:"81px",height:"30px",right:0,left:0,bottom:"35px",margin:"auto"});this.advanceImg.css({"max-width":windowWidth-80+"px","max-height":"200px",position:"absolute",top:0,right:0,left:0,bottom:0,margin:"auto"})}});
Class("TopicProgressBarMobile",{create:function(b,c){this.quizLength=b;this.currentIndex=c;this.progressContainer=$("<div></div>");this.progressBar=$("<div></div>");this.progressContainer.append(this.progressBar);this.setCss();this.setProgress(1,this.quizLength+1)},setCss:function(){this.progressContainer.css({position:"absolute",margin:"auto",right:"0",left:"0",bottom:"10px",width:windowWidth-50+"px",height:"30px","background-color":"white","border-radius":"3px"});this.progressBar.css({height:"30px",
"padding-top":"4px","text-align":"center","border-radius":"10px","font-size":"20px"})},setProgress:function(b,c){if(b>c)return b-1;this.progressBar.text(b+"/"+c)}});
Class("ShowInformation",{Package:"PageItem.Popup",create:function(b,c){this._super(b);this.config=c;this.width=parseInt(this.config.action.width);this.height=parseInt(this.config.action.height);this.bgColor1=Color(this.config.action.bgColor1).toString();this.bgColor2=Color(this.config.action.bgColor2).toString();this.buttonColor=Color(this.config.action.buttonColor).toString();this.buttonBgColor=Color(this.config.action.buttonBgColor).toString();this.fontColor=Color(this.config.action.titleColor).toString();
this.bodyColor=Color(this.config.action.bodyColor).toString();this.link=this.config.action.link;this.linkLength=this.config.action.link.length;this.contentBox=$('<div id="cbox"></div>');this.closeButton=$('<div id="closebutton"></div>');this.textTitle=$("<div></div>");this.text=$("<div></div>");this.content=$("<div></div>");this.dialog=$('<div id="conb"></div>');this.imgBox=$("<div></div>");this.img=$("<img>");"http://"==this.link.substring(this.linkLength-7,this.linkLength)?this.button=$("<a href='javascript:void(0);' target='_Blank'></a>"):
this.button=$("<a href = '"+this.link+"' target='_Blank' font-family='"+this.config.action.bodyFont+"'></a>");this.contentBox.append(this.textTitle);this.content.append(this.contentBox);this.dialog.append(this.content);this.dialog.append(this.closeButton);this.textTitle.html(this.config.action.titleText);this.button.html(this.config.action.buttonName);var d=new TextFormatAnalyzer(this.config.action.bodyText);if(null==this.config.action.bodyFont){var f=d.getFontFamily().split(",");this.config.action.bodyFont=
f[0];this.config.action.bodySize=d.getFontSize();this.config.action.bodyColor=d.getFontColor()}this.image=[this.config.action.imgURL];bookConfig.isFlipPdf&&(this.image[0].startsWith("./")?this.image[0]="."+this.image[0]:this.image[0].isUrl()||(this.image[0]="../"+this.image[0]));this.contentBox.append(this.text);d=new TextFormatAnalyzer(this.config.action.bodyText);d=d.getHTML();this.text.html(d);this.setCss()},setCss:function(){this.img.attr({src:this.image[0],align:"center"});this.contentBox.append(this.button);
this.setPcCss();"null"==this.config.action.imgURL&&(this.contentBox.css({position:"absolute",right:"25px","overflow-x":"hidden",width:this.width-50+"px",height:this.height-50+"px"}),this.textTitle.css({"font-size":this.config.action.titleSize,color:this.fontColor,"font-family":this.config.action.titleFont,"z-index":"2500",width:this.width-50+"px","margin-top":"30px"}),this.text.css({width:this.width-50+"px","max-height":this.height-150+"px","z-index":"2500","margin-top":"10px",overflow:"auto"}));
!0==parseBool(this.config.action.imgBool)&&null!==this.config.action.imgURL?(this.content.append(this.imgBox),this.imgBox.append(this.img),this.imgBox.css({width:"100%",height:"100%",position:"absolute","z-index":"3000","max-width":"195px","max-height":"290px",margin:"auto",right:"0px"}),this.contentBox.css({position:"absolute",left:"20px","overflow-x":"hidden",width:this.width-240+"px",height:this.height-25+"px"}),this.setText()):!1==parseBool(this.config.action.imgBool)&&"null"!=this.config.action.imgURL&&
(this.content.append(this.imgBox),this.imgBox.append(this.img),this.imgBox.css({width:"100%",height:"100%",position:"absolute","z-index":"3000","max-width":"195px","max-height":"290px",margin:"auto",left:"0"}),this.contentBox.css({position:"absolute",right:"10px",width:this.width-240+"px","overflow-x":"hidden",height:this.height-25+"px"}),this.setText());this.closeButton.asButton();this.closeButton.bind(_event._click,function(){this.hide()}.bind(this))},setPcCss:function(){this.closeButton.css({width:"100%",
height:"100%",position:"absolute","background-image":"url("+uiBaseURL+"close_form.png)","background-repeat":"no-repeat",cursor:"pointer","max-width":"32px","max-height":"32px","z-index":"3000","margin-top":"15px","margin-left":parseInt(this.width)-20+"px"});this.button.css({position:"absolute",color:this.buttonColor,"padding-left":"10px","padding-right":"10px","background-color":this.buttonBgColor,"text-decoration":"none","z-index":"2500",bottom:"0px",left:"0px"});this.img.css({"max-width":"190px",
"max-height":"290px",position:"absolute",margin:"auto",left:"0",top:"0",bottom:"0",right:"0"});this.dialog.css({"max-width":this.width+30+"px","max-height":this.height+30+"px",position:"absolute",margin:"auto",left:"0",top:"0",bottom:"0",right:"0","z-index":"3000"});this.content.css({width:"100%",height:"100%",position:"absolute",margin:"auto",left:"0",top:"0",bottom:"0",right:"0","max-width":this.width,"max-height":this.height,"z-index":"1900","background-image":$.browser.prefix+"repeating-linear-gradient("+
this.config.action.bgAngle+"deg, "+this.bgColor2+", "+this.bgColor1+")"})},setText:function(){this.textTitle.css({"font-size":this.config.action.titleSize,color:this.fontColor,"font-family":this.config.action.titleFont,"z-index":"2500",width:this.width-233+"px","margin-top":"30px",overflow:"hidden","text-overflow":"ellipsis"});this.text.css({"font-size":this.config.action.bodySize+"px",color:this.bodyColor,"font-family":this.config.action.bodyFont,width:this.width-240+"px",height:this.height-140+
"px",padding:"0px",outline:"medium",border:"0px","padding-right":"17px","margin-top":"25px","line-height":"2.0",background:"rgba(255,255,255,0)","z-index":"2500",overflow:"auto"})},show:function(){this._super();this.modalBackground.css({display:"block"})},hide:function(){this._super.delay(this,500);animateOnce(this.dialog,{transform:"scale(0)","-webkit-transform":"scale(0)","-moz-transform":"scale(0)","-o-transform":"scale(0)","-ms-transform":"scale(0)"},0.5,function(){this.modalBackground.empty();
this.modalBackground.remove()}.bind(this),"","ease")}}).extend("PageItemModalPopup");
Class("ShowInformationMobile",{Package:"PageItem.Popup",create:function(b,c){this._super(b);this.windowWidth=windowWidth;this.windowHeight=windowHeight;this.config=c;this.bgColor1=Color(this.config.action.bgColor1).toString();this.bgColor2=Color(this.config.action.bgColor2).toString();this.buttonColor=Color(this.config.action.buttonColor).toString();this.buttonBgColor=Color(this.config.action.buttonBgColor).toString();this.fontColor=Color(this.config.action.titleColor).toString();this.bodyColor=Color(this.config.action.bodyColor).toString();
this.link=this.config.action.link;this.linkLength=this.config.action.link.length;this.closeButton=$('<div id="closebutton"></div>');this.textTitle=$("<div></div>");this.text=$("<div></div>");this.content=$("<div></div>");this.dialog=$('<div id="conb"></div>');this.title=$("<div></div>");this.img=$("<img>");this.foot=$('<div style="width:100%;height:70px;position:relative;"></div>');"http://"==this.link.substring(this.linkLength-7,this.linkLength)?this.button=$("<a href='javascript:void(0);' target='_Blank'></a>"):
this.button=$("<a href = '"+this.link+"' target='_Blank' font-family='"+this.config.action.bodyFont+"'></a>");this.foot.append(this.button);this.textTitle.html(this.config.action.titleText);this.textTitle.text(this.textTitle.text().overflow(20));this.button.html(this.config.action.buttonName);var d=new TextFormatAnalyzer(this.config.action.bodyText);if(null==this.config.action.bodyFont){var f=d.getFontFamily().split(",");this.config.action.bodyFont=f[0];this.config.action.bodySize=d.getFontSize();
this.config.action.bodyColor=d.getFontColor()}this.dialog.append(this.title);this.title.append(this.closeButton);this.title.append(this.textTitle);this.dialog.append(this.content);this.content.append(this.img);this.content.append(this.text);d=new TextFormatAnalyzer(this.config.action.bodyText);d=d.getHTML();this.text.html(d);this.content.append(this.foot);bookConfig.isFlipPdf&&(this.config.action.imgURL.startsWith("./")?this.config.action.imgURL="."+this.config.action.imgURL:this.config.action.imgURL.isUrl()||
(this.config.action.imgURL="../"+this.config.action.imgURL));this.setPhone();this.closeButton.bind("click",function(){this.hide()}.bind(this));d=this.config.action.imgURL?this.config.action.imgURL.toLowerCase().trim():"";"null"!=d&&""!=d||this.img.remove()},setPhone:function(){this.title.css({position:"relative",width:"100%","background-color":"mintcream",border:"#CCCCCC 0.5px solid",height:"40px"});this.img.attr({src:this.config.action.imgURL,align:"center"});this.button.css({position:"absolute",
color:this.buttonColor,"padding-left":"8px","padding-right":"8px","background-color":this.buttonBgColor,"text-decoration":"none","z-index":"2500",right:"30px","border-radius":"6px",bottom:"30px"});this.img.css({position:"relative","max-width":"100%","max-height":"200px",margin:"10px auto",display:"block"});this.dialog.css({position:"absolute",width:"100%",height:"100%",transform:"translate(100%,0)","-webkit-transform":"translate(100%,0)","-moz-transform":"translate(100%,0)","-o-transform":"translate(100%,0)",
"-ms-transform":"translate(100%,0)","z-index":"3000","background-image":$.browser.prefix+"repeating-linear-gradient("+this.config.action.bgAngle+"deg, "+this.bgColor2+","+this.bgColor1+")"});this.content.css({width:this.windowWidth+15+"px","overflow-x":"hidden",height:this.windowHeight-40+"px"});this.textTitle.css({position:"absolute",width:"50%",margin:"auto","font-size":"12px",color:this.fontColor,"font-family":this.config.action.titleFont,"vertical-align":"middle","line-height":"3.0",left:"0",
top:"0",bottom:"0",right:"0","text-align":"center"});this.text.css({width:this.windowWidth-10+"px","font-size":this.config.action.bodySize+"px",color:this.bodyColor,"font-family":this.config.action.bodyFont,"overflow-y":"hidden","margin-top":"20px","padding-left":"5px","line-height":"2.0","text-indent":"2em"});this.closeButton.css({position:"absolute",margin:"auto","background-image":"url("+uiBaseURL+"background_prev.png)","background-repeat":"no-repeat",cursor:"pointer",width:"20px",height:"20px",
left:"10px",bottom:"0",top:"0"})},onResize:function(b,c){this.windowWidth=b;this.windowHeight=c;this.setPhone()},show:function(){this._super();(function(){animateOnce(this.dialog,{transform:"translate(0,0)","-webkit-transform":"translate(0,0)","-moz-transform":"translate(0,0)","-o-transform":"translate(0,0)","-ms-transform":"translate(0,0)"},0.3,null,"","ease")}).delay(this,100)},hide:function(){this._super.delay(this,300);animateOnce(this.dialog,{transform:"translate(100%,0)","-webkit-transform":"translate(100%,0)",
"-moz-transform":"translate(100%,0)","-o-transform":"translate(100%,0)","-ms-transform":"translate(100%,0)"},0.3,function(){this.dialog.empty();this.dialog.remove()}.bind(this),"","ease")}}).extend("PageItemNormalPopup");
Class("WindowHtml",{Package:"PageItem.Popup",create:function(b,c){this._super(b);this.parent=b;this.config=c;this.frameWidth=parseInt(this.config.windowWidth);this.frameHeight=parseInt(this.config.windowHeight);var d=this.config.windowURL;d.endsWith(".doc")?d=this.fixRelativePath(d):"http://"!=d.substr(0,7)&&"https://"!=d.substr(0,8)&&(d=d.startsWith("http:\\")?"http://"+d.substr(6,d.length):"http://"+d);this.dialog=$("<div name='frame_border'></div>");this.htmlFrame=$("<iframe class='flip-action' frameborder=0 src='"+
d+"' width='"+this.frameWidth+"' height='"+this.frameHeight+"'></iframe>");this.closeButton=$("<img src='"+uiBaseURL+"close_form.png'/>");this.dialog.append(this.closeButton);this.dialog.append(this.htmlFrame);this.setCss();this.initEvent();this.onResize();this.resizeTimer=this.onResize.interval(this,500);this.visible=!0;this.show()},destroy:function(){this._super();this.visible&&(this.visible=!1,this.htmlFrame.attr("src",""),this.resizeTimer&&this.resizeTimer.stop())},initEvent:function(){this.modalBackground.bind(_event._down,
function(b){this.destroy();b.stopPropagation()}.bind(this));this.closeButton.asButton();this.closeButton.bind(_event._end,function(b){this.destroy();b.stopPropagation()}.bind(this));this.dialog.bind(_event._down,function(b){b.stopPropagation();return!1}.bind(this))},setCss:function(){this.dialog.css({position:"absolute","z-index":"1001","background-color":"#F0F0F0","border-radius":"3px",margin:"auto",left:"0",top:"0",bottom:"0",right:"0"});this.htmlFrame.css({"background-color":"#F0F0F0",position:"relative",
"margin-left":"5px","margin-top":"32px"});this.closeButton.css({position:"absolute","z-index":"1",width:"32px",height:"32px",cursor:"pointer",right:"5px",top:"0px"})},onResize:function(){if(this.windowWidth!=windowWidth||this.windowHeight!=windowHeight){this.windowWidth=windowWidth;this.windowHeight=windowHeight;var b=windowWidth-10,c=windowHeight-10;isPhone()||(b=Math.min(this.frameWidth+10,b),c=Math.min(this.frameHeight+37,c));this.dialog.css({width:b+"px",height:c+"px"});c-=37;this.htmlFrame.attr("width",
b-10+"px");this.htmlFrame.attr("height",c+"px")}}}).extend("PageItemModalPopup");
Class("SwfSlide",{Package:"PageItem.Popup",create:function(b,c,d,f){this._super(b);c&&c.action&&(this.focus=!0,this.config=c,this.action=c.action,"string"==typeof this.action.swfURL&&""!=this.config.swfURL&&null!=this.config.swfURL&&void 0!=this.config.swfURL&&(this.action.swfURL=this.fixRelativePath(this.action.swfURL)),this.parent=b,this.elemConfig=c.elemConfig,this.element=this.elemConfig.element,"IMG"==this.element[0].tagName.toUpperCase()&&(this.element=this.element.panent()),this.windowWidth=
d,this.windowHeight=f,this.pageWidth=this.elemConfig.parentWidth,this.pageHeight=this.elemConfig.parentHeight,this.imgWidth=this.action.targetWidth,this.imgHeight=this.action.targetHeight,this.height=this.width=0,this.type=this.action.startType,this.initHtml(),this.imgLoad(),$(window).resize(this.onResize.bind(this)),this.initEvent())},initHtml:function(){this.dialog=$("<div style='display:none'></div>");this.box=$("<div id='box'></div>");this.close=$("<img class='closeImg'/>");this.background=$("<div class='BG'></div>");
"SWF"==this.action.targetType&&(this.img=$("<img src='"+this.action.swfURL+"' />"),this.box.append(this.img));if("Text"==this.action.targetType){var b=new TextFormatAnalyzer(this.action.targetText);this.fontSize=b.getMinFontSize();this.text=b.getHTML();this.box.append(this.text)}this.dialog.append(this.box);this.dialog.append(this.close);this.parent.append(this.dialog)},onResize:function(){this.getAttribute();this.getPosition();this.initCss()},imgLoad:function(){if("SWF"==this.action.targetType)this.img.load(function(){this.onResize()}.bind(this));
else this.onResize()},getAttribute:function(){if("Text"==this.action.targetType)this.width=120,this.height=200;else{this.width=this.elemConfig.parentWidth;this.height=this.elemConfig.parentHeight;var b=this.img[0].naturalWidth,c=this.img[0].naturalHeight;this.imgWidth=b;this.imgHeight=c;3==this.action.windowScale?(this.width=parseInt(this.action.windowWidth),this.height=parseInt(this.action.windowHeight),this.imgWidth=parseInt(this.action.targetWidth),this.imgHeight=parseInt(this.action.targetHeight)):
1==this.action.windowScale?(this.width=b>this.pageWidth?this.pageWidth/3*2:b,this.height=c>this.pageHeight?this.pageHeight/4*3:c):2==this.action.windowScale&&(3!=this.action.targetScale?(this.width=b,this.height=c,this.imgWidth=b,this.imgHeight=c):(this.width=parseInt(this.action.targetWidth),this.height=parseInt(this.action.targetHeight),this.imgWidth=parseInt(this.action.targetWidth),this.imgHeight=parseInt(this.action.targetHeight)));1==this.action.targetScale?(b>c?(this.imgWidth=this.width,this.imgHeight=
this.imgWidth/b*c):(this.imgHeight=this.height,this.imgWidth=this.imgHeight/c*b),1==this.action.windowScale&&(this.width=this.imgWidth>this.pageWidth?this.pageWidth/3*2:this.imgWidth,this.height=this.imgHeight>this.pageHeight?this.pageHeight/4*3:this.imgHeight)):4==this.action.targetScale?(this.imgWidth=this.width,this.imgHeight=this.height,1==this.action.windowScale&&(this.width=this.imgWidth>this.pageWidth?this.pageWidth/3*2:this.imgWidth,this.height=this.imgHeight>this.pageHeight?this.pageHeight/
4*3:this.imgHeight)):5==this.action.targetScale&&(b>c?(this.imgHeight=this.height,this.imgWidth=this.imgHeight/c*b):(this.imgHeight=this.width,this.imgHeight=this.imgWidth/b*c),1==this.action.windowScale&&(this.width=this.imgWidth>this.pageWidth?this.pageWidth/3*2:this.imgWidth,this.height=this.imgHeight>this.pageHeight?this.pageHeight/4*3:this.imgHeight))}},initCss:function(){"SWF"==this.action.targetType&&(0==this.imgWidth||0==this.imgHeight?this.dialog.css({display:"none"}):this.dialog.css({display:"block"}));
"Text"==this.action.targetType&&(this.text?this.dialog.css({display:"block"}):this.dialog.css({display:"none"}));this.close.css({position:"absolute",top:"-20px",right:"-20px",width:"20px",height:"20px","border-radius":"50%",background:"#111",cursor:"pointer",display:"none"});form_icons&&form_icons.close?this.close.attr("src","data:image/png;base64,"+form_icons.close):this.close.attr("src",uiBaseURL+"close.png");"Text"==this.action.targetType&&this.textCss();"SWF"==this.action.targetType&&this.imgCss();
this.dialog.css(this.type,this.startPosition+"px").css("opacity","0");"left"==this.type||"right"==this.type?this.dialog.css({top:this.top+"px"}):this.dialog.css("left",this.left+"px");"true"==this.action.winIsAlphaBoolean&&this.dialog.css({background:"rgba(255,255,255,0.8)",border:"none"});"BtnClick"==this.action.outType&&this.close.css({display:"block"})},textCss:function(){this.box.css({position:"relative",width:this.width+"px",height:this.height+"px",overflow:"hidden","overflow-y":"auto"});this.dialog.css({position:"absolute",
width:this.width+"px",height:this.height+"px",background:"rgba(255,255,255,0.8)","z-index":"1001",border:"10px solid rgba(255,255,255,0)"});if("1"==this.action.windowScale){var b=this.pageHeight-this.pageHeight*this.config.y-20;this.dialog.css({height:"auto","max-height":b+"px"});this.box.css({height:"auto","max-height":b+"px"})}else"2"==this.action.windowScale?(this.box.css({width:"120px",height:"auto"}),this.dialog.css({position:"absolute",height:"auto"})):"3"==this.action.windowScale&&("0"!=this.action.windowWidth&&
"0"!=this.action.windowHeight||this.dialog.css({display:"none"}),this.dialog.css({width:this.action.windowWidth+"px",height:this.action.windowHeight+"px"}),this.box.css({width:this.action.windowWidth+"px",height:this.action.windowHeight+"px"}))},imgCss:function(){this.img.css({position:"absolute",width:this.imgWidth+"px",height:this.imgHeight+"px"});this.box.css({position:"absolute",width:this.width+"px",height:this.height+"px",overflow:"hidden"});this.dialog.css({position:"absolute",width:this.width+
"px",height:this.height+"px",background:"rgba(255,255,255,0.8)","z-index":"1001",border:"10px solid rgba(255,255,255,0)"})},getPosition:function(){"left"==this.type?(this.startPosition=this.elemConfig.offsetX-this.width,this.endPosition=this.elemConfig.offsetX):"right"==this.type?(this.startPosition=this.elemConfig.parentWidth-this.width+this.elemConfig.offsetX,this.endPosition=this.elemConfig.parentWidth+this.elemConfig.offsetX,this.width>this.pageWidth&&(this.startPosition=this.windowWidth-this.width-
this.elemConfig.offsetX-this.pageWidth,this.endPosition=this.windowWidth-this.elemConfig.offsetX-this.pageWidth)):"bottom"==this.type?(this.startPosition=this.windowHeight-this.elemConfig.offsetY-this.elemConfig.parentHeight-this.height,this.endPosition=this.windowHeight-this.elemConfig.offsetY-this.elemConfig.parentHeight,this.height>this.windowHeight&&(this.startPosition=-this.height+this.elemConfig.offsetY,this.endPosition=this.elemConfig.offsetY)):(this.startPosition=this.elemConfig.offsetY-this.height,
this.endPosition=this.elemConfig.offsetY);this.width>this.pageWidth?this.left=(this.windowWidth-this.width)/2:(this.left=this.config.x*this.elemConfig.parentWidth+this.elemConfig.offsetX,this.config.x*this.elemConfig.parentWidth+this.width>this.pageWidth&&(this.left=this.pageWidth-this.width-20+this.elemConfig.offsetX));this.height>this.pageHeight?this.top=(this.windowHeight-this.height)/2:(this.top=this.config.y*this.elemConfig.parentHeight+this.elemConfig.offsetY,this.config.y*this.elemConfig.parentHeight+
this.height>this.pageHeight&&(this.top=this.pageHeight-this.height-20+this.elemConfig.offsetY))},initEvent:function(){"Mouse Out"==this.action.outType?this.mouseOutEvent():"BtnClick"==this.action.outType&&this.clickEvent()},clickEvent:function(){this.close.bind("click",function(){this.hide()}.bind(this))},mouseOutEvent:function(){this.dialog.bind("mouseleave mouseout",function(){this.focus=!1;(function(){this.focus||(this.hide(),function(){this.moving=!1}.delay(this,450))}).delay(this,50)}.bind(this));
this.dialog.bind("mouseenter mouseover ",function(){this.focus=!0}.bind(this));this.element.bind("mouseenter mouseover ",function(){this.focus=!0}.bind(this));this.element.bind("mouseleave mouseout",function(){this.focus=!1;(function(){this.focus||(this.hide(),function(){this.moving=!1}.delay(this,450))}).delay(this,50)}.bind(this))},animateCase:function(b,c){b&&(this.position=b,this.oldOpacity=parseFloat(this.dialog.css("opacity")),this.newOpacity=c,this.getOldPosition(),this.animate&&this.animate.stop(),
this.animate=function(b,c){if(b==c)this.dialog.css({opacity:this.newOpacity}),this.setPosition(this.position);else{var g=this.start+(this.position-this.start)/c*b;this.dialog.css({opacity:this.oldOpacity+(this.newOpacity-this.oldOpacity)/c*b});this.setPosition(g)}}.animation(this,500))},getOldPosition:function(){switch(this.type){case "left":this.start=parseFloat(this.dialog.left());break;case "right":this.start=parseFloat(this.dialog.right());break;case "top":this.start=parseFloat(this.dialog.top());
break;case "bottom":this.start=parseFloat(this.dialog.bottom())}},setPosition:function(b){this.currentPosition=b;switch(this.type){case "left":this.dialog.css({left:this.currentPosition+"px"});break;case "right":this.dialog.css({right:this.currentPosition+"px"});break;case "top":this.dialog.css({top:this.currentPosition+"px"});break;case "bottom":this.dialog.css({bottom:this.currentPosition+"px"})}},show:function(){this.dialog.css({"pointer-events":"auto"});this.animateCase(this.endPosition,1)},hide:function(){this.animateCase(this.startPosition,
0);this.dialog.css({"pointer-events":"none"})}}).extend("PageItemNormalPopup");
Class("SlideShow",{Package:"PageItem.Popup",create:function(b,c,d,f){this._super(b);this.photos=$.extend([],c);this.photos.photo&&(this.photos=void 0==this.photos.photo[1]?[this.photos.photo]:this.photos.photo);if(!(this.photos instanceof Array)){if(void 0==this.photos.url&&void 0==this.photos.photo)return;this.photos.url&&(this.photos=[{url:this.photos.url,desc:""}]);this.photos.photo&&(this.photos=[this.photos.photo])}this.parent=b;this.windowWidth=d;this.windowHeight=f;this.imgIndex=-1;this.imgWidth=
200;this.imgHeight=300;this.boxWidth=200;this.boxHeight=300;this.loadingImageHeight=this.loadingImageWidth=32;this.dialog=$("<div id='dialog'></div>");this.leftBar=$("<div></div>");this.rightBar=$("<div></div>");this.img=$("<img style='position : absolute;' />");this.parent.append(this.leftBar);this.parent.append(this.rightBar);this.closeButton=new button(this.parent,{buttonType:1,iconURL:uiBaseURL+"closecat.png"},!0);this.closeButton.setCSS({"z-index":1002,display:"none"});this.dialog.css({position:"absolute",
width:this.boxWidth+"px",height:this.boxHeight+"px",margin:"auto",left:"0px",top:"0px",bottom:"0px",right:"0px","background-color":"#eeeeee","z-index":1001,"-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)","-webkit-transform":"scale(0)","-o-transform":"scale(0)","-ms-transform":"scale(0)",
"-moz-transform":"scale(0)",transform:"scale(0)","-webkit-transition":"transform 0.3s","-ms-transition":"transform 0.3s","-o-transition":"transform 0.3s","-moz-transition":"transform 0.3s",transition:"transform 0.3s"});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.dialog.append(this.loadingImage);var g=this;this.dialog.bind(_event._down,function(b){g.nextPage()});this.closeButton.onMouseDown(this,this.hide);this.modalBackground.unbind();setTimeout(function(){this.modalBackground.on(_event._down,this.hide.bind(this))}.bind(this),500);this.initButton();this.resizeTimer=this.onResize.interval(this,500);this.changeImage(0);this.transformShow();this.show()},initButton:function(){1>=this.photos.length||
(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.leftButton.setButtonPosition(0,29,["left","top"]),this.leftButton.background.css({display:"none"}),this.rightButton.setButtonPosition(0,29,["right","top"]),this.rightBar.css({"z-index":1002,width:"100px",height:"100px",right:"0px",top:(windowHeight-100)/2+"px",position:"absolute"}),this.leftBar.css({"z-index":1003,
width:"100px",height:"100px",left:"0px",top:(windowHeight-100)/2+"px",position:"absolute"}),this.leftButton.onMouseDown(this,this.prePage),this.rightButton.onMouseDown(this,this.nextPage),this.leftButton.mouseEnterJump(),this.rightButton.mouseEnterJump(),this.hideButtons())},hideButtons:function(){this.photos&&1>=this.photos.length&&(this.leftButton.css("display","none"),this.rightButton.css("display","none"))},nextPage:function(){if(!(1>=this.photos.length)){var b=this.imgIndex+1;this.leftButton.background.css({display:"block"});
b>=this.photos.length-1&&(b=this.photos.length-1,this.rightButton.background.css({display:"none"}));this.changeImage(b)}},prePage:function(){if(!(1>=this.photos.length)){var b=this.imgIndex-1;this.rightButton.background.css({display:"block"});0>=b&&(b=0,this.leftButton.background.css({display:"none"}));this.changeImage(b)}},changeImage:function(b){void 0!=b&&this.imgIndex!=b&&(this.imgIndex=b,b=this.photos[b].url,!0==bookConfig.isFlipPdf&&(b.startsWith("./")?b="."+b:b.isUrl()||(b="../"+b)),this.img.load(function(){this.imgWidth=
this.img[0].naturalWidth;this.imgHeight=this.img[0].naturalHeight;this.resizeImage();this.loadingImage.css("display","none")}.bind(this)),this.img.attr("src",b))},resizeImage:function(){var b=this.windowWidth-20,c=this.windowHeight-20,d=this.imgWidth,f=this.imgHeight;d>b&&(f*=b/d,d=b);f>c&&(d*=c/f,f=c);this.img.css({width:d+"px",height:f+"px"});this.boxWidth!=d||this.boxHeight!=f?(this.dialog.css({width:d+8+"px",height:f+8+"px"}),this.dialog.append(this.img),this.loadingImage.css({left:(d+8-this.loadingImageWidth)/
2,top:(f+8-this.loadingImageHeight)/2})):this.dialog.append(this.img);this.boxWidth=d;this.boxHeight=f;this.img.css({left:"4px",top:"4px"});this.closeButton.setButtonPosition((this.windowWidth-d)/2+d-25,(this.windowHeight-f)/2+5);this.closeButton.setCSS({display:"block"})},transformShow:function(){setTimeout(function(){this.dialog.css({"-webkit-transition":"transform 0.3s","-o-transition":"transform 0.3s","-moz-transition":"transform 0.3s","-ms-transition":"transform 0.3s",transition:"transform 0.3s",
"-webkit-transform":"scale(1)","-o-transform":"scale(1)","-ms-transform":"scale(1)","-moz-transform":"scale(1)",transform:"scale(1)"})}.bind(this),100)},transformHide:function(){this.dialog.css({"-webkit-transition":"transform 0.3s","-o-transition":"transform 0.3s","-moz-transition":"transform 0.3s","-ms-transition":"transform 0.3s",transition:"transform 0.3s","-webkit-transform":"scale(0)","-o-transform":"scale(0)","-ms-transform":"scale(0)","-moz-transform":"scale(0)",transform:"scale(0)"})},hide:function(){this._super.delay(this,
600);this.closeButton.remove();this.transformHide();setTimeout(function(){this.leftBar.remove();this.rightBar.remove()}.bind(this),600);this.resizeTimer&&this.resizeTimer.stop()},onResize:function(){!this.imgWidth||this.windowWidth==windowWidth&&this.windowHeight==windowHeight||(this.windowWidth=windowWidth,this.windowHeight=windowHeight,this.resizeImage(),this.rightBar.css({top:(this.windowHeight-100)/2+"px"}),this.leftBar.css({top:(this.windowHeight-100)/2+"px"}))}}).extend("PageItemModalPopup");
Class("HotSpots",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.left=this.config.x*this.pageWidth;this.top=this.config.y*this.pageHeight;this.config.hotSpotsURL=this.fixRelativePath(this.config.hotSpotsURL);this.container=$("<div></div>");this.parent.append(this.container);this.setCss();this.initEvent();this.initLinkHint(this.container);this.createHotspot();this.onResize(d,f)},setCss:function(){this.container.css({position:"absolute",
"z-index":101,cursor:"hand"});this.setRotation(this.container,this.config.rotation)},createHotspot:function(){this.isSuportCanvas()?this.hotspot=new this.CanvasHotspotsContent(this.container,this.config.hotSpotsURL):this.hotspot=$.browser.device==$.browser.DEVICE_PC?new this.FlashHotspotsContent(this.container,this.config.hotSpotsURL):new this.HTMLHotspotsContent(this.container,this.config.hotSpotsURL)},isSuportCanvas:function(){var b=this.getClass();if(void 0==b.suportCanvasFlag){var c=$("<canvas></canvas>");
b.suportCanvasFlag=c[0]&&c[0].getContext?!0:!1}return b.suportCanvasFlag},parseConfig:function(b){return{width:b.location.width,height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,hint:b.hint,alpha:b.alpha,hotSpotsURL:b.hotSpotsURL,hintColor:b.hint.hintShapeColor2,hintShapeAlpha:b.hint.hintShapeAlpha,hintShapeType:b.hint.hintShapeType,text:b.hint.text,action:b.action}},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;
this.height=this.pageHeight*this.config.height;this.left=this.config.x*this.pageWidth;this.top=this.config.y*this.pageHeight;this.container.css({width:this.width+"px",height:this.height+"px"});this.setPosition();this.hotspot.onResize()},setPosition:function(){this.container.css({left:this.left+"px",top:this.top+"px"})},initEvent:function(){this.addActionEvent(this.container)},play:function(){this.hotspot&&this.hotspot.start()},stop:function(){this.hotspot&&this.hotspot.stop()},destroy:function(){this.hotspot.destroy()}}).extend(PageItem.Item);
Class("HotspotsContent",{Package:"PageItem",create:function(b,c){this.container=b;this.src=c;this.init()},init:virtual_function,onResize:virtual_function,start:virtual_function,stop:virtual_function,destroy:virtual_function});
Class("HTMLHotspotsContent",{Package:"PageItem",init:function(){this.frameIndex=1;this.frameCount=60;this.center=$("<div></div>");this.ring=$("<div></div>");this.container.append(this.center);this.container.append(this.ring);this.initStyle(this.center);this.initStyle(this.ring);this.onResize()},initStyle:function(b){b.css({position:"absolute",cursor:"hand","pointer-events":"none",left:"0",top:"0",bottom:"0",right:"0",margin:"auto"})},onResize:function(){this.width=this.container.width();this.height=
this.container.height();this.spotWidth=Math.min(this.width,this.height);this.center.css({"background-color":"red",width:this.spotWidth/3+"px",height:this.spotWidth/3+"px","border-radius":this.spotWidth/6+"px"});this.borderWidth=this.spotWidth/20;this.ring.css({border:this.borderWidth+"px solid red",opacity:1});this.draw()},draw:function(){var b=this.spotWidth/3,b=b+this.frameIndex/this.frameCount*(this.spotWidth-b-this.borderWidth);this.ring.css({width:b+"px",height:b+"px","border-radius":(b+this.borderWidth)/
2+"px",opacity:(this.frameCount-this.frameIndex)/this.frameCount})},start:function(){this.stop();this.timer=this.animate()},stop:function(){this.timer&&this.timer.stop()},animate:function(){return function(b,c){this.frameIndex=b;this.frameCount=c;this.draw();this.frameIndex==this.frameCount&&(this.timer=this.animate())}.animation(this,1E3)},destroy:function(){this.stop();this.center.remove();this.ring.remove()}}).extend("HotspotsContent");
Class("FlashHotspotsContent",{Package:"PageItem",init:function(){},onResize:function(){this.width=this.container.width();this.height=this.container.height();this.container.flash().remove();this.container.flash({swf:this.src,width:this.width+"px",height:this.height+"px",wmode:"transparent"})},draw:function(){},start:function(){},stop:function(){},animate:function(){},destroy:function(){this.container.flash().remove()}}).extend("HotspotsContent");
Class("CanvasHotspotsContent",{Package:"PageItem",init:function(){this.frameIndex=1;this.frameCount=60;this.canvas=$("<canvas></canvas>");this.container.append(this.canvas);this.initStyle(this.canvas);this.createDrawer();this.onResize()},initStyle:function(b){b.css({position:"absolute",cursor:"hand","pointer-events":"none",left:"0",top:"0",bottom:"0",right:"0",margin:"auto"})},isSWF:function(b){b=b.toLowerCase();var c=this.src.lastIndexOf("/");-1==c&&(c=this.src.lastIndexOf("\\"));var d=this.src.lastIndexOf(".");
return(c=this.src.substring(c+1,d))?(c=c.toLowerCase(),c==b):!1},createDrawer:function(){var b=this.canvas[0].getContext("2d");this.drawer=null;this.isSWF("Black Arrow Circle Hand")&&(this.drawer=new this.RotateHandHotSpotsDrawer(b,"black"));this.isSWF("Black Arrow Circle")&&(this.drawer=new this.RotateRingHotSpotsDrawer(b,"black"));this.isSWF("Black Circle Blinker")&&(this.drawer=new this.BlinkerHotSpotsDrawer(b,"black","#00F1FF"));this.isSWF("Black Circle")&&(this.drawer=new this.ShrinkHotSpotsDrawer(b,
"black"));this.isSWF("Black Glow")&&(this.drawer=new this.RoundHotSpotsDrawer(b,"black"));this.isSWF("Black Ripple with Pointer")&&(this.drawer=new this.MouseHotSpotsDrawer(b,"black"));this.isSWF("Black Ripple")&&(this.drawer=new this.RingHotSpotsDrawer(b,"black"));this.isSWF("Black Star in Circle")&&(this.drawer=new this.StarHotSpotsDrawer(b,"black"));this.isSWF("BlackTwo Ripples")&&(this.drawer=new this.RipplesHotSpotsDrawer(b,"black"));this.isSWF("Blue Arrow Circle Hand")&&(this.drawer=new this.RotateHandHotSpotsDrawer(b,
"#0033FF"));this.isSWF("Blue Arrow Circle")&&(this.drawer=new this.RotateRingHotSpotsDrawer(b,"#0033FF"));this.isSWF("Blue Circle Blinker")&&(this.drawer=new this.BlinkerHotSpotsDrawer(b,"#0033FF","#00F1FF"));this.isSWF("Blue Circle")&&(this.drawer=new this.ShrinkHotSpotsDrawer(b,"#05338E","#0561BC"));this.isSWF("Blue Glow")&&(this.drawer=new this.RoundHotSpotsDrawer(b,"#0033FF"));this.isSWF("Blue Ripple with Pointer")&&(this.drawer=new this.MouseHotSpotsDrawer(b,"#0033FF"));this.isSWF("Blue Ripple")&&
(this.drawer=new this.RingHotSpotsDrawer(b,"#0033FF"));this.isSWF("Blue Star in Circle")&&(this.drawer=new this.StarHotSpotsDrawer(b,"#0044EE"));this.isSWF("Blue Star")&&(this.drawer=new this.RectsHotSpotsDrawer(b,"#3364C5"));this.isSWF("Blue Two Ripples")&&(this.drawer=new this.RipplesHotSpotsDrawer(b,"#0033FF"));this.isSWF("Blue_doughnut")&&(this.drawer=new this.DoughnutHotSpotsDrawer(b,"#3B89FF"));this.isSWF("Default Animation")&&(this.drawer=new this.RectsHotSpotsDrawer(b,"#3364C5"));this.isSWF("Green Arrow Circle Hand")&&
(this.drawer=new this.RotateHandHotSpotsDrawer(b,"#009900"));this.isSWF("Green Arrow Circle")&&(this.drawer=new this.RotateRingHotSpotsDrawer(b,"#009900"));this.isSWF("Green Circle Blinker")&&(this.drawer=new this.BlinkerHotSpotsDrawer(b,"#039303","#03F503"));this.isSWF("Green Circle")&&(this.drawer=new this.ShrinkHotSpotsDrawer(b,"#009900"));this.isSWF("Green Glow")&&(this.drawer=new this.RoundHotSpotsDrawer(b,"green"));this.isSWF("Green Ripple with Pointer")&&(this.drawer=new this.MouseHotSpotsDrawer(b,
"#009900"));this.isSWF("Green Ripple")&&(this.drawer=new this.RingHotSpotsDrawer(b,"#009900"));this.isSWF("Green Star in Circle")&&(this.drawer=new this.StarHotSpotsDrawer(b,"#009900"));this.isSWF("Green Star")&&(this.drawer=new this.RectsHotSpotsDrawer(b,"#669900"));this.isSWF("Green Two Ripples")&&(this.drawer=new this.RipplesHotSpotsDrawer(b,"#009900"));this.isSWF("Green Doughnut")&&(this.drawer=new this.DoughnutHotSpotsDrawer(b,"#00DAB7"));this.isSWF("Orange Circle")&&(this.drawer=new this.ShrinkHotSpotsDrawer(b,
"#CA7000","#F98C00"));this.isSWF("Red Arrow Circle Hand")&&(this.drawer=new this.RotateHandHotSpotsDrawer(b,"red"));this.isSWF("Red Arrow Circle")&&(this.drawer=new this.RotateRingHotSpotsDrawer(b,"red"));this.isSWF("Red Circle Blinker")&&(this.drawer=new this.BlinkerHotSpotsDrawer(b,"red","yellow","#CA7000"));this.isSWF("Red Circle")&&(this.drawer=new this.ShrinkHotSpotsDrawer(b,"red"));this.isSWF("Red Doughnut")&&(this.drawer=new this.DoughnutHotSpotsDrawer(b,"#E58585"));this.isSWF("Red Glow")&&
(this.drawer=new this.RoundHotSpotsDrawer(b,"red","#FBBC00"));this.isSWF("Red Ripple with Pointer")&&(this.drawer=new this.MouseHotSpotsDrawer(b,"red"));this.isSWF("Red Ripple")&&(this.drawer=new this.RingHotSpotsDrawer(b,"red"));this.isSWF("Red Star in Circle")&&(this.drawer=new this.StarHotSpotsDrawer(b,"red"));this.isSWF("Red Star")&&(this.drawer=new this.RectsHotSpotsDrawer(b,"red"));this.isSWF("Red Two Ripples")&&(this.drawer=new this.RipplesHotSpotsDrawer(b,"red"));this.isSWF("Yellow Squre")&&
(this.drawer=new this.SquareHotSpotsDrawer(b,"red","#FBBC00"));this.isSWF("Yellow Start Blink")&&(this.drawer=new this.SquareStarHotSpotsDrawer(b,"#FBBC00","#FF9900","#DAE405"));this.isSWF("yellow_doughnut")&&(this.drawer=new this.DoughnutHotSpotsDrawer(b,"#FFD56B"));this.drawer||(this.drawer=new this.RingHotSpotsDrawer(b,"red"))},onResize:function(){this.width=0.85*this.container.width();this.height=0.85*this.container.height();this.canvas.attr("width",this.width);this.canvas.attr("height",this.height);
this.drawer&&(this.drawer.resize(this.width,this.height),this.draw())},draw:function(){this.drawer&&this.drawer.draw(this.frameIndex,this.frameCount)},start:function(){this.stop();this.timer=this.animate()},animate:function(){return function(b,c){this.frameIndex=b;this.frameCount=c;this.draw();this.frameIndex==this.frameCount&&(this.timer=this.animate())}.animation(this,1E3)},stop:function(){this.timer&&this.timer.stop()},destroy:function(){this.stop();this.canvas.remove()}}).extend("HotspotsContent");
Class("HotSpotsDrawer",{Package:"PageItem",create:function(b,c){this.context=b;this.color=Color(c)},resize:function(b,c){this.width=b;this.height=c},rectInCenter:function(b,c){void 0==c&&(c=b);return{left:(this.width-b)/2,top:(this.height-c)/2,width:b,height:c}},draw:virtual_function,clear:function(){this.context.clearRect(0,0,this.width,this.height)},drawStar:function(b,c,d,f){var g=this.context;if(b){c||(c="#FFFF00");d||(d={width:0,color:"#FFFFFF"});void 0==f&&(f=0);var h=Math.min(b.width,b.height)/
2,k=0.4*h,l=b.left;b=b.top;g.save();g.translate(l+h,b+h);g.rotate(f*Math.PI/180);g.beginPath();g.moveTo(Math.cos(0.1*Math.PI)*h,-Math.sin(0.1*Math.PI)*h);for(f=0;5>f;f++)g.lineTo(Math.cos((18+72*f)/180*Math.PI)*h,-Math.sin((18+72*f)/180*Math.PI)*h),g.lineTo(Math.cos((54+72*f)/180*Math.PI)*k,-Math.sin((54+72*f)/180*Math.PI)*k);g.closePath();g.fillStyle=c;g.fill();g.lineWidth=d.width;g.strokeStyle=d.color;0<d.width&&g.stroke();g.restore()}},drawTriangle:function(b,c,d){var f=this.context;b&&(c||(c=
"#000000"),d||(d={width:0,color:"#FFFFFF"}),f.save(),f.translate(b.left,b.top),f.beginPath(),f.moveTo(b.width/2,0),f.lineTo(0,b.height),f.lineTo(b.width,b.height),f.closePath(),f.fillStyle=c,f.fill(),f.lineWidth=d.width,f.strokeStyle=d.color,0<d.width&&f.stroke(),f.restore())},drawArrow:function(b,c,d,f){var g=this.context;b&&(c||(c="#000000"),d||(d={width:0,color:"#FFFFFF"}),f=f?parseFloat(f):0.2,g.save(),g.translate(b.left,b.top),g.beginPath(),g.moveTo(b.width/2,0),g.lineTo(0,b.height),g.lineTo(b.width/
2,b.height*(1-f)),g.lineTo(b.width,b.height),g.closePath(),g.fillStyle=c,g.fill(),g.lineWidth=d.width,g.strokeStyle=d.color,0<d.width&&g.stroke(),g.restore())},drawMouse:function(b,c,d){var f=this.context;if(b){c||(c="#FFFFBB");d||(d={width:1,color:"#000000"});var g=0.6*b.height,h=b.width/2;f.save();f.translate(b.left+h,b.top);f.rotate(-15*Math.PI/180);f.shadowBlur=Math.ceil(0.2*b.width);f.shadowColor="rgba(0, 0, 0, 0.3)";f.shadowOffsetX=Math.ceil(0.1*b.width);f.shadowOffsetY=Math.ceil(0.1*b.width);
f.beginPath();f.moveTo(b.width/2-h,0);f.lineTo(-h,g);f.lineTo(0.38*b.width-h,0.9*g);f.lineTo(0.38*b.width-h,b.height);f.lineTo(0.62*b.width-h,b.height);f.lineTo(0.62*b.width-h,0.9*g);f.lineTo(b.width-h,g);f.closePath();f.fillStyle=c;f.fill();f.lineWidth=d.width;f.strokeStyle=d.color;0<d.width&&f.stroke();f.restore()}},drawRound:function(b,c,d){var f=this.context;if(b){c||(c="#000000");d||(d={width:0,color:"#FFFFFF"});var g=Math.min(b.width,b.height)/2,h=b.left;b=b.top;f.save();f.beginPath();f.arc(h+
g,b+g,g,0,2*Math.PI,!0);f.closePath();f.fillStyle=c;f.fill();f.lineWidth=d.width;f.strokeStyle=d.color;0<d.width&&f.stroke();f.restore()}},drawRing:function(b,c){var d=c.width/2;this.drawRound({left:b.left+d,top:b.top+d,width:b.width-c.width,height:b.height-c.width},"transparent",c)},drawRect:function(b,c,d,f){var g=this.context;if(b){c||(c="#000000");d||(d={width:0,color:"#FFFFFF"});f||(f=0);var h=b.width/2,k=b.height/2,l=b.left+h,m=b.top+k;g.save();g.translate(l,m);g.rotate(f*Math.PI/180);g.beginPath();
g.rect(-h,-k,b.width,b.height);g.closePath();g.fillStyle=c;g.fill();g.lineWidth=d.width;g.strokeStyle=d.color;0<d.width&&g.stroke();g.restore()}},drawRoundRect:function(b,c,d,f,g){var h=this.context;if(b){d||(d="#000000");f||(f={width:0,color:"#FFFFFF"});g||(g=0);var k=b.width/2,l=b.height/2,m=b.left+k,n=b.top+l;h.save();h.translate(m,n);h.rotate(g*Math.PI/180);b=Math.min(b.width,b.height)/2;c=Math.min(c,b);h.beginPath();h.moveTo(-k+c,-l);h.arcTo(k,-l,k,l,c);h.arcTo(k,l,-k,l,c);h.arcTo(-k,l,-k,-l,
c);h.arcTo(-k,-l,k,-l,c);h.closePath();h.fillStyle=d;h.fill();h.lineWidth=f.width;h.strokeStyle=f.color;0<f.width&&h.stroke();h.restore()}},drawSquareStar:function(b,c,d){var f=this.context;if(b){c||(c="#000000");d||(d=0);var g=b.left+b.width/2,h=b.top+b.height/2,k=b.width,l=b.height,m=Math.PI/180,n=b.width*Math.cos(30*m),p=b.height*Math.cos(30*m);f.save();f.translate(g,h);f.rotate(d*Math.PI/180);f.beginPath();f.arc(0,-b.height/2-n,k,60*m,120*m,!1);f.arc(b.width/2+p,0,l,150*m,210*m,!1);f.arc(0,b.height/
2+n,k,240*m,300*m,!1);f.arc(-b.width/2-p,0,l,-30*m,30*m,!1);f.closePath();f.fillStyle=c;f.fill();f.restore()}}});
Class("HotSpotsHandImageData",{Package:"PageItem",create:function(b,c){this.dock=b;this.src=c;this.init()},init:function(){this.dock.hand||(this.dock.hand=$("<img></img>"),this.dock.hand.attr("src",this.src));this.data=this.dock.hand},getImage:function(){if(!this.data)return null;var b=this.data[0];return 0==b.naturalWidth?null:b},draw:function(b,c,d){if(b&&c){void 0==d&&(d=1);var f=this.getImage();if(f){var g=f.naturalWidth,h=f.naturalHeight;b.globalAlpha=d;b.drawImage(f,0,0,g,h,c.left,c.top,c.width,
c.height);b.globalAlpha=1}}}});Class("RingHotSpotsDrawer",{Package:"PageItem",draw:function(b,c){if(this.width&&this.height){this.clear();var d=Math.min(this.width,this.height),f=d/3,g=d/16,h=this.rectInCenter(f);this.drawRound(h,this.color);g={width:g,color:this.color.rgba((c-b)/c)};d=this.rectInCenter(f+(d-f)*b/c);this.drawRing(d,g)}}}).extend("HotSpotsDrawer");
Class("StarHotSpotsDrawer",{Package:"PageItem",draw:function(b,c){if(this.width&&this.height){this.clear();this._super(b,c);var d=Math.min(this.width,this.height)/3,d=this.rectInCenter(d),f=Math.ceil(b/c*360);this.drawStar(d,"#FFFF00",null,f)}}}).extend("RingHotSpotsDrawer");
Class("MouseHotSpotsDrawer",{Package:"PageItem",draw:function(b,c){if(this.width&&this.height){this.clear();this._super(b,c);var d=Math.min(this.width,this.height),f=d/4;this.drawMouse({left:(this.width-f)/2,top:this.height/2,width:f,height:2*d/5})}}}).extend("RingHotSpotsDrawer");
Class("RoundHotSpotsDrawer",{Package:"PageItem",create:function(b,c,d){this.context=b;this.color=Color(c);this.centerColor=d?Color(d):this.color.add(70)},draw:function(b,c){if(this.width&&this.height){this.clear();var d=Math.min(this.width,this.height),f=d/3,g=this.rectInCenter(f+(d-f)*b/c),d=this.color.rgba((c-b)/c);this.drawRound(g,d);var g=this.rectInCenter(f);this.drawRound(g,this.centerColor.toString())}}}).extend("HotSpotsDrawer");
Class("RotateHotSpotsDrawer",{Package:"PageItem",draw:function(b,c){if(this.width&&this.height){this.clear();var d=Math.min(this.width,this.height),f={width:d/8,color:this.color.toString()},g=this.rectInCenter(7*d/8);this.drawRing(g,f);var f=d/4,g=d/4,h=(this.height-g)/2,d={left:0,top:h,width:f,height:g},k=Math.floor(1.1*g),f={left:0,top:h-Math.ceil(0.1*g),width:f,height:k},g=Math.ceil(360*b/c);this.context.save();this.context.translate(this.width/2,this.height/2);this.context.rotate(g*Math.PI/180);
d.left-=this.width/2;d.top-=this.height/2;f.left-=this.width/2;f.top-=this.height/2;this.drawTriangle(f,"#FFFFFF");this.drawTriangle(d,this.color.toString());this.drawTriangle();this.context.restore()}}}).extend("HotSpotsDrawer");Class("RotateRingHotSpotsDrawer",{Package:"PageItem",draw:function(b,c){if(this.width&&this.height){this.clear();this._super(b,c);var d=Math.min(this.width,this.height)/3,d=this.rectInCenter(d);this.drawRound(d,this.color.toString())}}}).extend("RotateHotSpotsDrawer");
Class("RotateHandHotSpotsDrawer",{Package:"PageItem",create:function(b,c){this._super(b,c);this.initHand()},initHand:function(){this.imageData=new this.HotSpotsHandImageData(this.getClass(),uiBaseURL+"hotspot_hand.png")},draw:function(b,c){if(this.width&&this.height){this.clear();this._super(b,c);var d=Math.min(this.width,this.height),d=this.rectInCenter(d/3,d/2);this.imageData.draw(this.context,d)}}}).extend("RotateHotSpotsDrawer");
Class("BlinkerHotSpotsDrawer",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c);this.lightColor=d?Color(d):Color(this.color.add(70));this.ringColor=f?Color(f):this.color;this.colorDiff=this.color.difference(this.lightColor);this.frameColorDiff={}},draw:function(b,c){if(this.width&&this.height){this.clear();var d=Math.min(this.width,this.height),f=b,g=Math.ceil(c/2);f<g?(f/=g,this.frameColorDiff.r=Math.ceil(this.colorDiff.r*f),this.frameColorDiff.g=Math.ceil(this.colorDiff.g*f),this.frameColorDiff.b=
Math.ceil(this.colorDiff.b*f)):(f=(f-g)/g,this.frameColorDiff.r=this.colorDiff.r-Math.ceil(this.colorDiff.r*f),this.frameColorDiff.g=this.colorDiff.g-Math.ceil(this.colorDiff.g*f),this.frameColorDiff.b=this.colorDiff.b-Math.ceil(this.colorDiff.b*f));f=this.color.add(this.frameColorDiff);g=this.rectInCenter(d/2);this.drawRound(g,f);f=this.rectInCenter(d);this.drawRing(f,{width:d/8,color:this.ringColor.toString()})}}}).extend("HotSpotsDrawer");
Class("ShrinkHotSpotsDrawer",{Package:"PageItem",create:function(b,c,d){this._super(b,c);this.innerColor=d?Color(d):Color(this.color.add(70))},draw:function(b,c){if(this.width&&this.height){this.clear();var d=Math.min(this.width,this.height),f=7*d/8,g=d/4;if(b<c/2){var h=b,k=c/2,g=g+(d-g)*h/k,f=this.rectInCenter(0+(f-0)*h/k),g=this.rectInCenter(g);this.drawRound(f,this.innerColor.toString());this.drawRing(g,{width:d/8,color:this.color.toString()})}else k=c/4,h=b%k,b<3*c/4?(h=1-h/k,f=this.rectInCenter(0+
(f-0)*h),g=this.rectInCenter(d),this.drawRound(f,this.innerColor.rgba(h)),this.drawRing(g,{width:d/8,color:this.color.toString()})):(h=1-h/k,g=this.rectInCenter(g+(d-g)*h),this.drawRing(g,{width:d/8,color:this.color.rgba(h)}))}}}).extend("HotSpotsDrawer");
Class("RipplesHotSpotsDrawer",{Package:"PageItem",create:function(b,c){this._super(b,c)},draw:function(b,c){if(this.width&&this.height){this.clear();var d=Math.min(this.width,this.height),f=c/2,g=b%f,h=g/f;if(b<c/2){var k=d/5,l=d,m=(l-k)*g/f,n=Math.ceil(d/50),d=Math.ceil(d/16),n=n+(d-n)*g/f,k=this.rectInCenter(k+m),l=this.rectInCenter(l);this.drawRing(k,{width:n,color:this.color.toString()});this.drawRing(l,{width:d,color:this.color.rgba(h)})}else k=d/5,l=d,m=(l-k)*g/f,n=Math.ceil(d/50),d=Math.ceil(d/
16),f=(d-n)*g/f,k=this.rectInCenter(k+m),l=this.rectInCenter(l-m),this.drawRing(k,{width:n+f,color:this.color.rgba(1-h)}),this.drawRing(l,{width:d-f,color:this.color.toString()})}}}).extend("HotSpotsDrawer");
Class("RectsHotSpotsDrawer",{Package:"PageItem",draw:function(b,c){if(this.width&&this.height){this.clear();for(var d=Math.min(this.width,this.height),f=Math.ceil(360*b/c),g=0;3>g;g++){var h=120*g+f,k=this.rectInCenter(d/6,5*d/6);this.drawRect(k,this.color.rgba(0.4),null,h)}for(g=0;3>g;g++)h=120*g-f,k=this.rectInCenter(d/7,2*d/3),this.drawRect(k,this.color.toString(),null,h)}}}).extend("HotSpotsDrawer");
Class("SquareHotSpotsDrawer",{Package:"PageItem",create:function(b,c,d){this._super(b,c);this.centerColor=d?Color(d):Color(this.color.add(70))},draw:function(b,c){if(this.width&&this.height){this.clear();var d=Math.min(this.width,this.height),f=d/2,g=d/25,h=this.rectInCenter(f);this.drawRoundRect(h,g,this.centerColor.toString(),{width:g,color:this.color.toString()});h=1-b/c;d=this.rectInCenter(f+(d-g-f)*b/c);this.drawRoundRect(d,g,"transparent",{width:g,color:this.color.rgba(h)})}}}).extend("HotSpotsDrawer");
Class("SquareStarHotSpotsDrawer",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c);this.borderColor=d?Color(d):Color(this.color.reduce(70));this.backgroundColor=f?Color(f):this.color},draw:function(b,c){if(this.width&&this.height){this.clear();var d=c/2,f=b%d,g=Math.min(this.width,this.height),h=g/12,k=g/4,l=Math.sqrt(this.width*this.width/4+this.height*this.height/4),m=(g-k)*f/d,d=(l-k)*f/d;b<c/2?(g=this.rectInCenter(k+m),m=this.rectInCenter(l-d),h=this.rectInCenter(l-d-2*h)):(g=this.rectInCenter(g-
m),m=this.rectInCenter(k+d),h=this.rectInCenter(k+d-2*h));this.drawSquareStar(g,this.backgroundColor.toString());this.drawSquareStar(m,this.borderColor.toString(),45);this.drawSquareStar(h,this.color.toString(),45)}}}).extend("HotSpotsDrawer");
Class("DoughnutHotSpotsDrawer",{Package:"PageItem",create:function(b,c){this._super(b,c);this.initHand()},initHand:function(){this.imageData=new this.HotSpotsHandImageData(this.getClass(),uiBaseURL+"hotspot_hand2.png")},draw:function(b,c){if(this.width&&this.height){this.clear();var d=Math.min(this.width,this.height),f=this.rectInCenter(d/3),g=c/2,g=b%g/g;b>=c/2&&(g=1-g);this.imageData.draw(this.context,f,g);var f=d/6,g=d/12,h=d/48,k=this.rectInCenter(d),l=this.rectInCenter(11*d/12),d=this.rectInCenter(41*
d/48),m=Color("white");this.drawRing(k,{width:f,color:this.color.toString()});this.drawRing(l,{width:g,color:m.rgba(0.1)});this.drawRing(d,{width:h,color:m.rgba(0.2)})}}}).extend("HotSpotsDrawer");function forceFloat(b){b=Number(b).toString();-1==b.indexOf(".")&&(b+=".00");return b}
Class("ShoppingCart",{Package:"PageItem",create:function(b,c,d,f){this.config=this.parseConfig(c);this.pageWidth=d;this.pageHeight=f;this.bgColor=Color(this.config.bgColor).toString();this.width=Number(this.pageWidth*this.config.width);this.height=Number(this.pageHeight*this.config.height);this.config.imgUrl=this.config.imgUrl;this.config.url=this.config.url;bookConfig.isFlipPdf&&(this.config.imgUrl.startsWith("./")?this.config.imgUrl="."+this.config.imgUrl:this.config.imgUrl.isUrl()||(this.config.imgUrl=
"../"+this.config.imgUrl));this.background=$("<div></div>");this.img=$("<img/>");b.append(this.background);this.background.append(this.img);this.linkOrCart(c,b);this.setLinkCss();this.setPosition();this.initEvent()},parseConfig:function(b){return{annotype:b.annotype,x:b.location.x,y:b.location.y,rotation:b.location.rotation,width:b.location.width,height:b.location.height,bgColor:b.bgColor,bgAlpha:b.bgAlpha,cartType:b.cartType,imgUrl:b.imgUrl,titleStr:b.titleStr,url:b.url,Detailed:b.Detailed}},destroy:function(){this.background.empty();
this.background.remove();this.shop&&this.shop.destroy()},linkOrCart:function(b,c){var d="";this.config.url&&(d=this.config.url);d.startsWith("http://")||d.startsWith("https://")||(d="http://"+d);"link"==this.config.cartType?(isTouchDevice()?(this.background=$("<div></div>"),this.background.bind(_event._end,function(){window.location.href=d}.bind(this))):this.background=$("<a href="+d+" target='_blank' ><div></div></a>"),c.append(this.background),this.background.append(this.img)):isPhone()||isPad()?
this.shop=new PageItem.MobileProductDetailsPanel(b,pageEditor.setting,c):this.shop=new PageItem.PCProductDetailsPanel(b,pageEditor.setting,c)},setLinkCss:function(){this.background.css({position:"absolute","background-position":"center",width:this.width+"px",height:this.height+"px","background-color":this.bgColor,opacity:this.config.bgAlpha,"text-decoration":"none",cursor:"default",transform:"rotate("+this.config.rotation+"deg)","-webkit-transform":"rotate("+this.config.rotation+"deg)","-ms-transform":"rotate("+
this.config.rotation+"deg)","-o-transform":"rotate("+this.config.rotation+"deg)","-moz-transform":"rotate("+this.config.rotation+"deg)","transform-origin":"50% 50%","-webkit-transform-origin":"50% 50%","-ms-transform-origin":"50% 50%","-o-transform-origin":"50% 50%","-moz-transform-origin":"50% 50%"});this.img.attr({src:this.config.imgUrl});if(this.width>this.height){var b=2*this.height/3;this.width=b/100*100;this.img.css({position:"absolute",cursor:"pointer",width:this.width,height:b,margin:"auto",
left:"0",right:"0",top:"0",bottom:"0"})}else b=2*this.width/3,this.height=b/100*100,this.img.css({position:"absolute",cursor:"pointer",width:this.height,height:b,margin:"auto",left:"0",right:"0",top:"0",bottom:"0"})},initEvent:function(){if(!isTouchDevice()){var b=new divHint;this.background.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.pageX+10;d=d.pageY+10;b.setStyle("hintBackground");"link"==this.config.cartType?
""!=this.config.titleStr?b.setText(this.config.titleStr.overflow(12)):b.setText(this.config.url.overflow(12)):""!=this.config.titleStr?b.setText(this.config.titleStr.overflow(12)):b.setText(this.config.Detailed.title.overflow(12));b.moveto(c,d);b.show()}.bind(this));this.background.bind(_event._leave,function(){b.hide()}.bind(this))}this.background.bind(_event._down,function(){return!1});this.background.bind(_event._end,function(){this.shop&&this.shop.show();return!1}.bind(this))},show:function(){this.background.css("display",
"block")},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*b;this.height=this.config.height*c;this.background.css({width:this.width+"px",height:this.height+"px"});this.setLinkCss();this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.background.css({left:this.x+"px",top:this.y+"px"})}});
var ShoppingCartUtil={setProductsToStorage:function(b){try{if(window.localStorage){var c=Instance.JSON(b);window.localStorage.setItem("shopping_cart_products",c)}}catch(d){}},getProductsFromStorage:function(){try{if(!window.localStorage)return[];var b=window.localStorage.getItem("shopping_cart_products");return Instance.parse(b,[])}catch(c){return[]}},removeProduct:function(b){for(var c=this.getProductsFromStorage(),d=0;d<c.length;d++)if(c[d].title==b.title){c.remove(d);break}this.setProductsToStorage(c)},
addProduct:function(b){for(var c=this.getProductsFromStorage(),d=!0,f=0;f<c.length;f++){var g=c[f];if(g.title==b.title){g.number=b.number+g.number;d=!1;break}}d&&c.push(b);this.setProductsToStorage(c);return c},saveProducts:function(b,c){b||(b=[]);for(var d=[],f=0;f<b.length;f++)d.push(b[f].product);this.setProductsToStorage(d)}};
Class("ProductDetailsPanel",{Package:"PageItem",create:function(b,c,d){this.config=this.parseConfig(b);this.setting=c;this.parent=d;this.initUI();this.initEvent()},parseConfig:function(b){return b},destroy:virtual_function,getMailtoInformation:function(b,c,d){var f=d.shoppingCartOptinon.body;b=parseInt(b);var g=forceFloat(c.Detailed.proce),h="",h=!0==parseBool(pageEditor.setting.shoppingCartOptinon.showPrice)?String.format("%0D%0A%0D%0A%0D%0A%s(N1, %d * %s%s = %s%s);%0D%0A%s%s%0D%0A-type in your contacts here-%0D%0A%0D%0A%0D%0A%0D%0A",
c.Detailed.title,b,g,c.Detailed.sing,forceFloat(g*b),c.Detailed.sing,forceFloat(g*b),c.Detailed.sing):String.format("%0D%0A%0D%0A%0D%0A%s(N1, %d);%0D%0A%0D%0A-type in your contacts here-%0D%0A%0D%0A%0D%0A%0D%0A",c.Detailed.title,b);-1<f.indexOf("${shopping}")&&(f=f.replaceAll("${shopping}",h,!0));return String.format("mailto:%s?subject=%s&body=%s",d.shoppingCartOptinon.address,d.shoppingCartOptinon.theme,f)},getPaypalInformation:function(b,c,d){var f="";if("$"==c.Detailed.sing||"U.S.$"==c.Detailed.sing)f=
"USD";"\uffe5"==c.Detailed.sing&&(f="CNY");"\u20ac"==c.Detailed.sing&&(f="EUR");"\uffe1"==c.Detailed.sing&&(f="GBP");"J.\uffe5"==c.Detailed.sing&&(f="JPY");"$A."==c.Detailed.sing&&(f="AUD");"$NZ."==c.Detailed.sing&&(f="NZD");"SFR."==c.Detailed.sing&&(f="CHF");"HK$"==c.Detailed.sing&&(f="HKD");"S.$"==c.Detailed.sing&&(f="SGD");"S.Kr."==c.Detailed.sing&&(f="SEK");"D.Kr."==c.Detailed.sing&&(f="DKK");"z\u0142"==c.Detailed.sing&&(f="PLZ");"N.Kr."==c.Detailed.sing&&(f="NOK");"FT."==c.Detailed.sing&&(f=
"HUF");"Cz.Kr."==c.Detailed.sing&&(f="CSK");"Mex.$"==c.Detailed.sing&&(f="MXP");"\u20aa"==c.Detailed.sing&&(f="ILS");"Gr.$"==c.Detailed.sing&&(f="BRC");"Mal.$"==c.Detailed.sing&&(f="MYR");"NT"==c.Detailed.sing&&(f="NTD");"\u0e3f"==c.Detailed.sing&&(f="THP");"Ykr"==c.Detailed.sing&&(f="TRL");return"http://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business="+d.shoppingCartOptinon.paypal+"&item_name="+c.Detailed.title+"&amount="+c.Detailed.proce+"&currency_code="+f+"&quantity="+b},doCheckout:function(){if(!1!=
this.canCheckout){var b="",b=this.input.val(),b="Email"==this.setting.shoppingCartOptinon.type?this.getMailtoInformation(b,this.config,this.setting):this.getPaypalInformation(b,this.config,this.setting);window.open(b)}}});
Class("ShoppingCartPanel",{Package:"PageItem",getMailtoInformation:function(b,c){if(!this.shoppingItems)return"";for(var d="%0D%0A",f=pageEditor.setting.shoppingCartOptinon.body,g=0,h=parseBool(pageEditor.setting.shoppingCartOptinon.showPrice),k=0;k<this.shoppingItems.length;k++){var l=this.shoppingItems[k];if(void 0==l.isSelected||l.isSelected())var m=forceFloat(l.product.price),d=!0==h?d+String.format("%0D%0A%s(N"+(k+1)+", %d * %s%s = %s%s);%0D%0A",l.product.title,parseInt(l.product.number),m,l.product.sing,
forceFloat(m*parseInt(l.product.number)),l.product.sing):d+String.format("%0D%0A%s(N"+(k+1)+", %d);%0D%0A",l.product.title,parseInt(l.product.number)),l=parseFloat(l.product.price*l.cartInput.val()),g=g+l}!0==h&&(d+=String.format("%0D%0A(Total price : %f%s);%0D%0A%0D%0A",g,this.config.Detailed.sing));d+="-type in your contacts here-%0D%0A%0D%0A%0D%0A%0D%0A";-1<f.indexOf("${shopping}")&&(f=f.replaceAll("${shopping}",d,!0));return String.format("mailto:%s?subject=%s&body=%s",pageEditor.setting.shoppingCartOptinon.address,
pageEditor.setting.shoppingCartOptinon.theme,f)},getPaypalInformation:function(b,c){if(!this.shoppingItems)return"";for(var d="",f="",g=0,h=0;h<this.shoppingItems.length;h++){var k=this.shoppingItems[h];if(void 0==k.isSelected||k.isSelected()){if("$"==b.Detailed.sing||"U.S.$"==b.Detailed.sing)d="USD";"\uffe5"==b.Detailed.sing&&(d="CNY");"\u20ac"==b.Detailed.sing&&(d="EUR");"\uffe1"==b.Detailed.sing&&(d="GBP");"J.\uffe5"==b.Detailed.sing&&(d="JPY");"$A."==b.Detailed.sing&&(d="AUD");"$NZ."==b.Detailed.sing&&
(d="NZD");"SFR."==b.Detailed.sing&&(d="CHF");"HK$"==b.Detailed.sing&&(d="HKD");"S.$"==b.Detailed.sing&&(d="SGD");"S.Kr."==b.Detailed.sing&&(d="SEK");"D.Kr."==b.Detailed.sing&&(d="DKK");"z\u0142"==b.Detailed.sing&&(d="PLZ");"N.Kr."==b.Detailed.sing&&(d="NOK");"FT."==b.Detailed.sing&&(d="HUF");"Cz.Kr."==b.Detailed.sing&&(d="CSK");"Mex.$"==b.Detailed.sing&&(d="MXP");"\u20aa"==b.Detailed.sing&&(d="ILS");"Gr.$"==b.Detailed.sing&&(d="BRC");"Mal.$"==b.Detailed.sing&&(d="MYR");"NT"==b.Detailed.sing&&(d="NTD");
"\u0e3f"==b.Detailed.sing&&(d="THP");"Ykr"==b.Detailed.sing&&(d="TRL");g++;f+=String.format("&item_name_"+g+"=%s&amount_"+g+"=%f&quantity_"+g+"=%d",k.product.title,parseFloat(k.product.price),parseInt(k.product.number))}}f+=String.format("&business=%s&currency_code=%s",c.shoppingCartOptinon.paypal,d);return"http://www.paypal.com/cgi-bin/webscr?cmd=_cart&upload=1"+f},doCheckout:function(){if(!1!=this.canCheckout){var b="",b="Email"==this.setting.shoppingCartOptinon.type?this.getMailtoInformation(this.config,
this.setting):this.getPaypalInformation(this.config,this.setting);window.open(b)}},refreshTotalValue:function(){this.shoppingItems||(this.shoppingItems=[]);this.canCheckout=!0;var b=0,c=0;if(0<this.shoppingItems.length){for(var d=0;d<this.shoppingItems.length;d++){var c=this.shoppingItems[d],f=c.product;if(void 0==c.isSelected||c.isSelected())c=parseFloat(f.price*f.number),b+=c,f.number>f.quantity&&(this.canCheckout=!1)}this.total.text("Total: "+f.sing+b.toFixed(2))}else this.total.text("Total: 0.00");
this.item.text("Item: "+this.shoppingItems.length)},refreshInputValue:function(){for(var b=ShoppingCartUtil.getProductsFromStorage(),c=0,d=0;d<b.length;d++)c+=b[d].number;return c},removeItem:function(b){ShoppingCartUtil.removeProduct(b.product);b.singleShop.remove();for(var c=0;c<this.shoppingItems.length;c++)if(this.shoppingItems[c]==b){this.shoppingItems.remove(c);break}}});Class("ShoppingCartItem",{});
Class("ShoppingAdvancedProperty",{Package:"PageItem",create:function(b){this.config=b;this.advanced=this.config.Detailed.advanced;this.advanceLength=this.advanced.length;this.advanced[0]||(this.advanced=[this.advanced.list]);this.shopAdvanced1=$("<div style='width:300px; position:relative; height:25px;margin-top:5px'></div>");this.shopAdvanced2=$("<div style='width:300px; position:relative; height:30px;margin-top:5px'></div>");this.shopAdvanced3=$("<div style='width:300px; position:relative; height:30px;margin-top:5px'></div>");
for(b=0;b<this.advanceLength;b++)"list"==this.advanced[b].type&&(this.advanceListValue=this.advanced[b].defaultValue);this.initAdvanced();this.setAdvanceEvent()},initAdvanced:function(){var b=0,c=0,d=0;this.shopSelect=[];for(var f=0;f<this.advanceLength;f++)if(this.shopSelect[f]=[],"boolean"==this.advanced[f].type&&(b+=1,this.shopTypeName=$("<div style='position:absolute;margin-left:20px;width:auto; top:"+20*(b-1)+"px; height:20px;font-family:Arial; font-size:12px;line-height:20px'>"+this.advanced[f].name+
"</div>"),this.checkBox=$("<input type=checkbox  style='position:absolute;margin:0;top:"+(4+20*(b-1))+"px;'/>"),"true"==this.advanced[f].defaultValue&&this.checkBox.attr("checked","checked"),this.shopAdvanced1.append(this.checkBox).append(this.shopTypeName),this.shopAdvanced1.css({height:20*b+"px"})),"text"==this.advanced[f].type&&(c+=1,this.shopTypeName=$("<div style='width:55px; top:"+(5+30*(c-1))+"px; height:20px;line-height:20px;font-family:Arial;font-size:12px;position:absolute'>"+this.advanced[f].name+
":</div>"),this.shopValue=$("<input style='width:200px;position:absolute; top:"+(4+30*(c-1))+"px; left:50px; height:18px;font-family:Arial; font-size:12px;outline:medium' value='"+this.advanced[f].value+"'/>"),this.shopAdvanced2.append(this.shopTypeName).append(this.shopValue),this.shopAdvanced2.css({height:30*c+"px"})),"list"==this.advanced[f].type){var g=[],g=this.advanced[f].value.split(";"),h=0,d=d+1;this.shopTypeName=$("<div style='position:absolute;width:55px; top:5px; height:20px;line-height:20px;font-family:Arial; font-size:12px'>"+
this.advanced[f].name+":</div>");this.shopAdvanced3.append(this.shopTypeName);for(var k=0;k<g.length;k++)0<k&&0==k%5&&(this.shopAdvanced3.append("<br/><br/>"),top+=30,d+=1,h=0),h+=50,this.shopSelect[f][k]=$("<div class=borderStyle name="+this.advanced[f].name+" style='height:20px;min-width:25px;cursor:pointer;font-family:Arial; font-size:12px;border:1px solid black;left:"+h+"px; top:"+(3+30*(d-1))+"px; position:absolute;text-align:center;line-height:20px;padding-left:4px;padding-right:4px'>"+g[k]+
"</div>"),this.advanced[f].defaultValue==g[k]&&this.shopSelect[f][k].css("border","2px solid rgb(255,0,0)"),this.shopAdvanced3.append(this.shopSelect[f][k]);this.shopAdvanced3.css({height:30*d+"px"})}},setAdvanceEvent:function(){for(var b=0;b<this.shopSelect.length;b++)for(var c=this.shopSelect[b],d=c.length,f=this,g=0;g<d;g++)c[g].bind(_event._click,function(){for(var b=0;b<f.shopSelect.length;b++)for(j=0;j<f.shopSelect[b].length;j++)f.shopSelect[b][j].attr("name")==$(this).attr("name")&&f.shopSelect[b][j].css("border",
"1px solid rgb(0,0,0)"),f.shopSelect[b][j][0]==this&&(f.advanced[b].defaultValue=f.shopSelect[b][j][0].innerText,f.shopSelect[b][j].css("border","2px solid rgb(255,0,0)"))})},isCheckBoxSelected:function(){return this.checkBox[0].checked},setShoppingCartAdvanced:function(){var b="";if(0!=this.advanceLength)for(var c=0;c<this.advanceLength;c++)"text"==this.advanced[c].type&&(this.advanced[c].defaultValue=this.shopValue.val()),"list"==this.advanced[c].type&&(this.advanced[c].defaultValue=this.advanced[c].defaultValue),
"boolean"==this.advanced[c].type&&this.isCheckBoxSelected()&&(this.advanced[c].defaultValue=this.isCheckBoxSelected().toString()),b+=" "+this.advanced[c].name+":"+this.advanced[c].defaultValue+" ";return b}});
Class("MobileProductDetailsPanel",{Package:"PageItem",create:function(b,c,d){this.advancedObj=new PageItem.ShoppingAdvancedProperty(b);this._super(b,c,d);this.shoppingCart||(this.shoppingCart=new PageItem.MobileShoppingCartPanel(b,c),window.shoppingCart=this.shoppingCart);toolBar.getButton("ShoppingCart").setNumber(this.shoppingCart.refreshInputValue());this.canCheckout=!0},parseConfig:function(b){return{annotype:b.annotype,x:b.location.x,y:b.location.y,width:b.location.width,height:b.location.height,
bgColor:b.bgColor,bgAlpha:b.bgAlpha,cartType:b.cartType,imgUrl:b.imgUrl,titleStr:b.titleStr,url:b.url,Detailed:b.Detailed}},destroy:function(){this.phoneContainer.empty();this.phoneContainer.remove()},initUI:function(){this.phoneContainer=$("<div class=phoneContainer></div>");this.toolBar=$("<div></div>");this.closeButton=$("<div></div>");this.textTitle=$("<div>Product Details</div>");this.phoneImg=$("<img/>");this.title=$("<div>"+this.config.Detailed.title+"</div>");this.title.text(this.title.text().overflow(30));
this.phoneImgBox=$("<div></div>");this.contentText=$("<div></div>");this.shopDescribe=$("<div>"+this.config.Detailed.about+"</div>");this.price=$("<div>Price : "+this.config.Detailed.sing+this.config.Detailed.proce+"</div>");this.mNumber=$("<div><span style='position:absolute;'>Quantity : </span></div>");this.input=$.browser.safari&&$.system.name==$.system.IOS?$("<input type='text' value='1' style='width:30px;text-align:center;margin:auto;top:0;bottom:0;height:20px;outline:medium;margin-left:26px;position:absolute;border:1px solid rgb(255,255,255)'/>"):
$("<input type='text' value='1' style='width:40px;text-align:center;margin:auto;top:0;bottom:0;height:20px;outline:medium;margin-left:25px;position:absolute;border:1px solid rgb(255,255,255)'/>");this.input.allowNumberOnly();this.mAdd=$("<img src='"+uiBaseURL+"cartAdd.png' style='cursor:pointer;width:25px ;height:25px;position:absolute;background-color:#DDDDDA' />");this.mLow=$("<img src='"+uiBaseURL+"cartLow.png' style='cursor:pointer;width:25px ;height:25px;margin-left:69px;position:absolute;background-color:#DDDDDA'/>");
this.transitTime=$("<div>Delivery time: "+this.config.Detailed.time+"day(s)</div>");this.allQuantity=$("<div> "+this.config.Detailed.quantity+" In Stock</div>");this.mAddToCart=$("<span>Add to cart</span>");this.mCheckOut=$("<span>Checkout</span>");this.mailto=$("<a style='text-decoration: none'></a>");this.inputChangRed=$("<span style='position:absolute;top:35px;margin-left:30px;color:red;font-size:10px;width:115px;height:15px;right:30px'>Not enough in stock</span>");this.content=$("<div></div>");
this.addlow=$("<div></div>");tmpContainer.append(this.phoneContainer);this.phoneContainer.append(this.toolBar);this.phoneContainer.append(this.content);this.phoneContainer.append(this.contentText);this.toolBar.append(this.closeButton);this.toolBar.append(this.textTitle);this.phoneImgBox.append(this.phoneImg);this.contentText.append(this.title);this.contentText.append(this.shopDescribe);this.contentText.append(this.price);if(""!=this.advancedObj.advanced)for(var b=0;b<this.advancedObj.advanceLength;b++)"boolean"==
this.advancedObj.advanced[b].type&&(this.contentText.append(this.advancedObj.shopAdvanced1),this.advancedObj.shopAdvanced1.css({"margin-left":"15px","margin-top":"10px"})),"text"==this.advancedObj.advanced[b].type&&(this.contentText.append(this.advancedObj.shopAdvanced2),this.advancedObj.shopAdvanced2.css({"margin-left":"15px","margin-top":"10px"})),"list"==this.advancedObj.advanced[b].type&&(this.contentText.append(this.advancedObj.shopAdvanced3),this.advancedObj.shopAdvanced3.css({"margin-left":"15px",
"margin-top":"10px"}));this.contentText.append(this.mNumber).append(this.allQuantity).append(this.transitTime);this.content.append(this.phoneImgBox).append(this.contentText);this.mailto.append(this.mCheckOut);this.phoneContainer.append(this.mAddToCart);this.phoneContainer.append(this.mailto);this.mNumber.append(this.addlow);this.addlow.append(this.mAdd).append(this.input).append(this.mLow);this.imgs=this.config.Detailed.imgs;this.imgs[0]||(this.imgs=[this.imgs.img]);this.imgsCount=this.imgs.length;
!1===this.setting.shoppingCartOptinon.showPrice&&this.price.css({display:"none"});!1===this.setting.shoppingCartOptinon.showTime&&this.transitTime.css({display:"none"});this.setMobileShopCss();this.initImgs()},initImgs:function(){this.imageItems=[];for(var b=0;b<this.imgs.length;b++)this.imageItems[b]=this.imgs[b],bookConfig.isFlipPdf&&(this.imageItems[b].startsWith("./")?this.imageItems[b]="."+this.imageItems[b]:this.imageItems[b].isUrl()||(this.imageItems[b]="../"+this.imageItems[b]));1<this.imgsCount&&
(this.setSwipe(),this.imageURL=this.imageItems[0]);this.setImgs(this.imageItems[0])},setImgs:function(b){this.phoneImg.attr({src:b})},setSwipe:function(){this.currentIndex=0;var b=function(b,d){var f;f=30*windowWidth/1600;if(!(Math.abs(b)<=f)){var g=this.imageItems.length;b<-f?this.currentIndex=(this.currentIndex+1)%g:b>f&&(0==this.currentIndex&&(this.currentIndex+=g),this.currentIndex=(this.currentIndex-1)%g);this.imageURL=this.imageItems[this.currentIndex];this.setImgs(this.imageURL);$.browser.mise?
event.cancelBubble=!0:event.stopPropagation()}}.bind(this);this.phoneImgBox.speed(b)},setMobileShopCss:function(){this.addlow.css({position:"absolute",width:"100px",height:"25px",left:"75px"});this.content.css({position:"relative",width:windowWidth+15+"px",height:windowHeight-90+"px","overflow-x":"hidden"});this.mCheckOut.css({position:"absolute","background-color":"#ff4400",width:windowWidth/2+"px",height:"40px","text-align":"center","line-height":"2.5","font-family":"Arial",right:"0",bottom:"0",
cursor:"pointer",color:"white"});this.mAddToCart.css({position:"absolute","background-color":"#ffa800",width:windowWidth/2+"px",height:"40px","text-align":"center","line-height":"2.5","font-family":"Arial","margin-left":"0",bottom:"0",cursor:"pointer",color:"white"});this.allQuantity.css({width:"300px",height:"14px","margin-top":"10px","font-size":"10px","padding-left":"15px",color:Color(44849).toString(),"font-family":"Tahoma"});this.transitTime.css({width:"300px",height:"14px","margin-top":"10px",
color:"black","font-size":"10px","padding-left":"15px","font-family":"Tahoma"});this.contentText.css({position:"relative",width:windowWidth+"px"});this.mNumber.css({position:"relative",width:windowWidth+"px",height:"25px","line-height":"25px","margin-top":"10px",color:"black","font-size":"10px","padding-left":"15px","font-family":"Tahoma"});this.price.css({position:"relative",width:windowWidth+"px",height:"20px","margin-top":"10px","font-size":"18px",color:Color(12845056).toString(),"font-family":"Tahoma",
"padding-left":"15px"});this.title.css({width:windowWidth-15+"px",height:"32px","line-height":"26px","font-size":"26px",color:"black","font-family":"Tahoma","padding-left":"15px","margin-top":"7px"});this.shopDescribe.css({width:windowWidth-20+"px","line-height":"1.6","font-size":"13px",color:"black","padding-left":"15px","margin-top":"10px","font-family":"Tahoma"});this.textTitle.css({position:"absolute",width:windowWidth/2+5,margin:"auto","font-size":"18px","font-family":"Tahoma",color:"rgb(140,140,140)",
"vertical-align":"middle","line-height":"2.2",left:"0",top:"0",bottom:"0",right:"0","text-align":"center"});this.toolBar.css({position:"relative",width:windowWidth+"px","background-color":"white",border:"rgb(239,232,232) 1px solid",height:"40px"});this.closeButton.css({position:"absolute",margin:"auto","background-image":"url("+uiBaseURL+"background_prev.png)","background-repeat":"no-repeat","background-position":"4px 4px",cursor:"pointer",width:"28px",height:"28px",left:"10px",bottom:"0",top:"0"});
this.phoneImg.css({position:"absolute","max-width":windowWidth-30+"px","max-height":0.3*windowHeight+"px",margin:"auto",left:"0",bottom:"0",top:"0",right:"0"});this.phoneImgBox.css({position:"relative",width:windowWidth+"px",height:0.35*windowHeight+"px","z-index":"3000"});this.phoneContainer.css({width:windowWidth+"px",height:"100%",position:"absolute",transform:"translate(100%,0)","-webkit-transform":"translate(100%,0)","-moz-transform":"translate(100%,0)","-o-transform":"translate(100%,0)","-ms-transform":"translate(100%,0)",
"background-color":"#f7f7f7","z-index":"3000"})},initEvent:function(){var b=function(b,d){var f;f=30*windowWidth/1600;Math.abs(b)<=f||b>f&&this.hide()}.bind(this);this.phoneContainer.speed(b);this.mailto.bind(_event._click,this.doCheckout.bind(this));this.input.bind("blur",function(){parseInt(this.input.val())>this.config.Detailed.quantity?(this.mNumber.append(this.inputChangRed),this.input.css({"border-color":"red"}),this.canCheckout=!1):(this.inputChangRed.remove(),this.input.css({"border-color":"rgb(255,255,255)"}),
this.canCheckout=!0)}.bind(this));this.closeButton.bind(_event._up,function(){this.hide()}.bind(this));this.mAdd.bind(_event._up,function(){var b=parseInt(this.input.val())+1;this.input.val(b);b>this.config.Detailed.quantity?(this.mNumber.append(this.inputChangRed),this.input.css({"border-color":"red"}),this.canCheckout=!1):this.canCheckout=!0}.bind(this));this.mLow.bind(_event._up,function(){var b=parseInt(this.input.val());1!=b&&(b-=1,this.input.val(b),b<=this.config.Detailed.quantity&&(this.inputChangRed.remove(),
this.input.css({"border-color":"rgb(255,255,255)"}),this.canCheckout=!0),this.input.val(b))}.bind(this));this.mAddToCart.bind(_event._down,function(){tmpContainer.append(this.shoppingCart.mCart);this.shoppingCart.showCart();var b={};b.image=1>=this.imgsCount?this.imageItems[0]:this.imageURL;b.advancedName=this.advancedObj.setShoppingCartAdvanced().toString();b.title=this.config.Detailed.title;b.sing=this.config.Detailed.sing;b.price=this.config.Detailed.proce;b.number=parseInt(this.input.val());b.quantity=
this.config.Detailed.quantity;this.shoppingCart.addProduct(b);toolBar.getButton("ShoppingCart").setNumber(this.shoppingCart.refreshInputValue())}.bind(this))},show:function(){this.textTitle.css({display:"block"});this.contentText.css({display:"block"});this.mAddToCart.css({display:"block"});this.mCheckOut.css({display:"block"});this.phoneContainer.css({display:"block"});animateOnce.delay(this,10,[this.phoneContainer,{transform:"translate(0,0)","-webkit-transform":"translate(0,0)","-moz-transform":"translate(0,0)",
"-o-transform":"translate(0,0)","-ms-transform":"translate(0,0)"},0.5,null,"","ease"])},hide:function(){animateOnce(this.phoneContainer,{transform:"translate(100%,0)","-webkit-transform":"translate(100%,0)","-moz-transform":"translate(100%,0)","-o-transform":"translate(100%,0)","-ms-transform":"translate(100%,0)"},0.3,null,"","ease")},informationHide:function(){this.mAddToCart.css({display:"none"});this.mCheckOut.css({display:"none"});this.textTitle.css({display:"none"});this.contentText.css({display:"none"})},
onResize:function(b,c){windowWidth=b;windowHeight=c;this.setMobileShopCss()}}).extend(PageItem.ProductDetailsPanel);
Class("MobileShoppingCartPanel",{Package:"PageItem",create:function(b,c){this.config=b;this.setting=c;this.mCart=$("<div></div>");this.cToolBar=$("<div></div>");this.cClose=$("<div></div>");this.cTitle=$("<div>Shopping Cart</div>");this.deletes=$("<span>Delete</span>");this.total=$("<span style='font-size:10px'>(Total:$0.00)</span>");this.mCartCheck=$("<div>CheckOut </div>");this.cartMailto=$("<a style='text-decoration: none'></a>");this.item=$("<span style='position: absolute;bottom: 40px;left: 20px;font-size:12px;font-family:Tahoma;font-weight:bold'></span>");
this.mCart.append(this.cartMailto);this.cartMailto.append(this.mCartCheck);this.mCartCheck.append(this.total);this.shop=$("<div></div>");this.mCart.append(this.cToolBar).append(this.deletes).append(this.shop);this.cToolBar.append(this.cClose).append(this.cTitle);this.setCartCss();this.initEvent();this.canCheckout=!1},addProduct:function(b){b=ShoppingCartUtil.addProduct(b);this.shop.empty();this.shoppingItems=[];for(var c=0;c<b.length;c++){var d=new PageItem.MobileShoppingCartItem(this,b[c]);this.shop.append(d.singleShop);
this.shoppingItems.push(d)}this.refreshTotalValue()},initEvent:function(){this.cartMailto.bind(_event._click,this.doCheckout.bind(this));this.cClose.bind(_event._up,function(){this.hideCart()}.bind(this));var b=function(b,d){var f;f=30*windowWidth/1600;Math.abs(b)<=f||b>f&&this.hideCart()}.bind(this);this.mCart.speed(b);this.deletes.bind(_event._click,function(){for(var b=0;b<this.shoppingItems.length;){var d=this.shoppingItems[b];d.isSelected()?(this.removeItem(d),this.refreshTotalValue(),toolBar.getButton("ShoppingCart").setNumber(this.refreshInputValue())):
b++}}.bind(this))},setCartCss:function(){this.shop.css({width:windowWidth-20+"px",height:0.78*windowHeight+"px",position:"absolute",margin:"auto",top:"0px",left:"0px",bottom:"0px",right:"0px","overflow-x":"hidden"});this.mCartCheck.css({position:"absolute","background-color":"#ff4400",width:2/3*windowWidth+"px",height:"40px","text-align":"center","line-height":"2.5","font-family":"Arial",right:"0",bottom:"0",cursor:"pointer",color:"white"});this.deletes.css({position:"absolute","background-color":"#666666",
width:windowWidth/3+"px",height:"40px","text-align":"center","line-height":"2.5","font-family":"Arial","margin-left":"0",bottom:"0",cursor:"pointer",color:"white"});this.mCart.css({width:windowWidth+"px",height:windowHeight+"px",position:"absolute",transform:"translate(100%,0)","-webkit-transform":"translate(100%,0)","-moz-transform":"translate(100%,0)","-o-transform":"translate(100%,0)","-ms-transform":"translate(100%,0)","background-color":"#f7f7f7","z-index":"3000"});this.cTitle.css({position:"absolute",
width:windowWidth/2,margin:"auto","font-size":"18px","font-family":"Tahoma",color:"rgb(140,140,140)","vertical-align":"middle","line-height":"2.5",left:"0",top:"0",bottom:"0",right:"0","text-align":"center"});this.cToolBar.css({position:"relative",width:windowWidth+"px","background-color":"white",border:"rgb(239,232,232) 1px solid",height:"40px"});this.cClose.css({position:"absolute",margin:"auto","background-image":"url("+uiBaseURL+"background_prev.png)","background-repeat":"no-repeat","background-position":"4px 4px",
cursor:"pointer",width:"28px",height:"28px",left:"10px",bottom:"0",top:"0"})},getCartProducts:function(){var b=ShoppingCartUtil.getProductsFromStorage();this.shop.empty();this.shoppingItems=[];for(var c=0;c<b.length;c++){var d=new PageItem.MobileShoppingCartItem(this,b[c]);this.shop.append(d.singleShop);this.shoppingItems.push(d)}this.refreshTotalValue()},showCart:function(){this.getCartProducts();tmpContainer.append(this.mCart);this.mCart.css({display:"block"});animateOnce.delay(this,10,[this.mCart,
{transform:"translate(0,0)","-webkit-transform":"translate(0,0)","-moz-transform":"translate(0,0)","-o-transform":"translate(0,0)","-ms-transform":"translate(0,0)"},0.5,null,"","ease"])},hideCart:function(){animateOnce(this.mCart,{transform:"translate(100%,0)","-webkit-transform":"translate(100%,0)","-moz-transform":"translate(100%,0)","-o-transform":"translate(100%,0)","-ms-transform":"translate(100%,0)"},0.3,null,"","ease")}}).extend(PageItem.ShoppingCartPanel);
Class("MobileShoppingCartItem",{Package:"PageItem",create:function(b,c){this.initHtml(b,c);null==this.product.advancedName||""==this.product.advancedName?(this.carttitle.text(this.carttitle.text().overflow(18)),this.carttitle.text(this.product.title)):this.carttitle.text(this.product.title+"("+this.product.advancedName+")");this.cartPrice.text(this.product.sing+forceFloat(this.product.price));this.shoppingImage.attr("src",this.product.image);this.singleShop.append(this.checkBox).append(this.shoppingImage).append(this.carttitle).append(this.cartPrice).append(this.addlow).append(this.cartadd).append(this.cartInput).append(this.cartlow).append($("<hr style='position:absolute;margin:auto;margin-top:85px;width:100%'/>"));
parseInt(this.cartInput.val())>parseInt(c.quantity)&&(this.addlow.append(this.cartNot),this.cartInput.css({"border-color":"red"}),this.canCheckout=!1);this.setOneShop();this.initEvent()},initHtml:function(b,c){this.mobileShop=b;this.product=c;this.addlow=$("<div></div>");this.singleShop=$("<div></div>");this.checkBox=$("<input type=checkbox name=checkbox1 style='position:relative;top:46px;' />");this.checkBox[0].product=c;this.shoppingImage=$("<img/>");this.cartNot=$("<span style='position:absolute;color:red;font-size:10px;width:120px;right:0;height:10px'>Not enough in stock</span>");
$.browser.safari&&$.system.name==$.system.IOS?(this.cartInput=$("<input type='text' value='"+this.product.number+"' style='width:30px;margin-top:41px;text-align:center;height:20px;outline:medium;right:26px;position:absolute;border:1px solid rgb(255,255,255)'/>"),this.cartInput.allowNumberOnly(),this.cartadd=$("<img src='"+uiBaseURL+"cartAdd.png' style='cursor:pointer;margin-top:42px;width:25px ;height:25px;right:70px;position:absolute;background-color:#DDDDDA' />"),this.cartlow=$("<img src='"+uiBaseURL+
"cartLow.png' style='cursor:pointer;margin-top:42px;width:25px ;height:25px;right:0;position:absolute;background-color:#DDDDDA'/>")):(this.cartInput=$("<input type='text' value='"+this.product.number+"' style='width:40px;margin-top:42px;text-align:center;height:20px;outline:medium;right:32px;position:absolute;border:1px solid rgb(255,255,255)'/>"),this.cartInput.allowNumberOnly(),this.cartadd=$("<img src='"+uiBaseURL+"cartAdd.png' style='cursor:pointer;margin-top:42px;width:25px ;height:25px;right:70px;position:absolute;background-color:#DDDDDA' />"),
this.cartlow=$("<img src='"+uiBaseURL+"cartLow.png' style='cursor:pointer;margin-top:42px;width:25px ;height:25px;right:1px;position:absolute;background-color:#DDDDDA'/>"));this.carttitle=$("<span style='width:220px;height:45px;position:absolute;margin-top: 20px;left:115px;font-family:Tahoma;font-size:12px'></span>");this.cartPrice=$("<span></span>")},initEvent:function(){this.checkBox.bind(_event._click,function(){(function(){this.mobileShop.refreshTotalValue();toolBar.getButton("ShoppingCart").setNumber(this.mobileShop.refreshInputValue())}).delay(this,
10)}.bind(this));this.cartInput.bind("blur",function(){var b=parseInt(this.cartInput.val());b>this.product.quantity?(this.addlow.append(this.cartNot),this.cartInput.css({"border-color":"red"}),this.canCheckout=!1):(this.cartNot.remove(),this.cartInput.css({"border-color":"rgb(255,255,255)"}),this.canCheckout=!0);this.product.number=b;this.mobileShop.refreshTotalValue();ShoppingCartUtil.saveProducts(this.mobileShop.shoppingItems,this.mobileShop.setting);toolBar.getButton("ShoppingCart").setNumber(this.mobileShop.refreshInputValue())}.bind(this));
this.cartadd.bind(_event._up,function(){var b=parseInt(this.cartInput.val()),b=b+1;this.cartInput.val(b);this.product.number=b;this.mobileShop.refreshTotalValue();b>this.product.quantity?(this.addlow.append(this.cartNot),this.cartInput.css({"border-color":"red"}),this.canCheckout=!1):this.canCheckout=!0;ShoppingCartUtil.saveProducts(this.mobileShop.shoppingItems,this.mobileShop.setting);toolBar.getButton("ShoppingCart").setNumber(this.mobileShop.refreshInputValue())}.bind(this));this.cartlow.bind(_event._up,
function(){var b=parseInt(this.cartInput.val()),b=1>b-1?1:b-1;0>b||(this.cartInput.val(b),this.product.number=b,this.mobileShop.refreshTotalValue(),this.mobileShop.refreshInputValue(),b<=this.product.quantity?(this.cartNot.remove(),this.cartInput.css({"border-color":"rgb(255,255,255)"}),this.canCheckout=!0):this.canCheckout=!1,ShoppingCartUtil.saveProducts(this.mobileShop.shoppingItems,this.mobileShop.setting),toolBar.getButton("ShoppingCart").setNumber(this.mobileShop.refreshInputValue()))}.bind(this))},
isSelected:function(){return this.checkBox[0].checked},setOneShop:function(){this.cartPrice.css({position:"absolute",width:"170px",height:"20px","font-size":"15px",color:"rgb(250,11,11)","margin-top":"70px","font-family":"Tahoma",left:"115px"});this.addlow.css({width:"115px",height:"20px",position:"absolute",right:"0px","margin-top":"55px"});this.shoppingImage.css({position:"absolute",width:"70px",height:"70px","margin-top":"20px","margin-left":"10px"});this.singleShop.css({width:windowWidth+"px",
height:"120px"})}}).extend(ShoppingCartItem);global.shoppingCountHTML=$("<span class='shoppingCount'>0</span>");
Class("PCProductDetailsPanel",{Package:"PageItem",create:function(b,c,d){this.advancedObj=new PageItem.ShoppingAdvancedProperty(b);this._super(b,c,d);this.shoppingCart||(this.shoppingCart=new PageItem.PCShoppingCartPanel(b,c),window.shoppingCart=this.shoppingCart);this.shoppingCart.onClose=this.shoppingCartClose.bind(this);shoppingCountHTML.html(this.shoppingCart.refreshInputValue());this.canCheckout=!0},parseConfig:function(b){return{annotype:b.annotype,x:b.location.x,y:b.location.y,width:b.location.width,
height:b.location.height,bgColor:b.bgColor,bgAlpha:b.bgAlpha,cartType:b.cartType,imgUrl:b.imgUrl,titleStr:b.titleStr,url:b.url,Detailed:b.Detailed}},destroy:function(){this.container.empty();this.container.remove()},initUI:function(){this.initHtml();this.setShopCss();tmpContainer.append(this.bgImage);tmpContainer.append(this.container);this.container.append(this.content);this.container.append(this.closeButton);this.content.append(this.imgBox);this.imgBox.append(this.shopImg);this.contentText.append(this.shopTitle);
this.contentText.append(this.shopPrice);this.initAdvanced();this.contentText.append(this.number);this.number.append(this.add);this.number.append(this.input);this.number.append(this.low);this.contentText.append(this.allQuantity);this.contentText.append(this.time);this.contentText.append(this.about);this.contentText.append(this.addToCart);this.contentText.append(this.close);this.content.append(this.contentText);this.shopTitle.html(this.config.Detailed.title);this.shopTitle.text(this.shopTitle.text().overflow(14));
this.shopTitle.attr("title",this.config.Detailed.title);this.mailto=$("<a></a>");this.mailto.append(this.checkout);this.contentText.append(this.mailto);!1===this.setting.shoppingCartOptinon.showPrice&&this.shopPrice.css({display:"none"});!1===this.setting.shoppingCartOptinon.showTime&&this.time.css({display:"none"});this.initImgs();$(window).resize(this.onResize.bind(this));this.hide()},initHtml:function(){this.imgs=this.config.Detailed.imgs;this.imgs[0]||(this.imgs=[this.imgs.img]);this.imgBox=$("<div></div>");
this.shopImg=$("<img/>");this.background=$("<div></div>");this.container=$("<div id='ShoppingCart' ></div>");this.closeButton=$("<div></div>");this.content=$("<div></div>");this.contentText=$("<div></div>");this.innerContent=$("<div></div>");this.shopTitle=$("<div></div>");this.shopPrice=$("<div>Price:  "+this.config.Detailed.sing+this.config.Detailed.proce+"</div>");this.allQuantity=$("<div> "+this.config.Detailed.quantity+" In Stock</div>");this.bgImage=$("<div style='display:none'></div>");this.time=
$("<div>Delivery time: "+this.config.Detailed.time+"day(s)</div>");this.about=$("<div>"+this.config.Detailed.about+"</div>");this.number=$("<div>Quantity : </div>");this.addToCart=$("<span>Add to cart</span>");this.checkout=$("<a><div>Checkout</div></a>");this.close=$("<span>Close</span>");this.input=$("<input type='text' value='1' style='width : 70px;height:14px;line-height:14px;outline:medium;margin-left:22px;position:absolute;background:transparent;border:1px solid rgb(150,150,150);text-align:center'/>");
this.input.allowNumberOnly();this.add=$("<img src='"+uiBaseURL+"cartAdd.png' style='cursor:pointer;width:18px ;height:18px;position:absolute;margin-left:5px;background:#ddd;' />");this.low=$("<img src='"+uiBaseURL+"cartLow.png' style='cursor:pointer;width:18px ;height:18px;margin-left:94px;position:absolute;background:#ddd;'/>");this.not=$("<span style='position:absolute;color:red;font-size:10px;width:115px;height:10px;right:30px'>Not enough in stock</span>")},initAdvanced:function(){if(""!=this.advancedObj.advanced)for(var b=
0,c=0;c<this.advancedObj.advanceLength;c++)b+=30,"boolean"==this.advancedObj.advanced[c].type&&this.contentText.append(this.advancedObj.shopAdvanced1),"text"==this.advancedObj.advanced[c].type&&this.contentText.append(this.advancedObj.shopAdvanced2),"list"==this.advancedObj.advanced[c].type&&(b+=20*parseInt(this.advancedObj.advanced[c].value.split(";").length/5),this.contentText.append(this.advancedObj.shopAdvanced3)),this.about.css({width:"300px",height:150-b+"px","margin-top":"10px","font-size":"10px",
"font-family":"Arial","overflow-x":"hidden"})},initImgs:function(){this.imageItems=[];for(var b=0;b<this.imgs.length;b++)this.imageItems.push(this.imgs[b]),bookConfig.isFlipPdf&&(this.imageItems[b].startsWith("./")?this.imageItems[b]="."+this.imageItems[b]:this.imageItems[b].isUrl()||(this.imageItems[b]="../"+this.imageItems[b]));1<this.imgs.length&&(this.imageURL=this.imageItems[0],this.initButton());this.setImgs(this.imageItems[0])},setImgs:function(b){this.shopImg.attr("src",b)},initButton:function(){this.leftButton=
$('<img src="'+uiBaseURL+'photo_prev.png" style="position:absolute;z-index:1000;cursor:pointer;opacity:0.8;"></img>');this.rightButton=$('<img src="'+uiBaseURL+'photo_next.png" style="position:absolute;z-index:1000;cursor:pointer;opacity:0.8;"></img>');this.setButtonPosition();this.currentIndex=0;var b=this.imageItems.length;this.leftButton.bind(_event._click,function(){this.busy=!0;0==this.currentIndex&&(this.currentIndex+=b);this.currentIndex=(this.currentIndex-1)%b;this.imageURL=this.imageItems[this.currentIndex];
this.setImgs(this.imageURL)}.bind(this));this.rightButton.bind(_event._click,function(){this.busy=!0;this.currentIndex=(this.currentIndex+1)%b;this.imageURL=this.imageItems[this.currentIndex];this.setImgs(this.imageURL)}.bind(this));this.imgBox.append(this.leftButton).append(this.rightButton)},setButtonPosition:function(){this.leftButton.css({left:"17px",top:"143.5px"});this.rightButton.css({right:"17px",top:"143.5px"})},setShopCss:function(){this.bgImage.css({position:"absolute",width:windowWidth+
"px",height:windowHeight+"px",opacity:"0.5",top:0,"background-color":"black","z-index":"100"});var b="translate(0, "+-((windowHeight-430)/2+430)+"px)";this.container.css({position:"absolute",width:"730px",height:"430px",margin:"auto",left:"0",top:"0",bottom:"0",right:"0",transform:b,"-webkit-transform":b,"-moz-transform":b,"-o-transform":b,"-ms-transform":b,"z-index":"2000"});this.content.css({position:"absolute",width:"700",height:"400",margin:"auto",left:"0",top:"0",bottom:"0",right:"0","background-color":"white",
"z-index":"2000"});this.closeButton.css({position:"absolute",width:"20px",height:"20px",right:"0","background-image":"url("+uiBaseURL+"closecat.png)","background-repeat":"no-repeat",cursor:"pointer"});this.imgBox.css({position:"absolute",width:"360px",height:"325px",margin:"auto",left:"10px",top:"0",bottom:"20px"});this.shopImg.css({"max-width":"325px","max-height":"325px",position:"absolute",margin:"auto",left:"0",top:"0",bottom:"0",right:"0","-moz-box-shadow":"0 0 5px #bbb","-o-box-shadow":"0 0 5px #bbb",
"-webkit-box-shadow":"0 0 5px #bbb","box-shadow":"0 0 5px #bbb"});this.contentText.css({position:"absolute",width:"304px",height:"355px",margin:"auto","margin-top":"30px",right:"10px","overflow-x":"hidden","-webkit-user-select":"initial","-moz-user-select":"initial","-ms-user-select":"initial","user-select":"initial"});this.shopTitle.css({width:"300px",height:"30px","font-size":"30px",color:"black","font-family":"Arial"});this.about.css({width:"294px",height:"148px","margin-top":"10px","font-size":"10px",
"font-family":"Arial","overflow-x":"hidden"});this.number.css({width:"300px",height:"20px","line-height":"17px","margin-top":"10px",color:"black","font-size":"10px","font-family":"Arial"});this.time.css({width:"300px",height:"14px","margin-top":"10px",color:"black","font-size":"10px","font-family":"Arial"});this.allQuantity.css({width:"300px",height:"14px","margin-top":"8px","font-size":"10px",color:Color(44849).toString(),"font-family":"Arial"});this.shopPrice.css({width:"300px",height:"18px","margin-top":"10px",
"font-size":"16px",color:Color(12845056).toString(),"font-family":"Arial"});this.addToCart.css({position:"absolute",background:"rgb(80, 80, 80)",width:"68px","text-align":"center","line-height":"2.0","font-size":"10px","font-family":"Arial",bottom:"10px","margin-left":"0",cursor:"pointer",color:"white"});this.checkout.css({position:"absolute",background:"rgb(80, 80, 80)",width:"60px","text-align":"center","line-height":"2.0","font-size":"10px","font-family":"Arial",bottom:"10px",right:"158px",cursor:"pointer",
color:"white","text-decoration":"none"});this.close.css({position:"absolute",background:"rgb(80, 80, 80)",width:"40px","text-align":"center","line-height":"2.0","font-size":"10px","font-family":"Arial",bottom:"10px",right:"100px",cursor:"pointer",color:"white"})},initEvent:function(){this.input.bind("blur",function(){parseInt(this.input.val())>this.config.Detailed.quantity?(this.number.append(this.not),this.input.css({"border-color":"red"}),this.canCheckout=!1):(this.not.remove(),this.input.css({"border-color":"rgb(150,150,150)"}),
this.canCheckout=!0)}.bind(this));this.add.bind(_event._click,function(){var b=this.input.val(),b=parseInt(b)+1;this.input.val(b);b>this.config.Detailed.quantity?(this.number.append(this.not),this.input.css({"border-color":"red"}),this.canCheckout=!1):this.canCheckout=!0;ShoppingCartUtil.saveProducts(this.shoppingItems,this.setting)}.bind(this));this.low.bind(_event._click,function(){var b=parseInt(this.input.val());0!=b&&(b=1>b-1?1:b-1,b<=this.config.Detailed.quantity&&(this.not.remove(),this.input.css({"border-color":"rgb(150,150,150)"}),
this.canCheckout=!0),this.input.val(b))}.bind(this));this.mailto.bind(_event._click,this.doCheckout.bind(this));this.bgImage.bind(_event._end,function(){this.hide();this.shoppingCart.cart.css({display:"none"});this.bgImage.css({display:"none"})}.bind(this));this.closeButton.bind(_event._click,this.hide.bind(this));this.close.bind(_event._click,this.hide.bind(this));this.addToCart.bind(_event._click,function(){bookContainer.append(this.cart);this.skipHeid();this.shoppingCart.showCart();var b={};b.image=
1>=this.imageItems.length?this.imageItems[0]:this.imageURL;b.advancedName=this.advancedObj.setShoppingCartAdvanced().toString();b.title=this.config.Detailed.title;b.sing=this.config.Detailed.sing;b.price=parseInt(this.config.Detailed.proce);b.number=parseInt(this.input.val());b.quantity=parseInt(this.config.Detailed.quantity);this.shoppingCart.addProduct(b);shoppingCountHTML.html(this.shoppingCart.refreshInputValue())}.bind(this))},shoppingCartClose:function(){this.bgImage.css({display:"none"})},
onResize:function(){var b=this.container.css("width"),c=this.container.css("height");this.height=parseInt(c.replace("px",""));this.width=parseInt(b.replace("px",""));this.container.css({"margin-left":(windowWidth-this.width)/2+"px","margin-top":(windowHeight-this.height)/2+"px"});this.bgImage.css({width:windowWidth+"px",height:windowHeight+"px"})},skipHeid:function(){var b=this.container.css("height");this.height=parseInt(b.replace("px",""));b="translate(0, "+-((windowHeight-this.height)/2+this.height)+
"px)";b={transform:b,"-webkit-transform":b,"-moz-transform":b,"-o-transform":b,"-ms-transform":b};this.bgImage.css({display:"none"});animateOnce(this.container,b,0.5,null,"","ease-in-out")},hide:function(){var b=this.container.css("height");this.height=parseInt(b.replace("px",""));b="translate(0, "+-((windowHeight-this.height)/2+this.height)+"px)";b={transform:b,"-webkit-transform":b,"-moz-transform":b,"-o-transform":b,"-ms-transform":b};this.bgImage.css({display:"none"});setTimeout(function(){this.container.css({display:"none"});
this.content.css("display","none")}.bind(this),500);animateOnce(this.container,b,0.5,null,"","ease-in-out")},show:function(){this.bgImage.css({display:"block"});this.content.css("display","block");this.container.css({display:"block"});animateOnce.delay(this,10,[this.container,{transform:"translate(0px,0px)","-webkit-transform":"translate(0px,0px)","-moz-transform":"translate(0px,0px)","-o-transform":"translate(0px,0px)","-ms-transform":"translate(0px,0px)"},0.5,null,"","ease-in-out"])}}).extend(PageItem.ProductDetailsPanel);
Class("PCShoppingCartPanel",{Package:"PageItem",create:function(b,c){this.config=b;this.setting=c;this.cart=$("<div></div>");this.cartTitles=$("<span>Shopping Cart</span>");this.cartprices=$("<span style='position:absolute;font-size:12px;font-weight:bold;margin-top:50px;right:80px;font-family:Tahoma;color:black'>Price</span>");this.cartqu=$("<span style='position:absolute;font-size:12px;font-weight:bold;margin-top:50px;right:180px;font-family:Tahoma;color:black'>Quantity</span>");this.shopping=$("<div id='shopPrice'></div>");
this.item=$("<span class=itemss style='position: absolute;bottom: 40px;left: 10px;font-size:12px;font-family:Tahoma;font-weight:bold'></span>");this.total=$("<span></span>");this.cartCheckout=$("<span>Checkout</span>");this.cartClose=$("<span>Close</span>");this.cartAllDelete=$("<span>DeleteAll</span>");this.deleteBox=$('<div>Delete All Goods? <br/><span class="yes">Yes</span><span class="no">No</span></div>');this.cartMailto=$("<a></a>");this.cart.append(this.cartTitles);this.cart.append(this.cartqu);
this.cart.append(this.cartprices);this.cart.append(this.shopping);this.cart.append(this.item);this.cart.append(this.total);this.bgImage=$("<div></div>");this.cartMailto.append(this.cartCheckout);this.cart.append(this.cartAllDelete);this.cart.append(this.cartMailto);this.cart.append(this.cartClose);this.cart.append(this.deleteBox);tmpContainer.append(this.bgImage);tmpContainer.append(this.cart);this.promptBox=$("<div></div>");this.setCartCss();this.hideCart();this.initEvent();this.canCheckout=!1},
initEvent:function(){this.bgImage.bind(_event._end,function(){this.cart.css({display:"none"});this.bgImage.css({display:"none"})}.bind(this));this.deleteBox.find(".yes").bind(_event._click,function(){this.deleteAll();this.deleteBox.hide(300)}.bind(this));this.deleteBox.find(".no").bind(_event._click,function(){this.deleteBox.hide(300)}.bind(this));this.cartAllDelete.bind(_event._click,function(){this.deleteBox.show(300)}.bind(this));this.cartMailto.bind(_event._click,this.doCheckout.bind(this));this.cartClose.bind(_event._click,
function(){this.hideCart();if(this.onClose)this.onClose();ShoppingCartUtil.saveProducts(this.shoppingItems,this.setting)}.bind(this));$(window).resize(function(){this.bgImage.css({width:windowWidth+"px",height:windowHeight+"px"})}.bind(this))},deleteAll:function(){for(ShoppingCartUtil.setProductsToStorage([]);0<this.shoppingItems.length;)this.removeItem(this.shoppingItems[0]),this.refreshTotalValue()},addProduct:function(b){b=ShoppingCartUtil.addProduct(b);this.shopping.empty();this.shoppingItems=
[];for(var c=0;c<b.length;c++){var d=new PageItem.PCShoppingCartItem(this,b[c]);this.shopping.append(d.singleShop);this.shoppingItems.push(d)}this.refreshTotalValue();this.refreshInputValue()},showCart:function(){this.cart.css("display","block");this.bgImage.css("display","block")},hideCart:function(){this.cart.css("display","none");this.bgImage.css("display","none")},setCartCss:function(){this.deleteBox.css({"font-family":"Tahoma",display:"none",position:"absolute",width:"300px","padding-top":"20px",
"text-align":"center",height:"140px",margin:"auto",left:"50%",top:"50%","box-shadow":"0 0 5px #666",background:"#eee",transform:"translate(-50%,-50%)","-webkit-transform":"translate(-50%,-50%)","-moz-transform":"translate(-50%,-50%)","-o-transform":"translate(-50%,-50%)","-ms-transform":"translate(-50%,-50%)","z-index":"3000"});this.deleteBox.find(".yes").css({position:"absolute",color:"#fff",background:"#33cc33",left:"80px",bottom:"35px",width:"50px",height:"25px","line-height":"25px",cursor:"pointer"});
this.deleteBox.find(".no").css({position:"absolute",color:"#fff",background:"rgb(80, 80, 80)",right:"80px",bottom:"35px",width:"50px",height:"25px","line-height":"25px",cursor:"pointer"});this.bgImage.css({position:"absolute",width:windowWidth+"px",height:windowHeight+"px",opacity:"0.5",top:0,"background-color":"black","z-index":"100"});this.shopping.css({width:"515px",height:"190px",position:"absolute",margin:"auto",top:"10px",left:"0px",bottom:"0px",right:"0px","overflow-x":"hidden"});this.total.css({position:"absolute",
bottom:"40px",right:"20px","font-size":"12px","font-family":"Tahoma","font-weight":"bold",color:"red"});this.cartClose.css({position:"absolute",background:"rgb(80, 80, 80)",width:"40px","text-align":"center","line-height":"2.0","font-size":"10px","font-family":"Arial",bottom:"10px",right:"20px",cursor:"pointer",color:"white"});this.cartAllDelete.css({position:"absolute",background:"rgb(80, 80, 80)",color:"white",width:"60px","text-align":"center","line-height":"2.0","font-size":"10px","font-family":"Arial",
bottom:"10px",left:"10px",cursor:"pointer"});this.cartCheckout.css({position:"absolute",background:"rgb(80, 80, 80)",width:"60px","text-align":"center","line-height":"2.0","font-size":"10px","font-family":"Arial",bottom:"10px",right:"70px",cursor:"pointer",color:"white","text-decoration":"none"});this.cartTitles.css({position:"absolute","padding-left":"10px",width:"490px","border-bottom":"1px solid white",height:"40px","line-height":"40px","font-size":"14px","font-family":"Tahoma",color:"white","background-color":"rgb(152,152,152)"});
this.cart.css({position:"absolute",border:"1px solid white","line-height":"2.5",margin:"auto",left:"0",top:"0",bottom:"0",right:"0",width:"500px",height:"350px","background-color":"rgb(218,218,218)","overflow-x":"hidden","z-index":"3000"})}}).extend(PageItem.ShoppingCartPanel);
Class("PCShoppingCartItem",{Package:"PageItem",create:function(b,c){this.initHtml(b,c);!1===pageEditor.setting.shoppingCartOptinon.showPrice&&this.cartPrice.css({display:"none"});null==this.product.advancedName||""==this.product.advancedName?(this.carttitle.text(this.carttitle.text().overflow(16)),this.carttitle.text(this.product.title),this.carttitle.attr("title",this.product.title)):(25<this.product.advancedName.length&&this.carttitle.attr("title",this.product.title+"("+this.product.advancedName+
")"),this.carttitle.text(this.product.title+"("+this.product.advancedName+")"));this.cartPrice.text(this.product.sing+forceFloat(this.product.price));this.singleShop.append($("<hr style='position:absolute; margin-left:10px;margin-top:85px;width:475px'/>"));parseInt(this.cartInput.val())>parseInt(c.quantity)&&(this.addlow.append(this.cartNot),this.cartInput.css({"border-color":"red"}),this.shop.canCheckout=!1);this.initEvent();this.setCartCSS()},initHtml:function(b,c){this.shop=b;this.product=c;this.cartPrice=
$("<span></span>");this.addlow=$("<div></div>");this.singleShop=$("<div style='width:480px;height:80px'></div>");this.cartInput=$("<input id='cartinput' type='text' value='"+this.product.number+"'/>");this.cartInput.allowNumberOnly();this.shoppingImage=$("<img/>");this.carttitle=$("<span style='width:165px;line-height:35px;height:35px;position:absolute;margin-top: 28px;left:80px;overflow:hidden;font-family:Tahoma;font-size:12px'></span>");this.dustbin=$("<img src='"+uiBaseURL+"cartDelete.png' style='cursor:pointer;position:absolute;right: 25px;margin-top:35px'/>");
this.cartadd=$("<img src='"+uiBaseURL+"cartAdd.png' style='cursor:pointer;width:18px ;height:18px;position:absolute;border:1px solid #bbb;left:25px;background:#eee;' />");this.cartlow=$("<img src='"+uiBaseURL+"cartLow.png' style='cursor:pointer;width:18px ;height:18px;margin-left:97px;position:absolute;border:1px solid #bbb;background:#eee;'/>");this.cartNot=$("<span style='position:absolute;color:red;font-size:10px;width:115px;height:10px;margin-top:15px;left:15px'>Not enough in stock</span>");this.singleShop.append(this.shoppingImage);
this.singleShop.append(this.carttitle);this.singleShop.append(this.addlow);this.singleShop.append(this.cartPrice);this.singleShop.append(this.dustbin);this.addlow.append(this.cartadd);this.addlow.append(this.cartlow);this.addlow.append(this.cartInput);this.setImg(this.product.image)},setImg:function(b){this.shoppingImage.attr("src",b)},initEvent:function(){this.cartInput.bind("keyup",function(){var b=parseInt(this.cartInput.val());""==b&&(b=this.cartInput.val());b>this.product.quantity?(this.addlow.append(this.cartNot),
this.cartInput.css({"border-color":"red"}),this.canCheckout=!1):(this.cartNot.remove(),this.cartInput.css({"border-color":"rgb(150,150,150)"}),this.canCheckout=!0);this.product.number=b;this.shop.refreshTotalValue();ShoppingCartUtil.saveProducts(this.shop.shoppingItems,this.shop.setting);shoppingCountHTML.html(this.shop.refreshInputValue())}.bind(this));this.dustbin.bind(_event._click,function(){this.shop.removeItem(this);this.shop.refreshTotalValue();shoppingCountHTML.html(this.shop.refreshInputValue())}.bind(this));
this.cartadd.bind(_event._click,function(){var b=this.cartInput.val(),b=parseInt(b)+1;this.cartInput.val(b);this.product.number=b;b>this.product.quantity&&(this.addlow.append(this.cartNot),this.cartInput.css({"border-color":"red"}));this.shop.refreshTotalValue();ShoppingCartUtil.saveProducts(this.shop.shoppingItems,this.shop.setting);shoppingCountHTML.html(this.shop.refreshInputValue())}.bind(this));this.cartlow.bind(_event._click,function(){var b=this.cartInput.val();0!=parseInt(b)&&(b=1>parseInt(b)-
1?1:parseInt(b)-1,this.cartInput.val(b),this.product.number=b,b<=this.product.quantity&&(this.cartNot.remove(),this.cartInput.css({"border-color":"rgb(150,150,150)"})),this.shop.refreshTotalValue(),ShoppingCartUtil.saveProducts(this.shop.shoppingItems,this.shop.setting),shoppingCountHTML.html(this.shop.refreshInputValue()))}.bind(this))},setCartCSS:function(){this.cartPrice.css({position:"absolute",width:"70px",height:"20px","font-size":"12px",color:"black","margin-top":"30px","font-family":"Tahoma",
right:"65px"});this.cartInput.css({"text-align":"center",width:"40px",height:"16px",outline:"medium","margin-left":"50px",position:"absolute",background:"#fff",border:"1px solid rgb(150,150,150)"});this.addlow.css({width:"120px",height:"40px",right:"170px",position:"absolute","margin-top":"35px"});this.shoppingImage.css({position:"absolute",width:"52px",height:"35px","margin-top":"28px",left:"10px","-moz-box-shadow":"0 0 5px #fff","-o-box-shadow":"0 0 5px #fff","-webkit-box-shadow":"0 0 5px #fff",
"box-shadow":"0 0 5px #fff"})}}).extend(PageItem.ShoppingCartItem);
Class("Pentagon",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.pentagon=$("<canvas width='"+this.width+"' height='"+this.height+"'></canvas>");this.pentagon.css({position:"absolute",
left:this.x+"px",top:this.y+"px"});this.setRotation(this.pentagon,this.config.rotation);this.parent.append(this.pentagon);this.draw();this.initEvent()},parseConfig:function(b){return{x:b.location.x,y:b.location.y,width:b.location.width,height:b.location.height,rotation:b.location.rotation,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,colorA:b.gradientColorA,colorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),
sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},draw:function(){var b=this.pentagon[0],c=b.getContext("2d");c.clearRect(0,0,b.width,b.height);this.width-=this.config.borderWidth;this.height-=this.config.borderWidth;c.beginPath();c.lineCap="round";c.lineJoin="round";c.strokeStyle=Color(this.config.borderColor).toString();c.lineWidth=this.config.borderWidth;c.globalAlpha=this.config.spalpha;c.moveTo(this.config.borderWidth,3*this.height/
8);c.lineTo(this.width/6,this.height);c.lineTo(5*this.width/6,this.height);c.lineTo(this.width,3*this.height/8);c.lineTo(this.width/2,this.config.borderWidth);this.config.sh&&(c.shadowOffsetX=this.config.sx,c.shadowOffsetY=this.config.sy,c.shadowBlur=this.config.sd,c.shadowColor=Color(this.config.sc).toString());if("gradient"==this.config.fillStyle){var d=this.config.angle*Math.PI/180,b=this.width/2+this.width/2*Math.cos(d),d=this.height/2+this.height/2*Math.sin(d),f=(Number(this.config.angle)+180)*
Math.PI/180,g=this.width/2+this.width/2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f),b=c.createLinearGradient(g,f,b,d);b.addColorStop(0,this.colorA);b.addColorStop(1,this.colorB);c.fillStyle=b;c.fill()}"Pure"==this.config.fillStyle&&(c.fillStyle=this.color,c.fill());c.closePath();0!=this.config.borderWidth&&c.stroke()},initEvent:function(){this.linkURL="";null!=this.config.action&&(null!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,
null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.pentagon)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.pentagon[0].width=this.width;this.pentagon[0].height=this.height;this.draw();this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.pentagon.css({left:this.x+
"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("Dovetailed",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.pageHeights=this.config.pageHeight;this.width=Number(this.config.width*this.pageWidth);this.height=Number(this.config.height*this.pageHeight);this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.dovetailed=$("<canvas width='"+this.width+"' height='"+
this.height+"'></canvas>");this.dovetailed.css({position:"absolute",left:this.x+"px",top:this.y+"px"});this.setRotation(this.dovetailed,this.config.rotation);this.parent.append(this.dovetailed);this.draw(this.pageWidth);this.initEvent();parseBool(this.config.reflection)&&this.imageReflection(this.dovetailed)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,rotation:b.location.rotation,width:b.location.width,height:b.location.height,pageWidth:b.location.pageWidth,pageHeight:b.location.pageHeight,
alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,colorA:b.gradientColorA,colorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,arrowWidth:b.arrowWidth,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},
draw:function(b){var c=this.dovetailed[0],d=c.getContext("2d");this.config.borderWidth=Number(this.config.borderWidth);d.clearRect(0,0,c.width,c.height);this.width-=this.config.borderWidth;this.height-=this.config.borderWidth;this.config.pageWidth||(this.config.pageWidth=bookConfig.largePageWidth);this.arrowWidth=this.config.arrowWidth/this.config.pageWidth*b;this.arrowWidth>2*this.width/3&&(this.arrowWidth=this.width-2*this.width/3);0==this.arrowWidth&&(this.arrowWidth=this.width-10,this.arrowWidth=
10);this.dovetailWidth=this.width-this.arrowWidth;d.beginPath();d.lineCap="round";d.lineJoin="round";d.strokeStyle=Color(this.config.borderColor).toString();d.lineWidth=this.config.borderWidth;d.globalAlpha=this.config.spalpha;d.moveTo(this.config.borderWidth,this.config.borderWidth);d.lineTo(this.arrowWidth,(this.height+this.config.borderWidth)/2);d.lineTo(this.config.borderWidth,this.height);d.lineTo(this.dovetailWidth,this.height);d.lineTo(this.width,(this.height+this.config.borderWidth)/2);d.lineTo(this.dovetailWidth,
this.config.borderWidth);this.config.sh&&(d.shadowOffsetX=this.config.sx,d.shadowOffsetY=this.config.sy,d.shadowBlur=this.config.sd,d.shadowColor=Color(this.config.sc).toString());if("gradient"==this.config.fillStyle){c=this.config.angle*Math.PI/180;b=this.width/2+this.width/2*Math.cos(c);var c=this.height/2+this.height/2*Math.sin(c),f=(Number(this.config.angle)+180)*Math.PI/180,g=this.width/2+this.width/2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f);b=d.createLinearGradient(g,f,b,c);b.addColorStop(0,
this.colorA);b.addColorStop(1,this.colorB);d.fillStyle=b;d.fill()}"Pure"==this.config.fillStyle&&(d.fillStyle=this.color,d.fill());d.closePath();0!=this.config.borderWidth&&d.stroke()},initEvent:function(){this.flag=0;this.linkURL="";null!=this.config.action&&(null!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.dovetailed)},
onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.dovetailed[0].width=this.width;this.dovetailed[0].height=this.height;this.draw(this.pageWidth);this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.dovetailed.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("Parallelogram",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.parallelogram=$("<canvas width='"+this.width+"' height='"+this.height+"' id='prismatic'></canvas>");
this.parallelogram.css({position:"absolute",left:this.x+"px",top:this.y+"px"});this.setRotation(this.parallelogram,this.config.rotation);this.parent.append(this.parallelogram);this.draw();this.initEvent()},parseConfig:function(b){return{x:b.location.x,y:b.location.y,width:b.location.width,height:b.location.height,rotation:b.location.rotation,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,colorA:b.gradientColorA,colorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,borderWidth:b.borderWidth,borderColor:b.borderColor,
borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},draw:function(){var b=this.parallelogram[0],c=b.getContext("2d");c.clearRect(0,0,b.width,b.height);this.width-=this.config.borderWidth;this.height-=this.config.borderWidth;c.beginPath();c.lineCap="round";c.lineJoin="round";c.strokeStyle=Color(this.config.borderColor).toString();c.lineWidth=this.config.borderWidth;c.globalAlpha=
this.config.spalpha;c.moveTo(this.width/4,this.config.borderWidth);c.lineTo(this.config.borderWidth,this.height);c.lineTo(3*this.width/4+2,this.height);c.lineTo(this.width,this.config.borderWidth);parseBool(this.config.sh)&&(c.shadowOffsetX=this.config.sx,c.shadowOffsetY=this.config.sy,c.shadowBlur=this.config.sd,c.shadowColor=Color(this.config.sc).toString());if("gradient"==this.config.fillStyle){var d=this.config.angle*Math.PI/180,b=this.width/2+this.width/2*Math.cos(d),d=this.height/2+this.height/
2*Math.sin(d),f=(Number(this.config.angle)+180)*Math.PI/180,g=this.width/2+this.width/2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f),b=c.createLinearGradient(g,f,b,d);b.addColorStop(0,this.colorA);b.addColorStop(1,this.colorB);c.fillStyle=b;c.fill()}"Pure"==this.config.fillStyle&&(c.fillStyle=this.color,c.fill());c.closePath();0!=this.config.borderWidth&&c.stroke()},initEvent:function(){this.linkURL="";null!=this.config.action&&(null!=this.config.action.length&&(this.config.action=this.config.action[0]),
this.linkURL=this.config.action.url,null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.parallelogram)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.parallelogram[0].width=this.width;this.parallelogram[0].height=this.height;this.draw();this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;
this.y=this.config.y*this.pageHeight;this.parallelogram.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("Hexagon",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.hexagon=$("<canvas width='"+this.width+"' height='"+this.height+"'></canvas>");this.hexagon.css({position:"absolute",
left:this.x+"px",top:this.y+"px"});this.setRotation(this.hexagon,this.config.rotation);this.parent.append(this.hexagon);this.draw();this.initEvent();parseBool(this.config.reflection)&&this.imageReflection(this.hexagon)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,rotation:b.location.rotation,width:b.location.width,height:b.location.height,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,colorA:b.gradientColorA,colorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,reflection:b.location.reflection,
reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},draw:function(){var b=this.hexagon[0],c=b.getContext("2d");c.clearRect(0,0,b.width,b.height);this.width-=this.config.borderWidth;this.height-=this.config.borderWidth;c.beginPath();c.lineCap=
"round";c.lineJoin="round";c.strokeStyle=Color(this.config.borderColor).toString();c.lineWidth=this.config.borderWidth;c.globalAlpha=this.config.spalpha;c.moveTo(this.width/4,this.config.borderWidth);c.lineTo(this.config.borderWidth,this.height/2);c.lineTo(this.width/4,this.height);c.lineTo(3*this.width/4,this.height);c.lineTo(this.width,this.height/2);c.lineTo(3*this.width/4,this.config.borderWidth);this.config.sh&&(c.shadowOffsetX=this.config.sx,c.shadowOffsetY=this.config.sy,c.shadowBlur=this.config.sd,
c.shadowColor=Color(this.config.sc).toString());if("gradient"==this.config.fillStyle){var d=this.config.angle*Math.PI/180,b=this.width/2+this.width/2*Math.cos(d),d=this.height/2+this.height/2*Math.sin(d),f=(Number(this.config.angle)+180)*Math.PI/180,g=this.width/2+this.width/2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f),b=c.createLinearGradient(g,f,b,d);b.addColorStop(0,this.colorA);b.addColorStop(1,this.colorB);c.fillStyle=b;c.fill()}"Pure"==this.config.fillStyle&&(c.fillStyle=this.color,
c.fill());c.closePath();0!=this.config.borderWidth&&c.stroke()},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.hexagon[0].width=this.width;this.hexagon[0].height=this.height;this.draw();this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.hexagon.css({left:this.x+"px",top:this.y+"px"})},initEvent:function(){this.linkURL="";null!=
this.config.action&&(void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,null!=this.linkURL&&"www"==this.linkURL.substr(1,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.hexagon)}}).extend(PageItem.Item);
Class("FlowChart",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.flowChart=$("<canvas width='"+this.width+"' height='"+this.height+"'></canvas>");this.flowChart.css({position:"absolute",
left:this.x+"px",top:this.y+"px"});this.setRotation(this.flowChart,this.config.rotation);this.parent.append(this.flowChart);this.draw();this.initEvent();parseBool(this.config.reflection)&&this.imageReflection(this.flowChart)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,rotation:b.location.rotation,width:b.location.width,height:b.location.height,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,colorA:b.gradientColorA,colorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,reflection:b.location.reflection,
reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},draw:function(){var b=this.flowChart[0],c=b.getContext("2d");c.clearRect(0,0,b.width,b.height);this.width-=this.config.borderWidth;this.height-=this.config.borderWidth;c.beginPath();c.lineCap=
"round";c.lineJoin="round";c.strokeStyle=Color(this.config.borderColor).toString();c.lineWidth=this.config.borderWidth;c.globalAlpha=this.config.spalpha;c.moveTo(this.config.borderWidth,this.config.borderWidth);c.lineTo(this.config.borderWidth,this.height);c.lineTo(this.width,this.height);c.lineTo(this.width,this.config.borderWidth);parseBool(this.config.sh)&&(c.shadowOffsetX=this.config.sx,c.shadowOffsetY=this.config.sy,c.shadowBlur=this.config.sd,c.shadowColor=Color(this.config.sc).toString());
if("gradient"==this.config.fillStyle){var d=this.config.angle*Math.PI/180,b=this.width/2+this.width/2*Math.cos(d),d=this.height/2+this.height/2*Math.sin(d),f=(Number(this.config.angle)+180)*Math.PI/180,g=this.width/2+this.width/2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f),b=c.createLinearGradient(g,f,b,d);b.addColorStop(0,this.colorA);b.addColorStop(1,this.colorB);c.fillStyle=b;c.fill()}"Pure"==this.config.fillStyle&&(c.fillStyle=this.color,c.fill());c.closePath();c.stroke();c.beginPath();
c.moveTo(this.width/8+this.config.borderWidth,this.config.borderWidth);c.lineTo(this.width/8+this.config.borderWidth,this.height);c.closePath();c.stroke();c.beginPath();c.moveTo(7*this.width/8,this.config.borderWidth);c.lineTo(7*this.width/8,this.height);c.closePath();0!=this.config.borderWidth&&c.stroke()},initEvent:function(){this.linkURL="";null!=this.config.action&&(null!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,null!=this.linkURL&&
"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.flowChart)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.flowChart[0].width=this.width;this.flowChart[0].height=this.height;this.draw();this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.flowChart.css({left:this.x+
"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("Cylinder",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.cylinder=$("<canvas width='"+this.width+"' height='"+this.height+"'></canvas>");this.cylinder.css({position:"absolute",
left:this.x+"px",top:this.y+"px"});this.setRotation(this.cylinder,this.config.rotation);this.parent.append(this.cylinder);this.draw();this.initEvent();parseBool(this.config.reflection)&&this.imageReflection(this.cylinder)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,rotation:b.location.rotation,width:b.location.width,height:b.location.height,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,colorA:b.gradientColorA,colorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,reflection:b.location.reflection,
reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,cylinderRadius:b.cylinderRadius,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},fillColor:function(b){if("gradient"==this.config.fillStyle){var c=this.config.angle*Math.PI/180,d=this.width/2+this.width/2*Math.cos(c),c=this.height/2+this.height/
2*Math.sin(c),f=(Number(this.config.angle)+180)*Math.PI/180,g=this.width/2+this.width/2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f),d=b.createLinearGradient(g,f,d,c);d.addColorStop(0,this.colorA);d.addColorStop(1,this.colorB);b.fillStyle=d;b.fill()}"Pure"==this.config.fillStyle&&(b.fillStyle=this.color,b.fill())},draw:function(){var b=this.cylinder[0],c=b.getContext("2d");c.clearRect(0,0,b.width,b.height);this.cylinderRadius=this.config.cylinderRadius;c.lineCap="round";c.lineJoin="round";
c.strokeStyle=Color(this.config.borderColor).toString();c.lineWidth=this.config.borderWidth;c.globalAlpha=this.config.spalpha;0==this.cylinderRadius&&(this.cylinderRadius=10);this.cylinderRadius>this.height/2&&(this.cylinderRadius=this.height/2);var b=this.width/2-this.config.borderWidth,d=this.cylinderRadius/2-this.config.borderWidth,f=this.width/2,g=this.cylinderRadius/2,h=b>d?b:d,k=b/h,d=d/h;c.save();c.beginPath();c.scale(k,d);c.moveTo((f+b)/k,g/d);c.arc(f/k,g/d,h,0,2*Math.PI);c.restore();this.fillColor(c);
"none"!=this.config.fillStyle&&c.fillRect(this.config.borderWidth,this.cylinderRadius/2,this.width-2*this.config.borderWidth,this.height-this.cylinderRadius);c.closePath();c.stroke();c.moveTo(this.config.borderWidth,this.cylinderRadius/2);c.lineTo(this.config.borderWidth,this.height-this.cylinderRadius/2);c.moveTo(this.width-this.config.borderWidth,this.cylinderRadius/2);c.lineTo(this.width-this.config.borderWidth,this.height-this.cylinderRadius/2);c.save();c.scale(k,d);c.moveTo((f+b)/k,(this.height-
g)/d);c.arc(f/k,(this.height-g)/d,h,0,Math.PI);c.restore();this.fillColor(c);c.stroke();c.closePath();this.config.sh&&(c.shadowOffsetX=this.config.sx,c.shadowOffsetY=this.config.sy,c.shadowBlur=this.config.sd,c.shadowColor=Color(this.config.sc).toString())},initEvent:function(){this.flag=0;this.linkURL="";null!=this.config.action&&(null!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&
(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.cylinder)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.cylinder[0].width=this.width;this.cylinder[0].height=this.height;this.draw();this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.cylinder.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("Trapezoid",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=Number(this.config.width*this.pageWidth);this.height=Number(this.config.height*this.pageHeight);this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.trapezoid=$("<canvas width='"+this.width+"' height='"+this.height+"'></canvas>");this.trapezoid.css({position:"absolute",
left:this.x+"px",top:this.y+"px"});this.setRotation(this.trapezoid,this.config.rotation);this.parent.append(this.trapezoid);this.draw(this.pageWidth);this.initEvent();parseBool(this.config.reflection)&&this.imageReflection(this.trapezoid)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,rotation:b.location.rotation,width:b.location.width,height:b.location.height,pageWidth:b.location.pageWidth,pageHeight:b.location.pageHeight,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,colorA:b.gradientColorA,
colorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,bottomLength:b.bottomLength,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},draw:function(b){var c=this.trapezoid[0],d=c.getContext("2d");d.clearRect(0,
0,c.width,c.height);this.width-=this.config.borderWidth;this.height-=this.config.borderWidth;this.config.pageWidth||(this.config.pageWidth=bookConfig.largePageWidth);this.bottomLength=Number(this.config.bottomLength)/this.config.pageWidth*b;this.bottomLength=0==this.bottomLength||this.config.bottomLength>2*this.width/3?this.width-2*this.width/3:this.bottomLength;d.beginPath();d.lineCap="round";d.lineJoin="round";d.strokeStyle=Color(this.config.borderColor).toString();d.lineWidth=this.config.borderWidth;
d.globalAlpha=this.config.spalpha;d.moveTo((this.width-this.bottomLength)/2,this.config.borderWidth);d.lineTo(this.config.borderWidth,this.height);d.lineTo(this.width,this.height);d.lineTo((this.width-this.bottomLength)/2+this.bottomLength,this.config.borderWidth);this.config.sh&&(d.shadowOffsetX=this.config.sx,d.shadowOffsetY=this.config.sy,d.shadowBlur=this.config.sd,d.shadowColor=Color(this.config.sc).toString());if("gradient"==this.config.fillStyle){c=this.config.angle*Math.PI/180;b=this.width/
2+this.width/2*Math.cos(c);var c=this.height/2+this.height/2*Math.sin(c),f=(Number(this.config.angle)+180)*Math.PI/180,g=this.width/2+this.width/2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f);b=d.createLinearGradient(g,f,b,c);b.addColorStop(0,this.colorA);b.addColorStop(1,this.colorB);d.fillStyle=b;d.fill()}"Pure"==this.config.fillStyle&&(d.fillStyle=this.color,d.fill());d.closePath();0!=this.config.borderWidth&&d.stroke()},initEvent:function(){this.flag=0;this.linkURL="";null!=this.config.action&&
(null!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.trapezoid)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.trapezoid[0].width=this.width;this.trapezoid[0].height=this.height;this.draw(this.pageWidth);
this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.trapezoid.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("RightArrow",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.rightArrow=$("<canvas width='"+this.width+"' height='"+this.height+"'></canvas>");this.rightArrow.css({position:"absolute",
left:this.x+"px",top:this.y+"px"});this.setRotation(this.rightArrow,this.config.rotation);this.parent.append(this.rightArrow);this.draw(this.pageWidth,this.pageHeight);this.initEvent();parseBool(this.config.reflection)&&this.imageReflection(this.rightArrow)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,width:b.location.width,height:b.location.height,rotation:b.location.rotation,pageWidth:b.location.pageWidth,pageHeight:b.location.pageHeight,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,
colorA:b.gradientColorA,colorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,arrowWidth:b.arrowWidth,arrowTailHeight:b.arrowTailHeight,arrowType:b.arrowType,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},
draw:function(b,c){var d=this.rightArrow[0],f=d.getContext("2d");f.clearRect(0,0,d.width,d.height);this.width-=this.config.borderWidth;this.height-=this.config.borderWidth;this.config.pageWidth||(this.config.pageWidth=bookConfig.largePageWidth);this.config.pageHeight||(this.config.pageHeight=bookConfig.largePageHeight);this.arrowWidth=Number(this.config.arrowWidth)/this.config.pageWidth*b;this.arrowTailHeight=Number(this.config.arrowTailHeight)/this.config.pageHeight*c;0==this.arrowWidth&&(this.arrowWidth=
10);0<this.arrowWidth&&this.arrowWidth<3*this.width/4&&(this.arrowWidth=this.arrowWidth);!0==parseBool(this.config.arrowType)?2*this.arrowWidth>this.width-1*this.width/4&&(this.arrowWidth=(this.width-1*this.width/4)/2):this.arrowWidth>3*this.width/4&&(this.arrowWidth=3*this.width/4);this.arrowTailHeight=this.arrowTailHeight>this.height/2?this.height/4:0==this.arrowTailHeight?this.height/2-5:(this.height-this.arrowTailHeight)/2;f.beginPath();f.lineCap="round";f.lineJoin="round";f.strokeStyle=Color(this.config.borderColor).toString();
f.lineWidth=this.config.borderWidth;f.globalAlpha=this.config.spalpha;!1==parseBool(this.config.arrowType)?(f.moveTo(this.config.borderWidth,this.arrowTailHeight),f.lineTo(this.width-this.arrowWidth,this.arrowTailHeight),f.lineTo(this.width-this.arrowWidth,this.config.borderWidth),f.lineTo(this.width,this.height/2),f.lineTo(this.width-this.arrowWidth,this.height),f.lineTo(this.width-this.arrowWidth,this.height-this.arrowTailHeight),f.lineTo(this.config.borderWidth,this.height-this.arrowTailHeight)):
(f.moveTo(this.config.borderWidth,this.height/2),f.lineTo(this.arrowWidth,this.config.borderWidth),f.lineTo(this.arrowWidth,this.arrowTailHeight),f.lineTo(this.width-this.arrowWidth,this.arrowTailHeight),f.lineTo(this.width-this.arrowWidth,this.config.borderWidth),f.lineTo(this.width,this.height/2),f.lineTo(this.width-this.arrowWidth,this.height),f.lineTo(this.width-this.arrowWidth,this.height-this.arrowTailHeight),f.lineTo(this.arrowWidth,this.height-this.arrowTailHeight),f.lineTo(this.arrowWidth,
this.height));this.config.sh&&(f.shadowOffsetX=this.config.sx,f.shadowOffsetY=this.config.sy,f.shadowBlur=this.config.sd,f.shadowColor=Color(this.config.sc).toString());if("gradient"==this.config.fillStyle){var g=this.config.angle*Math.PI/180,d=this.width/2+this.width/2*Math.cos(g),g=this.height/2+this.height/2*Math.sin(g),h=(Number(this.config.angle)+180)*Math.PI/180,k=this.width/2+this.width/2*Math.cos(h),h=this.height/2+this.height/2*Math.sin(h),d=f.createLinearGradient(k,h,d,g);d.addColorStop(0,
this.colorA);d.addColorStop(1,this.colorB);f.fillStyle=d;f.fill()}"Pure"==this.config.fillStyle&&(f.fillStyle=this.color,f.fill());f.closePath();0!=this.config.borderWidth&&f.stroke()},initEvent:function(){this.linkURL="";null!=this.config.action&&(null!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.rightArrow)},
onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.rightArrow[0].width=this.width;this.rightArrow[0].height=this.height;this.draw(this.pageWidth,this.pageHeight);this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.rightArrow.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("VirtualEnd",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=Number(this.config.width*this.pageWidth);this.height=Number(this.config.height*this.pageHeight);this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.borderColor=Color(this.config.borderColor).toString();this.virtualEnd=$("<canvas width='"+
this.width+"' height='"+this.height+"' id='myCanvas'></canvas>");this.virtualEnd.css({position:"absolute",left:this.x+"px",top:this.y+"px"});this.setRotation(this.virtualEnd,this.config.rotation);this.parent.append(this.virtualEnd);this.draw(this.pageWidth,this.pageHeight);this.initEvent();parseBool(this.config.reflection)&&this.imageReflection(this.virtualEnd)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,rotation:b.location.rotation,pageWidth:b.location.pageWidth,pageHeight:b.location.pageHeight,
width:b.location.width,height:b.location.height,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,colorA:b.gradientColorA,colorB:b.gradientColorB,angle:b.angle,spalpha:b.spalpha,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,arrowWidth:b.arrowWidth,arrowTailHeight:b.arrowTailHeight,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,
se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},fillColor:function(b){if("gradient"==this.config.fillStyle){var c=this.config.angle*Math.PI/180,d=this.width/2+this.width/2*Math.cos(c),c=this.height/2+this.height/2*Math.sin(c),f=(Number(this.config.angle)+180)*Math.PI/180,g=this.width/2+this.width/2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f),d=b.createLinearGradient(g,f,d,c);d.addColorStop(0,this.colorA);d.addColorStop(1,this.colorB);b.fillStyle=d;b.fill()}"Pure"==this.config.fillStyle&&
(b.fillStyle=this.color,b.fill());0!=this.config.borderWidth&&b.stroke()},draw:function(b,c){var d=this.virtualEnd[0],f=d.getContext("2d");f.clearRect(0,0,d.width,d.height);this.width-=this.config.borderWidth;this.height-=this.config.borderWidth;this.config.pageWidth||(this.config.pageWidth=bookConfig.largePageWidth);this.config.pageHeight||(this.config.pageHeight=bookConfig.largePageHeight);this.arrowWidth=Number(this.config.arrowWidth)/this.config.pageWidth*b;this.arrowTailHeight=Number(this.config.arrowTailHeight)/
this.config.pageHeight*c;this.arrowTailHeight>this.height&&(this.arrowTailHeight=this.height);this.arrowWidth>this.width/2&&(this.arrowWidth=this.width/2);0==this.arrowTailHeight&&(this.arrowTailHeight=10);0==this.arrowWidth&&(this.arrowWidth=10);this.rightArrowWidth=this.width-this.arrowWidth;this.rightArrowHeight=(this.height-this.arrowTailHeight)/2;f.strokeStyle=Color(this.config.borderColor).toString();f.lineWidth=this.config.borderWidth;f.globalAlpha=this.config.spalpha;f.lineCap="round";f.lineJoin=
"round";f.beginPath();f.rect(this.config.borderWidth,(this.height-this.arrowTailHeight)/2,this.width/24,this.arrowTailHeight);f.strokeStyle=Color(this.config.borderColor).toString();f.lineWidth=this.config.borderWidth;this.fillColor(f);f.closePath();f.beginPath();f.rect(this.width/12,(this.height-this.arrowTailHeight)/2,this.width/12,this.arrowTailHeight);f.strokeStyle=Color(this.config.borderColor).toString();f.lineWidth=this.config.borderWidth;this.fillColor(f);f.closePath();f.beginPath();f.moveTo(this.width/
5,this.rightArrowHeight);f.lineTo(this.rightArrowWidth,this.rightArrowHeight);f.lineTo(this.rightArrowWidth,this.config.borderWidth);f.lineTo(this.width,this.height/2);f.lineTo(this.rightArrowWidth,this.height);f.lineTo(this.rightArrowWidth,this.height-this.rightArrowHeight);f.lineTo(this.width/5,this.height-this.rightArrowHeight);f.closePath();!0==parseBool(this.config.sh)&&(f.shadowOffsetX=this.config.sx,f.shadowOffsetY=this.config.sy,f.shadowBlur=this.config.sd,f.shadowColor=Color(this.config.sc).toString());
this.fillColor(f)},initEvent:function(){this.linkURL="";null!=this.config.action&&(void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,null!=this.linkURL&&"www"==this.linkURL.substr(1,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL),this.addActionEvent(this.virtualEnd))},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.virtualEnd[0].width=
this.width;this.virtualEnd[0].height=this.height;this.draw(this.pageWidth,this.pageHeight);this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.virtualEnd.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("Cross",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.color=Color(this.config.color).toString();this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.colorA=Color(this.config.colorA).toString();this.colorB=Color(this.config.colorB).toString();this.cross=$("<canvas width='"+this.width+"' height='"+this.height+"'></canvas>");this.cross.css({position:"absolute",
left:this.x+"px",top:this.y+"px"});this.setRotation(this.cross,this.config.rotation);this.parent.append(this.cross);this.draw();this.initEvent();parseBool(this.config.reflection)&&this.imageReflection(this.cross)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,rotation:b.location.rotation,width:b.location.width,height:b.location.height,pageWidth:b.location.pageWidth,pageHeight:b.location.pageHeight,alpha:b.alpha,fillStyle:b.fillStyle,color:b.color,colorA:b.gradientColorA,colorB:b.gradientColorB,
angle:b.angle,spalpha:b.spalpha,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,crossWidht:b.crossWidht,crossType:b.crossType,borderWidth:b.borderWidth,borderColor:b.borderColor,borderAlpha:b.borderAlpha,sh:parseBool(b.shadow.hasDropShadow),sx:b.shadow.shadowBlurX,sy:b.shadow.shadowBlurY,se:b.shadow.shadowDistance,sr:b.shadow.shadowColor,action:b.action}},draw:function(){var b=this.cross[0],c=b.getContext("2d");c.clearRect(0,0,b.width,
b.height);this.config.borderWidth=Number(this.config.borderWidth);this.width-=this.config.borderWidth;this.height-=this.config.borderWidth;this.config.pageWidth||(this.config.pageWidth=bookConfig.largePageWidth);this.crossWidth=Number(this.config.crossWidht)/this.config.pageWidth*this.pageHeight;this.crossWidth>2*this.width/3&&(this.crossWidth=this.width-1*this.width/2);0==this.crossWidth&&(this.crossWidth=10);this.positionWidth=(this.width-this.crossWidth)/2;this.positionHeight=(this.height-this.crossWidth)/
2;c.lineCap="round";c.lineJoin="round";c.strokeStyle=Color(this.config.borderColor).toString();c.lineWidth=this.config.borderWidth;c.globalAlpha=this.config.spalpha;c.beginPath();!0===parseBool(this.config.crossType)?(c.moveTo(this.config.borderWidth,this.height/2),c.lineTo(this.positionWidth/2,this.positionHeight-this.crossWidth/3),c.lineTo(this.positionWidth/2,this.positionHeight),c.lineTo(this.positionWidth,this.positionHeight),c.lineTo(this.positionWidth,this.positionHeight/2),c.lineTo(this.positionWidth-
this.crossWidth/3,this.positionHeight/2),c.lineTo(this.width/2,this.config.borderWidth),c.lineTo(this.width-this.positionWidth+this.crossWidth/3,this.positionHeight/2),c.lineTo(this.width-this.positionWidth,this.positionHeight/2),c.lineTo(this.width-this.positionWidth,this.positionHeight),c.lineTo(this.width-this.positionWidth/2,this.positionHeight),c.lineTo(this.width-this.positionWidth/2,this.positionHeight-this.crossWidth/3),c.lineTo(this.width,this.height/2),c.lineTo(this.width-this.positionWidth/
2,this.height-this.positionHeight+this.crossWidth/3),c.lineTo(this.width-this.positionWidth/2,this.height-this.positionHeight),c.lineTo(this.width-this.positionWidth,this.height-this.positionHeight),c.lineTo(this.width-this.positionWidth,this.height-this.positionHeight/2),c.lineTo(this.width-this.positionWidth+this.crossWidth/3,this.height-this.positionHeight/2),c.lineTo(this.width/2,this.height),c.lineTo(this.positionWidth-this.crossWidth/3,this.height-this.positionHeight/2),c.lineTo(this.positionWidth,
this.height-this.positionHeight/2),c.lineTo(this.positionWidth,this.height-this.positionHeight),c.lineTo(this.positionWidth/2,this.height-this.positionHeight),c.lineTo(this.positionWidth/2,this.height-this.positionHeight+this.crossWidth/3)):(c.moveTo(this.config.borderWidth,this.positionHeight),c.lineTo(this.positionWidth,this.positionHeight),c.lineTo(this.positionWidth,this.config.borderWidth),c.lineTo(this.positionWidth+this.crossWidth,this.config.borderWidth),c.lineTo(this.positionWidth+this.crossWidth,
this.positionHeight),c.lineTo(this.width-this.config.borderWidth,this.positionHeight),c.lineTo(this.width-this.config.borderWidth,this.positionHeight+this.crossWidth),c.lineTo(this.positionWidth+this.crossWidth,this.positionHeight+this.crossWidth),c.lineTo(this.positionWidth+this.crossWidth,this.height),c.lineTo(this.positionWidth,this.height),c.lineTo(this.positionWidth,this.positionHeight+this.crossWidth),c.lineTo(this.config.borderWidth,this.positionHeight+this.crossWidth));parseBool(this.config.sh)&&
(c.shadowOffsetX=this.config.sx,c.shadowOffsetY=this.config.sy,c.shadowBlur=this.config.sd,c.shadowColor=Color(this.config.sc).toString());if("gradient"==this.config.fillStyle){var d=this.config.angle*Math.PI/180,b=this.width/2+this.width/2*Math.cos(d),d=this.height/2+this.height/2*Math.sin(d),f=(Number(this.config.angle)+180)*Math.PI/180,g=this.width/2+this.width/2*Math.cos(f),f=this.height/2+this.height/2*Math.sin(f),b=c.createLinearGradient(g,f,b,d);b.addColorStop(0,this.colorA);b.addColorStop(1,
this.colorB);c.fillStyle=b;c.fill()}"Pure"==this.config.fillStyle&&(c.fillStyle=this.color,c.fill());c.closePath();0!=this.config.borderWidth&&c.stroke()},initEvent:function(){this.flag=0;this.linkURL="";null!=this.config.action&&(null!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url,null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL));this.addActionEvent(this.cross)},onResize:function(b,
c){this.pageWidth=b;this.pageHeight=c;this.width=this.pageWidth*this.config.width;this.height=this.pageHeight*this.config.height;this.cross[0].width=this.width;this.cross[0].height=this.height;this.draw();this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.cross.css({left:this.x+"px",top:this.y+"px"})}}).extend(PageItem.Item);
Class("PopUpVideoItem",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.left=this.config.x*this.pageWidth;this.top=this.config.y*this.pageHeight;this.videoWidth=Math.min(480,windowWidth);this.videoHeight=9*this.videoWidth/16;this.videoHeight=Math.min(this.videoHeight,windowHeight);this.videoLeft=(windowWidth-this.videoWidth)/2;this.videoTop=(windowHeight-this.videoHeight)/2;this.background=
$("<div style='width:100%;height:100%;z-index:10;position:absolute;top:0;'></div>");this.videoBac=$("<div style='width:100%;height:100%;background-color:rgba(0,0,0,0.5);'></div>");this.config.imgURL=this.fixRelativePath(this.config.imgURL);this.config.videoURL=this.fixRelativePath(this.config.videoURL);this.videoImage=$("<div class='flip-action' style='position: absolute;cursor:pointer;opacity:"+this.config.alpha+"; left:"+this.left+"px; top:"+this.top+"px; width:"+this.width+"px;height:"+this.height+
"px;'></div>");this.videoFrame=$("<video src='"+this.config.videoURL+"' controls='controls'></video>");this.html_video=this.videoFrame[0];this.videoFrame.css({position:"absolute",width:this.videoWidth+"px",height:this.videoHeight+"px",left:this.videoLeft+"px",top:this.videoTop+"px","z-index":1E3});this.config.imgURL?(this.imageDiv=$("<img src='"+this.config.imgURL+"' style='position: absolute;width:100%;height:100%'/>"),this.videoImage.append(this.imageDiv)):this.videoImage.css("background-color",
"rgba(255,255,255,1)");this.playImg=$("<img src='"+uiBaseURL+"play.png' style='position:absolute;margin:auto;left:0px;top:0px;bottom:0px;right:0px;width:56px;height:56px'/>");this.videoImage.append(this.playImg);this.setRotation(this.videoImage,this.config.rotation);this.background.append(this.videoFrame);tmpContainer.append(this.background);this.background.append(this.videoBac);b.append(this.videoImage);this.hide();this.initPlayer();this.initEvent()},parseConfig:function(b){var c={width:b.location.width,
height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,alpha:b.alpha,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,previewSrc:b.previewURL,moviePlayTriggerEvt:b.moviePlayTriggerEvt,movieStopTriggerEvt:b.movieStopTriggerEvt,replayWhenPlayEventTrigger:b.replayWhenPlayEventTrigger};b.componentData&&(c.videoURL=b.componentData.videoURL,c.imgURL=b.componentData.imgURL,c.pageViewed=b.componentData.pageViewed);
return c},initPlayer:function(){this.player=this.html_video;var b=this.videoFrame.attr("src");b&&global.flvjs&&flvjs.isSupported()&&(b.endsWith(".flv")||b.endsWith(".f4v"))&&(this.player=flvjs.createPlayer({type:"flv",url:b}),this.player.attachMediaElement(this.html_video),this.player.load())},initEvent:function(){this.background.bind(_event._down,function(b){this.hide();this.setCurrentTime(0);this.player.pause();b.stopPropagation()}.bind(this));this.videoImage.bind(_event._down,function(b){b.stopPropagation()}.bind(this));
this.videoImage.bind(_event._end,function(b){parseBool(this.config.pageViewed)&&this.player.play();this.showOrHide();b.stopPropagation()}.bind(this))},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.left=this.config.x*this.pageWidth;this.top=this.config.y*this.pageHeight;this.videoWidth=Math.min(480,windowWidth);this.videoHeight=9*this.videoWidth/16;this.videoHeight=Math.min(this.videoHeight,
windowHeight);this.videoLeft=(windowWidth-this.videoWidth)/2;this.videoTop=(windowHeight-this.videoHeight)/2;this.videoFrame.css({width:this.videoWidth+"px",height:this.videoHeight+"px",top:this.videoTop+"px",left:this.videoLeft+"px"});this.videoImage.css({width:this.pageWidth*this.config.width+"px",height:this.pageHeight*this.config.height+"px"});this.setPosition(this.left,this.top)},setPosition:function(b,c){this.videoImage.css({top:c+"px",left:b+"px"})},getPlayEvt:function(){return this.config.moviePlayTriggerEvt},
getStopEvt:function(){return this.config.movieStopTriggerEvt},showOrHide:function(){!1===this.visible?this.popup():this.hide()},setCurrentTime:function(b){this.player.currentTime=b},hide:function(){this.visible=!1;this.background.css({display:"none"})},popup:function(){this.visible=!0;this.background.css({display:"block"})},play:function(){this.player.play()},pause:function(){this.player.pause()},stop:function(){this.pause();this.player.currentTime=0}}).extend("Item");
Class("LoopControlVideo",{Package:"PageItem",create:function(b,c,d,f){this.config=this.parseConfig(c);this.parent=b;this.pageWidth=d;this.pageHeight=f;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.content=$("<div class='flip-action'></div>");this.control=$("<div class='video-circle-controls'></div>");this.playVideo=$("<div class='video-circle-play'></div>");this.volume=$("<div class='video-circle-volume-button'></div>");
this.fullscreen=$("<div class='video-circle-player-fullscreen'></div>");this.loopControl=$("<canvas width='80px' height='80px' style='position:absolute;margin:auto;top:0;left:0;bottom:0;right:0;'>64%</canvas>");this.canvasDiv=$("<div></div>");"string"==typeof this.config.previewSrc&&""!=this.config.previewSrc&&null!=this.config.previewSrc&&void 0!=this.config.previewSrc&&(this.config.previewSrc=this.fixRelativePath(this.config.previewSrc),this.content.css({background:"url("+this.config.previewSrc+
")"}),this.content.css({"background-size":this.width+"px "+this.height+"px"}));b=typeof this.config.src;c=this.config.src.substr(this.config.src.length-4,4).toLowerCase();if("string"==b){if(null==this.config.src||".mp4"!=c&&".flv"!=c&&".f4v"!=c)return}else if(this.config.src=={})return;this.config.src=this.fixRelativePath(this.config.src);this.video=$("<video src='"+this.config.src+"' poster='"+this.config.previewSrc+"'></video>");this.html_video=this.video[0];this.parent.append(this.content);this.content.append(this.video);
this.content.append(this.control);this.control.append(this.canvasDiv);this.canvasDiv.append(this.loopControl);this.control.append(this.playVideo);this.control.append(this.volume);this.control.append(this.time);this.control.append(this.fullscreen);this.canvasDiv.append(this.time);this.initPlayer();this.setCss();this.initEvent()},parseConfig:function(b){var c={width:b.location.width,height:b.location.height,rotation:b.location.rotation,x:b.location.x,y:b.location.y,alpha:b.alpha,reflection:b.location.reflection,
reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,previewSrc:b.previewURL,moviePlayTriggerEvt:b.moviePlayTriggerEvt,movieStopTriggerEvt:b.movieStopTriggerEvt,replayWhenPlayEventTrigger:b.replayWhenPlayEventTrigger};void 0!=b.videoURL&&(c.src=b.videoURL);void 0!=b.url&&(c.src=b.url);void 0!=b.componentData&&(c.src=b.componentData.videoURL);b.componentData&&(c.previewSrc=b.componentData.imgURL);return c},initPlayer:function(){this.player=this.html_video;var b=this.video.attr("src");
b&&global.flvjs&&flvjs.isSupported()&&(b.endsWith(".flv")||b.endsWith(".f4v"))&&(this.player=flvjs.createPlayer({type:"flv",url:b}),this.player.attachMediaElement(this.html_video),this.player.load())},onPlayClick:function(){!1==this.html_video.paused?this.player.pause():this.player.play();$.browser.device!=$.browser.DEVICE_PC&&function(){this.control.css("opacity","0")}.delay(this,5E3);return!1},onResize:function(b,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.control.css({width:this.width+"px",height:this.height+"px"});this.content.css({"background-size":this.width+"px "+this.height+"px"});this.setPosition(b,c)},setPosition:function(b,c){this.x=b*this.config.x;this.y=c*this.config.y;this.content.css({left:this.x+"px",top:this.y+"px"})},Loop:function(b){var c=this.loopControl[0].getContext("2d");c.clearRect(0,0,80,80);this.drawRound(c,40,360,"#555555");this.drawRound(c,40,b,"#FFFFFF");this.drawRound(c,34,360,"#000000")},
drawRound:function(b,c,d,f){var g=Math.PI/180;b.beginPath();b.moveTo(40,40);b.arc(40,40,c,0,d*g,!1);b.closePath();b.fillStyle=f;b.fill()},muteVolume:function(){!0==this.video[0].muted?(this.video[0].muted=!1,this.volume.removeClass("video-circle-volume-mute")):(this.video[0].muted=!0,this.volume.addClass("video-circle-volume-mute"));return!1},fullScreen:function(){fullScreenApi.supportsFullScreen&&(fullScreenApi.isFullScreen()?fullScreenApi.cancelFullScreen():fullScreenApi.requestFullScreen(this.video[0]));
this.video[0].webkitSupportsFullscreen&&this.video[0].webkitEnterFullscreen();return!1},initEvent:function(){this.fullscreen.bind(_event._click,this.fullScreen.bind(this));this.control.bind(fullScreenApi.fullScreenEventName,function(){fullScreenApi.isFullScreen()?this.fullscreen.addClass("video-circle-exit-fullscreen"):this.fullscreen.removeClass("video-circle-exit-fullscreen")}.bind(this));this.video.bind(_event._click,this.onPlayClick.bind(this));this.playVideo.bind(_event._click,this.onPlayClick.bind(this));
this.volume.bind(_event._click,this.muteVolume.bind(this));this.video.bind("play",function(){this.playVideo.addClass("video-paused-button")}.bind(this));this.video.bind("timeupdate",function(){this.totalTime=this.video[0].duration;this.currentTime=this.video[0].currentTime;this.Loop(this.currentTime/this.totalTime*360)}.bind(this));this.video.bind("pause",function(){this.playVideo.removeClass("video-paused-button")}.bind(this));this.video.bind("ended",function(){this.playVideo.removeClass("video-paused-button")}.bind(this));
this.control.on("mouseenter",function(){this.control.css("opacity","1")}.bind(this));this.control.on("mouseleave",function(){this.control.css("opacity","0")}.bind(this));$.browser.device!=$.browser.DEVICE_PC&&(this.control.bind(_event._down,function(){this.control.css("opacity","1")}.bind(this)),this.control.bind(_event._up,function(){(function(){this.control.css("opacity","0")}).delay(this,3E3)}.bind(this)))},setCss:function(){this.canvasDiv.css({position:"absolute",width:"80px",height:"80px",margin:"auto",
top:"0",bottom:"0",left:"0",right:"0",transform:"rotate(270deg)","-webkit-transform":"rotate(270deg)","-ms-transform":"rotate(270deg)","-o-transform":"rotate(270deg)","-moz-transform":"rotate(270deg)"});this.control.css({position:"absolute",width:this.width+"px",opacity:"1",height:this.height+"px"});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.setRotation(this.content,this.config.rotation);this.video.css({position:"absolute",
"z-index":1,left:"0px",top:"0px",width:"100%",height:"100%",opacity:this.config.alpha})},play:function(){this.player.play()},pause:function(){this.player.pause()},stop:function(){this.pause();this.player.currentTime=0}}).extend("Item");
Class("RollerText",{Package:"PageItem",create:function(b,c,d,f,g){this._super(b,c,d,f);this.bgColor=Color(this.config.bgcolor).toString();this.originWidth=this.config.pageW;this.originHeight=this.config.pageH;this.id="text"+g;this.initText();this.initEvents();parseBool(this.config.reflection)&&this.imageReflection(this.rollerText);this.onResize(this.pageWidth,this.pageHeight)},initText:function(){this.textli="";this.rollerText=$("<div id="+this.id+"></div>");this.textDown=$("<img/>");this.textUp=
$("<img/>");var b=new TextFormatAnalyzer(this.config.textStr);this.fontSize=b.getMinFontSize();this.text=b.getHTML();this.adjustFontSize=$.browser.chrome?Math.max(1,12/this.fontSize):1;this.width=this.config.width*this.originWidth*this.adjustFontSize;this.height=this.config.height*this.originHeight*this.adjustFontSize;!0==parseBool(this.config.highlightsBool)&&this.rollerText.flash({swf:this.config.highlightsURL,width:this.width+"px",height:this.height+"px",wmode:"transparent"});!0===parseBool(this.config.fillBg)?
this.rollerText.css({"background-color":Color(this.config.bgcolor).rgba()}):this.rollerText.css({background:""});this.addShadow(this.rollerText);1==this.config.barType?(this.rollerText.append(this.textDown),this.rollerText.append(this.textUp),this.setBarType(),this.textDown.attr({src:uiBaseURL+"textDown.png"}),this.textUp.attr({src:uiBaseURL+"textUp.png"})):this.rollerText.css({"word-wrap":"break-word","overflow-y":"auto",position:"absolute",width:this.width+"px",height:this.height+"px"});this.rollerText.append(this.text);
this.parent.append(this.rollerText)},parseConfig:function(b){return{x:b.location.x,y:b.location.y,width:b.location.width,height:b.location.height,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,alpha:b.alpha,rotation:b.location.rotation,textStr:b.textStr,selectable:b.selectable,highlightsBool:b.highlightsBool,highlightsURL:b.highlightsURL,highlightsLabel:b.highlightsLabel,pageH:b.formats.defaultFormat.pageH,pageW:b.formats.defaultFormat.pageW,
barType:b.barType,bgalpha:b.background.alpha,fillBg:b.background.fillBg,bgcolor:b.background.color,action:b.action,hasShadow:parseBool(b.shadow.hasDropShadow),shadow:b.shadow}},initEvents:function(){function b(b){b.stopPropagation&&b.stopPropagation()}this.textDown.click(function(){var b=this.text.scrollTop();this.text.animate({scrollTop:b+50},100)}.bind(this));this.textUp.click(function(){var b=this.text.scrollTop();this.text.animate({scrollTop:b-50},100)}.bind(this));this.rollerText.bind($.browser.mozilla?
"DOMMouseScroll":"mousewheel",b);this.rollerText.bind(_event._down,b);this.rollerText.bind(_event._up,b);this.addActionEvent(this.text)},setBarType:function(){this.textUp.css({"background-attachment":"fixed",position:"absolute",margin:"auto",width:"23px",height:"23px",bottom:"0px",right:"26px","background-color":"#FFFFFF",border:"1px solid"});this.textDown.css({position:"absolute",margin:"auto",width:"23px",height:"23px",bottom:"0px",right:"0px","background-attachment":"fixed","background-color":"#FFFFFF",
border:"1px solid"});this.rollerText.css({"word-wrap":"break-word","overflow-x":"hidden","overflow-y":"scroll",position:"absolute",left:this.config.x*this.pageWidth+"px",top:this.config.y*this.pageHeight+"px",width:this.width+"px",height:this.height+"px"});this.setRotation(this.rollerText,this.config.rotation)},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.setPosition();this.resizeText(this.pageHeight)},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*
this.pageHeight;this.rollerText.css({left:this.x+"px",top:this.y+"px"})},resizeText:function(b){b=b/this.originHeight/this.adjustFontSize;this.rollerText.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+")"})}}).extend(PageItem.Item);
var 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_YOUTUBE6:"com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer06",ANNO_YOUTUBE7:"com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer07",ANNO_YOUTUBE7:"com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer08",ANNO_VIDEO1:"com.mobiano.flipbook.pageeditor::TAnnoVideoPlayer",ANNO_VIDEO2:"com.mobiano.flipbook.pageeditor.player::TAnnoSimpleVideoPlayer",ANNO_AUDIO1:"com.mobiano.flipbook.sound.TAnnoAdvancedSound",ANNO_AUDIO2:"com.mobiano.flipbook.sound.TAnnoWavemusicPlayer",ANNO_AUDIO3:"com.mobiano.flipbook.pageeditor::TAnnoPlugIn",
ANNO_AUDIO4:"com.mobiano.flipbook.sound.TAnnoBackgroundSound",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_DYNAMICBUTTON:"com.mobiano.flipbook.pageeditor::TAnnoDynamicButton",ANNO_NEW_AUDIO:"com.mobiano.flipbook.sound.TAnnoSound",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_TRIANGLE:"com.mobiano.flipbook.pageeditor.shapes::TAnnoTriangle",ANNO_PRISMATIC:"com.mobiano.flipbook.pageeditor.shapes::TAnnoPrismatic",
ANNO_PARALLELOGRAM:"com.mobiano.flipbook.pageeditor.shapes::TAnnoParallelogram",ANNO_PENTAGON:"com.mobiano.flipbook.pageeditor.shapes::TAnnoPentagon",ANNO_HEXAGON:"com.mobiano.flipbook.pageeditor.shapes::TAnnoHexagon",ANNO_PENTAGON:"com.mobiano.flipbook.pageeditor.shapes::TAnnoPentagon",ANNO_DOVETAILED:"com.mobiano.flipbook.pageeditor.shapes::TAnnoDovetailed",ANNO_FLOWCHART:"com.mobiano.flipbook.pageeditor.shapes::TAnnoFlowChart",ANNO_CYLINDER:"com.mobiano.flipbook.pageeditor.shapes::TAnnoCylinder",
ANNO_TRAPEZOID:"com.mobiano.flipbook.pageeditor.shapes::TAnnoTrapezoid",ANNO_RIGHTARROW:"com.mobiano.flipbook.pageeditor.shapes::TAnnoRightArrow",ANNO_VIRTUALEND:"com.mobiano.flipbook.pageeditor.shapes::TAnnoVirtualEnd",ANNO_CROSS:"com.mobiano.flipbook.pageeditor.shapes::TAnnoCross",ANNO_AREA:"com.mobiano.flipbook.pageeditor::TAnnoHighLightArea",ANNO_FLASHSHOW:"com.mobiano.flipbook.pageeditor.TAnnoSWF1",ANNO_PRINT:"com.mobiano.flipbook.pageeditor::TAnnoPrint",ANNO_TEXT:"com.mobiano.flipbook.pageeditor::TAnnoText",
ANNO_ATEXT:"com.mobiano.flipbook.pageeditor::TAnnoDynamicText",ANNO_ROLLERTEXT:"com.mobiano.flipbook.pageeditor::TAnnoRollerText",ANNO_STARTEXT:"com.mobiano.flipbook.pageeditor::TAnnoStarwarsText",ANNO_TEXTANIM:"com.mobiano.flipbook.pageeditor.textAnim::TAnnoTextAnim",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_ATIMAGE:"com.mobiano.flipbook.pageeditor.TAnnoClipart",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",
ANNO_CART:"com.mobiano.flipbook.pageeditor.TAnnoCart",ANNO_HOTSPOTS:"com.mobiano.flipbook.pageeditor.TAnnoHotSpots"},PlayEvt:{EVT_PLAY:"EVT_PageViewed",EVT_STOP:"EVT_PageOffView"},TriggerEventType:{MouseDown:"mouseDown",MouseOver:"mouseOver",MouseOut:"mouseOut",MouseUp:"mouseUp",MouseMove:"mouseMove",MouseLeave:"mouseLeave"},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",WINDOW_HTML:"com.mobiano.flipbook.pageeditor.TAnnoActionWindowHtml",PLAY_VIDEO:"com.mobiano.flipbook.pageeditor.TAnnoActionPlayVideo",SHOW_INFORMATION:"com.mobiano.flipbook.pageeditor.TAnnoActionShowInformation",QUIZ:"com.mobiano.flipbook.pageeditor.TAnnoActionQuiz",
PLAYVIDEO:"com.mobiano.flipbook.Action.TAnnoActionPlayVideo",SWF_SLIDE:"com.mobiano.flipbook.pageeditor.TAnnoActionSwfSlide"},WindowType:{OPEN_YOUTUBE:"TYPE_YOUTUBE",OPEN_VIMEO:"TYPE_VIMEO",OPEN_DAILYMOTION:"TYPE_DAILYMOTION",OPEN_TYPE_WISTIA:"TYPE_WISTIA",OPEN_TYPE_YOUKU:"TYPE_YOUKU",OPEN_TYPE_QQ:"TYPE_QQ",OPEN_VIDEO:"0",OPEN_FLASH:"1",OPEN_SHOW_TEXT:"4"},PlayerType:{SKIN_1:"Skin 1",SKIN_2:"Skin 2",SKIN_3:"Skin 3"},AudioPlayer:{GLASS:"GlassAudioPlayer",SIMPLE:"SimpleAudioPlayer",STANDARD1:"StandardAudioPlayer",
STANDARD2:"StandardAudioPlayer02",STANDARD3:"StandardAudioPlayer03",STANDARD4:"StandardAudioPlayer04",STANDARD5:"StandardAudioPlayer05",STANDARD6:"StandardAudioPlayer06"},Effect:{FADEIN:"com.mobiano.flipbook.pageeditor.effect::TFadeInEffect",CUTTING:"com.mobiano.flipbook.pageeditor.effect::TCuttingEffect",FLY_IN:"com.mobiano.flipbook.pageeditor.effect::TFlyEffect",INDENTATION:"com.mobiano.flipbook.pageeditor.effect::TIndentationEffect"}};
Class("PageItemFactory",{createItem:function(b,c,d,f,g,h){if(!c)return null;var k=c.annotype,l=null;if(!this.browserSupport(k))return null;h=g+"-"+h;k==PageEditor.AnnoType.ANNO_LINK&&(l=new PageItem.Link(b,c,d,f));if(k==PageEditor.AnnoType.ANNO_YOUTUBE||k==PageEditor.AnnoType.ANNO_YOUTUBE1||k==PageEditor.AnnoType.ANNO_YOUTUBE2||k==PageEditor.AnnoType.ANNO_YOUTUBE3||k==PageEditor.AnnoType.ANNO_YOUTUBE4||k==PageEditor.AnnoType.ANNO_YOUTUBE6||k==PageEditor.AnnoType.ANNO_YOUTUBE7||k==PageEditor.AnnoType.ANNO_YOUTUBE8)l=
new PageItem.Youtube(b,c,d,f);k==PageEditor.AnnoType.ANNO_YOUTUBE5&&(l=new PageItem.PopUpVimeo(b,c,d,f,"youtube"));k==PageEditor.AnnoType.ANNO_VIMEO&&(l=new PageItem.Vimeo(b,c,d,f));k==PageEditor.AnnoType.ANNO_VIMEO2&&(l=new PageItem.PopUpVimeo(b,c,d,f,"vimeo"));k!=PageEditor.AnnoType.ANNO_AUDIO&&k!=PageEditor.AnnoType.ANNO_NEW_AUDIO||c.playerType!=PageEditor.PlayerType.SKIN_3||(l=new PageItem.Audio(b,c,d,f,"default"));k!=PageEditor.AnnoType.ANNO_AUDIO&&k!=PageEditor.AnnoType.ANNO_NEW_AUDIO||c.playerType!=
PageEditor.PlayerType.SKIN_1||(l=new PageItem.Audio(b,c,d,f,"skin1"));k!=PageEditor.AnnoType.ANNO_AUDIO&&k!=PageEditor.AnnoType.ANNO_NEW_AUDIO||c.playerType!=PageEditor.PlayerType.SKIN_2||(l=new PageItem.Audio(b,c,d,f,"skin2"));k==PageEditor.AnnoType.ANNO_AUDIO1&&(l=new PageItem.Audio(b,c,d,f,"advanced"));k==PageEditor.AnnoType.ANNO_AUDIO2&&(l=new PageItem.Audio(b,c,d,f,"wave"));k==PageEditor.AnnoType.ANNO_AUDIO4&&(l=new PageItem.Audio(b,c,d,f,"background"));if(k==PageEditor.AnnoType.ANNO_PLUGIN&&
c.className in audioThemeNames){var l=void 0,m=c.className;m==PageEditor.AudioPlayer.GLASS&&(l="glass");m==PageEditor.AudioPlayer.SIMPLE&&(l="simple");m==PageEditor.AudioPlayer.STANDARD1&&(l="enjoy");m==PageEditor.AudioPlayer.STANDARD2&&(l="decent");m==PageEditor.AudioPlayer.STANDARD3&&(l="tree");m==PageEditor.AudioPlayer.STANDARD4&&(l="christmas");m==PageEditor.AudioPlayer.STANDARD5&&(l="turnonoff");m==PageEditor.AudioPlayer.STANDARD6&&(l="fade");l=new PageItem.Audio(b,c,d,f,l)}k==PageEditor.AnnoType.ANNO_IMAGE&&
(c.imgOriginalProportions||(c.imgOriginalProportions="false"),l=new PageItem.Image(b,c,d,f));k==PageEditor.AnnoType.ANNO_BUTTON&&(l=new PageItem.Button(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_DYNAMICBUTTON&&(l=new PageItem.DynamicButton(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_SWF&&(l=new PageItem.FlashSwf(b,c,d,f));k==PageEditor.AnnoType.ANNO_FLASHSHOW&&(l=new PageItem.FlashShow(b,c,d,f));k==PageEditor.AnnoType.ANNO_HOTSPOTS&&(l=new PageItem.HotSpots(b,c,d,f));k==PageEditor.AnnoType.ANNO_LINE&&(l=
new PageItem.Line(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_ARROW&&(l=new PageItem.Arrow(b,c,d,f));k==PageEditor.AnnoType.ANNO_TRIANGLE&&(l=new PageItem.Triangle(b,c,d,f));k==PageEditor.AnnoType.ANNO_PRISMATIC&&(l=new PageItem.Prismatic(b,c,d,f));k==PageEditor.AnnoType.ANNO_CROSS&&(l=new PageItem.Cross(b,c,d,f));k==PageEditor.AnnoType.ANNO_VIRTUALEND&&(l=new PageItem.VirtualEnd(b,c,d,f));k==PageEditor.AnnoType.ANNO_RIGHTARROW&&(l=new PageItem.RightArrow(b,c,d,f));k==PageEditor.AnnoType.ANNO_TRAPEZOID&&
(l=new PageItem.Trapezoid(b,c,d,f));k==PageEditor.AnnoType.ANNO_DOVETAILED&&(l=new PageItem.Dovetailed(b,c,d,f));k==PageEditor.AnnoType.ANNO_FLOWCHART&&(l=new PageItem.FlowChart(b,c,d,f));k==PageEditor.AnnoType.ANNO_CYLINDER&&(l=new PageItem.Cylinder(b,c,d,f));k==PageEditor.AnnoType.ANNO_PENTAGON&&(l=new PageItem.Pentagon(b,c,d,f));k==PageEditor.AnnoType.ANNO_HEXAGON&&(l=new PageItem.Hexagon(b,c,d,f));k==PageEditor.AnnoType.ANNO_PARALLELOGRAM&&(l=new PageItem.Parallelogram(b,c,d,f));k==PageEditor.AnnoType.ANNO_ROUND&&
(l=new PageItem.Round(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_RECTANGLE&&(l=new PageItem.Rectangle(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_TEXT&&(l=new PageItem.Text(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_ROLLERTEXT&&(l=new PageItem.RollerText(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_AREA&&(l=new PageItem.Area(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_CALLOUT&&(l=new PageItem.Callout(b,c,d,f));k==PageEditor.AnnoType.ANNO_ATEXT&&(l=new PageItem.AText(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_STARTEXT&&
(l=new PageItem.StarText(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_TEXTANIM&&(l=new PageItem.TextAmin(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_ATIMAGE&&(l=new PageItem.PngImage(b,c,d,f));k==PageEditor.AnnoType.ANNO_EFFECTTEXT&&(l=new PageItem.EffectText(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_ADVANCEDSOUND&&(l=new PageItem.Sound(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_CAROUSEL&&(l=new PageItem.Carousel(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_DYNSHOW&&(l=new PageItem.DynamicShow(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_BANNER&&
(l=new PageItem.Banner(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_FLIPJUMP&&(l=new PageItem.FlipJump(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_PLUGIN&&c.className==PLUGIN_MAGNETICS&&(l=new PageItem.FocusJump(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_PLUGIN&&c.className==PLUGIN_ROTATE3D&&(l=new PageItem.Rotate3D(b,c,d,f,h));k==PageEditor.AnnoType.ANNO_VIDEO1&&(l=new PageItem.Video(b,c,d,f,"smallblack"));k==PageEditor.AnnoType.ANNO_VIDEO2&&(l=new PageItem.LoopControlVideo(b,c,d,f));k==PageEditor.AnnoType.ANNO_PLUGIN&&
c.className==PLUGIN_VIDEO1&&(l=new PageItem.Video(b,c,d,f,"classic"));k==PageEditor.AnnoType.ANNO_PLUGIN&&c.className==PLUGIN_VIDEO2&&(l=new PageItem.PopUpVideoItem(b,c,d,f));k==PageEditor.AnnoType.ANNO_VIDEO&&(l=new PageItem.Video(b,c,d,f,"round"));k==PageEditor.AnnoType.ANNO_ALPHATRANSITIONBANNER&&(l=new PageItem.AlphaTransitionBanner(b,c,d,f));k==PageEditor.AnnoType.ANNO_EMBEDDEDSLIDESHOW&&(l=new PageItem.EmbeddedSlideshow(b,c,d,f));k==PageEditor.AnnoType.ANNO_PRINT&&(l=new PageItem.Print(b,c,
d,f,g));k==PageEditor.AnnoType.ANNO_CART&&(l=new PageItem.ShoppingCart(b,c,d,f));return l},browserSupport:function(b){return isBelowIE9()?b==PageEditor.AnnoType.ANNO_LINK||b==PageEditor.AnnoType.ANNO_IMAGE||b==PageEditor.AnnoType.ANNO_TEXT||b==PageEditor.AnnoType.ANNO_ALPHATRANSITIONBANNER?!0:!1:!0}});
Class("PageEditorParser",{create:function(b,c,d){this.container=b;this.containerWidth=c;this.containerHeight=d},createItemsForPage:function(b){var c=new ObjectPool;if(!this.hasProfessional())return c;var d=this.getPageAnnos();if(0>=b||d.length<b||0==d[b-1].length)return c;for(var f=new PageItemFactory,d=d[b-1],g=0;g<d.length;g++){var h=d[g];h&&(h=f.createItem(this.container,h,this.containerWidth,this.containerHeight,b,g+1))&&c.add(h)}return c},hasProfessional:function(){if(!global.pageEditor)return!1;
var b=this.getPageAnnos();if(!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},getPageAnnos:function(){var b=global.pageEditor;b instanceof Array||(b=b.pageAnnos);return b}});var 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%",width:"100%",left:0,
bottom:0})},addItem:function(){for(var b=Math.ceil((this.toIndex-this.fromIndex+1)/2),c=0;c<b;c++){var d;d=rightToLeft?this.fromIndex+2*(b-1-c)+1:this.fromIndex+2*c;var f=rightToLeft?this.fromIndex+2*(b-1-c):this.fromIndex+2*c+1,g=[{url:getPageDir(d,"thumb",originTotalPageCount),index:d},{url:getPageDir(f,"thumb",originTotalPageCount),index:f}];if(0>=d||d>bookConfig.totalPageCount)g=[{url:getPageDir(f,"thumb",originTotalPageCount),index:f}];if(0>=f||f>bookConfig.totalPageCount)g=[{url:getPageDir(d,
"thumb",originTotalPageCount),index:d}];d=new DockMenuItem(this.menuContent,g);f=Math.min(f,bookConfig.totalPageCount);f=Math.max(1,f);d.pageIndex=f;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(){h||(h=!0,window.setTimeout(c,15))}function c(){for(var c=0;c<l.itemArray.length;c++)l.itemArray[c]&&l.itemArray[c].sizeDockIcons(d,f);h=!1;k&&(k=!1,b())}var d,f,g=this.menu,h=!1,k=!1,l=this;$(g).bind(_event._move,function(c){g.is(":visible")&&(d=c.pageX,f=c.pageY,k=!0,b())});$(g).bind(_event._leave,function(c){g.is(":visible")&&(f=d=1E3,k=!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);rightToLeft&&(b=this.itemArray.length-b-1);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.fillImage(this.itemIcon,this.imgArr[0].index),this.itemCaption.text(this.imgArr[0].index)):!0===this.doubleImage&&(this.fillImage(this.itemLeftIcon,this.imgArr[0].index),this.fillImage(this.itemRightIcon,this.imgArr[1].index),this.itemCaption.text(this.imgArr[0].index+"-"+this.imgArr[1].index))},fillImage:function(b,
c){var d=function(c){b.attr("src",c)}.bind(this);fillImageAfterLoaded(c,"thumb",d)},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,f=this.itemHeight*
this.toScale-d,g=$(this.item).offset().left+$(this.item).outerWidth()/2,h=$(this.item).offset().top+$(this.item).outerHeight()/2,g=this.distance(g,h,b,c),d=(1-Math.min(1,Math.max(0,g/180)))*f+d;this.resize(d)},distance:function(b,c,d,f){b=d-b;c=f-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")}});
Class("CoverShadow",{create:function(b){this.parent=b;this.init()},init:virtual_function,destroy:virtual_function,onResize:function(){this.parentWidth=this.parent.width();this.parentHeight=this.parent.height()}});
Class("HardCoverShadow",{init:function(){this.coverShadow=$('<div class="cover_shadow"></div>');isBelowIE11()&&this.coverShadow.css("z-index",3);this.leftBorder=$("<div></div>");this.topBorder=$('<div class="hard_top_border"></div>');this.bottomBorder=$('<div class="hard_bottom_border hard_bottom_border_width"></div>');this.rightBorder=$('<div class="hard_right_border"></div>');this.parent.append(this.coverShadow);this.coverShadow.append(this.leftBorder);this.coverShadow.append(this.topBorder);this.coverShadow.append(this.bottomBorder);
this.coverShadow.append(this.rightBorder)},onResize:function(){this._super();this.rightBorder.css({height:this.parentHeight-3+"px"})},destroy:function(){this.coverShadow.empty();this.coverShadow.remove()}}).extend(CoverShadow);
Class("OuterHardCoverShadow",{create:function(b,c,d){this.style=c;this.flip=!!d;this._super(b)},init:function(){this._super();this.leftBorder.addClass("hard_left_border");this.leftBody=$('<div class="hard_left_body"></div>');this.coverShadow.append(this.leftBody);this.coverShadow.addClass(this.style);this.flip&&this.coverShadow.addClass("flip_x");this.onResize()}}).extend(HardCoverShadow);
Class("InnerHardCoverShadow",{create:function(b,c,d,f,g){this.style=c;this.flip=!!d;void 0==f&&(f=0);this.borderWidth=f;this.showLeftShadow=g;this._super(b)},init:function(){this._super();this.showLeftShadow?(this.leftBorder.addClass("hard_inner_left_border"),this.leftCoverBorder=$('<div class="hard_left_cover_border"></div>'),this.coverShadow.append(this.leftCoverBorder)):this.leftBorder.css({display:"none"});this.flip&&this.coverShadow.addClass("flip_x");this.onResize()},onResize:function(){this._super();
this.showLeftShadow&&(this.bottomBorder.css({left:"0px",width:"100%"}),this.leftBorder.css({top:this.borderWidth+"px",height:this.parentHeight-2*this.borderWidth+"px"}))}}).extend(HardCoverShadow);
Class("NormalCoverShadow",{create:function(b,c,d){this.style=c;this.flip=!!d;this._super(b)},init:function(){this.coverShadow=$('<div class="cover_shadow"></div>');this.coverShadow.addClass(this.style);isBelowIE11()&&this.coverShadow.css("z-index",3);this.leftBorder=$('<div class="normal_left_border"></div>');this.leftBody=$('<div class="normal_left_body"></div>');this.parent.append(this.coverShadow);this.coverShadow.append(this.leftBorder);this.coverShadow.append(this.leftBody);this.flip&&this.coverShadow.addClass("flip_x");
this.onResize()},destroy:function(){this.coverShadow.empty();this.coverShadow.remove()}}).extend(CoverShadow);
Class("PageShadow",{create:function(b,c,d){this.parent=b;this.pageIndex=c;this.isLeftPage=d;this.isHardPage=parseBool(bookConfig.HardPageEnable)&&!isBelowIE11();this.bindingType=bookConfig.BindingType;this.bindingType||(this.bindingType="side");this.midShadow=this.coverShadow=null},addShadow:function(){this.isEmpty()||this.destroy();this.addCoverShadow();var b=parseBool(bookConfig.addPaperCoil);null!=this.coverShadow||b?this.hidePageShadow():this.addPageShadow();this.onResize()},isEmpty:function(){return null==
this.coverShadow&&null==this.midShadow},addCoverShadow:function(){this.coverShadow=this.createCoverShadow()},createCoverShadow:virtual_function,addPageShadow:function(){this.midShadow=this.findPageShadow();this.midShadow||(this.midShadow=$("<div name='midShadow'></div>"));var b=1;this.isLeftPage?(this.midShadow.attr("class","leftShadow"),b=bookConfig.LeftShadowAlpha):(this.midShadow.attr("class","rightShadow"),b=bookConfig.RightShadowAlpha);this.midShadow.css({opacity:b});this.parent.append(this.midShadow)},
findPageShadow:function(){if(this.midShadow)return this.midShadow;var b=this.parent.children("div[name=midShadow]");return b[0]?$(b[0]):null},hidePageShadow:function(){(this.midShadow=this.findPageShadow())&&this.midShadow.css({display:"none"})},resizePageShadow:function(b){this.midShadow=this.findPageShadow();if(null!=this.midShadow){var c=bookConfig.LeftShadowWidth;this.isLeftPage||(c=bookConfig.RightShadowWidth);c=parseInt(c/450*b);this.midShadow.css({width:c+"px"})}},onResize:function(b,c){void 0==
b?(this.parentWidth=this.parent.width(),this.parentHeight=this.parent.height()):(this.parentWidth=b,this.parentHeight=c);if(this.coverShadow)this.coverShadow.onResize();this.resizePageShadow(this.parentWidth)},destroy:function(){null!=this.coverShadow&&(this.coverShadow.destroy(),this.coverShadow=null);null!=this.midShadow&&(this.midShadow=null)}});
Class("NormalPageShadow",{create:function(b,c,d){this._super(b,c,d);this.evenPageCount=totalPageCount},createCoverShadow:function(){var b=1==this.pageIndex,c=2==this.pageIndex,d=this.pageIndex==this.evenPageCount,f=this.pageIndex==this.evenPageCount-1,g=4<this.evenPageCount,h=this.isLeftPage;if(this.isHardPage){if(b||d)return new OuterHardCoverShadow(this.parent,this.bindingType,h);if(c||f)return new InnerHardCoverShadow(this.parent,this.bindingType,h,bookConfig.hardCoverBorderWidth,g)}else if(b||
d)return new NormalCoverShadow(this.parent,this.bindingType,h);return null}}).extend("PageShadow");
Class("SinglePageShadow",{create:function(b,c,d){this._super(b,c,d);this.isRightToLeft=parseBool(bookConfig.RightToLeft)},createCoverShadow:function(){var b=1==this.pageIndex,c=this.pageIndex==bookConfig.totalPageCount;if(this.isHardPage){if(b)return new OuterHardCoverShadow(this.parent,this.bindingType,this.isRightToLeft);if(c)return new InnerHardCoverShadow(this.parent,this.bindingType,this.isRightToLeft,bookConfig.hardCoverBorderWidth,!0)}else if(b)return new NormalCoverShadow(this.parent,this.bindingType,
this.isRightToLeft);return null}}).extend("PageShadow");
Class("CatalogPageShadow",{create:function(b,c,d){this._super(b,c,d);this.evenPageCount=totalPageCount;this.bindingType="catalog"},createCoverShadow:function(){var b=1==this.pageIndex,c=2==this.pageIndex,d=this.pageIndex==this.evenPageCount,f=this.pageIndex==this.evenPageCount-1,g=4<this.evenPageCount,h=this.isLeftPage;if(this.isHardPage){if(b||d)return new OuterHardCoverShadow(this.parent,this.bindingType,h);if(c||f)return new InnerHardCoverShadow(this.parent,this.bindingType,h,0,g)}else if(b||d)return new NormalCoverShadow(this.parent,
this.bindingType,h);return null},addPageShadow:function(){this._super();this.isLeftPage?this.midShadow.attr("class","catalogLeftShadow"):this.midShadow.attr("class","catalogRightShadow")}}).extend("PageShadow");Class("SlidePageShadow",{createCoverShadow:function(){},addShadow:function(){}}).extend("PageShadow");
var BorderSewing={deep:{top:{url:"deep_top_sewing.png",width:28,height:42},right:{url:"deep_right_sewing.png",width:71,height:28},bottom:{url:"deep_bottom_sewing.png",width:28,height:42},renderBorder:!0},normal:{top:{url:"normal_top_sewing.png",width:28,height:10},right:{url:"normal_right_sewing.png",width:10,height:28},bottom:{url:"normal_bottom_sewing.png",width:28,height:20},renderBorder:!0},flat:{top:{url:"flat_top_sewing.png",width:28,height:10},right:{url:"flat_right_sewing.png",width:10,height:28},
bottom:{url:"flat_bottom_sewing.png",width:28,height:10},renderBorder:!1}},PageTextureResource={leather1:{texture:"leather1.png",sewing:BorderSewing.deep},leather2:{texture:"leather2.png",sewing:BorderSewing.normal},cloth1:{texture:"cloth1.png",sewing:BorderSewing.flat},cloth2:{texture:"cloth2.png",sewing:BorderSewing.flat},cloth3:{texture:"cloth3.png",sewing:BorderSewing.flat},cloth4:{texture:"cloth4.png",sewing:BorderSewing.normal},cardboard1:{texture:"cardboard1.png",sewing:null},cardboard2:{texture:"cardboard2.png",
sewing:null},cardboard3:{texture:"cardboard3.png",sewing:null},silk1:{texture:"silk1.png",sewing:BorderSewing.flat},silk2:{texture:"silk2.png",sewing:BorderSewing.flat},silk3:{texture:"silk3.png",sewing:BorderSewing.flat},silk4:{texture:"silk4.png",sewing:BorderSewing.flat},wood1:{texture:"wood1.png",sewing:null},wood2:{texture:"wood2.png",sewing:null}};
Class("PageTexture",{create:function(b,c,d){this.parent=b;this.pageIndex=c;this.isLeftPage=d;this.isHardPage=parseBool(bookConfig.HardPageEnable)&&!isBelowIE11();this.borderWidth=bookConfig.hardCoverBorderWidth-4;this.initResource()},initResource:function(){this.name=bookConfig.coverTexture;this.resource=PageTextureResource[this.name]},render:function(){this.isEmpty()||this.destroy();this.isCover&&this.renderCover()},isEmpty:function(){return null==this.texture},renderPage:function(){this.texture=
null},renderCover:function(){this.isHardPage&&this.resource&&(this.renderTexture(),this.renderSewing(),this.onResize())},renderTexture:function(){this.texture=$("<div id='page_texture'></div>");this.texture.css({position:"absolute","pointer-events":"none","z-index":1,width:"100%",height:"100%"});this.parent.append(this.texture);var b=uiBaseURL+this.resource.texture;this.isOutCover?this.texture.css({"background-image":"url("+b+")","background-repeat":"repeat"}):this.parent.css({"background-image":"url("+
b+")","background-repeat":"repeat"})},renderSewing:function(){if(!(0>=this.borderWidth)&&this.resource.sewing){var b=this.resource.sewing;this.isInnerCover&&(b=BorderSewing.flat);this.top_texture=$("<div id='top_texture'></div>");this.top_texture.css({position:"absolute",top:this.borderWidth+"px",height:b.top.height+"px","background-image":"url("+uiBaseURL+b.top.url+")","background-repeat":"repeat-x"});this.texture.append(this.top_texture);this.right_texture=$("<div id='right_texture'></div>");this.right_texture.css({position:"absolute",
right:this.borderWidth+"px",width:b.right.width+"px","background-image":"url("+uiBaseURL+b.right.url+")","background-repeat":"repeat-y"});this.texture.append(this.right_texture);this.bottom_texture=$("<div id='bottom_texture'></div>");this.bottom_texture.css({position:"absolute",bottom:this.borderWidth+"px",height:b.bottom.height+"px","background-image":"url("+uiBaseURL+b.bottom.url+")","background-repeat":"repeat-x"});this.texture.append(this.bottom_texture);this.isLeftPage&&(this.right_texture.addClass("flip_x"),
this.right_texture.css({left:this.borderWidth+"px",right:"auto"}),this.top_texture.css({right:"0px",left:"auto"}),this.bottom_texture.css({right:"0px",left:"auto"}));this.resource.sewing.renderBorder&&this.renderBorder()}},renderBorder:function(){0!=this.borderWidth&&(this.top_texture_border=$("<div id='top_texture_border'></div>"),this.top_texture_border.css({position:"absolute",top:"0px",width:"100%",height:this.borderWidth+"px","background-image":$.browser.prefix+"linear-gradient(top, rgba(220,220,220,0) 0%, rgba(220,220,220,0.2) 50%, rgba(220,220,220,0) 100%)"}),
this.texture.append(this.top_texture_border),this.right_texture_border=$("<div id='right_texture_border'></div>"),this.right_texture_border.css({position:"absolute",right:"0px",width:this.borderWidth+"px",height:"100%","background-image":$.browser.prefix+"linear-gradient(right, rgba(220,220,220,0) 0%, rgba(220,220,220,0.2) 50%, rgba(220,220,220,0) 100%)"}),this.texture.append(this.right_texture_border),this.bottom_texture_border=$("<div id='bottom_texture_border'></div>"),this.bottom_texture_border.css({position:"absolute",
bottom:"0px",width:"100%",height:this.borderWidth+"px","background-image":$.browser.prefix+"linear-gradient(bottom, rgba(220,220,220,0) 0%, rgba(220,220,220,0.2) 50%, rgba(220,220,220,0) 100%)"}),this.texture.append(this.bottom_texture_border),this.isLeftPage&&this.right_texture_border.css({left:"0px",right:"auto"}))},onResize:function(){this.parentWidth=this.parent.width();this.parentHeight=this.parent.height();this.top_texture&&this.top_texture.css({width:this.parentWidth-this.borderWidth+"px"});
this.right_texture&&this.right_texture.css({top:this.borderWidth+"px",height:this.parentHeight-2*this.borderWidth+"px"});this.bottom_texture&&this.bottom_texture.css({width:this.parentWidth-this.borderWidth+"px"})},destroy:function(){this.texture&&(this.texture.remove(),this.texture=null);this.top_texture&&(this.top_texture.remove(),this.top_texture=null);this.right_texture&&(this.right_texture.remove(),this.right_texture=null);this.bottom_texture&&(this.bottom_texture.remove(),this.bottom_texture=
null);this.top_texture_border&&(this.top_texture_border.remove(),this.top_texture_border=null);this.right_texture_border&&(this.right_texture_border.remove(),this.right_texture_border=null);this.bottom_texture_border&&(this.bottom_texture_border.remove(),this.bottom_texture_border=null)}});Class("NormalPageTexture",{create:function(b,c,d){this._super(b,c,d);this.isOutCover=1==c||c==totalPageCount;this.isInnerCover=2==c||c==totalPageCount-1;this.isCover=this.isOutCover||this.isInnerCover}}).extend("PageTexture");
Class("SinglePageTexture",{create:function(b,c,d){this._super(b,c,d);this.isOutCover=1==c;this.isInnerCover=c==bookConfig.totalPageCount;this.isCover=this.isOutCover||this.isInnerCover}}).extend("PageTexture");Class("CatalogPageTexture",{create:function(b,c,d){this._super(b,c,d);this.isOutCover=1==c||c==totalPageCount;this.isInnerCover=2==c||c==totalPageCount-1;this.isCover=this.isOutCover||this.isInnerCover}}).extend("PageTexture");
Class("SlidePageTexture",{create:function(b,c,d){this._super(b,c,d);this.isCover=!1}}).extend("PageTexture");
Class("PageRendering",{create:function(b,c,d){this.parent=b;this.pageIndex=c;this.isLeftPage=getPageDirection(c,d);this.pageShadow=getPageShadow(b,c,this.isLeftPage,d);this.pageTexture=getPageTexture(b,c,this.isLeftPage,d)},render:function(){this.addCoil();this.addPageShadow();this.addPageTexture()},addCoil:function(){parseBool(bookConfig.addPaperCoil)&&(this.midCoil=$("<div style='z-index:6;'></div>"),this.isLeftPage?this.midCoil.attr("class","leftPaperCoil"):this.midCoil.attr("class","rightPaperCoil"),
this.parent.append(this.midCoil))},addPageShadow:function(){this.pageShadow.addShadow()},addPageTexture:function(){this.pageTexture.render()},hideMiddleShadow:function(){this.pageShadow.hidePageShadow()},onResize:function(b,c){if(this.pageShadow)this.pageShadow.onResize(b,c);if(this.pageTexture)this.pageTexture.onResize(b,c)},destroy:function(){this.pageShadow&&(this.pageShadow.destroy(),this.pageShadow=null);this.pageTexture&&(this.pageTexture.destroy(),this.pageTexture=null)}});
function getPageShadow(b,c,d,f){if(f==BookType.normal_book)return new NormalPageShadow(b,c,d);if(f==BookType.single_book)return new SinglePageShadow(b,c,d);if(f==BookType.catalog_book)return new CatalogPageShadow(b,c,d);if(f==BookType.slide_book||f==BookType.singleSlide_book)return new SlidePageShadow(b,c,d)}
function getPageTexture(b,c,d,f){if(f==BookType.normal_book)return new NormalPageTexture(b,c,d);if(f==BookType.single_book)return new SinglePageTexture(b,c,d);if(f==BookType.catalog_book)return new CatalogPageTexture(b,c,d);if(f==BookType.slide_book||f==BookType.singleSlide_book)return new SlidePageTexture(b,c,d)}
function getPageDirection(b,c){switch(c){case BookType.single_book:return bookConfig.RightToLeft?!0:!1;case BookType.singleSlide_book:return bookConfig.RightToLeft?!0:!1;default:return 0==b%2?bookConfig.RightToLeft?!1:!0:bookConfig.RightToLeft?!0:!1}}
var getFileFormat=function(b){return!passwardType()||!bookConfig.excludeFrontPages||b<=parseInt(bookConfig.excludeFrontPages)?".jpg":".js"},decodeBase64=function(b,c){var d=encodeDatabasePrefix(c);if(global[d+b]&&"string"==typeof global[d+b]){var f=getRealkey();if(f)return d=base64.decode(global[d+b]),f=rc4(f,d),base64.encode(f)}},dataBase64Str=function(b,c,d){if(verifyPassward()){var f=decodeDatabasePrefix(c),g=encodeDatabasePrefix(c);if(global[f+b])return global[g+b]=null,d&&$(d).remove(),global[f+
b];c="data:image/jpg;base64,"+decodeBase64(b,c);global[f+b]=c;global[g+b]=null;d&&$(d).remove();return c}},decodeDatabasePrefix=function(b){switch(b){case "normal":return"dataBase";case "large":return"dataBase";case "thum":return"dataBaseThum";case "thumb":return"dataBaseThum"}},encodeDatabasePrefix=function(b){switch(b){case "normal":return"page";case "large":return"page";case "thum":return"thumb";case "thumb":return"thumb"}},userList,getRealkey=function(){if(1==passwardType())return getSingleRealKey();
if(userList&&document.getElementById("passward")&&""!=$("#passward").val()&&document.getElementById("username")&&""!=$("#username").val()){var b=$("#passward").val(),c=$("#username").val();if(userList&&"string"==typeof userList[c])return getListRealKey(c,b,userList[c])}},getSingleRealKey=function(){if(bookConfig.singlePasswordKey&&"string"==typeof bookConfig.singlePasswordKey&&document.getElementById("passward")&&""!=$("#passward").val()){var b=parsHexToNormalString(bookConfig.singlePasswordKey);
return rc4($("#passward").val(),b)}},getListRealKey=function(b,c,d){b=(b+String.fromCharCode(9)+c).MD5(32);b=parsHexToNormalString(b);b=base64.encode(b);d=d.remove(b);d=d.replace(/==?$/,"");if(d=base64.decode(d))return c=(b+c).cycleToLength(128),rc4(c,d)},verifyPassward=function(){if(1==passwardType()){if(!document.getElementById("passward")||""==$("#passward").val())return;var b=$("#passward").val();return b.MD5(32).toLowerCase()===bookConfig.singlePasswordMD5.toLowerCase()}if(bookConfig.userListPath&&
(userList||loadJavascript(bookConfig.userListPath,verifyPassward,function(){}),userList&&document.getElementById("passward")&&""!=$("#passward").val()&&document.getElementById("username")&&""!=$("#username").val())){var b=$("#passward").val(),c=$("#username").val();if("string"==typeof userList[c])return b=(c+String.fromCharCode(9)+b).MD5(32),b=parsHexToNormalString(b),b=base64.encode(b),userList[c].substring(0,24)===b}},passwardType=function(){if(!bookConfig.securityType||1==parseInt(bookConfig.securityType))return 0;
if(bookConfig.securityType&&2==parseInt(bookConfig.securityType))return 1;if(bookConfig.securityType&&3==parseInt(bookConfig.securityType))return 2},a=hddr.soo2,i=0,BookSide=Class({slider:null,playSliderAfterLoad:!1,showMM:function(){this.MMBackground.css({display:"block"})},hideMM:function(){this.MMBackground.css({display:"none"})},clearMM:function(){this.destroyMM();this.initMMItems()},destroyMM:function(){this.Items.each(function(b){b.destroy();b.dialog&&b.dialog.destroy()});this.MMBackground.empty()},
initMMItems:function(){this.Items=new ObjectPool},initMM:function(){this.Items=(new PageEditorParser(this.MMBackground,this.attachW,this.attachH)).createItemsForPage(this.pageIndex);this.preventMMBackEvent()},initSlider:function(){if(window.hiSliderFactory){var b=(global.sliderJS||[])[this.pageIndex-1];b&&0<b.elements.length&&(this.slider=window.hiSliderFactory({container:this.MMBackground,slide:b,initialWidth:this.attachW,initialHeight:this.attachH,focusOnFunc:this.focusOn.bind(this),resetFocusFunc:this.resetFocus.bind(this)}),
this.slider.resize(this.attachW,this.attachH),!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){if(void 0!=b&&null!=b){for(var c=!1,d=0;d<b.length;d++)if(b[d]==this.pageIndex){c=!0;break}!0==c?this.playSlider():this.resetSlider()}},
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);this.Items.each(function(d){d.onResize(b,c);if(d.dialog)d.dialog.onResize(windowWidth,windowHeight)})},preventMMBackEvent:function(){document.body.ondragstart=function(){return!1};$(this.MMBackground).on("mousedown touchstart pointerdown mouseover mousemove",".hi-action",function(b){b.stopPropagation()});$(this.MMBackground).on("mousedown touchstart pointerdown mouseover mousemove",
".slider-action",function(b){b.stopPropagation()});$(this.MMBackground).on("mousedown touchstart pointerdown mouseover mousemove",".flip-action",function(b){b.stopPropagation()})},showLoading:function(){this.side.append(this.loadingImg)},hideLoading:function(){this.loadingImg.remove()},focusOn:function(b){this.option=b;this.focusSet(b)},focusSet:function(b){this.focusIng=!0;var c=b.pageWidth,d=b.duration/1E3,f=this.attachW/(b.width*this.attachW/c),c=-b.left*f*this.attachW/c;b=-b.top*f*this.attachH/
b.pageHeight;f=Math.max(1,f);c=Number.between(c,(1-f)*this.attachW,0);b=Number.between(b,(1-f)*this.attachH,0);f=transformCSS({origin:{x:0,y:0},tran:{x:c,y:b},scale:f});animateOnce(this.tmpContent,f,d,function(){},"%stransform")},resetFocus:function(b){if(this.focusIng){b||(b=0);var c=transformCSS({origin:{x:0,y:0},tran:{x:0,y:0},scale:1});animateOnce(this.tmpContent,c,b/1E3,function(){this.focusIng=!1}.bind(this),"%stransform")}},enterSide:function(){this.Items.each(function(b){b.audio&&b.audio.enterPlay&&
b.audio.play&&b.audio.play();b.nameLike&&(b.nameLike("youtube","flashSwf","button","Video")&&b.show&&b.show(),b.nameLike("audio")&&(b.getPlayEvt()==PageEditor.PlayEvt.EVT_PLAY&&b.play(),b.background&&b.isBackgroundAudio()&&b.play()),b.nameIs("Video")&&b.getPlayEvt()==PageEditor.PlayEvt.EVT_PLAY&&b.playVideo(),b.nameIs("EmbeddedSlideshow","AlphaTransitionBanner","Carousel","TextAmin","AText","HotSpots")&&b.play(),b.nameIs("Link")&&b.flash(),b.nameLike("Image")&&b.showEffect())})},leaveSide:function(){this.Items.each(function(b){b.pause&&
b.pause();b.stop&&b.stop();b.stopFlash&&b.stopFlash();b.audio&&b.audio.stop&&b.audio.stop();b.dialog&&b.dialog.hide();if(b.nameLike){b.nameLike("youtube","flashSwf","button","Video")&&b.hide&&b.hide();b.nameLike("audio")&&b.isBackgroundAudio&&b.isBackgroundAudio()&&b.pause();if(b.nameIs("Video")&&(b.getStopEvt()==PageEditor.PlayEvt.EVT_STOP&&b.pauseVideo(),"1"==b.getReplayWhenPlayEvent()&&b.getPlayEvt()==PageEditor.PlayEvt.EVT_PLAY)){var c=b.getTotalTime();c&&b.setCurrentTime(c)}b.nameLike("Image")&&
b.hideEffect()}});this.searchHighlight.css({"background-image":""});this.resetSlider()}}),imageLoaded=[];bdor[33]=function(b,c){return b/bdor[30](c,20)};
var BookPage=Class({isHardPage:!0,onPageLoaded:null,create:function(b,c,d,f){this.bookType=d;this.pageIndex=b;this.zIndex=this.height=this.width=0;this.visible=!0;this.onPageLoaded=f;this.initHtml(b,c)},initHtml:function(b,c){this.initSide();this.side.attr("id",c+b);this.initContents();this.addFlipShadow()},initSide:function(){this.container=this.side=$("<div style='overflow:hidden;position:absolute;'></div>")},initContents:function(){this.initPageSide();var b=getColor("pageBackgroundColor","#f5f5f5");
this.tmpContent=$("<div class='side-content' style='background-color : "+b+";'></div>");this.pageSide.append(this.tmpContent)},initPageSide:function(){this.pageSide=this.side},addFlipShadow:function(){this.flipBackShadow=$("<div class='flip-shadowB'></div>");this.flipFrontShadow=$("<div class='flip-topshadow'></div>");this.side.append(this.flipBackShadow);this.side.append(this.flipFrontShadow)},loading:function(){this.fullContent||(this.loadingImage||(this.loadingImage=$("<img class='loadingImage' src='"+
uiBaseURL+"loading.gif'/>")),this.tmpContent.append(this.loadingImage))},addAttachment:function(){this.attachment=!0;this.slider=null;this.playSliderAfterLoad=!1;this.MMBackground=$("<div id='MMBackground' style='width:100%;height:100%;position:absolute;z-index:4;-webkit-transform:translate3d(0,0,0);'></div>");this.searchHighlight=$("<div class='kong' id='highlight' style='width:100%;height:100%;'></div>");this.renderPage();this.initMMItems();this.tmpContent.append(this.MMBackground)},renderPage:function(){this.rendering&&
(this.rendering.destroy(),this.rendering=null);this.rendering=new PageRendering(this.side,this.pageIndex,this.bookType);this.rendering.onResize(this.width,this.height);this.rendering.render()},hideMiddleAttachment:function(){this.rendering&&this.rendering.hideMiddleShadow()},mirrorSide:function(){this.isMirrorSide=!0;this.loadingImage&&this.loadingImage.remove()},setZIndex:function(b){this.zIndex=b;this.side.css("z-index",b)},getZIndex:function(){return this.zIndex},setCSSByStyle:function(b){this.side.css(b)},
setCSSByName:function(b){this.side.attr("class",b)},wrap:function(b){this.side.wrap(b)},unwrap:function(){this.side.unwrap()},remove:function(){this.sideImage&&this.sideImage.css({"background-image":""});this.side.remove();this.side=void 0},getSide:function(){return this.side},setLeftOrRight:function(b){(this.isLeft=b)?this.setCSSByName("left-side"):this.setCSSByName("right-side")},centerPage:function(){this.isLeft=!1;this.setCSSByName("center-side")},fillContent:function(){this.fillPage(this.pageIndex)},
onImageLoaded:function(b){if(b){this.fullContent=!0;this.loadingInterval&&this.loadingInterval.stop();this.loadingImage&&this.loadingImage.remove();this.sideImage?this.sideImage.css({"background-image":"url("+b+")"}):(this.sideImage=$("<div style='position:absolute;z-index:0;background-size:100% 100%;background-repeat:no-repeat;background-position:center center;'></div>"),this.sideImage.css({"background-image":"url("+b+")"}),this.sideImage.css({filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+
b+"',sizingMethod='scale')"}),this.resizeBackgroundImage(b),this.resizeSideImage(),this.tmpContent.append(this.sideImage),this.attachment&&(this.tmpContent.append(this.searchHighlight),this.searchHighlight.css({opacity:0.8}),this.clearMM(),this.initMM(),this.initSlider()));if(this.onPageLoaded)this.onPageLoaded(this.pageIndex);Log.print("loaded:"+b)}},resizeBackgroundImage:function(b){b=$("<img src='"+b+"'/>");0.1<=Math.abs(bookConfig.largePageWidth/bookConfig.largePageHeight-b[0].naturalWidth/b[0].naturalHeight)&&
this.sideImage.css("background-size","contain")},fillImageOrNot:function(b,c){return!b||"string"!=typeof b||b==this.imageURL&&!c||passwardType()&&bookConfig.excludeFrontPages&&this.pageIndex>parseInt(bookConfig.excludeFrontPages)&&!verifyPassward()?!1:!0},fillPage:function(b,c){if((!this.isMirrorSide||bookConfig.showMirrorSide)&&b==this.pageIndex){var d=getPageDir(this.pageIndex,"normal",originTotalPageCount);if(d==this.imageURL&&!c&&this.fullContent)this.loadingInterval&&this.loadingInterval.stop(),
this.loadingImage&&this.loadingImage.remove();else{var f=function(c){imageLoaded[b]=!0;this.onImageLoaded(c)}.bind(this);this.fullContent=!1;this.imageURL=d;fillImageAfterLoaded(b,"normal",f)}}},initMM:function(){this.attachment&&(this._super(),this.AddNotesByContainers(this.bookType,this.pageIndex,this.MMBackground),this.showOrHideYoutube(BookInfo.getCurrentPages()))},AddNotesByContainers:function(b,c,d){isPhone()||($(d).css({background:"rgba(0,0,0,0)"}),isBelowIE9()&&$(d).css({"background-image":"url('aaaa.a')"}),
void 0!=global.noteCookie&&noteCookie.setContainers(b,c,d),void 0!=global.textRemark&&textRemark.setContainers(b,c,d),isBelowIE9()||void 0==global.signature||isBelowIE9()||signature.setContainers(b,c,d),void 0!=global.annotationShapes&&annotationShapes.setContainers(b,c,d),void 0!=global.global.annotationImage&&global.annotationImage.setContainers(b,c,d))},showOrHideYoutube:function(b){if(void 0!=b&&null!=b){for(var c=!1,d=0;d<b.length;d++)if(b[d]==this.pageIndex){c=!0;break}!0==c?this.showYoutube():
this.hideYoutube()}},hideYoutube:function(){this.Items.find("Youtube").each(function(b){b.hide()})},showYoutube:function(){this.Items.find("Youtube").each(function(b){b.show()})},setVisible:function(b){b?this.side.show():this.side.hide();this.visible=b},addHistoryTexts:function(b){if(this.attachment&&void 0!=b&&null!=b){for(var c=!1,d=0;d<b.length;d++)if(b[d]==this.pageIndex){c=!0;break}!0==c&&this.AddNotesByContainers(this.bookType,this.pageIndex,this.MMBackground)}},showGray:function(){if(this.attachment){this.searchHighlight.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(){if(this.attachment){this.clearHighlight();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(){var b=
!0;window.frmSearch&&frmSearch.visible&&0<frmSearch.getList().length&&(b=!1);window.foldingMenu&&foldingMenu.visible&&foldingMenu.currentItem&&foldingMenu.currentItem.id&&"miSearch"==foldingMenu.currentItem.id&&(b=!1);if(!b&&this.attachment){for(var b=!1,c=0;c<positionForPages.length;c++)if(positionForPages[c]&&positionForPages[c].page&&positionForPages[c].page==this.pageIndex){b=!0;break}b?highlightSearchFun(this.searchHighlight,this.pageIndex):(b=String.format(bookConfig.searchPositionJS,this.pageIndex),
1<this.pageIndex&&(b=b.replace("[1]","["+this.pageIndex+"]")),b.match(/\.*\/?(\w+\/)*\w+(\[|\()?\d+(\]|\))?\.js/gi)&&loadJavascript(b,function(){highlightSearchFun(this.searchHighlight,this.pageIndex)}.bind(this),function(){}))}},clearHighlight:function(){this.attachment&&clearHighlightFun(this.searchHighlight)},onResize:function(b,c){this.resizePage(b,c);this.flipFrontShadow.css({height:3*this.maskWidth,top:-this.maskWidth});this.flipBackShadow.css({height:this.maskWidth,top:(this.height-this.maskWidth)/
2});if(this.attachment&&(this.onMMResize(this.attachW,this.attachH),this.rendering))this.rendering.onResize(b,c)},resizePage:function(b,c){this.width=b;this.height=c;this.maskWidth=parseInt(Math.sqrt(Math.pow(b,2)+Math.pow(c,2)));0!=(this.maskWidth-this.height)%2&&(this.maskWidth+=1);this.attachW=parseInt(100*b/(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight)));this.attachH=parseInt(100*c/(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop)));
this.pageSideWidth=this.width;this.pageSideHeight=this.height;this.side.css({width:b,height:c});this.tmpContent.css({width:this.attachW,height:this.attachH,top:-this.attachH*parseFloat(bookConfig.visibleAreaTop)/100,left:-this.attachW*parseFloat(bookConfig.visibleAreaLeft)/100});this.resizeSideImage()},resizeSideImage:function(){if(this.sideImage)if($.system.name!=$.system.ANDROID&&(isPhone()||isPad())){var b=1024,c=1024;BookInfo.isDoublePage()&&bookType==BookType.normal_book&&(c=b=768);isPad()&&
BookInfo.isDoublePage()&&bookType==BookType.normal_book&&(c=b=768);b=getPageWidthHeight(b,c,this.pageSideWidth,this.pageSideHeight);this.sideImage.css({width:Math.ceil(b.x)+"px",height:Math.ceil(b.y)+"px"});c=transformCSS({scale:this.pageSideWidth/b.x,origin:{x:0,y:0}});this.isMirrorSide&&(c=transformCSS({scaleX:-this.pageSideWidth/b.x,scaleY:this.pageSideWidth/b.x,origin:{x:0,y:0},tran:{x:this.pageSideWidth,y:0}}),this.sideImage.css({opacity:0.2}));this.sideImage.css(c)}else this.sideImage.css({width:"100%",
height:"100%"}),this.isMirrorSide&&this.sideImage.css({"-webkit-transform":"scaleX(-1)","-moz-transform":"scaleX(-1)","-o-transform":"scaleX(-1)","-ms-transform":"scaleX(-1)",opacity:0.2})},sideAddChild:function(b){this.side.append(b)},setFlipShadow:function(b,c,d){var f=b.shadowRate;d=b.rotate;var g=0.9<f?1+2*(1-f)/0.1:3*f/0.9;if(isPhone()||isPad())g=1;var f=0.9<f?0.2*(1-f)/0.1:0.1>f?0.2*f/0.1:0.2,h=(b.frontShadowDistance-100*(90<d?0:g))/Math.cos(d*Math.PI/180),h=transformCSS({scaleX:g,rotate:-d,
tran:{x:h,y:0}});b=transformCSS({scaleX:g,rotate:d,tran:{x:b.maskTranX,y:b.maskTranY}});this.flipFrontShadow.css(h);this.flipBackShadow.css(b);this.setFlipShadowBeforeFlip(d,c);isPhone()||isPad()||(this.flipFrontShadow.css({opacity:f}),this.flipBackShadow.css({opacity:f}))},setFlipShadowBeforeFlip:function(b,c){c?(this.flipBackShadow&&this.flipBackShadow.css({visibility:"hidden"}),this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"visible"})):(this.flipBackShadow&&this.flipBackShadow.css({visibility:"visible"}),
this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"hidden"}));var d=90<b?100:0,f=0<=b&&180>b?100*(this.height+this.maskWidth)/(3*this.maskWidth):100/3;this.flipFrontShadow.css({"transform-origin":d+"% "+f+"%","-webkit-transform-origin":d+"% "+f+"%","-moz-transform-origin":d+"% "+f+"%","-ms-transform-origin":d+"% "+f+"%"});90<b?(this.flipFrontShadow.css({right:"0px"}),this.flipBackShadow.css({left:"100%"})):(this.flipFrontShadow.css({right:"auto"}),this.flipBackShadow.css({left:"0px"}))},
clearFlipShadow:function(){this.flipBackShadow&&this.flipBackShadow.css({visibility:"hidden"});this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"hidden"});this.side.removeClass("boxShadow")}}).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({isHardPage:!1,create:function(b,c,d,f,g){this.width=this.zIndex=0;this.pageIndex=b;this.visible=!0;this.isSingleBook=d;this.container=$("<div></div>");this.setMaskCss();this.container.attr("id",c+"Mask"+b);this.page=new BookPage(b,c,f,g);this.container.append(this.page.side)},setMaskCss:function(){var b="mask";this.isSingleBook&&rightToLeft&&(b="single-book-right-mask");this.isSingleBook&&!rightToLeft&&(b="single-book-mask");this.setCSSByName(b)},remove:function(){this.container.remove();
this.container=void 0;this.page.remove();this.page=void 0},setPage:function(b){this.page=b},setCSSByStyle:function(b){this.container.css(b)},setVisible:function(b){b?this.container.show():this.container.hide();this.visible=b},setCSSByName:function(b){this.container.addClass(b)},onResize:function(b,c){var d=parseInt(Math.sqrt(Math.pow(b,2)+Math.pow(c,2)));0!=(d-c)%2&&(d+=1);this.container.css({width:d,height:d,top:(c-d)/2});this.width=d;this.page&&(this.page.onResize(b,c),this.page.setCSSByStyle({top:(this.width-
c)/2}))},getWidth:function(){return this.width},setZIndex:function(b){this.zIndex=b;this.container.css({"z-index":b})},getZIndex:function(){return this.zIndex},setCSSByName:function(b){this.container.attr("class",b)},setLeftOrRight:function(b){var c=this.isSingleBook?"left-single-mask-side":"left-mask-side";b||(c=this.isSingleBook?"right-single-mask-side":"right-mask-side");this.setCSSByName(c);this.page&&this.page.setLeftOrRight(b)},beginToFlip:function(){this.setMaskCss()},loading:function(){this.page&&
this.page.loading()},mirrorSide:function(){this.page&&this.page.mirrorSide()},setFlipShadow:function(b,c,d){this.page&&this.page.setFlipShadow(b,c,d)},addAttachment:function(){this.page&&this.page.addAttachment()},clearFlipShadow:function(){this.page&&this.page.clearFlipShadow()},fillContent:function(){this.page&&this.page.fillContent()},fillPage:function(b,c){this.page&&this.page.fillPage(b,c)},enterSide:function(){this.page&&this.page.enterSide()},leaveSide:function(){this.page&&this.page.leaveSide()},
addHistoryTexts:function(b){this.page&&this.page.addHistoryTexts(b)},highlightSearch:function(){this.page&&this.page.highlightSearch()},clearHighlight:function(){this.page&&this.page.clearHighlight()},resetSlider:function(){this.page&&this.page.resetSlider()},playSlider:function(){this.page&&this.page.playSlider()}});bdor[39]=function(){return 8}();var bookMouseDown=!1,nBookStatu=0;global.bdor[200]=function(b){return bdor[b]};
var Book=Class({bookType:void 0,parent:null,width:0,height:0,flippingTime:600,currentPageIndex:1,rightToLeft:!1,pageArray:null,pageWidth:0,pageHeight:0,visible:!1,create:function(b){this.init(b)},init:function(b){this.parent=b.parent;this.currentPageIndex=b.currentPageIndex;this.flippingTime=1E3*b.flippingTime;this.rightToLeft=b.rightToLeft;this.pageArray=[]},getBookType:function(){return this.bookType},onBookPageLoaded:function(b){if(this.visible){var c=this.getCurrentPages();if(c)for(var d=0;d<
c.length;d++){var f=c[d];this.pageArray[f]&&b==f&&this.pageArray[f].enterSide()}}},getBook:virtual_function,getCurrentPages:function(){return[]},initBook:virtual_function,gotoPage:virtual_function,show:virtual_function,hide:virtual_function,onResize:virtual_function,destroy:virtual_function}),StaticAd=Class({create:function(b){var c=b.css("left"),c=parseInt(c.replace("px","")),d=b.css("top");b.css("width");rightToLeft&&(c+=iWidth/2);this.adContainer=$("<div id='adContainer'></div>");this.adContainer.css({position:"absolute",
"z-index":1});this.adContainer.css({left:c+"px",top:d});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);this.adContainer&&1==this.currentPageIndex&&this.adContainer.css({"z-index":3})},setStyle:function(b){b&&this.adContainer&&this.adContainer.css(b)},resize:function(){this.adInstance&&this.adInstance.resize()},show:function(){this.adContainer&&
this.adContainer.show()},hide:function(){this.adContainer&&this.adContainer.hide()}}),ZoomHint=Class({create: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 f=b[0].pageY;c.mouseInBook.x=b[0].pageX;c.mouseInBook.y=f};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=c.globalToBook(!0,c.mouseInBook.x,c.mouseInBook.y);if(!(0>d.x||d.x>c.width||0>d.y||d.y>c.height)){var d=c.mouseInBook.x+15,f=c.mouseInBook.y;c.zoomHint=new divHint(getLanguage("lblDoubleClickToZoomIn","Double click to zoom in."),d,f,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)},globalToBook:function(b,c,d){var f;switch(bookType){case BookType.single_book:f=Point(c-singlePageBook.getLeft(),d-singlePageBook.getTop());break;case BookType.normal_book:f=Point(c-((b?0:flipBook.getPageWidth())+flipBook.getLeft()),d-flipBook.getTop());break;case BookType.catalog_book:f=
catalogBook.getTran(),b=c-((b?0:catalogBook.getPageWidth())+catalogBook.getCssLeft())-f.x,d=d-catalogBook.getCssTop()-f.y,f=Point(b,d)}return f},clearZoomHintTimer:function(){try{window.clearInterval(this.zoomHintTimer)}catch(b){}null!=this.zoomHint&&(bookContainer.unbind(_event._move,this.trackMousePoint),this.zoomHint.destroy(),this.zoomHint=null)}}),TipsBox=Class({create:function(b,c){this.visible=!1;this.caption=b;this.background=$("<div class='tipsBox tipsBoxShadow tipsBoxRadius'></div>");$(c).append(this.background)},
setTimer:function(){this.timer=window.setInterval(function(){this.hideTipsBox();window.clearInterval(this.timer)}.bind(this),1500)},resetTimer:function(){window.clearInterval(this.timer);this.setTimer()},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){},getWidth:function(){return $(this.background).width()},getHeight:function(){return $(this.background).height()},setCaption:function(b){this.background.html(b)},
showTipsBox:function(){this.visible?this.resetTimer():(this.setTimer(),this.visible=!0,$(this.background).show(),$(this.background).animate({opacity:0.5},300))},hideTipsBox:function(){this.visible&&(this.visible=!1,$(this.background).animate({opacity:0},300,function(){$(this.background).hide()}.bind(this)))}}),BookMiniFullscreen=Class({create:function(){},init:function(){bookConfig.hideMiniFullscreen||isPhone()||isPad()||isIE()||MiniStyle.isMini()||fullScreenApi.supportsFullScreen&&fullScreenApi.isFullScreen()||
this.miniFullScreen||(this.miniFullScreen=$("<div class='miniFullscreen' id='miniFullscreen'></div>"),this.miniFullScreen.html(getLanguage("lblFullscreen","Click to view in fullscreen.")),this.onResize(),bookContainer.append(this.miniFullScreen),this.miniFullscreenEnter=!1,this.miniFullscreenTimeout&&window.clearTimeout(this.miniFullscreenTimeout),this.miniFullscreenTimeout=window.setTimeout(function(){this.removeMiniFullScreen()}.bind(this),3E3),this.initMiniFullScreenEvent())},initMiniFullScreenEvent:function(){this.miniFullScreen.bind(_event._end,
function(){bookType==BookType.catalog_book&&global.catalogBook&&catalogBook.guidBar&&catalogBook.guidBar.fullscreenBtn?catalogBook.guidBar.fullscreenBtn.trigger(_event._end):readAsFullscreen();this.miniFullScreen.remove();this.miniFullScreen=void 0}.bind(this));this.miniFullScreen.bind(_event._enter,function(){this.miniFullscreenEnter=!0}.bind(this));this.miniFullScreen.bind(_event._leave,function(){this.miniFullscreenEnter=!1;this.miniFullscreenTimeout&&window.clearTimeout(this.miniFullscreenTimeout);
this.miniFullscreenTimeout=window.setTimeout(function(){this.removeMiniFullScreen()}.bind(this),3E3)}.bind(this))},removeMiniFullScreen:function(){if(this.miniFullScreen&&!this.miniFullscreenEnter){var b={alpha:0.5};$(b).animate({alpha:0},{duration:300,easing:"easeOutSine",step:function(){this.miniFullScreen&&this.miniFullScreen.css({opacity:b.alpha})}.bind(this),complete:function(){this.miniFullScreen&&this.miniFullScreen.remove();this.miniFullScreen&&(this.miniFullScreen=void 0)}.bind(this)})}},
onResize:function(){if(this.miniFullScreen)if(MiniStyle.isMini())this.miniFullScreen.remove(),this.miniFullScreen=void 0;else{var b=BookInfo.top();this.miniFullScreen.css({top:b+BookInfo.height()-50+"px"})}},show:function(){this.miniFullScreen&&this.miniFullScreen.show()},hide:function(){this.miniFullScreen&&this.miniFullScreen.hide()},remove:function(){this.miniFullScreen&&this.miniFullScreen.remove();this.miniFullScreen=void 0},setStyle:function(b){b&&this.miniFullScreen&&this.miniFullScreen.css(b)}}),
FlipPage=Class({downMask:null,upMask:null,currentIndex:0,nextIndex:0,hardPage:!1,coverPage:!1,coordinate:null,startPoint:null,toPoint:null,fromPoint:null,AliceToLeft:!1,AliceToRight:!1,loosen:!0,fallback:!1,flipping:!1,dragMoveToFlip:!1,fallback:!1,create:function(b){this.book=b},startToFlip:function(){this.loosen=this.flipping=!0;this.fallback=this.AliceToRight=this.AliceToLeft=!1},meetFlipCondition:function(){var b=this.toPoint&&this.startPoint&&(this.book.mouseMoveDirection==this.book.moveDirectionType.MOVE_LEFT&&
0<this.startPoint.x||this.book.mouseMoveDirection==this.book.moveDirectionType.MOVE_RIGHT&&0>this.startPoint.x);return this.toPoint&&this.startPoint&&(this.toPoint.x<this.book.MiddleX&&0<this.startPoint.x||this.toPoint.x>this.book.MiddleX&&0>this.startPoint.x)||b},flipToPoint:function(b,c,d,f,g,h){if(f&&g)if(!0==this.hardPage)this.flipToHardPoint(b,c,d,f,g);else if(this.downMask&&this.upMask&&this.downMask.page&&this.upMask.page&&(this.coordinate=g,c=computePoint(b,c,d,f,g))){d=transformCSS({rotate:c.rotate,
tran:{x:c.maskTranX,y:c.maskTranY}});var k=transformCSS({rotate:c.rotate,tran:{x:c.maskTranX,y:c.maskTranY}}),l=transformCSS({rotate:-c.rotate,tran:{x:-c.pageTranX,y:0}}),m=transformCSS({rotate:c.rotate,tran:{x:c.pageTranX,y:0}});this.downMask&&this.downMask.setCSSByStyle(d);this.upMask&&this.upMask.setCSSByStyle(k);this.downMask&&this.downMask.page&&this.downMask.page.setCSSByStyle(l);this.upMask&&this.upMask.page&&this.upMask.page.setCSSByStyle(m);this.setFlipAlpha(b,f,g);this.setFlipShadow(c,h);
this.book.followToPoint(this,f,g)}},setFlipAlpha:function(b,c,d){},setFlipShadow:function(b,c){b&&(this.upMask.page&&this.upMask.page.setFlipShadow(b,!0,c),this.nextPage&&this.nextPage.setFlipShadow(b,!1,c))},isDragMoveToFlip:function(){this.dragMoveToFlip=!1;this.coordinate&&this.startPoint&&this.coordinate.x!=this.startPoint.x&&(this.dragMoveToFlip=!0)},endFlip:function(){this.flipping=!1},destroy:function(){}}),SingleFlipPage=Class({flipToHardPoint:function(b,c,d,f,g){if(f&&g&&(this.coordinate=
g,c=computePoint(b,c,d,f,g))){var h=-90+90*Math.abs(g.x/f.x);0>g.x&&(h=90-90*Math.abs(g.x/f.x));d=transformCSS({perspective:3E3,rotateY:h});h=transformCSS({perspective:3E3,rotateY:h});this.downMask&&this.downMask.setCSSByStyle(d);this.upMask&&this.upMask.setCSSByStyle(h);0>g.x/f.x?(this.upMask.setVisible(!1),this.downMask.setVisible(!1)):(this.upMask.setVisible(!1),this.downMask.setVisible(!0));this.setHardFlipShadow(c);this.setFlipAlpha(b,f,g);this.book.followToPoint(this,f,g)}},setHardFlipShadow:function(b){b&&
(this.upMask&&this.upMask.setFlipShadow(b,!0),this.downMask&&this.downMask.setFlipShadow(b,!1))},setPageZIndex:function(){var b=this.downMask.pageIndex,c=this.upMask.pageIndex,d=originTotalPageCount+5+c,f=originTotalPageCount+5-b;if(bookConfig.HardPageEnable){if(c==totalPageCount||1==c)d=2*(bookConfig.totalPageCount+5)+10;if(b==totalPageCount||1==b)f=2*(bookConfig.totalPageCount+5)+10}this.upMask.setZIndex(d);this.downMask.setZIndex(f)},setFlipAlpha:function(b,c,d){},setFlipOriginPoint:function(){this.dragMoveToFlip||
rightToLeft||(this.fromPoint={x:this.book.pageWidth,y:this.book.pageHeight});!this.dragMoveToFlip&&rightToLeft&&(this.fromPoint={x:-this.book.pageWidth,y:this.book.pageHeight});this.toPoint="left"==this.book.flipToDirection?{x:-this.book.pageWidth,y:this.fromPoint.y}:{x:this.book.pageWidth,y:this.fromPoint.y};this.startPoint||(this.startPoint={x:0,y:0});this.startPoint.x=-this.toPoint.x;this.startPoint.y=this.toPoint.y},endFlipByIndex:function(b){b=transformCSS({rotate:0,tran:{x:0,y:0}});this.upMask.setCSSByStyle(b);
this.upMask.page&&this.upMask.page.setCSSByStyle(b);this.downMask.setCSSByStyle(b);this.downMask.page&&this.downMask.page.setCSSByStyle(b);this.upMask.setLeftOrRight(rightToLeft);this.downMask.setLeftOrRight(rightToLeft);this.book.setZIndexByPageIndex(this.upMask);this.book.setZIndexByPageIndex(this.downMask);this.upMask.clearFlipShadow();this.downMask.clearFlipShadow()}}).extend(FlipPage),DoubleFlipPage=Class({flipToHardPoint:function(b,c,d,f,g){if(f&&g&&(g.x>b&&(g.x=b),g.x<-b&&(g.x=-b),this.coordinate=
g,c=computePoint(b,c,d,f,g))){var h=-90+90*Math.abs(g.x/f.x);0>g.x&&(h=90-90*Math.abs(g.x/f.x));d=transformCSS({perspective:3E3,rotateY:h});h=transformCSS({perspective:3E3,rotateY:h});this.downMask&&this.downMask.setCSSByStyle(d);this.upMask&&this.upMask.setCSSByStyle(h);0>g.x/f.x?(this.upMask.setVisible(!0),this.downMask.setVisible(!1)):(this.upMask.setVisible(!1),this.downMask.setVisible(!0));this.setHardFlipShadow(c);this.setFlipAlpha(b,f,g);this.book.followToPoint(this,f,g)}},setHardFlipShadow:function(b){b&&
(this.upMask&&this.upMask.setFlipShadow(b,!0),this.downMask&&this.downMask.setFlipShadow(b,!1))},setPageZIndex:function(b){var c=this.downMask.pageIndex,d=this.upMask.pageIndex,f=originTotalPageCount+5+d,g=originTotalPageCount+5-c;"min"==b.flipTo&&(f=2*originTotalPageCount+5-d);"min"==b.flipTo&&(g=5+c);if(bookConfig.HardPageEnable){if(d==totalPageCount||1==d)f=2*(bookConfig.totalPageCount+5)+10;if(c==totalPageCount||1==c)g=2*(bookConfig.totalPageCount+5)+10}this.upMask.setZIndex(f);this.downMask.setZIndex(g)},
setFlipOriginPoint:function(b){this.dragMoveToFlip||"left"!=b||(this.fromPoint={x:this.book.pageWidth,y:this.book.pageHeight});this.dragMoveToFlip||"right"!=b||(this.fromPoint={x:-this.book.pageWidth,y:this.book.pageHeight});this.toPoint={x:-this.fromPoint.x,y:this.fromPoint.y};this.startPoint||(this.startPoint={x:0,y:0});this.startPoint.x=this.fromPoint.x;this.startPoint.y=this.fromPoint.y},endFlipByIndex:function(b){var c=transformCSS({rotate:0,tran:{x:0,y:0}});this.upMask.setCSSByStyle(c);this.upMask.page&&
this.upMask.page.setCSSByStyle(c);this.downMask.setCSSByStyle(c);this.downMask.page&&this.downMask.page.setCSSByStyle(c);b?(this.downMask.setLeftOrRight(!0),this.upMask.setLeftOrRight(!0)):(this.downMask.setLeftOrRight(!1),this.upMask.setLeftOrRight(!1));this.book.setZIndexByPageIndex(this.upMask);this.book.setZIndexByPageIndex(this.downMask);this.upMask.clearFlipShadow();this.downMask.clearFlipShadow()}}).extend(FlipPage),FlipPageManager=Class({create:function(b){this.book=b;this.array=[];this.pinDownCurlingArray=
[];this.fallbackArray=[];this.flipArray=[];this.zoomArray=[];this.resizeArray=[];this.hardFlipArray=[];this.softFlipArray=[];this.coverFlipArray=[]},initFlipPageByIndex:function(b,c,d){if(this.book.isCoverPage(b,c))return this.initCoverFlipByIndex(b,c,d);if(this.book.isHardPage(b,c))return this.initHardFlipByIndex(b,c,d);d=this.book.getDownUpPage(b,c,d);var f=b+"-"+c;this[f]||(this[f]=this.book.newFlipPage());this[f].downMask=d[0];this[f].upMask=d[1];this[f].currentIndex=b;this[f].nextIndex=c;this[f].hardPage=
!1;0>this.array.indexOf(f)&&this.array.push(f);0>this.softFlipArray.indexOf(f)&&this.softFlipArray.push(f);return this[f]},initHardFlipByIndex:function(b,c,d){d=this.book.getDownUpHardPage(b,c,d);var f=b+"-"+c;this[f]||(this[f]=this.book.newFlipPage());this[f].downMask=d[0];this[f].upMask=d[1];this[f].currentIndex=b;this[f].nextIndex=c;this[f].hardPage=!0;0>this.array.indexOf(f)&&this.array.push(f);0>this.hardFlipArray.indexOf(f)&&this.hardFlipArray.push(f);return this[f]},initCoverFlipByIndex:function(b,
c,d){d=this.book.getDownUpHardPage(b,c,d);var f=b+"-"+c;this[f]||(this[f]=this.book.newFlipPage());this[f].downMask=d[0];this[f].upMask=d[1];this[f].currentIndex=b;this[f].nextIndex=c;this[f].hardPage=!0;this[f].coverPage=!0;0>this.array.indexOf(f)&&this.array.push(f);0>this.coverFlipArray.indexOf(f)&&this.coverFlipArray.push(f);return this[f]},checkFlipping:function(){for(var b=this.array.length,c=0;c<b;c++)if(this.array[c]){var d=this.array[c];if(this[d]&&this[d].flipping)return!0}return!1},removeFlipArrayByIndex:function(b){b=
b.currentIndex+"-"+b.nextIndex;this[b]&&this[b].nextPage&&this[b].nextPage.clearFlipShadow();this[b]&&delete this[b];this.array&&this.array.removeElement(b);this.hardFlipArray&&this.hardFlipArray.removeElement(b);this.softFlipArray&&this.softFlipArray.removeElement(b);this.coverFlipArray&&this.coverFlipArray.removeElement(b)},endFlip:function(){if(this.array&&0!=this.array.length)for(var b=this.array.length,c=0;c<b;c++)if(this.array[c]){var d=this[this.array[c]];d&&(d.endFlipByIndex(),this.removeFlipArrayByIndex(d))}},
doNotMeetPageConditions:function(b){if(this.hasBeenMonitor()||this.fallbackArray&&0<this.fallbackArray.length||0<=this.book.getPagesByIndex(b).indexOf(this.book.currentPageIndex))return!0;var c=!1;!rightToLeft&&b>this.book.currentPageIndex&&(c=!0);rightToLeft&&b<this.book.currentPageIndex&&(c=!0);return this.isReverseSeriesFlip(c)||this.isReversePinDownCurlingArray(c,b)?!0:this.existMutexPages(b)?(this.monitorMutexFlipSituation(b),!0):this.crossFlipMode(b)?(this.book.gotoNearPage(b),window.setTimeout(function(){gotoPageFun(b)},
20),!0):!1},hasBeenMonitor:function(){return this.monitorMutexFlipInterval?!0:!1},isReverseSeriesFlip:function(b){if(b&&this.book.flipping&&this.book.flipToDirection==this.book.direction_right||!b&&this.book.flipping&&this.book.flipToDirection==this.book.direction_left)return!0},isReversePinDownCurlingArray:function(b,c){if(!this.pinDownCurlingArray||0>=this.pinDownCurlingArray.length)return!1;for(var d=this.book.getPagesByIndex(c),f=this.pinDownCurlingArray.length,g=0;g<f;g++){var h=this[this.pinDownCurlingArray[g]];
if(b&&h&&h.AliceToRight||!b&&h&&h.AliceToLeft||h&&0>d.indexOf(h.nextIndex))return!0}return!1},existMutexPages:function(b){return this.hardFlipArray&&0<this.hardFlipArray.length&&(this.toSoftPage(b)||this.toCoverPage(b))||this.softFlipArray&&0<this.softFlipArray.length&&(this.toHardPage(b)||this.toCoverPage(b))||this.coverFlipArray&&0<this.coverFlipArray.length&&(this.toHardPage(b)||this.toSoftPage(b))?!0:!1},monitorMutexFlipSituation:function(b){this.monitorMutexFlipInterval||(this.monitorMutexFlipInterval=
window.setInterval(function(){this.existMutexPages(b)||(window.clearInterval(this.monitorMutexFlipInterval),this.monitorMutexFlipInterval=void 0,gotoPageFun(b))}.bind(this),20))},toSoftPage:function(b){return this.book.toSoftPage(b)},toHardPage:function(b){return this.book.toHardPage(b)},toCoverPage:function(b){return this.book.toCoverPage(b)},crossFlipMode:function(b){return this.book.crossFlipMode(b)?!0:!1},beyondPageRange:function(b){return 0>=b||b>originTotalPageCount?!0:!1},beforeFlip:function(b,
c){var d=this.book.beforeFlipTo(b,!0);this.isDragMoveToFlip(d);if(!d.dragMoveToFlip){var f=this.book.getFromStartPointByIndex(b);d.flipToPoint(this.book.pageWidth,this.book.pageHeight,this.book.maskWidth,f[0],f[1],!0)}f=d.currentIndex+"-"+d.nextIndex;this.book.optionPage==f&&(this.book.optionPage=null);0<this.pinDownCurlingArray.indexOf(f)&&(d.dragMoveToFlip=!0);0>this.flipArray.indexOf(f)&&this.flipArray.push(f);this.fallbackArray.removeElement(f);this.pinDownCurlingArray.removeElement(f);d.startToFlip();
this.book.flipping=!0;return d},isDragMoveToFlip:function(b){b.dragMoveToFlip=!1;b.coordinate&&b.startPoint&&b.coordinate.x!=b.startPoint.x&&(b.dragMoveToFlip=!0)}}),FlipBookIntervalManager=Class({create:function(b){this.book=b;this.flippingTime=1E3*bookConfig.flippingTime},flipIntervalTmp:function(b,c,d,f){if(b){this.book.flipping=!0;b.flipping=!0;b.setFlipOriginPoint(f);b.coordinate||(b.coordinate=b.startPoint);var g=b.coordinate.x,h=b.coordinate.y,k,l=this.flippingTime;f=isAndroidWeChat()||isAndroidDefault()?
function(){var b=0;k=function(){m(b,25,"Sine");b++}.interval(this,l/25)}.bind(this):function(){k=function(b,c){m(b,c,"Sine")}.animation(this,l)}.bind(this);var m=function(f,l,m){if(!b)return!1;var t=this.book.pageWidth,r=this.book.pageHeight,s=this.book.maskWidth,v=$.easing["easeInOut"+m],u=$.easing["easeOut"+m];m=u(null,f,g,b.toPoint.x-g,l);u=u(null,f,h,b.toPoint.y-h,l);b.dragMoveToFlip||(m=v(null,f,g,b.toPoint.x-g,l));b.dragMoveToFlip||(u=r-0.1*Math.sqrt(t*t-m*m));f<l?this.flipToPoint(b,c,d,t,r,
s,b.fromPoint,{x:m,y:u}):(this.flipToPoint(b,c,d,t,r,s,b.fromPoint,b.toPoint),this.book.afterFlipTo(b,d),k.stop())}.bind(this);f()}},setFlipInterval:function(){this.flipInterval=function(){if(!this.flipIntervalManager.flipInterval||!this.flipIntervalManager.flipInterval.stop){if(this.flipPageManager&&this.flipPageManager.array&&0!=this.flipPageManager.array.length)for(var b=0;b<this.flipPageManager.array.length;b++){var c=this.flipPageManager.array[b];if(c)if(!this.flipPageManager[c])this.flipPageManager.array.removeElement(c),
b--;else if(this.flipPageManager[c].fromPoint&&this.flipPageManager[c].startPoint&&this.flipPageManager[c].toPoint&&this.flipPageManager[c].downMask&&this.flipPageManager[c].upMask&&!this.flipPageManager[c].flipping){this.flipPageManager[c].Alice=!0;this.flipPageManager[c].coordinate||(this.flipPageManager[c].coordinate=this.flipPageManager[c].startPoint);var d=0.12*(this.flipPageManager[c].toPoint.x-this.flipPageManager[c].coordinate.x)+this.flipPageManager[c].coordinate.x,f=0.22*(this.flipPageManager[c].toPoint.y-
this.flipPageManager[c].coordinate.y)+this.flipPageManager[c].coordinate.y,g=this.flipPageManager[c].downMask.pageIndex,h=this.flipPageManager[c].upMask.pageIndex;this.flipIntervalManager.flipToPoint(this.flipPageManager[c],g,h,this.pageWidth,this.pageHeight,this.maskWidth,this.flipPageManager[c].fromPoint,{x:d,y:f});!this.flipPageManager[c].flipping&&this.flipPageManager[c].loosen&&1>Math.abs(d-this.flipPageManager[c].toPoint.x)&&1>Math.abs(f-this.flipPageManager[c].toPoint.y)&&(this.flipPageManager.pinDownCurlingArray.removeElement(c),
this.flipPageManager.fallbackArray.removeElement(c),this.flipPageManager.flipArray.removeElement(c),this.flipPageManager[c].Alice=!1,d=this.flipPageManager[c].toPoint.x,f=this.flipPageManager[c].toPoint.y,this.flipIntervalManager.flipToPoint(this.flipPageManager[c],g,h,this.pageWidth,this.pageHeight,this.maskWidth,this.flipPageManager[c].fromPoint,{x:d,y:f}),this.flipPageManager[c].endFlipByIndex(0>this.flipPageManager[c].toPoint.x),this.flipPageManager.removeFlipArrayByIndex(this.flipPageManager[c]),
this.afterCurling(),b--)}}this.flipIntervalManager.flipInterval&&window.requestAnimationFrame(this.flipIntervalManager.flipInterval)}}.bind(this.book);this.flipInterval()},flipToPoint:function(b,c,d,f,g,h,k,l,m){b&&b.flipToPoint(f,g,h,k,l,m);b=Math.abs(l.x-k.x);this.book.movetoCenter(c,d,b)},endFlip:function(){},destroy:function(){}}),computePoint=function(b,c,d,f,g){if(!f||!g)return{rotate:0,pageTranX:0,maskTranX:0,maskTranY:0};g.x>b&&(g.x=b);g.x<-b&&(g.x=-b);isAndroidDefault()&&(f.y=g.y);if(f.x==
g.x){var h=0;0>f.x&&(h+=180);return{rotate:h,pageTranX:0,maskTranX:f.x,maskTranY:0}}var k=Math.sqrt(Math.pow(g.y-c,2)+Math.pow(g.x-0,2)),h=Math.sqrt(Math.pow(f.y-c,2)+Math.pow(f.x-0,2));if(k>h){var l=Math.atan((g.y-c)/(g.x-0)),k=Math.abs(Math.sin(l)*h),h=Math.abs(Math.cos(l)*h);g.y=c-k;g.x=0<g.x?h:-h}k=Math.sqrt(Math.pow(g.y-0,2)+Math.pow(g.x-0,2));h=Math.sqrt(Math.pow(f.y-0,2)+Math.pow(f.x-0,2));k>h&&(l=Math.atan((g.y-0)/(g.x-0)),k=Math.abs(Math.sin(l)*h),h=Math.abs(Math.cos(l)*h),g.y=k,g.x=0<g.x?
h:-h);var m=(g.y-f.y)/(g.x-f.x),n=Math.atan(m),h=180*n/Math.PI,p=(g.x+f.x)/2,q=(g.y+f.y)/2,k=c/2,l=b/2,t=c/2;0>f.x&&(h+=180,l=-b/2);g=Math.sqrt(Math.pow(f.y-g.y,2)+Math.pow(f.x-g.x,2))/2;g=0<=h&&180>h?Math.abs((c-Math.abs(f.y))*Math.sin(n))+g:Math.abs(f.y*Math.sin(n))+g;c=Math.atan(b/c);d=Math.abs(g/(Math.sin(c+Math.abs(n))*d));d=Math.min(1,d);c=((p-l)*m+t+Math.pow(m,2)*q)/(1+Math.pow(m,2));f=m*(q-c)+p;t=Math.sqrt(Math.pow(l-f,2)+Math.pow(t-c,2));Math.abs(f)<Math.abs(l)&&(t=-t);return{frontShadowDistance:g,
shadowRate:d,rotate:h,pageTranX:t-b/2,maskTranX:f-0,maskTranY:c-k}},FlipBook=Class({coordinate_bottom_left:"bl",coordinate_top_left:"tl",coordinate_bottom_right:"br",coordinate_top_right:"tr",direction_left:"left",direction_right:"right",flipPageManager:null,maskWidth:0,create:function(b){this._super(b);this.flipPageManager=new FlipPageManager(this);this.toPageIndex=this.currentPageIndex;this.initBook();this.initEvent();this.flipIntervalManager=new FlipBookIntervalManager(this)},initBook:function(){this.flipBook=
$("<div class='book'></div>");this.resetPages(this.currentPageIndex);this.parent.append(this.flipBook)},resetPages:function(){},getBook:function(){return this.flipBook},addPageArray:function(b){if(b&&this.pageArray)for(var c=0;c<b.length;c++)if(!(0>=b[c]||b[c]>originTotalPageCount||(this.pageArray[b[c]]&&this.fillContent(b[c]),this.pageArray[b[c]]))){var d=this.newPage(b[c]);d.addAttachment();d.onResize(this.pageWidth,this.pageHeight);this.pageArray[b[c]]=d;this.fillContent(b[c]);this.flipBook.append(d.container)}},
onResize:function(b,c){this.resizeBook(b,c);this.resetPages(this.currentPageIndex);this.resizeAttachments(b,c)},resizeAttachments:function(b,c){},loading:function(){if(!this.flipping){var b=this.getCurrentPages();if(b&&!(0>=b.length))for(var c=b.length,d=0;d<c;d++)b[d]&&this.pageArray[b[d]]&&this.pageArray[b[d]].loading()}},fillContent:function(b){if(!this.flipping||imageLoaded[b])!bookConfig.preloadNextPage&&0>this.getCurrentPages().indexOf(b)||(this.pageArray[b]&&this.pageArray[b].fillContent(),
this.pageBackArray&&this.pageBackArray[b]&&this.pageBackArray[b].fillContent())},fillPage:function(b,c){if(b)for(var d=this.pageArray.length,f=0;f<d;f++)this.pageArray[f]&&this.pageArray[f].fillPage(b,c),this.pageBackArray&&this.pageBackArray[f]&&this.pageBackArray[f].fillPage(b,c)},removePage:function(b){!isNaN(b)&&this.pageArray[b]&&(this.pageArray[b].remove(),this.pageArray[b]=void 0)},unWrapPageExcludeArray:function(b){if(b&&this.pageArray)for(var c=this.pageArray.length,d=0;d<c;d++)!this.pageArray[d]||
0<=b.indexOf(d)||(this.pageArray[d].remove(),this.pageArray[d]=void 0)},unWrapPageBackExcludeArray:function(b){if(b&&this.pageBackArray)for(var c=this.pageBackArray.length,d=0;d<c;d++)!this.pageBackArray[d]||0<=b.indexOf(d)||(this.pageBackArray[d].remove(),this.pageBackArray[d]=void 0)},resizePage:function(b,c){if(this.pageArray)for(var d=this.pageArray.length,f=0;f<d;f++)if(this.pageArray[f])this.pageArray[f].onResize(b,c);if(this.pageBackArray)for(d=this.pageBackArray.length,f=0;f<d;f++)if(this.pageBackArray[f])this.pageBackArray[f].onResize(b,
c)},crossFlipMode:function(b,c){return!1},toSoftPage:function(b){return!0},toHardPage:function(b){return!1},toCoverPage:function(){return!1},isCoverPage:function(){return!1},isHardPage:function(){return!1},beforeFlipTo:function(b,c){var d=this.getFlipTo(b),f=d.minIndex,g=d.maxIndex,h=d.toIndex,k;this.setAttachmentBeforeFlipTo(h);"max"==d.flipTo&&(k=this.flipToMax(g,h,c,rightToLeft));"min"==d.flipTo&&(k=this.flipToMin(f,h,c,!rightToLeft));k.setPageZIndex(d);return k},afterFlipTo:function(b,c){if(b&&
b.downMask&&b.upMask){var d=b.downMask.pageIndex;this.flipPageManager.flipArray.removeElement(b.currentIndex+"-"+b.nextIndex);b.endFlipByIndex();this.flipPageManager.removeFlipArrayByIndex(b);this.checkFlipping();d<c?this.afterFlipToMax(c,!rightToLeft):this.afterFlipToMin(c,rightToLeft);this.setAttachmentAfterFlipTo(c)}},checkFlipping:function(){this.flipping=!1;this.flipPageManager.checkFlipping()?this.flipping=!0:(this.flipToDirection="",this.loading())},followToPoint:function(b,c,d){},endFlip:function(){this.flipPageManager&&
this.flipPageManager.endFlip()},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){if(b){void 0!=b.width&&this.flipBook.css("width",b.width+"px");void 0!=b.height&&this.flipBook.css("height",b.height+"px");void 0!=b.left&&this.flipBook.css("left",b.left+"px");void 0!=b.top&&this.flipBook.css("top",b.top+"px");void 0!=b.display&&this.flipBook.css("display",b.display);if(b.tran||void 0!=b.scale||b.origin){var c=transformCSS(b);this.flipBook.css(c)}this.flipBook.registerPatamers&&this.flipBook.registerPatamers(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")},translate:function(b,c){transformCSS({});this.flipBook.css(style)},supportSerialsFlip:function(){return isPhone()||isPad()?!1:!0},gotoPage:function(b,c){if(b&&(this.toPageIndex=b,!this.flipBook.parameters||!this.flipBook.parameters.zoomming))if(this.status_zoom&&(isPhone()||isPad())){var d={pointers:[{pageX:windowWidth/2,pageY:windowHeight/2}]};this.flipBook.onDoubleTap.bind(this.flipBook)(d)}else if(!(this.flipPageManager.beyondPageRange(b)||
this.flipPageManager.doNotMeetPageConditions(b)||(isPhone()||isPad()||this.status_zoom)&&this.flipping)){this.flipIntervalManager&&this.flipIntervalManager.flipInterval&&(this.flipIntervalManager.flipInterval.stop=!0,this.flipIntervalManager.flipInterval=void 0);var f=this.flipPageManager.beforeFlip(b,!0);fromPageIndex=this.currentPageIndex;var g=this.flipToDirection;!c&&flipHistory&&flipHistory.addFromCurrentIndex(b);this.flippingTo(b,c);playFlipSound();(function(){this.flipIntervalManager.flipIntervalTmp(f,
fromPageIndex,b,g)}).delay(this,50);1==b?(this.miniFullScreen||(this.miniFullScreen=new BookMiniFullscreen),this.miniFullScreen.init()):this.miniFullScreen&&this.miniFullScreen.remove()}},afterCurling:function(){},openShownSlider:function(){var b=BookInfo.getCurrentPages();if(void 0!=b&&null!=b)for(var c=0;c<b.length;c++){var d=b[c];this.pageArray[d]&&this.pageArray[d].playSlider()}},stopAllSlider:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].resetSlider()},
openShownMedia:function(){var b=BookInfo.getCurrentPages();if(void 0!=b&&null!=b)for(var c=0;c<b.length;c++){var d=b[c];this.pageArray[d]&&this.pageArray[d].enterSide()}},stopMedia:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].leaveSide()},hide:function(){Log.debug("normal book hide.");this.visible=!1;this.setCSS({display:"none"});this.stopMedia();this.stopAllSlider();this.bookMap&&this.bookMap.hide();this.controlBar&&this.controlBar.setVisible(!1);this.adContainer&&
this.adContainer.hide();this.miniFullScreen&&this.miniFullScreen.hide()},show:function(){Log.debug("normal book show.");this.visible=!0;this.setCSS({display:"block"});this.openShownSlider();this.openShownMedia();this.addHistoryTexts();this.addSearchHighlight();this.miniFullScreen&&this.miniFullScreen.show();this.bmt&&this.bmt.refresh();this.adContainer&&this.adContainer.show();this.adContainer&&1==this.currentPageIndex&&this.adContainer.setStyle({"z-index":3})},addHistoryTexts:function(){var b=[1];
try{b=BookInfo.getCurrentPages()}catch(c){b=[1]}for(var d=this.pageArray.length,f=0;f<d;f++)this.pageArray[f]&&this.pageArray[f].addHistoryTexts(b)},addSearchHighlight:function(){var b=this.currentPageIndex,b=0==b%2?b+1:b-1;this.pageArray[b]&&this.pageArray[b].highlightSearch();this.pageArray[b+1]&&this.pageArray[b+1].highlightSearch();this.pageArray[b-1]&&this.pageArray[b-1].highlightSearch();this.pageArray[b+2]&&this.pageArray[b+2].highlightSearch()},clearSearchHighlight:function(){for(var b=this.pageArray.length,
c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].clearHighlight()},destroy:function(){}}).extend(Book);bdor[41]=function(){return bdor[32](bdor[30](37,0),bdor[38]/bdor[40])}();
var ZoomMonitor=Class({options:void 0,target:void 0,beforeZoomIn:void 0,afterZoomIn:void 0,beforeZoomOut:void 0,afterZoomOut:void 0,beforePan:void 0,afterPan:void 0,create:function(){},register:function(b){this.options=b;this.target=b.target;this.beforeZoomIn=b.beforeZoomIn;this.afterZoomIn=b.afterZoomIn;this.beforeZoomOut=b.beforeZoomOut;this.afterZoomOut=b.afterZoomOut;this.beforePan=b.beforePan;this.afterPan=b.afterPan;this.target.zoom({zoomIn:this.beforeZoomIn,onPan:this.beforePan,zoomOut:this.afterZoomOut,
onZoomed:this.afterZoomIn})}});
FlipBook.expand({initEvent:function(){this.moveDirectionType={MOVE_LEFT:-1,MOVE_RIGHT:1,MOVE_NONE:0};this.mouseMoveDirection=this.moveDirectionType.MOVE_NONE;this.hammerEventModular();this.mouseWheelFlip()},hammerEventModular:function(){var b=new Hammer.Manager(this.flipBook[0]);b.add(new Hammer.Pan);b.add((new Hammer.Swipe).recognizeWith(b.get("pan")));b.add(new Hammer.Press);b.add(new Hammer.Pinch);b.add(new Hammer.Tap({event:"doubletap",taps:2}));b.add(new Hammer.Tap);b.on("panstart panmove",this.onPan.bind(this));
b.on("press",this.onPress.bind(this));b.on("tap",this.onTap.bind(this));this.flipBook.bind("mouseover mousemove",this.onOver.bind(this));this.flipBook.bind(_event._down,this.onDown.bind(this));$("body").bind(_event._end,this.onUp.bind(this));this.flipBook.speed(this.onSwipe.bind(this));bookConfig.ZoomButtonVisible&&(this.zoomMonitor=new ZoomMonitor,this.zoomMonitor.register({target:this.flipBook,beforeZoomIn:this.beforeZoomIn.bind(this),afterZoomIn:this.afterZoomIn.bind(this),beforePan:this.beforePan.bind(this),
afterPan:this.afterPan.bind(this),beforeZoomOut:this.beforeZoomOut.bind(this),afterZoomOut:this.afterZoomOut.bind(this)}));$(this.flipBook).bind("mouseup touchstart",function(b){onWindowClick(b)})},onDown:function(){this.status_zoom||this.isZoomming||(this.fingleDown=!0)},onUp:function(b){this.status_zoom||this.isZoomming||bookType!=this.bookType||(b=this.realPoint(b)[0],b=this.aroundCorner(b),this.fingleDown=!1,bookConfig.CurlingPageCorner&&b&&0<=b.indexOf("l")&&this.optionPage&&this.flipPageManager[this.optionPage]&&
this.flipPageManager[this.optionPage].AliceToRight||bookConfig.CurlingPageCorner&&b&&0<=b.indexOf("r")&&this.optionPage&&this.flipPageManager[this.optionPage]&&this.flipPageManager[this.optionPage].AliceToLeft||(this.optionPage&&(this.flipPageManager[this.optionPage]&&this.flipPageManager[this.optionPage].meetFlipCondition()&&this.pageDragToFlip(),this.flipPageManager[this.optionPage]&&(this.flipPageManager[this.optionPage].loosen=!0),this.optionPage=null),this.unCurling()))},onPinch:function(b){this.status_zoom||
this.isZoomming||this.status_zoom||this.status_resize||this.flipping||"pinchout"!=b.type||(this.endFlip(),this.zoomToPage(this.currentPageIndex))},onDoubleTap:function(b){if(!this.status_resize&&!this.flipping){var c=this.realPoint(b.srcEvent)[0];this.aroundCorner(c)||b.srcEvent[0].pageX>$("#flipBook").offset().left+$("#flipBook").outerWidth()||b.srcEvent[0].pageX<$("#flipBook").offset().left||b.srcEvent[0].pageY>$("#flipBook").offset().top+$("#flipBook").outerHeight()||b.srcEvent[0].pageY<$("#flipBook").offset().top||
(this.endFlip(),this.zoomToPage(this.currentPageIndex,b.srcEvent.pageX,b.srcEvent.pageY))}},onPan:function(b){if(!(this.status_zoom||this.isZoomming||bookType!=this.bookType||this.status_zoom||this.status_resize||this.flipping||this.flipPageManager.fallbackArray&&0<this.flipPageManager.fallbackArray.length)){var c=this.realPoint(b.srcEvent)[0],d=this.aroundCorner(c);this.optionPage?(this.flipPageManager[this.optionPage].toPoint=c,this.lastMousePoint&&(this.mouseMoveDirection=0<=c.x-this.lastMousePoint.x?
this.moveDirectionType.MOVE_RIGHT:this.moveDirectionType.MOVE_LEFT),this.lastMousePoint=c):("panstart"==b.type&&d||30<Math.abs(b.deltaX)&&(c.x<this.MiddleX&&0<b.deltaX||c.x>this.MiddleX&&0>b.deltaX))&&this.curling(c,d)}},onPress:function(b){if(!(this.status_zoom||this.isZoomming||bookType!=this.bookType||this.status_zoom||this.status_resize||this.flipping||this.flipPageManager.fallbackArray&&0<this.flipPageManager.fallbackArray.length)){b=this.realPoint(b.srcEvent)[0];var c=this.aroundCorner(b);this.optionPage?
this.flipPageManager[this.optionPage].toPoint=b:(c||(c=b.x>this.MiddleX?"r":"l"),this.curling(b,c))}},onRotate:function(b){},onSwipe:function(b,c){if(!this.status_zoom&&!this.isZoomming&&!this.dragToFlip){var d;d=30*windowWidth/1600;Math.abs(b)<=d||(b<-d?this.flipFromDirection(this.coordinate_bottom_right):b>d&&this.flipFromDirection(this.coordinate_bottom_left))}},onTap:function(b){if(this.status_zoom||this.isZoomming)onWindowTap(b.srcEvent);else if(bookType==this.bookType&&!this.status_zoom&&!this.status_resize){var c=
this.realPoint(b.srcEvent)[0];(c=this.aroundCorner(c))?this.flipFromDirection(c):onWindowTap(b.srcEvent)}},onOver:function(b){if(!(isPhone()||isPad()||this.status_zoom||this.isZoomming||bookType!=this.bookType||this.fingleDown)&&bookConfig.CurlingPageCorner){b=this.realPoint(b)[0];var c=this.aroundCorner(b);c?this.curling(b,c):(this.flipPageManager[this.optionPage]&&(this.flipPageManager[this.optionPage].loosen=!0),this.optionPage=null);this.unCurling()}},aroundCorner:function(b){this.edgeX();if(!(Math.abs(b.x)>
this.pageWidth-1||b.y>this.height-1||1>b.y||Math.abs(b.x)<0.8*this.pageWidth||b.y>0.2*this.height&&b.y<0.8*this.height)){var c=Math.sqrt(Math.pow(0.2*this.height,2)-Math.pow((this.pageWidth-Math.abs(b.x))*this.height/this.pageWidth,2));if(b.y<c&&b.x<this.MiddleX)return"tl";if(b.y<c&&b.x>this.MiddleX)return"tr";if(b.y>this.height-c&&b.x<this.MiddleX)return"bl";if(b.y>this.height-c&&b.x>this.MiddleX)return"br"}},pageDragToFlip:function(){this.flipPageManager[this.optionPage].toPoint.y=this.flipPageManager[this.optionPage].startPoint.y;
this.flipPageManager[this.optionPage].toPoint.x=-this.flipPageManager[this.optionPage].startPoint.x;this.mouseMoveDirection=this.moveDirectionType.MOVE_NONE;this.flipPageManager[this.optionPage].startToFlip();this.flipPageManager[this.optionPage].dragMoveToFlip=!0;this.flipToDirection=0>this.flipPageManager[this.optionPage].startPoint.x?"right":"left";this.tmpDragToFlipTimeout&&window.clearTimeout(this.tmpDragToFlipTimeout);this.dragToFlip=!0;this.tmpDragToFlipTimeout=window.setTimeout(function(){this.dragToFlip=
!1}.bind(this),500);this.getNextPage()},flipFromDirection:function(b){if(!(this.flipPageManager.fallbackArray&&0<this.flipPageManager.fallbackArray.length))if(0<=b.indexOf("l")){if(!this.flipping||this.flipToDirection!=this.direction_left){if(this.flipPageManager.pinDownCurlingArray&&0<this.flipPageManager.pinDownCurlingArray.length){b=this.flipPageManager.pinDownCurlingArray.length;for(var c=0;c<b;c++)if(this.flipPageManager.pinDownCurlingArray[c].AliceToLeft)return}this.flipToDirection=this.direction_right;
this.getNextPage()}}else if(0<=b.indexOf("r")&&(!this.flipping||this.flipToDirection!=this.direction_right)){if(this.flipPageManager.pinDownCurlingArray&&0<this.flipPageManager.pinDownCurlingArray.length)for(b=this.flipPageManager.pinDownCurlingArray.length,c=0;c<b;c++)if(this.flipPageManager.pinDownCurlingArray[c].AliceToRight)return;this.flipToDirection=this.direction_left;this.getNextPage()}},hidePages:function(){var b=this.pageArray.length,c=this.getCurrentPages();this.zoomPageArray=[];for(var d=
0;d<b;d++)this.pageArray[d]&&0>c.indexOf(d)&&this.pageArray[d].visible&&(this.zoomPageArray.push(this.pageArray[d]),this.pageArray[d].setVisible(!1))},showPages:function(){if(this.zoomPageArray){for(var b=this.zoomPageArray.length,c=0;c<b;c++)this.zoomPageArray[c]&&this.zoomPageArray[c].setVisible(!0);this.zoomPageArray=[]}},beforeZoomIn:function(){if(!isPhone()&&!isPad()){this.controlBar||(this.controlBar=bookType!=BookType.catalog_book?new ZoomControlBar(this.parent):new CatalogZoomControlBar(this.parent));
if(this.controlBar){var b="lite"==bookConfig.ToolbarViewMode&&bookType==BookType.catalog_book?50:0;this.controlBar.setPosition((windowWidth-this.controlBar.width)/2,toolBar.getTopHeight()+b+5);this.controlBar.setVisible(!0)}this.bookMap&&(this.bookMap.show(),this.bookMap.fillContent(this.currentPageIndex))}window.toolBar&&window.toolBar.btnZoom&&window.toolBar.changeZoomIcon(!1);this.status_zoom=!0;this.adContainer&&this.adContainer.setStyle({"z-index":1});this.hidePages();StateSynchronous.instance().findButtons("ZoomButton",
!0).each(function(b){b.setAsZoomout();b.executeCallback()});BookInfo.getBook().bmt&&BookInfo.getBook().bmt.hide()},beforeZoomOut:function(){},afterZoomOut:function(){this.adContainer&&1==this.currentPageIndex&&this.adContainer.setStyle({"z-index":3});this.status_zoom=!1;this.controlBar&&this.controlBar.setVisible(!1);this.bookMap&&this.bookMap.hide();if(isPhone()||isPad())this.showPages(),this.gotoPage(this.toPageIndex);window.toolBar&&window.toolBar.btnZoom&&window.toolBar.changeZoomIcon(!0);StateSynchronous.instance().findButtons("ZoomButton",
!0).each(function(b){b.setAsZoomin();b.executeCallback()});BookInfo.getBook().bmt&&BookInfo.getBook().bmt.show()},beforePan:function(){this.bookMap&&this.bookMap.refreshArea()},afterPan:function(){},curling:function(b,c){this.status_zoom||this.status_resize||(this.optionPage=this.curlingPage(b,c))&&(this.flipIntervalManager.flipInterval||this.flipIntervalManager.setFlipInterval())},curlingPage:function(b,c){var d,f,g,h;if(!c&&b.x<this.MiddleX||c&&0<=c.indexOf("l")){if(this.flipping&&"left"==this.flipToDirection)return;
f=this.realIndex(!1)[0];g=this.realIndex(!1)[1];d=f+"-"+g;h=!1}if(!c&&b.x>this.MiddleX||c&&0<=c.indexOf("r")){if(this.flipping&&"right"==this.flipToDirection)return;f=this.realIndex(!0)[0];g=this.realIndex(!0)[1];d=f+"-"+g;h=!0}if(!(!(d&&f&&g)||0>=f||f>originTotalPageCount||0>=g||g>originTotalPageCount||this.flipPageManager[d]&&this.flipPageManager[d].fallback||this.flipPageManager[d]&&this.flipPageManager[d].flipping)){var k=g;BookInfo.isDoublePage()&&(k=2*Math.floor(k/2)+1);if(passwardType()&&bookConfig.excludeFrontPages&&
k>parseInt(bookConfig.excludeFrontPages)&&!verifyPassward())passwardPannel.show();else return this.defineFlipPage(d,b,c,f,g,h),d}},defineFlipPage:function(b,c,d,f,g,h){!c||0>=f||f>originTotalPageCount||0>=g||g>originTotalPageCount||(d=this.getFromStartPointByCoordinate(c,d),this.flipPageManager[b]||(this.flipPageManager[b]=this.newFlipPage()),h?(this.flipPageManager[b].AliceToLeft=!0,this.flipPageManager[b].AliceToRight=!1):(this.flipPageManager[b].AliceToLeft=!1,this.flipPageManager[b].AliceToRight=
!0),this.flipPageManager[b].loosen=!1,this.flipPageManager[b].fromPoint=d[0],this.flipPageManager[b].startPoint=d[1],this.flipPageManager[b].toPoint=c,this.flipPageManager[b].downMask||this.flipPageManager[b].upMask||(this.beforeFlipTo(g),this.flipIntervalManager.flipToPoint(this.flipPageManager[b],f,g,this.pageWidth,this.pageHeight,this.maskWidth,this.flipPageManager[b].fromPoint,this.flipPageManager[b].startPoint,!0)),0>this.flipPageManager.pinDownCurlingArray.indexOf(b)&&this.flipPageManager.pinDownCurlingArray.push(b),
this.flipPageManager.fallbackArray.removeElement(b),this.flipPageManager.flipArray.removeElement(b))},unCurling:function(){if(!this.status_zoom&&!this.status_resize&&this.flipPageManager.array)for(var b=this.flipPageManager.array.length,c=0;c<b;c++){var d=this.flipPageManager.array[c];d==this.optionPage||!this.flipPageManager[d]||this.flipPageManager[d].fallback||this.flipPageManager[d].flipping||!this.flipPageManager[d].AliceToRight&&!this.flipPageManager[d].AliceToLeft||(this.flipPageManager[d].AliceToRight=
!1,this.flipPageManager[d].AliceToLeft=!1,this.flipPageManager[d].fallback=!0,this.flipPageManager[d].toPoint=this.flipPageManager[d].startPoint,0>this.flipPageManager.fallbackArray.indexOf(d)&&this.flipPageManager.fallbackArray.push(d),this.flipPageManager.pinDownCurlingArray.removeElement(d),this.flipPageManager.flipArray.removeElement(d))}},getFromStartPointByCoordinate:function(b,c){if(b){var d={x:0,y:0},f={x:0,y:0},g=b.y>this.pageHeight/2?b.y-5:b.y+5;0>b.x&&(d={x:-this.pageWidth,y:g});0<b.x&&
(d={x:this.pageWidth,y:g});c&&0<=c.indexOf("r")&&(d.x=this.pageWidth);c&&0<=c.indexOf("l")&&(d.x=-this.pageWidth);"tl"==c&&(d={x:-this.pageWidth,y:0});"bl"==c&&(d={x:-this.pageWidth,y:this.pageHeight});"tr"==c&&(d={x:this.pageWidth,y:0});"br"==c&&(d={x:this.pageWidth,y:this.pageHeight});f.x=d.x;f.y=d.y;return[d,f]}},realIndex:function(b){var c=2*parseInt(this.currentPageIndex/2);if(b&&!rightToLeft||!b&&rightToLeft)return[c+1,c+2];if(!b&&!rightToLeft||b&&rightToLeft)return[c,c-1]},getNextPage:function(){"right"==
this.flipToDirection&&!rightToLeft||"left"==this.flipToDirection&&rightToLeft?previousPageFun():nextPageFun()},realBookPosition:function(){var b=this.flipBook.offset().left,c=this.flipBook.offset().top;return[b,c]},realPoint:function(b){if((b=b.originalEvent&&b.originalEvent.changedTouches?b.originalEvent.changedTouches:b.changedTouches?b.changedTouches:[b])&&!(3<=b.length)){var c=this.realBookPosition()[0],d=this.realBookPosition()[1],f=b[0].pageX,g=b[0].pageY,f=f-c-this.pageWidth,g=g-d;if(!b[1])return[{x:f,
y:g}];var h=b[1].pageX;b=b[1].pageY;h=h-c-this.pageWidth;return[{x:f,y:g},{x:h,y:b-d}]}},mouseWheelFlip:function(){var b;this.flipBook.bind(_event._mousewheel,function(c){var d;void 0!=b&&150>new Date-b?d=!1:(b=new Date,d=!0);if(!d)return!1;d=c.originalEvent;d=Math.max(-1,Math.min(1,d.wheelDelta||-d.detail));this.status_zoom&&(0>d?this.controlBar&&this.controlBar.zoomDown():this.controlBar&&this.controlBar.zoomUp());!this.status_zoom&&bookConfig.mouseWheelFlip&&(0>d?nextPageFun():previousPageFun());
stopEvent(c);return!1}.bind(this))}});
var DoubleFlipBook=Class({newFlipPage:function(){return new DoubleFlipPage(this)},resetPages:function(b){isNaN(b)||0>=b||(b=2*parseInt(b/2),this.unWrapPageExcludeArray([b,b+1,b+2,b+3,b-1,b-2]),this.addPageArray([b,b+1,b+2,b+3,b-1,b-2]),this.currentPage=this.pageArray[b],this.currentPage2=this.pageArray[b+1],this.nextPage=this.pageArray[b+2],this.nextPage2=this.pageArray[b+3],this.previousPage=this.pageArray[b-1],this.previousPage2=this.pageArray[b-2],this.setPageCss(),this.loading())},setPageCss:function(){var b=
transformCSS({rotate:0,tran:{x:0,y:0}});this.currentPage&&(this.setZIndexByPageIndex(this.currentPage),this.currentPage.setCSSByStyle(b));this.previousPage&&(this.setZIndexByPageIndex(this.previousPage),this.previousPage.setCSSByStyle(b));this.previousPage2&&(this.setZIndexByPageIndex(this.previousPage2),this.previousPage2.setCSSByStyle(b));this.currentPage2&&(this.setZIndexByPageIndex(this.currentPage2),this.currentPage2.setCSSByStyle(b));this.nextPage&&(this.setZIndexByPageIndex(this.nextPage),
this.nextPage.setCSSByStyle(b));this.nextPage2&&(this.setZIndexByPageIndex(this.nextPage2),this.nextPage2.setCSSByStyle(b));rightToLeft?(this.currentPage&&this.currentPage.setLeftOrRight(!1),this.previousPage&&this.previousPage.setLeftOrRight(!1),this.previousPage2&&this.previousPage2.setLeftOrRight(!1),this.currentPage2&&this.currentPage2.setLeftOrRight(!0),this.nextPage&&this.nextPage.setLeftOrRight(!0),this.nextPage2&&this.nextPage2.setLeftOrRight(!0)):(this.currentPage&&this.currentPage.setLeftOrRight(!0),
this.previousPage&&this.previousPage.setLeftOrRight(!0),this.previousPage2&&this.previousPage2.setLeftOrRight(!0),this.currentPage2&&this.currentPage2.setLeftOrRight(!1),this.nextPage&&this.nextPage.setLeftOrRight(!1),this.nextPage2&&this.nextPage2.setLeftOrRight(!1))},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-left-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-right-side")):(this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-right-side"),
this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-left-side"));return[this.pageArray[b],this.pageArray[c]]},getDownUpPage:function(b,c){this.addPageArray([b,c]);this.pageArray[b]&&this.pageArray[b].beginToFlip();this.pageArray[c]&&this.pageArray[c].beginToFlip();this.pageArray[b]&&(this.pageArray[b].page.setCSSByName("right-flip-side"),this.setZIndexByPageIndex(this.pageArray[b]));this.pageArray[c]&&(this.pageArray[c].page.setCSSByName("flip-side"),this.pageArray[c].page.side.addClass("boxShadow"),
this.setZIndexByPageIndex(this.pageArray[c]));return[this.pageArray[b],this.pageArray[c]]},flipToMax:function(b,c,d,f){f=this.flipPageManager.initFlipPageByIndex(b,c,f);this.addPagesBeforeFlipToMax(c,d);this.pageArray[c+1]&&(this.pageArray[c+1].setLeftOrRight(rightToLeft),f.nextPage=this.pageArray[c+1]);this.setPagesStyleBeforeFlipToMax(c,d);this.deleteUnnecessaryPagesBeforeFlipToMax(b,c);return f},addPagesBeforeFlipToMax:function(b,c){this.addPageArray([b+1]);c&&this.supportSerialsFlip()&&this.addPageArray([b+
2,b+3])},setPagesStyleBeforeFlipToMax:function(b,c){c&&this.supportSerialsFlip()&&(this.pageArray[b+1]&&this.setZIndexByPageIndex(this.pageArray[b+1],b),this.pageArray[b+2]&&(this.setZIndexByPageIndex(this.pageArray[b+2],b),this.pageArray[b+2].setLeftOrRight(rightToLeft)),this.pageArray[b+3]&&(this.setZIndexByPageIndex(this.pageArray[b+3],b),this.pageArray[b+3].setLeftOrRight(rightToLeft)))},deleteUnnecessaryPagesBeforeFlipToMax:function(b,c){for(var d=c+4;d<=originTotalPageCount;d++)this.pageArray[d]&&
(this.pageArray[d].remove(),this.pageArray[d]=void 0);for(d=b+1;d<c;d++)this.pageArray[d]&&(this.pageArray[d].remove(),this.pageArray[d]=void 0)},afterFlipToMax:function(b,c){var d=2*parseInt(b/2);this.addPagesAfterFlipToMax(d);this.setPagesStyleAfterFlipToMax(d);this.deleteUnnecessaryPagesAfterFlipToMax(d)},addPagesAfterFlipToMax:function(b){this.addPageArray([b,b-1,b-2]);this.supportSerialsFlip()||this.addPageArray([b+2,b+3]);this.pageArray[b+1]&&this.fillContent(b+1);this.pageArray[b+2]&&this.fillContent(b+
2);this.pageArray[b+3]&&this.fillContent(b+3)},setPagesStyleAfterFlipToMax:function(b){this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b],b),this.pageArray[b].setLeftOrRight(!rightToLeft));this.pageArray[b-1]&&(this.setZIndexByPageIndex(this.pageArray[b-1],b),this.pageArray[b-1].setLeftOrRight(!rightToLeft));this.pageArray[b-2]&&(this.setZIndexByPageIndex(this.pageArray[b-2],b),this.pageArray[b-2].setLeftOrRight(!rightToLeft));this.supportSerialsFlip()||(this.pageArray[b+1]&&this.setZIndexByPageIndex(this.pageArray[b+
1]),this.pageArray[b+2]&&(this.setZIndexByPageIndex(this.pageArray[b+2]),this.pageArray[b+2].setLeftOrRight(rightToLeft)),this.pageArray[b+3]&&(this.setZIndexByPageIndex(this.pageArray[b+3]),this.pageArray[b+3].setLeftOrRight(rightToLeft)))},deleteUnnecessaryPagesAfterFlipToMax:function(b){for(b-=3;0<=b;b--)this.pageArray[b]&&(this.pageArray[b].remove(),this.pageArray[b]=void 0)},flipToMin:function(b,c,d,f){f=this.flipPageManager.initFlipPageByIndex(b,c,f);this.addPagesBeforeFlipToMin(c,d);this.pageArray[c-
1]&&(this.pageArray[c-1].setLeftOrRight(!rightToLeft),f.nextPage=this.pageArray[c-1]);this.setPagesStyleBeforeFlipToMin(c,d);this.deleteUnnecessaryPagesBeforeFlipToMin(b,c);return f},addPagesBeforeFlipToMin:function(b,c){this.addPageArray([b-1]);c&&this.supportSerialsFlip()&&this.addPageArray([b-2,b-3])},setPagesStyleBeforeFlipToMin:function(b,c){c&&this.supportSerialsFlip()&&(this.pageArray[b-1]&&this.setZIndexByPageIndex(this.pageArray[b-1],b),this.pageArray[b-2]&&(this.setZIndexByPageIndex(this.pageArray[b-
2],b),this.pageArray[b-2].setLeftOrRight(!rightToLeft)),this.pageArray[b-3]&&(this.setZIndexByPageIndex(this.pageArray[b-3],b),this.pageArray[b-3].setLeftOrRight(!rightToLeft)))},deleteUnnecessaryPagesBeforeFlipToMin:function(b,c){for(var d=c-4;0<=d;d--)this.pageArray[d]&&(this.pageArray[d].remove(),this.pageArray[d]=void 0);for(d=b-1;d>c;d--)this.pageArray[d]&&(this.pageArray[d].remove(),this.pageArray[d]=void 0)},afterFlipToMin:function(b,c){var d=2*parseInt(b/2)+1;this.addPagesAfterFlipToMin(d);
this.setPagesStyleAfterFlipToMin(d);this.deleteUnnecessaryPagesAfterFlipToMin(d)},addPagesAfterFlipToMin:function(b){this.addPageArray([b,b+1,b+2]);this.supportSerialsFlip()||this.addPageArray([b-2,b-3]);this.pageArray[b-1]&&this.fillContent(b-1);this.pageArray[b-2]&&this.fillContent(b-2);this.pageArray[b-3]&&this.fillContent(b-3)},setPagesStyleAfterFlipToMin:function(b){this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b],b),this.pageArray[b].setLeftOrRight(rightToLeft));this.pageArray[b+
1]&&(this.setZIndexByPageIndex(this.pageArray[b+1],b),this.pageArray[b+1].setLeftOrRight(rightToLeft));this.pageArray[b+2]&&(this.setZIndexByPageIndex(this.pageArray[b+2],b),this.pageArray[b+2].setLeftOrRight(rightToLeft));this.supportSerialsFlip()||(this.pageArray[b-1]&&this.setZIndexByPageIndex(this.pageArray[b-1]),this.pageArray[b-2]&&(this.setZIndexByPageIndex(this.pageArray[b-2]),this.pageArray[b-2].setLeftOrRight(!rightToLeft)),this.pageArray[b-3]&&(this.setZIndexByPageIndex(this.pageArray[b-
3]),this.pageArray[b-3].setLeftOrRight(!rightToLeft)))},deleteUnnecessaryPagesAfterFlipToMin:function(b){for(b+=3;b<=originTotalPageCount;b++)this.pageArray[b]&&(this.pageArray[b].remove(),this.pageArray[b]=void 0)},getFlipTo:function(b){var c=2*parseInt(this.currentPageIndex/2);b=2*parseInt(b/2);var d=c+1,f="";b>d&&(f="max");b+1<c&&(f="min",b+=1);return{flipTo:f,minIndex:c,maxIndex:d,toIndex:b}},getCurrentPages:function(){var b=2*parseInt(this.currentPageIndex/2);return[b,b+1]},getPagesByIndex:function(b){b=
2*parseInt(b/2);return[b,b+1]},movetoCenter:function(b,c,d){if(!this.status_zoom&&bookConfig.retainBookCenter&&!(1<b&&b<totalPageCount&&1<c&c<totalPageCount)){var f=-this.pageWidth/2,g=this.pageWidth/2;rightToLeft&&(f=this.pageWidth/2,g=-this.pageWidth/2);var h=0,k=0;1==b&&(h=f);b==totalPageCount&&(h=g);1==c&&(k=f);c==totalPageCount&&(k=g);b=2*this.pageWidth;void 0==d&&(d=b);isNaN(d)||(d={tran:{x:$.easing.easeInOutSine(null,d,h,k-h,b),y:0}},this.setCSS(d))}},edgeX:function(){this.MiddleX=0},getFromStartPointByIndex:function(b){var c=
2*parseInt(this.currentPageIndex/2),d=c+1;if(b!=d&&b!=c){var f={x:0,y:0},g={x:0,y:0},h=!1;if(b>d&&!rightToLeft||b<c&&rightToLeft)f={x:this.pageWidth,y:this.pageHeight},h=!0;if(b<c&&!rightToLeft||b>d&&rightToLeft)f={x:-this.pageWidth,y:this.pageHeight},h=!1;if(!this.flipping||!h||"right"!=this.flipToDirection)if(!this.flipping||h||"left"!=this.flipToDirection)return g.x=f.x,g.y=f.y,this.flipToDirection=h?"left":"right",[f,g]}},afterZoomIn:function(b){if(!isPhone()&&!isPad()&&(this.showPages(),b&&this.flipBook.parameters&&
!this.flipBook.parameters.resize)){this.flipBook.parameters.resize=!0;b=this.flipBook.offset().left;var c=this.flipBook.offset().top,d=this.flipBook.parameters.scale,f={tran:{x:b-this.flipBook.parameters.left,y:c-this.flipBook.parameters.top},scale:1,origin:{x:0,y:0}};1!=d&&this.resizeBook(parseInt(this.width*d/2),parseInt(this.height*d));this.status_zoom||(d=0,1==this.currentPageIndex&&bookConfig.retainBookCenter&&(d=rightToLeft?this.width/4:-this.width/4),this.currentPageIndex==totalPageCount&&
bookConfig.retainBookCenter&&(d=rightToLeft?-this.width/4:this.width/4),f.tran={x:d,y:0},f.left=b-d,f.top=c-0);this.setCSS(f);this.flipBook.parameters.tran=f.tran;this.flipBook.parameters.scale=1;this.flipBook.parameters.toScale=1;this.flipBook.parameters.width=$(this.flipBook).width();this.flipBook.parameters.height=$(this.flipBook).height();this.flipBook.parameters.origin={x:0,y:0};this.flipBook.parameters.resize=!1;this.bookMap&&this.bookMap.refreshArea()}},setZIndexByPageIndex:function(b,c){if(b){var d=
c?c:this.currentPageIndex,d=2*parseInt(d/2);b==this.pageArray[d+1]?b.setZIndex(2):b==this.pageArray[d+2]?b.setZIndex(1):b==this.pageArray[d+3]?b.setZIndex(0):b==this.pageArray[d]?b.setZIndex(2):b==this.pageArray[d-1]?b.setZIndex(1):b==this.pageArray[d-2]&&b.setZIndex(0)}},getFitWH:function(){this.getSpace(!1);var b=this.getSpace(!0),c=windowWidth-b.left-b.right,b=windowHeight-b.top-b.bottom,d=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/
100,f=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;return getPageWidthHeight(c,b,2*d,f)},getSpace:function(b){var c=bookConfig.leftMargin+toolBar.getLeftWidth(),d=bookConfig.rightMargin+toolBar.getRightWidth(),f=bookConfig.topMargin+toolBar.getTopHeight(),g=bookConfig.bottomMargin+toolBar.getBottomHeight();b&&(c+=bookConfig.hardCoverBorderWidth+totalThicknessWidth(),d+=bookConfig.hardCoverBorderWidth+totalThicknessWidth(),f+=bookConfig.hardCoverBorderWidth,
g+=bookConfig.hardCoverBorderWidth);return{left:c,right:d,top:f,bottom:g}}}).extend(FlipBook),SingleFlipBook=Class({pageBackArray:null,create:function(b){this.pageBackArray=[];this._super(b)},newFlipPage:function(){return new SingleFlipPage(this)},resetPages:function(b){isNaN(b)||0>=b||(this.unWrapPageBackExcludeArray([b,b+1]),this.unWrapPageExcludeArray([b,b+1]),this.addPageArray([b,b+1]),this.addPageBackArray([b]),this.currentPage=this.pageArray[b],this.currentPage2=this.pageBackArray[b],this.nextPage=
this.pageArray[b+1],this.previousPage=this.pageArray[b-1],this.previousPage2=this.pageBackArray[b-1],this.setPageCss(),this.loading())},setPageCss:function(){var b=transformCSS({rotate:0,tran:{x:0,y:0}});this.currentPage&&(this.setZIndexByPageIndex(this.currentPage),this.currentPage.setCSSByStyle(b));this.previousPage&&(this.setZIndexByPageIndex(this.previousPage),this.previousPage.setCSSByStyle(b));this.previousPage2&&(this.setZIndexByPageIndex(this.previousPage2),this.previousPage2.setCSSByStyle(b));
this.currentPage2&&(this.setZIndexByPageIndex(this.currentPage2),this.currentPage2.setCSSByStyle(b));this.nextPage&&(this.setZIndexByPageIndex(this.nextPage),this.nextPage.setCSSByStyle(b));rightToLeft?(this.currentPage&&this.currentPage.setLeftOrRight(!0),this.previousPage&&this.previousPage.setLeftOrRight(!0),this.previousPage2&&this.previousPage2.setLeftOrRight(!0),this.currentPage2&&this.currentPage2.setLeftOrRight(!0),this.nextPage&&this.nextPage.setLeftOrRight(!0)):(this.currentPage&&this.currentPage.setLeftOrRight(!1),
this.previousPage&&this.previousPage.setLeftOrRight(!1),this.previousPage2&&this.previousPage2.setLeftOrRight(!1),this.currentPage2&&this.currentPage2.setLeftOrRight(!1),this.nextPage&&this.nextPage.setLeftOrRight(!1))},addPageBackArray:function(b){if(b&&this.pageBackArray)for(var c=0;c<b.length;c++)if(!(0>=b[c]||b[c]>originTotalPageCount||(!this.pageBackArray[b[c]]||this.flipping&&!imageLoaded[b[c]]||this.fillContent(b[c]),this.pageBackArray[b[c]]))){var d=new this.newPageBack(b[c]);d.onResize(this.pageWidth,
this.pageHeight);d.mirrorSide();this.pageBackArray[b[c]]=d;this.flipping&&!imageLoaded[b[c]]||this.fillContent(b[c]);this.flipBook.append(d.container)}},getDownUpPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);this.pageArray[d]&&this.pageArray[d].beginToFlip();this.pageBackArray[d]&&this.pageBackArray[d].beginToFlip();this.pageArray[d]&&this.pageArray[d].page.setCSSByName("right-flip-side");this.pageBackArray[d]&&(this.pageBackArray[d].page.setCSSByName("flip-side"),
this.pageBackArray[d].page.side.addClass("boxShadow"));return[this.pageArray[d],this.pageBackArray[d]]},getDownUpHardPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);rightToLeft?(this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-left-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-right-side")):(this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-right-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-left-side"));
return[this.pageArray[d],this.pageBackArray[d]]},flipToMax:function(b,c,d){var f=this.flipPageManager.initFlipPageByIndex(b,c);this.addPagesBeforeFlipToMax(c,d);this.pageArray[c]&&(this.pageArray[c].setLeftOrRight(rightToLeft),f.nextPage=this.pageArray[c]);this.setPagesStyleBeforeFlipToMax(c,d);this.deleteUnnecessaryPagesBeforeFlipToMax(b,c);return f},addPagesBeforeFlipToMax:function(b,c){this.addPageArray([b]);c&&this.supportSerialsFlip()&&(this.addPageBackArray([b]),this.addPageArray([b+1]))},setPagesStyleBeforeFlipToMax:function(b,
c){c&&(this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b],b),this.pageArray[b].setLeftOrRight(rightToLeft)),this.pageBackArray[b]&&(this.setZIndexByPageIndex(this.pageBackArray[b],b),this.pageBackArray[b].setLeftOrRight(rightToLeft)),this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1],b),this.pageArray[b+1].setLeftOrRight(rightToLeft)))},deleteUnnecessaryPagesBeforeFlipToMax:function(b,c){for(var d=c+1;d<=originTotalPageCount;d++)this.pageBackArray[d]&&(this.pageBackArray[d]&&
this.pageBackArray[d].remove(),this.pageBackArray[d]=void 0);for(d=c+2;d<=originTotalPageCount;d++)this.pageArray[d]&&(this.pageArray[d]&&this.pageArray[d].remove(),this.pageArray[d]=void 0);for(d=b+1;d<c;d++)if(this.pageArray[d]||this.pageBackArray[d])this.pageArray[d]&&this.pageArray[d].remove(),this.pageBackArray[d]&&this.pageBackArray[d].remove(),this.pageArray[d]=void 0,this.pageBackArray[d]=void 0},afterFlipToMax:function(b){this.addPagesAfterFlipToMax(b);this.setPagesStyleAfterFlipToMax(b);
this.deleteUnnecessaryPagesAfterFlipToMax(b)},addPagesAfterFlipToMax:function(b){this.supportSerialsFlip()||(this.addPageArray([b]),this.addPageBackArray([b]),this.addPageArray([b+1]));this.pageArray[b+1]&&this.fillContent(b+1)},setPagesStyleAfterFlipToMax:function(b){this.pageArray[b-1]&&this.setZIndexByPageIndex(this.pageArray[b-1],b);this.pageBackArray[b-1]&&this.setZIndexByPageIndex(this.pageBackArray[b-1],b);this.supportSerialsFlip()||(this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b]),
this.pageArray[b].setLeftOrRight(rightToLeft)),this.pageBackArray[b]&&(this.setZIndexByPageIndex(this.pageBackArray[b]),this.pageBackArray[b].setLeftOrRight(rightToLeft)),this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1]),this.pageArray[b+1].setLeftOrRight(rightToLeft)))},deleteUnnecessaryPagesAfterFlipToMax:function(b){for(b-=2;0<=b;b--)if(this.pageArray[b]||this.pageBackArray[b])this.pageArray[b]&&this.pageArray[b].remove(),this.pageBackArray[b]&&this.pageBackArray[b].remove(),
this.pageArray[b]=void 0,this.pageBackArray[b]=void 0},flipToMin:function(b,c,d){var f=this.flipPageManager.initFlipPageByIndex(b,c);this.addPagesBeforeFlipToMin(c,d);this.pageArray[b]&&(f.nextPage=this.pageArray[b]);this.setPagesStyleBeforeFlipToMin(c);this.deleteUnnecessaryPagesBeforeFlipToMin(b,c);return f},addPagesBeforeFlipToMin:function(b,c){},setPagesStyleBeforeFlipToMin:function(b){},deleteUnnecessaryPagesBeforeFlipToMin:function(b,c){for(var d=b-1;d>c;d--)if(this.pageArray[d]||this.pageBackArray[d])this.pageArray[d]&&
this.pageArray[d].remove(),this.pageBackArray[d]&&this.pageBackArray[d].remove(),this.pageArray[d]=void 0,this.pageBackArray[d]=void 0},afterFlipToMin:function(b){this.addPagesAfterFlipToMin(b);this.setPagesStyleAfterFlipToMin(b);this.deleteUnnecessaryPagesAfterFlipToMin(b)},addPagesAfterFlipToMin:function(b){this.addPageArray([b+1])},setPagesStyleAfterFlipToMin:function(b){this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1]),this.pageArray[b+1].setLeftOrRight(rightToLeft))},deleteUnnecessaryPagesAfterFlipToMin:function(b){for(var c=
b+2;c<=originTotalPageCount;c++)if(this.pageArray[c]||this.pageBackArray[c])this.pageArray[c]&&this.pageArray[c].remove(),this.pageBackArray[c]&&this.pageBackArray[c].remove(),this.pageArray[c]=void 0,this.pageBackArray[c]=void 0;this.pageBackArray[b+1]&&(this.pageBackArray[b+1]&&this.pageBackArray[b+1].remove(),this.pageBackArray[b+1]=void 0)},getCurrentPages:function(){return[this.currentPageIndex]},getPagesByIndex:function(b){return[b]},movetoCenter:function(){},getFromStartPointByIndex:function(b){var c=
this.currentPageIndex;if(b!=c&&b!=c){var d={x:0,y:0},f={x:0,y:0},g=!1,d={x:this.pageWidth,y:this.pageHeight};rightToLeft&&(d={x:-this.pageWidth,y:this.pageHeight});if(b>c&&!rightToLeft||b<c&&rightToLeft)g=!0;if(b<c&&!rightToLeft||b>c&&rightToLeft)g=!1;b>c&&(f={x:d.x,y:this.pageHeight});b<c&&(f={x:-d.x,y:this.pageHeight});if(!this.flipping||!g||"right"!=this.flipToDirection)if(!this.flipping||g||"left"!=this.flipToDirection)return this.flipToDirection=g?"left":"right",[d,f]}},realBookPosition:function(){var b=
this.flipBook.offset().left-(rightToLeft?0:this.pageWidth),c=this.flipBook.offset().top;return[b,c]},edgeX:function(){this.MiddleX=this.pageWidth/2;rightToLeft&&(this.MiddleX=-this.pageWidth/2)},realIndex:function(b){var c=this.currentPageIndex;if(b&&!rightToLeft||!b&&rightToLeft)return[c,c+1];if(!b&&!rightToLeft||b&&rightToLeft)return[c,c-1]},getFromStartPointByCoordinate:function(b,c){if(b){var d={x:0,y:0},f={x:0,y:0},g=b.y>this.pageHeight/2?b.y-5:b.y+5;b.x<this.MiddleX&&(d.y=g,f.x=-this.pageWidth);
b.x>this.MiddleX&&(d.y=g,f.x=this.pageWidth);c&&0<=c.indexOf("r")&&(f.x=this.pageWidth);c&&0<=c.indexOf("l")&&(f.x=-this.pageWidth);"tl"==c&&(d.y=0);"bl"==c&&(d.y=this.pageHeight);"tr"==c&&(d.y=0);"br"==c&&(d.y=this.pageHeight);d.x=rightToLeft?-this.pageWidth:this.pageWidth;f.y=d.y;return[d,f]}},getFlipTo:function(b){var c=this.currentPageIndex,d="";b>c&&(d="max");b<c&&(d="min");return{flipTo:d,minIndex:c,maxIndex:c,toIndex:b}},afterZoomIn:function(b){if(!isPhone()&&!isPad()&&(this.showPages(),b&&
this.flipBook.parameters&&!this.flipBook.parameters.resize)){this.flipBook.parameters.resize=!0;b=this.flipBook.offset().left;var c=this.flipBook.offset().top;b-=this.flipBook.parameters.left;var c=c-this.flipBook.parameters.top,d=this.flipBook.parameters.scale;1!=d&&this.resizeBook(parseInt(this.width*d),parseInt(this.height*d));transformCSS({tran:{x:b,y:c},scale:1,origin:{x:0,y:0},obj:this.flipBook});this.flipBook.parameters.tran={x:b,y:c};this.flipBook.parameters.scale=1;this.flipBook.parameters.toScale=
1;this.flipBook.parameters.width=$(this.flipBook).width();this.flipBook.parameters.height=$(this.flipBook).height();this.flipBook.parameters.origin={x:0,y:0};this.flipBook.parameters.resize=!1;this.bookMap&&this.bookMap.refreshArea()}},setZIndexByPageIndex:function(b,c){if(b){var d=c?c:this.currentPageIndex;b==this.pageArray[d]?b.setZIndex(2):b==this.pageBackArray[d]?b.setZIndex(1):b==this.pageArray[d+1]?b.setZIndex(0):b.setZIndex(-1)}},getFitWH:function(){this.getSpace(!1);var b=this.getSpace(!0),
c=windowWidth-b.left-b.right,b=windowHeight-b.top-b.bottom,d=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/100,f=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;return getPageWidthHeight(c,b,d,f)},getSpace:function(b){var c=bookConfig.leftMargin+toolBar.getLeftWidth(),d=bookConfig.rightMargin+toolBar.getRightWidth(),f=bookConfig.topMargin+toolBar.getTopHeight(),g=bookConfig.bottomMargin+
toolBar.getBottomHeight();b&&(c+=rightToLeft?bookConfig.hardCoverBorderWidth:0,d+=rightToLeft?0:bookConfig.hardCoverBorderWidth,f+=bookConfig.hardCoverBorderWidth,g+=bookConfig.hardCoverBorderWidth);return{left:c,right:d,top:f,bottom:g}}}).extend(FlipBook),NormalBook=Class({bookType:BookType.normal_book,doublePage:!0,create:function(b){this._super(b);this.resetZoomArea()},initBook:function(){this._super();this.initAttachments()},initAttachments:function(){this.thicknessManager=new ThicknessManager(this.flipBook,
this);this.thicknessManager.refreshThickness();this.normalBookShadow=new BookShadow(this.flipBook);this.resetBookShadow(this.currentPageIndex);this.showOrHideGrayShadow(this.currentPageIndex);isTouchDevice()||new ZoomHint(this.parent);1==this.currentPageIndex&&(this.miniFullScreen||(this.miniFullScreen=new BookMiniFullscreen),this.miniFullScreen.init());void 0!=global.staticAd&&!0==staticAd.haveAd&&(this.adContainer=new StaticAd(this.flipBook));this.showPage=this.flipBook;this.bookMap||bookType==
BookType.catalog_book||isPad()||isPhone()||(this.bookMap=new ZoomMap(this),this.bookMap.fillContent(this.currentPageIndex));(function(){isPhone()||isPad()||(this.bmt=new BookmarkTab(this.flipBook))}).delay(this,1);setCurrentIndexTextField(this.currentPageIndex,!0)},showOrHideGrayShadow:function(b){if(!$.browser.msie&&!$.browser.safari&&bookConfig.ShowTopLeftShadow&&this.bookType==BookType.normal_book){if(!this.grayShadow){this.grayShadow=$("<div class='grayShadow'></div>");var c=$("<div class='kong edgeShadow' ></div>");
this.grayShadow.append(c);this.flipBook.append(this.grayShadow)}rightToLeft&&(b==totalPageCount||1==this.currentPageIndex||this.currentPageIndex==totalPageCount)||!rightToLeft&&(1==b||1==this.currentPageIndex||this.currentPageIndex==totalPageCount)?this.grayShadow.hide():this.grayShadow.show()}},resetBookShadow:function(b){1==b&&this.currentPageIndex==totalPageCount||b==totalPageCount&&1==this.currentPageIndex?this.normalBookShadow.hide():(this.normalBookShadow.doubleWidth(1!=b&&b!=totalPageCount&&
1!=this.currentPageIndex&&this.currentPageIndex!=totalPageCount),this.normalBookShadow.right(!rightToLeft&&(1==b||1==this.currentPageIndex)||rightToLeft&&(b==totalPageCount||this.currentPageIndex==totalPageCount)))},newPage:function(b){return new NormalPage(b,"page",!1,this.bookType,this.onBookPageLoaded.bind(this))},flippingTo:function(b){this.currentPageIndex=b;this.currentPageIndex=Math.max(1,this.currentPageIndex);this.currentPageIndex=Math.min(originTotalPageCount,this.currentPageIndex);setCurrentIndexTextField(this.currentPageIndex,
!0);setLocationHash(this.currentPageIndex);this.resetZoomArea()},resetZoomArea:function(){this.flipBook&&this.flipBook.parameters&&this.flipBook.parameters.zoomArea&&(this.flipBook.parameters.zoomArea=1!=this.currentPageIndex||bookConfig.RightToLeft?1==this.currentPageIndex&&bookConfig.RightToLeft?{left:0,top:0,right:50,bottom:0}:this.currentPageIndex!=totalPageCount||bookConfig.RightToLeft?this.currentPageIndex==totalPageCount&&bookConfig.RightToLeft?{left:50,top:0,right:0,bottom:0}:{left:0,top:0,
right:0,bottom:0}:{left:0,top:0,right:50,bottom:0}:{left:50,top:0,right:0,bottom:0})},afterCurling:function(){this._super();this.resetBookShadow(this.currentPageIndex);this.bmt&&this.bmt.adjustBar();this.thicknessManager.refreshThickness();this.showOrHideGrayShadow(this.currentPageIndex)},setAttachmentBeforeFlipTo:function(b){this.thicknessManager.setAttachmentBefore(b);this.adContainer&&this.adContainer.setStyle({"z-index":1});this.bmt&&this.bmt.setAttachmentBefore(b);this.resetBookShadow(b);this.showOrHideGrayShadow(b)},
setAttachmentAfterFlipTo:function(b){this.thicknessManager.refreshThickness();this.addHistoryTexts();this.stopMedia();this.stopAllSlider();this.addSearchHighlight();this.showOrHideGrayShadow(this.currentPageIndex);this.flipping||(this.openShownSlider(),this.openShownMedia(),this.resetBookShadow(this.currentPageIndex),this.normalBookShadow.show());bookConfig.ThumbnailsButtonVisible&&(thumbnail.clearHighLight(),thumbnail.setHighLight(this.currentPageIndex));this.bmt&&this.bmt.refresh();resizeBookAfterFlip&&
!this.flipping&&window.setTimeout(function(){onStageResize()},30);this.adContainer&&1==this.currentPageIndex&&this.adContainer.setStyle({"z-index":3});this.bookMap&&this.bookMap.fillContent(this.currentPageIndex)},resizeBook:function(b,c){this.endFlip();this.width=2*b;this.height=c;this.pageWidth=b;this.pageHeight=c;this.maskWidth=parseInt(Math.sqrt(b*b+c*c));0!=(this.maskWidth-this.height)%2&&(this.maskWidth+=1);this.setCSS({width:this.width,height:this.height});this.resizePage(this.pageWidth,this.pageHeight);
this.resetBookShadow(this.currentPageIndex)},resizeAttachments:function(b,c){if(this.bmt)this.bmt.onResize();if(this.miniFullScreen)this.miniFullScreen.onResize();this.thicknessManager&&this.thicknessManager.resizeAttachment(b,c);this.bookMap&&(this.bookMap.onResize(b,c),this.bookMap.refreshArea());var d=this.getCssLeft(),f=this.getCssTop();this.adContainer&&(this.adContainer.setStyle({left:d,top:f,width:b+"px",height:c+"px"}),this.adContainer.resize())},movetoCenter:function(b,c,d){this._super(b,
c,d);this.thicknessManager.followToPoint(b,c,d,!1)},resizeAttachmentAfterZoomIn:function(b){this.thicknessManager.resizeAttachment(this.width,this.height);if(this.bmt)this.bmt.onResize()},afterZoomIn:function(b){isPhone()||isPad()||!b||!this.flipBook.parameters||this.flipBook.parameters.resize||(this._super(b),this.resizeAttachmentAfterZoomIn(this.flipBook.parameters.scale))}}).extend(DoubleFlipBook),SingleBook=Class({bookType:BookType.single_book,doublePage:!1,create:function(b){this._super(b)},
initBook:function(){this._super();this.initAttachments()},initAttachments:function(){this.normalBookShadow=new BookShadow(this.flipBook);this.resetBookShadow();setCurrentIndexTextField(this.currentPageIndex,!1);isTouchDevice()||new ZoomHint(this.parent);this.miniFullScreen||(this.miniFullScreen=new BookMiniFullscreen);this.miniFullScreen.init();this.showPage=this.flipBook;this.bookMap||isPad()||isPhone()||(this.bookMap=new ZoomMap(this),this.bookMap.fillContent(this.currentPageIndex));(function(){isPhone()||
isPad()||(this.bmt=new BookmarkTab(this.flipBook,!0))}).delay(this,1)},newPage:function(b){return new NormalPage(b,"page",!0,BookType.single_book,this.onBookPageLoaded.bind(this))},newPageBack:function(b){return new NormalPage(b,"pageBack",!0,BookType.single_book)},setAttachmentBeforeFlipTo:function(b){},setAttachmentAfterFlipTo:function(b){this.stopMedia();this.stopAllSlider();this.flipping||(this.openShownSlider(),this.openShownMedia());this.bmt&&this.bmt.refresh();bookConfig.ThumbnailsButtonVisible&&
(thumbnail.clearHighLight(),thumbnail.setHighLight(this.currentPageIndex));resizeBookAfterFlip&&!this.flipping&&window.setTimeout(function(){onStageResize()},30);this.bookMap&&this.bookMap.fillContent(this.currentPageIndex)},resizeBook:function(b,c){this.endFlip();this.width=b;this.height=c;this.pageWidth=b;this.pageHeight=c;this.maskWidth=parseInt(Math.sqrt(b*b+c*c));0!=(this.maskWidth-this.height)%2&&(this.maskWidth+=1);this.flipBook.css({width:this.width+"px",height:this.height+"px"});this.resizePage(this.pageWidth,
this.pageHeight);this.resetBookShadow()},resizeAttachments:function(b,c){if(this.bmt)this.bmt.onResize();if(this.miniFullScreen)this.miniFullScreen.onResize();this.bookMap&&(this.bookMap.onResize(b,c),this.bookMap.refreshArea())},resetBookShadow:function(){this.normalBookShadow.doubleWidth(!0);this.normalBookShadow.right(!1)},flippingTo:function(b){this.currentPageIndex=b;this.currentPageIndex=Math.max(1,this.currentPageIndex);this.currentPageIndex=Math.min(originTotalPageCount,this.currentPageIndex);
setCurrentIndexTextField(this.currentPageIndex,!1);setLocationHash(this.currentPageIndex)}}).extend(SingleFlipBook),HardSide=Class({isHardPage:!0,create:function(b,c,d,f){this._super(b,c,d,f);this.isHard=!0;this.borderWidth=bookConfig.hardCoverBorderWidth;this.outerCoverBorder=bookConfig.outerCoverBorder||1!=b&&(b!=totalPageCount||b==totalPageCount&&d==BookType.single_book);this.container=this.side},initPageSide:function(){this.pageSide=$("<div class='pageSide'></div>");this.side.append(this.pageSide)},
initSide:function(){this.side=$("<div class='hardSide' style='background-color:"+bookConfig.borderColor+";'></div>")},addCoil:function(){parseBool(bookConfig.addPaperCoil)&&(this.midCoil=$("<div style='z-index:6;'></div>"),this.pageSide.append(this.midCoil))},resizePage:function(b,c){this.width=b+this.borderWidth;this.height=c+2*this.borderWidth;this.maskWidth=parseInt(Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2)));0!=(this.maskWidth-this.height)%2&&(this.maskWidth+=1);this.attachW=parseInt(100*
(this.outerCoverBorder?b:this.width)/(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight)));this.attachH=parseInt(100*(this.outerCoverBorder?c:this.height)/(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop)));this.pageSideWidth=this.outerCoverBorder?b:b+this.borderWidth;this.pageSideHeight=this.outerCoverBorder?c:c+2*this.borderWidth;this.side.css({width:this.width,height:this.height});this.tmpContent.css({width:this.attachW,height:this.attachH,
top:-this.attachH*parseFloat(bookConfig.visibleAreaTop)/100,left:-this.attachW*parseFloat(bookConfig.visibleAreaLeft)/100});this.pageSide.css({position:"absolute",top:this.outerCoverBorder?this.borderWidth:0,width:this.pageSideWidth,height:this.pageSideHeight});this.resizeSideImage()},setLeftOrRight:function(b){this._super(b);var c=b&&this.outerCoverBorder?this.borderWidth:0,d=bookConfig.cornerRound;b?(this.side.css({"border-radius":d+"px 0px 0px "+d+"px"}),1!=this.pageIndex&&2!=this.pageIndex&&this.pageIndex!=
totalPageCount&&this.pageIndex!=totalPageCount-1||this.side.css({"margin-top":-this.borderWidth+"px","margin-left":-this.borderWidth+"px"})):(this.side.css({"border-radius":"0px "+d+"px "+d+"px 0px"}),1!=this.pageIndex&&2!=this.pageIndex&&this.pageIndex!=totalPageCount&&this.pageIndex!=totalPageCount-1||this.side.css({"margin-top":-this.borderWidth+"px","margin-right":-this.borderWidth+"px"}));this.pageSide.css({left:c+"px"})},setFlipShadow:function(b,c){}}).extend(BookPage),HardCover=Class({create:function(b){this.parent=
b;this.borderWidth=bookConfig.hardCoverBorderWidth;this.rightToLeft=bookConfig.RightToLeft;this.cover=$("<div class='hardCover'></div>");this.initPage();this.initBookSpine();this.parent.append(this.cover)},initPage:function(){this.leftPage=new HardSide(this.rightToLeft?totalPageCount-1:2,"coverPage",BookType.normal_book);this.rightPage=new HardSide(this.rightToLeft?2:totalPageCount-1,"coverPage",BookType.normal_book);this.cover.append(this.leftPage.getSide());this.cover.append(this.rightPage.getSide());
this.leftPage.addAttachment();this.rightPage.addAttachment();this.leftPage.setLeftOrRight(!0);this.rightPage.setLeftOrRight(!1);this.leftPage.setCSSByStyle({top:"0",left:"0","margin-top":0,"margin-left":0});this.rightPage.setCSSByStyle({top:"0",right:"0","margin-top":0,"margin-right":0})},initBookSpine:function(){this.topSpine=new BookSpine(this.cover);this.bottomSpine=new BookSpine(this.cover);this.topSpine.setCSSByName("top_spine");this.bottomSpine.setCSSByName("botoom_spine")},onResize:function(b,
c,d){if(this.leftPage)this.leftPage.onResize(b,c);if(this.rightPage)this.rightPage.onResize(b,c);this.topSpine.onResize(d);this.bottomSpine.onResize(d);this.pageWidth=b;this.pageHeight=c;this.resizeCover(b,c,d)},resizeCover:function(b,c,d){this.thicknessWidthArray=d;this.width=2*b+(d[0]+d[1])+2*this.borderWidth;this.height=c+2*this.borderWidth;this.cover.css({width:this.width+"px",height:this.height+"px",left:-(this.borderWidth+d[0])+"px",top:-this.borderWidth+"px"})},getSensitiveIndex:function(){return{min:3,
max:totalPageCount-2}},refresh:function(b,c,d){this.refreshBookSpine(c);this.refreshPage(b,d);this.resizeCover(this.pageWidth,this.pageHeight,c)},refreshPage:function(b,c){var d=this.getSensitiveIndex().min,f=this.getSensitiveIndex().max;if(b<=d||b>=f){if(b<=d&&bookConfig.RightToLeft||!bookConfig.RightToLeft&&b>=f)this.rightPage&&this.rightPage.setVisible(!1),(c<f&&bookConfig.RightToLeft||c>d&&!bookConfig.RightToLeft)&&this.leftPage&&this.leftPage.setVisible(!0);if(b<=d&&!bookConfig.RightToLeft||
bookConfig.RightToLeft&&b>=f)this.leftPage&&this.leftPage.setVisible(!1),(c<f&&!bookConfig.RightToLeft||c>d&&bookConfig.RightToLeft)&&this.rightPage&&this.rightPage.setVisible(!0);this.hideBookSpine()}else this.showBookSpine(),this.leftPage&&this.leftPage.setVisible(!0),this.rightPage&&this.rightPage.setVisible(!0)},refreshBookSpine:function(b){this.topSpine.refresh(b);this.bottomSpine.refresh(b)},hideBookSpine:function(){this.topSpine.hide();this.bottomSpine.hide()},showBookSpine:function(){this.topSpine.show();
this.bottomSpine.show()},show:function(){this.cover.show()},hide:function(){this.cover.hide()}}),BookSpine=Class({create:function(b){this.parent=b;this.initSpine()},initSpine:function(){this.height=bookConfig.hardCoverBorderWidth;this.bookSpine=$("<div class='bookSpine'></div>");this.bookSpine.css({height:this.height,"background-color":bookConfig.borderColor});this.parent.append(this.bookSpine);this.addShadow()},addShadow:function(){this.leftShadow=$("<div class='left_shadow shadow'></div>");this.rightShadow=
$("<div class='right_shadow shadow'></div>");this.bookSpine.append(this.leftShadow);this.bookSpine.append(this.rightShadow)},refresh:function(b){this.onResize(b)},show:function(){this.bookSpine.show()},hide:function(){},setCSSByStyle:function(b){this.bookSpine.css(b)},setCSSByName:function(b){this.bookSpine.attr("class",b);this.bookSpine.addClass("bookSpine")},onResize:function(b){this.width=b[0]+b[1];this.bookSpine.css({width:this.width,"margin-left":-this.width/2+"px"})}}),HardBook=Class({bookType:BookType.normal_book,
create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&
0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toHardPage:function(b){return!1},toCoverPage:function(b){var c=this.currentPageIndex;return 0>[1,2,totalPageCount-1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},isHardPage:function(b,c){return!1},
isCoverPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2):this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1):b==totalPageCount?gotoPageFun(totalPageCount-1):1==b&&gotoPageFun(2)},initBook:function(){this._super();this.hardCover=new HardCover(this.flipBook)},newPage:function(b){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?new HardSide(b,"page",BookType.normal_book,this.onBookPageLoaded.bind(this)):
new NormalPage(b,"page",!1,BookType.normal_book,this.onBookPageLoaded.bind(this))},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!0),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!1),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-left-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-right-side")):
(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!1),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-right-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-left-side"));return[this.pageArray[b],this.pageArray[c]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&
this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){return this.thicknessManager.getThicknessWidth()},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},
resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(NormalBook),SingleHardCover=Class({initPage:function(){bookConfig.RightToLeft&&(this.leftPage=new HardSide(this.rightToLeft?bookConfig.totalPageCount:2,"coverPage",BookType.single_book));bookConfig.RightToLeft||
(this.rightPage=new HardSide(this.rightToLeft?2:bookConfig.totalPageCount,"coverPage",BookType.single_book));this.leftPage&&this.cover.append(this.leftPage.getSide());this.rightPage&&this.cover.append(this.rightPage.getSide());this.leftPage&&this.leftPage.addAttachment();this.rightPage&&this.rightPage.addAttachment();this.leftPage&&this.leftPage.setLeftOrRight(!0);this.rightPage&&this.rightPage.setLeftOrRight(!1);this.leftPage&&this.leftPage.setCSSByStyle({top:"0",left:"0","margin-top":0,"margin-left":0});
this.rightPage&&this.rightPage.setCSSByStyle({top:"0",right:"0","margin-top":0,"margin-right":0})},initBookSpine:function(){this.topSpine=new SingleBookSpine(this.cover);this.bottomSpine=new SingleBookSpine(this.cover);this.topSpine.setCSSByName("top_spine");this.bottomSpine.setCSSByName("botoom_spine")},getSensitiveIndex:function(){return{min:2,max:bookConfig.totalPageCount}},resizeCover:function(b,c,d){this.thicknessWidthArray=d;this.width=b+(d[0]+d[1])+this.borderWidth;this.height=c+2*this.borderWidth;
this.cover.css({width:this.width+"px",height:this.height+"px",left:(bookConfig.RightToLeft?-(this.borderWidth+d[0]):0)+"px",top:-this.borderWidth+"px"})}}).extend(HardCover),SingleBookSpine=Class({onResize:function(b){this.width=b[0]+b[1];this.bookSpine.css({width:this.width});bookConfig.RightToLeft?this.bookSpine.css({left:"auto",right:"0"}):this.bookSpine.css({right:"auto",left:"0"})}}).extend(BookSpine),SingleHardBook=Class({bookType:BookType.single_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=
this.currentPageIndex;return 1==c&&2!=b||2!=c&&1==b?!0:!1},toSoftPage:function(b){return 2==b||1==b?!1:!0},toHardPage:function(b){return!1},toCoverPage:function(b){return 1!=b?!1:!0},isCoverPage:function(b,c){var d=b;b>c&&(d=c);return 1==d||d==bookConfig.totalPageCount?!0:!1},isHardPage:function(b,c){return!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2):1==b&&gotoPageFun(2)},initBook:function(){this._super();this.hardCover=new SingleHardCover(this.flipBook)},newPage:function(b){1==
b||b==bookConfig.totalPageCount?(b=new HardSide(b,"page",BookType.single_book,this.onBookPageLoaded.bind(this)),b.setLeftOrRight(bookConfig.RightToLeft)):b=new NormalPage(b,"page",!0,BookType.single_book,this.onBookPageLoaded.bind(this));return b},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getThicknessWidth:function(){return[0,0]},getDownUpHardPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);
bookConfig.RightToLeft?(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!0),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!0),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-left-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-right-side")):(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!1),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!1),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-right-side"),this.pageBackArray[d]&&
this.pageBackArray[d].setCSSByName("flip-hard-left-side"));return[this.pageArray[d],this.pageBackArray[d]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},onResize:function(b,c){this._super(b,c)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,
c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(SingleBook),AlbumSide=Class({isHardPage:!0,create:function(b,c,d,f){this._super(b,c,d,f);this.isHard=!0},renderPage:function(){},setFlipShadow:function(b,c){var d=b.shadowRate?b.shadowRate:0,d=0.5>d?2*d:2*(1-d),f={"background-image":"none","box-shadow":"rgba(0,0,0,0.3) 0 0 2000px 5000px inset",
width:"100%",height:"100%",top:0,left:0};this.flipFrontShadow.css(f);this.flipFrontShadow.css({opacity:d});this.flipBackShadow.css(f);this.flipBackShadow.css({opacity:d});c?(this.flipBackShadow&&this.flipBackShadow.css({visibility:"hidden"}),this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"visible"})):(this.flipBackShadow&&this.flipBackShadow.css({visibility:"visible"}),this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"hidden"}))}}).extend(BookPage),AlbumBook=Class({bookType:BookType.normal_book,
create:function(b){this._super(b)},crossFlipMode:function(b){return!1},toSoftPage:function(b){return!1},toHardPage:function(b){return!0},isHardPage:function(b,c){return!0},toCoverPage:function(){return!1},isCoverPage:function(){return!1},gotoNearPage:function(b){},newPage:function(b){return new AlbumSide(b,"page",BookType.normal_book,this.onBookPageLoaded.bind(this))},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!0),this.pageArray[c]&&
this.pageArray[c].setLeftOrRight(!1),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-left-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-right-side")):(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!1),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-right-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-left-side"));return[this.pageArray[b],this.pageArray[c]]}}).extend(NormalBook),
AlbumHardBook=Class({bookType:BookType.normal_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){return!1},toHardPage:function(b){var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&
0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toCoverPage:function(b){var c=this.currentPageIndex;return 0>[1,2,totalPageCount-1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?
!1:!0},isHardPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!1:!0},isCoverPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2):this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1):b==totalPageCount?gotoPageFun(totalPageCount-1):1==b&&gotoPageFun(2)},initBook:function(){this._super();this.hardCover=new HardCover(this.flipBook)},newPage:function(b){return 1==b||
2==b||b==totalPageCount||b==totalPageCount-1?new HardSide(b,"page",BookType.normal_book,this.onBookPageLoaded.bind(this)):new AlbumSide(b,"page",BookType.normal_book,this.onBookPageLoaded.bind(this))},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!0),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!1),this.pageArray[b]&&
this.pageArray[b].setCSSByName("flip-hard-left-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-right-side")):(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!1),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-right-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-left-side"));return[this.pageArray[b],this.pageArray[c]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&
this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){return this.thicknessManager.getThicknessWidth()},onResize:function(b,c){this._super(b,c);
this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(NormalBook),SingleAlbumBook=Class({bookType:BookType.single_book,
create:function(b){this._super(b)},crossFlipMode:function(b){return!1},toSoftPage:function(b){return!1},toHardPage:function(b){return!0},isHardPage:function(b,c){return!0},toCoverPage:function(){return!1},isCoverPage:function(){return!1},gotoNearPage:function(b){},newPage:function(b){return new AlbumSide(b,"page",BookType.single_book,this.onBookPageLoaded.bind(this))},getDownUpHardPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);bookConfig.RightToLeft?(this.pageArray[d]&&
this.pageArray[d].setLeftOrRight(!0),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!0),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-left-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-right-side")):(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!1),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!1),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-right-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-left-side"));
return[this.pageArray[d],this.pageBackArray[d]]}}).extend(SingleBook),SingleAlbumHardBook=Class({bookType:BookType.single_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 1==c&&2!=b||2!=c&&1==b?!0:!1},toSoftPage:function(b){return!1},toHardPage:function(b){return 2==b||1==b?!1:!0},toCoverPage:function(b){return 1!=b?!1:!0},isCoverPage:function(b,c){var d=b;b>c&&(d=c);return 1==d||d==bookConfig.totalPageCount?!0:!1},isHardPage:function(b,c){var d=
b;b>c&&(d=c);return 1==d||d==bookConfig.totalPageCount?!1:!0},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2):1==b&&gotoPageFun(2)},initBook:function(){this._super();this.hardCover=new SingleHardCover(this.flipBook)},newPage:function(b){1==b||b==bookConfig.totalPageCount?(b=new HardSide(b,"page",BookType.single_book,this.onBookPageLoaded.bind(this)),b.setLeftOrRight(bookConfig.RightToLeft)):b=new AlbumSide(b,"page",BookType.single_book,this.onBookPageLoaded.bind(this));return b},
followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);bookConfig.RightToLeft?(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!0),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!0),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-left-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-right-side")):
(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!1),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!1),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-right-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-left-side"));return[this.pageArray[d],this.pageBackArray[d]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();
this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){return[0,0]},onResize:function(b,c){this._super(b,c)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(SingleBook),
zoom_icons={moveByPos:"iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp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3JTBCQAwDAK90v1XthOUQjBQ4j9HRBHbSmoprDlAd3zoDstP6C4cWxLpUNyRstNAkkAqoXCxR7I2JHtIsth8Pw6DgAcAAP//AwBCsgspjp7kPwAAAABJRU5ErkJggg=="};
bdor[500]=global.bdor[404];bdor[13]="p";
var ZoomControlBar=Class({create:function(b){this.moveByMousePosition=!1;this.moveByPositionUrl=this.getImageUrl("moveByPos");this.moveByDragUrl=this.getImageUrl("moveByDrag");this.initButtons();this.initBar(b);this.initEvent()},initButtons:function(){this.btnZoomUp=$("<div class='button' title='"+getLanguage("btnZoomIn","zoom in")+"'><img src='"+this.getImageUrl("ZU")+"'/></div>");this.btnZoomDown=$("<div class='button' title='"+getLanguage("btnZoomOut","zoom out")+"'><img src='"+this.getImageUrl("ZD")+
"'/></div>");this.btnZoomOut=$("<div class='button' title='"+getLanguage("btnZoomOut","zoom out")+"'><img src='"+this.getImageUrl("ZO")+"'/></div>");this.btnPre=$("<div class='button' title='"+getLanguage("btnPrePage","pre")+"'><img src='"+this.getImageUrl("PR")+"'/></div>");this.btnNext=$("<div class='button' title='"+getLanguage("btnNextPage","next")+"'><img src='"+this.getImageUrl("NE")+"'/></div>");this.btnMoveMode=$("<div class='button' title='"+getLanguage("btnPositionToMove","Move by mouse position")+
"'><img src='"+this.moveByPositionUrl+"'/></div>")},initBar:function(b){this.width=260;this.height=40;this.bar=$("<div class='zoomControlBar'></div>");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.bar.css({"background-color":bookConfig.toolbarColor});b.append(this.bar)},getImageUrl:function(b){return window.zoom_icons&&zoom_icons[b]?"data:image/png;base64,"+
zoom_icons[b]:uiBaseURL+b+".png"},setVisible:function(b){b&&this.buttonChangeColor();this.bar.css({display:b?"block":"none"})},buttonChangeColor:function(){this.hasChanged||(this.btnZoomUp.changeButtonColor(bookConfig.iconColor),this.btnZoomDown.changeButtonColor(bookConfig.iconColor),this.btnZoomOut.changeButtonColor(bookConfig.iconColor),this.btnPre.changeButtonColor(bookConfig.iconColor),this.btnNext.changeButtonColor(bookConfig.iconColor),this.btnMoveMode.changeButtonColor(bookConfig.iconColor),
this.hasChanged=!0)},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")},initEvent:function(){this.btnZoomUp.bind(_event._end,function(){this.zoomUp()}.bind(this));this.btnZoomDown.bind(_event._end,function(){this.zoomDown()}.bind(this));this.btnZoomOut.bind(_event._end,function(){this.zoomOut()}.bind(this));this.btnPre.bind(_event._end,function(){rightToLeft?nextPageFun():previousPageFun()});this.btnNext.bind(_event._end,function(){rightToLeft?
previousPageFun():nextPageFun()});this.btnMoveMode.bind(_event._end,function(){this.changeMoveMode()}.bind(this))},changeMoveMode:function(){!0==this.moveByMousePosition?(this.moveByMousePosition=!1,this.btnMoveMode.empty().append(getImage(this.moveByPositionUrl)).attr("title",getLanguage("btnPositionToMove","Move by mouse position"))):(this.moveByMousePosition=!0,this.btnMoveMode.empty().append(getImage(this.moveByDragUrl)).attr("title",getLanguage("btnDragToMove","Move by mouse drag")));this.btnMoveMode.changeButtonColor(bookConfig.iconColor)},
zoomUp:function(){var b=BookInfo.getBook().bookMap.book.showPage,c={pointers:[{pageX:windowWidth/2,pageY:windowHeight/2},{pageX:windowWidth/2,pageY:windowHeight/2}]};b.scale=b.parameters.toScale;b.parameters.origin=b.mathOrigin(b,c);b.originObj(b,b.parameters.origin);var d=Math.min(b.parameters.naturalWidth*b.maxScale/b.parameters.width,1.1*parseFloat(b.scale));1!=d&&b.animateToScale(b,d,c)},zoomDown:function(){var b=BookInfo.getBook().bookMap.book.showPage,c={pointers:[{pageX:windowWidth/2,pageY:windowHeight/
2},{pageX:windowWidth/2,pageY:windowHeight/2}]};b.scale=b.parameters.toScale;b.parameters.origin=b.mathOrigin(b,c);b.originObj(b,b.parameters.origin);var d=b.parameters.naturalWidth/b.parameters.width,f=0.9*parseFloat(b.scale);f<=d&&(b.parameters.zoomOut=!0);b.animateToScale(b,Math.max(d,f),c)},zoomOut:function(){var b=BookInfo.getBook().showPage;b.onDoubleTap.bind(b)({pointers:[{pageX:windowWidth/2,pageY:windowHeight/2}]});StateSynchronous.instance().findButtons("ZoomButton",!0).each(function(b){b.setAsZoomin();
b.executeCallback()})}}),CatalogZoomControlBar=Class({initBar:function(b){this.width=138;this.height=40;this.bar=$("<div class='zoomControlBar catalog'></div>");this.bar.append(this.btnPre);this.bar.append(this.btnZoomOut);this.bar.append(this.btnNext);this.bar.css({"background-color":bookConfig.toolbarColor});b.append(this.bar)}}).extend(ZoomControlBar),ZoomMap=Class({create:function(b){this.book=b;this.maxWidth=80;this.maxHeight=100;this.pageHeight=this.pageWidth=this.height=this.width=0;this.doublePage=
!1;this.init();this.initEvent()},init:function(){this.map=$("<div class='thumbnail_map'></div>");this.imageLeft=$("<img class='map_img map_img_left'></img>");this.imageRight=$("<img class='map_img map_img_right'></img>");this.mapCursor=$("<div class='map_cursor'></div>");this.map.append(this.imageLeft);this.map.append(this.imageRight);this.map.append(this.mapCursor);bookContainer.append(this.map)},show:function(){this.visible=!0;this.refreshArea();this.map.show()},hide:function(){this.visible=!1;
this.map.hide()},onResize:function(){bookConfig.largePageWidth/bookConfig.largePageHeight<this.maxWidth/this.maxHeight?(this.pageWidth=this.maxWidth,this.pageHeight=bookConfig.largePageHeight*this.maxWidth/bookConfig.largePageWidth):(this.pageHeight=this.maxHeight,this.pageWidth=bookConfig.largePageWidth*this.maxHeight/bookConfig.largePageHeight);this.height=this.pageHeight+2;this.width=this.book.doublePage?2*(this.pageWidth+1):this.pageWidth;var b=20+bookConfig.rightMargin,c=toolBar.getTopHeight()+
10+bookConfig.topMargin;this.map.css({left:"auto",right:b+"px",top:c,width:this.width+"px",height:this.height+"px"});$(".map_img").css({width:this.pageWidth+"px",height:this.pageHeight+"px"});this.doublePage=this.book.doublePage},fillContent:function(b){this.visible&&(b=BookInfo.getCurrentPages(),(this.doublePage=1<b.length)?(this.fillImage(this.imageLeft,b[0]),this.fillImage(this.imageRight,b[1]),this.imageLeft.show(),this.imageRight.show(),this.imageLeft.css({"border-right":"none"})):(this.fillImage(this.imageLeft,
b[0]),this.imageLeft.show(),this.imageRight.hide(),this.imageLeft.css({"border-right":"1px solid gray"})),this.width=this.pageWidth,this.doublePage&&(this.width=2*(this.pageWidth+1)),this.map.css({width:this.width+"px"}),$(".map_img").css({width:this.pageWidth+"px",height:this.pageHeight+"px"}))},fillImage:function(b,c){b&&fillImageAfterLoaded(c,"thumb",function(c){b.attr("src",c)})},refreshArea:function(){if(this.book.showPage){var b=this.book.showPage,c=b.width(),d=b.height(),f=getTransform(b[0]),
g=this.getBookPosition();!0==this.book.doublePage&&!1==this.doublePage&&(c/=2,b=BookInfo.getBook().getCurrentPageIndex(),BookInfo.isLeftPage(b,!0)||(g.left+=c));var b=-(g.left+f.x),h=-(g.top+f.y),f=h/d,g=(b+windowWidth)/c,d=(h+windowHeight)/d,c=Math.max(0,b/c),f=Math.max(0,f),g=Math.min(1,g),d=Math.min(1,d),b=this.width;this.mapCursor.css({left:c*b,top:f*this.height,width:(g-c)*b,height:(d-f)*this.height})}},getBookPosition:function(){var b=this.book.showPage.css("left"),b=parseInt(b.replace("px",
"")),c=this.book.showPage.css("top"),c=parseInt(c.replace("px",""));return{left:b,top:c}},initEvent:function(){var b=new Hammer.Manager(this.mapCursor[0]);b.add(new Hammer.Pan);b.on("panstart panmove panend pancancel",this.onPan.bind(this));$(this.book.showPage).bind(_event._move,function(b){var d=BookInfo.getBook();if(d.status_zoom&&!this.book.showPage.parameters.zoomming&&d.controlBar&&d.controlBar.moveByMousePosition){var d=this.book.showPage,f=d.width(),g=d.height(),h=b.pageX;b=b.pageY;f=h-h*
f/windowWidth;g=b-b*g/windowHeight;b={};b.origin=d.parameters.origin;b.scale=d.parameters.scale;f-=d.parameters.left;g-=d.parameters.top;b.tran={x:f,y:g};g=transformCSS(b);d.css(g);this.refreshArea()}}.bind(this))},onPan:function(b){if(b&&b.pointers&&1==b.pointers.length){var c=this.book.showPage.width()/this.width,d=this.book.showPage.height()/this.height,c=this.book.showPage.panForMove(this.book.showPage,-b.deltaX*c,-b.deltaY*d,!1);this.refreshArea();this.mapCursor.css({"background-color":"RGBA(245,225,135,0.8)",
cursor:"move"});if("panend"==b.type||"pancancel"==b.type)this.mapCursor.css({"background-color":"RGBA(250,240,185,0.5)",cursor:"default"}),this.book.showPage.setZoomParameters(this.book.showPage,c),this.book.showPage.restrictInBoundary(this.book.showPage,this.refreshArea.bind(this))}}}),SlideBookPage=Class({onPageLoaded:null,create:function(b,c,d,f){this.pageHeight=this.pageWidth=this.height=this.width=this.zIndex=0;this.pageIndex=b;this.pageArray=[];this.bookType=d;this.onPageLoaded=f;this.side=
$("<div class='slide_side'></div>");this.side.attr("id",c+b);this.init(b)},init:function(b){isNaN(b)||(this.pages=$("<div class='slide_pages'></div>"),this.initPages(b),this.setPageCss(),this.side.append(this.pages),this.initEvent())},initEvent:function(){this.adContainer&&this.adContainer.css({"z-index":1});isBelowIE9()?this.pages.IEZoom({side:this,zoomIn:this.zoomIn.bind(this),zoomOut:this.zoomOut.bind(this),onZoomed:this.onZoomed.bind(this)}):this.pages.zoom({side:this,zoomIn:this.zoomIn.bind(this),
zoomOut:this.zoomOut.bind(this),onZoomed:this.onZoomed.bind(this)})},zoomIn:function(){var b=BookInfo.getBook();b.status_zoom=!0;b.adContainer&&b.adContainer.css({"z-index":1});StateSynchronous.instance().findButtons("ZoomButton",!0).each(function(b){b.setAsZoomout();b.executeCallback()});window.toolBar&&window.toolBar.btnZoom&&window.toolBar.changeZoomIcon(!1)},zoomOut:function(){var b=BookInfo.getBook();b.status_zoom=!1;b.adContainer&&1==b.currentPageIndex&&b.adContainer.css({"z-index":3});b.gotoPage(b.toPageIndex);
StateSynchronous.instance().findButtons("ZoomButton",!0).each(function(b){b.setAsZoomin();b.executeCallback()});window.toolBar&&window.toolBar.btnZoom&&window.toolBar.changeZoomIcon(!0)},onZoomed:function(b){if(!isPhone()&&!isPad()&&b&&!this.pages.parameters.resize){this.pages.parameters.resize=!0;b=this.pages.offset().left;var c=this.pages.offset().top;b-=this.pages.parameters.left;var c=c-this.pages.parameters.top,d=this.pages.parameters.scale;1!=d&&(this.resizePages(parseInt(this.pageWidth*d),
parseInt(this.pageHeight*d)),d=1);d=transformCSS({tran:{x:b,y:c},scale:d,origin:{x:0,y:0}});this.pages.css(d);this.pages.parameters&&(this.pages.parameters.tran={x:b,y:c},this.pages.parameters.scale=1,this.pages.parameters.toScale=1,this.pages.parameters.width=$(this.pages).width(),this.pages.parameters.height=$(this.pages).height(),this.pages.parameters.origin={x:0,y:0},this.pages.parameters.resize=!1)}},initPages:function(b){b=2*b-1;index2=b-1;var c=rightToLeft?b:index2;b=rightToLeft?index2:b;this.addPageArray([c,
b]);this.leftPage=this.pageArray[c];this.rightPage=this.pageArray[b]},setPageCss:function(){var b=transformCSS({rotate:0,tran:{x:0,y:0}});!this.rightPage&&this.leftPage&&bookConfig.retainBookCenter&&bookConfig.showDoublePage?(this.leftPage.centerPage(),this.leftPage.setCSSByStyle(b)):!this.leftPage&&this.rightPage&&bookConfig.retainBookCenter?(this.rightPage.centerPage(),this.rightPage.setCSSByStyle(b)):(this.leftPage&&(this.leftPage.setLeftOrRight(!0),this.leftPage.setCSSByStyle(b)),this.rightPage&&
(this.rightPage.setLeftOrRight(!1),this.rightPage.setCSSByStyle(b)))},addPageArray:function(b){if(b&&this.pageArray)for(var c=0;c<b.length;c++)if(!(0>=b[c]||b[c]>originTotalPageCount||(this.pageArray[b[c]]&&this.fillContent(b[c]),this.pageArray[b[c]]))){var d=new BookPage(b[c],"page",this.bookType);d.addAttachment();d.hideMiddleAttachment();d.onResize(this.pageWidth,this.pageHeight);this.pageArray[b[c]]=d;this.fillContent(b[c]);this.pages.append(d.getSide())}},fillContent:function(b){this.pageArray[b]&&
this.pageArray[b].fillContent()},fillImage:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].fillContent()},remove:function(){this.side.remove();this.side=void 0},setCSSByStyle:function(b){this.side.css(b)},setCSSByName:function(b){this.side.addClass(b)},onResize:function(b,c){this.width=b;this.height=c;this.resetPages()},resetPages:function(){if(this.pages){var b=getPageWidthHeight(this.width,this.height,2*bookConfig.largePageWidth,bookConfig.largePageHeight),
c=2*parseInt(b.x/2),b=parseInt(b.y);this.resizePages(c,b);this.pages.css({left:(this.width-c)/2+"px",top:(this.height-b)/2+"px"});c=transformCSS({rotate:0,tran:{x:0,y:0}});this.pages.css(c)}},resizePages:function(b,c){if(this.pages){this.pageWidth=b;this.pageHeight=c;this.pages.css({width:this.pageWidth+"px",height:this.pageHeight+"px"});for(var d=this.pageWidth/2,f=this.pageHeight,g=0;g<this.pageArray.length;g++)if(this.pageArray[g])this.pageArray[g].onResize(d,f)}},loading:function(){for(var b=
0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].loading()},setLeftOrRight:function(b){this.isLeft=b},reset:function(){},getSide:function(){return this.side},setZIndex:function(b){this.zIndex=b;this.side.css({"z-index":b})},getZIndex:function(){return this.zIndex},enterSide:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].enterSide()},leaveSide:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].leaveSide()},
addHistoryTexts:function(b){for(var c=0;c<this.pageArray.length;c++)this.pageArray[c]&&this.pageArray[c].addHistoryTexts(b)},highlightSearch:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].highlightSearch()},clearHighlight:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].clearHighlight()},resetSlider:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].resetSlider()},playSlider:function(){for(var b=
0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].playSlider()},fillPage:function(b,c){for(var d=0;d<this.pageArray.length;d++)this.pageArray[d]&&this.pageArray[d].fillPage(b,c)}}),SingleSlideBookPage=Class({initPages:function(b){this.addPageArray([b]);this.page=this.pageArray[b]},resetPages:function(){if(this.pages){var b=getPageWidthHeight(this.width,this.height,bookConfig.largePageWidth,bookConfig.largePageHeight),c=parseInt(b.x),b=parseInt(b.y);this.resizePages(c,b);this.pages.css({left:(this.width-
c)/2+"px",top:(this.height-b)/2+"px"});c=transformCSS({rotate:0,tran:{x:0,y:0}});this.pages.css(c)}},resizePages:function(b,c){if(this.pages){this.pageWidth=b;this.pageHeight=c;this.pages.css({width:this.pageWidth+"px",height:this.pageHeight+"px"});for(var d=this.pageWidth,f=this.pageHeight,g=0;g<this.pageArray.length;g++)if(this.pageArray[g])this.pageArray[g].onResize(d,f)}},setPageCss:function(){var b=transformCSS({rotate:0,tran:{x:0,y:0}});this.page&&(this.page.centerPage(),this.page.setCSSByStyle(b))},
fillPage:function(b,c){this.page&&this.page.fillPage(b,c)}}).extend(SlideBookPage),SlideBook=Class({currentTranX:0,create:function(b){this._super(b);this.currentPageIndex=this.getRealBookIndex(b.currentPageIndex);this.mainPageIndex=this.getRealBookIndex(b.currentPageIndex);this.initBook();this.initEvent();this.showPage=this.pageArray[this.currentPageIndex].pages},initBook:function(){this.flipBook=$("<div class='SlideBook' id='SlideBook' ></div>");this.resetPages(this.currentPageIndex);this.parent.append(this.flipBook);
this.setCurrentIndexTextField()},getBook:function(){return this.flipBook},fillPage:function(b,c){if(b)for(var d=this.pageArray.length,f=0;f<d;f++)this.pageArray[f]&&this.pageArray[f].fillPage(b,c),this.pageBackArray&&this.pageBackArray[f]&&this.pageBackArray[f].fillPage(b,c)},resetPages:function(b){isNaN(b)||0>=b||(this.unWrapPageExcludeArray([b,b+1,b-1]),this.addPageArray([b,b+1,b-1]),this.loading(),this.currentPage=this.pageArray[b],this.nextPage=this.pageArray[b+1],this.previousPage=this.pageArray[b-
1],this.setPageCss())},addPageArray:function(b){if(b&&this.pageArray){for(var c=0;c<b.length;c++)if(!(0>=b[c]||b[c]>this.pageLength()||(this.pageArray[b[c]]&&this.fillContent(b[c]),this.pageArray[b[c]]))){var d=this.newPage(b[c]);d.onResize(this.width,this.height);this.pageArray[b[c]]=d;this.fillContent(b[c]);this.flipBook.append(d.getSide())}this.orderPages()}},setPagePosition:function(b,c){var d={left:c*windowWidth+"px"};this.pageArray[b]&&this.pageArray[b].setCSSByStyle(d)},orderPages:function(){this.sequenceList=
{};for(var b=this.pageArray.length,c=0,d=this.mainPageIndex+1;d<b;d++)this.pageArray[d]&&(rightToLeft?c--:c++,this.pageArray[d].sequence=c,this.sequenceList[c]=d,this.setPagePosition(d,c));c=0;for(b=this.mainPageIndex;0<b;b--)this.pageArray[b]&&(this.pageArray[b].sequence=c,this.sequenceList[c]=b,this.setPagePosition(b,c),rightToLeft?c++:c--)},setPageCss:function(){var b=transformCSS({rotate:0,tran:{x:0,y:0}});this.currentPage&&this.currentPage.setCSSByStyle(b);this.previousPage&&this.previousPage.setCSSByStyle(b);
this.nextPage&&this.nextPage.setCSSByStyle(b)},fillContent:function(b){(!this.flipping||imageLoaded[b])&&this.pageArray[b]&&this.pageArray[b].fillImage()},newPage:function(b){return new SlideBookPage(b,"slidePage",this.bookType,this.onBookPageLoaded.bind(this))},pageLength:function(){return bookConfig.totalPageCount},unWrapPageExcludeArray:function(b){if(b&&this.pageArray){for(var c=this.pageArray.length,d=0;d<c;d++)!this.pageArray[d]||0<=b.indexOf(d)||(this.pageArray[d].remove(),this.pageArray[d]=
void 0);this.orderPages()}},mouseWheelFlip:function(){if(bookConfig.mouseWheelFlip){var b;this.flipBook.bind(_event._mousewheel,function(c){var d;void 0!=b&&150>new Date-b?d=!1:(b=new Date,d=!0);if(!d)return!1;d=c.originalEvent;0>Math.max(-1,Math.min(1,d.wheelDelta||-d.detail))?nextPageFun():previousPageFun();stopEvent(c);return!1}.bind(this))}},flippingTo:function(b){this.currentPageIndex=b;this.currentPageIndex=Math.max(1,this.currentPageIndex);this.currentPageIndex=Math.min(originTotalPageCount,
this.currentPageIndex);this.setCurrentIndexTextField();setLocationHash(this.getRealPageIndex())},getRealPageIndex:function(){return this.currentPageIndex},getRealBookIndex:function(b){return b},gotoPage:function(b,c){if(!isNaN(b)){this.toPageIndex=b;if(this.status_zoom){var d={pointers:[{pageX:windowWidth/2,pageY:windowHeight/2}]},f=this.pageArray[this.currentPageIndex].pages;f.onDoubleTap.bind(f)(d);return!0}b=this.getRealBookIndex(b);0>=b||b>this.pageLength()||!this.flipEffect(b)||(!c&&flipHistory&&
flipHistory.addFromCurrentIndex(b),this.flippingTo(b),this.flipInterval&&this.flipInterval.stop(),this.refreshPages(b),this.flipIntervalTmp(b))}},flipEffect:function(b){return this.status_zoom||b==this.currentPageIndex||this.flipping?!1:!0},flipIntervalTmp:function(b){var c=this.currentTranX,d=this.getFlipToX(b);this.flipping=!0;var f=function(b,f,k){b<f?(b=(0,$.easing["easeInOut"+k])(null,b,c,d-c,f),this.setBookTranX(b)):(this.afterFlipTo(),this.flipInterval.stop())}.bind(this);this.flipInterval=
function(b,c){f(b,c,"Sine")}.animation(this,this.flippingTime)},refreshPages:function(b){this.setAttachmentBeforeFlipTo(b);if(!this.pageArray[b]){var c=this.getCurrentViewPageIndex(),d=this.currentTranX-this.width;(b>c||b<this.mainPageIndex)&&!rightToLeft&&(d=this.currentTranX);(b<c||b>this.mainPageIndex)&&rightToLeft&&(d=this.currentTranX);this.addPageArray([b]);this.setBookTranX(d)}this.showPage=this.pageArray[b].pages},getCurrentViewPageIndex:function(){var b=Math.abs(this.currentTranX),b=Math.floor(b/
this.width)+1+(b%this.width>this.width/2)?0:1,b=(0>=this.currentTranX?1:-1)*b;return this.sequenceList[b]},getFlipToX:function(b){return this.pageArray[b]&&this.pageArray[b].sequence?-this.pageArray[b].sequence*windowWidth:0},getCurrentTranX:function(){return this.currentTranX},setBookTranX:function(b){var c=transformCSS({rotate:0,tran:{x:b,y:0}});isBelowIE9()&&(c={left:b+"px"});this.setCSSByStyle(c);this.currentTranX=b},onResize:function(){this.resize();this.status_zoom=!1},resize:function(){this.endFlip();
this.resizeBook();this.resizePage(this.width,this.height);this.resetPages(this.currentPageIndex);this.resizeAdvertisement()},getTop:function(){return this.bookTop},resizeBook:function(){var b=global.toolBar&&global.toolBar.getHeight?global.toolBar.getHeight():0,c=global.toolBar&&global.toolBar.getTopHeight?global.toolBar.getTopHeight():0;this.width=windowWidth-bookConfig.leftMargin-bookConfig.leftMargin;this.height=windowHeight-bookConfig.topMargin-bookConfig.bottomMargin-b;this.bookTop=bookConfig.topMargin+
c;this.flipBook.css({width:this.width+"px",height:this.height+"px",left:bookConfig.leftMargin+"px",top:bookConfig.topMargin+c+"px"})},resizeAdvertisement:function(){var b=getPageWidthHeight(this.width,this.height,2*bookConfig.largePageWidth,bookConfig.largePageHeight);this.pageWidth=2*parseInt(b.x/2);this.pageHeight=parseInt(b.y);this.adContainer&&this.adContainer.css({left:(this.width-this.pageWidth)/2+"px",top:(this.height-this.pageHeight)/2+this.getTop()+"px",width:this.pageWidth/2+"px",height:this.pageHeight+
"px"});this.adInstance&&this.adInstance.resize()},resizePage:function(b,c){for(var d=this.pageArray.length,f=0;f<d;f++)if(this.pageArray[f])this.pageArray[f].onResize(b,c)},getHeight:function(){return this.height},getWidth:function(){return this.width},getScale:function(){return 1},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",""));rightToLeft&&(b+=d/2);this.adContainer=$("<div id='adContainer'></div>");
this.adContainer.css({position:"absolute","z-index":-1});this.adContainer.css({left:b+"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);this.adContainer&&1==this.currentPageIndex&&this.adContainer.css({"z-index":3})},checkFlipping:function(){this.flipping=!1;this.loading();this.fillContent(this.currentPageIndex)},afterFlipTo:function(){this.mainPageIndex=
this.currentPageIndex;this.resetPages(this.currentPageIndex);this.setBookTranX(0);this.checkFlipping();this.setAttachmentAfterFlipTo()},setAttachmentBeforeFlipTo:function(){this.adContainer&&this.adContainer.css({"z-index":1})},setAttachmentAfterFlipTo:function(){this.addHistoryTexts();this.stopMedia();this.stopAllSlider();this.addSearchHighlight();this.flipping||this.openShownSlider();this.flipping||this.openShownMedia();bookConfig.ThumbnailsButtonVisible&&thumbnail.clearHighLight();bookConfig.ThumbnailsButtonVisible&&
thumbnail.setHighLight(this.getRealPageIndex());resizeBookAfterFlip&&!this.flipping&&window.setTimeout(function(){onStageResize()},30);this.adContainer&&1==this.currentPageIndex&&this.adContainer.css({"z-index":3})},endFlip:function(){this.flipping=!1},loading:function(){this.flipping||this.pageArray[this.currentPageIndex]&&this.pageArray[this.currentPageIndex].loading()},getCurrentPageIndex:function(){return this.getRealPageIndex()},getCurrentPages:function(){return[this.currentPageIndex]},setCSSByStyle:function(b){this.flipBook.css(b)},
setShow:function(b){},hide:function(){Log.debug("slide book hide.");this.setCSSByStyle({display:"none"});this.stopMedia();this.stopAllSlider()},show:function(){Log.debug("slide book show.");this.setCSSByStyle({display:"block"});this.openShownSlider();this.openShownMedia();this.addHistoryTexts();this.addSearchHighlight()},addHistoryTexts:function(){var b=[1];try{b=BookInfo.getCurrentPages()}catch(c){b=[1]}for(var d=this.pageArray.length,f=0;f<d;f++)this.pageArray[f]&&this.pageArray[f].addHistoryTexts(b)},
addSearchHighlight:function(){var b=this.currentPageIndex;this.pageArray[b]&&this.pageArray[b].highlightSearch()},clearSearchHighlight:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].clearHighlight()},openShownSlider:function(){var b=this.currentPageIndex;this.pageArray[b]&&this.pageArray[b].playSlider()},stopAllSlider:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].resetSlider()},openShownMedia:function(){var b=
this.currentPageIndex;this.pageArray[b]&&this.pageArray[b].enterSide()},stopMedia:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].leaveSide()},destroy:function(){}}).extend(Book);
SlideBook.expand({initEvent:function(){this.moveDirectionType={MOVE_LEFT:-1,MOVE_RIGHT:1,MOVE_NONE:0};this.mouseMoveDirection=this.moveDirectionType.MOVE_NONE;this.hammerEventModular();this.mouseWheelFlip()},hammerEventModular:function(){var b=new Hammer.Manager(this.flipBook[0]);b.add(new Hammer.Pan);b.add((new Hammer.Swipe).recognizeWith(b.get("pan")));b.add(new Hammer.Press);b.add(new Hammer.Pinch);b.add(new Hammer.Tap({event:"doubletap",taps:2}));b.add(new Hammer.Tap);b.on("panstart panmove",
this.onPan.bind(this));b.on("press",this.onPress.bind(this));b.on("tap",this.onTap.bind(this));this.flipBook.bind("mouseover mousemove",this.onOver.bind(this));this.flipBook.bind(_event._down,this.onDown.bind(this));$("body").bind(_event._end,this.onUp.bind(this));this.flipBook.speed(this.onSwipe.bind(this))},onPan:function(b){},onPress:function(b){},onTap:function(b){onWindowTap(b.srcEvent)},onOver:function(b){},onDown:function(b){},onUp:function(b){},onSwipe:function(b,c){if(!this.status_zoom&&
!this.isZomming&&!this.dragToFlip){var d;d=30*this.width/1600;Math.abs(b)<=d||(b<-d?rightToLeft?previousPageFun():nextPageFun():b>d&&(rightToLeft?nextPageFun():previousPageFun()))}}});
var DoubleSlideBook=Class({getRealPageIndex:function(){var b=2*this.currentPageIndex-1;return b=Number.between(b,1,bookConfig.totalPageCount)},getRealBookIndex:function(b){b=parseInt(b/2)+1;return b=Number.between(b,1,bookConfig.totalPageCount)},setCurrentIndexTextField:function(){setCurrentIndexTextField(this.getRealPageIndex(),!0)},pageLength:function(){return parseInt(bookConfig.totalPageCount/2)+1},newPage:function(b){return new SlideBookPage(b,"slidePage",this.bookType,this.onBookPageLoaded.bind(this))}}).extend(SlideBook),
SingleSlideBook=Class({getRealPageIndex:function(){var b=this.currentPageIndex;return b=Number.between(b,1,bookConfig.totalPageCount)},getRealBookIndex:function(b){return b=Number.between(b,1,bookConfig.totalPageCount)},setCurrentIndexTextField:function(){setCurrentIndexTextField(this.getRealPageIndex(),!1)},pageLength:function(){return bookConfig.totalPageCount},newPage:function(b){return new SingleSlideBookPage(b,"slidePage",this.bookType,this.onBookPageLoaded.bind(this))}}).extend(SlideBook),PcDoubleSlideBook=
Class({bookType:BookType.slide_book,create:function(b){this._super(b)},initBook:function(){this._super();void 0!=global.staticAd&&!0==staticAd.haveAd&&this.insertStaticAd()}}).extend(DoubleSlideBook),PcSingleSlideBook=Class({bookType:BookType.singleSlide_book,create:function(b){this._super(b)}}).extend(SingleSlideBook),CatalogBook=Class({bookType:BookType.catalog_book,guidBarHeight:0,create:function(b){this._super(b)},crossFlipMode:function(b){if(!bookConfig.HardPageEnable)return!1;var c=this.currentPageIndex;
return 0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){if(bookConfig.HardInnerPageEnable)return!1;if(!bookConfig.HardPageEnable)return!0;var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&
0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toHardPage:function(b){if(!bookConfig.HardInnerPageEnable)return!1;var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},
toCoverPage:function(b){if(!bookConfig.HardPageEnable)return!1;var c=this.currentPageIndex;return 0>[1,2,totalPageCount-1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},isHardPage:function(b,c){return bookConfig.HardInnerPageEnable&&1!=b&&2!=b&&b!=totalPageCount&&b!=totalPageCount-1?!0:!1},isCoverPage:function(b,c){return bookConfig.HardPageEnable?
1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1:!1},gotoNearPage:function(b){bookConfig.HardPageEnable&&(1==this.currentPageIndex?gotoPageFun(2):this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1):b==totalPageCount?gotoPageFun(totalPageCount-1):1==b&&gotoPageFun(2))},initAttachments:function(){this._super();this.flipShotBarManager=new FlipShotBarManager(this.flipBook,this);this.flipShotBarManager.appendTo(this.flipBook);this.flipShotBarManager.refresh()},newPage:function(b){return 1!=
b&&2!=b&&b!=totalPageCount&&b!=totalPageCount-1||!bookConfig.HardPageEnable?bookConfig.HardInnerPageEnable?new AlbumSide(b,"page",BookType.catalog_book,this.onBookPageLoaded.bind(this)):new NormalPage(b,"page",!1,BookType.catalog_book,this.onBookPageLoaded.bind(this)):new HardSide(b,"page",BookType.catalog_book,this.onBookPageLoaded.bind(this))},setAttachmentBeforeFlipTo:function(b){this._super(b);this.flipShotBarManager.setVisibleByIndex(b)},setAttachmentAfterFlipTo:function(b){this._super(b);this.flipShotBarManager.refresh()},
afterCurling:function(){this._super();this.flipShotBarManager.refresh()},resizeAttachmentAfterZoomIn:function(b){this._super(b);this.flipShotBarManager.resizeAttachment(this.width,this.height,b)},getControlBarTop:function(){return"lite"==bookConfig.ToolbarViewMode.toLowerCase()?50:global.toolBar&&toolBar.getTopHeight?toolBar.getTopHeight()+5:5},beforeZoomIn:function(){this._super();thumbnail&&thumbnail.visible&&thumbnail.transparent&&thumbnail.transparent()},afterZoomOut:function(){this._super();
thumbnail&&thumbnail.visible&&thumbnail.noTransparent&&thumbnail.noTransparent()},onResize:function(b,c){this._super(b,c);this.flipShotBarManager.onResize(b,c)},getSpace:function(b){var c=bookConfig.leftMargin+toolBar.getLeftWidth(),d=bookConfig.rightMargin+toolBar.getRightWidth(),f=bookConfig.topMargin+toolBar.getTopHeight(),g=bookConfig.bottomMargin+toolBar.getBottomHeight();b&&(c+=Math.max(bookConfig.hardCoverBorderWidth+totalThicknessWidth(),this.flipShotBarManager.getWidth()),d+=Math.max(bookConfig.hardCoverBorderWidth+
totalThicknessWidth(),this.flipShotBarManager.getWidth()),f+=bookConfig.hardCoverBorderWidth,g+=bookConfig.hardCoverBorderWidth);return{left:c,right:d,top:f,bottom:g}}}).extend(NormalBook),CatalogSimpleBook=Class({create:function(b){this._super(b)},initBook:function(){this._super();this.guidBar=new GuidToolbar(this.parent);this.guidBarHeight=50},showOrHideLiteThumbnail:function(){this.flipPageManager.array&&0<this.flipPageManager.array.length||this.status_zoom||!0!=this.isFlipping&&!0!=this.isZomming&&
this.adjustBookPosition()},hideToolBarAndShowGuidBar:function(){this.status_zoom||!0==this.isFlipping||!0==this.isZomming||(this.guidBar&&this.guidBar.show(),toolBar&&toolBar.hide(),this.mode="simple",thumbnail&&thumbnail.visible&&thumbnail.show(),this.adjustBookPosition())},hideGuidBarAndShowToolBar:function(){this.status_zoom||!0==this.isFlipping||!0==this.isZomming||(this.guidBar&&this.guidBar.hide(),toolBar&&toolBar.show(),this.mode="complex",thumbnail&&thumbnail.visible&&thumbnail.show(),this.adjustBookPosition())},
adjustBookPosition:function(){this.pageWidthHeight=this.getFitWH();var b=this.getTranY(),c=this.pageWidthHeight.x/this.width,d=this.getTranX(c);this.pageWidthHeight.x==this.width&&0==b&&0==d||this.flipBook.animateToTransform.bind(this.flipBook)(c,{x:d,y:b},{x:50,y:0})},getTranX:function(b){if(!bookConfig.retainBookCenter)return 0;var c=0,d=this.width*b/4;1==this.currentPageIndex&&(c=rightToLeft?d:-d);this.currentPageIndex==totalPageCount&&(c=rightToLeft?-d:d);var d=this.getCssLeft(),f=this.getSpace(!0);
return c=f.left+(windowWidth-f.left-f.right-this.pageWidthHeight.x/b)/2-d+c},getTranY:function(){var b=this.getCssTop(),c=this.getSpace(!0);return c.top+(windowHeight-c.top-c.bottom-this.pageWidthHeight.y/scale)/2-b},getSpace:function(b){var c=bookConfig.leftMargin+toolBar.getLeftWidth(),d=bookConfig.rightMargin+toolBar.getRightWidth(),f=bookConfig.topMargin+(toolBar.visible?toolBar.getTopHeight():this.guidBarHeight),g=bookConfig.bottomMargin+toolBar.getBottomHeight();b&&(c+=Math.max(bookConfig.hardCoverBorderWidth+
totalThicknessWidth(),this.flipShotBarManager.getWidth()),d+=Math.max(bookConfig.hardCoverBorderWidth+totalThicknessWidth(),this.flipShotBarManager.getWidth()),f+=bookConfig.hardCoverBorderWidth,g+=bookConfig.hardCoverBorderWidth);return{left:c,right:d,top:f,bottom:g}}}).extend(CatalogBook);var cursor,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.hide()});this.showHideButton.append(b);this.buttonType=0;this.CreateNoteRemark();this.addItem(this.contentBox);this.addSonItem(this.background);this.changeCursor();
this.initEvent();this.background.css("display","none");this.showing=!1},CreateNoteRemark:function(){isPhone()||(global.noteCookie=new NoteCookie(tmpContainer),global.textRemark=new Remark,isBelowIE9()||(global.signature=new Signature(tmpContainer)),global.annotationShapes=window.AnnotationShapes,global.annotationImage=new AddImageFile(tmpContainer),global.textRemark.bindOnCreated(this,this.resetButton),global.noteCookie.bindOnCreated(this,this.resetButton),global.annotationShapes.bindOnCreated(this,
this.resetButton),global.annotationImage.bindOnCreated(this,this.resetButton),isBelowIE9()||global.signature.bindOnCreated(this,this.resetButton))},addItem:function(b){for(var c=this,d=this.buttonType=0;d<this.buttonCount;d++){var f=$("<div></div>"),g=$("<img/>");$(f).attr("buttonType",d);f.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"});g.css({"margin-left":"5px",
"margin-top":"3px",position:"absolute"});b.append(f);f.append(g);f.bind(_event._over,function(){$(this).removeClass();$(this).attr("class","item-enter")});f.bind(_event._end,function(){$(this).removeClass();$(this).attr("class","item-enter")});f.bind(_event._leave,function(){c.buttonType!=$(this).attr("buttonType")&&($(this).removeClass(),$(this).attr("class","item-transparent"))});switch(d){case 0:g.attr("src",uiBaseURL+"cursor.png");g.attr("title",getLanguage("tltCursor","cursor"));c.cursorButton=
f;$(f).bind(_event._down,function(){c.resetButton()});break;case 1:g.attr("src",uiBaseURL+"highligh.png");g.attr("title",getLanguage("tltAddHighlight","add highlight"));$(f).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=
f;break;case 2:g.attr("src",uiBaseURL+"remark.png");g.attr("title",getLanguage("tltAddTexts","add texts"));$(f).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=f;break;case 3:g.attr("src",uiBaseURL+"shape.png");g.attr("title",
getLanguage("tltAddShapes","add shapes"));$(f).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});$(f).bind(_event._over,function(){});$(f).bind(_event._leave,function(){3!=c.buttonType&&c.shapesPanelHide()});$(f).bind(_event._end,function(){c.shapesPanelShowOrHide()});c.shapeButton=
f;break;case 4:g.attr("src",uiBaseURL+"notesadd.png");g.attr("title",getLanguage("tltAddNotes","add notes"));$(f).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=f;break;case 5:g.attr("src",uiBaseURL+"addImage.png");g.attr("title",
getLanguage("tltAddImageFile","add image file"));$(f).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=f;break;case 6:g.attr("src",uiBaseURL+"signature.png"),g.attr("title",getLanguage("tltAddSignature","add signature")),$(f).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=f}}},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,
f=(parseInt(this.contentBox.css("width"))-this.itemWidth)/2+8;this.shapesPannel=$("<div></div>");this.shapesContentBox=$("<div></div>");this.shapesPannel.css({width:f+180+8,height:49,position:"absolute",left:c-f+"px",top:d+"px"});this.shapesContentBox.css({width:188,height:49,position:"absolute",left:f+"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 g=this;this.shapesPannel.bind(_event._end+" "+_event._enter,function(){g.shapesPanelShow()});for(b=0;4>b;b++){var f=$("<div></div>"),h=$("<img/>"),d=8,c=8+45*b;f.css({width:"37px",height:"33px",left:c+"px",top:d+"px",position:"absolute","border-radius":"2px"});h.css({"margin-left":"5px","margin-top":"3px",position:"absolute"});this.shapesContentBox.append(f);
f.append(h);switch(b){case 0:h.attr("src",uiBaseURL+"shapes_line.png");h.attr("title",getLanguage("tltAddLine","add line"));$(f).bind(_event._down,function(){g.clickShape();annotationShapes.addEvents("line");g.shapesPanelHide()});break;case 1:h.attr("src",uiBaseURL+"shapes_arrow.png");h.attr("title",getLanguage("tltAddArrow","add arrow"));$(f).bind(_event._down,function(){g.clickShape();annotationShapes.addEvents("arrow");g.shapesPanelHide()});break;case 2:h.attr("src",uiBaseURL+"shapes_rect.png");
h.attr("title",getLanguage("tltAddRect","add rect"));$(f).bind(_event._down,function(){g.clickShape();annotationShapes.addEvents("rect");g.shapesPanelHide()});break;case 3:h.attr("src",uiBaseURL+"shapes_ellipse.png"),h.attr("title",getLanguage("tltAddEllipse","add ellipse")),$(f).bind(_event._down,function(){g.clickShape();annotationShapes.addEvents("ellipse");g.shapesPanelHide()})}f.bind(_event._over,function(){$(this).removeClass();$(this).attr("class","item-enter")});f.bind(_event._end,function(){$(this).removeClass();
$(this).attr("class","item-transparent")});f.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"})},hide:function(){$(this.background).fadeOut(500);this.showing=!1;this.resetButton()},show:function(){$(this.background).fadeIn(500);this.showing=!0},showOrHide:function(){this.showing?this.hide():this.show()},getShowStatu:function(){return this.showing},
initEvent:function(){$(this.background).dragToMove(this.background)}});var phoneGotoPage=Class({create:function(b){this.mainColor=bookConfig.toolbarColor;this.menu=$("<div id='menu' style='position:absolute;width:100%;height:50px;z-index:98;bottom:-41px;'></div>");this.background=$("<div id='background' style='position:absolute;width:100%;height:50px;'></div>");this.contentBox=$("<div id='contentBox' class='phoneGotoPageContent' style='position:absolute;width:100%;height:50px;'></div>");this.background.css({background:this.mainColor,opacity:0.8});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"});this.backwardButton=$("<div class='btn' style='margin-left:-3px;'><img src=''/></div>");this.firstButton=$("<div class='btn'><img src=''/></div>");bookConfig.enablePageBack||this.firstButton.css({"margin-left":"-3px"});this.prevButton=$("<div class='btn'><img src=''/></div>");this.nextButton=
$("<div class='btn'><img src=''/></div>");this.lastButton=$("<div class='btn'><img src=''/></div>");this.forwardButton=$("<div class='btn'><img src=''/></div>");this.goButton=$("<div class='goBtn'><img src=''/></div>");this.setSrc(this.backwardButton.find("img"),"backward");this.setSrc(this.firstButton.find("img"),"firstPage");this.setSrc(this.prevButton.find("img"),"previousPage");this.setSrc(this.nextButton.find("img"),"nextPage");this.setSrc(this.lastButton.find("img"),"lastPage");this.setSrc(this.forwardButton.find("img"),
"forward");this.setSrc(this.goButton.find("img"),"goPage");this.inputButton=$("<div class='inputButton' style='width:100px;'><input id='currentPageIndexTextField' type='text'/></div>");bookConfig.enablePageBack&&this.contentBox.append(this.backwardButton);this.contentBox.append(this.firstButton);this.contentBox.append(this.prevButton);this.contentBox.append(this.inputButton);this.contentBox.append(this.nextButton);this.contentBox.append(this.lastButton);bookConfig.enablePageBack&&this.contentBox.append(this.forwardButton);
this.inputButton.append(this.goButton);$("#currentPageIndexTextField").css({padding:"0px","text-align":"center","border-width":"0px",background:"#aeaeb1",width:"70px","padding-right":"30px",height:"30px","border-radius":"0px",position:"absolute",color:bookConfig.pageNumColor,left:0,top:0})},setSrc:function(b,c,d){d&&""!=d?b.attr("src",d):phone_toolbar_icons&&phone_toolbar_icons[c]?b.attr("src","data:image/png;base64,"+phone_toolbar_icons[c]):b.attr("src",phoneBaseURL+c+".png");this.colorChanged=!1;
this.changeColor(b)},changeColor:function(b,c){this.changeIconColor(b,c)},changeIconColor:function(b,c){b&&(c||(c=Color(bookConfig.iconColor).toString()),this.colorChanged||b.changeButtonColor(c,!1,function(){this.colorChanged=!0}.bind(this)))},changeCaptionColor:function(b){if(this.fontColor||b)b||(b=this.fontColor.toString()),this.$caption&&this.$caption.css("color",b)},show:function(){this.menu.animate({bottom:40},300);this.visible=!0},hide:function(){this.menu.animate({bottom:-80},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),bookConfig.totalPageCount);gotoPageFun(b);return!1}.bind(this));this.backwardButton.bind(_event._end,function(){rightToLeft?flipHistory.forward():flipHistory.backward();return!1});this.forwardButton.bind(_event._end,function(){rightToLeft?flipHistory.backward():flipHistory.forward();return!1})}});var passwardPannel={show:function(){this.created||(this.initHtml(),this.initPrompt(),this.initEvent());this.background.show();this.view.show()},initHtml:function(){this.created=!0;this.background=$("<div class='passwardPannel-background'></div>");this.view=$("<div class='passwardPannel'></div>");this.icon=$("<div id='icon' class='icon'></div>");this.username=$("<input id='username' placeholder='"+getLanguage("lblName","Name")+"' class='username'></input>");this.passward=$("<input id='passward' type='password' placeholder='"+
getLanguage("lblPassword","Password")+"' class='passward'></input>");this.loginIn=$("<p id='loginIn' class='loginIn'>"+getLanguage("lblLogin","Login")+"</p>");this.cancleIn=$("<p id='cancleIn' class='cancleIn'>"+getLanguage("lblCancel","Cancel")+"</p>");this.passwardResult=$("<span id='passwardResult' class='passwardResult'></span>");this.view.append(this.icon);2==passwardType()&&(this.view.css("height","390px"),this.view.append(this.username));this.view.append(this.passward);this.view.append(this.loginIn);
this.view.append(this.cancleIn);this.view.append(this.passwardResult);$("body").append(this.background);$("body").append(this.view);this.icon.addCssSprite(phoneIconsURL[0],"passward",100,100,phoneIconInfo)},initPrompt:function(){if(bookConfig.passwardPrompt){this.prompt=$("<div class='prompt'></div>");this.arrow=$("<div class='arrow'></div>");this.prompt.html(bookConfig.passwardPrompt);this.view.append(this.prompt);this.view.append(this.arrow);this.prompt.width();var b=this.prompt.height(),c=this.passward.width();
this.passward.height();c+=58;b=this.arrow.top()-(b+15)/2;this.prompt.css({left:c+"px",top:(0<b?b:0)+"px"})}},initEvent:function(){this.background.bind(_event._down,function(b){b.stopPropagation()});this.background.bind(_event._move,function(b){b.stopPropagation()});this.background.bind(_event._end,function(b){b.stopPropagation()});this.cancleIn.bind(_event._end,function(){this.hide()}.bind(this));this.loginIn.bind(_event._end,function(){this.login()}.bind(this));this.prompt&&(this.passward.bind(_event._enter,
function(){this.prompt.show();this.arrow.show()}.bind(this)),this.passward.bind(_event._leave,function(){this.passward.is(":focus")?(this.prompt.show(),this.arrow.show()):(this.prompt.hide(),this.arrow.hide())}.bind(this)),this.passward.bind("focus",function(){this.prompt.show();this.arrow.show()}.bind(this)),this.passward.bind("blur",function(){this.prompt.hide();this.arrow.hide()}.bind(this)))},login:function(){verifyPassward()?(this.hide(),this.fillCurrentPageContent()):this.showResult()},fillCurrentPageContent:function(){for(var b=
BookInfo.getCurrentPages(),c=0;c<b.length;c++)BookInfo.getBook().fillPage(b[c]);thumbnail&&thumbnail.show&&thumbnail.fillContent&&thumbnail.fillContent()},hide:function(){this.background.hide();this.view.hide()},showResult:function(){document.getElementById("username")&&!this.username.val()?this.passwardResult.html(getLanguage("lblNoName","User name can not be empty.")):this.passward.val()?this.passwardResult.html(getLanguage("lblNoCorrectLogin","Please enter the correct user name and password.")):
this.passwardResult.html(getLanguage("lblNoPassword","Password can not be empty."))}};var MiniStyle=Class({statics:{isMini:function(){if((isPhone()||isPad())&&!isInTheFrame()||!bookConfig.MiniStyle||fullScreenApi.isFullScreen())return!1;var b=this.getMaxMiniWidthHeight();if(windowWidth>b.w&&windowHeight>b.h)return!1;this.init();return!0},getMaxMiniWidthHeight:function(){for(var b=bookConfig.maxWidthToSmallMode,c=bookConfig.maxHeightToSmallMode,d=window.location.search.split("&"),f=0;f<d.length;f++){var g=d[f].toLowerCase();0<=g.indexOf("maxwidthtosmallmode")&&(b=parseInt(g.substring(g.indexOf("maxwidthtosmallmode")+
19+1,g.length)));0<=g.indexOf("maxheighttosmallmode")&&(c=parseInt(g.substring(g.indexOf("maxheighttosmallmode")+20+1,g.length)))}return{w:b,h:c}},init:function(){this.caption||(this.caption=$("<a class='miniTitle'></a>"),this.caption.html(getLanguage("lblFullscreen","Click to view in fullscreen.")),tmpContainer.append(this.caption),this.initEvent())},initEvent:function(){isPhone()||isPad()?window.top!=window&&(this.caption.attr("href",window.location.href),this.caption.attr("target","blank")):(this.caption.attr("href",
"javascript:void(0);"),this.caption.bind(_event._down,function(){this.isMini()&&readAsFullscreen()}.bind(this)),this.caption.bind(_event._leave,function(){this.isMini()&&this.hide()}.bind(this)),bookContainer.bind("mousemove",function(b){this.isMini()&&b.pageX>windowWidth/2-25&&b.pageX<windowWidth/2+25&&b.pageY>windowHeight/2-25&&b.pageY<windowHeight/2+25&&this.show()}.bind(this)))},hide:function(){this.caption&&this.caption.animate({opacity:0},200,function(){this.caption.hide()}.bind(this))},show:function(){this.caption&&
(this.caption.show(),this.caption.animate({opacity:1},200))},destroy:function(){this.caption&&(this.caption.remove(),this.caption=void 0)}}});var FlipHistory=Class({create:function(){this.array=[];this.currentIndex=0},backward:function(){var b=this.currentIndex-1;void 0!=this.array[b]&&(this.currentIndex=b,gotoPageFun(this.array[b].index,!0))},forward:function(){var b=this.currentIndex+1;void 0!=this.array[b]&&(this.currentIndex=b,gotoPageFun(this.array[b].index,!0))},addFromCurrentIndex:function(b){this.array=this.array.slice(0,this.currentIndex+1);this.array.push({index:b});this.currentIndex=this.array.length-1},push:function(b){this.array.push({index:b})}}),
flipHistory=new FlipHistory;Log.debug("browser : %s, system : %s",Instance.JSON($.browser),Instance.JSON($.system));jQuery(document).ready(function(){window.waitForLoading?window.setTimeout(function(){main()},250):main()});
function main(){selectLanguage(bookConfig.language);isBelowIE8()?alert(getLanguage("infNotSupportHtml5","Your browser can not support HTML5.")):global.bookConfig?(initBrowserType(),initConfig(),initStage()):(alert(getLanguage("msgConfigMissing","Configuration file is missing, unable to open the book.")),function(){window.location=window.location.href}.delay(500))}
function initBrowserType(){$.browser.webkit&&(global.browserType=BrowserType.WEBKIT);$.browser.mozilla&&(global.browserType=BrowserType.MOZ);$.browser.opera&&(global.browserType=BrowserType.OPERA);$.browser.msie&&(global.browserType=BrowserType.MS)}
function initConfig(){checkBookConfig();global.bookType=bookConfig.showDoublePage?0:1;global.rightToLeft=parseBool(bookConfig.RightToLeft,!1);global.originTotalPageCount=parseInt(bookConfig.totalPageCount);global.totalPageCount=originTotalPageCount+(1==originTotalPageCount%2?1:0);if(!global.ols||0>=global.ols.length)global.ols=[],bookConfig.TableOfContentButtonVisible=!1;global.bmtConfig||(global.bmtConfig=[]);initImageBaseUrl()}
function initImageBaseUrl(){global.uiBaseURL=bookConfig.UIBaseURL;uiBaseURL&&"string"==typeof uiBaseURL&&(uiBaseURL.endsWith("/")||(uiBaseURL+="/"));global.phoneBaseURL=uiBaseURL+"style/phoneIcon/";global.soundBaseURL=uiBaseURL+"style/raw/";global.mbBaseURL=uiBaseURL+"style/mb_icon/";global.uiBaseURL=uiBaseURL+"style/icon/"}
function initStage(){$.browser.device==$.browser.DEVICE_PAD&&$("html").css({height:window.innerHeight+"px"});global.pageIndexTextField=$("#currentPageIndexTextField");global.tmpContainer=$("<div id= 'tmpContainer' class='tmpContainer'></div>");global.bookContainer=$("<div id= 'bookContainer' class='bookContainer'></div>");$("body").append(tmpContainer);tmpContainer.append(bookContainer);global.windowWidth=$("body").width();global.windowHeight=$("body").height();global.onBookLoad=new LoadingBook(tmpContainer,
bookConfig.loadingBackground);preloadImages()}
function preloadImages(){global.toolBarIconsURL=[uiBaseURL+"previous_normal.png",uiBaseURL+"next_normal.png"];global.phoneIconsURL=[phoneBaseURL+"phone_icon.png"];var b=function(b){jsLoadingBar&&jsLoadingBar.destroy();onBookLoad.chooseBookStyle()},c=function(b){jsLoadingBar&&jsLoadingBar.destroy();onBookLoad.chooseBookStyle();setTimeout(function(){window.scrollTo(0,1)},0)};isPhone()||isPad()?$(window).loader(phoneIconsURL,c):$(window).loader(toolBarIconsURL,b)}
function init(){initToolbar();initBook();initComponents();changeShowBook(bookType);onStageResize();scrapURL();setPageIndexTextField();controlAudioVolume();addGoogleAdSense();googleAnalytics();winodwDynamicResize();initEvents();global.initBookValues&&initBookValues();onBookReady()}function onBookReady(){global.flipPageAudio&&flipPageAudio.start()};function initToolbar(){!isSlideBook()||isPhone()||isPad()||"lite"!=bookConfig.ToolbarViewMode||(global.toolBar=new PCSlideToolbar(tmpContainer));if(isPhone()||isPad())global.toolBar=new PhoneToolbar(tmpContainer);global.toolBar||(global.toolBar=new PCToolbar(tmpContainer));global.toolBar&&toolBar.show()}function initBook(){var b=scrapOriginPageIndex();flipHistory&&flipHistory.push(b);initFlipBook(b);initCatalogBook(b);initSlideBook(b)}
function scrapOriginPageIndex(){var b=bookConfig.OriginPageIndex,c=window.location.hash;""!=c&&3<c.length&&"#p="==c.substr(0,3)&&(b=parseInt(getRealPageNumber(c.substr(3,c.length-3))));b=Math.max(1,b);return b=Math.min(originTotalPageCount,b)}bdor[42]=function(){return bdor[33](bdor[32](37,33)+10,36)}();
function initFlipBook(b){if(bookType==BookType.normal_book||bookType==BookType.single_book)isPhone()||isPad()||toolBar.show(),bookConfig.HardInnerPageEnable?bookConfig.HardPageEnable?(global.flipBook=new AlbumHardBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}),global.singlePageBook=new SingleAlbumHardBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft})):(global.flipBook=new AlbumBook({parent:bookContainer,
currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}),global.singlePageBook=new SingleAlbumBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft})):bookConfig.HardPageEnable?(global.flipBook=new HardBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}),global.singlePageBook=new SingleHardBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,
rightToLeft:rightToLeft})):(global.flipBook=new NormalBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}),global.singlePageBook=new SingleBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}))}
function initCatalogBook(b){bookType==BookType.catalog_book&&("lite"==bookConfig.ToolbarViewMode.toLowerCase()?(global.catalogBook=bookConfig.HardPageEnable?new CatalogSimpleHardBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}):new CatalogSimpleBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}),toolBar.hide()):global.catalogBook=bookConfig.HardPageEnable?new CatalogHardBook({parent:bookContainer,
currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}):new CatalogBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}))}
function initSlideBook(b){if(bookType==BookType.slide_book||bookType==BookType.singleSlide_book)global.slideBook=new PcDoubleSlideBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}),global.singleSlideBook=new PcSingleSlideBook({parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:rightToLeft}),(isPhone()||isPad())&&toolBar.hide()}
function initComponents(){if(isPhone()||isPad()){bookConfig.SearchButtonVisible&&(global.frmSearch=new PhoneSearchForm({parent:tmpContainer,formType:"search",rightToLeft:rightToLeft}));bookConfig.TableOfContentButtonVisible&&(global.frmTableOfContent=new PhoneTableOfContentForm({parent:tmpContainer,formType:"tableOfContent",rightToLeft:rightToLeft}));bookConfig.ShareButtonVisible&&(global.sharePanel=new PhoneShareForm({parent:tmpContainer,formType:"share",rightToLeft:rightToLeft}));bookConfig.BookMarkButtonVisible&&
(global.bookmark=new PhoneBookmarkForm({parent:tmpContainer,formType:"bookmark",rightToLeft:rightToLeft}));bookConfig.PrintButtonVisible&&(global.printBody=new PhonePrintForm({parent:tmpContainer,formType:"print",rightToLeft:rightToLeft}));language&&1<language.length&&(global.languagePanel=new PhoneLanguageForm({parent:tmpContainer,formType:"language",rightToLeft:rightToLeft}));if(bookConfig.BackgroundSoundButtonVisible||bookConfig.FlipSound)global.phoneSettingBody=new PhoneSettingForm({parent:tmpContainer,
formType:"setting",rightToLeft:rightToLeft});bookConfig.ThumbnailsButtonVisible&&!global.thumbnail&&(global.thumbnail=new PhoneThumbnailForm(tmpContainer))}else bookConfig.PrintButtonVisible&&(global.printBody=new PcPrintForm({parent:tmpContainer,formType:"print",rightToLeft:rightToLeft})),bookConfig.HelpButtonVisible&&(global.helpBody=new PcHelpForm({parent:tmpContainer,formType:"help",rightToLeft:rightToLeft})),bookConfig.aboutButtonVisible&&(global.aboutBody=new PcAboutForm({parent:tmpContainer,
formType:"about",rightToLeft:rightToLeft})),bookConfig.ShareButtonVisible&&(global.sharePanel=new PcShareForm({parent:tmpContainer,formType:"share",rightToLeft:rightToLeft})),1<language.length&&(global.languagePanel=new PcLanguageForm({parent:tmpContainer,formType:"language",rightToLeft:rightToLeft})),bookConfig.VideoButtonVisible&&(global.videoGallery=new PcVideoGalleryForm({parent:tmpContainer,formType:"videoGallery",rightToLeft:rightToLeft},global.videoList)),bookConfig.SlideshowButtonVisible&&
(global.photoGallery=new PhotoGallery(tmpContainer,global.slideshow)),bookConfig.TableOfContentButtonVisible&&(global.frmTableOfContent=new PcTableOfContentForm({parent:tmpContainer,formType:"tableOfContent",rightToLeft:rightToLeft})),bookConfig.SearchButtonVisible&&(global.frmSearch=new PcSearchForm({parent:tmpContainer,formType:"search",rightToLeft:rightToLeft})),bookConfig.ThumbnailsButtonVisible&&("catalog"==bookConfig.FlipStyle.toLowerCase()&&"lite"==bookConfig.ToolbarViewMode.toLowerCase()&&
(global.thumbnail=new CatalogThumbnailBar(tmpContainer)),isSlideBook()&&"lite"==bookConfig.ToolbarViewMode.toLowerCase()&&(global.thumbnail=new SlideThumbnailBar(tmpContainer)),global.thumbnail||(global.thumbnail=new ThumbnailForm({parent:tmpContainer,formType:"thumbnail",rightToLeft:rightToLeft}))),!isBelowIE9()&&bookConfig.BookMarkButtonVisible&&(global.bookmark=new PcBookmarkForm({parent:tmpContainer,formType:"bookmark",rightToLeft:rightToLeft})),initLogoBar();!isPhone()&&bookConfig.AnnotationButtonVisible&&
(global.annotationPannel=new AnnotationPannel(tmpContainer));bookConfig.QRCode&&(global.QRcode=new CodeBar(tmpContainer),global.QRbutton=new QRButton(tmpContainer));initFlipSound();global.backgroundObj=new initBackground(tmpContainer);bookConfig.flipshortcutbutton&&(global.flipShotButton=new FlipShotButton(tmpContainer));global.auto_player=new AutoFlip;global.bgSound=new BackgroundSound;global.volumeControlBar=new VolumeControlBar(tmpContainer);global.flipPageAudio=new FlipByAudio(tmpContainer,global.flipByAudio)}
function winodwDynamicResize(){if(isTouch)$(window).on("orientationchange",function(){onStageResize.delay(200)});$(window).resize(onStageResize);isHigherThanIOS8()&&window.setInterval(function(){if(windowHeight!=window.innerHeight||windowWidth!=window.innerWidth)windowHeight=window.innerHeight,windowWidth=window.innerWidth,onStageResize()},1E3)}
function scrapURL(){var b=window.location.hash;""!=b&&3<b.length&&"#p="==b.substr(0,3)?window.setTimeout(function(){var c=parseInt(getRealPageNumber(b.substr(3,b.length-3)));gotoPageFun(c);TurnonAutoFlip()},1E3):(gotoPageFun(1),TurnonAutoFlip());0<=window.location.search.indexOf("fullscreen=true")&&function(){toolBar&&toolBar.btnFullscreen&&toolBar.btnFullscreen.trigger(_event._end);$(document).trigger(fullScreenApi.fullScreenEventName)}.delay(this,50)}
var resizeBySearchInput=function(){(isPhone()||isPad())&&global.foldingMenu&&global.foldingMenu.visible&&$("body").width()},totalThicknessWidth=function(){if(!BookInfo.isDoublePage())return 0;var b=Math.min(bookConfig.totalPageCount,100),b=$.easing.easeOutQuad(null,b,0,30,100),b=Math.floor(b),c=Math.max(windowHeight-bookConfig.topMargin-bookConfig.bottomMargin-toolBar.getHeight(),1),c=Math.min(1,c/800),c=$.easing.swing(null,Math.max(b-8,0),1,c-1,22);return b*c};
function onStageResize(b){resizeBySearchInput()||(global.resizeBookAfterFlip=!1,bookType==BookType.normal_book&&flipBook&&flipBook.flipping||bookType==BookType.single_book&&singlePageBook.flipping||bookType==BookType.catalog_book&&catalogBook&&catalogBook.flipping?resizeBookAfterFlip=!0:($("html").css({height:window.innerHeight+"px",width:window.innerWidth+"px"}),global.windowWidth=$("body").width(),global.windowHeight=$("body").height(),resizeToolBar(),changeShowBookByWindow(),resizePlugin(),resizeAttachments()))}
function resizeAttachments(){global.foldingMenu&&foldingMenu.resize(windowWidth,windowHeight);if(global.phoneSearch)global.phoneSearch.onResize();if(global.phoneShare)global.phoneShare.onResize();if(global.phoneTableOfContent)global.phoneTableOfContent.onResize();if(global.phonePrintBody)global.phonePrintBody.onResize();if(global.printBody)printBody.onResize();if(global.helpBody)helpBody.onResize();if(global.aboutBody)aboutBody.onResize();if(global.sharePanel)sharePanel.onResize();if(global.languagePanel)languagePanel.onResize();
if(global.annotationPannel)annotationPannel.onResize();if(global.phoneSettingBody)global.phoneSettingBody.onResize();if(global.thumbnail)thumbnail.onResize();if(global.QRcode)QRcode.onResize();if(global.frmSearch)frmSearch.onResize();if(global.frmTableOfContent)frmTableOfContent.onResize();if(global.bookmark)bookmark.onResize();global.flipShotButton&&flipShotButton.setPosition();$(".appear_win10").css({"line-height":windowHeight+"px"});$(".appear_win10 .main_dom").css({left:0,top:0})}
function resizeToolBar(){if(global.toolBar&&toolBar.onResize)toolBar.onResize();var b=MiniStyle.isMini();isPhone()||isPad()||(b?(global.toolBar&&global.toolBar.hide(),global.QRbutton&&global.QRbutton.hide(),bookType==BookType.catalog_book&&global.catalogBook.guidBar&&global.catalogBook.guidBar.hide(),global.flipShotButton&&flipShotButton.hide(),MiniStyle.show()):(global.QRbutton&&global.QRbutton.show(),("lite"!=bookConfig.ToolbarViewMode||bookType!=BookType.slide_book&&bookType!=BookType.singleSlide_book&&
bookType!=BookType.catalog_book)&&toolBar.show(),bookType==BookType.catalog_book&&"lite"==bookConfig.ToolbarViewMode.toLowerCase()&&catalogBook.guidBar&&catalogBook.guidBar.show(),global.flipShotButton&&flipShotButton.show(),MiniStyle.hide()))}
function resizeCatalogBook(){if(bookType==BookType.catalog_book&&global.catalogBook){var b=catalogBook.getSpace(!1),c=catalogBook.getFitWH(),d=parseInt(c.x/2),f=parseInt(c.y),g=(windowWidth-b.left-b.right-c.x)/2+b.left,b=(windowHeight-b.top-b.bottom-c.y)/2+b.top,h=rightToLeft?c.x/4:-c.x/4,c=rightToLeft?-c.x/4:c.x/4,k={},l=0;!0==bookConfig.retainBookCenter&&(1==catalogBook.getCurrentPageIndex()&&(l=h),catalogBook.getCurrentPageIndex()==totalPageCount&&(l=c),k={tran:{x:l,y:0},scale:1,origin:{x:0,y:0}});
k.top=b;k.left=g;catalogBook.setCSS(k);catalogBook.onResize(d,f);catalogBook.afterZoomOut()}}
function resizeFlipBook(){if(bookType==BookType.normal_book||bookType==BookType.single_book){if(global.flipBook){var b=flipBook.getSpace(!1),c=flipBook.getFitWH(),d=parseInt(c.x/2),f=parseInt(c.y),g=(windowWidth-b.left-b.right-c.x)/2+b.left,b=(windowHeight-b.top-b.bottom-c.y)/2+b.top,h=rightToLeft?c.x/4:-c.x/4,c=rightToLeft?-c.x/4:c.x/4,k={},l=0;!0==bookConfig.retainBookCenter&&(1==flipBook.getCurrentPageIndex()&&(l=h),flipBook.getCurrentPageIndex()==totalPageCount&&(l=c),k={tran:{x:l,y:0},scale:1,
origin:{x:0,y:0}});k.top=b;k.left=g;flipBook.setCSS(k);flipBook.onResize(d,f);flipBook.afterZoomOut()}global.singlePageBook&&(c=singlePageBook.getFitWH(),d=parseInt(c.x),f=parseInt(c.y),b=singlePageBook.getSpace(!0),g=(windowWidth-b.left-b.right-c.x)/2+b.left,b=(windowHeight-b.top-b.bottom-c.y)/2+b.top,singlePageBook.onResize(d,f),singlePageBook.setCSS({top:b,left:g}),singlePageBook.setCSS({tran:{x:0,y:0},scale:1,origin:{x:0,y:0}}),singlePageBook.afterZoomOut())}}
function resizeSlideBook(){if(global.slideBook)slideBook.onResize();if(global.singleSlideBook)singleSlideBook.onResize()}
function changeShowBookByWindow(){var b,c,d=!1;bookType==BookType.single_book&&windowWidth>=windowHeight&&bookConfig.showDoublePage&&(bookType=BookType.normal_book,changeShowBook(0),c=singlePageBook.currentPageIndex,d=b=!0);bookType==BookType.singleSlide_book&&windowWidth>=windowHeight&&bookConfig.showDoublePage&&(bookType=BookType.slide_book,changeShowBook(bookType),c=singleSlideBook.getRealPageIndex(),d=b=!0);bookType==BookType.slide_book&&windowWidth<windowHeight&&(bookType=BookType.singleSlide_book,
changeShowBook(bookType),c=slideBook.getRealPageIndex(),b=!1,d=!0);bookType==BookType.normal_book&&windowWidth<windowHeight&&(bookType=BookType.single_book,changeShowBook(1),c=flipBook.currentPageIndex,b=!1,d=!0);resizeFlipBook();resizeCatalogBook();resizeSlideBook();d&&(gotoPageFun(c),setCurrentIndexTextField(c,b),global.thumbnail&&thumbnail.clearHighLight(),global.thumbnail&&thumbnail.setHighLight(c))}
function initEvents(){$(bookContainer).bind("mouseup touchstart",function(b){b.target==b.currentTarget&&onWindowClick(b)});$(bookContainer).bind("touchstart",function(b){b.preventDefault()});$(window).bind("keydown",function(b){onWindowKeyDown(b)});initSoundEvents()}
function initSoundEvents(){if(isPhone()||isPad())global.bgSound&&global.bgSound.sound&&global.bgSound.sound.bind("play",function(){global.bgSound.sound[0].hasPlayed=!0}),global.flipAudio&&global.flipAudio.bind("play",function(){global.flipAudio[0].hasPlayed=!0}),$("body").bind(_event._down+" "+_event._move+" "+_event._end,function(b){global.flipAudio&&global.flipAudio[0].paused&&!global.flipAudio[0].hasPlayed&&bookConfig.FlipSound&&(global.flipAudio[0].volume=0,global.flipAudio[0].play(),global.flipAudio[0].pause(),
global.flipAudio[0].volume=1);if(global.bgSound.sound&&global.bgSound.sound[0].paused&&!global.bgSound.sound[0].hasPlayed&&isPlaying)try{global.bgSound.play()}catch(c){}global.flipPageAudio.playByTouch()})}
function onWindowClick(b){if(b){var c=BookInfo.getBook();if(!(c.status_zoom||c.isZomming||c.status_resize)){var c=BookInfo.getBook().getBook().offset(),d=BookInfo.getBook().getBook().outerWidth();b.pageX>c.left+d?rightToLeft?previousPageFun():nextPageFun():b.pageX<c.left&&(rightToLeft?nextPageFun():previousPageFun())}}}
function onWindowKeyDown(b){if(b){var c=b.keyCode;Log.info("key down[%d]",c);c==KEY_CODE_LEFT&&(rightToLeft?nextPageFun():previousPageFun());c==KEY_CODE_RIGHT&&(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();b.ctrlKey&&b.altKey&&(c==KEY_CODE_HOME||c==KEY_CODE_UP)&&eval(DeString("b29ec71982dc6d9062a0b77ce9ccc59581fd3c4a4fa9bd325e6f5ae7fbf39a0907064bb455b1bade956bc0f3e7c55d348fbaa363c39f7bef7a0648674fd1f688786b79bd6ad03215d634a4736f3f971501f664a09b820932d9bc83a9c2159964e5c571b3ebe4ceb214fd31bb1287fe5449f303a6d5531165e1386ba5aa8d0a3788d4a351d120a43a59c002d761ef"))}}
;Class("TaskList",{create:function(){this.taskList=[];this.taskListId=[];this.finishId=[];this.largeLength=0;this.performingTasks=!1;this.taskId=0},unShiftTask:function(b){0<=this.taskListId.indexOf(b.id)||0<=this.finishId.indexOf(b.id)||(void 0==b.id&&(b.id=this.tastkId,this.taskId++),this.taskList.push(b),this.taskListId.push(b.id),this.cutTask(),this.taskInterval||this.performTaskList())},cutTask:function(){var b=this.taskList.length;if(!(b<=this.largeLength))for(var c=0;c<b-this.largeLength;c++)this.taskList.remove(0),
this.taskListId.remove(0)},performTaskList:function(b){this.taskInterval||(this.taskInterval=window.setInterval(function(){var b=this.taskList[0];b?(b(),this.finishId.push(b.id),this.taskList.remove(0),this.taskListId.remove(0)):(window.clearInterval(this.taskInterval),this.taskInterval=void 0)}.bind(this),60))},setLargeLength:function(b){this.largeLength=b}});Class("TextBubble",{$parent:null,color:null,textColor:null,text:"",padding:6,margin:2,$bubble:null,$content:null,$text:null,statics:{LEFT:1,TOP:2,RIGHT:3,BOTTOM:4,HORIZONTAL:5,VERTICAL:6},create:function(b){b=b||{};this.$parent=b.parent||$("body");this.color=Color(b.color)||Color("black");this.textColor=Color(b.textColor)||Color("white");this.text=b.text||"";this.padding=b.padding||6;this.margin=b.margin||2;this.direction=b.direction||TextBubble.VERTICAL;this.init()},init:function(){this.$bubble=
$("<div class='text_bubble' style='display:none'></div>");this.$content=$("<div class='text_bubble_content'></div>");this.$text=$("<div class='text_bubble_text'></div>");this.$parent.append(this.$bubble);this.$bubble.append(this.$content);this.$content.append(this.$text);this.$content.css({padding:this.padding+"px","background-color":this.color.rgba()});this.$text.css({color:this.textColor.toString()});this.$text.text(this.text)},setStyle:function(b){"string"==typeof b&&this.$content.addClass(b);
"object"==typeof b&&this.$content.css(b)},setText:function(b){this.text=b;this.$text&&this.$text.text(this.text)},show:function(b){this.$bubble&&this.$bubble.css({display:"block"});switch(this.direction){case TextBubble.LEFT:this.showLeft(b);break;case TextBubble.TOP:this.showTop(b);break;case TextBubble.RIGHT:this.showRight(b);break;case TextBubble.BOTTOM:this.showBottom(b);break;case TextBubble.HORIZAONTAL:this.showHorizaontal(b);break;case TextBubble.VERTICAL:this.showVertical(b)}},showLeft:function(b){var c=
this.getBubbleWidth();this.bubbleLeft=b.left-c-this.margin;c=this.getBubbleHeight();this.bubbleTop=b.top+b.height/2-c/2;this.bubbleTop+c>this.$parent.height()?this.bubbleTop=this.$parent.height()-c-this.margin:this.bubbleTop=Math.max(this.margin,this.bubbleTop);this.$bubble.css({left:this.bubbleLeft+"px",top:this.bubbleTop+"px"})},showRight:function(b){this.getBubbleWidth();this.bubbleLeft=b.left+b.width+this.margin;var c=this.getBubbleHeight();this.bubbleTop=b.top+b.height/2-c/2;this.bubbleTop+c>
this.$parent.height()?this.bubbleTop=this.$parent.height()-c-this.margin:this.bubbleTop=Math.max(this.margin,this.bubbleTop);this.$bubble.css({left:this.bubbleLeft+"px",top:this.bubbleTop+"px"})},showTop:function(b){var c=this.getBubbleWidth();this.bubbleLeft=b.left+b.width/2-c/2;this.bubbleLeft+c>this.$parent.width()?this.bubbleLeft=this.$parent.width()-c-this.margin:this.bubbleLeft=Math.max(this.margin,this.bubbleLeft);c=this.getBubbleHeight();this.bubbleTop=b.top-c-this.margin;this.$bubble.css({left:this.bubbleLeft+
"px",top:this.bubbleTop+"px"})},showBottom:function(b){var c=this.getBubbleWidth();this.bubbleLeft=b.left+b.width/2-c/2;this.bubbleLeft+c>this.$parent.width()?this.bubbleLeft=this.$parent.width()-c-this.margin:this.bubbleLeft=Math.max(this.margin,this.bubbleLeft);this.getBubbleHeight();this.bubbleTop=b.top+b.height+this.margin;this.$bubble.css({left:this.bubbleLeft+"px",top:this.bubbleTop+"px"})},showVertical:function(b){var c=this.getBubbleWidth();this.bubbleLeft=b.left+b.width/2-c/2;this.bubbleLeft+
c>this.$parent.width()?this.bubbleLeft=this.$parent.width()-c-this.margin:this.bubbleLeft=Math.max(this.margin,this.bubbleLeft);c=this.getBubbleHeight();b.top+b.height+c>this.$parent.height()?this.bubbleTop=b.top-c-this.margin:this.bubbleTop=b.top+b.height+this.margin;this.$bubble.css({left:this.bubbleLeft+"px",top:this.bubbleTop+"px"})},showHorizontal:function(b){var c=this.getBubbleWidth();b.left+b.width+c>this.$parent.width()?this.bubbleLeft=b.left-c-this.margin:this.bubbleLeft=b.left+b.width+
this.margin;c=this.getBubbleHeight();this.bubbleTop=b.top+b.height/2-c/2;this.bubbleTop+c>this.$parent.height()?this.bubbleTop=this.$parent.height()-c-this.margin:this.bubbleTop=Math.max(this.margin,this.bubbleTop);this.$bubble.css({left:this.bubbleLeft+"px",top:this.bubbleTop+"px"})},getBubbleWidth:function(){return this.$text.width()+2*this.padding},getBubbleHeight:function(){return this.$text.height()+2*this.padding},hide:function(){this.$bubble&&this.$bubble.css({display:"none"})}});
Class("ArrowTextBubble",{create:function(b){b=b||{};this.arrowWidth=b.arrowWidth||8;this.arrowHeight=b.arrowHeight||4;this._super(b)},setRightArrowStyle:function(b,c){b.css({"border-left":"0px solid transparent","border-top":this.arrowHeight/2+"px solid transparent","border-right":this.arrowWidth+"px solid "+c.toString(),"border-bottom":this.arrowHeight/2+"px solid transparent"})},setLeftArrowStyle:function(b,c){b.css({"border-left":this.arrowWidth+"px solid "+c.toString(),"border-top":this.arrowHeight/
2+"px solid transparent","border-right":"0px solid transparent","border-bottom":this.arrowHeight/2+"px solid transparent"})},setBottomArrowStyle:function(b,c){b.css({"border-left":this.arrowWidth/2+"px solid transparent","border-top":"0px solid transparent","border-right":this.arrowWidth/2+"px solid transparent","border-bottom":this.arrowHeight+"px solid "+c.toString()})},setTopArrowStyle:function(b,c){b.css({"border-left":this.arrowWidth/2+"px solid transparent","border-top":this.arrowHeight+"px solid "+
c.toString(),"border-right":this.arrowWidth/2+"px solid transparent","border-bottom":"0px solid transparent"})}}).extend("TextBubble");
Class("SolidArrowTextBubble",{$arrow:null,init:function(){this._super();this.$arrow=$("<div class='text_bubble_arrow'></div>");this.$bubble.append(this.$arrow)},showLeft:function(b){this._super(b);this.getBubbleHeight();b=b.top+b.height/2-this.bubbleTop-this.arrowHeight/2;var c=this.$text.width()+2*this.padding;this.$content.css({"margin-left":"0px"});this.setLeftArrowStyle(this.$arrow,this.color);this.$arrow.css({top:b+"px",left:c+"px"})},showTop:function(b){this._super(b);this.getBubbleWidth();
b=b.left+b.width/2-this.bubbleLeft-this.arrowWidth/2;var c=this.$text.height()+2*this.padding;this.$content.css({"margin-top":"0px"});this.setTopArrowStyle(this.$arrow,this.color);this.$arrow.css({left:b+"px",top:c+"px"})},showRight:function(b){this._super(b);this.getBubbleHeight();b=b.top+b.height/2-this.bubbleTop-this.arrowHeight/2;this.$text.width();this.$content.css({"margin-left":this.arrowWidth+"px"});this.setRightArrowStyle(this.$arrow,this.color);this.$arrow.css({top:b+"px",left:"0px"})},
showBottom:function(b){this._super(b);this.getBubbleWidth();b=b.left+b.width/2-this.bubbleLeft-this.arrowWidth/2;this.$text.height();this.$content.css({"margin-top":this.arrowHeight+"px"});this.setBottomArrowStyle(this.$arrow,this.color);this.$arrow.css({left:b+"px",top:"0px"})},showVertical:function(b){this._super(b);this.getBubbleWidth();var c=b.left+b.width/2-this.bubbleLeft-this.arrowWidth/2,d=this.$text.height()+2*this.padding;this.bubbleTop<b.top?(this.$content.css({"margin-top":"0px"}),this.setTopArrowStyle(this.$arrow,
this.color),this.$arrow.css({left:c+"px",top:d+"px"})):(this.$content.css({"margin-top":this.arrowHeight+"px"}),this.setBottomArrowStyle(this.$arrow,this.color),this.$arrow.css({left:c+"px",top:"0px"}))},showHorizontal:function(b){this._super(b);this.getBubbleHeight();var c=b.top+b.height/2-this.bubbleTop-this.arrowHeight/2,d=this.$text.width()+2*this.padding;this.bubbleLeft<b.left?(this.$content.css({"margin-left":"0px"}),this.setLeftArrowStyle(this.$arrow,this.color),this.$arrow.css({top:c+"px",
left:d+"px"})):(this.$content.css({"margin-left":this.arrowWidth+"px"}),this.setRightArrowStyle(this.$arrow,this.color),this.$arrow.css({top:c+"px",left:"0px"}))},getBubbleHeight:function(){return this.direction==TextBubble.VERTICAL||this.direction==TextBubble.TOP||this.direction==TextBubble.BOTTOM?this.$text.height()+2*this.padding+this.arrowHeight:this.$text.height()+2*this.padding},getBubbleWidth:function(){return this.direction==TextBubble.HORIZONTAL||this.direction==TextBubble.LEFT||this.direction==
TextBubble.RIGHT?this.$text.width()+2*this.padding+this.arrowWidth:this.$text.width()+2*this.padding}}).extend("ArrowTextBubble");
Class("HollowArrowTextBubble",{$arrow:null,$filled_arrow:null,create:function(b){b=b||{};this.filledColor=b.filledColor||Color("white");this._super(b)},init:function(){this._super();this.$arrow=$("<div class='text_bubble_arrow' style='z-index:1'></div>");this.$filled_arrow=$("<div class='text_bubble_arrow' style='z-index:2'></div>");this.$bubble.append(this.$arrow);this.$bubble.append(this.$filled_arrow);this.$content.css({padding:this.padding-1+"px",border:"1px solid "+this.color.toString(),"background-color":this.filledColor.toString()})},
show:function(b){this._super(b);this.getBubbleWidth();var c=b.left+b.width/2-this.bubbleLeft-this.arrowWidth/2,d=this.$text.height()+2*this.padding;this.bubbleTop<b.top?(this.$content.css({"margin-top":"0px"}),this.setBottomArrowStyle(this.$arrow,this.color),this.$arrow.css({left:c+"px",top:d+"px"}),this.setBottomArrowStyle(this.$filled_arrow,this.filledColor),this.$filled_arrow.css({left:c+"px",top:d-2+"px"})):(this.$content.css({"margin-top":this.arrowHeight+"px"}),this.setTopArrowStyle(this.$arrow,
this.color),this.$arrow.css({left:c+"px",top:"0px"}),this.setTopArrowStyle(this.$filled_arrow,this.filledColor),this.$filled_arrow.css({left:c+"px",top:"2px"}))},getBubbleHeight:function(){return this.$text.height()+2*this.padding+this.arrowHeight}}).extend("ArrowTextBubble");Class("ToolbarButton",{$button:null,colorChanged:!1,callback:null,color:null,fontColor:null,$parent:null,caption:"",title:null,hint:!0,language:null,create:function(){this.color=Color(bookConfig.iconColor);this.fontColor=Color(bookConfig.iconFontColor);this.$button=$("<div class='button'></div>");this.ButtonClickEvent=this.onButtonClick.bind(this)},setCallback:function(b){this.callback=b},onButtonClick:function(b){this.onClick(b);this.executeCallback();this.hideTitle();if(b)return b.stopPropagation&&
b.stopPropagation(),b.cancelBubble&&(b.cancelBubble=!0),!1},onClick:virtual_function,executeCallback:function(){this.callback&&this.callback instanceof Function&&this.callback(this)},click:function(b){this.onButtonClick(b)},setSrc:function(b,c){var d=$("<img style='pointer-events:none;'></img>");this.$caption=$("<span style='pointer-events:none;'></span>");c&&""!=c?d.attr("src",c):toolbar_icons&&toolbar_icons[b]?d.attr("src","data:image/png;base64,"+toolbar_icons[b]):d.attr("src",uiBaseURL+b+".png");
this.$button.empty();this.$button.append(d);this.$button.append(this.$caption);this.colorChanged=!1},changeColor:function(b){this.changeIconColor(b);this.changeCaptionColor(b)},changeIconColor:function(b){if(this.color||b)b||(b=this.color.toString()),this.$parent&&(this.colorChanged||this.$button.changeButtonColor(b,!1,function(){this.colorChanged=!0}.bind(this)))},changeCaptionColor:function(b){if(this.fontColor||b)b||(b=this.fontColor.toString()),this.$caption&&this.$caption.css("color",b)},reflection:function(){reflection&&
reflection(this.$button)},initLanguage:function(b,c){this.language={key:b,defaultValue:c};this.changeLanguage()},changeLanguage:function(){if(this.language){var b=getLanguage(this.language.key,this.language.defaultValue);this.setCaption(b)}},setCaption:function(b){this.caption=b;this.$caption.text(b);this.title?this.title.setText(b):this.setTitle(b)},setTitle:function(b){"string"==typeof b?(this.$button.attr("title",b),this.title=null):(this.$button.attr("title",""),this.title=b)},showTitle:function(b){b&&
"CANVAS"==b.target.tagName.toUpperCase()||!this.hint||!this.title||(this.mouse_is_enter=!0,this.titleTimer&&window.clearTimeout(this.titleTimer),this.titleTimer=function(){if(this.mouse_is_enter){var c={left:b.pageX-b.offsetX,top:b.pageY-b.offsetY,width:this.width(),height:this.height()};this.title.show(c)}}.delay(this,800))},hideTitle:function(){this.mouse_is_enter=!1;this.title&&this.title.hide()},addTo:function(b){this.$parent!=b&&(this.$parent&&this.freedom(),this.$button.appendTo(b),this.$parent=
b,this.addEvents())},addEvents:function(){this.$button.bind("click",this.ButtonClickEvent);this.$button.bind("mouseenter",this.showTitle.bind(this));this.$button.bind("mouseleave",this.hideTitle.bind(this));this.$button.bind("mousedown pointerdown touchstart",function(b){b.stopPropagation()});this.$button.css("cursor","pointer")},freedom:function(){this.$button.remove();this.$parent=null;this.$button.unbind()},setPosition:function(b,c){this.$button.css({left:b+"px",top:c+"px"})},setWidth:function(b){this.$button.css({width:b+
"px"})},setHeight:function(b){this.$button.css({height:b+"px"})},left:function(){return this.$button.left()},top:function(){return this.$button.top()},width:function(){return this.$button.width()},height:function(){return this.$button.height()}});
Class("ButtonBevel",{color:null,$body:null,$parent:null,statics:{vertical:0,horizontal:1},create:function(b,c){this.color=Color(b);this.direction=void 0==c?ButtonBevel.vertical:c;this.init()},init:function(){this.$body=$("<div name='bevel'></div>");var b=this.color.reduce(20),c=this.color.add(20);this.direction==ButtonBevel.vertical?(this._width=2,this._height=30,this.$body.css({position:"absolute",width:"1px",height:"30px","background-color":b,"border-right":"1px solid "+c})):(this._width=30,this._height=
2,this.$body.css({position:"absolute",width:"30px",height:"1px","background-color":b,"border-bottom":"1px solid "+c}))},freedom:function(){this.$body.remove();this.$parent=null},addTo:function(b){this.$parent!=b&&(this.$parent&&this.freedom(),this.$body.appendTo(b),this.$parent=b)},setPosition:function(b,c){this.$body.css({left:b+"px",top:c+"px"})},setWidth:function(b){this._width=b;if(this.direction==ButtonBevel.vertical){var c=b%2;this.$body.css({width:(b+c)/2+"px","border-right-width":(b-c)/2+
"px"})}else this.$body.css({width:b+"px"})},setHeight:function(b){this._height=b;if(this.direction==ButtonBevel.vertical)this.$body.css({height:b+"px"});else{var c=b%2;this.$body.css({height:(b+c)/2+"px","border-bottom-width":(b-c)/2+"px"})}},left:function(){return this.$body.left()},top:function(){return this.$body.top()},width:function(){return this._width},height:function(){return this._height}});
Class("FirstPageButton",{create:function(){this._super();rightToLeft?this.setSrc("Last",bookConfig.LastButtonIcon):this.setSrc("First",bookConfig.FirstButtonIcon);this.initLanguage("btnFirstPage","First")},onClick:function(b){firstPageFun()}}).extend("ToolbarButton");Class("LastPageButton",{create:function(){this._super();rightToLeft?this.setSrc("First",bookConfig.FirstButtonIcon):this.setSrc("Last",bookConfig.LastButtonIcon);this.initLanguage("btnLastPage","Last")},onClick:function(b){lastPageFun()}}).extend("ToolbarButton");
Class("PreviousPageButton",{create:function(){this._super();rightToLeft?this.setSrc("next",bookConfig.NextButtonIcon):this.setSrc("prev",bookConfig.PreviousButtonIcon);this.initLanguage("btnPrePage","Previous")},onClick:function(b){previousPageFun()}}).extend("ToolbarButton");Class("NextPageButton",{create:function(){this._super();rightToLeft?this.setSrc("prev",bookConfig.PreviousButtonIcon):this.setSrc("next",bookConfig.NextButtonIcon);this.initLanguage("btnNextPage","Next")},onClick:function(b){nextPageFun()}}).extend("ToolbarButton");
Class("HomeButton",{create:function(){this._super();this.setSrc("home",bookConfig.HomeButtonIcon);this.initLanguage("btnGoToHome","Home")},onClick:function(b){"%first page%"==bookConfig.HomeURL.toLowerCase()?firstPageFun():void 0!=bookConfig.HomeURL&&""!=bookConfig.HomeURL&&(b=bookConfig.HomeURL,b.startsWith("http")||(b="http://"+b),window.open(b,bookConfig.OpenWindow))}}).extend("ToolbarButton");
Class("ShareEmailButton",{create:function(){this.color=Color(bookConfig.iconColor);this.fontColor=Color(bookConfig.iconFontColor);this.$button=$("<a target="+bookConfig.OpenWindow+" href='' class='button'></a>");var b=bookConfig.btnShareWithEmailBody,c=bookConfig.btnShareWithEmailSubject;c||(c="");thumb=" "+window.location.href.substring(0,share_url.lastIndexOf("/"))+"/"+bookConfig.thumbPath+"1.jpg ";b=b.replaceAll("{thumb}",thumb,!0);b=b.replaceAll("{link}",window.location.href,!0);b=b.replaceAll("{title}",
window.document.title,!0);this.$button.attr("href","mailto:?subject="+c+"&body="+b);this.setSrc("emailButton",bookConfig.EmailButtonIcon);this.initLanguage("btnShareEmail","Share by Email")},onClick:function(b){}}).extend("ToolbarButton");Class("HelpButton",{create:function(){this._super();this.setSrc("Help",bookConfig.HelpButtonIcon);this.initLanguage("btnHelp","Help")},onClick:function(b){helpBody&&helpBody.showOrHide()}}).extend("ToolbarButton");
Class("ThumbnailButton",{create:function(){this._super();this.setSrc("thumbnails",bookConfig.ThumbnailButtonIcon);this.initLanguage("btnThumb","Thumbnails")},onClick:function(b){thumbnail&&thumbnail.showOrHide()}}).extend("ToolbarButton");Class("ShareButton",{create:function(){this._super();this.setSrc("sharethis",bookConfig.ShareButtonIcon);this.initLanguage("btnSocialShare","Share")},onClick:function(b){sharePanel.showOrHide()}}).extend("ToolbarButton");
Class("SearchButton",{create:function(){this._super();this.setSrc("search",bookConfig.SearchButtonIcon);this.initLanguage("btnSearch","Search")},onClick:function(b){frmSearch&&frmSearch.showOrHide()}}).extend("ToolbarButton");Class("DownloadButton",{create:function(){this._super();this.setSrc("download",bookConfig.DownloadButtonIcon);this.initLanguage("btnDownload","Download")},onClick:function(b){""!=bookConfig.DownloadURL&&window.open(bookConfig.DownloadURL,"_blank")}}).extend("ToolbarButton");
Class("BookmarkButton",{create:function(){this._super();this.setSrc("bookmark",bookConfig.BookmarkButtonIcon);getLanguage("AnnotMark","")?this.initLanguage("AnnotMark","bookmark"):this.initLanguage("btnBookMark","Bookmark")},onClick:function(b){bookmark.showOrHide()}}).extend("ToolbarButton");
Class("TableOfContentButton",{create:function(){this._super();this.setSrc("tableOfContent",bookConfig.TableOfContentButtonIcon);getLanguage("AnnotMark","")?this.initLanguage("btnBookMark","Table Of Content"):this.initLanguage("btnTableOfContent","Table Of Content")},onClick:function(b){frmTableOfContent&&frmTableOfContent.showOrHide()}}).extend("ToolbarButton");
Class("LanguageButton",{create:function(){this._super();this.setSrc("languageChange",bookConfig.LanguageButtonIcon);this.initLanguage("btnLanguage","Language change")},onClick:function(b){global.languagePanel&&languagePanel.showOrHide()}}).extend("ToolbarButton");Class("PrintButton",{create:function(){this._super();this.setSrc("print",bookConfig.PrintButtonIcon);this.initLanguage("btnPrint","Print")},onClick:function(b){printBody&&printBody.showOrHide()}}).extend("ToolbarButton");
Class("AboutButton",{create:function(){this._super();this.setSrc("about",bookConfig.AboutButtonIcon);this.initLanguage("btnAbout","About")},onClick:function(b){aboutBody&&aboutBody.showOrHide()}}).extend("ToolbarButton");Class("MoreButton",{create:function(){this._super();this.setSrc("moreBar");this.initLanguage("btnMore","More")},onClick:function(b){moreBar.visible?moreBar.hide():(b={left:b.pageX-b.offsetX,top:b.pageY-b.offsetY,width:this.width(),height:this.height()},moreBar.show(b))}}).extend("ToolbarButton");
Class("AnnotationButton",{create:function(){this._super();this.setSrc("annotation",bookConfig.AnnotationButtonIcon);this.initLanguage("btnNote","Annotation")},onClick:function(b){annotationPannel.getShowStatu()?annotationPannel.hide():annotationPannel.show()}}).extend("ToolbarButton");Class("VideoButton",{create:function(){this._super();this.setSrc("videoGallery",bookConfig.VideoButtonIcon);this.initLanguage("btnVideo","Video Gallery")},onClick:function(b){videoGallery&&videoGallery.showOrHide()}}).extend("ToolbarButton");
Class("SlideshowButton",{create:function(){this._super();this.setSrc("photoGallery",bookConfig.SlideshowButtonIcon);this.initLanguage("btnSlideShow","Slideshow")},onClick:function(b){photoGallery.showOrHide()}}).extend("ToolbarButton");Class("BackwardButton",{create:function(){this._super();rightToLeft?this.setSrc("forward",bookConfig.ForwardButtonIcon):this.setSrc("backward",bookConfig.BackwardButtonIcon);this.initLanguage("btnPageBack","Backward")},onClick:function(b){flipHistory.backward()}}).extend("ToolbarButton");
Class("ForwardButton",{create:function(){this._super();rightToLeft?this.setSrc("backward",bookConfig.BackwardButtonIcon):this.setSrc("forward",bookConfig.ForwardButtonIcon);this.initLanguage("btnPageForward","Forward")},onClick:function(b){flipHistory.forward()}}).extend("ToolbarButton");Class("StateSynchronous",{buttons:null,statics:{instance:function(){this.synchroner||(this.synchroner=new StateSynchronous);return this.synchroner}},create:function(){this.buttons=new ObjectPool},registButton:function(b){this.buttons.add(b)},findButtons:function(b,c){return c?this.buttons.find(b):this.buttons.match(b)},reportChanged:function(b){this.buttons.match(b.getClassName()).each(function(c){c!=b&&c.setStatusQuietly(b.getStatus())})}});
Class("ToolbarStateButton",{status:-1,getFunctionName:function(b){var c=this.getClass().prototype,d;for(d in c)if(b==c[d])return d},bindStates:function(){this.states=[];for(var b=0;b<arguments.length;b++){var c=arguments[b],d=this.getFunctionName(c);this[d]=function(b,c){return function(){this.status!=c&&(this.status=c,b.apply(this,arguments),StateSynchronous.instance().reportChanged(this))}}(c,b);this.states[b]=d}StateSynchronous.instance().registButton(this)},setStatus:function(b){(b=this[this.states[b]])&&
b.apply(this)},setStatusQuietly:function(b){if(this.status!=b){var c=this.getClass().prototype[this.states[b]];c&&(this.status=b,c.apply(this))}},getStatus:function(){return this.status},onClick:virtual_function,initLanguage:function(){this.language=[];for(var b=0;b<arguments.length;b++){var c=arguments[b],d;for(d in c)this.language.push({key:d,defaultValue:c[d]})}},changeLanguage:function(){if(this.language){var b=this.language[this.status],b=getLanguage(b.key,b.defaultValue);this.setCaption(b)}}}).extend("ToolbarButton");
Class("ZoomButton",{create:function(){this._super();this.bindStates(this.setAsZoomin,this.setAsZoomout);this.initLanguage({btnZoomIn:"Zoom In"},{btnZoomOut:"Zoom Out"});this.setAsZoomin()},setAsZoomin:function(){this.setSrc("ZoomIn",bookConfig.ZoomInButtonIcon);this.changeLanguage();this.changeColor()},setAsZoomout:function(){this.setSrc("ZoomOut",bookConfig.ZoomOutButtonIcon);this.changeLanguage();this.changeColor()},executeZoomout:function(){var b=BookInfo.getBook().showPage;b.onDoubleTap.bind(b)({pointers:[{pageX:windowWidth/
2,pageY:windowHeight/2}]});auto_player.isPlaying()&&auto_player.stop()},executeZoomin:function(){var b=BookInfo.getBook().showPage;b.onDoubleTap.bind(b)({pointers:[{pageX:windowWidth/2,pageY:windowHeight/2}]});auto_player.isPlaying()&&auto_player.stop()},zoomout:function(){this.executeZoomout();this.setAsZoomin()},zoomin:function(){this.executeZoomin();this.setAsZoomout()},onClick:function(b){BookInfo.isZoomming()||(BookInfo.zoomStatus()?this.zoomout():this.zoomin())}}).extend("ToolbarStateButton");
Class("AutoPlayButton",{create:function(){this._super();this.bindStates(this.setAsStart,this.setAsStop);this.initLanguage({btnAutoFlip:"Auto Flip"},{btnStopAutoFlip:"Stop Auto Flip"});this.setAsStart()},setAsStart:function(){this.setSrc("autoPlay",bookConfig.AutoPlayStartButtonIcon);this.changeLanguage();this.changeColor()},setAsStop:function(){this.setSrc("stopAutoPlay",bookConfig.AutoPlayStopButtonIcon);this.changeLanguage();this.changeColor()},onClick:function(){auto_player&&(auto_player.isPlaying()?
auto_player.stop():auto_player.start())}}).extend("ToolbarStateButton");
Class("FullscreenButton",{create:function(){this._super();this.bindStates(this.setAsFullScreen,this.setAsExitFullScreen);this.initLanguage({btnFullscreen:"Fullscreen"},{btnExitFullscreen:"Exit Fullscreen"});this.setAsFullScreen()},setAsFullScreen:function(){this.setSrc("fullscreen",bookConfig.FullscreenButtonIcon);this.changeLanguage();this.changeColor()},setAsExitFullScreen:function(){this.setSrc("exitFullscreen",bookConfig.ExitFullscreenButtonIcon);this.changeLanguage();this.changeColor()},onClick:function(){readAsFullscreen()}}).extend("ToolbarStateButton");
Class("BackgroundSoundButton",{create:function(){this._super();this.bindStates(this.setAsSoundOn,this.setAsSoundOff);this.initLanguage({btnSoundOn:"Sound On"},{btnSoundOff:"Sound Off"});this.setAsSoundOn()},setAsSoundOn:function(){this.setSrc("soundOn",bookConfig.BackgroundSoundButtonOnIcon);this.changeLanguage();this.changeColor()},setAsSoundOff:function(){this.setSrc("soundOff",bookConfig.BackgroundSoundButtonOffIcon);this.changeLanguage();this.changeColor()},onClick:function(b){global.bgSound&&
(volumeControlBar.iconOn?volumeControlBar.soundOff({left:b.pageX-b.offsetX,top:b.pageY-b.offsetY,width:$(b.target).width(),height:$(b.target).height()}):volumeControlBar.soundOn({left:b.pageX-b.offsetX,top:b.pageY-b.offsetY,width:$(b.target).width(),height:$(b.target).height()}))},addEvents:function(){this._super();this.onMouseEnter()},onMouseEnter:function(){this.$button.bind("mouseenter",function(b){b&&"CANVAS"==b.target.tagName.toUpperCase()||setTimeout(function(){volumeControlBar.show({left:b.pageX-
b.offsetX,top:b.pageY-b.offsetY,width:$(b.target).width(),height:$(b.target).height()})},200)}.bind(this));this.$button.bind("mouseleave",function(b){setTimeout(function(){volumeControlBar.visible||volumeControlBar.hide()},200)}.bind(this))}}).extend("ToolbarStateButton");var getLogoLink=function(){return[bookConfig.appLogoLinkURL,bookConfig.appLogoOpenWindow]},initLogoBar=function(b){if(bookConfig.appLogoIcon){var c=$("#logoBar");b=c.height();var d=bookConfig.logoHeight,f=bookConfig.logoPadding,g=parseInt((b-d)/2),h=getLogoLink(),k=$("<img style='position:absolute;left:0;top:0;'/>");k.attr({src:bookConfig.appLogoIcon});k.load(function(){c.append(k);k.css({height:d+"px",top:g+"px"});c.css({left:f+"px",width:k[0].naturalWidth*d/k[0].naturalHeight+"px"});h[0]&&(k.click(function(){window.open(h[0],
h[1])}),k.css({cursor:"pointer"}));if(global.toolBar&&global.toolBar.onResize)toolBar.onResize()})}},setPageIndexTextField=function(){setCurrentIndexTextField(BookInfo.getBook().getCurrentPageIndex(),bookType==BookType.normal_book||bookType==BookType.slide_book||bookType==BookType.catalog_book);void 0!=$("#currentPageIndexTextField")&&null!=$("#currentPageIndexTextField")&&void 0!=$("#currentPageIndexTextField")[0]&&null!=$("#currentPageIndexTextField")[0]&&($("#currentPageIndexTextField").bind("keydown",
function(b){13==b.keyCode&&(b=$("#currentPageIndexTextField").val(),b=parseInt(getRealPage(b)),isNaN(b)||(b=Math.min(Math.max(b,1),bookConfig.totalPageCount),gotoPageFun(b)))}),$("#currentPageIndexTextField").bind("blur",function(){window.setTimeout(function(){setCurrentIndexTextField(BookInfo.getCurrentPageIndex())},400);this.onFocus=!1}),$("#currentPageIndexTextField").bind("focus",function(b){$("#currentPageIndexTextField").val("");this.onFocus=!0}))},homeButtonEvent=function(){if("%first page%"==
bookConfig.HomeURL.toLowerCase())firstPageFun();else if(void 0!=bookConfig.HomeURL&&""!=bookConfig.HomeURL){var b=bookConfig.HomeURL;"http"!=b.substr(0,4)&&(b="http://"+b);window.open(b,bookConfig.OpenWindow)}};(function(b){function c(b){if(!b)return 0;b=parseFloat(b.replace("px",""));return isNaN(b)?0:b}b.fn.left=function(){return c(this.css("left"))};b.fn.top=function(){return c(this.css("top"))};b.fn.right=function(){return c(this.css("right"))};b.fn.bottom=function(){return c(this.css("bottom"))}})(jQuery);
Class("Toolbar",{topBar:null,bottomBar:null,buttons:null,visible:!0,isMoving:!1,extendedBar:null,color:null,create:function(b){this.parent=b;this.color=Color(bookConfig.toolbarColor);this.initButtons();this.initBar();this.initExtendedbar();this.initEvents();this.onResize()},initButtons:function(){this.buttons=new ObjectPool;this.buttons.add(new FirstPageButton);this.buttons.add(new PreviousPageButton);this.buttons.add(new NextPageButton);this.buttons.add(new LastPageButton);bookConfig.enablePageBack&&
(this.buttons.add(new BackwardButton),this.buttons.add(new ForwardButton));bookConfig.HomeButtonVisible&&this.buttons.add(new HomeButton);bookConfig.ZoomButtonVisible&&this.buttons.add(new ZoomButton);bookConfig.SearchButtonVisible&&this.buttons.add(new SearchButton);bookConfig.ThumbnailsButtonVisible&&this.buttons.add(new ThumbnailButton);bookConfig.TableOfContentButtonVisible&&this.buttons.add(new TableOfContentButton);bookConfig.BookMarkButtonVisible&&this.buttons.add(new BookmarkButton);bookConfig.AutoPlayButtonVisible&&
this.buttons.add(new AutoPlayButton);bookConfig.BackgroundSoundButtonVisible&&this.buttons.add(new BackgroundSoundButton);bookConfig.AnnotationButtonVisible&&this.buttons.add(new AnnotationButton);bookConfig.VideoButtonVisible&&this.buttons.add(new VideoButton);bookConfig.SlideshowButtonVisible&&this.buttons.add(new SlideshowButton);bookConfig.ShareButtonVisible&&this.buttons.add(new ShareButton);bookConfig.PrintButtonVisible&&this.buttons.add(new PrintButton);bookConfig.DownloadButtonVisible&&this.buttons.add(new DownloadButton);
bookConfig.FullscreenButtonVisible&&this.buttons.add(new FullscreenButton);1<language.length&&this.buttons.add(new LanguageButton);bookConfig.aboutButtonVisible&&this.buttons.add(new AboutButton);bookConfig.HelpButtonVisible&&this.buttons.add(new HelpButton);bookConfig.EmailButtonVisible&&this.buttons.add(new ShareEmailButton);this.btnMore=new MoreButton;this.buttons.add(this.btnMore);this.buttons.each(function(b){b.setCallback(this.afterButtonClick.bind(this));this.setButtonTitle(b)}.bind(this))},
setButtonTitle:function(b){var c=new TextBubble({parent:this.parent,text:b.caption,color:this.color,textColor:b.fontColor,margin:7});b.setTitle(c)},initBar:virtual_function,initExtendedbar:virtual_function,onResize:virtual_function,initEvents:function(){function b(){this.extendedBar.visible&&this.extendedBar.hide()}this.topBar&&this.topBar.bind("click",b.bind(this));this.bottomBar&&this.bottomBar.bind("click",b.bind(this))},getHeight:function(){return this.getTopHeight()+this.getBottomHeight()},getTopHeight:function(){var b=
0,b=this.visible?this.topBar?this.topBar.height()+this.topBar.top():0:0;thumbnail&&(b+=thumbnail.getTopHeight());return b},getLogoHeight:function(){return this.topBar?this.topBar.height():0},getBottomHeight:function(){var b=0,b=this.visible?this.bottomBar?this.bottomBar.height()+this.bottomBar.bottom():0:0;thumbnail&&(b+=thumbnail.getBottomHeight());return b},getWidth:function(){return this.getLeftWidth()+this.getRightWidth()},getLeftWidth:function(){return 0},getRightWidth:function(){return 0},show:function(){if(!this.isMoving&&
!this.visible)if(isIE8())this.topBar&&this.topBar.css({display:"block"}),this.bottomBar&&this.bottomBar.css({display:"block"}),this.visible=!0;else{this.isMoving=!0;if(this.topBar){var b=transformCSS({tran:{x:0,y:0}});animateOnce(this.topBar,b,500)}this.bottomBar&&(b=transformCSS({tran:{x:0,y:0}}),animateOnce(this.bottomBar,b,500));this.visible=!0;(function(){this.isMoving=!1}).delay(this,500)}},hide:function(){if(!this.isMoving&&this.visible){var b=this.getTopHeight()+5,c=this.getBottomHeight()+
5;isIE8()?(this.topBar&&this.topBar.css({display:"none"}),this.bottomBar&&this.bottomBar.css({display:"none"}),this.visible=!1):(this.isMoving=!0,this.topBar&&(b=transformCSS({tran:{x:0,y:-b}}),animateOnce(this.topBar,b,500)),this.bottomBar&&(c=transformCSS({tran:{x:0,y:c}}),animateOnce(this.bottomBar,c,500)),this.visible=!1,function(){this.isMoving=!1}.delay(this,500))}},getButton:function(b){b=this.buttons.find(b);return 0==b.length?null:b.get(0)},pickButton:function(b){(b=this.getButton(b))&&this.buttons.remove(b);
return b},removeButton:function(b){"string"==typeof b&&(b=this.getButton(b));b&&this.buttons.remove(b)},addButton:function(b){b&&this.buttons.add(b)},changeFullscreenIcon:function(b){var c=this.getButton("fullscreen");c&&(b?c.setAsExitFullScreen():c.setAsFullScreen(),function(){this.onResize()}.delay(this,100))},changeLanguage:function(){this.buttons.each(function(b){b.changeLanguage()})},buttonsInExtendedBar:function(){var b=new ObjectPool;this.buttons.each(function(c){c.$parent==this.extendedBar.$bar&&
b.add(c)}.bind(this));return b},afterButtonClick:function(b){this.extendedBar.visible&&(b!=this.btnMore?this.extendedBar.hide():(b=this.buttonsInExtendedBar(),b.each(function(b){b.changeColor()}),b=null))},isRightToLeft:function(){var b=getLanguage("btnSearch","Search");return LanguageTool.isRightToLeft(b)}});
Class("ExtendedBar",{$bar:null,visible:!1,color:null,height:10,isMoving:!1,create:function(b){this.$parent=b;this.color=Color(bookConfig.toolbarColor);this.$bar=$("<div class='extendedBar'></div>");this.isRightToLeft()&&this.$bar.addClass("rtl");this.$parent.append(this.$bar);this.$bar.css({"background-color":this.color.toString(),display:"none"})},isRightToLeft:function(){var b=getLanguage("btnSearch","Search");return LanguageTool.isRightToLeft(b)},show:function(b){if(!0!=this.isMoving&&!0!=this.visible){this.visible=
this.isMoving=!0;this.$bar.css({left:b.left+b.width-this.width+"px",top:b.top+b.height+10+"px"});var c=0;this.$bar.css({display:"block",opacity:0});var d=function(){c+=0.1;this.$bar.css({opacity:c});equals(c,1)&&(d.stop(),this.isMoving=!1)}.interval(this,40)}},hide:function(){if(!0!=this.isMoving&&!1!=this.visible){this.isMoving=!0;this.visible=!1;var b=1,c=function(){b-=0.1;this.$bar.css({opacity:b});equals(b,0)&&(c.stop(),this.$bar.css("display","none"),this.isMoving=!1)}.interval(this,40)}},resize:virtual_function});Class("PhoneToolbarButtons",{setSrc:function(b,c){var d=$("<img style='pointer-events:none;'></img>");this.$caption=$("<span style='pointer-events:none;'></span>");c&&""!=c?d.attr("src",c):phone_toolbar_icons&&phone_toolbar_icons[b]?d.attr("src","data:image/png;base64,"+phone_toolbar_icons[b]):d.attr("src",phoneBaseURL+b+".png");this.$button.empty();this.$button.append(d);this.$button.append(this.$caption);this.colorChanged=!1},changeIcon:function(b,c){var d=$(this.$button.find("img")[0]);c&&""!=
c?d.attr("src",c):phone_toolbar_icons&&phone_toolbar_icons[b]?d.attr("src","data:image/png;base64,"+phone_toolbar_icons[b]):d.attr("src",phoneBaseURL+b+".png");this.colorChanged=!1}});Class("PhoneGotoPageButton",{create:function(){this._super();this.setSrc("gotoPage",bookConfig.GotoPageButtonIcon);this.initLanguage("btnGotoPage","Go to page");global.phoneGotoPagePanel||(global.phoneGotoPagePanel=new phoneGotoPage(tmpContainer))},onClick:function(b){global.phoneGotoPagePanel.showOrHide()}}).extend("PhoneToolbarButtons").extend("ToolbarButton");
Class("PhoneEmailButton",{create:function(){this._super();this.$button=$("<a target="+bookConfig.OpenWindow+" href='' class='button'></a>");this.$button.attr("href","http://gmail.google.com");this.setSrc("phoneEmail",bookConfig.EmailButtonIcon);this.initLanguage("btnShareEmail","Share by Email")},onClick:function(b){}}).extend("PhoneToolbarButtons").extend("ToolbarButton");
Class("PhoneLogo",{create:function(){this._super();var b=$("<img src='"+bookConfig.appLogoIcon+"' style='cursor:pointer;'/>");b.css({height:bookConfig.logoHeight+"px"});this.$button.append(b)},onClick:function(b){b=getLogoLink();b[0]&&($.browser.msie?window.location=b[0]:window.open(b[0],b[1]))},changeColor:function(){},changeLanguage:function(){}}).extend("PhoneToolbarButtons").extend("ToolbarButton");
Class("PhoneInstructionsButton",{create:function(){this._super();this.setSrc("instructions",bookConfig.InstructionsButtonIcon);this.initLanguage("btnInstructions","instructions")},onClick:function(b){bookConfig.InstructionsButtonVisible&&!window.bookInstructions&&(global.bookInstructions=new BookInstructions(tmpContainer));global.bookInstructions&&function(){bookInstructions.showOrHide()}.delay(10)}}).extend("PhoneToolbarButtons").extend("ToolbarButton");
Class("PhoneShoppingCartButton",{create:function(){this._super();this.setSrc("shoppingCart",bookConfig.ShoppingCartButtonIcon);this.shoppingNumber=$("<div id='shoppingNumber'>0</div>");this.shoppingNumber.css({width:"20px",height:"20px",position:"absolute",right:"-10px",top:"10px","font-size":"12px","text-align":"center",color:"#fff"});this.$button.append(this.shoppingNumber);this.initLanguage("btnShoppingCart","shoppingCart")},onClick:function(b){window.shoppingCart&&window.shoppingCart.showCart()},
setNumber:function(b){b||(b=0);this.shoppingNumber.html(b)}}).extend("PhoneToolbarButtons").extend("ToolbarButton");
Class("PhoneBookmarkButton",{create:function(){this._super();this.setSrc("addBookmark",bookConfig.BookmarkButtonIcon);getLanguage("AnnotMark","")?this.initLanguage("AnnotMark","bookmark"):this.initLanguage("btnBookMark","Bookmark");this.status=0},onClick:function(){var b={pageIndex:BookInfo.getCurrentPages()[0],caption:"",color:"#bababa"};global.bookmark&&(global.bookmark.addItem(b),global.bookmark.show())},setAsAdded:function(){1!=this.status&&(this.changeIcon("bookmark",bookConfig.BookmarkButtonIcon),
this.changeColor(),this.status=1)},setAsUnAdded:function(){0!=this.status&&(this.changeIcon("addBookmark",bookConfig.BookmarkButtonIcon),this.changeColor(),this.status=0)}}).extend("PhoneToolbarButtons").extend("BookmarkButton");
Class("PhoneBackgroundSoundButton",{onClick:function(){global.phoneSettingBody||(global.phoneSettingBody=new PhoneSettingForm({parent:tmpContainer,formType:"setting",rightToLeft:rightToLeft}),global.phoneSettingBody.onResize());global.phoneSettingBody&&global.phoneSettingBody.show()},onMouseEnter:function(){}}).extend("PhoneToolbarButtons").extend("BackgroundSoundButton");Class("PhoneTableOfContentButton",{}).extend("PhoneToolbarButtons").extend("TableOfContentButton");
Class("PhoneThumbnailButton",{}).extend("PhoneToolbarButtons").extend("ThumbnailButton");Class("PhoneShareButton",{}).extend("PhoneToolbarButtons").extend("ShareButton");Class("PhoneHomeButton",{}).extend("PhoneToolbarButtons").extend("HomeButton");Class("PhoneFirstPageButton",{}).extend("PhoneToolbarButtons").extend("FirstPageButton");Class("PhonePreviousPageButton",{}).extend("PhoneToolbarButtons").extend("PreviousPageButton");Class("PhoneNextPageButton",{}).extend("PhoneToolbarButtons").extend("NextPageButton");
Class("PhoneLastPageButton",{}).extend("PhoneToolbarButtons").extend("LastPageButton");Class("PhoneZoomButton",{}).extend("PhoneToolbarButtons").extend("ZoomButton");Class("PhoneSearchButton",{}).extend("PhoneToolbarButtons").extend("SearchButton");Class("PhoneAutoPlayButton",{}).extend("PhoneToolbarButtons").extend("AutoPlayButton");Class("PhoneAnnotationButton",{}).extend("PhoneToolbarButtons").extend("AnnotationButton");Class("PhoneVideoButton",{}).extend("PhoneToolbarButtons").extend("VideoButton");
Class("PhoneSlideshowButton",{}).extend("PhoneToolbarButtons").extend("SlideshowButton");Class("PhonePrintButton",{}).extend("PhoneToolbarButtons").extend("PrintButton");Class("PhoneDownloadButton",{}).extend("PhoneToolbarButtons").extend("DownloadButton");Class("PhoneFullscreenButton",{}).extend("PhoneToolbarButtons").extend("FullscreenButton");Class("PhoneLanguageButton",{}).extend("PhoneToolbarButtons").extend("LanguageButton");Class("PhoneAboutButton",{}).extend("PhoneToolbarButtons").extend("AboutButton");
Class("PhoneHelpButton",{}).extend("PhoneToolbarButtons").extend("HelpButton");Class("PhoneMoreButton",{}).extend("PhoneToolbarButtons").extend("MoreButton");Class("PhoneBackwardButton",{}).extend("PhoneToolbarButtons").extend("BackwardButton");Class("PhoneForwardButton",{}).extend("PhoneToolbarButtons").extend("ForwardButton");var phone_toolbar_icons={arrow_down:"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIhJREFUeNrslksWwCAMAqX3v3N6gdaEhFe7wJ0Lw/iBiIhYJ8e1Dg8DGMAAvwVQp1MwACGG2NZ7AoDwJOKlbnoFCohUPHuEE4iSeMUFHYiyeNWGDAQlzuRABYIWZ4NoB9ES7yQhEn+DtUoniqHY+bQXIJl/0owwFVd0QwzX+z9gAAMY4DzALcAAlzIaPWD+/O4AAAAASUVORK5CYII=",arrow_right:"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWF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smN0KwCAIRufYg9eTf9vlBv0Yy1L4BO8iDmlySgAcEeJUrktPwiiTBkCUJ2p97NJbcM3ecDAwu/RhepSgBCUoQQlKUIJWQVsqZx1dBXxrngZohz1JTfPEiY/ij4/C+2XKhgyqvUs9Kk4u+oeHc5SgBCUoQdeAtsxq+ScZnEpJ1Z6wQfMwUvrssDVzqfRqQbASD44ngkYG5ZvJ8s3kOm4BBgB8hGUNFd6i3gAAAABJRU5ErkJggg==",
print_off_phone:"iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAMAAADyHTlpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMxQTFRF6uvvxsnU+Pj6oaW4pqq7/v7+vsHOsLPD/f39zM7YxsjT3d7lqq2+q6+/7e3xuLvJ9PX3oqa4oKS38PDzp6q80tTd6eru2dvi0dPc+/v8p6u8/f7+/f3+oaW3vL/M8PH0wMPP3d/lx8nUpqm7o6e57/DzoaS33t/moqa57O3x3uDm6Onu9/j5wsTQpam76+zwqa2+3d/m6urvrK/A2driubzK9PT2vL7Mu77L3+DmxcjT+Pn619jgwcTQ9/f5ur3LwMLP19nhn6O2////RwhzIwAAAER0Uk5T/////////////////////////////////////////////////////////////////////////////////////////wBx0o8SAAABjklEQVR42pSV53KCQBRG2QWpFrCiYOzdWBKj6eXz/d8pK+gEIuzi/cfMGebuLedKx8whxT9zUk3VBo4z0NSalOOgtpFHJPKGnYLSvgw8EmtGdZ3OLFIA5D5NQl+qKH8/RH+z6JZRnV+hHgFKo/8vGZUA4sXR5gHOe9KzfxwcmlHUu4MipZRIwZ0XQU20Omnl7LRg/qFzTCVO6YfYXlBaxY7Xph0Gn2eU4Inf0lKQAkP37XGFj1bG7X2AGrgXTcoHjBOay6MuQhfI5xgqoSAewAIYeHTPZeOGiRpDVVhi1ILKUA1FMVqExlAFVIxSKAyVoYtRHfJtaKYE3oIEbnjWDcVyQcQoCVpwQ2OzjEs9HJcsQ9gNh/Boy8LRLst2uDB98cKQyxoqaPDIBhR6We4Jhvzl7mVWxmvELjoT0TqZXDMR6TG9fcFJzLcxxXMzLk3fTJJmhUnT9K9UPGEq7sZUXD+peJsk+CUJBN8rUt+nxV4geLJMPRub6NnYpJ6N8Bi5qrZqt1ea6nKPET9+BRgAmmObZGljhCAAAAAASUVORK5CYII=",
print_on_phone:"iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAMAAADyHTlpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIdQTFRFTJHshLPy/v7/2Of7nsP1Vpbt6/P9k7z0krz08ff+VpftaKLvXJruqcr2aKHvTJDsgLHyqMn2/P3/+Pv+VZbtlL306fL9TZHtW5ruwdj58fb+wNj4XZvuv9j4VJbtf7Dy+/z/+/3/ncP1vtf4kbv0wdn58Pb9fK7x1+b7fq/y////SI7s////Zf6CDQAAAC10Uk5T//////////////////////////////////////////////////////////8Ape8L/QAAATNJREFUeNqM1eeSgyAUBWCwYYkaW3rf7s37P9+yGGdBLuX8SibfTBAvB/L0DlG/BmFJi3677QtahoGFJtEJpJyixECzgcAiZMgw+pEDknyv0ZaBIaxVaXcFY66dTNs1WLJuJZqCNek/3YMj55lmuYv2ny/KwJl0opvaTeuNoJGFjOPrQ/RHg5VNznQVcBr6SICQ08ZLQskp9ZJAOa28JFScxl4SYk6JlwRiopoUNF7uNirFAir9Z0SKx6IawKTYrGb5t6gUr+B7sURcihcrj8sogkkxLsoQmuQ0hM+EYAO62NVkOjCD+xSw+RjGLhln8+E+uuibd2W8S+1ysxfRTam3L7P86dTSvBvXkN61Kj7iVXzGCv7A9IJnB9O18djJcPdIrJdRQ4tLXV8K2lgvI3t+BRgAzCUYruaGSw8AAAAASUVORK5CYII=",
search:"iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAoZJREFUeNrUmE1PFEEQhmc2R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5J9ok+nV7d4+btNp1dHeC4AmjmR1dYWdKT1snGnQUoxgFT+CJYcIoeAJP4AmjGAVP4IlhwmhWR0WiKxNc5UPsFGAAA2kTaCYi6JoAAAAASUVORK5CYII="};Class("PhoneButtonQueue",{create:function(b){this.container=b.container;this.extended=b.extended;this.topBar=b.topBar;this.bottomBar=b.bottomBar;this.buttonWidth=b.buttonWidth;this.barWidth=b.barWidth;this.buttonTop=b.buttonTop;this.buttons=b.buttons.clone();this.buttons.each(function(b){b.freedom();b.hint=!1});this.initTopBar();this.initBottomBarArray()},initBottomBarArray:function(){this.bottomBarArray=[];var b=this.buttons.length;if(6<b){for(var c=0;5>c;c++){var d=this.buttons.get(0);this.bottomBarArray.push(d);
this.buttons.remove(d)}this.bottomBarArray.push(this.pickButtonsByName("more"))}else for(c=0;c<b;c++)d=this.buttons.get(0),this.bottomBarArray.push(d),this.buttons.remove(d);for(c=0;c<this.bottomBarArray.length;c++)this.bottomBarArray[c]&&this.bottomBarArray[c].addTo(this.bottomBar)},initTopBar:function(){if(this.btnInstructions=this.pickButtonsByName("instructions"))this.btnInstructions.setPosition(this.barWidth-this.buttonWidth-10,this.buttonTop),this.btnInstructions.addTo(this.topBar)},pickButtonsByName:function(b){b=
this.buttons.find(b).get(0);this.buttons.remove(b);return b},autoCenter:function(b,c,d,f){if(b&&!(0>=b.length)){var g=b.length;c=Math.max((c-d*g)/(g-1),0);void 0==f&&(f=0);for(var h=0;h<g;h++)b[h].$button.css("left",c*h+d*h+f)}},sort:function(){this.barWidth=Math.min(windowWidth,340);this.buttonWidth=40;this.barLeft=(windowWidth-this.barWidth)/2+7;this.autoCenter(this.bottomBarArray,this.barWidth-15,this.buttonWidth,this.barLeft);for(var b=0;b<this.buttons.length;b++)this.buttons.get(b).addTo(this.extended)}});Class("PhoneToolbar",{initBar:function(){this.topBar=$("<div class='phoneTopBar'></div>");this.bottomBar=$("<div class='phoneBottomBar'></div>");this.parent.append(this.topBar);this.parent.append(this.bottomBar);bookConfig.appLogoIcon&&(this.logo=new PhoneLogo,this.logo.setPosition(10,0),this.logo.addTo(this.topBar));this.initStyle();this.enterToShow()},initButtons:function(){this.buttons=new ObjectPool;global.pageEditor&&global.pageEditor.setting&&parseBool(global.pageEditor.setting.shoppingCartHTML)&&
this.buttons.add(new PhoneShoppingCartButton);bookConfig.ThumbnailsButtonVisible&&this.buttons.add(new PhoneThumbnailButton);bookConfig.TableOfContentButtonVisible&&this.buttons.add(new PhoneTableOfContentButton);this.buttons.add(new PhoneGotoPageButton);bookConfig.ZoomButtonVisible&&this.buttons.add(new PhoneZoomButton);bookConfig.BookMarkButtonVisible&&this.buttons.add(new PhoneBookmarkButton);(bookConfig.BackgroundSoundButtonVisible||bookConfig.FlipSound)&&this.buttons.add(new PhoneBackgroundSoundButton);
bookConfig.SearchButtonVisible&&this.buttons.add(new PhoneSearchButton);bookConfig.PrintButtonVisible&&this.buttons.add(new PhonePrintButton);bookConfig.AnnotationButtonVisible&&!isPhone()&&this.buttons.add(new PhoneAnnotationButton);bookConfig.ShareButtonVisible&&this.buttons.add(new PhoneShareButton);bookConfig.DownloadButtonVisible&&this.buttons.add(new PhoneDownloadButton);1<language.length&&this.buttons.add(new PhoneLanguageButton);bookConfig.HomeButtonVisible&&this.buttons.add(new PhoneHomeButton);
bookConfig.AutoPlayButtonVisible&&this.buttons.add(new PhoneAutoPlayButton);bookConfig.EmailButtonVisible&&this.buttons.add(new PhoneEmailButton);1>=this.buttons.length&&bookConfig.enablePageBack&&(this.buttons.remove(this.buttons.find("gotopage").get(0)),this.buttons.add(new PhoneBackwardButton),this.buttons.add(new PhoneFirstPageButton),this.buttons.add(new PhonePreviousPageButton),this.buttons.add(new PhoneNextPageButton),this.buttons.add(new PhoneLastPageButton),this.buttons.add(new PhoneForwardButton));
3>=this.buttons.length&&!bookConfig.enablePageBack&&(this.buttons.remove(this.buttons.find("gotopage").get(0)),this.buttons.add(new PhoneFirstPageButton),this.buttons.add(new PhonePreviousPageButton),this.buttons.add(new PhoneNextPageButton),this.buttons.add(new PhoneLastPageButton));6<this.buttons.length&&this.buttons.add(new PhoneMoreButton);bookConfig.InstructionsButtonVisible&&this.buttons.add(new PhoneInstructionsButton);this.buttons.each(function(b){b.setCallback(this.afterButtonClick.bind(this));
this.setButtonTitle(b)}.bind(this))},setButtonTitle:function(b){b.setTitle(b.caption)},resetButtonPosition:function(){(new PhoneButtonQueue({buttons:this.buttons,barWidth:windowWidth,buttonWidth:40,buttonTop:0,topBar:this.topBar,bottomBar:this.bottomBar,extended:this.extendedBar.$bar})).sort();this.extendedBar.resize(this.buttonsInExtendedBar());this.extendedBar.hide();this.buttons.each(function(b){b.changeColor();b.changeCaptionColor()}.bind(this))},initStyle:function(){bookConfig.appLogoIcon||bookConfig.InstructionsButtonVisible||
this.topBar.remove();this.topBar.css({background:this.color});this.bottomBar.css({"background-color":this.color})},initExtendedbar:function(){this.extendedBar=new PhoneExtendedBar(this.parent);global.moreBar=this.extendedBar},onResize:function(b,c){this.resetButtonPosition()},getHeight:function(){return 0},getTopHeight:function(){return 0},getLogoHeight:function(){return 0},getBottomHeight:function(){return 0},getWidth:function(){return 0},initEvents:function(){this.topBar&&this.topBar.bind(_event._enter,
function(){this.enterOption&&window.clearTimeout(this.enterOption)}.bind(this));this.bottomBar&&this.bottomBar.bind(_event._enter,function(){this.enterOption&&window.clearTimeout(this.enterOption)}.bind(this))},show:function(){this.visible||(this.visible=!0,this.bottomBar.animate({bottom:0},300),this.topBar.animate({top:0},300),bookType==BookType.singlePhone_book&&singlePhoneBook&&singlePhoneBook.setShow(!1),bookType==BookType.phone_book&&phoneBook&&phoneBook.setShow(!1))},hide:function(){this.visible&&
(this.enterOption&&window.clearTimeout(this.enterOption),this.visible=!1,this.bottomBar.animate({bottom:-60},300),this.topBar.animate({top:-60},300),global.phoneGotoPagePanel&&global.phoneGotoPagePanel.hide(),this.extendedBar&&this.extendedBar.hide(),bookType==BookType.singlePhone_book&&singlePhoneBook&&singlePhoneBook.setShow(!0),bookType==BookType.phone_book&&phoneBook&&phoneBook.setShow(!0))},showOrHide:function(){!0===this.visible?this.hide():this.show()},enterToShow:function(){this.show();this.enterOption=
window.setTimeout(this.hide.bind(this),3E3)}}).extend("Toolbar");
Class("PhoneExtendedBar",{create:function(b){this._super(b);this.$bar.addClass("phone");this.$bar.css({overflow:"visible"});this.arrow=$("<div class='arrow'></div>");this.arrow.css({"border-color":this.color.toString()+" transparent transparent transparent"});this.$bar.append(this.arrow);this.$bar.addBorderShadow(this.color.toString(),0,2)},show:function(b){if(!0!=this.isMoving&&!0!=this.visible){this.visible=this.isMoving=!0;b=b.left+b.width/2-8;var c=b-this.width/2,c=Math.min(windowWidth-this.width-
5,c);this.arrow.css("left",b-this.width/2-c+this.width/2+"px");this.$bar.css({left:c+"px",bottom:"47px"});var d=0;this.$bar.css({display:"block",opacity:0});var f=function(){d+=0.1;this.$bar.css({opacity:d});equals(d,1)&&(f.stop(),this.isMoving=!1)}.interval(this,40)}},resize:function(b){for(var c=0;c<b.length;c++)b.get(c).setPosition(5,5+40*c);this.width=160;this.height=40*b.length+10;this.$bar.css({width:this.width+"px",height:this.height+"px"})}}).extend("ExtendedBar");var AnalysisThumbnail=Class({create:function(b,c){this.callback=c;this.fillImage(b)},loaded:function(b){this.callback(b)},fillImage:function(b){this.pageIndex=b;var c=function(b){this.loaded(b);this.fill=!0}.bind(this);fillImageAfterLoaded(b,"thumb",c)}});var ThumbnailCell=Class({create:function(b,c){this.parent=b;this.margin=c.margin;this.index=c.index;this.imageWidth=c.imageWidth;this.imageHeight=c.imageHeight;this.item=$("<div class='item'></div>");this.initHtml();this.initEvent();this.onResize()},onResize:function(){this.length=this.imageWidth;this.image.css({width:this.imageWidth+"px",height:this.imageHeight+"px"})},initHtml:function(){this.initStructure();this.item.append(this.image);this.item.append(this.title);this.parent.append(this.item)},
initStructure:function(){this.image=$("<img/>");this.title=$("<p class='title'>"+getShownPageNumber(this.index)+"</p>");this.loading()},loading:function(){this.image.css({"background-color":"#ffffff","background-image":"url("+uiBaseURL+"loading.gif)","background-repeat":"no-repeat","background-position":"center"})},unLoading:function(){this.image.css({"background-image":""})},setStyle:function(b){this.item.css(b)},addClass:function(b){this.item.addClass(b)},removeClass:function(b){this.item.removeClass(b)},
initEvent:function(){this.item.onTap(function(){gotoPageFun(this.index)}.bind(this))},fillContent:function(){var b=function(b){this.image.attr("src",b);this.image.css({width:this.imageWidth+"px",height:this.imageHeight+"px"});this.unLoading()}.bind(this);this.analysis=new AnalysisThumbnail(this.index,b)},getDom:function(){return this.item},fission:function(){this.title.show();this.item.addClass("focus")},merge:function(){this.title.hide();this.item.removeClass("focus")},setHighLight:function(b){this.index==
b&&this.item.addClass("highlight")},clearHighLight:function(){this.item.removeClass("highlight")}});var ThumbnailItem=Class({create:function(b,c){this.parent=b;this.margin=c.margin;this.pages=c.pages;this.parm=c;this.cells=[];this.initHtml();this.onResize()},onResize:function(){for(var b=this.length=0;b<this.cells.length;b++)this.length+=this.cells[b].length;this.item.css({width:this.length+"px"})},initHtml:function(){this.item=$("<div class='item_focus focus'></div>");this.initStructure();this.addItem();this.item.append(this.title);this.parent.append(this.item)},initStructure:function(){this.initCells();
for(var b=getShownPageNumber(this.cells[0].index),c=1;c<this.cells.length;c++)b=b+"-"+getShownPageNumber(this.cells[c].index);this.title=$("<p class='title'>"+b+"</p>")},addItem:function(){for(var b=this.cells.length,c=0;c<b;c++)this.item.append(this.cells[c].getDom())},fillContent:function(){for(var b=this.cells.length,c=0;c<b;c++)this.cells[c].fillContent(0)},initCells:function(){for(var b=0;b<this.pages.length;b++){var c=new ThumbnailCell(this.item,{index:this.pages[b],imageWidth:this.parm.imageWidth,
imageHeight:this.parm.imageHeight,margin:this.parm.margin});this.cells.push(c)}},setPosition:function(b,c){this.item.css(c,b+"px")},fission:function(){this.item.removeClass("focus");1==this.cells.length?(BookInfo.isLeftPage(this.cells[0].index,!0)?this.cells[0].setStyle({left:"-3px",right:"auto"}):this.cells[0].setStyle({right:"-3px",left:"auto"}),this.cells[0].fission(),this.title.hide()):(this.item.removeClass("focus"),this.title.hide(),this.cells[0].fission(),this.cells[1].fission(),this.cells[0].setStyle({left:"-3px",
right:"auto"}),this.cells[1].setStyle({right:"-3px",left:"auto"}),this.cells[0].removeClass("left"),this.cells[1].removeClass("right"))},merge:function(){1==this.cells.length?(this.title.show(),this.cells[0]&&this.cells[0].setStyle({left:"0",right:"0"})):(this.item.addClass("focus"),this.title.show(),this.cells[0].merge(),this.cells[1].merge(),this.cells[0].setStyle({left:"0",right:"auto"}),this.cells[1].setStyle({right:"0",left:"auto"}),this.cells[0].addClass("left"),this.cells[1].addClass("right"))},
setHighLight:function(b){for(var c=0;c<this.cells.length;c++)this.cells[c].setHighLight(b);this.item.addClass("highlight")},clearHighLight:function(){this.item.removeClass("highlight");for(var b=0;b<this.cells.length;b++)this.cells[b].clearHighLight()}});var ThumbnailFrame=Class({create:function(b){this._super(b);this.direction=rightToLeft?Direction.right:Direction.left;this.leftButtonUrl=uiBaseURL+"prev_page.png";this.rightButtonUrl=uiBaseURL+"next_page.png";this.itemArray=[];this.taskList=new TaskList;this.initDefaultDom();this.initHtml();this.initEvent();this.refresh();this.initCss();this.hide()},initHtml:virtual_function,initCss:function(){rightToLeft&&this.stage.addClass("rightToLeft");this.stage.css({"background-color":this.mainColor,color:this.fontColor});
this.close.css({"background-color":this.mainColor})},initDefaultDom:function(){this.closeUrl=form_icons.close?"data:image/png;base64,"+form_icons.close:uiBaseURL+"close.png";this.close=$("<div class='close'><img src='"+this.closeUrl+"'/></div>");this.close.click(this.hide.bind(this));this.initSwiper()},initSwiper:function(){this.thumbnailSwiper=$("<div class='thumbnailSwiper stage'></div>");this.thumbnailSwiperList=$("<div class='swiper'></div>");this.progress=$("<div class='progress'></div>");this.progressBar=
$("<div class='progressBar'></div>");this.refreshSwiper(this.thumbnailSwiperList);this.thumbnailSwiper.append(this.thumbnailSwiperList);this.thumbnailSwiper.append(this.progress);this.progress.append(this.progressBar)},initEvent:function(){this.stage.bind("mousedown touchstart",function(b){b.stopPropagation()});if(this.leftBtn)this.leftBtn.onTap(function(){this.stage.move(-170)}.bind(this));if(this.rightBtn)this.rightBtn.onTap(function(){this.stage.move(170)}.bind(this));rightToLeft?this.thumbnailSwiper.scroll({},
Direction.right,"win10"):this.thumbnailSwiper.scroll({},Direction.left,"win10")},onResize:function(){if(this.thumbnailSwiperList.width()<windowWidth-40){var b=this.thumbnailSwiperList.width();this.thumbnailSwiper.css({width:b+"px",margin:"20px "+(windowWidth-b)/2+"px"});this.height=220}else this.thumbnailSwiper.css({width:"auto",margin:"20px"}),this.height=254;this.refresh();this.stage.css({top:(windowHeight-this.height)/2+"px",height:this.height+"px"});this.taskList.setLargeLength(15)},refresh:function(){this.thumbnailSwiper.refreshData()},
refreshSwiper:function(b){this.length=0;for(var c=BookInfo.getThumbnailPages(),d=0;d<c.length;d++)this.addItem(b,c[d]);b.css("width",this.length+"px")},mergeAll:function(){for(var b=0;b<this.itemArray.length;b++)this.itemArray[b].merge()},fissionAll:function(){for(var b=0;b<this.itemArray.length;b++)this.itemArray[b].fission()},addItem:function(b,c){var d={pages:c,margin:12,imageHeight:170};d.imageWidth=parseInt(bookConfig.largePageWidth*d.imageHeight/bookConfig.largePageHeight);d.length=d.imageWidth;
d=new ThumbnailItem(b,d);d.setPosition(this.length,this.direction);this.length+=d.length;this.length+=d.margin;this.itemArray.push(d)},clearHighLight:function(){$(".highlight").removeClass("highlight")},setHighLight:function(b){$(".highlight").removeClass("highlight");for(var c=0;c<this.itemArray.length;c++)0<=this.itemArray[c].pages.indexOf(b)&&this.itemArray[c].setHighLight(b);window.setTimeout(this.thumbnailSwiper.animateToCenterItem,10)},getShowStatu:function(){return this.visible},getHeight:function(){return this.getTopHeight()+
this.getBottomHeight()},getTopHeight:function(){return 0},getBottomHeight:function(){return 0},showOrHide:function(){this.visible?this.hide():this.show()},fillImage:function(b){this.itemArray&&this.itemArray[b]&&!this.itemArray[b].fill&&(this.itemArray[b].fillContent(),this.itemArray[b].fill=!0)},fillContent:function(){this.interval&&!this.interval.isRunning()?this.interval.start():this.interval=function(){this.performTask()}.interval(this,60)},performTask:function(){for(var b=this.getShownItems(),
c=b[1],b=b[0];b<=c;b++){var d=function(){thumbnail.fillImage(this.index)}.bind({index:b});d.id=b;this.taskList.unShiftTask(d)}},getShownItems:function(){var b=this.thumbnailSwiper.stageLength,c=-this.thumbnailSwiper.getCurrentLength(),d=2*this.itemArray[0].length+this.itemArray[0].margin,b=parseInt(b/d)+2,c=parseInt(c/d),d=Math.min(c+b,this.itemArray.length),c=Math.max(0,c);return[c,d]},show:function(){this.setHighLight(BookInfo.getCurrentPageIndex());this.visible=!0;this.stage.show();this.refresh();
this.fillContent();this.close.changeButtonColor(this.fontColor)},hide:function(){this.visible=!1;this.stage.hide();this.interval&&this.interval.stop()}}).extend(FormFrame);var ThumbnailForm=Class({create:function(b){this.height=274;this._super(b)},initHtml:function(){this.stage=$("<div class='thumbnail_win10'></div>");this.stage.append(this.close);this.stage.append(this.thumbnailSwiper);this.parent.append(this.stage)}}).extend(ThumbnailFrame);var toolbar_icons={First:"iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9I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ac+zpsOpG/KyIrJl2j/LX5/+GnAAMAemmoiJErTcYAAAAASUVORK5CYII="};Class("ButtonQueue",{create:function(b){this.leftBar=b.leftBar;this.pageBar=b.pageBar;this.rightBar=b.rightBar;this.edtNumber=b.edtNumber;this.extended=b.extended;this.buttonWidth=b.buttonWidth;this.buttons=b.buttons.clone();this.buttons.each(function(b){b.freedom();b.$button.removeClass("left");b.$button.removeClass("right");b.hint=!0});this.pickButtons()},pickButtons:function(){this.btnFirst=this.buttons.find("first").get(0);this.btnPrevious=this.buttons.find("previous").get(0);this.btnNext=this.buttons.find("next").get(0);
this.btnLast=this.buttons.find("last").get(0);this.buttons.remove(this.btnFirst);this.buttons.remove(this.btnPrevious);this.buttons.remove(this.btnNext);this.buttons.remove(this.btnLast);this.pageButtonCount=4;bookConfig.enablePageBack&&(this.btnBackward=this.buttons.find("backward").get(0),this.btnForward=this.buttons.find("forward").get(0),this.buttons.remove(this.btnBackward),this.buttons.remove(this.btnForward),this.pageButtonCount=6);this.buttonCount=this.buttons.length},sort:virtual_function});
Class("PCButtonQueue",{sort:function(){for(var b=2*Math.floor(this.leftBar.width/this.buttonWidth),b=Number.between(b,0,this.buttonCount),c=b/2,d=[],f=0;f<this.buttons.length;f++){var g=this.buttons.get(f);f<b?(g==this.buttons.find("sound").get(0)&&(g.title=!1,VolumeControlBar.config.direction=VolumeControlBar.TOP),f<c?(g.addTo(this.leftBar.body),g.$button.addClass("left")):d.push(g)):(g==this.buttons.find("sound").get(0)&&(g.title=!1,VolumeControlBar.config.direction=VolumeControlBar.DEFAULT),g.addTo(this.extended),
g.hint=!1)}for(f=d.length-1;0<=f;f--)g=d[f],g==this.buttons.find("sound").get(0)&&(g.title=!1,VolumeControlBar.config.direction=VolumeControlBar.TOP),g.addTo(this.rightBar.body),g.$button.addClass("right");this.addPageButtons(this.leftBar.width)},addPageButtons:function(b){function c(b){b.addTo(g);b.setPosition(h,l);h+=k}function d(){h+=p-2;0<f?(m.css({left:h+"px",top:n+"px",width:f+"px",display:"block"}),h+=f):m.css({display:"none"});h+=p}var f=this.edtNumber.width,g=this.pageBar.body,h=b,k=this.buttonWidth,
l=this.buttonTop,m=this.edtNumber.body,n=this.edtNumber.top,p=this.edtNumber.space;rightToLeft?(bookConfig.enablePageBack&&c(this.btnForward),c(this.btnLast),c(this.btnNext),d(),c(this.btnPrevious),c(this.btnFirst),bookConfig.enablePageBack&&c(this.btnBackward)):(bookConfig.enablePageBack&&c(this.btnBackward),c(this.btnFirst),c(this.btnPrevious),d(),c(this.btnNext),c(this.btnLast),bookConfig.enablePageBack&&c(this.btnForward))}}).extend("ButtonQueue");
Class("MobileButtonQueue",{sort:function(b,c){var d=this.edtNumber.width+2*this.edtNumber.space+4*this.buttonWidth;this.addPageButtons(d,(this.container.width-d)/2);this.buttons.each(function(b){b.addTo(this.extended)}.bind(this))}}).extend("ButtonQueue");(function(b){b.fn.asMetroButton=function(c){function d(){this.css({"background-color":"rgba(255,255,255,0.2)"});g.css({display:"block"});this.isActive=!0}function f(){this.css({"background-color":"transparent"});g.css({display:"none"});this.isActive=!1}this.children("div[name=leftBorder]").remove();var g=this.children("div[name=bottomBorder]");g.length||(g=b("<div></div>"),this.append(g));g.css({position:"absolute",bottom:"0px",width:this.width()+"px",height:"2px","background-color":c,"pointer-events":"none",
display:"none"});"absolute"==this.css("position")&&g.css("left","0px");this.bind("mouseenter",d.bind(this));this.bind("mouseleave",f.bind(this));this.bind("blur",f.bind(this));this.bind("mousedown",function(){this.css({"background-color":"rgba(255,255,255,0.3)"});g.css({display:"block"});this.isActive=!0}.bind(this));this.bind("mouseup",d.bind(this));return this};b.fn.asMetroMenu=function(c){function d(){this.css({"background-color":"rgba(255,255,255,0.2)"});g.css({display:"block"});this.isActive=
!0}function f(){this.css({"background-color":"transparent"});g.css({display:"none"});this.isActive=!1}this.children("div[name=bottomBorder]").remove();var g=this.children("div[name=leftBorder]");g.length||(g=b("<div></div>"),this.append(g));g.css({position:"absolute",top:"0px",left:"0px",width:"2px",height:this.height()+"px","background-color":c,"pointer-events":"none",display:"none"});this.bind("mouseenter",d.bind(this));this.bind("mouseleave",f.bind(this));this.bind("blur",f.bind(this));this.bind("mousedown",
function(){this.css({"background-color":"rgba(255,255,255,0.3)"});g.css({display:"block"});this.isActive=!0}.bind(this));this.bind("mouseup",d.bind(this));return this}})(jQuery);
Class("PCToolbar",{BUTTON_WIDTH:45,initBar:function(){VolumeControlBar.config={color:this.color.toString(),iconColor:Color(bookConfig.iconColor).toString(),direction:VolumeControlBar.TOP};this.topBar=$('<div class="fbTopBar" id = "fbTopBar"></div>');this.logoBar=$("<div id='logoBar' class='logoBar'></div>");this.searchBar=$("<div class='searchBar'></div>");this.bottomBar=$("<div id='fbToolBar' class='fbToolBar'></div>");this.leftButtonBar=$("<div class='buttonBar left'></div>");this.rightButtonBar=
$("<div class='buttonBar right'></div>");this.pageBar=$("<div class='pageBar'></div>");this.edtPageNumber=$("<div class='pageNumber' id='tfPageIndex'><input type='text' id='currentPageIndexTextField' size='15' /></div>");this.parent.append(this.topBar);this.parent.append(this.bottomBar);this.topBar.append(this.logoBar);this.topBar.append(this.searchBar);this.bottomBar.append(this.leftButtonBar);this.bottomBar.append(this.pageBar);this.bottomBar.append(this.rightButtonBar);this.pageBar.append(this.edtPageNumber);
this.initStyle();this.initPageNumber();this.initMoreButton();this.initSearchBar()},initStyle:function(){this.topBar.css({"background-color":this.color.toString()});this.bottomBar.css({"background-color":this.color.toString()});this.searchBackgroundColor=Color(this.color.add(96));this.searchButtonColor=Color(this.color.add(32));this.searchFontColor=Color(this.searchBackgroundColor.add(32));this.isDifferMinThan(this.searchBackgroundColor,this.searchFontColor,16)&&(this.searchFontColor=Color("#CCCCCC"))},
isDifferMinThan:function(b,c,d){b=Color(b);c=Color(c);b=b.difference(c);return b.r<d||b.g<d||b.b<d},initPageNumber:function(){var b=this.edtPageNumber.children("input");b.css({color:Color(bookConfig.pageNumColor).toString(),"text-align":"center"});var c=parseInt(bookConfig.totalPageCount),d=16;""==bookConfig.pageNumberCaption&&(1E4<=c&&(d=16),1E4>c&&(d=10),1E3>c&&(d=7),100>c&&(d=4),10>c&&(d=3));b.attr("size",d);this.edtPageWidth=this.edtPageNumber.width()},initSearchBar:function(){this.btnPreSearch=
this.pickButton("search");this.btnPreSearch||(this.btnPreSearch=new SearchButton,this.setButtonTitle(this.btnPreSearch));this.btnPreSearch.onClick=this.onSearchButtonClick.bind(this);this.edtPreSearch=$("<div class='preSearch' id='preSearchContent'><input type='text' size='30'  value=''/></div>");this.isRightToLeft()?(this.edtPreSearch.find("input").attr("dir","rtl"),this.btnPreSearch.$button.addClass("left"),this.edtPreSearch.css({"float":"right"})):this.btnPreSearch.$button.addClass("right");this.searchBar.append(this.edtPreSearch);
this.btnPreSearch.addTo(this.searchBar);this.btnPreSearch.hint=!1;this.btnPreSearch.$button.asButton();this.btnPreSearch.changeColor(this.searchButtonColor.toString());this.searchBar.css({"background-color":this.searchBackgroundColor.toString()});this.edtPreSearch.css({"background-color":this.searchBackgroundColor.toString()});this.edtPreSearch.find("input").css({"background-color":this.searchBackgroundColor.toString(),color:this.searchFontColor.toString()});bookConfig.SearchButtonVisible||this.searchBar.css({display:"none"})},
initPageButton:function(){rightToLeft?(this.leftButton=new NextPageButton,this.rightButton=new PreviousPageButton):(this.leftButton=new PreviousPageButton,this.rightButton=new NextPageButton);this.leftButton.setSrc("previous_normal");this.rightButton.setSrc("next_normal");this.leftButton.$button.attr("class","floatPageButton");this.rightButton.$button.attr("class","floatPageButton");this.leftButton.$button.asButton().mouseEnterLight(this.color.toString());this.rightButton.$button.asButton().mouseEnterLight(this.color.toString());
this.leftButton.addTo(this.parent);this.rightButton.addTo(this.parent)},initMoreButton:function(){this.removeButton("more");this.btnMore.hint=!1;this.btnMore.$button.addClass("right")},setButtonTitle:function(b){var c=new SolidArrowTextBubble({parent:this.parent,text:b.caption,color:this.color,textColor:b.fontColor});b.setTitle(c)},initExtendedbar:function(){this.extendedBar=new PCExtendedBar(this.parent);global.moreBar=this.extendedBar},initEvents:function(){this._super();this.edtPreSearch.bind("keydown",
function(b){13==b.keyCode&&this.btnPreSearch.click()}.bind(this));var b=this.edtPreSearch.find("input"),c=getLanguage("btnSearch","Search");b.val(c);b.bind("focus",function(d){this.searchBar.css({"background-color":"white"});this.edtPreSearch.css({"background-color":"white"});b.css({"background-color":"white",color:"black"});b.val()==c&&b.val("")}.bind(this));b.bind("blur",function(d){this.searchBar.css({"background-color":this.searchBackgroundColor.toString()});this.edtPreSearch.css({"background-color":this.searchBackgroundColor.toString()});
b.css({"background-color":this.searchBackgroundColor.toString(),color:this.searchFontColor.toString()});""==b.val()&&b.val(c)}.bind(this))},onSearchButtonClick:function(b){frmSearch.visible||frmSearch.show();b=getLanguage("btnSearch","Search");var c=this.edtPreSearch.find("input").val();c==b&&(c="");frmSearch.search(c)},onResize:function(b,c){b=void 0==b?this.parent.width():parseInt(b);c=void 0==c?this.parent.height():parseInt(c);var d=this.logoBar.width()+20,f=this.searchBar.width()+10;d+f+this.BUTTON_WIDTH>
b?this.searchBar.css({display:"none"}):bookConfig.SearchButtonVisible?this.searchBar.css({display:"block"}):this.searchBar.css({display:"none"});d+this.BUTTON_WIDTH>b?this.logoBar.css({display:"none"}):this.logoBar.css({display:"block"});d=bookConfig.enablePageBack?6:4;d=this.edtPageWidth+d*this.BUTTON_WIDTH+3*(d-3);f=(b-d)/2;this.leftButtonBar.css({width:f+"px"});this.pageBar.css({width:d+"px"});this.rightButtonBar.css({width:f+"px"});if(this.showPageButtons){var g=(c-160)/2;this.leftButton.$button.css({left:"0px",
top:g+"px"});this.rightButton.$button.css({right:"0px",top:g+"px"})}this.buttonBarWidth=f;this.pageBarWidth=d;this.resetButtonPosition()},resetButtonPosition:function(){(new PCButtonQueue({buttons:this.buttons,buttonWidth:this.BUTTON_WIDTH,buttonTop:0,leftBar:{body:this.leftButtonBar,width:this.buttonBarWidth},rightBar:{body:this.rightButtonBar,width:this.pageBarWidth},pageBar:{body:this.pageBar,width:this.buttonBarWidth},edtNumber:{body:this.edtPageNumber,width:this.edtPageWidth,top:14,space:5},
extended:this.extendedBar.$bar})).sort();var b=this.buttonsInExtendedBar();this.extendedBar.resize(b);this.extendedBar.hide();0<b.length?(this.btnMore.addTo(this.topBar),this.btnMore.changeColor(),this.btnMore.$button.asButton(),this.btnMore.setCallback(this.afterButtonClick.bind(this)),this.searchBar.css({right:"46px"})):(this.btnMore.freedom(),this.searchBar.css({right:"10px"}));this.buttons.each(function(b){b.changeColor();b.$parent==this.extendedBar.$bar?b.$button.asMetroMenu(b.color.toString()):
b.$button.asMetroButton(b.color.toString())}.bind(this))},show:function(){if(!this.isMoving&&!this.visible&&(this._super(),this.showPageButtons))if(isIE8())this.leftButton.$button.css({display:"block"}),this.rightButton.$button.css({display:"block"});else{var b=transformCSS({tran:{x:0,y:0}});animateOnce(this.leftButton.$button,b,500);animateOnce(this.rightButton.$button,b,500)}},hide:function(){if(!this.isMoving&&this.visible&&(this._super(),this.showPageButtons))if(isIE8())this.leftButton.$button.css({display:"none"}),
this.rightButton.$button.css({display:"none"});else{var b=transformCSS({tran:{x:-63,y:0}});animateOnce(this.leftButton.$button,b,500);b=transformCSS({tran:{x:63,y:0}});animateOnce(this.rightButton.$button,b,500)}},afterButtonClick:function(b){this._super(b);b.getStatus&&(b.$parent==this.extendedBar.$bar?b.$button.asMetroMenu(b.color.toString()):b.$button.asMetroButton(b.color.toString()),b.$button.isActive&&b.$button.trigger("mouseenter"))}}).extend("Toolbar");
Class("PCExtendedBar",{show:function(b){if(!0!=this.isMoving&&!0!=this.visible){this.visible=this.isMoving=!0;this.$bar.css({left:b.left+b.width-this.width+"px",top:b.top+b.height+"px",display:"block"});var c=-this.height,d=transformCSS({tran:{x:0,y:c}});this.$bar.css(d);(function(b,g){c+=this.height/g;d=transformCSS({tran:{x:0,y:c}});this.$bar.css(d);b==g&&(this.isMoving=!1)}).runInAnimate(this,300)}},hide:function(){if(!0!=this.isMoving&&!1!=this.visible){this.isMoving=!0;this.visible=!1;var b=
0,c=transformCSS({tran:{x:0,y:0}});this.$bar.css(c);(function(d,f){b-=this.height/f;c=transformCSS({tran:{x:0,y:b}});this.$bar.css(c);d==f&&(this.$bar.css({display:"none"}),this.isMoving=!1)}).runInAnimate(this,300)}},resize:function(b){for(var c=0;c<b.length;c++)b.get(c).setPosition(0,46*c);this.width=160;this.height=46*b.length;this.$bar.css({width:this.width+"px",height:this.height+"px"})}}).extend("ExtendedBar");var CatalogThumbnailItem=Class({create:function(b,c,d){this.itemContent=b;this.dockMenuContent=c;this.index=d;this.item=$("<div class='thumbnailItem'></div>");this.rect=$("<div class='thumbnailRect'></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.dockMenu=new DockMenu(this.dockMenuContent,b,c);1<b&&(rightToLeft?this.addNext():this.addPrev());c<bookConfig.totalPageCount&&(rightToLeft?this.addPrev():this.addNext())},addPrev:function(){var b=$("<div class='dockMenuItem dockMenuItemShadow dockButton'></div>");b.append("<div></div>");b.append("<img src='"+uiBaseURL+"slide_leftButton.png'/>");b.click(function(){thumbnail.gotoItemByIndex(this.index-1);return!1}.bind(this));this.dockMenu.addObj(b,"before")},addNext:function(){var b=
$("<div class='dockMenuItem dockMenuItemShadow dockButton'></div>");b.append("<div></div>");b.append("<img src='"+uiBaseURL+"slide_rightButton.png'/>");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(rightToLeft?this.toIndex+"-"+
this.fromIndex: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 CatalogThumbnailBar=Class({create:function(b){this.menu=$("<div class='menu'></div>");this.initMenu();b.append(this.menu)},initMenu:function(){this.visible=!1;this.height=170;this.dockMenuContent=$("<div class='dockMenuContent'></div>");this.thumbnailItemContent=$("<div class='thumbnailItemContent'></div>");this.dockMenuContent.css({width:windowWidth-50+"px"});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),f=bookConfig.RightToLeft?b-1-c:c,g=20*f,f=20*(f+1)-1,f=f>bookConfig.totalPageCount?bookConfig.totalPageCount:f;d.initItem(g,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()},getOccuHeight:function(){return 110},transparent:function(){this.menu.animate({opacity:0,"z-index":-1},200)},noTransparent:function(){this.menu.animate({opacity:1,"z-index":10},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}},fillContent:function(){this.setHighLight(this.highLightItem.index)},showOrHide:function(){!1===this.visible?this.show():this.hide();catalogBook&&catalogBook.showOrHideLiteThumbnail()},show:function(){this.showing=this.visible=!0;this.menu.animate.delay(this.menu,100,[{bottom:-105+toolBar.getBottomHeight()+
"px"},300])},hide:function(){this.menu.animate.delay(this.menu,100,[{bottom:-this.height+"px"},300]);this.showing=this.visible=!1},setPosition:function(){},getHeight:function(){return this.getTopHeight()+this.getBottomHeight()},getTopHeight:function(){return 0},getBottomHeight:function(){return!0==this.visible?110:0}});var GuidToolbar=Class({create:function(b){this.$bar=$("<div class='catalog_simple_bar'></div>");this.initButtons();this.initLogo();this.changeLanguage();this.resetButtons();this.initEvent();b.append(this.$bar)},initButtons:function(){this.numBtn=$("<div id='guidPageIndex' class='page_num'></div>");this.thumBtn=$("<div id='thumb' class='button'></div>");this.moreBtn=$("<div id='more' class='button'></div>");this.fullscreenBtn=$("<div id='fullScreen' class='button'></div>");this.searchBtn=$("<div id='search' class='button'></div>");
this.shareBtn=$("<div id='share' class='button'></div>");this.toolBarIconUrl=uiBaseURL+"catalog_icon.png";this.thumBtn.addCssSprite(this.toolBarIconUrl,"thumb",38,38,catalogIconInfo);this.moreBtn.addCssSprite(this.toolBarIconUrl,"more",38,38,catalogIconInfo);this.fullscreenBtn.addCssSprite(this.toolBarIconUrl,"fullScreen",38,38,catalogIconInfo);this.searchBtn.addCssSprite(this.toolBarIconUrl,"search",38,38,catalogIconInfo);this.shareBtn.addCssSprite(this.toolBarIconUrl,"share",38,38,catalogIconInfo);
this.thumBtn.enterToChange(this.toolBarIconUrl,"thumb",38,38,catalogIconInfo);this.moreBtn.enterToChange(this.toolBarIconUrl,"more",38,38,catalogIconInfo);this.fullscreenBtn.enterToChange(this.toolBarIconUrl,"fullScreen",38,38,catalogIconInfo);this.searchBtn.enterToChange(this.toolBarIconUrl,"search",38,38,catalogIconInfo);this.shareBtn.enterToChange(this.toolBarIconUrl,"share",38,38,catalogIconInfo);this.$bar.append(this.shareBtn);this.$bar.append(this.searchBtn);this.$bar.append(this.numBtn);this.$bar.append(this.thumBtn);
this.$bar.append(this.moreBtn);this.$bar.append(this.fullscreenBtn)},changeLanguage:function(){this.shareBtn.attr("title",getLanguage("btnSocialShare","Share"));this.searchBtn.attr("title",getLanguage("btnSearch","Search"));this.thumBtn.attr("title",getLanguage("btnThumb","Thumbnails"));this.moreBtn.attr("title",getLanguage("btnMore","More"));this.fullscreenBtn.attr("title",getLanguage("btnFullscreen","Fullscreen"))},resetButtons:function(){this.iconWidth=38;this.numWidth=60;10<=bookConfig.totalPageCount&&
(this.numWidth=80);100<=bookConfig.totalPageCount&&(this.numWidth=100);1E3<=bookConfig.totalPageCount&&(this.numWidth=125);1E4<=bookConfig.totalPageCount&&(this.numWidth=145);var b=12;this.numBtn.css({width:this.numWidth+"px",left:b+"px"});b+=this.numWidth;bookConfig.ShareButtonVisible?(this.shareBtn.css({left:b+"px"}),b+=this.iconWidth):this.shareBtn.hide();bookConfig.SearchButtonVisible?(this.searchBtn.css({left:b+"px"}),b+=this.iconWidth):this.searchBtn.hide();bookConfig.ThumbnailsButtonVisible?
(this.thumBtn.css({left:b+"px"}),b+=this.iconWidth):this.thumBtn.hide();this.moreBtn.css({left:b+"px"});b+=this.iconWidth;bookConfig.FullscreenButtonVisible?(this.fullscreenBtn.css({left:b+"px"}),b+=this.iconWidth):this.fullscreenBtn.hide();this.$bar.css({width:b+7+"px"})},initEvent:function(){this.addResponseDom();this.thumBtn.bind(_event._end,function(){thumbnail&&thumbnail.showOrHide()});this.fullscreenBtn.bind(_event._end,readAsFullscreen);$(document).bind(fullScreenApi.fullScreenEventName,function(){this.changeFullscreenIcon(fullScreenApi.isFullScreen())}.bind(this));
this.searchBtn.bind(_event._end,function(){frmSearch&&frmSearch.showOrHide()});this.shareBtn.bind(_event._end,function(){sharePanel&&sharePanel.showOrHide()});var b=5,c;this.moreBtn.bind(_event._end,function(){catalogBook.hideGuidBarAndShowToolBar();"complex"==catalogBook.mode&&(b=5,g(),f())}.bind(this));var d=!1,f=function(){if(!d){d=!0;for(var f=0;f<this.responseDomArray.length;f++)this.responseDomArray[f].bind(_event._over,function(){window.clearInterval(c)}),this.responseDomArray[f].bind(_event._leave,
function(){b=5;g()})}}.bind(this),g=function(){window.clearInterval(c);c=window.setInterval(function(){b--;0>=b&&(catalogBook.hideToolBarAndShowGuidBar(),"simple"==catalogBook.mode?window.clearInterval(c):b=5)},1E3)}},addResponseDom:function(){this.responseDomArray=[];global.toolBar&&(global.toolBar&&toolBar.topBar&&this.responseDomArray.push(toolBar.topBar),global.toolBar&&toolBar.bottomBar&&this.responseDomArray.push(toolBar.bottomBar),global.toolBar&&toolBar.extendedBar.$bar&&this.responseDomArray.push(toolBar.extendedBar.$bar),
toolBar.buttons.each(function(b){this.responseDomArray.push(b.$button)}.bind(this)))},changeFullscreenIcon:function(b){b?(this.fullscreenBtn.changeCssSprite(this.toolBarIconUrl,"exitFullScreen",35,35,catalogIconInfo),this.fullscreenBtn.attr("title",getLanguage("btnExitFullscreen","exitFullScreen")),this.fullscreenBtn.unbind(_event._down),this.fullscreenBtn.unbind(_event._enter),this.fullscreenBtn.unbind(_event._leave),this.fullscreenBtn.enterToChange(this.toolBarIconUrl,"exitFullScreen",35,35,catalogIconInfo)):
(this.fullscreenBtn.changeCssSprite(this.toolBarIconUrl,"fullScreen",35,35,catalogIconInfo),this.fullscreenBtn.attr("title",getLanguage("btnFullscreen","Fullscreen")),this.fullscreenBtn.unbind(_event._down),this.fullscreenBtn.unbind(_event._enter),this.fullscreenBtn.unbind(_event._leave),this.fullscreenBtn.enterToChange(this.toolBarIconUrl,"fullScreen",35,35,catalogIconInfo))},show:function(){this.$bar.show();this.logo&&this.logo.show()},hide:function(){this.$bar.hide();this.logo&&this.logo.hide()},
getHeight:function(){return 50},onResize:function(){},initLogo:function(){bookConfig.appLogoIcon&&(this.logo=$("<img src='"+bookConfig.appLogoIcon+"' class='catalog_logo'/>"),this.logo.css({left:bookConfig.logoPadding+"px",top:bookConfig.logoTop+"px",height:bookConfig.logoHeight+"px"}),this.logo.click(function(){var b=getLogoLink();window.open(b[0],b[1]);return!1}),tmpContainer.append(this.logo))}});var 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(f){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:""})}});var 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&&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()}});var 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 id='slide_thumbnail'></div>");
this.contentBox=$("<div></div>");this.contentBac=$("<div></div>");this.scrollBox=$("<div></div>");this.openButton=$("<div id='slide_open_button'></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?isBelowIE9()||$(this.contentBac).css({opacity:0.3}):isBelowIE9()||$(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,f=0;f<c;f++){var g=this.thumbArray[f];d=g.getWidth()/
2+20+(c-1)*(g.getWidth()+15);rightToLeft?0==f?(b=d-5-g.getWidth()/2,g.setPosition(b,2.5),b=b-15-g.getWidth()):(g.setPosition(b,2.5),b=b-g.getWidth()-15):0==f?(g.setPosition(5,2.5),b=g.getWidth()/2+20):(g.setPosition(b,2.5),b=b+g.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.hide():this.show()},show: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'/>")},hide: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(),f=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,-(f+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 f=function(b,c){for(var d=c/2,f=(b-b/4)/
d,g=Array(c),h=0;h<c;h++)g[h]=h<d?b-(d-h)*f:b+(h-d+1)*f;return g.reverse()}(c,d),g=b,h=0,k=this,l=window.setInterval(function(){g+=f[h];h++;h==d&&(g=b+c*d);0<g&&(g=0);g<$(k.contentBox).width()-$(k.scrollBox).width()&&(g=$(k.contentBox).width()-$(k.scrollBox).width());$(k.scrollBox).css({left:g+"px"});h>=d&&(window.clearInterval(l),k.fillNearByImages(g))},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()}}});Class("PCSlideToolbar",{create:function(b){this.parent=b;this.initToolBar();this.initGuidBar();this.initLogo()},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+"slide_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+"slide_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'/>");bookConfig.ShareButtonVisible&&(this.shareBtn=$("<img src='"+uiBaseURL+"slide-share.png'/>"));this.parent.append(this.toolbarBac);
this.toolbarBac.append(this.fullscreenBtn);this.toolbarBac.append(this.homeBtn);this.toolbarBac.append(this.shareBtn);this.toolbarBac.css("background-color",bookConfig.toolbarColor);this.shareBtn&&this.shareBtn.bind(_event._end,function(){sharePanel.showOrHide();return!1});this.homeBtn.bind(_event._end,function(){homeButtonEvent();return!1});this.fullscreenBtn.bind(_event._end,function(){readAsFullscreen();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&&this.shareBtn.attr("title",getLanguage("btnSocialShare","Share"));var b=this.toolbarBac.width();this.toolbarBac.css({"margin-left":-b/2+"px"})},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")))},hide:function(){},show:function(){},getLogoHeight:function(){return 0},getHeight:function(){return 0},getTopHeight:function(){return 0},getBottomHeight:function(){return 0},getWidth:function(){return 0},setButtonPosition:function(){},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":"3"}),this.logo.click(function(){var b=getLogoLink();window.open(b[0],b[1]);return!1}),this.parent.append(this.logo))}});var PhoneThumbnailForm=Class({create:function(b){this.visible=!1;this.totalPageCount=bookConfig.totalPageCount;this.itemWidth=90;this.marginLeft=20;this.marginTop=10;this.itemBorderWidth=3;this.toolBarHeight=80;this.topBarHeight=40;this.itemBorderColor="#f76c6c";this.itemArray=[];this.taskList=new TaskList;this.itemHeightArray=this.getHeightArray();bookConfig.appLogoIcon||bookConfig.InstructionsButtonVisible||(this.toolBarHeight=40,this.topBarHeight=0);this.background=$("<div id='phoneThum' style='opacity:0;display:none;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;text-align:center;position:absolute;z-index:98;background:rgba(51,51,51,0.8);width:100%;left:0;'></div>");
this.itemBox=$("<div style='text-align:left;display:inline-block;padding:0px 0px "+this.marginLeft+"px 0px;'></div>");this.background.css({top:this.topBarHeight+"px"});b.append(this.background);this.background.append(this.itemBox);this.initEvent();this.addItem();this.setHighLight(1)},onResize:function(){this.countHorizatal=parseInt((windowWidth-this.marginLeft)/(this.itemWidth+this.marginLeft));this.countVertical=parseInt((windowHeight-this.toolBarHeight-this.marginTop)/(this.itemHeightArray.itemHeight+
this.marginTop))+1;this.itemBox.css({width:this.countHorizatal*(this.itemWidth+this.marginLeft)+this.marginLeft});this.background.css({height:windowHeight-this.toolBarHeight});this.taskList.setLargeLength(this.countHorizatal*this.countVertical)},fillContent:function(){this.interval&&!this.interval.isRunning()?this.interval.start():this.interval=function(){this.performTask()}.interval(this,60)},performTask:function(){for(var b=this.getShownItems(),c=b[1],b=b[0];b<c;b++){var d=function(){thumbnail.fillImage(this.index)}.bind({index:b});
d.id=b;this.taskList.unShiftTask(d)}},getShownItems:function(){var b=-this.itemBox.offset().top+40,b=parseInt(b/(this.itemHeightArray.itemHeight+this.marginTop)),b=this.countHorizatal*b,c=b+this.countHorizatal*this.countVertical,c=Math.min(c,this.totalPageCount),b=Math.max(0,b);return[b,c]},hide:function(){this.visible&&this.background.animate({opacity:"0"},300,"linear",function(){this.background.hide();this.visible=!1;this.interval&&this.interval.stop()}.bind(this))},getShowStatu:function(){return this.visible},
show:function(){this.visible||(this.background.show(),this.fillContent(),this.background.animate({opacity:"1"},300,"linear",function(){this.visible=!0}.bind(this)))},setHighLight:function(b){this.itemArray&&this.itemArray[b-1]&&this.itemArray[b-1].imgContainer&&this.itemArray[b-1].imgContainer.css({"border-color":this.itemBorderColor})},clearHighLight:function(){if(this.itemArray)for(var b=this.itemArray.length,c=0;c<b;c++)this.itemArray[c].imgContainer&&this.itemArray[c].imgContainer.css({"border-color":"transparent"})},
fissionAll:function(){},mergeAll:function(){},showOrHide:function(){this.visible?this.hide():this.show()},addItem:function(){for(var b=0;b<this.totalPageCount;b++){var c=this.initItem(b);this.itemBox.append(c.item);this.itemArray.push(c)}},getHeightArray:function(){var b=(this.itemWidth-2*this.itemBorderWidth)*bookConfig.largePageHeight/bookConfig.largePageWidth;return{imageHeight:b,titleHeight:15,itemHeight:b+15+4*this.itemBorderWidth}},initItem:function(b){var c=$("<div style='display:inline-block;'></div>"),
d=$("<p><span>"+getShownPageNumber(b+1)+"</span></p>"),f=$("<div></div>"),g=$("<img/>");c.css({cursor:"pointer",width:this.itemWidth,height:this.itemHeightArray.itemHeight,padding:this.marginTop+"px 0px 0px "+this.marginLeft+"px","text-align":"center"});f.css({width:this.itemWidth-2*this.itemBorderWidth,height:this.itemHeightArray.imageHeight,"border-style":"solid","border-width":this.itemBorderWidth+"px","border-radius":this.itemBorderWidth+"px","border-color":"transparent"});g.css({width:"100%",
height:"100%","background-color":"#ffffff","background-image":"url("+uiBaseURL+"loading.gif)","background-repeat":"no-repeat","background-position":"center"});d.css({width:this.itemWidth-2*this.itemBorderWidth,height:this.itemHeightArray.titleHeight+"px","line-height":this.itemHeightArray.titleHeight+"px","vertical-align":"middle",color:"#eeeeee","font-family":"Arial","font-size":this.itemHeightArray.titleHeight+"px",padding:"0px",margin:"0px","border-style":"solid","border-width":this.itemBorderWidth+
"px","border-color":"transparent"});c.append(f);c.append(d);f.append(g);c.attr("id",b);c.bind(_event._end,function(b){b.stopPropagation()}.bind(this));c.bind("click",function(c){gotoPageFun(b+1);this.hide();c.stopPropagation()}.bind(this));return{item:c,imgContainer:f,img:g,title:d,fill:!1}},fillImage:function(b){if(this.itemArray&&this.itemArray[b]&&!this.itemArray[b].fill&&this.itemArray[b].img){var c=function(c){this.itemArray[b].img.attr("src",c)}.bind(this);this.LoadCount++;this.itemArray[b].fill=
!0;fillImageAfterLoaded(b+1,"thumb",c)}},getHeight:function(){return 0},getTopHeight:function(){return 0},initEvent:function(){this.background.bind(_event._end,function(){this.hide()}.bind(this))}});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,f=-271733879,g=-1732584194,h=271733878,k=0;k<b.length;k+=16)var l=d,m=f,n=g,p=h,d=hx_ff(d,f,g,h,b[k+0],7,-680876936),h=hx_ff(h,d,f,g,b[k+1],12,-389564586),g=hx_ff(g,h,d,f,b[k+2],17,606105819),f=hx_ff(f,g,h,d,b[k+3],22,-1044525330),d=hx_ff(d,f,g,h,b[k+4],7,-176418897),h=hx_ff(h,d,f,g,b[k+5],12,1200080426),g=hx_ff(g,h,d,f,b[k+6],17,-1473231341),f=hx_ff(f,g,h,d,b[k+7],22,-45705983),d=hx_ff(d,f,g,h,b[k+8],7,1770035416),
h=hx_ff(h,d,f,g,b[k+9],12,-1958414417),g=hx_ff(g,h,d,f,b[k+10],17,-42063),f=hx_ff(f,g,h,d,b[k+11],22,-1990404162),d=hx_ff(d,f,g,h,b[k+12],7,1804603682),h=hx_ff(h,d,f,g,b[k+13],12,-40341101),g=hx_ff(g,h,d,f,b[k+14],17,-1502002290),f=hx_ff(f,g,h,d,b[k+15],22,1236535329),d=hx_gg(d,f,g,h,b[k+1],5,-165796510),h=hx_gg(h,d,f,g,b[k+6],9,-1069501632),g=hx_gg(g,h,d,f,b[k+11],14,643717713),f=hx_gg(f,g,h,d,b[k+0],20,-373897302),d=hx_gg(d,f,g,h,b[k+5],5,-701558691),h=hx_gg(h,d,f,g,b[k+10],9,38016083),g=hx_gg(g,
h,d,f,b[k+15],14,-660478335),f=hx_gg(f,g,h,d,b[k+4],20,-405537848),d=hx_gg(d,f,g,h,b[k+9],5,568446438),h=hx_gg(h,d,f,g,b[k+14],9,-1019803690),g=hx_gg(g,h,d,f,b[k+3],14,-187363961),f=hx_gg(f,g,h,d,b[k+8],20,1163531501),d=hx_gg(d,f,g,h,b[k+13],5,-1444681467),h=hx_gg(h,d,f,g,b[k+2],9,-51403784),g=hx_gg(g,h,d,f,b[k+7],14,1735328473),f=hx_gg(f,g,h,d,b[k+12],20,-1926607734),d=hx_hh(d,f,g,h,b[k+5],4,-378558),h=hx_hh(h,d,f,g,b[k+8],11,-2022574463),g=hx_hh(g,h,d,f,b[k+11],16,1839030562),f=hx_hh(f,g,h,d,b[k+
14],23,-35309556),d=hx_hh(d,f,g,h,b[k+1],4,-1530992060),h=hx_hh(h,d,f,g,b[k+4],11,1272893353),g=hx_hh(g,h,d,f,b[k+7],16,-155497632),f=hx_hh(f,g,h,d,b[k+10],23,-1094730640),d=hx_hh(d,f,g,h,b[k+13],4,681279174),h=hx_hh(h,d,f,g,b[k+0],11,-358537222),g=hx_hh(g,h,d,f,b[k+3],16,-722521979),f=hx_hh(f,g,h,d,b[k+6],23,76029189),d=hx_hh(d,f,g,h,b[k+9],4,-640364487),h=hx_hh(h,d,f,g,b[k+12],11,-421815835),g=hx_hh(g,h,d,f,b[k+15],16,530742520),f=hx_hh(f,g,h,d,b[k+2],23,-995338651),d=hx_ii(d,f,g,h,b[k+0],6,-198630844),
h=hx_ii(h,d,f,g,b[k+7],10,1126891415),g=hx_ii(g,h,d,f,b[k+14],15,-1416354905),f=hx_ii(f,g,h,d,b[k+5],21,-57434055),d=hx_ii(d,f,g,h,b[k+12],6,1700485571),h=hx_ii(h,d,f,g,b[k+3],10,-1894986606),g=hx_ii(g,h,d,f,b[k+10],15,-1051523),f=hx_ii(f,g,h,d,b[k+1],21,-2054922799),d=hx_ii(d,f,g,h,b[k+8],6,1873313359),h=hx_ii(h,d,f,g,b[k+15],10,-30611744),g=hx_ii(g,h,d,f,b[k+6],15,-1560198380),f=hx_ii(f,g,h,d,b[k+13],21,1309151649),d=hx_ii(d,f,g,h,b[k+4],6,-145523070),h=hx_ii(h,d,f,g,b[k+11],10,-1120210379),g=hx_ii(g,
h,d,f,b[k+2],15,718787259),f=hx_ii(f,g,h,d,b[k+9],21,-343485551),d=safe_add(d,l),f=safe_add(f,m),g=safe_add(g,n),h=safe_add(h,p);return[d,f,g,h]}function hx_cmn(b,c,d,f,g,h){return safe_add(bit_rol(safe_add(safe_add(c,b),safe_add(f,h)),g),d)}function hx_ff(b,c,d,f,g,h,k){return hx_cmn(c&d|~c&f,b,c,g,h,k)}function hx_gg(b,c,d,f,g,h,k){return hx_cmn(c&f|d&~f,b,c,g,h,k)}function hx_hh(b,c,d,f,g,h,k){return hx_cmn(c^d^f,b,c,g,h,k)}function hx_ii(b,c,d,f,g,h,k){return hx_cmn(d^(c|~f),b,c,g,h,k)}
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,f=0;f<b.length*chrsz;f+=chrsz)c[f>>5]|=(b.charCodeAt(f/chrsz)&d)<<f%32;return c}function binl2hex(b){for(var c=hexcase?"0123456789ABCDEF":"0123456789abcdef",d="",f=0;f<4*b.length;f++)d+=c.charAt(b[f>>2]>>f%4*8+4&15)+c.charAt(b[f>>2]>>f%4*8&15);return d};var windowWidth=0,windowHeight=0,originTotalPageCount,totalPageCount,isTouch=isTouchDevice(),bookContainer,tmpContainer,slideBook,singleSlideBook,catalogBook,singleCatalogBook,flipBook,singlePageBook,flipShotButton,toolBar,printBody,helpBody,aboutBody,sharePanel,annotationPannel,videoGallery,photoGallery,languagePanel,frmSearch,frmShare,frmTableOfContent,bookmark,thumbnail,googleID,noteCookie,textRemark,signature,annotationShapes,QRcode,QRbutton,moreBar,pageIndexTextField,resizeBookAfterFlip=!1,auto_player,
hardPageEnable,uiBaseURL,phoneBaseURL,soundBaseURL,browserType,bookType=0,rightToLeft=!1,isFlipPdf=!1;global.crBefore=DeString("d2b0aa5705413c96");global.crAfter=DeString("d35426b1c0d303cfa3012949ee");
