(function(a,b){function c(a){return g.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}function d(a){if(!ia[a]){var b=v.body,c=g("<"+a+">").appendTo(b),d=c.css("display");c.remove();if("none"===d||""===d){N||(N=v.createElement("iframe"),N.frameBorder=N.width=N.height=0);b.appendChild(N);if(!W||!N.createElement)W=(N.contentWindow||N.contentDocument).document,W.write((g.support.boxModel?"":"")+""),W.close();c=W.createElement(a);W.body.appendChild(c);d=g.css(c, "display");b.removeChild(N)}ia[a]=d}return ia[a]}function e(a,b){var c={};g.each(ba.concat.apply([],ba.slice(0,b)),function(){c[this]=a});return c}function f(){ca=b}function h(){setTimeout(f,0);return ca=g.now()}function j(){try{return new a.XMLHttpRequest}catch(b){}}function k(a,b,c,d){if(g.isArray(b))g.each(b,function(b,G){c||Va.test(a)?d(a,G):k(a+"["+("object"==typeof G?b:"")+"]",G,c,d)});else if(!c&&"object"===g.type(b))for(var e in b)k(a+"["+e+"]",b[e],c,d);else d(a,b)}function m(a,c){var d, e,f=g.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&g.extend(!0,a,e)}function q(a,c,d,e,g,f){g=g||c.dataTypes[0];f=f||{};f[g]=!0;for(var g=a[g],h=0,j=g?g.length:0,o=a===ja,k;he;e+=2)c||(d-=parseFloat(g.css(a,"padding"+T[e]))||0),"margin"===c?d+=parseFloat(g.css(a,c+T[e]))||0:d-=parseFloat(g.css(a,"border"+T[e]+"Width"))||0;return d+"px"}d=X(a,b);if(0>d||null==d)d=a.style[b];if(ka.test(d))return d;d=parseFloat(d)||0;if(c)for(;4>e;e+=2)d+=parseFloat(g.css(a,"padding"+ T[e]))||0,"padding"!==c&&(d+=parseFloat(g.css(a,"border"+T[e]+"Width"))||0),"margin"===c&&(d+=parseFloat(g.css(a,c+T[e]))||0);return d+"px"}function u(a){var b=(a.nodeName||"").toLowerCase();"input"===b?p(a):"script"!==b&&"undefined"!=typeof a.getElementsByTagName&&g.grep(a.getElementsByTagName("input"),p)}function p(a){if("checkbox"===a.type||"radio"===a.type)a.defaultChecked=a.checked}function z(a){return"undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName("*"):"undefined"!=typeof a.querySelectorAll? a.querySelectorAll("*"):[]}function t(a,b){var c;1===b.nodeType&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),"object"===c?b.outerHTML=a.outerHTML:"input"!==c||"checkbox"!==a.type&&"radio"!==a.type?"option"===c?b.selected=a.defaultSelected:"input"===c||"textarea"===c?b.defaultValue=a.defaultValue:"script"===c&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(g.expando), b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function J(a,b){if(1===b.nodeType&&g.hasData(a)){var c,d,e;d=g._data(a);var f=g._data(b,d),h=d.events;if(h)for(c in delete f.handle,f.events={},h){d=0;for(e=h[c].length;d)[^>]*$|#([\w\-]*)$)/,j=/\S/,o=/^\s+/,k=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,l=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,p=/(?:^|:|,)(?:\s*\[)+/g,A= /(webkit)[ \/]([\w.]+)/,C=/(opera)(?:.*version)?[ \/]([\w.]+)/,s=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,t=function(a,b){return(b+"").toUpperCase()},y=M.userAgent,ea,Y,Xa=Object.prototype.toString,ma=Object.prototype.hasOwnProperty,na=Array.prototype.push,aa=Array.prototype.slice,xa=String.prototype.trim,ya=Array.prototype.indexOf,z={};d.fn=d.prototype={constructor:d,init:function(a,c,r){var e,g;if(!a)return this;if(a.nodeType)return this.context=this[0]= a,this.length=1,this;if("body"===a&&!c&&v.body)return this.context=v,this[0]=v.body,this.selector=a,this.length=1,this;if("string"==typeof a){"<"!==a.charAt(0)||">"!==a.charAt(a.length-1)||3>a.length?e=h.exec(a):e=[null,a,null];if(e&&(e[1]||!c)){if(e[1])return g=(c=c instanceof d?c[0]:c)?c.ownerDocument||c:v,(r=m.exec(a))?d.isPlainObject(c)?(a=[v.createElement(r[1])],d.fn.attr.call(a,c,!0)):a=[g.createElement(r[1])]:(r=d.buildFragment([e[1]],[g]),a=(r.cacheable?d.clone(r.fragment):r.fragment).childNodes), d.merge(this,a);if((c=v.getElementById(e[2]))&&c.parentNode){if(c.id!==e[2])return r.find(a);this.length=1;this[0]=c}this.context=v;this.selector=a;return this}return!c||c.jquery?(c||r).find(a):this.constructor(c).find(a)}if(d.isFunction(a))return r.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return aa.call(this,0)},get:function(a){return null==a?this.toArray(): 0>a?this[this.length+a]:this[a]},pushStack:function(a,b,c){var r=this.constructor();d.isArray(a)?na.apply(r,a):d.merge(r,a);r.prevObject=this;r.context=this.context;"find"===b?r.selector=this.selector+(this.selector?" ":"")+c:b&&(r.selector=this.selector+"."+b+"("+c+")");return r},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady();ea.add(a);return this},eq:function(a){a=+a;return-1===a?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)}, slice:function(){return this.pushStack(aa.apply(this,arguments),"slice",aa.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:na,sort:[].sort,splice:[].splice};d.fn.init.prototype=d.fn;d.extend=d.fn.extend=function(){var a,c,r,e,g,f,h=arguments[0]||{},B=1,j=arguments.length,H=!1;"boolean"==typeof h&&(H=h,h=arguments[1]||{},B=2);"object"!=typeof h&&!d.isFunction(h)&& (h={});for(j===B&&(h=this,--B);Bc?Math.max(0,d+c):c:0;ca.indexOf("compatible")&&u.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0, a,this);a.superclass=this;a.fn=a.prototype=this();a.fn.constructor=a;a.sub=this.sub;a.fn.init=function(c,r){r&&r instanceof d&&!(r instanceof a)&&(r=a(r));return d.fn.init.call(this,c,r,b)};a.fn.init.prototype=a.fn;var b=a(v);return a},browser:{}});d.each("Boolean,Number,String,Function,Array,Date,RegExp,Object".split(","),function(a,b){z["[object "+b+"]"]=b.toLowerCase()});y=d.uaMatch(y);y.browser&&(d.browser[y.browser]=!0,d.browser.version=y.version);d.browser.webkit&&(d.browser.safari=!0);j.test("\u00a0")&& (o=/^[\s\xA0]+/,k=/[\s\xA0]+$/);f=d(v);v.addEventListener?Y=function(){v.removeEventListener("DOMContentLoaded",Y,!1);d.ready()}:v.attachEvent&&(Y=function(){"complete"===v.readyState&&(v.detachEvent("onreadystatechange",Y),d.ready())});return d}(),P={};g.Callbacks=function(a){var a=a?P[a]||R(a):{},c=[],d=[],e,f,h,j,o,k,m=function(b){var d,e,f,h;d=0;for(e=b.length;d=f&&a&&g.isFunction(a.promise)?a:g.Deferred(),k=o.promise();if(1
a";c=k.getElementsByTagName("*");d=k.getElementsByTagName("a")[0];if(!c||!c.length||!d)return{};e=v.createElement("select");f=e.appendChild(v.createElement("option"));c=k.getElementsByTagName("input")[0];b={leadingWhitespace:3===k.firstChild.nodeType,tbody:!k.getElementsByTagName("tbody").length,htmlSerialize:!!k.getElementsByTagName("link").length, style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.55/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:"on"===c.value,optSelected:f.selected,getSetAttribute:"t"!==k.className,enctype:!!v.createElement("form").enctype,html5Clone:"<:nav>"!==v.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0, pixelMargin:!0};g.boxModel=b.boxModel="CSS1Compat"===v.compatMode;c.checked=!0;b.noCloneChecked=c.cloneNode(!0).checked;e.disabled=!0;b.optDisabled=!f.disabled;try{delete k.test}catch(m){b.deleteExpando=!1}!k.addEventListener&&k.attachEvent&&k.fireEvent&&(k.attachEvent("onclick",function(){b.noCloneEvent=!1}),k.cloneNode(!0).fireEvent("onclick"));c=v.createElement("input");c.value="t";c.setAttribute("type","radio");b.radioValue="t"===c.value;c.setAttribute("checked","checked");c.setAttribute("name", "t");k.appendChild(c);d=v.createDocumentFragment();d.appendChild(k.lastChild);b.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked;b.appendChecked=c.checked;d.removeChild(c);d.appendChild(k);if(k.attachEvent)for(j in{submit:1,change:1,focusin:1})c="on"+j,(o=c in k)||(k.setAttribute(c,"return;"),o="function"==typeof k[c]),b[j+"Bubbles"]=o;d.removeChild(k);d=e=f=k=c=null;g(function(){var c,d,e,G,f,j,B=v.getElementsByTagName("body")[0];!B||(c=v.createElement("div"),c.style.cssText="padding:0;margin:0;border:0;visibility:hidden;width:0;height:0;position:static;top:0;margin-top:1px", B.insertBefore(c,B.firstChild),k=v.createElement("div"),c.appendChild(k),k.innerHTML="
t
",h=k.getElementsByTagName("td"),o=0===h[0].offsetHeight,h[0].style.display="",h[1].style.display="none",b.reliableHiddenOffsets=o&&0===h[0].offsetHeight,a.getComputedStyle&&(k.innerHTML="",j=v.createElement("div"),j.style.width="0",j.style.marginRight="0",k.style.width="2px",k.appendChild(j),b.reliableMarginRight=0===(parseInt((a.getComputedStyle(j, null)||{marginRight:0}).marginRight,10)||0)),"undefined"!=typeof k.style.zoom&&(k.innerHTML="",k.style.width=k.style.padding="1px",k.style.border=0,k.style.overflow="hidden",k.style.display="inline",k.style.zoom=1,b.inlineBlockNeedsLayout=3===k.offsetWidth,k.style.display="block",k.style.overflow="visible",k.innerHTML="
",b.shrinkWrapBlocks=3!==k.offsetWidth),k.style.cssText="position:absolute;top:0;left:0;width:1px;height:1px;padding:0;margin:0;border:0;visibility:hidden;", k.innerHTML="
",d=k.firstChild,e=d.firstChild,G=d.nextSibling.firstChild.firstChild,f={doesNotAddBorder:5!==e.offsetTop,doesAddBorderForTableAndCells:5=== G.offsetTop},e.style.position="fixed",e.style.top="20px",f.fixedPosition=20===e.offsetTop||15===e.offsetTop,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",f.subtractsBorderForOverflowNotVisible=-5===e.offsetTop,f.doesNotIncludeMarginInBodyOffset=1!==B.offsetTop,a.getComputedStyle&&(k.style.marginTop="1%",b.pixelMargin="1%"!==(a.getComputedStyle(k,null)||{marginTop:0}).marginTop),"undefined"!=typeof c.style.zoom&&(c.style.zoom=1),B.removeChild(c),k=null,g.extend(b, f))});return b}();var A=/^(?:\{.*\}|\[.*\])$/,o=/([A-Z])/g;g.extend({cache:{},uuid:0,expando:"jQuery"+(g.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?g.cache[a[g.expando]]:a[g.expando];return!!a&&!K(a)},data:function(a,c,d,e){if(g.acceptData(a)){var f,h;f=g.expando;var j="string"==typeof c,o=a.nodeType,k=o?g.cache:a,m=o?a[f]:a[f]&&f,n="events"===c;if(m&&k[m]&&(n||e||k[m].data)||!(j&&d=== b)){m||(o?a[f]=m=++g.uuid:m=f);k[m]||(k[m]={},o||(k[m].toJSON=g.noop));if("object"==typeof c||"function"==typeof c)e?k[m]=g.extend(k[m],c):k[m].data=g.extend(k[m].data,c);a=f=k[m];e||(f.data||(f.data={}),f=f.data);d!==b&&(f[g.camelCase(c)]=d);if(n&&!f[c])return a.events;j?(h=f[c],null==h&&(h=f[g.camelCase(c)])):h=f;return h}}},removeData:function(a,b,c){if(g.acceptData(a)){var d,e,f,h=g.expando,j=a.nodeType,o=j?g.cache:a,k=j?a[h]:h;if(o[k]){if(b&&(d=c?o[k]:o[k].data)){g.isArray(b)||(b in d?b=[b]: (b=g.camelCase(b),b in d?b=[b]:b=b.split(" ")));e=0;for(f=b.length;ed)return null;a=h?d:0;for(c=h?d+1:f.length;ah.indexOf(":")?"on"+h:"",e){if(c.result=b,c.target||(c.target=e),d=null!=d?g.makeArray(d):[],d.unshift(c),n=g.event.special[h]||{},!(n.trigger&&!1===n.trigger.apply(e, d))){q=[[e,n.bindType||h]];if(!f&&!n.noBubble&&!g.isWindow(e)){k=n.delegateType||h;j=Ea.test(k+h)?e:e.parentNode;for(m=null;j;j=j.parentNode)q.push([j,k]),m=j;m&&m===e.ownerDocument&&q.push([m.defaultView||m.parentWindow||a,k])}for(k=0;ke&&o.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)};g.attrFn&&(g.attrFn[b]=true);bb.test(b)&&(g.event.fixHooks[b]=g.event.keyHooks);cb.test(b)&&(g.event.fixHooks[b]=g.event.mouseHooks)});(function(){function a(b,c,d,f,g,h){for(var g=0,j=f.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e="sizcache"+(Math.random()+"").replace(".",""),f=0,h=Object.prototype.toString,j=!1,o=!0,k=/\\/g, m=/\r\n/g,n=/\W/;[0,0].sort(function(){o=!1;return 0});var l=function(a,b,c,e){var c=c||[],f=b=b||v;if(1!==b.nodeType&&9!==b.nodeType)return[];if(!a||"string"!=typeof a)return c;var g,j,r,o,k,G,m=!0,H=l.isXML(b),n=[],q=a;do if(d.exec(""),g=d.exec(q))if(q=g[3],n.push(g[1]),g[2]){o=g[3];break}while(g);if(1":function(a,b){var c,d="string"==typeof b,e=0,g=a.length;if(d&&!n.test(b))for(b=b.toLowerCase();ec[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a, b,c,d){var e=b[1],g=p.filters[e];if(g)return g(a,c,b,d);if("contains"===e)return 0<=(a.textContent||a.innerText||q([a])||"").indexOf(b[3]);if("not"===e){b=b[3];c=0;for(d=b.length;c";d.insertBefore(a,d.firstChild);v.getElementById(c)&&(p.find.ID=function(a,c,d){if("undefined"!=typeof c.getElementById&&!d)return(c=c.getElementById(a[1]))? c.id===a[1]||"undefined"!=typeof c.getAttributeNode&&c.getAttributeNode("id").nodeValue===a[1]?[c]:b:[]},p.filter.ID=function(a,b){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return 1===a.nodeType&&c&&c.nodeValue===b});d.removeChild(a);d=a=null})();(function(){var a=v.createElement("div");a.appendChild(v.createComment(""));0

";if(!b.querySelectorAll||0!==b.querySelectorAll(".TEST").length){l=function(b,c,d,e){c=c||v;if(!e&&!l.isXML(c)){var g=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(g&& (1===c.nodeType||9===c.nodeType)){if(g[1])return s(c.getElementsByTagName(b),d);if(g[2]&&p.find.CLASS&&c.getElementsByClassName)return s(c.getElementsByClassName(g[2]),d)}if(9===c.nodeType){if("body"===b&&c.body)return s([c.body],d);if(g&&g[3]){var f=c.getElementById(g[3]);if(!f||!f.parentNode)return s([],d);if(f.id===g[3])return s([f],d)}try{return s(c.querySelectorAll(b),d)}catch(h){}}else if(1===c.nodeType&&"object"!==c.nodeName.toLowerCase()){var g=c,j=(f=c.getAttribute("id"))||"__sizzle__",r= c.parentNode,o=/^\s*[+~]/.test(b);f?j=j.replace(/'/g,"\\$&"):c.setAttribute("id",j);o&&r&&(c=c.parentNode);try{if(!o||r)return s(c.querySelectorAll("[id='"+j+"'] "+b),d)}catch(k){}finally{f||g.removeAttribute("id")}}}return a(b,c,d,e)};for(var c in a)l[c]=a[c];b=null}}();(function(){var a=v.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var c=!b.call(v.createElement("div"),"div"),d=!1;try{b.call(v.documentElement,"[test!='']:sizzle")}catch(e){d= !0}l.matchesSelector=function(a,e){e=e.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!l.isXML(a))try{if(d||!p.match.PSEUDO.test(e)&&!/!=/.test(e)){var g=b.call(a,e);if(g||!c||a.document&&11!==a.document.nodeType)return g}}catch(f){}return 0
";a.getElementsByClassName&&0!==a.getElementsByClassName("e").length&&(a.lastChild.className="e",1!==a.getElementsByClassName("e").length&& (p.order.splice(1,0,"CLASS"),p.find.CLASS=function(a,b,c){if("undefined"!=typeof b.getElementsByClassName&&!c)return b.getElementsByClassName(a[1])},a=null))})();v.documentElement.contains?l.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:v.documentElement.compareDocumentPosition?l.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:l.contains=function(){return!1};l.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?"HTML"!==a.nodeName:!1};var y= function(a,b,c){for(var d,e=[],g="",b=b.nodeType?[b]:b;d=p.match.PSEUDO.exec(a);)g+=d[0],a=a.replace(p.match.PSEUDO,"");a=p.relative[a]?a+"*":a;d=0;for(var f=b.length;d]*)\/>/ig,Ia=/<([\w:]+)/, lb=/]","i"),Ka=/checked\s*(?:[^=]|=\s*.checked.)/i,La=/\/(java|ecma)script/i,pb=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"], area:[1,"",""],_default:[0,"",""]},qa=w(v);F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;g.support.htmlSerialize||(F._default=[1,"div
","
"]);g.fn.extend({text:function(a){return g.access(this,function(a){return a===b?g.text(this):this.empty().append((this[0]&&this[0].ownerDocument||v).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(g.isFunction(a))return this.each(function(b){g(this).wrapAll(a.call(this,b))});if(this[0]){var b= g(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return g.isFunction(a)?this.each(function(b){g(this).wrapInner(a.call(this,b))}):this.each(function(){var b=g(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=g.isFunction(a);return this.each(function(c){g(this).wrapAll(b?a.call(this,c): a)})},unwrap:function(){return this.parent().each(function(){g.nodeName(this,"body")||g(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a= g.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,g.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;null!=(d=this[c]);c++)if(!a||g.filter(a,[d]).length)!b&&1===d.nodeType&&(g.cleanData(d.getElementsByTagName("*")), g.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;null!=(b=this[a]);a++)for(1===b.nodeType&&g.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return g.clone(this,a,b)})},html:function(a){return g.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(kb,""):null;if("string"== typeof a&&!nb.test(a)&&(g.support.leadingWhitespace||!pa.test(a))&&!F[(Ia.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ha,"<$1>");try{for(;dj.length&&h===v&&"<"===j.charAt(0)&&!ob.test(j)&&(g.support.checkClone||!Ka.test(j))&& (g.support.html5Clone||!Ja.test(j))&&(e=!0,f=g.fragments[j],f&&1!==f&&(d=f));d||(d=h.createDocumentFragment(),g.clean(a,h,d,c));e&&(g.fragments[j]=f?d:1);return{fragment:d,cacheable:e}};g.fragments={};g.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){g.fn[a]=function(c){var d=[],c=g(c),e=1===this.length&&this[0].parentNode;if(e&&11===e.nodeType&&1===e.childNodes.length&&1===c.length)return c[b](this[0]),this;for(var e=0, f=c.length;e")?d=a.cloneNode(!0):(d=v.createElement("div"),qa.appendChild(d),d.innerHTML=a.outerHTML,d=d.firstChild);var h=d;if((!g.support.noCloneEvent||!g.support.noCloneChecked)&&(1===a.nodeType||11===a.nodeType)&&!g.isXMLDoc(a)){t(a,h);d=z(a);e=z(h);for(f=0;d[f];++f)e[f]&&t(d[f], e[f])}if(b&&(J(a,h),c)){d=z(a);e=z(h);for(f=0;d[f];++f)J(d[f],e[f])}return h},clean:function(a,b,c,d){var e,f=[],b=b||v;"undefined"==typeof b.createElement&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||v);for(var h=0,j;null!=(j=a[h]);h++)if("number"==typeof j&&(j+=""),j){if("string"==typeof j)if(mb.test(j)){j=j.replace(Ha,"<$1>");e=(Ia.exec(j)||["",""])[1].toLowerCase();var o=F[e]||F._default,k=o[0],m=b.createElement("div"),l=qa.childNodes,n;b===v?qa.appendChild(m):w(b).appendChild(m);for(m.innerHTML= o[1]+j+o[2];k--;)m=m.lastChild;if(!g.support.tbody){k=lb.test(j);o="table"===e&&!k?m.firstChild&&m.firstChild.childNodes:""===o[1]&&!k?m.childNodes:[];for(e=o.length-1;0<=e;--e)g.nodeName(o[e],"tbody")&&!o[e].childNodes.length&&o[e].parentNode.removeChild(o[e])}!g.support.leadingWhitespace&&pa.test(j)&&m.insertBefore(b.createTextNode(pa.exec(j)[0]),m.firstChild);j=m.childNodes;m&&(m.parentNode.removeChild(m),0c;c++)e[a+T[c]+b]=d[c]||d[c-2]||d[0];return e}}});var wb=/%20/g,Va=/\[\]$/,Oa=/\r?\n/g,xb=/#.*$/,yb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,zb=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Ab=/^(?:GET|HEAD)$/, Bb=/^\/\//,Pa=/\?/,Cb=/)<[^<]*)*<\/script>/gi,Db=/^(?:select|textarea)/i,va=/\s+/,Eb=/([?&])_=[^&]*/,Qa=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Ra=g.fn.load,ja={},Sa={},U,V,Ta=["*/"]+["*"];try{U=D.href}catch(Kb){U=v.createElement("a"),U.href="",U=U.href}V=Qa.exec(U.toLowerCase())||[];g.fn.extend({load:function(a,c,d){if("string"!=typeof a&&Ra)return Ra.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(0<=e)var f=a.slice(e,a.length),a= a.slice(0,e);e="GET";c&&(g.isFunction(c)?(d=c,c=b):"object"==typeof c&&(c=g.param(c,g.ajaxSettings.traditional),e="POST"));var h=this;g.ajax({url:a,type:e,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText;a.isResolved()&&(a.done(function(a){c=a}),h.html(f?g("
").append(c.replace(Cb,"")).find(f):c));d&&h.each(d,[c,b,a])}});return this},serialize:function(){return g.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?g.makeArray(this.elements): this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Db.test(this.nodeName)||zb.test(this.type))}).map(function(a,b){var c=g(this).val();return null==c?null:g.isArray(c)?g.map(c,function(a){return{name:b.name,value:a.replace(Oa,"\r\n")}}):{name:b.name,value:c.replace(Oa,"\r\n")}}).get()}});g.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(a,b){g.fn[b]=function(a){return this.on(b,a)}});g.each(["get","post"],function(a,c){g[c]=function(a, d,e,f){g.isFunction(d)&&(f=f||e,e=d,d=b);return g.ajax({type:c,url:a,data:d,success:e,dataType:f})}});g.extend({getScript:function(a,c){return g.get(a,b,c,"script")},getJSON:function(a,b,c){return g.get(a,b,c,"json")},ajaxSetup:function(a,b){b?m(a,g.ajaxSettings):(b=a,a=g.ajaxSettings);m(a,b);return a},ajaxSettings:{url:U,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(V[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0, async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Ta},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":g.parseJSON,"text xml":g.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:n(ja),ajaxTransport:n(Sa),ajax:function(a,c){function d(a,c,r,l){if(2!==v){v=2;s&&clearTimeout(s);C=b;p=l||"";t.readyState=0a||304===a){if(e.ifModified){if(z=t.getResponseHeader("Last-Modified"))g.lastModified[m]= z;if(z=t.getResponseHeader("Etag"))g.etag[m]=z}if(304===a)l="notmodified",n=!0;else try{z=e;z.dataFilter&&(r=z.dataFilter(r,z.dataType));var P=z.dataTypes;D={};var O,E,J=P.length,da,F=P[0],K,N,I,L,M;for(O=1;Oa&&(a=0);t.status=a;t.statusText=""+(c||l);n?j.resolveWith(f,[q,l,t]):j.rejectWith(f,[t,l,G]);t.statusCode(k);k=b;x&&h.trigger("ajax"+(n?"Success":"Error"),[t,e,n?q:G]);o.fireWith(f,[t,l]);x&&(h.trigger("ajaxComplete",[t,e]),--g.active||g.event.trigger("ajaxStop"))}}"object"==typeof a&&(c=a,a=b);var c=c||{},e=g.ajaxSetup({},c),f=e.context|| e,h=f!==e&&(f.nodeType||f instanceof g)?g(f):g.event,j=g.Deferred(),o=g.Callbacks("once memory"),k=e.statusCode||{},m,l={},n={},p,A,C,s,u,v=0,x,w,t={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase(),a=n[c]=n[c]||a;l[a]=b}return this},getAllResponseHeaders:function(){return 2===v?p:null},getResponseHeader:function(a){var c;if(2===v){if(!A)for(A={};c=yb.exec(p);)A[c[1].toLowerCase()]=c[2];c=A[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){v||(e.mimeType=a); return this},abort:function(a){a=a||"abort";C&&C.abort(a);d(0,a);return this}};j.promise(t);t.success=t.done;t.error=t.fail;t.complete=o.add;t.statusCode=function(a){if(a){var b;if(2>v)for(b in a)k[b]=[k[b],a[b]];else b=a[t.status],t.then(b,b)}return this};e.url=((a||e.url)+"").replace(xb,"").replace(Bb,V[1]+"//");e.dataTypes=g.trim(e.dataType||"*").toLowerCase().split(va);null==e.crossDomain&&(u=Qa.exec(e.url.toLowerCase()),e.crossDomain=!(!u||u[1]==V[1]&&u[2]==V[2]&&(u[3]||("http:"===u[1]?80:443))== (V[3]||("http:"===V[1]?80:443))));e.data&&e.processData&&"string"!=typeof e.data&&(e.data=g.param(e.data,e.traditional));q(ja,e,c,t);if(2===v)return!1;x=e.global;e.type=e.type.toUpperCase();e.hasContent=!Ab.test(e.type);x&&0===g.active++&&g.event.trigger("ajaxStart");if(!e.hasContent&&(e.data&&(e.url+=(Pa.test(e.url)?"&":"?")+e.data,delete e.data),m=e.url,!1===e.cache)){u=g.now();var y=e.url.replace(Eb,"$1_="+u);e.url=y+(y===e.url?(Pa.test(e.url)?"&":"?")+"_="+u:"")}(e.data&&e.hasContent&&!1!==e.contentType|| c.contentType)&&t.setRequestHeader("Content-Type",e.contentType);e.ifModified&&(m=m||e.url,g.lastModified[m]&&t.setRequestHeader("If-Modified-Since",g.lastModified[m]),g.etag[m]&&t.setRequestHeader("If-None-Match",g.etag[m]));t.setRequestHeader("Accept",e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", "+Ta+"; q=0.01":""):e.accepts["*"]);for(w in e.headers)t.setRequestHeader(w,e.headers[w]);if(e.beforeSend&&(!1===e.beforeSend.call(f,t,e)||2===v))return t.abort(), !1;for(w in{success:1,error:1,complete:1})t[w](e[w]);if(C=q(Sa,e,c,t)){t.readyState=1;x&&h.trigger("ajaxSend",[t,e]);e.async&&0v)d(-1,z);else throw z;}}else d(-1,"No Transport");return t},param:function(a,c){var d=[],e=function(a,b){b=g.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=g.ajaxSettings.traditional);if(g.isArray(a)||a.jquery&&!g.isPlainObject(a))g.each(a, function(){e(this.name,this.value)});else for(var f in a)k(f,a[f],c,e);return d.join("&").replace(wb,"+")}});g.extend({active:0,lastModified:{},etag:{}});var Fb=g.now(),ga=/(\=)\?(&|$)|\?\?/i;g.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return g.expando+"_"+Fb++}});g.ajaxPrefilter("json jsonp",function(b,c,d){c="string"==typeof b.data&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if("jsonp"===b.dataTypes[0]||!1!==b.jsonp&&(ga.test(b.url)||c&&ga.test(b.data))){var e,f=b.jsonpCallback= g.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h=a[f],j=b.url,o=b.data,k="$1"+f+"$2";!1!==b.jsonp&&(j=j.replace(ga,k),b.url===j&&(c&&(o=o.replace(ga,k)),b.data===o&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+f)));b.url=j;b.data=o;a[f]=function(a){e=[a]};d.always(function(){a[f]=h;e&&g.isFunction(h)&&a[f](e[0])});b.converters["script json"]=function(){e||g.error(f+" was not called");return e[0]};b.dataTypes[0]="json";return"script"}});g.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}, contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){g.globalEval(a);return a}}});g.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});g.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=v.head||v.getElementsByTagName("head")[0]||v.documentElement;return{send:function(e,f){c=v.createElement("script");c.async="async";a.scriptCharset&&(c.charset=a.scriptCharset);c.src=a.url;c.onload=c.onreadystatechange=function(a, e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||f(200,"success")};d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var sa=a.ActiveXObject?function(){for(var a in Z)Z[a](0,1)}:!1,Gb=0,Z;g.ajaxSettings.xhr=a.ActiveXObject?function(){var b;if(!(b=!this.isLocal&&j()))a:{try{b=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(c){}b=void 0}return b}:j;(function(a){g.extend(g.support,{ajax:!!a, cors:!!a&&"withCredentials"in a})})(g.ajaxSettings.xhr());g.support.ajax&&g.ajaxTransport(function(c){if(!c.crossDomain||g.support.cors){var d;return{send:function(e,f){var h=c.xhr(),j,o;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(o in c.xhrFields)h[o]=c.xhrFields[o];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType);!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(o in e)h.setRequestHeader(o, e[o])}catch(k){}h.send(c.hasContent&&c.data||null);d=function(a,e){var o,k,m,l,n;try{if(d&&(e||4===h.readyState))if(d=b,j&&(h.onreadystatechange=g.noop,sa&&delete Z[j]),e)4!==h.readyState&&h.abort();else{o=h.status;m=h.getAllResponseHeaders();l={};(n=h.responseXML)&&n.documentElement&&(l.xml=n);try{l.text=h.responseText}catch(q){}try{k=h.statusText}catch(p){k=""}!o&&c.isLocal&&!c.crossDomain?o=l.text?200:404:1223===o&&(o=204)}}catch(A){e||f(-1,A)}l&&f(o,k,l,m)};!c.async||4===h.readyState?d():(j=++Gb, sa&&(Z||(Z={},g(a).unload(sa)),Z[j]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ia={},N,W,Hb=/^(?:toggle|show|hide)$/,Ib=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ha,ba=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ca;g.fn.extend({show:function(a,b,c){var f;if(a||0===a)return this.animate(e("show",3),a,b,c);b=0;for(c=this.length;b=j.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();j.animatedProperties[this.prop]=!0;for(b in j.animatedProperties)!0!==j.animatedProperties[b]&&(e=!1);if(e){null!=j.overflow&&!g.support.shrinkWrapBlocks&&g.each(["","X","Y"],function(a,b){f.style["overflow"+b]=j.overflow[a]});j.hide&&g(f).hide();if(j.hide||j.show)for(b in j.animatedProperties)g.style(f,b,j.orig[b]),g.removeData(f,"fxshow"+b,!0),g.removeData(f,"toggle"+ b,!0);(a=j.complete)&&(j.complete=!1,a.call(f))}return!1}Infinity==j.duration?this.now=d:(c=d-this.startTime,this.state=c/j.duration,this.pos=g.easing[j.animatedProperties[this.prop]](this.state,c,0,1,j.duration),this.now=this.start+(this.end-this.start)*this.pos);this.update();return!0}};g.extend(g.fx,{tick:function(){for(var a,b=g.timers,c=0;c=c[e]?c[d]:Math.max(a.body[e],c[e],a.body[f],c[f]);if(h===b)return a=g.css(a,c),c=parseFloat(a),g.isNumeric(c)?c:a;g(a).css(c,h)},c,a,arguments.length,null)}});a.jQuery=a.$=g;"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return g})})(window);jQuery.easing.jswing=jQuery.easing.swing; jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b*b+c: d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/ e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:1>(b/=e/2)?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)* b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return 1>(b/=e/2)?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var a=1.70158,f=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;f||(f=0.3*e);hb?-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-a)*2*Math.PI/f)+c:0.5*h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-a)*2*Math.PI/f)+d+c},easeInBack:function(a,b,c,d,e,f){void 0== f&&(f=1.70158);return d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){void 0==f&&(f=1.70158);return d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){void 0==f&&(f=1.70158);return 1>(b/=e/2)?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+0.75)+c:b<2.5/2.75? d*(7.5625*(b-=2.25/2.75)*b+0.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+0.984375)+c},easeInOutBounce:function(a,b,c,d,e){return b=b.length&&(c(e),c=function(){})},h=function(b){var c=new Image;a(c).load(function(){e.push({url:b,img:c});f()}).error(function(){e.push(c);f()}).attr("src",b)};a.fn.loader=function(d,e){d&&a.extend(b,d);"function"==typeof e&&(c=e);for(var f=0;fd;d++)this.element.addEventListener(c[d],b,!1); return this},off:function(a,b){for(var c=a.split(" "),d=0;c.length>d;d++)this.element.removeEventListener(c[d],b,!1);return this},trigger:function(a,b){var c=d.DOCUMENT.createEvent("Event");c.initEvent(a,!0,!0);c.gesture=b;var e=this.element;return d.utils.hasParent(b.target,e)&&(e=b.target),e.dispatchEvent(c),this},enable:function(a){return this.enabled=a,this}};var e=null,f=!1,h=!1;d.event={bindDom:function(a,b,c){for(var b=b.split(" "),d=0;b.length>d;d++)a.addEventListener(b[d],c,!1)},onTouch:function(a, b,c){var q=this;this.bindDom(a,d.EVENT_TYPES[b],function(n){var l=n.type.toLowerCase();if(!l.match(/mouse/)||!h){(l.match(/touch/)||l.match(/pointerdown/)||l.match(/mouse/)&&1===n.which)&&(f=!0);l.match(/touch|pointer/)&&(h=!0);var u=0;f&&(d.HAS_POINTEREVENTS&&b!=d.EVENT_END?u=d.PointerEvent.updatePointer(b,n):l.match(/touch/)?u=n.touches.length:h||(u=l.match(/up/)?0:1),0d;d++)b.push(a[d].pageX),c.push(a[d].pageY);return{pageX:(Math.min.apply(Math,b)+Math.max.apply(Math,b))/2,pageY:(Math.min.apply(Math,c)+Math.max.apply(Math,c))/2}},getVelocity:function(a,b,c){return{x:Math.abs(b/a)||0,y:Math.abs(c/a)||0}},getAngle:function(a,b){return 180*Math.atan2(b.pageY-a.pageY,b.pageX-a.pageX)/Math.PI},getDirection:function(a, b){var c=Math.abs(a.pageX-b.pageX),e=Math.abs(a.pageY-b.pageY);return c>=e?0e;e++)for(var f in b)b.hasOwnProperty(f)&&(c=f,d[e]&&(c=d[e]+c.substring(0,1).toUpperCase()+c.substring(1)),a.style[c]=b[f]);"none"==b.userSelect&&(a.onselectstart=function(){return!1})}}};d.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(a,b){this.current||(this.stopped=!1,this.current={inst:a,startEvent:d.utils.extend({}, b),lastEvent:!1,name:""},this.detect(b))},detect:function(a){if(this.current&&!this.stopped){for(var a=this.extendEventData(a),b=this.current.inst.options,c=0,e=this.gestures.length;e>c;c++){var f=this.gestures[c];if(!this.stopped&&!1!==b[f.name]&&!1===f.handler.call(f,a,this.current.inst)){this.stopDetect();break}}return this.current&&(this.current.lastEvent=a),a.eventType==d.EVENT_END&&!a.touches.length-1&&this.stopDetect(),a}},stopDetect:function(){this.previous=d.utils.extend({},this.current); this.current=null;this.stopped=!0},extendEventData:function(a){var b=this.current.startEvent;if(b&&(a.touches.length!=b.touches.length||a.touches===b.touches)){b.touches=[];for(var c=0,e=a.touches.length;e>c;c++)b.touches.push(d.utils.extend({},a.touches[c]))}var c=a.timeStamp-b.timeStamp,e=a.center.pageX-b.center.pageX,f=a.center.pageY-b.center.pageY,h=d.utils.getVelocity(c,e,f);return d.utils.extend(a,{deltaTime:c,deltaX:e,deltaY:f,velocityX:h.x,velocityY:h.y,distance:d.utils.getDistance(b.center, a.center),angle:d.utils.getAngle(b.center,a.center),direction:d.utils.getDirection(b.center,a.center),scale:d.utils.getScale(b.touches,a.touches),rotation:d.utils.getRotation(b.touches,a.touches),startEvent:b}),a},register:function(a){var c=a.defaults||{};return c[a.name]===b&&(c[a.name]=!0),d.utils.extend(d.defaults,c,!0),a.index=a.index||1E3,this.gestures.push(a),this.gestures.sort(function(a,b){return a.indexb.index?1:0}),this.gestures}};d.gestures=d.gestures||{};d.gestures.Hold= {name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:1},timer:null,handler:function(a,b){switch(a.eventType){case d.EVENT_START:clearTimeout(this.timer);d.detection.current.name=this.name;this.timer=setTimeout(function(){"hold"==d.detection.current.name&&b.trigger("hold",a)},b.options.hold_timeout);break;case d.EVENT_MOVE:a.distance>b.options.hold_threshold&&clearTimeout(this.timer);break;case d.EVENT_END:clearTimeout(this.timer)}}};d.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250, tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},handler:function(a,b){if(a.eventType==d.EVENT_END){var c=d.detection.previous,e=!1;a.deltaTime>b.options.tap_max_touchtime||a.distance>b.options.tap_max_distance||(c&&"tap"==c.name&&a.timeStamp-c.lastEvent.timeStampb.options.swipe_max_touches)&&(a.velocityX>b.options.swipe_velocity||a.velocityY>b.options.swipe_velocity)&&(b.trigger(this.name,a),b.trigger(this.name+a.direction,a))}};d.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,drag_max_touches:1,drag_block_horizontal:!1,drag_block_vertical:!1,drag_lock_to_axis:!1, drag_lock_min_distance:25},triggered:!1,handler:function(a,c){if(d.detection.current.name!=this.name&&this.triggered)return c.trigger(this.name+"end",a),this.triggered=!1,b;if(!(0c.options.drag_max_touches))switch(a.eventType){case d.EVENT_START:this.triggered=!1;break;case d.EVENT_MOVE:if(a.distancea.deltaY?d.DIRECTION_UP:d.DIRECTION_DOWN:0>a.deltaX?d.DIRECTION_LEFT:d.DIRECTION_RIGHT);this.triggered||(c.trigger(this.name+"start",a),this.triggered=!0);c.trigger(this.name,a);c.trigger(this.name+a.direction,a);(c.options.drag_block_vertical&&d.utils.isVertical(a.direction)|| c.options.drag_block_horizontal&&!d.utils.isVertical(a.direction))&&a.preventDefault();break;case d.EVENT_END:this.triggered&&c.trigger(this.name+"end",a),this.triggered=!1}}};d.gestures.Transform={name:"transform",index:45,defaults:{transform_min_scale:0.01,transform_min_rotation:1,transform_always_block:!1},triggered:!1,handler:function(a,c){if(d.detection.current.name!=this.name&&this.triggered)return c.trigger(this.name+"end",a),this.triggered=!1,b;if(!(2>a.touches.length))switch(c.options.transform_always_block&& a.preventDefault(),a.eventType){case d.EVENT_START:this.triggered=!1;break;case d.EVENT_MOVE:var e=Math.abs(1-a.scale),f=Math.abs(a.rotation);if(c.options.transform_min_scale>e&&c.options.transform_min_rotation>f)break;d.detection.current.name=this.name;this.triggered||(c.trigger(this.name+"start",a),this.triggered=!0);c.trigger(this.name,a);f>c.options.transform_min_rotation&&c.trigger("rotate",a);e>c.options.transform_min_scale&&(c.trigger("pinch",a),c.trigger("pinch"+(1>a.scale?"in":"out"),a)); break;case d.EVENT_END:this.triggered&&c.trigger(this.name+"end",a),this.triggered=!1}}};d.gestures.Touch={name:"touch",index:-1/0,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(a,c){return c.options.prevent_mouseevents&&a.pointerType==d.POINTER_MOUSE?(a.stopDetect(),b):(c.options.prevent_default&&a.preventDefault(),a.eventType==d.EVENT_START&&c.trigger(this.name,a),b)}};d.gestures.Release={name:"release",index:1/0,handler:function(a,b){a.eventType==d.EVENT_END&&b.trigger(this.name, a)}};"object"==typeof module&&"object"==typeof module.exports?module.exports=d:(a.Hammer=d,"function"==typeof a.define&&a.define.amd&&a.define("hammer",[],function(){return d}))})(this); (function(a,b){a!==b&&(Hammer.event.bindDom=function(c,d,e){a(c).on(d,function(a){var c=a.originalEvent||a;c.pageX===b&&(c.pageX=a.pageX,c.pageY=a.pageY);c.target||(c.target=a.target);c.which===b&&(c.which=c.button);c.preventDefault||(c.preventDefault=a.preventDefault);c.stopPropagation||(c.stopPropagation=a.stopPropagation);e.call(this,c)})},Hammer.Instance.prototype.on=function(b,d){return a(this.element).on(b,d)},Hammer.Instance.prototype.off=function(b,d){return a(this.element).off(b,d)},Hammer.Instance.prototype.trigger= function(b,d){var e=a(this.element);return e.has(d.target).length&&(e=a(d.target)),e.trigger({type:b,gesture:d})},a.fn.hammer=function(b){return this.each(function(){var d=a(this),e=d.data("hammer");e?e&&b&&Hammer.utils.extend(e.options,b):d.data("hammer",new Hammer(this,b||{}))})})})(window.jQuery||window.Zepto);var VERSION_NAME="1.0.5",BUILD_DATE="20120711",isTouch=function(){return Hammer.HAS_TOUCHEVENTS&&navigator.userAgent.match(Hammer.MOBILE_REGEX)},BookType=function(){};BookType.normal_book=0;BookType.single_book=1;BookType.zoom_book=2;var normalBookStatu=function(){};normalBookStatu.book_statu_ready=0;normalBookStatu.book_statu_auto_flip=1;normalBookStatu.book_statu_mouse_flip=2;var singleBookStatu=function(){};singleBookStatu.book_statu_ready=0;singleBookStatu.book_statu_auto_flip=1; singleBookStatu.book_statu_mouse_flip=2;var bookCorner=function(){};bookCorner.top_left=0;bookCorner.top_right=1;bookCorner.bottom_left=2;bookCorner.bottom_right=3;var PageEditor=function(){};PageEditor.AnnoType=function(){};PageEditor.AnnoType.ANNO_LINK="com.mobiano.flipbook.pageeditor.TAnnoLink";PageEditor.AnnoType.ANNO_YOUTUBE="com.mobiano.flipbook.pageeditor.TAnnoYouTube";PageEditor.AnnoType.ANNO_YOUTUBE1="com.mobiano.flipbook.pageeditor::TAnnoYoutubePlayer"; PageEditor.AnnoType.ANNO_YOUTUBE2="com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer02";PageEditor.AnnoType.ANNO_YOUTUBE3="com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer03";PageEditor.AnnoType.ANNO_YOUTUBE4="com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer04";PageEditor.AnnoType.ANNO_YOUTUBE5="com.mobiano.flipbook.pageeditor.player::TAnnoYoutubePlayer05";PageEditor.AnnoType.ANNO_VIDEO1="com.mobiano.flipbook.pageeditor::TAnnoVideoPlayer"; PageEditor.AnnoType.ANNO_VIDEO2="com.mobiano.flipbook.pageeditor.player::TAnnoSimpleVideoPlayer";PageEditor.AnnoType.ANNO_VIDEO3="com.mobiano.flipbook.pageeditor::TAnnoPlugIn";PageEditor.AnnoType.ANNO_AUDIO1="com.mobiano.flipbook.pageeditor::TAnnoAdvancedSound";PageEditor.AnnoType.ANNO_AUDIO2="com.mobiano.flipbook.pageeditor::TAnnoWavemusicPlayer";PageEditor.AnnoType.ANNO_AUDIO3="com.mobiano.flipbook.pageeditor::TAnnoPlugIn11";PageEditor.AnnoType.ANNO_AUDIO4="";PageEditor.AnnoType.ANNO_AUDIO5=""; PageEditor.AnnoType.ANNO_AUDIO6="";PageEditor.AnnoType.ANNO_AUDIO7="";PageEditor.AnnoType.ANNO_AUDIO8="";PageEditor.AnnoType.ANNO_AUDIO9="";PageEditor.AnnoType.ANNO_VIMEO="com.mobiano.flipbook.pageeditor.vimeoPlayer::TAnnoVimeoPlayer";PageEditor.AnnoType.ANNO_VIMEO1="com.mobiano.flipbook.pageeditor.vimeoPlayer::TAnnoVimeoPopUpPlayer";PageEditor.AnnoType.ANNO_VIDEO="com.mobiano.flipbook.pageeditor.TAnnoMovie";PageEditor.AnnoType.ANNO_AUDIO="com.mobiano.flipbook.pageeditor.TAnnoSound"; PageEditor.AnnoType.ANNO_IMAGE="com.mobiano.flipbook.pageeditor.TAnnoImage";PageEditor.AnnoType.ANNO_BUTTON="com.mobiano.flipbook.pageeditor.TAnnoButton";PageEditor.AnnoType.ANNO_LINE="com.mobiano.flipbook.pageeditor.shapes::TAnnoLine";PageEditor.AnnoType.ANNO_ARROW="com.mobiano.flipbook.pageeditor.shapes::TAnnoArrow";PageEditor.AnnoType.ANNO_ROUND="com.mobiano.flipbook.pageeditor.shapes::TAnnoEllipse";PageEditor.AnnoType.ANNO_RECTANGLE="com.mobiano.flipbook.pageeditor.shapes::TAnnoRectangle"; PageEditor.AnnoType.ANNO_TEXT="com.mobiano.flipbook.pageeditor::TAnnoText";PageEditor.AnnoType.ANNO_AREA="com.mobiano.flipbook.pageeditor::TAnnoHighLightArea";PageEditor.AnnoType.ANNO_FLASHSHOW="com.mobiano.flipbook.pageeditor.TAnnoEmbeddedSlideshow";PageEditor.AnnoType.ANNO_ATEXT="com.mobiano.flipbook.pageeditor::TAnnoDynamicText";PageEditor.AnnoType.ANNO_STARTEXT="com.mobiano.flipbook.pageeditor::TAnnoStarwarsText";PageEditor.AnnoType.ANNO_TEXTANIM="com.mobiano.flipbook.pageeditor.textAnim::TAnnoTextAnim"; PageEditor.AnnoType.ANNO_ATIMAGE="com.mobiano.flipbook.pageeditor.TAnnoClipart";PageEditor.AnnoType.ANNO_EFFECTTEXT="com.mobiano.flipbook.pageeditor.TAnnoEffectText";PageEditor.AnnoType.ANNO_CALLOUT="com.mobiano.flipbook.pageeditor.shapes::TAnnoCallout";PageEditor.AnnoType.ANNO_ADVANCEDSOUND="com.mobiano.flipbook.pageeditor::TAnnoAdvancedSound";PageEditor.PlayEvt=function(){};PageEditor.PlayEvt.EVT_PLAY="EVT_PageViewed";PageEditor.PlayEvt.EVT_STOP="EVT_PageOffView";PageEditor.TriggerEventType=function(){}; PageEditor.TriggerEventType.MouseDown="mouseDown";PageEditor.TriggerEventType.MouseOver="mouseOver";PageEditor.TriggerEventType.MouseOut="mouseOut";PageEditor.ActionType=function(){};PageEditor.ActionType.GOTO_PAGE="com.mobiano.flipbook.pageeditor.TAnnoActionGotoPage";PageEditor.ActionType.OPEN_URL="com.mobiano.flipbook.pageeditor.TAnnoActionOpenURL";PageEditor.ActionType.OPEN_WINDOW="com.mobiano.flipbook.pageeditor.TAnnoActionOpenWindow";PageEditor.ActionType.SLIDE_SHOW="com.mobiano.flipbook.pageeditor.TAnnoActionPhotoSlide"; PageEditor.ActionType.ACTION_JS="com.mobiano.flipbook.pageeditor.TAnnoActionJavascript";PageEditor.ActionType.PLAY_AUDIO="com.mobiano.flipbook.pageeditor.TAnnoActionPlayAudio";var _event;_event=isTouch()?{_down:"touchstart",_move:"touchmove",_end:"touchend"}:{_down:"mousedown",_move:"mousemove",_end:"mouseup"};var bookEvent=function(){};bookEvent.onCurrentPageIndexChanged="BE_PIC";bookEvent.onCurrentPageIndexWillChange="BE_PIWC";bookEvent.onNoNextPage="BE_NNP";bookEvent.onNoPreviousPage="BE_NPP";$.fn.zoom=function(a,b,c,d,e){try{if(null==this||void 0==this)return;var f=Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2)),h=Math.sqrt(Math.pow(d.x-c.x,2)+Math.pow(d.y-c.y,2)),j=e.width+2*(h-f);this.css({width:j+"px",height:j*e.height/e.width+"px"})}catch(k){return!1}return!0};(function(a){var b=function(b,d,e,f,h){h=a.extend({background:"green",cornersTop:!0,scale:"noresize"},h);b.prev();var j=0,k=!1,m=h.background,q=h.cornersTop,n=h.gradientColors||["#ddd","#eee","#fff"],l=h.scale,u=[],p=b.clone(),z=a.browser.msie?null:p[0].getContext("2d"),b=a.browser.msie?a(G_vmlCanvasManager.initElement(b[0])):b,t=b[0].getContext("2d"),J=0,f=f.each(function(b){if(!u[b]){var c=this;c.onload=function(){var h=1;if("noresize"!=l){var j=d/this.width,m=e/this.height;"fit"==l&&(h=1>j||1> m?Math.min(j,m):1);"fill"==l&&(h=Math.min(j,m))}a(c).data("flip.scale",h);u[b]=t.createPattern(c,"no-repeat");J++;J==f.length&&!k&&(k=!0,M())};c.complete&&window.setTimeout(function(){c.onload()},10)}}).get(),w=d,s=e,x=a.browser.msie?b.offset():null,y,I,K,L;a.browser.msie&&function(){var f=a("
").width(d).height(e).css({position:"absolute",cursor:"default",zIndex:1}).appendTo(tmpContainer);7==parseInt(a.browser.version)&&f.css({opacity:1.0E-6,background:"#FFF"});var g=function(){x=b.offset(); return f.css({left:x.left+"px",top:x.top+"px"})};a(window).resize(g);return g()}();setInterval(function(){window.clearInterval(y);I=(new Date).getTime();K=w;L=s/50;y=window.setInterval(R,0);j+=1;0>j&&(j=f.length-1);j==f.length&&(j=0)},3E3);var R=function(){var a=(new Date).getTime()-I;700<=a?(window.clearInterval(y),f.push(f.shift()),u.push(u.shift()),w=d,s=e):(w=K-2*d*a/700,s=L+2*e*a/700/3);M()},v=function(b,c){var f=b*d+c,h=-c/b;a.browser.msie&&(f=Math.round(f),h=Math.round(h));t.beginPath();t.moveTo(d, Math.min(f,e));t.lineTo(d,0);t.lineTo(Math.max(h,0),0);0>h?(t.lineTo(0,Math.min(c,e)),cparseFloat(a.browser.version)?(E=z,E.clearRect(0,0,d,e),E.save(),E.translate(1,0)):E=t;l=E.createLinearGradient(l,o,C,x);l.addColorStop(0,n[0]);l.addColorStop(y/c,n[1]);l.addColorStop(1,n[2]);E.fillStyle=l;E.beginPath();E.moveTo(-b/ 2,0);E.quadraticCurveTo((-b/2+w)/2+0.02*w,s/2,w,s);E.quadraticCurveTo((d+w)/2,(2*d+b+s)/2-0.02*(e-s),d,2*d+b);a.browser.mozilla&&1.9>parseFloat(a.browser.version)?(E.save(),E.clip(),E.fillRect(0,0,d,e),E.restore(),t.drawImage(p[0],0,0),E.restore()):E.fill();t.fillStyle=m;v(2,b);t.fill();v(2,b);!a.browser.safari&&!a.browser.opera&&t.restore();b=f[1];c=a(b).data("flip.scale");if(a.browser.msie)t.fillStyle=u[1],t.fillStyle.width2=t.fillStyle.width*c,t.fillStyle.height2=t.fillStyle.height*c,t.fill(); else{t.save();t.clip();if(a.browser.safari||a.browser.opera)t.scale(1,1/h),t.translate(-0.0,-j);t.drawImage(b,(d-b.width*c)/2,(e-b.height*c)/2,b.width*c,b.height*c);t.restore();(a.browser.safari||a.browser.opera)&&t.restore()}}}}};a.fn.jFlip=function(c,d,e,f,h){return this.each(function(){a(this).wrap("
");var j=a(this).find("img"),k=a(document.createElement("canvas")).attr({width:c,height:d}).css({margin:0, width:c+"px",height:d+"px"});a(this).css({position:"absolute",left:"-9000px",top:"-9000px",display:"none"}).after(k);new b(a(this).next(),c||300,d||300,j,e)})}})(jQuery);colorTo0x=function(a){"string"!=typeof a&&(a=""+a);var b=a;"#"!=a.substr(0,1)&&"0x"!=a.substr(0,2)&&(b=parseInt(a).toString(16),b="#"+"000000".substr(0,6-b.length)+b);"0x"==a.substr(0,2)&&(b=a.replace("0x","#"));return b};var Point=function(a,b){return{x:a,y:b}};function debug(a){window.console&&window.console.log&&window.console.log(a)} function colorSplit(a){"string"!=typeof a&&(a=""+a);var b={r:0,g:0,b:0},c="FF",d="FF",e="FF";7==a.length?(c=a.substr(1,2),d=a.substr(3,2),e=a.substr(5,2)):4==a.length&&(c=a.substr(1,1),d=a.substr(2,1),e=a.substr(3,1),c+=c,d+=d,e+=e);b.r=parseInt(c,16);b.g=parseInt(d,16);b.b=parseInt(e,16);return b} function colorAdd(a,b){"string"!=typeof a&&(a=""+a);var c=colorSplit(a);c.r=Math.min(c.r+b,255).toString(16);c.g=Math.min(c.g+b,255).toString(16);c.b=Math.min(c.b+b,255).toString(16);c.r=1>=c.r.length?"0"+c.r:c.r;c.g=1>=c.g.length?"0"+c.g:c.g;c.b=1>=c.b.length?"0"+c.b:c.b;return"#"+c.r+c.g+c.b} function colorDiv(a,b){"string"!=typeof a&&(a=""+a);var c=colorSplit(a);c.r=Math.max(c.r-b,0).toString(16);c.g=Math.max(c.g-b,0).toString(16);c.b=Math.max(c.b-b,0).toString(16);c.r=1>=c.r.length?"0"+c.r:c.r;c.g=1>=c.g.length?"0"+c.g:c.g;c.b=1>=c.b.length?"0"+c.b:c.b;return"#"+c.r+c.g+c.b} $.fn.setGradient=function(a,b){"string"!=typeof a&&(a=""+a);var c=colorAdd(a,30),d=colorDiv(a,30);void 0==b&&(b=!1);var e="",f="0";b&&(e="left,",f="1");this.css({background:"linear-gradient("+e+c+", "+d+")"});switch(browserType){case 1:this.css({background:"-webkit-linear-gradient("+e+c+", "+d+")"});break;case 2:this.css({background:"-moz-linear-gradient("+e+c+", "+d+")"});break;case 3:this.css({background:"-ms-linear-gradient("+e+c+", "+d+")"});this.css("filter","progid:DXImageTransform.Microsoft.Gradient(GradientType="+ f+", EndColorStr="+d+", StartColorStr="+c+")");break;case 4:this.css({background:"-o-linear-gradient("+e+c+", "+d+")"})}};$.fn.addBorderShadow=function(a,b,c){"string"!=typeof a&&(a=""+a);var d=a;b&&(d=colorDiv(a,30));a="5px";c&&(a="-5px");this.css({"-moz-box-shadow":"0px "+a+" 5px "+d,"box-shadow":"0px "+a+" 5px "+d,"-webkit-box-shadow":"0px "+a+" 5px "+d})}; $.fn.changeButtonColor=function(a){"string"!=typeof a&&(a=""+a);var b=this.find("img:first"),c=$("")[0],d=c.getContext("2d"),e=b.width(),f=b.height(),b=b[0];c.width=e;c.height=f;d.drawImage(b,0,0,b.naturalWidth,b.naturalHeight,0,0,e,f);var h=d.getImageData(0,0,e,f),e=d.getImageData(0,0,e,f);if(h){for(var a=colorSplit(a),f=0,j=h.data.length;fbrowserType))switch(browserType){case 1:this.css({"-webkit-transform":"rotate("+a+"deg)"});break;case 2:this.css({"-moz-transform":"rotate("+a+"deg)"});break;case 3:this.css({"-ms-transform":"rotate("+a+"deg)"});break;case 4:this.css({"-0-transform":"rotate("+a+"deg)"})}};Array.indexOf||(Array.prototype.indexOf=function(a){for(var b=0;b
");this.loadingBox=$("
");this.firstImg=$("");this.titleLabel=new label(window.document.title,this.loadingBox);this.loadingImage=$("");this.bg.css({"background-color":"#474747",width:window.innerWidth+"px",height:window.innerHeight+"px"});isTouch&&(this.width=window.innerWidth,this.height=window.innerHeight);this.loadingImage.css({left:(this.width- 32)/2+"px",top:this.height-80+"px"});b||(b="#805080");this.loadingBox.css({width:this.width+"px",height:this.height+"px","-webkit-border-radius":"9px","-moz-border-radius":"9px","-ms-border-radius":"9px","-o-border-radius":"9px","border-radius":"9px","-webkit-box-shadow":"0 0 10px rgba(40, 0, 0, 0.8)","-moz-box-shadow":"0 0 10px rgba(40, 0, 0, 0.8)","-o-box-shadow":"0 0 10px rgba(40, 0, 0, 0.8)","box-shadow":"0 0 10px rgba(40, 0, 0, 0.8)",position:"absolute",left:(window.innerWidth-this.width)/2+ "px",top:(window.innerHeight-this.height)/2+"px","background-color":b});var c=150;300>window.innerWidth&&(c=(window.innerWidth-10)/2);this.firstImg.attr({src:getPageDir(1,"thumb")});this.firstImg.css({"-webkit-box-shadow":"0 0 5px rgba(40, 0, 0, 0.6)","-moz-box-shadow":"0 0 5px rgba(40, 0, 0, 0.6)","-o-box-shadow":"0 0 5px rgba(40, 0, 0, 0.6)","box-shadow":"0 0 5px rgba(40, 0, 0, 0.6)",position:"absolute",width:c+"px",top:this.height/2-100+"px",left:this.width/2-(c+5)+"px","backgroud-color":"#888888"}); this.titleLabel.setLabelPosition(this.width/2+10,this.height/2-80);this.titleLabel.setFont(18,"#FFFFFF","Tahoma");a.append(this.bg);this.bg.append(this.loadingBox);this.loadingBox.append(this.firstImg);this.loadingBox.append(this.titleLabel);this.loadingBox.append(this.loadingImage)}loadingBook.prototype.hide=function(){this.bg.remove()};function initAudio(a,b,c,d){this.config=$.extend({width:80,height:30,x:20,y:20,src:null,alpha:1},b);this.audio=null;null!=this.config.src&&(this.pw=c,this.ph=d,this.width=this.config.width*this.pw,this.height=this.config.height*this.ph,this.x=this.config.x*this.pw,this.y=this.config.y*this.ph,"String"!=typeof this.config.src&&(this.config.src=""+this.config.src),"./"==this.config.src.substr(0,2)&&(this.config.src="."+this.config.src),this.audio=$(""),a.append(this.audio))}initAudio.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.audio.css({width:this.width+"px",height:this.height+"px"});this.setPosition()}; initAudio.prototype.setPosition=function(){this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;this.audio.css({left:this.x+"px",top:this.y+"px"})};initAudio.prototype.play=function(){null!=this.audio&&this.audio[0].play()};initAudio.prototype.pause=function(){null!=this.audio&&this.audio[0].pause()};initAudio.prototype.stop=function(){null!=this.audio&&this.audio[0].stop()};initAudio.prototype.getPlayEvt=function(){return this.config.soundPlayTriggerEvt};initAudio.prototype.getStopEvt=function(){return this.config.soundStopTriggerEvt};function initYoutube(a,b,c,d){this.config=$.extend({width:400,height:300,x:0.02,y:0.02,alpha:1,id:null},b);this.youtubeFrame=null;null!=this.config.id&&(this.father=a,this.pw=c,this.ph=d,this.width=this.config.width*this.pw,this.height=this.config.height*this.ph,this.x=this.config.x*this.pw,this.y=this.config.y*this.ph,this.youtubeFrame=$(""))}initYoutube.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.youtubeFrame.css({width:this.pw*this.config.width+"px",height:this.ph*this.config.height+"px"});this.setPosition(this.config.x*this.pw,this.config.y*this.ph)};initYoutube.prototype.setPosition=function(a,b){this.youtubeFrame.css({top:b+"px",left:a+"px"})};initYoutube.prototype.getPlayEvt=function(){return this.config.moviePlayTriggerEvt}; initYoutube.prototype.getStopEvt=function(){return this.config.movieStopTriggerEvt};initYoutube.prototype.hide=function(){this.youtubeFrame.remove()};initYoutube.prototype.show=function(){this.father.append(this.youtubeFrame)};function initVimeo(a,b,c,d){this.config=$.extend({width:0.2,height:0.2,x:0.2,y:0.2,id:null},b);null==this.config.id||""==this.config.id||(this.pw=c,this.ph=d,this.width=this.config.width*this.pw,this.height=this.config.height*this.ph,this.x=this.config.x*this.pw,this.y=this.config.y*this.ph,this.vimeo=$(""),a.append(this.vimeo), this.vimeo.css({left:this.x+"px",top:this.y+"px",position:"absolute"}))}initVimeo.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.pw*this.config.width;this.height=this.ph*this.config.height;this.x=this.pw*this.config.x;this.y=this.ph*this.config.y;this.vimeo.css({width:this.width+"px",height:this.height+"px",left:this.x+"px",top:this.y+"px"})};function initVideo(a,b,c,d){this.config=$.extend({width:0.6,height:0.5,x:0.2,y:0.2,src:null,alpha:1},b);this.video=null;null==this.config.src&&".mp4"!=this.config.src.substr(this.config.src.length-4,4)||(this.pw=c,this.ph=d,this.width=this.config.width*this.pw,this.height=this.config.height*this.ph,this.x=this.config.x*this.pw,this.y=this.config.y*this.ph,isFlipPdf&&(this.config.src="../"+this.config.src),this.video=$(""),a.append(this.video))}initVideo.prototype.onResize=function(a,b){null!=this.video&&(this.pw=a,this.ph=b,this.width=this.config.width*this.pw,this.height=this.config.height*this.ph,this.video.css({width:this.width+"px",height:this.height+"px"}),this.setPosition())}; initVideo.prototype.setPosition=function(){null!=this.video&&(this.x=this.pw*this.config.x,this.y=this.ph*this.config.y,this.video.css({left:this.x+"px",top:this.y+"px"}))};initVideo.prototype.playVideo=function(){null!=this.video&&this.video[0].play()};initVideo.prototype.stopVideo=function(){null!=this.video&&this.video[0].stop()};initVideo.prototype.pauseVideo=function(){null!=this.video&&this.video[0].pause()};initVideo.prototype.getPlayEvt=function(){return this.config.moviePlayTriggerEvt}; initVideo.prototype.getStopEvt=function(){return this.config.soundStopTriggerEvt};function initEffText(a,b,c,d,e){this.config=$.extend({width:200,height:20,x:0,y:0,alpha:1,textStr:null,fontName:null,fontSize:12,color:null,tbold:"false",italic:"false",moveSpeed:0,action:null,sh:"false",sx:4,sy:4,se:2,sr:null},b);this.pw=c;this.ph=d;this.color=colorTo0x(this.config.color);"#0"==this.color&&(this.color="#000");this.father=a;this.speed=this.pos=0;this.speed="ChangeSpeed"==this.config.moveSpeed?250:50;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.x= this.config.x*this.pw;this.y=this.config.y*this.ph;this.id="efftext"+e;this.scrollid="efftext"+this.id;this.efftext="false"!=this.config.sh?$("
"):$("
");this.efftext2=$("
");"false"!=this.config.tbold&&this.efftext.css({"font-weight":"bold"});"false"!=this.config.italic&&this.efftext.css({"font-style":"italic"});this.father=a;this.initEvent();a.append(this.efftext); this.efftext.append(this.efftext2);this.initeffAmin()}initEffText.prototype.initeffAmin=function(){var a=this,b,c=a.config.textStr;this.efftext2.html(c.substring(0,a.pos));a.pos++==c.length?(a.pos=0,clearTimeout(b)):b=setTimeout(function(){a.initeffAmin()},a.speed)}; initEffText.prototype.initEvent=function(){var a=this;this.flag=0;this.linkURL=null;if(null!=a.config.action){try{void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url}catch(b){}var c;null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL);try{c=this.config.action.triggerEventType}catch(d){c=null}this.efftext.bind(_event._down,function(){c==PageEditor.TriggerEventType.MouseDown&&actionEvent.call(a); browserType==3?event.cancelBubble=true:event.stopPropagation()});this.efftext.bind("mouseover",function(){c==PageEditor.TriggerEventType.MouseOver&&actionEvent.call(a)});this.efftext.bind(isTouch?_event._end:"mouseout",function(){c==PageEditor.TriggerEventType.MouseOut&&actionEvent.call(a)})}}; initEffText.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.efftext.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());this.fontSize=0.75*this.config.lineH*this.ph}; initEffText.prototype.setPosition=function(){this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;this.efftext.css({left:this.x+"px",top:this.y+"px"})};function initButton(a,b,c,d){this.config=$.extend({width:0.2,height:0.2,x:0.2,y:0.2,alpha:1,src:null},b);this.pw=c;this.ph=d;this.width=c*this.config.width;this.height=d*this.config.height;this.button=null;var b=[],e=this,b="button_watermark01.swf,button_watermark02.swf,button_watermark03.swf,button_watermark04.swf,button_watermark05.swf,button_watermark06.swf,button_watermark07.swf,button_watermark08.swf,button_watermark09.swf,button_glossy01.swf,button_glossy02.swf,button_glossy03.swf,button_glossy04.swf,button_glossy05.swf,button_glossy06.swf,button_glossy07.swf,button_glossy08.swf,button_glossy09.swf,button_glossy10.swf,button_glossy11.swf,button_glossy12.swf,button_glossy13.swf,button_glossy14.swf,button_glossy15.swf,button_glossy16.swf,button_glossy17.swf,button_push01.swf,button_push02.swf,button_push03.swf,button_push04.swf,button_push05.swf,button_push06.swf,button_lineLight01.swf,button_lineLight02.swf,button_lineLight03.swf,button_lineLight04.swf,button_lineLight05.swf,button_star01.swf,button_star02.swf,button_star03.swf,button_star04.swf,button_star05.swf,button_glitter01.swf,button_glitter02.swf,button_glitter03.swf,button_glitter04.swf,button_glitter05.swf,button_glitter06.swf,button_shadow01.swf,button_shadow02.swf,button_shadow03.swf,button_shadow04.swf,button_shadow05.swf,button_shadow06.swf,button_bottomLight01.swf,button_bottomLight02.swf,button_bottomLight03.swf,button_bottomLight04.swf,button_bottomLight05.swf,button_bottomLight06.swf,button_bottomLight07.swf,button_bottomLight08.swf,button_bottomLight09.swf,button_bottomLight10.swf,button_other01.swf,button_other02.swf,button_other03.swf".split(","); null==this.config.src||"null"==this.config.src?this.button=$(""):(isFlipPdf&&(this.config.src="."+this.config.src),c=this.config.src.substring(this.config.src.lastIndexOf("/")+1,this.config.src.length),this.swfButton=0<=b.indexOf(c))?(this.config.Format.color=colorTo0x(this.config.Format.color),this.button=$("
"),this.buttonEvt=$("
"),this.buttonCaption=new label(this.config.buttonCaption,this.button),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, 0, 0, 0.7)","-moz-box-shadow":"0 0 10px rgba(40, 0, 0, 0.7)","box-shadow":"0 0 10px rgba(40, 0, 0, 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.buttonCaption.setFont(2*this.config.HRate*this.height/3,this.config.Format.color,this.config.Format.font),this.buttonCaption.setLabelPosition(this.buttonCaption.getWidth()>this.width?0:(this.width-this.buttonCaption.getWidth())/2,this.config.captionY*this.height/100),this.button.append(this.buttonEvt),this.button.bind(_event._down,function(){e.buttonEvt.css({display:"block"})}),this.button.bind(_event._end,function(){e.buttonEvt.css({display:"none"})}), this.button.bind("mouseleave",function(){e.buttonEvt.css({display:"none"})})):".swf"==this.config.src.substr(this.config.src.length-4,4)?this.button=$("
"):(this.button=$(""),this.button.attr({src:this.config.src}));this.button.css({position:"absolute",width:this.width+"px",height:this.height+"px",left:this.pw*this.config.x+"px",top:this.ph*this.config.y+"px",opacity:this.config.alpha});a.append(this.button);this.father=a;this.initEvt()} initButton.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.config.width*a;this.height=this.config.height*b;this.button.css({width:this.width+"px",height:this.height+"px"});this.setPosition(this.config.x*a,this.config.y*b);if(null!=this.form)this.form.onResize(bookContainer.width(),bookContainer.height());if(null!=this.slide)this.slide.onResize(bookContainer.width(),bookContainer.height());this.swfButton&&(this.buttonCaption.setFont(2*this.config.HRate*this.height/3,this.config.Format.color, this.config.Format.font),this.buttonCaption.setLabelPosition(this.buttonCaption.getWidth()>this.width?0:(this.width-this.buttonCaption.getWidth())/2,this.config.captionY*this.height/100),this.buttonEvt.css({width:this.width+"px",height:this.height+"px"}))};initButton.prototype.setPosition=function(a,b){this.button.css({left:a+"px",top:b+"px"})}; initButton.prototype.initEvt=function(){this.slide=this.form=null;if(void 0!=this.config.action){var a=this;this.flag=0;this.linkURL=null;try{void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url}catch(b){}var c;null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL);try{c=this.config.action.triggerEventType}catch(d){c=null}this.button.bind(_event._down,function(){c==PageEditor.TriggerEventType.MouseDown&& actionEvent.call(a);browserType==3?event.cancelBubble=true:event.stopPropagation()});this.button.bind("mouseover",function(){c==PageEditor.TriggerEventType.MouseOver&&actionEvent.call(a)});this.button.bind(isTouch?_event._end:"mouseout",function(){c==PageEditor.TriggerEventType.MouseOut&&actionEvent.call(a)})}};function initImage(a,b,c,d){this.config=$.extend({width:0.2,height:0.2,x:0.2,y:0.2,alpha:1,src:null},b);this.img=$("");null!=this.config.src&&(this.pw=c,this.ph=d,this.width=this.config.width*c,this.height=this.config.height*d,isFlipPdf&&(this.config.src="."+this.config.src),this.img.attr({src:this.config.src}),this.img.css({position:"absolute",width:this.width+"px",height:this.height+"px",left:this.pw*this.config.x+"px",top:this.ph*this.config.y+"px",opacity:this.config.alpha}),a.append(this.img), this.father=a,this.initEvt())} initImage.prototype.initEvt=function(){this.slide=this.form=null;if(void 0!=this.config.action){var a=this;this.flag=0;this.linkURL=null;try{void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url}catch(b){}var c;null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL);try{c=this.config.action.triggerEventType}catch(d){c=null}this.img.bind(_event._down,function(){c==PageEditor.TriggerEventType.MouseDown&& actionEvent.call(a);browserType==3?event.cancelBubble=true:event.stopPropagation()});this.img.bind("mouseover",function(){c==PageEditor.TriggerEventType.MouseOver&&actionEvent.call(a)});this.img.bind(isTouch?_event._end:"mouseout",function(){c==PageEditor.TriggerEventType.MouseOut&&actionEvent.call(a)})}}; initImage.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=a*this.config.width;this.height=b*this.config.height;this.img.css({width:this.width+"px",height:this.height+"px"});this.setPosition(this.config.x*a,this.config.y*b);if(null!=this.form)this.form.onResize(bookContainer.width(),bookContainer.height());if(null!=this.slide)this.slide.onResize(bookContainer.width(),bookContainer.height())};initImage.prototype.setPosition=function(a,b){this.img.css({left:a+"px",top:b+"px"})};function initRe(a,b,c,d,e){this.config=$.extend({width:200,height:20,x:0,y:0,alpha:1,fillStyle:null,color:null,ColorA:null,ColorB:null,angle:90,spalpha:1,action:null,borderWidth:1,borderColor:null,borderAlpha:1,sh:"false",sx:4,sy:4,se:2,sr:null},b);this.pw=c;this.ph=d;this.father=a;this.color=colorTo0x(this.config.color);this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;this.id="re"+e;this.angle=360-parseInt(this.config.angle); this.A=colorTo0x(this.config.ColorA);this.B=colorTo0x(this.config.ColorB);this.Re="false"!=this.config.sh?$("
"): $("
");"gradient"==this.config.fillStyle&&this.Re.css({"background-image":"-webkit-linear-gradient("+this.angle+"deg, "+this.A+", "+this.B+")"});"none"==this.config.fillStyle&&this.Re.css({background:""});this.initEvent(); a.append(this.Re)} initRe.prototype.initEvent=function(){var a=this;this.flag=0;this.linkURL=this.slide=this.form=null;if(null!=a.config.action){try{void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url}catch(b){}var c;null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL);try{c=this.config.action.triggerEventType}catch(d){c=null}this.Re.bind(_event._down,function(){c==PageEditor.TriggerEventType.MouseDown&&actionEvent.call(a); browserType==3?event.cancelBubble=true:event.stopPropagation()});this.Re.bind("mouseover",function(){c==PageEditor.TriggerEventType.MouseOver&&actionEvent.call(a)});this.Re.bind(isTouch?_event._end:"mouseout",function(){c==PageEditor.TriggerEventType.MouseOut&&actionEvent.call(a)})}}; initRe.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.Re.css({width:this.width+"px",height:this.height+"px"});this.setPosition();if(null!=this.form)this.form.onResize(bookContainer.width(),bookContainer.height());if(null!=this.slide)this.slide.onResize(bookContainer.width(),bookContainer.height())}; initRe.prototype.setPosition=function(){this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;this.Re.css({left:this.x+"px",top:this.y+"px"})};function initRound(a,b,c,d,e){this.config=$.extend({width:200,height:20,x:0,y:0,alpha:1,fillStyle:null,color:null,ColorA:null,ColorB:null,angle:"false",spalpha:1,action:null,borderWidth:1,borderColor:null,borderAlpha:1,sh:"false",sx:4,sy:4,se:2,sr:null},b);this.pw=c;this.ph=d;this.color=colorTo0x(this.config.color);this.father=a;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;this.id="round"+e;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=$("");this.father=a;this.initEvent();a.append(this.rounds);this.roundcan(this.x,this.y,this.width,this.height,this.color,this.config.fillStyle,this.config.ColorA,this.config.ColorB,this.config.alpha,this.config.borderWidth,this.config.spalpha,this.config.borderColor,this.config.borderAlpha, this.config.sx,this.config.sy,this.config.se,this.config.sr,this.config.sh,360-parseInt(this.config.angle))} initRound.prototype.initEvent=function(){var a=this;this.flag=0;this.slide=this.form=null;this.linkURL;if(null!=a.config.action){try{void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url}catch(b){}var c;null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL);try{c=this.config.action.triggerEventType}catch(d){c=null}this.rounds.bind(_event._down,function(){c==PageEditor.TriggerEventType.MouseDown&& actionEvent.call(a);browserType==3?event.cancelBubble=true:event.stopPropagation()});this.rounds.bind("mouseover",function(){c==PageEditor.TriggerEventType.MouseOver&&actionEvent.call(a)});this.rounds.bind(isTouch?_event._end:"mouseout",function(){c==PageEditor.TriggerEventType.MouseOut&&actionEvent.call(a)})}}; initRound.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.rounds.css({width:this.width+20+"px",height:this.height+20+"px"});this.setPosition();if(null!=this.form)this.form.onResize(bookContainer.width(),bookContainer.height());if(null!=this.slide)this.slide.onResize(bookContainer.width(),bookContainer.height())}; initRound.prototype.setPosition=function(){this.x=this.config.x*this.pw-10;this.y=this.config.y*this.ph-10;this.rounds.css({left:this.x+"px",top:this.y+"px"})}; initRound.prototype.roundcan=function(a,b,c,d,e,f,h,j,k,m,q,n,l,u,p,z,t,J,w){b=l=0;a=this.rounds[0].getContext("2d");k=[c/2+10,d/2+10];l=c/2;b=d/2;a.save();a.beginPath();a.strokeStyle=colorTo0x(n);a.lineWidth=m;a.globalAlpha=q;"false"!=J&&(a.shadowOffsetX=u,a.shadowOffsetY=p,a.shadowBlur=z,a.shadowColor=colorTo0x(t));a.closePath();a.stroke();a.restore();DrawEllipse(a,k,l,b);"gradient"==f&&(d=w*Math.PI/180,c=k[0]+l*Math.cos(d),d=k[1]+b*Math.sin(d),w=(w+180)*Math.PI/180,q=k[0]+l*Math.cos(w),w=k[1]+ b*Math.sin(w),w=a.createLinearGradient(c,d,q,w),w.addColorStop(0,colorTo0x(h)),w.addColorStop(1,colorTo0x(j)),a.fillStyle=w,a.fill());"none"==f&&(a.fillStyle=e,a.fill());0!=m&&a.stroke();a.closePath()};function DrawEllipse(a,b,c,d){var e=b[0]+c,f=b[1];a.moveTo(e,f);for(var h=0;360>=h;h++)f=h*Math.PI/180,e=b[0]+c*Math.cos(f),f=b[1]-d*Math.sin(f),a.lineTo(e,f)};function initText(a,b,c,d,e,f){this.config=$.extend({width:200,height:20,x:0,y:0,alpha:1,textStr:null,lineH:20,fontName:"Tahoma",fontSize:12,color:null,tbold:"false",italic:"false",bgalpha:1,action:null,fillBg:"false",bgcolor:null,sh:"false",sx:4,sy:4,se:2,sr:null},b);this.pw=c;this.ph=d;this.color=colorTo0x(this.config.color);this.father=a;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;this.id="text"+e;this.isAnim= f;this.text="false"!=this.config.sh?$("
"+ this.config.textStr+"
"):$("
"+this.config.textStr+"
");"false"==this.config.fillBg&&this.text.css({background:""});"false"!= this.config.tbold&&this.text.css({"font-weight":"bold"});"false"!=this.config.italic&&this.text.css({"font-style":"italic"});this.father=a;this.initEvent();a.append(this.text);this.fontSize=0.75*this.config.lineH*this.ph;f&&(this.fontSize=0.6*this.config.lineH*this.ph);a=this.text.find("font");b=this.text.find("p");for(c=0;cthis.x-10&&(this.x1=0);0>this.y-10&&(this.y1=0);this.line=$("");a.append(this.line);this.linecan(this.x,this.y,this.config.StartX,this.config.StartY,this.config.EndX,this.config.EndY,this.width,this.height,this.config.lineWidth,this.config.dotWidth,this.color,this.config.lineAlpha,this.bstyle,this.config.sx,this.config.sy, this.config.se,this.config.sr,this.config.sh)}initLine.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.line.css({width:this.width+20+"px",height:this.height+20+"px"});this.setPosition()};initLine.prototype.setPosition=function(){this.x=this.config.x*this.pw-10;this.y=this.config.y*this.ph-10;this.line.css({left:this.x+"px",top:this.y+"px"})}; initLine.prototype.linecan=function(a,b,c,d,e,f,h,j,k,m,q,n,l,u,p,z,t,J){var w=b=a=0,s=0,x=this.line[0].getContext("2d"),m=parseFloat(m);0==c&&0==d?(s=w=10,a=h+10,b=j+10):0==c&&0!=d?(w=10,s=10+j,a=h+10,b=10):0!=c&&0==d?(w=10+h,a=s=10,b=j+10):(w=10+h,s=10+j,b=a=10);x.moveTo(w,s);x.lineWidth=k;x.globalAlpha=n;x.strokeStyle=q;"false"!=J&&(x.shadowOffsetX=u,x.shadowOffsetY=p,x.shadowBlur=z,x.shadowColor=colorTo0x(t));if("solid"==l)x.lineTo(a,b);else{h=0;q=m+2;j=w;k=s;num=0==f-d?e>c?(a-w)/q:(w-a)/q:0== e-c?f>d?(b-s)/q:(s-b)/q:db-s?(a-w)/q:(b-s)/q:d>f&&cs-b?(a-w)/q:(s-b)/q:de?w-a>b-s?(w-a)/q:(b-s)/q:w-a>s-b?(w-b)/q:(s-b)/q;q=num-1;for(i=0;ic?j+m:j-m:0==e-c?k=f>d?k+m:k-m:db-s?(h=Math.abs((b-s)/(a-w)),j+=m,k+=m*h):(h=Math.abs((a-w)/(b-s)),j+=m*h,k+=m):d>f&&cs-b?(h=Math.abs((b-s)/(a-w)),j+=m,k-=m*h):(h=Math.abs((a-w)/(b-s)),j+=m*h,k-=m):de?w-a>b-s?(h=Math.abs((b-s)/(a-w)),j-=m,k+=m*h):(h=Math.abs((a-w)/(b-s)),j-=m*h, k+=m):w-a>s-b?(h=Math.abs((b-s)/(a-w)),j-=m,k-=m*h):(h=Math.abs((a-w)/(b-s)),j-=m*h,k-=m),x.lineTo(j,k),0==f-d)?j=e>c?j+2:j-2:0==e-c?k=f>d?k+2:k-2:db-s?(j+=2,k+=2*h):(j+=2*h,k+=2):d>f&&cs-b?(j+=2,k-=2*h):(j+=2*h,k-=2):de?w-a>b-s?(j-=2,k+=2*h):(j-=2*h,k+=2):w-a>s-b?(j-=2,k-=2*h):(j-=2*h,k-=2)}x.stroke()};function initArrow(a,b,c,d,e){this.config=$.extend({StartX:0,StartY:0,EndX:100,EndY:100,width:200,height:20,x:0,y:0,alpha:1,lineWidth:1,lineType:null,dotWidth:3,color:null,arrowType:null,sh:"false",sx:4,sy:4,se:2,sr:null},b);this.pw=c;this.ph=d;this.color=colorTo0x(this.config.color);this.bstyle="Solid line"==this.config.lineType?"solid":"dashed";this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;this.id="arrow"+e; this.x1=this.x-10;this.y1=this.y-10;0>this.x-10&&(this.x1=0);0>this.y-10&&(this.y1=0);this.arrow=$("");a.append(this.arrow);this.arrowcan(this.x,this.y,this.config.StartX,this.config.StartY,this.config.EndX,this.config.EndY,this.width,this.height,this.config.lineWidth,this.config.dotWidth,this.color,this.config.alpha,this.bstyle,this.config.sx,this.config.sy, this.config.se,this.config.sr,this.config.sh)}initArrow.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.arrow.css({width:this.width+20+"px",height:this.height+20+"px"});this.setPosition()};initArrow.prototype.setPosition=function(){this.x=this.config.x*this.pw-10;this.y=this.config.y*this.ph-10;this.arrow.css({left:this.x+"px",top:this.y+"px"})}; initArrow.prototype.arrowcan=function(a,b,c,d,e,f,h,j,k,m,q,n,l,u,p,z,t,J){var w=b=a=0,s=0,x=0,y=this.arrow[0].getContext("2d"),m=parseFloat(m);y.clearRect(0,0,this.pw,this.ph);y.save();y.lineWidth=k;y.globalAlpha=n;y.strokeStyle=q;"false"!=J&&(y.shadowOffsetX=u,y.shadowOffsetY=p,y.shadowBlur=z,y.shadowColor=colorTo0x(t));0==c&&0==d?(x=s=10,a=h+10,b=j+10):0==c&&0!=d?(s=10,x=10+j,a=h+10,b=10):0!=c&&0==d?(s=10+h,a=x=10,b=j+10):(s=10+h,x=10+j,b=a=10);y.translate(0,0);y.beginPath();y.moveTo(s,x);"Double Arrow"== this.config.arrowType&&(0==f-d?e>c?y.moveTo(s+5,x):y.moveTo(s-5,x):0==e-c&&(f>d?y.moveTo(s,x+5):y.moveTo(s,x-5)));if("solid"==l)0==f-d?e>c?y.lineTo(a-5,b):y.lineTo(a+5,b):0==e-c?f>d?y.lineTo(a,b-5):y.lineTo(a,b+5):y.lineTo(a,b);else{h=0;l=m+2;j=s;n=x;l=(0==f-d?e>c?(a-s)/l:(s-a)/l:0==e-c?f>d?(b-x)/l:(x-b)/l:db-x?(a-s)/l:(b-x)/l:d>f&&cx-b?(a-s)/l:(x-b)/l:de?s-a>b-x?(s-a)/l:(b-x)/l:s-a>x-b?(s-b)/l:(x-b)/l)-1;for(i=0;ic?j+m:j-m:0==e-c?n=f>d?n+ m:n-m:db-x?(h=Math.abs((b-x)/(a-s)),j+=m,n+=m*h):(h=Math.abs((a-s)/(b-x)),j+=m*h,n+=m):d>f&&cx-b?(h=Math.abs((b-x)/(a-s)),j+=m,n-=m*h):(h=Math.abs((a-s)/(b-x)),j+=m*h,n-=m):de?s-a>b-x?(h=Math.abs((b-x)/(a-s)),j-=m,n+=m*h):(h=Math.abs((a-s)/(b-x)),j-=m*h,n+=m):s-a>x-b?(h=Math.abs((b-x)/(a-s)),j-=m,n-=m*h):(h=Math.abs((a-s)/(b-x)),j-=m*h,n-=m),y.lineTo(j,n),0==f-d)?j=e>c?j+2:j-2:0==e-c?n=f>d?n+2:n-2:db-x?(j+=2,n+=2*h):(j+=2*h,n+=2):d>f&&cx-b?(j+=2,n-=2*h): (j+=2*h,n-=2):de?s-a>b-x?(j-=2,n+=2*h):(j-=2*h,n+=2):s-a>x-b?(j-=2,n-=2*h):(j-=2*h,n-=2)}y.fillStyle=q;y.stroke();y.save();w=2<1*k?15:10;"Double Arrow"==this.config.arrowType&&(y.moveTo(s,x),"Double Arrow"==this.config.arrowType&&(0==f-d?e>c?y.moveTo(s-1,x):y.moveTo(s+1,x):0==e-c&&(f>d?y.moveTo(s,x-1):y.moveTo(s,x+1))),y.translate(s,x),0<=b-x?y.rotate(4.7-Math.atan((a-s)/(b-x))):y.rotate(4.7-(Math.PI+Math.atan((a-s)/(b-x)))),y.lineTo(-w,w-5),y.lineTo(-(w-5),0),y.lineTo(-w,-(w-5)),y.lineTo(0, 0),y.fill(),y.restore());y.moveTo(a,b);y.translate(a,b);0<=b-x?y.rotate(1.5-Math.atan((a-s)/(b-x))):y.rotate(1.5-(Math.PI+Math.atan((a-s)/(b-x))));y.lineTo(-w,w-5);y.lineTo(-(w-5),0);y.lineTo(-w,-(w-5));y.lineTo(0,0);y.fill();y.restore()};function initAText(a,b,c,d,e){this.config=$.extend({width:200,height:20,x:0,y:0,alpha:1,textStr:null,fontName:null,fontSize:12,color:null,tbold:"false",italic:"false",align:"left",action:null,repeat:"false",moveSpeed:1,sh:"false",sx:4,sy:4,se:2,sr:null},b);this.pw=c;this.ph=d;this.color=colorTo0x(this.config.color);this.father=a;this.speed=12E3*(1/this.config.moveSpeed);this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.x=this.config.x*this.pw;this.y=this.config.y*this.ph; this.id="text"+e;this.scrollid="scroll"+this.id;this.atext="false"!=this.config.sh?$("
"):$("
");this.atext2=$("
"+this.config.textStr+"
");"false"!=this.config.tbold&&this.atext.css({"font-weight":"bold"});"false"!=this.config.italic&&this.atext.css({"font-style":"italic"});this.father=a;this.initEvent();a.append(this.atext);this.atext.append(this.atext2); this.initScroll();a=this.atext.find("font");for(b=0;b
"):$("
");"false"!=this.config.rounds&&this.Area.css({"border-radius":this.config.ellipseWidth+ "px "+this.config.ellipseHeight+"px"});this.father=a;this.initEvent();a.append(this.Area)} initArea.prototype.initEvent=function(){var a=this;this.flag=0;this.slide=this.form=null;this.linkURL;if(null!=a.config.action){try{void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url}catch(b){}var c;null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL);try{c=this.config.action.triggerEventType}catch(d){c=null}this.Area.bind(_event._down,function(){c==PageEditor.TriggerEventType.MouseDown&& actionEvent.call(a);browserType==3?event.cancelBubble=true:event.stopPropagation()});this.Area.bind("mouseover",function(){c==PageEditor.TriggerEventType.MouseOver&&actionEvent.call(a)});this.Area.bind(isTouch?_event._end:"mouseout",function(){c==PageEditor.TriggerEventType.MouseOut&&actionEvent.call(a)})}}; initArea.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.Area.css({width:this.width+"px",height:this.height+"px"});this.setPosition();if(null!=this.form)this.form.onResize(bookContainer.width(),bookContainer.height());if(null!=this.slide)this.slide.onResize(bookContainer.width(),bookContainer.height())}; initArea.prototype.setPosition=function(){this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;this.Area.css({left:this.x+"px",top:this.y+"px"})};function initFlashShow(a,b,c,d){this.pw=c;this.ph=d;this.config=$.extend({width:0.2,height:0.2,x:0.2,y:0.2,photo:null,repeatPlay:!0,customSize:!1},b);null!=this.config.photo&&(this.showingA=!0,this.showingIndex=1,this.background=$("
"),this.totalImage=this.config.photo.photos.length,this.moveTo=1,this.width=this.pw*this.config.width,this.height=this.ph*this.config.height,this.background.css({width:this.width+"px",height:this.height+"px",left:this.config.x*this.pw+"px",top:this.config.y* this.ph+"px",position:"absolute",overflow:"hidden"}),this.photoA=new animateImage(this.background,this.config.photo,this.width,this.height,this.config.repeatPlay,this.config.customSize,this.config.photo.width,this.config.photo.width),this.photoB=new animateImage(this.background,this.config.photo,this.width,this.height,this.config.repeatPlay,this.config.customSize,this.config.photo.width,this.config.photo.width),a.append(this.background),this.photoB.fillImage(2),this.photoA.fillImage(1),this.initChangeImageEvent(!0))} initFlashShow.prototype={onResize:function(a,b){this.pw=a;this.ph=b;this.width=this.pw*this.config.width;this.height=this.ph*this.config.height;this.background.css({width:this.width+"px",height:this.height+"px"});this.photoA.onResize(a,b);this.photoB.onResize(a,b);this.setPosition()},setPosition:function(){this.background.css({left:this.pw*this.config.x+"px",top:this.ph*this.config.y+"px"})},initChangeImageEvent:function(a){var b=this,c=this.photoA.getImage(),d=this.photoB.getImage(),e,f;a||(c=this.photoB.getImage(), d=this.photoA.getImage());switch(this.moveTo){case 1:e=f=1;break;case 2:e=f=-1;break;case 3:f=1;e=-1;break;case 4:f=-1,e=1}this.moveTo=4==this.moveTo?1:this.moveTo+1;var h=c.position().left+66*f,j=c.position().top+66*e,k=c.position().left+77*f,m=c.position().top+77*e;c.animate({left:h,top:j},{queue:!1,duration:3E3,complete:function(){b.showingIndex++;if(!(b.showingInde>b.totalImage)||b.config.repeatPlay){if(b.showingIndex>b.totalImage)b.showingIndex=0;c.animate({opacity:0,left:k,top:m},500,function(){a? b.photoA.fillImage(b.showingIndex+1):b.photoB.fillImage(b.showingIndex+1);c.css({"z-index":0});d.css({"z-index":1})});b.initChangeImageEvent(!a)}}}).animate({opacity:1},500)}};function animateImage(a,b,c,d,e,f,h,j){this.img=$("");this.imgIndex=-1;this.imageArr=b;this.bw=c;this.bh=d;this.repeat=e;a.append(this.img);this.img.css({position:"absolute"});f&&void 0!=h&&void 0!=j&&this.img.css({width:h+"px",height:j+"px"})} animateImage.prototype.fillImage=function(a){if(this.imgIndex==a)this.img.css({left:(this.bw-this.img[0].width)/2+"px",top:(this.bh-this.img[0].height)/2+"px"});else if(!(a>this.imageArr.photos.length)||this.repeat){a>this.imageArr.photos.length&&(a=1);this.imgIndex==a;var b=this;this.img.attr("src",b.getImageDiv(a));this.img.load(function(){b.img.css({left:(b.bw-this.width)/2+"px",top:(b.bh-this.height)/2+"px"})})}};animateImage.prototype.getImageDiv=function(a){return this.imageArr.photos[a-1].photo}; animateImage.prototype.setZIndex=function(a){this.img.css("z-index",a)};animateImage.prototype.onResize=function(a,b){this.bw=a;this.bh=b;this.img.css({left:(this.bw-this.img[0].width)/2+"px",top:(this.bh-this.img[0].height)/2+"px"})};animateImage.prototype.setPosition=function(a,b){this.img.css({left:a+"px",top:b+"px"})};animateImage.prototype.animate=function(){};animateImage.prototype.getImage=function(){return this.img};function initCallout(a,b,c,d,e){this.config=$.extend({width:200,height:20,x:0,y:0,alpha:1,textStr:null,lineH:20,fontName:"Tahoma",fontSize:12,color:"#000000",tbold:"false",italic:"false",bgalpha:1,action:null,fillBg:"false",bgcolor:null,direct:"Down",cx1:0,cy1:0,cx2:0,cy2:0,pointx:0,pointy:0,cornerRadiut:5,borderWidth:3,borderColor:null,bordreAlpha:1,sh:"false",sx:4,sy:4,se:2,sr:null},b);this.pw=c;this.ph=d;this.father=a;this.color=colorTo0x(this.config.color);this.width=this.config.width*this.pw; this.height=this.config.height*this.ph;this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;this.cx1=this.config.cx1*this.width;this.cy1=this.config.cy1*this.height;this.cx2=this.config.cx2*this.width;this.cy2=this.config.cy2*this.height;this.pointx=this.config.pointx*this.width;this.pointy=this.config.pointy*this.height;this.id="callout"+e;this.fontSize=0.75*this.config.lineH*this.ph;this.cl=this.ct=this.hl=this.wl=this.canl=this.cant=this.canh=this.canw=0;switch(this.config.direct){case "Down":if(0> this.pointx){this.canw=this.width-this.pointx+20;this.canh=this.pointy+20;this.cant=this.y-10;this.canl=this.x-(this.canw-this.width-10);break}this.canw=this.pointx>this.width?this.pointx+20:this.width+20;this.canh=this.pointy+20;this.cant=this.y-10;this.canl=this.x-10;break;case "left":if(0>this.pointy){this.canw=this.width-this.pointx+20;this.canh=this.height-this.pointy+20;this.cant=this.y-(this.canh-this.height-10);this.canl=this.x-(this.canw-this.width-10);break}this.pointy>this.height?(this.canw= this.width-this.pointx+20,this.canh=this.pointy+20):(this.canw=this.width-this.pointx+20,this.canh=this.height+20);this.cant=this.y-10;this.canl=this.x-(this.canw-this.width-10);break;case "Up":if(0>this.pointx){this.canw=this.width-this.pointx+20;this.canh=this.height-this.pointy+20;this.cant=this.y-(this.canh-this.height-10);this.canl=this.x-(this.canw-this.width-10);break}this.canw=this.pointx>this.width?this.pointx+20:this.width+20;this.canh=this.height-this.pointy+20;this.cant=this.y-(this.canh- this.height-10);this.canl=this.x-10;break;case "Right":if(0>this.pointy){this.canw=this.pointx+20;this.canh=this.height-this.pointy+20;this.cant=this.y-(this.canh-this.height-10);this.canl=this.x-10;break}this.pointy>this.height?(this.canw=this.pointx+20,this.canh=this.pointy+20):(this.canw=this.pointx+20,this.canh=this.height+20);this.cant=this.y-10;this.canl=this.x-10}this.wl=this.canw/this.pw;this.hl=this.canh/this.ph;this.ct=this.cant/this.ph;this.cl=this.canl/this.pw;this.callout=$("");a.append(this.callout);this.calloutDown();this.father=a;this.initEvent()} initCallout.prototype.calloutDown=function(){var a=[],b=[],c,d,e=this.callout[0].getContext("2d"),f,h,j,k,m,q,n,l,u,p,z,t;switch(this.config.direct){case "Down":if(0>this.pointx){f=this.canw-this.width-10;h=10;c=this.canw-10;d=10;j=this.canw-10;k=this.height+10;m=this.canw-(this.width-this.cx2)-10;q=this.height+10;n=10;l=this.pointy+10;u=this.canw-(this.width-this.cx1)-10;p=this.height+10;z=this.canw-(this.width+10);t=this.height+10;break}h=f=10;c=this.width+10;d=10;j=this.width+10;k=this.height+ 10;m=this.cx2+10;q=this.height+10;n=this.pointx+10;l=this.pointy+10;u=this.cx1+10;p=this.height+10;z=10;t=10+this.height;break;case "left":if(0>this.pointy){f=this.canw-this.width-10;h=this.canh-this.height-10;c=this.canw-10;d=this.canh-this.height-10;j=this.canw-10;k=this.canh-10;m=this.canw-this.width-10;q=this.canh-10;n=this.canw-this.width-10;l=this.canh-(this.height-this.cy2+10);p=u=10;z=this.canw-this.width-10;t=this.canh-(this.height-this.cy1+10);break}this.pointy>this.height?(f=this.canw- this.width-10,h=10,c=this.canw-10,d=10,j=this.canw-10,k=this.height+10,m=this.canw-this.width-10,q=this.height+10,n=this.canw-this.width-10,l=this.cy2+10,u=10,p=this.canh-10):(f=this.canw-this.width-10,h=10,c=this.canw-10,d=10,j=this.canw-10,k=this.height+10,m=this.canw-this.width-10,q=this.height+10,n=this.canw-this.width-10,l=this.cy2+10,u=10,p=this.pointy+10);z=this.canw-this.width-10;t=this.cy1+10;break;case "Up":if(0>this.pointx){f=this.canw-this.width-10;h=this.canh-this.height-10;c=this.canw- (this.width-this.cx2)-10;d=this.canh-this.height-10;k=j=10;m=this.canw-(this.width-this.cx1)-10;q=this.canh-this.height-10;n=this.canw-10;l=this.canh-this.height-10;u=this.canw-10;p=this.canh-10;z=this.canw-this.width-10;t=this.canh-10;break}this.pointx>this.width?(f=10,h=this.canh-this.height-10,c=this.cx2+10,d=this.canh-this.height-10,j=this.canw-10):(f=10,h=this.canh-this.height-10,c=this.cx2+10,d=this.canh-this.height-10,j=this.pointx+10);k=10;m=this.cx1+10;q=this.canh-this.height-10;n=this.width+ 10;l=this.canh-this.height-10;u=this.width+10;p=this.canh-10;z=10;t=this.canh-10;break;case "Right":if(0>this.pointy){f=10;h=this.canh-this.height-10;c=this.width+10;d=this.canh-this.height-10;j=this.width+10;k=this.canh-(this.height-this.cy2+10);m=this.canw-10;q=10;n=this.width+10;l=this.canh-(this.height-this.cy1+10);u=this.width+10;p=this.canh-10;z=10;t=this.canh-10;break}this.pointy>this.height?(h=f=10,c=this.width+10,d=10,j=this.width+10,k=this.cy2+10,m=this.canw-10,q=this.canh-10):(h=f=10,c= this.width+10,d=10,j=this.width+10,k=this.cy2+10,m=this.canw-10,q=this.pointy+10);n=this.width+10;l=this.cy1+10;u=this.width+10;p=this.height+10;z=10;t=this.height+10}e.beginPath();e.lineWidth="1";e.textAlign="center";e.globalAlpha=this.config.bgalpha;e.strokeStyle=this.color;e.fillStyle=colorTo0x(this.config.bgcolor);e.moveTo(f,h);e.lineTo(c,d);e.lineTo(j,k);e.lineTo(m,q);e.lineTo(n,l);e.lineTo(u,p);e.lineTo(z,t);e.closePath();e.fill();e.stroke();e.font=this.fontSize+"px "+this.config.fontName;a= this.config.textStr;c=$(a).find("font");if(0"}f=e.measureText(a).width;if(0>a.indexOf("
")&&f");j=[];for(k=0;k
");this.img=$("");a.append(this.photoBox);this.leftButton=new button(1,a,{iconURL:uiBaseURL+"previous_down.png"});this.rightButton=new button(1, a,{iconURL:uiBaseURL+"next_down.png"});this.closeButton=new button(1,a,{iconURL:uiBaseURL+"close.png"},!0);this.loadTextField=new label("Loading...",this.photoBox);this.loadTextField.setCSS({"z-index":-1,left:"5px",top:"5px"});this.leftButton.setButtonPosition(5,(this.sh-78)/2);this.rightButton.setButtonPosition(this.sw-55,(this.sh-78)/2);this.closeButton.setButtonPosition(this.sw-45,5);this.closeButton.setCSS({"z-index":210});this.rightButton.setCSS({"z-index":202});this.leftButton.setCSS({"z-index":203}); this.photoBox.css({width:this.boxWidth+"px",height:this.boxHeight+"px",left:(this.sw-this.boxWidth)/2+"px",top:(this.sh-this.boxHeight)/2+"px",position:"absolute","background-color":"#eeeeee","z-index":201,"-webkit-box-shadow":"0 0 10px rgba(40, 0, 0, 0.7)","-moz-box-shadow":"0 0 10px rgba(40, 0, 0, 0.7)","box-shadow":"0 0 10px rgba(40, 0, 0, 0.7)"});this.changeImage(0);var e=this;this.photoBox.bind(_event._down,function(){e.nextPage()});this.closeButton.onMouseUp(this,this.hide);this.leftButton.onMouseDown(this, this.prePage);this.rightButton.onMouseDown(this,this.nextPage)}initSlideShow.prototype.nextPage=function(){var a=this.imgIndex+1;a>=this.photos.length&&(a=0);this.changeImage(a)};initSlideShow.prototype.prePage=function(){var a=this.imgIndex-1;0>a&&(a=this.photos.length-1);this.changeImage(a)};initSlideShow.prototype.onResize=function(a,b){this.sw=a-8;this.sh=b-8;this.slideShowBG.onResize(a,b);this.setPosition()}; initSlideShow.prototype.setPosition=function(){this.photoBox.css({left:(this.sw-this.boxWidth)/2+"px",top:(this.sh-this.boxHeight)/2+"px"});this.leftButton.setButtonPosition(5,(this.sh-78)/2);this.rightButton.setButtonPosition(this.sw-55,(this.sh-78)/2);this.closeButton.setButtonPosition(this.sw-45,5)}; initSlideShow.prototype.changeImage=function(a){if(this.imgIndex!=a){this.imgIndex=a;this.img.remove();a=this.photos[a].url;isFlipPdf&&(a="."+a);var b=this;this.img.attr("src",a);this.img.load(function(){b.imgWidth=this.width;b.imgHeight=this.height;var a=b.imgWidth,d=b.imgHeight;if(b.imgWidth>b.sw||b.imgHeight>b.sh)a=b.imgWidth/b.imgHeight,a>b.sw/b.sh?(a=b.sw,d=b.sw*b.imgHeight/b.imgWidth):(d=b.sh,a*=b.sh);b.img.css({width:a+"px",height:d+"px"});b.boxWidth!=a||b.boxHeight!=d?b.photoBox.animate({width:a+ 8,height:d+8,left:(b.sw-a)/2,top:(b.sh-d)/2},300,function(){b.photoBox.append(b.img)}):b.photoBox.append(b.img);b.boxWidth=a;b.boxHeight=d;b.img.css({left:"4px",top:"4px"})})}};initSlideShow.prototype.setImagePosition=function(){};initSlideShow.prototype.show=function(){}; initSlideShow.prototype.hide=function(){var a=this;this.photoBox.animate({width:20,height:20,top:this.sh/2-10,left:this.sw/2-10},200,function(){a.leftButton.remove();a.rightButton.remove();a.closeButton.remove();a.photoBox.remove();a.slideShowBG.hide()})};function initVideoForm(a,b,c,d){this.config=$.extend({width:400,height:300,content:null,alpha:0.3,caption:"",closeIconURL:uiBaseURL+"close.png",winType:"0"},b);this.father=a;null!=this.config.content&&("string"!=typeof this.config.caption&&(this.config.caption=""),this.config.width=parseInt(this.config.width),this.config.height=parseInt(this.config.height),this.sw=c,this.sh=d,this.th=28,this.background=new grayBackground(a,"#333333",this.config.alpha,c,d),this.form=$("
"),this.titleBar= $("
"),isFlipPdf&&"0"==this.config.winType&&(this.config.content="../"+this.config.content),""!=this.config.closeIconURL&&(this.closeButton=new button(1,this.titleBar,{iconURL:this.config.closeIconURL},!0),this.closeButton.setButtonPosition(this.config.width-28,0)),""!=this.config.caption&&(this.captionLabel=new label(this.config.caption,this.titleBar),this.captionLabel.setLabelPosition(5,3,["left","top"]),this.captionLabel.setFont(14,"#dddddd","Tahoma")),this.form.css({width:this.config.width+ 4+"px",height:this.config.height+4+"px",left:(c-this.config.width)/2+"px",top:(d-this.config.height)/2+"px","background-color":"#dddddd","-webkit-border-radius":"5px","-moz-border-radius":"5px","-ms-border-radius":"5px","border-radius":"5px",position:"absolute","z-index":201,overflow:"hidden"}),this.titleBar.css({width:this.config.width+"px",height:this.th+"px",left:"2px",top:"2px","border-top-left-radius":"5px","border-top-right-radius":"5px",position:"absolute","background-color":"#111111"}),"0"== this.config.winType?this.content=$(""):"4"==this.config.winType&&(this.content=$(""+this.config.content+""),this.content.css({overflow:"auto","font-size":"12px","font-family":"Tahoma,Georgia,Serif","line-height":"200%"})),this.content.css({width:this.config.width+"px",height:this.config.height-this.th+"px",top:this.th+2+"px",left:"2px",position:"absolute"}),a.append(this.form),this.form.append(this.titleBar),this.form.append(this.content), this.initEvent())}initVideoForm.prototype.onResize=function(a,b){this.sw=a;this.sh=b;this.background.onResize(a,b);this.setPosition()};initVideoForm.prototype.setPosition=function(){this.form.css({left:(this.sw-this.config.width)/2+"px",top:(this.sh-this.config.height)/2+"px"})}; initVideoForm.prototype.initEvent=function(){var a=this;this.closeButton.onMouseUp(this,this.closeForm);var b=!1,c,d;this.titleBar.bind(_event._down,function(e){e=isTouch?e.originalEvent.touches:[e];b=!0;c=Point(e[0].pageX,e[0].pageY);d=Point(a.form.offset().left,a.form.offset().top);return!1});this.titleBar.bind(_event._move,function(e){e=isTouch?e.originalEvent.touches:[e];b&&a.form.css({top:d.y+(e[0].pageY-c.y)+"px",left:d.x+(e[0].pageX-c.x)+"px"});return!1});this.titleBar.bind(_event._end,function(){return b= !1});this.titleBar.bind("mouseleave",function(){return b=!1})};initVideoForm.prototype.closeForm=function(){var a=this;this.form.animate({width:20,height:20,left:this.sw/2-10,top:this.sh/2-10},200,function(){a.background.hide();a.form.remove()})};function initBanner(a,b,c,d,e){this.config=$.extend({width:200,height:20,x:0,y:0,alpha:1,action:null,banners:null},b);this.pw=c;this.ph=d;this.father=a;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;this.a=this.config.banners.banner;this.id="banner"+e;this.image=null;if("string"==typeof this.a.imageUrl)this.image="
  • ";else for(b=0;b":"
  • ";this.banner=$("
    ");this.bannerul=$("
      ");this.bannerli=$(this.image);a.append(this.banner);this.banner.append(this.bannerul);this.bannerul.append(this.bannerli);this.imageamin();this.father=a;this.initEvent()} initBanner.prototype.imageamin=function(){this.banner.jFlip(this.width,this.height,{background:"white",cornersTop:!1,scale:"fill"},this.x,this.y)}; initBanner.prototype.initEvent=function(){var a=this;this.flag=0;this.linkURL;if(null!=a.config.action){try{void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url}catch(b){}var c;null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL);try{c=this.config.action.triggerEventType}catch(d){c=null}this.banner.bind(_event._down,function(){c==PageEditor.TriggerEventType.MouseDown&&actionEvent.call(a); browserType==3?event.cancelBubble=true:event.stopPropagation()});this.banner.bind(_event._move,function(){c==PageEditor.TriggerEventType.MouseOver&&actionEvent.call(a)});this.banner.bind(_event._end,function(){c==PageEditor.TriggerEventType.MouseOut&&actionEvent.call(a)})}};initBanner.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;$(".bannerdiv canvas").css({width:this.width+"px",height:this.height+"px"});this.setPosition()}; initBanner.prototype.setPosition=function(){this.x=this.config.x*this.pw;this.y=this.config.y*this.ph;$(".bannerdiv").css({left:this.x+"px",top:this.y+"px"})};function initStarText(a,b,c,d,e){this.config=$.extend({width:200,height:20,x:0,y:0,alpha:1,textStr:null,fontName:null,fontSize:12,color:null,tbold:"false",italic:"false",align:"left",action:null,repeat:"false",moveSpeed:1,sh:"false",sx:4,sy:4,se:2,sr:null},b);this.pw=c;this.ph=d;this.color=colorTo0x(this.config.color);this.father=a;this.speed=22E3*(1/this.config.moveSpeed);this.width=this.config.width*this.pw;this.height=this.config.height*this.ph;this.x=this.config.x*this.pw;this.y=this.config.y* this.ph;this.id="startext"+e;this.scrollid="starwars"+this.id;this.textli="";this.offset=0;this.stepping=0.2;this.text=this.config.textStr.split("
      ");for(b=0;b"+this.text[b]+"";this.startext="false"!=this.config.sh?$("
      "):$("
      ");this.startext2=$("
      ");"false"!=this.config.tbold&&this.startext.css({"font-weight":"bold"}); "false"!=this.config.italic&&this.startext.css({"font-style":"italic"});this.father=a;this.initEvent();a.append(this.startext);this.startext.append(this.startext2);this.startext2.append(this.textli);a=this.startext2.find("font");for(b=0;b");this.background.css({width:d+"px",height:e+"px",background:b,opacity:c,"z-index":200,position:"absolute",left:"0px",top:"0px"});a.append(this.background)}grayBackground.prototype.onResize=function(a,b){this.sw=a;this.sh=b;this.background.css({width:a+"px",height:b+"px"})};grayBackground.prototype.setPosition=function(){};grayBackground.prototype.show=function(){this.father.append(this.background)}; grayBackground.prototype.hide=function(){this.background.remove()};(function(a){var b=function(a){var c=this;this.theButton=a;this.eventSource=a[0];this.isTouch()?(a.bind("touchstart",function(){b.prototype.mouseDown.apply(c,arguments)}),a.bind("touchend",function(){b.prototype.mouseUp.apply(c,arguments)})):(a.bind("mousedown",function(){b.prototype.mouseDown.apply(c,arguments)}),a.bind("mouseleave",function(){b.prototype.mouseUp.apply(c,arguments)}),a.bind("mouseup",function(){b.prototype.mouseUp.apply(c,arguments)}))};b.prototype.isTouch=function(){return"Touch"in window};b.prototype.mouseDown=function(){this.setAlpha(70)};b.prototype.mouseUp=function(){var a=this;window.setTimeout(function(){b.prototype.setAlpha.apply(a,[100])},100)};b.prototype.setAlpha=function(a){0>a&&(a=0);100<=a&&(a=100);this.theButton.css("opacity",a/100)};a.fn.asButton=function(){new b(this);return this};var c=function(a){this.eventSource=a[0];this.origPicture=a[0].src;var b=this.origPicture.lastIndexOf("."),f=this.origPicture.substr(0,b),b=this.origPicture.substring(b);this.pictureDown= f+"_down"+b;var h=this;this.isTouch()?(a.bind("touchstart",function(){c.prototype.mouseDown.apply(h,arguments)}),a.bind("touchend",function(){c.prototype.mouseUp.apply(h,arguments)})):(a.bind("mousedown",function(){c.prototype.mouseDown.apply(h,arguments)}),a.bind("mouseup",function(){c.prototype.mouseUp.apply(h,arguments)}),a.bind("mouseleave",function(){c.prototype.mouseUp.apply(h,arguments)}))};c.prototype.isTouch=function(){return"Touch"in window};c.prototype.mouseDown=function(){this.eventSource.src= this.pictureDown};c.prototype.mouseUp=function(){var a=this;window.setTimeout(function(){a.eventSource.src=a.origPicture},100)};a.fn.asImageButton=function(){new c(this);return this}})(jQuery);function rimFlip(){}rimFlip.prototype.addRimFlip=function(){};rimFlip.prototype.clearTimer=function(){};rimFlip.prototype.removeRimFlip=function(){};rimFlip.prototype.setFlipBack=function(){};var textWidth=function(a,b){var c=$("
      "+a+"
      ").css({display:"none","font-size":b.size,"font-family":b.fontName});$("body").append(c);var d=Point(c.width(),c.height());c.remove();return d}; function label(a,b){this.labelBox=$(''+a+"");this.caption=a;this.fontSize="10px";this.fontColor="#ffffff";this.fontName="Tahoma";var c=textWidth(a,{size:this.fontSize,fontName:this.fontName});this.width=c.x;this.height=c.y;b.append(this.labelBox)}label.prototype.getWidth=function(){return this.width};label.prototype.getHeight=function(){return this.height};label.prototype.getCaption=function(){return this.caption}; label.prototype.setCaption=function(a){this.caption=a;this.labelBox[0].innerHTML=a;a=textWidth(a,{size:this.fontSize,fontName:this.fontName});this.width=a.x;this.height=a.y};label.prototype.setLabelPosition=function(a,b,c){void 0==c&&(c=["left","top"]);this.labelBox.css(c[0],a+"px");this.labelBox.css(c[1],b+"px")};label.prototype.onResize=function(a,b){this.width=a;this.height=b;this.labelBox.css({width:a+"px",height:b+"px"})}; label.prototype.setFont=function(a,b,c){null==a?a=this.fontSize:this.fontSize=a;null==b?b=this.fontColor:this.fontColor=b;null==c?c=this.fontName:this.fontName=c;this.labelBox.css({"font-size":a,color:b,"font-family":c});a=textWidth(this.caption,{size:a,fontName:c});this.width=a.x;this.height=a.y};label.prototype.riseAWord=function(a){newCaption=this.caption.replaceAll(a,""+a+"");this.labelBox[0].innerHTML=newCaption}; label.prototype.shortWord=function(a){this.caption.length>a&&(this.caption=this.caption.substring(0,a)+"..",this.setCaption(this.caption))};label.prototype.setCSS=function(a){this.labelBox.css(a)};function tipsBox(a,b){this.visible=!1;this.caption=a;this.background=$("
      ");this.contentBox=new label(a,this.background);this.contentBox.setFont("16px","#f0f0f0",null);this.width=this.contentBox.getWidth()+12;this.height=40;$(b).append(this.background);$(this.background).css({width:this.width+"px",height:this.height+"px","-webkit-border-radius":"10px","-moz-border-radius":"10px","-o-border-radius":"10px","border-radius":"10px","-webkit-box-shadow":"0 0 15px rgba(40, 40, 40, 0.6)", "-moz-box-shadow":"0 0 15px rgba(40, 40, 40, 0.6)","-o-box-shadow":"0 0 15px rgba(40, 40, 40, 0.6)","box-shadow":"0 0 15px rgba(40, 40, 40, 0.6)","background-color":"#554433",display:"none","z-index":110});this.contentBox.setLabelPosition(4,(this.height-this.contentBox.getHeight())/2-3)}tipsBox.prototype.setTimer=function(){var a=this;this.timer=window.setInterval(function(){a.hideTipsBox.call(a);window.clearInterval(a.timer)},3500)}; tipsBox.prototype.resetTimer=function(){window.clearInterval(this.timer);this.setTimer()};tipsBox.prototype.setPosition=function(a,b,c){void 0==c&&(c=["left","top"]);$(this.background).css(c[0],a+"px");$(this.background).css(c[1],b+"px")};tipsBox.prototype.onResize=function(a,b){this.width=a;this.height=b;$(this.background).css({width:a+"px",height:b+"px"});this.contentBox.setLabelPosition(4,(b-this.contentBox.getHeight())/2)};tipsBox.prototype.getWidth=function(){return this.width}; tipsBox.prototype.getHeight=function(){return this.height};tipsBox.prototype.setCaption=function(a){this.contentBox.setCaption(a);this.caption=a;this.contentBox.setLabelPosition(4,(this.height-this.contentBox.getHeight())/2-3)};tipsBox.prototype.showTipsBox=function(){this.visible?this.resetTimer():(this.setTimer(),this.visible=!0,$(this.background).css({display:"block"}),$(this.background).animate({opacity:0.9},300))}; tipsBox.prototype.hideTipsBox=function(){this.visible&&(this.visible=!1,$(this.background).animate({opacity:0},300,function(){$(this.background).css({display:"none"})}))};var rotate=function(a){return" rotate("+a+"deg)"},translate=function(a,b){return 3!=browserType?" translate3d("+a+"px,"+b+"px,0px)":" translate("+a+"px,"+b+"px)"},isLeft=function(a){return 0==a||2==a},isRight=function(a){return 1==a||3==a},isTop=function(a){return 0==a||1==a},isBottom=function(a){return 2==a||3==a},nextPageFun=function(){bookType==BookType.normal_book?(flipBook.gotoPage(2*Math.floor(flipBook.getCurrentPageIndex()/2+1)),"undefined"!=typeof speakConfig&&"none"!=speakConfig.title&&0== flagspeak&&($("#LectureText").stop(!0),$("#LectureText").css("marginTop",0),LectureAudio(Math.floor(flipBook.getCurrentPageIndex()/2+1)),LectureSoll(Math.floor(flipBook.getCurrentPageIndex()/2+1)))):bookType==BookType.single_book?$(singlePageBook).data().gotoPage($(singlePageBook).data().currentPageIndex+1):bookType==BookType.zoom_book&&zoomBook.gotoPage(parseInt(zoomBook.currentIndex)+1)},previousPageFun=function(){bookType==BookType.normal_book?(flipBook.gotoPage(2*Math.floor(flipBook.getCurrentPageIndex()/ 2-1)+1),"undefined"!=typeof speakConfig&&"none"!=speakConfig.title&&0==flagspeak&&($("#LectureText").stop(!0),$("#LectureText").css("marginTop",0),LectureAudio(Math.floor(flipBook.getCurrentPageIndex()/2-1)),LectureSoll(Math.floor(flipBook.getCurrentPageIndex()/2-1)))):bookType==BookType.single_book?$(singlePageBook).data().gotoPage($(singlePageBook).data().currentPageIndex-1):bookType==BookType.zoom_book&&zoomBook.gotoPage(zoomBook.currentIndex-1)},firstPageFun=function(){bookType==BookType.normal_book? flipBook.gotoPage(1):bookType==BookType.single_book?$(singlePageBook).data().gotoPage(1):bookType==BookType.zoom_book&&zoomBook.gotoPage(1)},lastPageFun=function(){bookType==BookType.normal_book?flipBook.gotoPage(totalPageCount):bookType==BookType.single_book?$(singlePageBook).data().gotoPage(originTotalPageCount):bookType==BookType.zoom_book&&zoomBook.gotoPage(originTotalPageCount)},gotoPageFun=function(a){bookType==BookType.normal_book?flipBook.gotoPage(a):bookType==BookType.single_book?$(singlePageBook).data().gotoPage(a): bookType==BookType.zoom_book&&zoomBook.gotoPage(a)},getPageDir=function(a,b){var c;switch(b){case "normal":return c=getString("normalPath","files/page/")+a+".jpg";case "large":return c=getString("largePath","files/large/")+a+".jpg";case "thumb":return c=getString("thumbPath","files/thumbnail/")+a+".jpg"}},getPageWidthHeight=function(a,b,c,d){var e=Point(0,0);a/b>c/d?(e.x=c*b/d,e.y=b):(e.x=a,e.y=a*d/c);return e},pointToLineDistance=function(a,b,c,d,e,f){var h=f-d,j=c-e;return Math.abs(h*a+j*b+(e*d- c*f))/Math.sqrt(h*h+j*j)},globalToBook=function(a,b,c,d){void 0==d&&(d=!1);return d?Point(b-_singleBook.offset().left,c-_singleBook.offset().top):Point(b-((a?0:flipBook.getPageWidth())+flipBook.getLeft()),c-flipBook.getTop())},changeShowBook=function(a){switch(a){case 0:singlePageBook.setSingleBookVisible(!1);zoomBook.hide();flipBook.show();_rimFlip.isRimFlip&&($(singlePageBook).data().currentPage.resetPage(),$(singlePageBook).data().currentPage.setSideAUp(!0),_rimFlip.clearTimer(),_rimFlip.addRimFlip()); thumbnail.mergeAll();break;case 1:singlePageBook.setSingleBookVisible(!0);zoomBook.hide();flipBook.hide();_rimFlip.isRimFlip&&(currentPage2.resetPage(),_rimFlip.clearTimer(),_rimFlip.addRimFlip());thumbnail.fissionAll();break;case 2:singlePageBook.setSingleBookVisible(!1),zoomBook.show(),flipBook.hide(),_rimFlip.isRimFlip&&($(singlePageBook).data().currentPage.resetPage(),$(singlePageBook).data().currentPage.setSideAUp(!0),currentPage2.resetPage(),currentPage2.setSideUp(!0),_rimFlip.clearTimer(), _rimFlip.setFlipBack(!1)),thumbnail.fissionAll()}},computeMousePoint=function(a,b,c,d,e,f){var h=function(){return 0<=a.indexOf("l")},j=function(){return 0<=a.indexOf("t")},k=function(){return 0<=a.indexOf("b")},m=Point(b,c),q,n,l,u;l=h()?d-b:b;u=k()?e-c:c;q=Math.sqrt(Math.pow(l,2)+Math.pow(u,2));n=Math.sqrt(Math.pow(l,2)+Math.pow(e-u,2));var p=Math.abs(l/u),z=d/e;if(0>u&&j()&&p>=z&&Math.abs(l)>d){if(h())return 0b?Point(-d,0):Point(d-1,1)}else if(c> e&&k()&&p>=z&&Math.abs(l)>d){if(h())return 0b?Point(-d,e):Point(d-1,e-1)}if(q>d&&n>f)q-d>n-f?(m=h()?d-(d-b)*d/q:b*d/q,q=k()?e-(e-c)*d/q:c*d/q):(m=h()?d-(d-b)*f/n:b*f/n,q=j()?e-(e-c)*f/n:c*f/n),m=Point(m,q),computeMousePoint(a,m.x,m.y,d,e,f);else if(q>d&&(m=h()?d-(d-b)*d/q:b*d/q,q=k()?e-(e-c)*d/q:c*d/q,m=Point(m,q)),n>f)m=h()?d-(d-b)*f/n:b*f/n,q=j()?e-(e-c)*f/n:c*f/n,m=Point(m,q);j()&&0==m.y?m.y=0.002*e:k()&&m.y==e&&(m.y=0.998*e);return m}, computePoint=function(a,b,c,d,e,f,h,j){var k,m;k=Point(b,c);k=computeMousePoint(a,b,c,d,e,f);c=k.x;m=k.y;k=function(){return 0<=a.indexOf("l")};b=function(){return 0<=a.indexOf("t")};switch(a){case "tl":actualPoint=Point(c,m);middlePoint=Point(d-actualPoint.x/2,m/2);endPoint=Point(2*d,0);break;case "tr":actualPoint=Point(d-c,m);middlePoint=Point(d-actualPoint.x/2,actualPoint.y/2);endPoint=Point(-d,0);break;case "bl":actualPoint=Point(c,e-m);middlePoint=Point(d-actualPoint.x/2,actualPoint.y/2);endPoint= Point(2*d,e);break;case "br":actualPoint=Point(d-c,e-m),middlePoint=Point(d-actualPoint.x/2,actualPoint.y/2),endPoint=Point(-d,e)}m=Point(0,0);var q=Math.PI/2,n=Math.atan2(actualPoint.y,actualPoint.x),l=q-n,c=180*l/Math.PI,u=l-Math.atan2(middlePoint.y,middlePoint.x);distance=Math.max(0,Math.sin(u)*Math.sqrt(Math.pow(middlePoint.x,2)+Math.pow(middlePoint.y,2)));noMovePoint=Point(distance*Math.sin(l),distance*Math.cos(l));var p;if(l>q&&(noMovePoint.x+=Math.abs(noMovePoint.y*Math.tan(n)),noMovePoint.y= 0,m=Math.PI-l,f=f-e/Math.sin(m)-(noMovePoint.x-e/Math.tan(m))*Math.cos(m),m=Point(Math.round(f*Math.cos(m)),Math.round(f*Math.sin(m))),k()&&(m.x=-m.x),b()))m.y=-m.y;q=Math.sqrt(Math.pow(endPoint.x-actualPoint.x,2)+Math.pow(endPoint.y-actualPoint.y,2));f=Math.round(noMovePoint.y/Math.tan(l)+noMovePoint.x);k()&&(f=d-f);n=k()?f:d-f;u=n*Math.cos(2*l);p=n*Math.sin(2*l);f=Point(Math.round(f+(k()?-u:u)),Math.round(b()?p:e-p));p=n*Math.sin(l);n=Point(100*(actualPoint.x/2/d),100*(actualPoint.y/2/e));q=qa.length)return Point(0,0);a=a[1].split(", ");return Point(parseInt(a[0],10),parseInt(a[1],10))},actionEvent=function(){this.config.action.actionType==PageEditor.ActionType.GOTO_PAGE?gotoPageFun(this.config.action.pageIndex):this.config.action.actionType==PageEditor.ActionType.OPEN_URL?(void 0==this.config.action.linkTarget&&(this.config.action.linkTarget="_blank"),window.open(this.linkURL,this.config.action.linkTarget)):this.config.action.actionType== PageEditor.ActionType.OPEN_WINDOW?this.form=new initVideoForm(tmpContainer,{width:this.config.action.windowWidth,height:this.config.action.windowHeight,content:this.config.action.resourceContent,winType:this.config.action.windowType,caption:this.config.action.caption},bookContainer.width(),bookContainer.height()):this.config.action.actionType==PageEditor.ActionType.SLIDE_SHOW?this.slide=new initSlideShow(tmpContainer,this.config.action.photos.photo,bookContainer.width(),bookContainer.height()):this.config.action.actionType== PageEditor.ActionType.PLAY_AUDIO?0==this.flag&&(this.audios=$(""),this.config.action.autoPlay&&(this.audios[0].autoPlay=!0),this.father.append(this.audios),this.flag=1):this.config.action.actionType==PageEditor.ActionType.ACTION_JS&&null!=this.config.action.scriptFun&&eval(this.config.action.scriptFun)},getAliasValue=function(a){a= bookConfig[a]?bookConfig[a]:aliasConfig[a]?aliasConfig[a]:void 0;if(a instanceof Array){if(!(1>a.length))for(var b=0;bc.indexOf(e)&&0>d.indexOf(e)?b:0<=c.indexOf(e)},getColor=function(a,b){var c=getAliasValue(a);return void 0!=c?colorTo0x(c):b},getImage=function(a){if(0m)m=p,q=p+d[l].length,h=f.substring(q),0==l&&(j=p),l==d.length-1&&(k=p+u);else{n=!1;break}}else{n=!1;break}}n&&(m=[],m.search_page=e+1,m.search_title="page "+(e+1),j=f.substring(0,j).lastIndexOf("."),-1== j?j=0:j++,q=f.substring(k),n=q.indexOf(".")+1,n=-1==n?q.length():k+n,f=f.substring(j,n),m.search_text=f,c.push(m))}return c};var KMP=function(a,b){this.__string=a;this.__pattern=b;this.__next=[];this.__times=0;this.__index=-1;for(var c=0,c=0;c=c?c-1:this.next(b.substring(0,c));this.__times=0;this.__index=-1};KMP.prototype.next=function(a){for(var b=Math.ceil(a.length/2);0");this.sideContent=$("
      ");this.sideImg=$("");this.grayColor=$("
      ");(this.isLeft=b)?(this.midShadow=$("
      "),this.midShadow.css({width:userConfig.leftShadowWidth+"px",opacity:userConfig.leftShadowAlpha})):(this.midShadow=$("
      "), this.midShadow.css({width:userConfig.rightShadowWidth+"px",opacity:userConfig.rightShadowAlpha}));this.side.css({"background-color":getColor("pageBackgroundColor","#f5f5f5")});this.MMBackground=$("
      ");this.loadingImg=$("");this.loadingImg.css({left:(this.width-32)/2+"px",top:(this.height-32)/2+"px"});this.linkArray=[];this.youtubeArray=[];this.videoArray=[];this.audioArray=[];this.imageArray= [];this.buttonArray=[];this.flashShowArray=[];this.lineArray=[];this.arrowArray=[];this.roundArray=[];this.reArray=[];this.textArray=[];this.areaArray=[];this.calloutArray=[];this.atextArray=[];this.startextArray=[];this.aminArray=[];this.atimageArray=[];this.efftextArray=[];this.soundArray=[];this.bannerArray=[];this.vimeoArray=[];a.append(this.side);this.side.append(this.sideContent);this.side.append(this.midShadow);this.side.append(this.MMBackground);this.midShadow.css("z-index",5)} normalSide.prototype.getSide=function(){return this.side};normalSide.prototype.fillContent=function(a){if(a!=this.imageIndex&&(this.imageIndex=a,this.sideContent.empty(),!(this.imageIndex>originTotalPageCount))){this.showLoading();var b=this;this.sideImg.attr("src",getPageDir(this.imageIndex,"normal"));this.imgLoaded=0;this.sideImg.load(function(){b.hideLoading();b.sideContent.append(b.sideImg);b.sideContent.append(b.grayColor);void 0!=pageEditor&&b.initMM()})}}; normalSide.prototype.imgFlipOver=function(a){a?(this.sideImg.css({"-webkit-transform":"scaleX(-1)","-moz-transform":"scaleX(-1)"}),this.MMBackground.css({"-webkit-transform":"scaleX(-1)","-moz-transform":"scaleX(-1)"}),this.midShadow.attr("class",this.isLeft?"rightShadow":"leftShadow"),this.midShadow.css({left:this.isLeft?"0px":"auto",right:this.isLeft?"auto":"0px"})):(this.sideImg.css({"-webkit-transform":"scaleX(1)","-moz-transform":"scaleX(1)"}),this.MMBackground.css({"-webkit-transform":"scaleX(1)", "-moz-transform":"scaleX(1)"}),this.midShadow.attr("class",this.isLeft?"leftShadow":"rightShadow"),this.midShadow.css({left:this.isLeft?"auto":"0px",right:this.isLeft?"0px":"auto"}))}; normalSide.prototype.initMM=function(){this.MMBackground.empty();this.linkArray=[];this.youtubeArray=[];this.videoArray=[];this.audioArray=[];this.imageArray=[];this.buttonArray=[];this.flashShowArray=[];this.lineArray=[];this.arrowArray=[];this.roundArray=[];this.reArray=[];this.textArray=[];this.areaArray=[];this.calloutArray=[];this.atextArray=[];this.startextArray=[];this.aminArray=[];this.atimageArray=[];this.efftextArray=[];this.soundArray=[];this.bannerArray=[];this.vimeoArray=[];if(!(0>=this.imageIndex|| pageEditor.length");this.mask=$("
      ");this.sideAPosition=$("
      ");this.sideBPosition=$("
      ");this.flipBackShadow=$("
      ");this.flipFrontShadow=$("
      ");this.sideA=new normalSide(this.sideAPosition,!1);this.sideB=new normalSide(this.sideBPosition,!0);this.page.append(this.flipBackShadow);a.append(this.page); this.page.append(this.mask);this.mask.append(this.sideAPosition);this.mask.append(this.sideBPosition);this.sideAPosition.append(this.sideA.side);this.sideBPosition.append(this.sideB.side)};normalPage.prototype.getSideA=function(){return this.sideA};normalPage.prototype.getSideB=function(){return this.sideB}; normalPage.prototype.onResize=function(a,b,c,d){this.page.css({width:a+"px",height:b+"px",left:d+"px"});this.mask.css({width:a+"px",height:b+"px"});this.flipBackShadow.css({width:a+"px",height:b+"px"});this.flipFrontShadow.css({width:a+"px",height:b+"px"});this.sideAPosition.css({width:a+"px",height:b+"px"});this.sideBPosition.css({width:a+"px",height:b+"px"});this.sideA.onResize(a,b);this.sideB.onResize(a,b);this.width=a;this.height=b;this.maskWidth=c}; normalPage.prototype.fillSideA=function(a){this.sideA.fillContent(a);this.pageIndex=a;this.isHardPage=!1;1==a&&hardPageEnable&&3!=browserType&&(this.isHardPage=!0)};normalPage.prototype.fillSideB=function(a){this.sideB.fillContent(a);a==totalPageCount&&hardPageEnable&&3!=browserType&&(this.isHardPage=!0)}; normalPage.prototype.beginFlip=function(a){this.corner=a;this.isLeft()?(this.sideA.sideAddChild(this.flipFrontShadow),this.pageStatu=!0):(this.sideB.sideAddChild(this.flipFrontShadow),this.pageStatu=!1);1>=flipBook.gotoPageIndex&&flipBook.bmt.leftBox.hide();flipBook.gotoPageIndex>=totalPageCount&&flipBook.bmt.rightBox.hide();3>=flipBook.gotoPageIndex&&flipBook.setLeftThicknessVisible(!1);flipBook.gotoPageIndex>=totalPageCount-2&&flipBook.setRightThicknessVisible(!1);this.mask.css({width:this.maskWidth+ "px",height:this.maskWidth+"px"});flipBook.normalBookShadow.hideShadow()}; normalPage.prototype.flipToPoint=function(a,b,c){if(this.isHardPage)this.hardFlip(a,c);else if(this.isCorner(a,b))this.resetPage(this.isLeft());else{var d=computePoint(this.corner,a,b,this.width,this.height,this.maskWidth,this.flipFrontShadow,this.flipBackShadow),a=d.Angle,b=d.Df,e=d.NomovePoint,d=d.Mv,f=this.isLeft(),h=this.isBottom();c&&(this.showShadow(),this.page.css({left:f?"0px":this.width+"px"}),this.sideAPosition.css({right:f?"0px":"auto",left:f?"auto":"0px",top:h?"auto":"0px",bottom:h?"0px": "auto"}),this.sideBPosition.css({right:f?"0px":"auto",left:f?"auto":"0px",top:h?"auto":"0px",bottom:h?"0px":"auto"}),this.setSideUp(f),f?this.sideA.hideGray():this.sideB.hideGray());switch(this.corner){case "tl":this.rotateElement(this.mask,"100% 0%",translate(-e.x+this.width-this.maskWidth+d.x,-e.y+d.y)+rotate(-a));this.rotateElement(this.sideBPosition,"100% 0%",rotate(a)+translate(e.x-d.x,e.y-d.y));this.rotateElement(this.sideAPosition,"100% 0%",rotate(a)+translate(e.x+b.x-d.x,e.y+b.y-d.y));this.rotateElement(this.sideA.side, "100% 0%",translate(-this.width,0)+rotate(2*(90-a)));break;case "tr":this.rotateElement(this.mask,"0% 0%",translate(e.x+d.x,-e.y+d.y)+rotate(a));this.rotateElement(this.sideAPosition,"0% 0%",rotate(-a)+translate(-e.x-d.x,e.y-d.y));this.rotateElement(this.sideBPosition,"0% 0%",rotate(-a)+translate(-e.x-d.x+b.x,e.y+b.y-d.y));this.rotateElement(this.sideB.getSide(),"0% 0%",translate(0,0)+rotate(2*(a-90)));break;case "bl":this.rotateElement(this.mask,"100% 100%",translate(-e.x+this.width-this.maskWidth+ d.x,e.y+this.height-this.maskWidth+d.y)+rotate(a));this.rotateElement(this.sideBPosition,"100% 100%",rotate(-a)+translate(e.x-d.x,-e.y-d.y));this.rotateElement(this.sideAPosition,"100% 100%",rotate(-a)+translate(e.x+b.x-d.x,-e.y-d.y+b.y));this.rotateElement(this.sideA.getSide(),"100% 100%",translate(-this.width,-this.height)+rotate(2*(a-90)));break;case "br":this.rotateElement(this.mask,"0% 100%",translate(e.x+d.x,e.y+this.height-this.maskWidth+d.y)+rotate(-a)),this.rotateElement(this.sideAPosition, "0% 100%",rotate(a)+translate(-e.x-d.x,-e.y-d.y)),this.rotateElement(this.sideBPosition,"0% 100%",rotate(a)+translate(-e.x+b.x-d.x,-e.y+b.y-d.y)),this.rotateElement(this.sideB.getSide(),"0% 100%",translate(0,-this.height)+rotate(2*(90-a)))}}};normalPage.prototype.flipToAnPoint=function(a,b,c){this.beginFlip(c);this.flipToPoint(a,b,!0);"tl"==c||"bl"==c?this.setSideUp(!0):this.setSideUp(!1)}; normalPage.prototype.endFlip=function(){this.hideShadow();this.pageStatu=this.isLeft()?!1:!0;this.sideA.showGray();this.sideB.showGray();flipBook.normalBookShadow.showShadow()}; normalPage.prototype.hardFlip=function(a,b){var c=!1;if("tl"==this.corner||"bl"==this.corner)c=!0;var d=c?a-this.width:a;d<-this.width&&(d=-this.width);d>=this.width&&(d=this.width);d=180*Math.acos(d/this.width)/Math.PI;c?(b&&(this.sideA.imgFlipOver(!0),this.page.css({"-webkit-perspective-origin":"right center","-webkit-transform-origin":"100% 50%","-webkit-transform-style":"preserve-3d","-moz-perspective-origin":"right center","-moz-transform-origin":"100% 50%","-moz-transform-style":"preserve-3d", "z-index":20})),d=180-d,this.page.css({"-webkit-transform":"perspective(3000px) rotateY("+d+"deg) translate3d(0px,0px,-1px)","-moz-transform":"perspective(3000px) rotateY("+d+"deg)"}),90<=d?this.setSideUp(!0):this.setSideUp(!1)):(b&&(this.sideB.imgFlipOver(!0),this.page.css({"-webkit-perspective-origin":"left center","-webkit-transform-origin":"0% 50%","-webkit-transform-style":"preserve-3d","-moz-transform-style":"preserve-3d","-moz-perspective-origin":"left center","-moz-transform-origin":"0% 50%", "z-index":20})),this.page.css({"-webkit-transform":"perspective(3000px) rotateY("+-d+"deg)","-moz-transform":"perspective(3000px) rotateY("+-d+"deg)"}),90<=d?this.setSideUp(!1):this.setSideUp(!0))}; normalPage.prototype.resetPage=function(a){var b=this;this.isHardPage&&(this.sideA.imgFlipOver(!1),this.sideB.imgFlipOver(!1),!this.isLastPageReset&&this.pageIndex+1==totalPageCount?(this.isLastPageReset=!0,window.setTimeout(function(){b.page.css({"-webkit-transform-style":"flat","-moz-transform-style":"flat","-webkit-transform":"rotateY(0deg)","-moz-transform":"rotateY(0deg)","-o-transform":"rotateY(0deg)","-ms-transform":"rotateY(0deg)",transform:"rotateY(0deg)"})},10)):this.page.css({"-webkit-transform-style":"flat", "-moz-transform-style":"flat","-webkit-transform":"rotateY(0deg)","-moz-transform":"rotateY(0deg)","-o-transform":"rotateY(0deg)","-ms-transform":"rotateY(0deg)",transform:"rotateY(0deg)"}));this.page.css({left:a?"0px":this.width+"px"});this.mask.css({top:"0px",left:"0px",bottom:"auto",right:"auto",width:this.width,height:this.height});this.rotateElement(this.mask,"0% 0%",translate(0,0)+rotate(0));this.sideAPosition.css({top:"0px",left:"0px",bottom:"auto",right:"auto"});this.sideBPosition.css({top:"0px", left:"0px",bottom:"auto",right:"auto"});this.rotateElement(this.sideAPosition,"0% 0%",translate(0,0)+rotate(0));this.rotateElement(this.sideBPosition,"0% 0%",translate(0,0)+rotate(0));this.rotateElement(this.sideA.getSide(),"0% 0%",translate(0,0)+rotate(0));this.rotateElement(this.sideB.getSide(),"0% 0%",translate(0,0)+rotate(0))};normalPage.prototype.setSideUp=function(a){this.sideAPosition.css({"z-index":a?2:1});this.sideBPosition.css({"z-index":a?1:2})}; normalPage.prototype.rotateElement=function(a,b,c){a.css({"-webkit-transform-origin":b,"-moz-transform-origin":b,"-ms-transform-origin":b,"-o-transform-origin":b,"-webkit-transform":c,"-moz-transform":c,"-ms-transform":c,"-o-transform":c})};normalPage.prototype.translateElement=function(a,b,c){a.css({"-webkit-transform":"translate("+b+"px,"+c+"px)","-moz-transform":"translate("+b+"px,"+c+"px)","-o-transform":"translate("+b+"px,"+c+"px)","-ms-transform":"translate("+b+"px,"+c+"px)"})}; normalPage.prototype.isTop=function(){return 0<=this.corner.indexOf("t")};normalPage.prototype.isLeft=function(){return 0<=this.corner.indexOf("l")};normalPage.prototype.isBottom=function(){return 0<=this.corner.indexOf("b")};normalPage.prototype.isRight=function(){return 0<=this.corner.indexOf("r")};normalPage.prototype.isCorner=function(a,b){var c=0;this.isTop()&&0==b&&c++;this.isBottom()&&b==this.height&&c++;this.isLeft()&&0==a&&c++;this.isRight()&&a==this.width&&c++;return 2==c}; normalPage.prototype.setPageVisible=function(a){a?(this.page.css({display:"block"}),this.pageVisible=!0):(this.page.css({display:"none"}),this.pageVisible=!1)};normalPage.prototype.getPageStatu=function(){return this.pageStatu};normalPage.prototype.setPageStatu=function(a){this.pageStatu=a};normalPage.prototype.showShadow=function(){this.flipFrontShadow.css({display:"block"});this.flipBackShadow.css({display:"block"})}; normalPage.prototype.hideShadow=function(){this.flipFrontShadow.css({display:"none"});this.flipBackShadow.css({display:"none"})};normalPage.prototype.setCSS=function(a){this.page.css(a)};normalPage.prototype.showYoutube=function(){this.sideA.showYoutube();this.sideB.showYoutube()};normalPage.prototype.hideYoutube=function(){this.sideA.hideYoutube();this.sideB.hideYoutube()};function rightToLeftNormalPage(){normalPage.call(this)}$.extend(rightToLeftNormalPage.prototype,normalPage.prototype); rightToLeftNormalPage.prototype.create=function(a){this.page=$("
      ");this.mask=$("
      ");this.sideAPosition=$("
      ");this.sideBPosition=$("
      ");this.flipBackShadow=$("
      ");this.flipFrontShadow=$("
      ");this.sideA=new normalSide(this.sideAPosition,!0);this.sideB=new normalSide(this.sideBPosition,!1);this.page.append(this.flipBackShadow);a.append(this.page); this.page.append(this.mask);this.mask.append(this.sideAPosition);this.mask.append(this.sideBPosition);this.sideAPosition.append(this.sideA.side);this.sideBPosition.append(this.sideB.side)}; rightToLeftNormalPage.prototype.beginFlip=function(a){this.corner=a;this.isLeft()?(this.sideB.sideAddChild(this.flipFrontShadow),this.pageStatu=!0):(this.sideA.sideAddChild(this.flipFrontShadow),this.pageStatu=!1);1>=flipBook.gotoPageIndex&&flipBook.bmt.rightBox.hide();flipBook.gotoPageIndex>=totalPageCount&&flipBook.bmt.leftBox.hide();3>=flipBook.gotoPageIndex&&flipBook.setLeftThicknessVisible(!1);flipBook.gotoPageIndex>=totalPageCount-2&&flipBook.setRightThicknessVisible(!1);this.mask.css({width:this.maskWidth+ "px",height:this.maskWidth+"px"});flipBook.normalBookShadow.hideShadow()}; rightToLeftNormalPage.prototype.flipToPoint=function(a,b,c){if(this.isHardPage)this.hardFlip(a,c);else if(this.isCorner(a,b))this.resetPage(!this.isLeft());else{var d=computePoint(this.corner,a,b,this.width,this.height,this.maskWidth,this.flipFrontShadow,this.flipBackShadow),a=d.Angle,b=d.Df,e=d.NomovePoint,d=d.Mv,f=this.isLeft(),h=this.isBottom();c&&(this.showShadow(),this.page.css({left:f?"0px":this.width+"px"}),this.sideAPosition.css({right:f?"0px":"auto",left:f?"auto":"0px",top:h?"auto":"0px", bottom:h?"0px":"auto"}),this.sideBPosition.css({right:f?"0px":"auto",left:f?"auto":"0px",top:h?"auto":"0px",bottom:h?"0px":"auto"}),this.setSideUp(!f),f?this.sideA.hideGray():this.sideB.hideGray());switch(this.corner){case "tl":this.rotateElement(this.mask,"100% 0%",translate(-e.x+this.width-this.maskWidth+d.x,-e.y+d.y)+rotate(-a));this.rotateElement(this.sideAPosition,"100% 0%",rotate(a)+translate(e.x-d.x,e.y-d.y));this.rotateElement(this.sideBPosition,"100% 0%",rotate(a)+translate(e.x+b.x-d.x,e.y+ b.y-d.y));this.rotateElement(this.sideB.side,"100% 0%",translate(-this.width,0)+rotate(2*(90-a)));break;case "tr":this.rotateElement(this.mask,"0% 0%",translate(e.x+d.x,-e.y+d.y)+rotate(a));this.rotateElement(this.sideBPosition,"0% 0%",rotate(-a)+translate(-e.x-d.x,e.y-d.y));this.rotateElement(this.sideAPosition,"0% 0%",rotate(-a)+translate(-e.x-d.x+b.x,e.y+b.y-d.y));this.rotateElement(this.sideA.getSide(),"0% 0%",translate(0,0)+rotate(2*(a-90)));break;case "bl":this.rotateElement(this.mask,"100% 100%", translate(-e.x+this.width-this.maskWidth+d.x,e.y+this.height-this.maskWidth+d.y)+rotate(a));this.rotateElement(this.sideAPosition,"100% 100%",rotate(-a)+translate(e.x-d.x,-e.y-d.y));this.rotateElement(this.sideBPosition,"100% 100%",rotate(-a)+translate(e.x+b.x-d.x,-e.y-d.y+b.y));this.rotateElement(this.sideB.getSide(),"100% 100%",translate(-this.width,-this.height)+rotate(2*(a-90)));break;case "br":this.rotateElement(this.mask,"0% 100%",translate(e.x+d.x,e.y+this.height-this.maskWidth+d.y)+rotate(-a)), this.rotateElement(this.sideBPosition,"0% 100%",rotate(a)+translate(-e.x-d.x,-e.y-d.y)),this.rotateElement(this.sideAPosition,"0% 100%",rotate(a)+translate(-e.x+b.x-d.x,-e.y+b.y-d.y)),this.rotateElement(this.sideA.getSide(),"0% 100%",translate(0,-this.height)+rotate(2*(90-a)))}}}; rightToLeftNormalPage.prototype.hardFlip=function(a,b){var c=!1;if("tl"==this.corner||"bl"==this.corner)c=!0;var d=c?a-this.width:a;d<-this.width&&(d=-this.width);d>=this.width&&(d=this.width);d=180*Math.acos(d/this.width)/Math.PI;c?(b&&(this.sideB.imgFlipOver(!0),this.page.css({"-webkit-perspective-origin":"right center","-webkit-transform-origin":"100% 50%","-webkit-transform-style":"preserve-3d","-moz-perspective-origin":"right center","-moz-transform-origin":"100% 50%","-moz-transform-style":"preserve-3d", "z-index":20})),d=180-d,this.page.css({"-webkit-transform":"perspective(3000px) rotateY("+d+"deg) translate3d(0px,0px,-1px)","-moz-transform":"perspective(3000px) rotateY("+d+"deg)"}),90<=d?this.setSideUp(!1):this.setSideUp(!0)):(b&&(this.sideA.imgFlipOver(!0),this.page.css({"-webkit-perspective-origin":"left center","-webkit-transform-origin":"0% 50%","-webkit-transform-style":"preserve-3d","-moz-transform-style":"preserve-3d","-moz-perspective-origin":"left center","-moz-transform-origin":"0% 50%", "z-index":20})),this.page.css({"-webkit-transform":"perspective(3000px) rotateY("+-d+"deg)","-moz-transform":"perspective(3000px) rotateY("+-d+"deg)"}),90<=d?this.setSideUp(!0):this.setSideUp(!1))}; rightToLeftNormalPage.prototype.resetPage=function(a){var b=this;this.isHardPage&&(this.sideA.imgFlipOver(!1),this.sideB.imgFlipOver(!1),!this.isLastPageReset&&this.pageIndex+1==totalPageCount?(this.isLastPageReset=!0,window.setTimeout(function(){b.page.css({"-webkit-transform-style":"flat","-moz-transform-style":"flat","-webkit-transform":"rotateY(0deg)","-moz-transform":"rotateY(0deg)","-o-transform":"rotateY(0deg)","-ms-transform":"rotateY(0deg)",transform:"rotateY(0deg)"})},10)):this.page.css({"-webkit-transform-style":"flat", "-moz-transform-style":"flat","-webkit-transform":"rotateY(0deg)","-moz-transform":"rotateY(0deg)","-o-transform":"rotateY(0deg)","-ms-transform":"rotateY(0deg)",transform:"rotateY(0deg)"}));this.page.css({left:!a?"0px":this.width+"px"});this.mask.css({top:"0px",left:"0px",bottom:"auto",right:"auto",width:this.width,height:this.height});this.rotateElement(this.mask,"0% 0%",translate(0,0)+rotate(0));this.sideAPosition.css({top:"0px",left:"0px",bottom:"auto",right:"auto"});this.sideBPosition.css({top:"0px", left:"0px",bottom:"auto",right:"auto"});this.rotateElement(this.sideAPosition,"0% 0%",translate(0,0)+rotate(0));this.rotateElement(this.sideBPosition,"0% 0%",translate(0,0)+rotate(0));this.rotateElement(this.sideA.getSide(),"0% 0%",translate(0,0)+rotate(0));this.rotateElement(this.sideB.getSide(),"0% 0%",translate(0,0)+rotate(0))};function androidPage(){normalPage.call(this)}$.extend(androidPage.prototype,normalPage.prototype); androidPage.prototype.flipToPoint=function(a,b,c){if(this.isHardPage)this.hardFlip(a,c);else if(this.isCorner(a,b))this.resetPage(this.isLeft());else{var d=computePoint(this.corner,a,this.isTop()?0:this.height,this.width,this.height,this.maskWidth,this.flipFrontShadow,this.flipBackShadow),a=d.Angle,b=d.Df,e=d.NomovePoint,d=d.Mv,f=this.isLeft(),h=this.isBottom();c&&(this.showShadow(),this.page.css({left:f?"0px":this.width+"px"}),this.sideAPosition.css({right:f?"0px":"auto",left:f?"auto":"0px",top:h? "auto":"0px",bottom:h?"0px":"auto"}),this.sideBPosition.css({right:f?"0px":"auto",left:f?"auto":"0px",top:h?"auto":"0px",bottom:h?"0px":"auto"}),this.setSideUp(f),f?this.sideA.hideGray():this.sideB.hideGray());switch(this.corner){case "tl":this.rotateElement(this.mask,"100% 0%",translate(-e.x+this.width-this.maskWidth+d.x,-e.y+d.y)+rotate(-a));this.rotateElement(this.sideBPosition,"100% 0%",rotate(a)+translate(e.x-d.x,e.y-d.y));this.rotateElement(this.sideAPosition,"100% 0%",rotate(a)+translate(e.x+ b.x-d.x,e.y+b.y-d.y));this.rotateElement(this.sideA.side,"100% 0%",translate(-this.width,0)+rotate(2*(90-a)));break;case "tr":this.rotateElement(this.mask,"0% 0%",translate(e.x+d.x,-e.y+d.y)+rotate(a));this.rotateElement(this.sideAPosition,"0% 0%",rotate(-a)+translate(-e.x-d.x,e.y-d.y));this.rotateElement(this.sideBPosition,"0% 0%",rotate(-a)+translate(-e.x-d.x+b.x,e.y+b.y-d.y));this.rotateElement(this.sideB.getSide(),"0% 0%",translate(0,0)+rotate(2*(a-90)));break;case "bl":this.rotateElement(this.mask, "100% 100%",translate(-e.x+this.width-this.maskWidth+d.x,e.y+this.height-this.maskWidth+d.y)+rotate(a));this.rotateElement(this.sideBPosition,"100% 100%",rotate(-a)+translate(e.x-d.x,-e.y-d.y));this.rotateElement(this.sideAPosition,"100% 100%",rotate(-a)+translate(e.x+b.x-d.x,-e.y-d.y+b.y));this.rotateElement(this.sideA.getSide(),"100% 100%",translate(-this.width,-this.height)+rotate(2*(a-90)));break;case "br":this.rotateElement(this.mask,"0% 100%",translate(e.x+d.x,e.y+this.height-this.maskWidth+ d.y)+rotate(-a)),this.rotateElement(this.sideAPosition,"0% 100%",rotate(a)+translate(-e.x-d.x,-e.y-d.y)),this.rotateElement(this.sideBPosition,"0% 100%",rotate(a)+translate(-e.x+b.x-d.x,-e.y+b.y-d.y)),this.rotateElement(this.sideB.getSide(),"0% 100%",translate(0,-this.height)+rotate(2*(90-a)))}}};function androidRightPage(){rightToLeftNormalPage.call(this)}$.extend(androidRightPage,rightToLeftNormalPage.prototype); androidRightPage.prototype.flipToPoint=function(a,b,c){if(this.isHardPage)this.hardFlip(a,c);else if(this.isCorner(a,b))this.resetPage(!this.isLeft());else{var d=computePoint(this.corner,a,this.isTop()?0:this.height,this.width,this.height,this.maskWidth,this.flipFrontShadow,this.flipBackShadow),a=d.Angle,b=d.Df,e=d.NomovePoint,d=d.Mv,f=this.isLeft(),h=this.isBottom();c&&(this.showShadow(),this.page.css({left:f?"0px":this.width+"px"}),this.sideAPosition.css({right:f?"0px":"auto",left:f?"auto":"0px", top:h?"auto":"0px",bottom:h?"0px":"auto"}),this.sideBPosition.css({right:f?"0px":"auto",left:f?"auto":"0px",top:h?"auto":"0px",bottom:h?"0px":"auto"}),this.setSideUp(!f),f?this.sideA.hideGray():this.sideB.hideGray());switch(this.corner){case "tl":this.rotateElement(this.mask,"100% 0%",translate(-e.x+this.width-this.maskWidth+d.x,-e.y+d.y)+rotate(-a));this.rotateElement(this.sideAPosition,"100% 0%",rotate(a)+translate(e.x-d.x,e.y-d.y));this.rotateElement(this.sideBPosition,"100% 0%",rotate(a)+translate(e.x+ b.x-d.x,e.y+b.y-d.y));this.rotateElement(this.sideB.side,"100% 0%",translate(-this.width,0)+rotate(2*(90-a)));break;case "tr":this.rotateElement(this.mask,"0% 0%",translate(e.x+d.x,-e.y+d.y)+rotate(a));this.rotateElement(this.sideBPosition,"0% 0%",rotate(-a)+translate(-e.x-d.x,e.y-d.y));this.rotateElement(this.sideAPosition,"0% 0%",rotate(-a)+translate(-e.x-d.x+b.x,e.y+b.y-d.y));this.rotateElement(this.sideA.getSide(),"0% 0%",translate(0,0)+rotate(2*(a-90)));break;case "bl":this.rotateElement(this.mask, "100% 100%",translate(-e.x+this.width-this.maskWidth+d.x,e.y+this.height-this.maskWidth+d.y)+rotate(a));this.rotateElement(this.sideAPosition,"100% 100%",rotate(-a)+translate(e.x-d.x,-e.y-d.y));this.rotateElement(this.sideBPosition,"100% 100%",rotate(-a)+translate(e.x+b.x-d.x,-e.y-d.y+b.y));this.rotateElement(this.sideB.getSide(),"100% 100%",translate(-this.width,-this.height)+rotate(2*(a-90)));break;case "br":this.rotateElement(this.mask,"0% 100%",translate(e.x+d.x,e.y+this.height-this.maskWidth+ d.y)+rotate(-a)),this.rotateElement(this.sideBPosition,"0% 100%",rotate(a)+translate(-e.x-d.x,-e.y-d.y)),this.rotateElement(this.sideAPosition,"0% 100%",rotate(a)+translate(-e.x+b.x-d.x,-e.y+b.y-d.y)),this.rotateElement(this.sideA.getSide(),"0% 100%",translate(0,-this.height)+rotate(2*(90-a)))}}};var bookMouseDown=!1,nBookStatu=0;function normalBook(){this.pageWidth=300;this.pageHeight=400;this.width=600;this.height=400;this.maskWidth=500;this.gotoPageIndex=this.currentPageIndex=this.betweenPaperCount=1;this.intervalID=this.flipToPage=this.flippingPage=null;this.flipPoint=Point(0,0)} normalBook.prototype.create=function(a){this.flipBook=$("
      ");"android"==device.name?(this.previousPage=new androidPage,this.currentPage=new androidPage,this.currentPage2=new androidPage,this.nextPage=new androidPage):(this.previousPage=new normalPage,this.currentPage=new normalPage,this.currentPage2=new normalPage,this.nextPage=new normalPage);this.previousPage.create(this.flipBook);this.currentPage.create(this.flipBook);this.currentPage2.create(this.flipBook); this.nextPage.create(this.flipBook);this.leftThickness=thickness(!0);this.rightThickness=thickness(!1);this.normalBookShadow=new bookShadow(this.pageWidth,this.pageHeight,this.flipBook);this.bmt=new initBookMarkTab(this.flipBook);a.append(this.flipBook);this.flipBook.append(this.leftThickness);this.flipBook.append(this.rightThickness);this.currentPageIndex=oriPageIndex;this.fillNearPage(this.currentPageIndex);setCurrentIndexTextField(this.currentPageIndex,!0);1>=this.currentPageIndex&&this.bmt.leftBox.hide(); this.currentPageIndex>=totalPageCount&&this.bmt.rightBox.hide();3>=this.currentPageIndex&&this.leftThickness.setVisible(!1);this.currentPageIndex>=totalPageCount-2&&this.rightThickness.setVisible(!1);this.resetPageZIndex();this.initBookEvent()}; normalBook.prototype.onResize=function(a,b){this.width=2*a;this.height=b;this.pageWidth=a;this.pageHeight=b;this.maskWidth=Math.sqrt(a*a+b*b);this.flipBook.css({width:this.width+"px",height:this.height+"px"});this.previousPage.onResize(a,b,this.maskWidth,0);this.currentPage.onResize(a,b,this.maskWidth,0);this.currentPage2.onResize(a,b,this.maskWidth,a);this.nextPage.onResize(a,b,this.maskWidth,a);this.leftThickness.onResize(15,b);this.rightThickness.onResize(15,b);normalEventRadius=Math.pow(Math.ceil(a/ 3),2);this.normalBookShadow.onResize(this.pageWidth,this.pageHeight,1!=this.currentPageIndex&&this.currentPageIndex!=totalPageCount);this.normalBookShadow.setPosition(1==this.currentPageIndex?a:0,0);this.bmt.resize(b,60)};normalBook.prototype.getCurrentPageIndex=function(){return this.currentPageIndex};normalBook.prototype.getPageWidth=function(a){if(void 0==a)return this.pageWidth;this.pageWidth=a}; normalBook.prototype.getPageHeight=function(a){if(void 0==a)return this.pageHeight;this.pageHeight=a};normalBook.prototype.getWidth=function(){return this.width};normalBook.prototype.getHeight=function(){return this.height};normalBook.prototype.getLeft=function(){return this.flipBook.offset().left};normalBook.prototype.getTop=function(){return this.flipBook.offset().top};normalBook.prototype.setCSS=function(a){this.flipBook.css(a)}; normalBook.prototype.setPosition=function(a,b,c){void 0==c&&(c=["left","top"]);this.flipBook.css(c[0],a+"px");this.flipBook.css(c[1],b+"px")}; normalBook.prototype.timer=function(a,b,c,d,e,f,h,j){void 0==h&&(h=!1);void 0==j&&(j=!1);var k=0<=a.indexOf("l"),m=0<=a.indexOf("t");h||(this.currentPage.setCSS({"z-index":k?7:6}),this.currentPage2.setCSS({"z-index":k?6:7}));flipping=!0;stopFlip=!1;var q=(d.y-e.y)/b,n=0;getSpeedArray((d.x-e.x)/b,b);getSpeedArray(q,b);Point(0,0);var l=this;this.hideYoutube();this.intervalID=setInterval(function(){n++;l.flipPoint.x=$.easing.swing(null,n,e.x,d.x-e.x,b);l.flipPoint.y=$.easing.swing(null,n,e.y,d.y-e.y, b);if(f)l.flipPoint.y=0.2*Math.sqrt(Math.pow(l.pageWidth,2)-Math.pow(k?l.flipPoint.x-l.pageWidth:l.flipPoint.x,2));if(n==b)l.flipPoint=d;if(stopFlip){window.clearInterval(l.intervalID);l.betweenPaperCount=k?-1:1;l.gotoPageIndex=k?Math.floor(l.currentPageIndex/2-1)*2+1:Math.floor(l.currentPageIndex/2+1)*2;var c=Point(k?2*l.pageWidth:-l.pageWidth,m?0:l.pageHeight);l.timer(a,6,30,c,l.flipPoint,false,true,true);auto_player.resetTimer()}else{l.flippingPage.flipToPoint(l.flipPoint.x,l.flipPoint.y,n==1); if(n>=b){_rimFlip.isRimFlip||auto_player.resetTimer();window.clearInterval(l.intervalID);flipping=false;if(j||f){l.flippingPage.endFlip();l.afterGotoPage()}else if(h||!_rimFlip.isRimFlip)if(h){if(!f&&!j){nBookStatu=normalBookStatu.book_statu_ready;l.flippingPage.setSideUp(l.flippingPage.isLeft()?false:true);l.currentPageIndex>3&&!l.leftThickness.visible&&l.leftThickness.setVisible(true);l.currentPageIndex 1&&l.bmt.leftBox.show();l.currentPageIndexa||a>totalPageCount)_tipsBox.setCaption(1>a?"This is the first page":"This is the last page"),_tipsBox.showTipsBox();else if(0==nBookStatu&&this.setGotoPage(a)){a==totalPageCount&&this.nextPage.setPageVisible(!1);1==a&&this.previousPage.setPageVisible(!1);_rimFlip.removeRimFlip();nBookStatu=normalBookStatu.book_statu_auto_flip;this.gotoPageIndex=a;if(0this.betweenPaperCount?(a=this.nextPage,this.nextPage=this.currentPage2,this.currentPage2=this.currentPage,this.currentPage=a):2a?(b=Math.floor(a/2),c=Math.floor(this.currentPageIndex/2),this.flippingPage=this.currentPage,1=b&&0<=a.y&&a.y<=c?"right":!1}; normalBook.prototype.initBookEvent=function(){var a=this,b=-1,c=void 0,d,e;this.twoFingerDown=!1;this.flipBook.bind(_event._down,function(b){b=isTouch?b.originalEvent.touches:[b];if(2==b.length){if(nBookStatu==normalBookStatu.book_statu_mouse_flip){var c;"tl"==a.flippingPage.corner?c=Point(0,0):"tr"==a.flippingPage.corner?c=Point(a.pageWidth,0):"bl"==a.flippingPage.corner?c=Point(0,a.pageHeight):"br"==a.flippingPage.corner&&(c=Point(a.pageWidth,a.pageHeight));window.clearInterval(a.intervalID);a.timer(a.flippingPage.corner, 6,30,c,a.flipPoint,!1,!0)}d=globalToBook(!0,b[0].pageX,b[0].pageY);e=globalToBook(!0,b[1].pageX,b[1].pageY);b=a.pointInPage(d,a.pageWidth,a.pageHeight);c=a.pointInPage(e,a.pageWidth,a.pageHeight);b==c&&b&&(a.twoFingerDown=b);bookMouseDown=!1}else{if(nBookStatu==normalBookStatu.book_statu_ready){c=globalToBook(!0,b[0].pageX,b[0].pageY);if(0>c.x||c.x>a.width||0>c.y||c.y>a.height)return;var j,k;if(Math.pow(c.x,2)+Math.pow(c.y,2)b?!1:!0),b=h.x);f[0].preventDefault();return!1});bookContainer.bind(_event._end,function(b){b=isTouch?b.originalEvent.changedTouches:[b];if(bookMouseDown){a.twoFingerDown=!1; var b=globalToBook(a.flippingPage.isLeft(),b[0].pageX,b[0].pageY),d,e,k=!0;if(a.flippingPage.isLeft()&&b.x>=a.pageWidth||!a.flippingPage.isLeft()&&0>=b.x)k=!1;void 0!=c&&(k=!(a.flippingPage.isLeft()^c));k||(a.gotoPageIndex=a.flippingPage.isLeft()?2*Math.floor(a.currentPageIndex/2-1)+1:2*Math.floor(a.currentPageIndex/2+1),a.betweenPaperCount=a.flippingPage.isLeft()?-1:1);d=Point(a.flippingPage.isLeft()?0:a.pageWidth,a.flippingPage.isTop()?0:a.pageHeight);e=Point(a.flippingPage.isLeft()?2*a.pageWidth: -a.pageWidth,a.flippingPage.isTop()?0:a.pageHeight);a.timer(a.flippingPage.corner,6,30,k?d:e,b,!1,!0,!k);bookMouseDown=!1}else flipping&&2==nBookStatu&&(stopFlip=!0)})};normalBook.prototype.showYoutube=function(){this.previousPage.showYoutube();this.currentPage.showYoutube();this.currentPage2.showYoutube();this.nextPage.showYoutube()};normalBook.prototype.hideYoutube=function(){this.previousPage.hideYoutube();this.currentPage.hideYoutube();this.currentPage2.hideYoutube();this.nextPage.hideYoutube()}; normalBook.prototype.showCurrentYoutube=function(){this.currentPage.sideB.showYoutube();this.currentPage2.sideA.showYoutube()};normalBook.prototype.show=function(){this.setCSS({display:"block"});this.showCurrentYoutube()};normalBook.prototype.hide=function(){this.setCSS({display:"none"});this.hideYoutube()};function rightToLeftNormalBook(){normalBook.call(this)}$.extend(rightToLeftNormalBook.prototype,normalBook.prototype); rightToLeftNormalBook.prototype.create=function(a){this.flipBook=$("
      ");"android"==device.name?(this.previousPage=new androidRightPage,this.currentPage=new androidRightPage,this.currentPage2=new androidRightPage,this.nextPage=new androidRightPage):(this.previousPage=new rightToLeftNormalPage,this.currentPage=new rightToLeftNormalPage,this.currentPage2=new rightToLeftNormalPage,this.nextPage=new rightToLeftNormalPage);this.previousPage.create(this.flipBook); this.currentPage.create(this.flipBook);this.currentPage2.create(this.flipBook);this.nextPage.create(this.flipBook);this.leftThickness=thickness(!1);this.rightThickness=thickness(!0);this.normalBookShadow=new bookShadow(this.pageWidth,this.pageHeight,this.flipBook);a.append(this.flipBook);this.flipBook.append(this.leftThickness);this.flipBook.append(this.rightThickness);this.currentPageIndex=oriPageIndex;this.fillNearPage(this.currentPageIndex);setCurrentIndexTextField(this.currentPageIndex,!0);3>= this.currentPageIndex&&this.leftThickness.setVisible(!1);this.currentPageIndex>=totalPageCount-2&&this.rightThickness.setVisible(!1);this.resetPageZIndex();this.initBookEvent();this.bmt=new initBookMarkTab(this.flipBook,!0);1>=this.currentPageIndex&&this.bmt.rightBox.hide();this.currentPageIndex>=totalPageCount&&this.bmt.leftBox.hide()}; rightToLeftNormalBook.prototype.onResize=function(a,b){this.width=2*a;this.height=b;this.pageWidth=a;this.pageHeight=b;this.maskWidth=Math.sqrt(a*a+b*b);this.flipBook.css({width:this.width+"px",height:this.height+"px"});this.previousPage.onResize(a,b,this.maskWidth,0);this.currentPage.onResize(a,b,this.maskWidth,0);this.currentPage2.onResize(a,b,this.maskWidth,0);this.nextPage.onResize(a,b,this.maskWidth,0);this.leftThickness.onResize(15,b);this.rightThickness.onResize(15,b);normalEventRadius=Math.pow(Math.ceil(a/ 3),2);this.normalBookShadow.onResize(this.pageWidth,this.pageHeight,1!=this.currentPageIndex&&this.currentPageIndex!=totalPageCount);this.normalBookShadow.setPosition(this.currentPageIndex==totalPageCount?a:0,0);this.bmt.resize(b,60)};rightToLeftNormalBook.prototype.setThicknessPosition=function(){this.leftThickness.setThicknessPosition(2*this.pageWidth-1,0);this.rightThickness.setThicknessPosition(-14,0)}; rightToLeftNormalBook.prototype.gotoPage=function(a){if(1>a||a>totalPageCount)_tipsBox.setCaption(1>a?"This is the first page":"This is the last page"),_tipsBox.showTipsBox();else if(0==nBookStatu&&this.setGotoPage(a)){a==totalPageCount&&this.nextPage.setPageVisible(!1);1==a&&this.previousPage.setPageVisible(!1);_rimFlip.removeRimFlip();nBookStatu=normalBookStatu.book_statu_auto_flip;this.gotoPageIndex=a;if(0=b){_rimFlip.isRimFlip||auto_player.resetTimer();window.clearInterval(p.intervalID);flipping=false;if(j||f){p.flippingPage.endFlip();p.afterGotoPage()}else if(h||!_rimFlip.isRimFlip)if(h){if(!f&&!j){nBookStatu=normalBookStatu.book_statu_ready;p.flippingPage.setSideUp(p.flippingPage.isLeft()?true:false);p.currentPageIndex>3&&!p.leftThickness.visible&&p.leftThickness.setVisible(true);p.currentPageIndex1&&p.bmt.rightBox.show();p.currentPageIndex3&&!a.leftThickness.visible&&a.leftThickness.setVisible(true);a.currentPageIndex1&&a.bmt.rightBox.show();a.currentPageIndexb.x||b.x>a.width||0>b.y||b.y>a.height)return;var j;if(Math.pow(b.x,2)+Math.pow(b.y,2)b?!1:!0),b=h.x),!1});bookContainer.bind(_event._end,function(b){b=isTouch?b.originalEvent.changedTouches:[b];if(bookMouseDown){a.twoFingerDown=!1;var b=globalToBook(a.flippingPage.isLeft(), b[0].pageX,b[0].pageY),d,e,k=!0;if(a.flippingPage.isLeft()&&b.x>=a.pageWidth||!a.flippingPage.isLeft()&&0>=b.x)k=!1;void 0!=c&&(k=!(a.flippingPage.isLeft()^c));k||(a.gotoPageIndex=a.flippingPage.isLeft()?2*Math.floor(a.currentPageIndex/2+1):2*Math.floor(a.currentPageIndex/2-1)+1,a.betweenPaperCount=a.flippingPage.isLeft()?1:-1);d=Point(a.flippingPage.isLeft()?0:a.pageWidth,a.flippingPage.isTop()?0:a.pageHeight);e=Point(a.flippingPage.isLeft()?2*a.pageWidth:-a.pageWidth,a.flippingPage.isTop()?0:a.pageHeight); a.timer(a.flippingPage.corner,6,30,k?d:e,b,!1,!0,!k);bookMouseDown=!1}else flipping&&2==nBookStatu&&(stopFlip=!0)})};rightToLeftNormalBook.prototype.hideYoutube=function(){this.previousPage.hideYoutube();this.currentPage.hideYoutube();this.currentPage2.hideYoutube();this.nextPage.hideYoutube()};rightToLeftNormalBook.prototype.showCurrentYoutube=function(){this.currentPage.sideB.showYoutube();this.currentPage2.sideA.showYoutube()}; normalBook.prototype.show=function(){this.setCSS({display:"block"});this.showCurrentYoutube()};normalBook.prototype.hide=function(){this.setCSS({display:"none"});this.hideYoutube()};var _singleBook,singleBookShadow; function singleBook(){var a=$(this).data(),b;a.previousPage=$("#singlePrePage");a.currentPage=$("#singleCurPage");a.nextPage=$("#singleNextPage");a.thickness=thickness(rightToLeft);a.flippingPage={};a.flipToPage={};a.currentPageIndex=1;a.pageWidth=768;a.pageHeight=1024;a.maskWidth=1280;a.bookStatu=0;a.differPageNum=0;a.gotoPageIndex=0;a.bookMouseDown=!1;a.isLeft=!1;a.isTop=!1;singleBookShadow=new bookShadow(a.pageWidth,a.pageHeight,_singleBook);a.cssObj={top:"0px",left:"0px",position:"absolute"}; a.gotoPage=function(b){if(1>b||b>originTotalPageCount)_tipsBox.setCaption(1>b?"This is the first page":"This is the last page"),_tipsBox.showTipsBox();else if(!(a.currentPageIndex==b||0!=a.bookStatu)){_rimFlip.removeRimFlip();a.setGotoPage(b);a.bookStatu=1;a.gotoPageIndex=b;var b=Point(0,0),d,e=Point(0,0);0a.flipPoint.x&&!rightToLeft&&(e=Math.min((a.flipPoint.x+a.pageWidth)/a.pageWidth+0.1,1),a.flippingPage.sideB.css("opacity", e)),a.flipPoint.x>a.pageWidth&&rightToLeft&&(e=Math.min(Math.abs(a.flipPoint.x-2*a.pageWidth)/a.pageWidth+0.1,1),a.flippingPage.sideB.css("opacity",e)),a.flippingPage.flipToPoint(a.flipPoint,1==n),n>=d)if(_rimFlip.isRimFlip||auto_player.resetTimer(),window.clearInterval(b),j||m)a.flippingPage.endFlip(),a.afterGotoPage();else if(k||!_rimFlip.isRimFlip)k?!j&&!m&&(a.bookStatu=0,a.flippingPage.setSideAUp(!0),a.reset_z_index(),a.currentPageIndex!=originTotalPageCount&&a.thickness.showThickness(),a.showCurrentYoutube()): a.bookMouseDown=!0},e)};a.stopTimer=function(){window.clearInterval(b)};a.afterGotoPage=function(){a.currentPageIndex=a.gotoPageIndex;a.changePage();setCurrentIndexTextField(a.currentPageIndex,!1);window.setTimeout(function(){a.bookStatu=0;resizeBookAfterFlip&&onStageResize();a.currentPageIndex!=originTotalPageCount&&a.thickness.showThickness();a.fillNearPage(a.currentPageIndex);a.reset_z_index();a.flippingPage.resetPage();thumbnail.clearHighLight();thumbnail.setHighLight(a.currentPageIndex);window.location.hash= "#p="+a.currentPageIndex;a.showCurrentYoutube()},30)};a.setGotoPage=function(b){a.differPageNum=b-a.currentPageIndex;a.currentPageIndex>b?(a.flippingPage=a.previousPage,a.flipToPage=a.previousPage,a.fillAnPage(a.flipToPage,b,a.currentPageIndex-1)):(a.flippingPage=a.currentPage,a.flipToPage=a.nextPage,a.fillAnPage(a.flipToPage,b,b),a.flipToPage.css({"z-index":4}),a.flippingPage.css({"z-index":5}))};a.fillAnPage=function(a,b,e){a.resetPage();a.sideA.fillImg(b,!1);a.sideB.fillImg(e,!0);a.isHardPage= 1==b&&hardPageEnable&&3!=browserType?!0:!1};a.fillNearPage=function(b){1=originTotalPageCount-1&&a.thickness.setVisible(!1)}; singleBook.prototype.onResize=function(a,b){var c=$(this).data();c.maskWidth=Math.sqrt(Math.pow(a,2)+Math.pow(b,2));_singleBook.css({width:a+"px",height:b+"px"});c.previousPage.onResize(a,b);c.currentPage.onResize(a,b);c.nextPage.onResize(a,b);c.pageWidth=a;c.pageHeight=b;$("#singleBookMask").css({width:windowWidth+"px",height:windowHeight+"px"});c.thickness.onResize(15,b);c.thickness.setThicknessPosition(rightToLeft?-14:a-1,0);singleEventRadius=Math.pow(Math.ceil(a/3),2);singleBookShadow.onResize(a, b,!1)};singleBook.prototype.setBookPosition=function(a,b){$("#singleBookMask").css({left:a+"px"});_singleBook.css({left:"0px",top:b+"px"})}; singleBook.prototype.initPage=function(a){var b=$(this).data();a.mask=$("
      ");a.sidePositionA=$("
      ");a.sidePositionB=$("
      ");a.sideA=this.initSide(a,!0);a.sideB=this.initSide(a,!1);a.shadowA=$("
      ");a.shadowB=$("
      "); a.corner="tr";a.realCorner="tr";_singleBook.append(a);a.append(a.shadowA);a.append(a.mask);a.mask.append(a.sidePositionB);a.mask.append(a.sidePositionA);a.sidePositionB.append(a.sideB);a.sidePositionA.append(a.sideA);a.sideB.append(a.shadowB);a.onResize=function(c,d){a.css({width:c+"px",height:d+"px"});a.mask.css({width:b.maskWidth+"px",height:b.maskWidth+"px"});a.shadowA.css({width:c+"px",height:d+"px"});a.shadowB.css({width:c+"px",height:d+"px"});a.sidePositionA.css({width:c+"px",height:d+"px"}); a.sidePositionB.css({width:c+"px",height:d+"px"});a.sideA.onResize(c,d);a.sideB.onResize(c,d)};a.isHardPage=!1;a.beginFlip=function(c){a.realCorner=c;a.corner=0<=c.indexOf("t")?rightToLeft?"tl":"tr":rightToLeft?"bl":"br";b.gotoPageIndex==originTotalPageCount&&b.thickness.hideThickness()};a.flipToPoint=function(c,d){void 0==d&&(d=!1);"android"==device.name&&(c.y="tl"==a.corner||"tr"==a.corner?0:b.pageHeight);if(a.isHardPage)a.hardPageFlip(c.x,d);else if(a.isCorner(c.x,c.y))a.resetPage(),0<=a.realCorner.indexOf("l")&& a.css("z-index",1);else{var e=computePoint(a.corner,c.x,c.y,b.pageWidth,b.pageHeight,b.maskWidth,a.shadowB,a.shadowA);angle=e.Angle;df=e.Df;noMovePoint=e.NomovePoint;mv=e.Mv;if(d){a.setSideAUp(!1);a.showShadow();b.flippingPage.css({"z-index":5});var e=0<=a.corner.indexOf("t"),f=0<=a.corner.indexOf("l");e?(a.sidePositionB.css({top:"0px",bottom:"auto",left:f?"auto":"0px",right:f?"0px":"auto"}),a.sidePositionA.css({top:"0px",bottom:"auto",left:f?"auto":"0px",right:f?"0px":"auto"})):(a.sidePositionB.css({top:"auto", bottom:"0px",left:f?"auto":"0px",right:f?"0px":"auto"}),a.sidePositionA.css({top:"auto",bottom:"0px",left:f?"auto":"0px",right:f?"0px":"auto"}))}0<=a.corner.indexOf("t")?rightToLeft?(a.rotateElement(a.mask,"100% 0%",translate(-noMovePoint.x+b.pageWidth-b.maskWidth+mv.x,-noMovePoint.y+mv.y)+rotate(-angle)),a.rotateElement(a.sidePositionA,"100% 0%",rotate(angle)+translate(noMovePoint.x-mv.x,noMovePoint.y-mv.y)),a.rotateElement(a.sidePositionB,"100% 0%",rotate(angle)+translate(noMovePoint.x+df.x-mv.x, noMovePoint.y+df.y-mv.y)),a.rotateElement(a.sideB,"100% 0%",translate(-b.pageWidth,0)+rotate(2*(90-angle)))):(a.rotateElement(a.mask,"0% 0%",translate(noMovePoint.x+mv.x,-noMovePoint.y+mv.y)+rotate(angle)),a.rotateElement(a.sidePositionA,"0% 0%",rotate(-angle)+translate(-noMovePoint.x-mv.x,noMovePoint.y-mv.y)),a.rotateElement(a.sidePositionB,"0% 0%",rotate(-angle)+translate(-noMovePoint.x-mv.x+df.x,noMovePoint.y+df.y-mv.y)),a.rotateElement(a.sideB,"0% 0%",translate(0,0)+rotate(2*(angle-90)))):rightToLeft? (a.rotateElement(a.mask,"100% 100%",translate(-noMovePoint.x+b.pageWidth-b.maskWidth+mv.x,noMovePoint.y+b.pageHeight-b.maskWidth+mv.y)+rotate(angle)),a.rotateElement(a.sidePositionA,"100% 100%",rotate(-angle)+translate(noMovePoint.x-mv.x,-noMovePoint.y-mv.y)),a.rotateElement(a.sidePositionB,"100% 100%",rotate(-angle)+translate(noMovePoint.x+df.x-mv.x,-noMovePoint.y-mv.y+df.y)),a.rotateElement(a.sideB,"100% 100%",translate(-b.pageWidth,-b.pageHeight)+rotate(2*(angle-90)))):(a.rotateElement(a.mask, "0% 100%",translate(noMovePoint.x+mv.x,noMovePoint.y+b.pageHeight-b.maskWidth+mv.y)+rotate(-angle)),a.rotateElement(a.sidePositionA,"0% 100%",rotate(angle)+translate(-noMovePoint.x-mv.x,-noMovePoint.y-mv.y)),a.rotateElement(a.sidePositionB,"0% 100%",rotate(angle)+translate(-noMovePoint.x+df.x-mv.x,-noMovePoint.y+df.y-mv.y)),a.rotateElement(a.sideB,"0% 100%",translate(0,-b.pageHeight)+rotate(2*(90-angle))))}};a.rotateElement=function(a,b,e){a.css({"-webkit-transform-origin":b,"-moz-transform-origin":b, "-ms-transform-origin":b,"-o-transform-origin":b,"-webkit-transform":e,"-moz-transform":e,"-ms-transform":e,"-o-transform":e})};a.endFlip=function(){a.setSideAUp(!0);a.hideShadow()};a.hardPageFlip=function(c,d){var e=c;rightToLeft?(c>2*b.pageWidth&&(e=2*b.pageWidth),0>c&&(e=0),e=Math.acos((e-b.pageWidth)/b.pageWidth)):(c>b.pageWidth&&(e=b.pageWidth),c<-b.pageWidth&&(e=-b.pageWidth),e=Math.acos(e/b.pageWidth));e=180*e/Math.PI;rightToLeft&&(e-=180);d&&(a.sideB.imgFlipOver(!0),a.css({"-webkit-transform-style":"preserve-3d", "-moz-transform-style":"preserve-3d","z-index":120}));var f=rightToLeft?"100% 50%":"0% 50%";a.css({"-moz-perspective-origin":"left center","-webkit-transform-origin":f,"-webkit-transform":"perspective(3000px) rotateY("+-e+"deg)","-moz-perspective-origin":"left center","-moz-transform-origin":f,"-moz-transform":"perspective(3000px) rotateY("+-e+"deg)"});rightToLeft?-90>=e?(a.setSideAUp(!1),a.css({opacity:Math.abs(e+180)/90})):(a.setSideAUp(!0),a.css({opacity:1})):90<=e?(a.setSideAUp(!1),a.css({opacity:Math.abs(e- 180)/90})):(a.setSideAUp(!0),a.css({opacity:1}))};a.setSideAUp=function(b){a.sidePositionA.css({"z-index":b?2:1});a.sidePositionB.css({"z-index":b?1:2})};a.showShadow=function(){a.shadowA.css({display:"block"});a.shadowB.css({display:"block"})};a.hideShadow=function(){a.shadowA.css({display:"none"});a.shadowB.css({display:"none"})};a.resetPage=function(){a.isHardPage&&(a.css({"-webkit-transform-style":"flat","-moz-transform-style":"flat","-webkit-transform":"rotateY(0deg)","-moz-transform":"rotateY(0deg)", "-ms-transform":"rotateY(0deg)","-o-transform":"rotateY(0deg)",transform:"rotateY(0deg)",opacity:1}),a.sideA.imgFlipOver(!1),a.sideB.imgFlipOver(!1));a.rotateElement(a.mask,"0% 0%",translate(0,0)+rotate(0));a.rotateElement(a.sideA,"0% 0%",translate(0,0)+rotate(0));a.rotateElement(a.sideB,"0% 0%",translate(0,0)+rotate(0));a.rotateElement(a.sidePositionA,"0% 0%",translate(0,0)+rotate(0));a.rotateElement(a.sidePositionB,"0% 0%",translate(0,0)+rotate(0));a.sidePositionA.css({top:"0px",bottom:"auto",left:"0px", right:"auto"});a.sidePositionB.css({top:"0px",bottom:"auto",left:"0px",right:"auto"});a.sideB.css({opacity:1});a.sideA.css({opacity:1})};a.isCorner=function(c,d){var e=0;0<=a.realCorner.indexOf("t")&&0==d&&e++;0<=a.realCorner.indexOf("b")&&d==b.pageHeight&&e++;0<=a.realCorner.indexOf("l")&&c==-b.pageWidth&&e++;0<=a.realCorner.indexOf("r")&&c==b.pageWidth&&e++;return 2<=e};a.addSearch=function(){a.sideA.initSearch();a.sideB.initSearch()};a.clearSearch=function(){a.sideA.clearSearch();a.sideB.clearSearch()}; a.showYoutube=function(){a.sideA.showYoutube();a.sideB.showYoutube()};a.hideYoutube=function(){a.sideA.hideYoutube();a.sideB.hideYoutube()}}; singleBook.prototype.initSide=function(a,b){var c=$(this).data(),d=$("
      "),e=$("
      "),f=$("
      "),h=$(""),j;rightToLeft?(j=$("
      "),j.css({width:userConfig.leftShadowWidth+"px",opacity:userConfig.leftShadowAlpha})):(j=$("
      "), j.css({width:userConfig.rightShadowWidth+"px",opacity:userConfig.rightShadowAlpha}));var k=$("");k.css({left:(c.pageWidth-32)/2+"px",top:(c.pageHeight-32)/2+"px"});var m=$("
      "),q=[],n=[],l=[],u=[],p=[],z=[],t=[],J=[],w=[],s=[],x=[],y=[],I=[],K=[],L=[],R=[],v=[],M=[],D=[],g=[];bannerArray=[];vimeoArray=[];var P=$("
      "),O=[];a.append(d);d.append(e);e.append(f); d.append(P);d.append(m);b&&e.append(j);d.imgIndex=-1;d.onResize=function(a,b){d.css({width:a+"px",height:b+"px"});e.css({width:a+"px",height:b+"px"});f.css({width:a+"px",height:b+"px"});h.css({width:a+"px",height:b+"px"});j.css({height:b+"px"});k.css({left:(a-32)/2+"px",top:(b-32)/2+"px"});m.css({width:a,height:b});for(var c=0;c= 0){var b=searchElement(positionForPages[d.imgIndex-1][a],c.pageWidth,c.pageHeight);O.push(b);P.append(b)}};d.initMM=function(){m.empty();q=[];n=[];u=[];l=[];p=[];z=[];t=[];J=[];w=[];s=[];x=[];y=[];I=[];K=[];L=[];R=[];v=[];M=[];D=[];g=[];bannerArray=[];vimeoArray=[];if(!(d.imgIndex<0||pageEditor.length");this.btnZoomUp=new button(1,this.bar,{iconURL:this.dir+"ZoomUp.png"});this.btnZoomDown=new button(1,this.bar,{iconURL:this.dir+"ZoomDown.png"});this.btnZoomOut=new button(1,this.bar,{iconURL:this.dir+"ZoomOut.png"});this.btnPre=new button(1,this.bar,{iconURL:this.dir+"prev.png"});this.btnNext=new button(1,this.bar,{iconURL:this.dir+"next.png"});this.width=220;this.height=40;a.append(this.bar);this.bar.css({width:this.width+"px", height:this.height+"px",position:"absolute","z-index":5,"-webkit-border-radius":"8px","-moz-border-radius":"8px","-ms-border-radius":"8px","-o-border-radius":"8px","border-radius":"8px","-webkit-box-shadow":"0px 0px 10px rgba(0, 0, 60, 0.8)","-moz-box-shadow":"0px 0px 10px rgba(0, 0, 60, 0.8)","-ms-box-shadow":"0px 0px 10px rgba(0, 0, 60, 0.8)","-o-box-shadow":"0px 0px 10px rgba(0, 0, 60, 0.8)","box-shadow":"0px 0px 10px rgba(0, 0, 60, 0.8)",display:"none","background-color":"#333333",opacity:0.7}); this.initEvt();this.setButtonsPos()}zoomControlBar.prototype.setPosition=function(a,b){this.bar.css({left:a+"px",top:b+"px"})};zoomControlBar.prototype.setVisible=function(a){this.bar.css({display:a?"block":"none"})};zoomControlBar.prototype.setChildIndex=function(a){this.bar.css({"z-index":a})};zoomControlBar.prototype.onResize=function(a,b){this.bar.css({width:a+"px",height:b+"px"})}; zoomControlBar.prototype.initEvt=function(){this.btnZoomUp.onMouseUp(this,this.zoomUp);this.btnZoomDown.onMouseUp(this,this.zoomDown);this.btnZoomOut.onMouseUp(this,this.zoomOut);this.btnPre.onMouseUp(this,previousPageFun);this.btnNext.onMouseUp(this,nextPageFun)}; zoomControlBar.prototype.setButtonsPos=function(){this.btnZoomUp.setButtonPosition(3,3);this.btnZoomDown.setButtonPosition(46,3);this.btnZoomOut.setButtonPosition(89,3);this.btnPre.setButtonPosition(132,3);this.btnNext.setButtonPosition(175,3)};zoomControlBar.prototype.zoomUp=function(){zoomBook.zoom(0.2)};zoomControlBar.prototype.zoomDown=function(){zoomBook.zoom(-0.2)}; zoomControlBar.prototype.zoomOut=function(){windowWidth");this.sideContent=$("
      ");this.sideImg=$("");this.MMbg=$("
      ");this.loadingImg=$("");this.width=zoomPageWidth;this.height=zoomPageHeight;this.zoomContainerHeight=this.zoomContainerWidth=this.fitH=this.fitW=0;this.tmpImg=$("");a.append(this.side);this.side.append(this.sideContent); this.imgIndex=-1;this.toScale=1;this.origin="0% 0%";this.translateY=this.translateX=this.y=this.x=0;this.side.css({width:this.width+"px",height:this.height+"px",position:"absolute","-webkit-box-shadow":"10px 5px 15px rgba(40, 0, 0, 0.6)"});this.sideContent.css({width:this.width+"px",height:this.height+"px"});this.sideImg.css({width:this.width+"px",height:this.height+"px"});this.MMbg.css({width:this.width+"px",height:this.height+"px"});this.loadingImg.css({left:(this.width-32)/2+"px",top:(this.height- 32)/2+"px"});this.linkArray=[];this.youtubeArray=[];this.videoArray=[];this.audioArray=[];this.imageArray=[];this.buttonArray=[];this.flashShowArray=[];this.lineArray=[];this.arrowArray=[];this.roundArray=[];this.reArray=[];this.textArray=[];this.areaArray=[];this.calloutArray=[];this.atextArray=[];this.startextArray=[];this.aminArray=[];this.atimageArray=[];this.efftextArray=[];this.soundArray=[];this.bannerArray=[];this.vimeoArray=[];this.initEvent();this.onWinResize(windowWidth-leftMargin-rightMargin, windowHeight-topMargin-bottomMargin-toolBar.getHeight(),!0);this.father=a}zoomSide.prototype.hideMM=function(){this.MMbg.css({display:"none"})};zoomSide.prototype.showMM=function(){this.MMbg.css({display:"block"})};zoomSide.prototype.setCSS=function(a){this.side.css(a)};zoomSide.prototype.onResize2=function(a){this.toScale=a/this.width;a=getTransform(this.side[0]);this.zoomObj(this.side,this.origin," scale("+this.toScale+")",a.x,a.y)}; zoomSide.prototype.onResize=function(a,b,c){var d=getPageWidthHeight(a,b,zoomPageWidth,zoomPageHeight);this.winW=a;this.winH=b;this.width=d.x;this.height=d.y;this.side.css({width:this.width+"px",height:this.height+"px"});this.sideContent.css({width:this.width+"px",height:this.height+"px"});this.sideImg.css({width:this.width+"px",height:this.height+"px"});this.MMbg.css({width:this.width+"px",height:this.height+"px"});this.MMResize(this.width,this.height);c&&this.tmpImg.css({width:this.width+"px",height:this.height+ "px"})};zoomSide.prototype.getSide=function(){return this.side};zoomSide.prototype.fillContent=function(a){if(a!=this.imgIndex&&(this.imgIndex=a,this.sideContent.empty(),this.showLoading(),!(a>originTotalPageCount||0>a))){var b=this;b.sideImg.attr("src",getPageDir(a,"large"));this.sideImg.load(function(){b.hideLoading();b.tmpImg.attr("src",getPageDir(a,"large"));b.sideContent.append(b.sideImg);b.father.append(b.tmpImg);b.sideContent.append(b.MMbg);void 0!=pageEditor&&b.initMM()})}}; zoomSide.prototype.setPosition=function(a,b){this.side.css({left:a+"px",top:b+"px"})};zoomSide.prototype.setChildIndex=function(a){this.side.css({"z-index":a})};zoomSide.prototype.setVisible=function(a){this.side.css({display:a?"block":"none"})}; zoomSide.prototype.resetSize=function(){var a=this.width*this.toScale>=zoomPageWidth,b=a?zoomPageWidth:this.width*this.toScale,c=a?zoomPageHeight:this.height*this.toScale,d=getTransform(this.side[0]),e=this,f=this.width==zoomPageWidth&&bu-q&&0zoomPageWidth?zoomPageWidth:c);a.side.offset();a.side.offset();if(c==1){c=zoomPageWidth/a.fitW;a.zoom4Point(c,b.gesture.center.pageX,b.gesture.center.pageY,200)}else a.animateZoom(c,0,0,200)})}; zoomSide.prototype.zoom4Point=function(a,b,c,d){var e=this,f=b-e.side.offset().left,h=c-e.side.offset().top,j={scale:this.toScale};$(j).animate({scale:a},{duration:d,step:function(){var a=j.scale/e.toScale,d=b-a*f-e.x,a=c-a*h-e.y;e.zoomObj(e.side,e.origin," scale("+j.scale+")",d,a);e.zoomObj(e.tmpImg,e.origin," scale("+j.scale+")",d,a)},complete:function(){e.toScale=a;e.resetSize()}})};zoomSide.prototype.showYoutube=function(){for(var a=0;a=this.imgIndex|| pageEditor.length");this.book=$("
      ");this.prePage=new zoomSide(this.book);this.nextPage=new zoomSide(this.book);this.showPage=new zoomSide(this.book);this.width=zoomPageWidth;this.height=zoomPageHeight;this.prePage.setChildIndex(1);this.showPage.setChildIndex(3);this.nextPage.setChildIndex(2);this.diffPageCount=0;this.currentIndex=1;this.slidePageB=this.slidePageA=this.showingPage= this.flipPage=null;this.isFlipping=!1;isTouch?this.initEvent():(this.controlBar=new zoomControlBar(this.bookContainer),this.controlBar.setPosition((windowWidth-this.controlBar.width)/2,20));a.append(this.bookContainer);this.bookContainer.append(this.book);this.book.css({width:this.width+"px",height:this.height+"px",position:"absolute"});this.fillNear(1)} initZoomBook.prototype.onResize=function(a,b){var c=getPageWidthHeight(a,b,zoomPageWidth,zoomPageHeight);this.width=c.x;this.height=c.y;this.book.css({width:this.width+"px",height:this.height+"px",left:(a-this.width)/2+leftMargin+"px",top:(b-this.height)/2+topMargin+"px"});this.prePage.onWinResize(a,b,!0);this.showPage.onWinResize(a,b);this.nextPage.onWinResize(a,b,!0);this.controlBar&&this.controlBar.setPosition((windowWidth-this.controlBar.width)/2,20);this.prePage.setXY((tmpContainer.width()-this.width)/ 2,(tmpContainer.height()-toolBar.getHeight()-this.height)/2);this.showPage.setXY((tmpContainer.width()-this.width)/2,(tmpContainer.height()-toolBar.getHeight()-this.height)/2);this.nextPage.setXY((tmpContainer.width()-this.width)/2,(tmpContainer.height()-toolBar.getHeight()-this.height)/2);this.prePage.translate(-(a-this.width)/2-this.prePage.getWidth()-leftMargin-10,0);this.nextPage.translate((a-this.width)/2+this.width+rightMargin+10,0)}; initZoomBook.prototype.setTranslate=function(a,b,c){b=translate(b,c);a.css({"-webkit-transform":b,"-moz-transform":b,"-o-transform":b,"-ms-transform":b})}; initZoomBook.prototype.gotoPage=function(a){if(this.currentIndex==a||1>a||a>originTotalPageCount||this.isFlipping){if(1>a||a>originTotalPageCount)_tipsBox.setCaption(1>a?"This is the first page":"This is the last page"),_tipsBox.showTipsBox()}else{this.hideYoutube();this.isFlipping=!0;this.diffPageCount=a-this.currentIndex;var b=0,c=0,d=this,e=Point(0,(windowWidth-this.width)/2+10+this.width);this.currentIndex>a?(c=0,b=e.y,this.slidePageA=this.prePage,this.slidePageB=this.showPage,this.slidePageA.fillContent(a)): (c=e.y,b=0,this.slidePageA=this.showPage,this.slidePageB=this.nextPage,this.slidePageB.fillContent(a));var f=function(){var f=getSpeedArray((b-c)/30,30),j=0,k=window.setInterval(function(){j++;e.x=c;for(var b=0;b=30){window.clearInterval(k);window.setTimeout(function(){d.showPage.noZoom();auto_player.resetTimer();d.changePage();d.endFlip(a);d.isFlipping=false},20)}},20)};this.showPage.isFit()?f():this.showPage.animateBack(f)}}; initZoomBook.prototype.changePage=function(){var a=null;0"),e=backGroundImgURL,f="0% 0%,100% 0%";switch(c){case 45:f="0% 0%,100% 100%";break;case 90:f="0% 0%,0% 100%";break;case 135:f="100% 0%,0% 100%";break;case 180:f="100% 0%,0% 0%";case 0:f="0% 0%,100% 0%"}1==browserType?bookContainer.css("background-image","-webkit-gradient(linear,"+f+",from("+a+"),to("+b+"))"):2==browserType?bookContainer.css("background-image","-moz-linear-gradient(left "+c+"deg,"+ a+","+b+")"):3==browserType&&bookContainer.css("filter","progid:DXImageTransform.Microsoft.Gradient(GradientType=1, EndColorStr="+b+", StartColorStr="+a+");");if(""!=e&&"undefined"!=e){var h=new Image;h.src=e;h.onload=function(){h.complete&&(d.attr("src",e),bookContainer.append(d),d.css("z-index",0),d.width(windowWidth),d.height(windowHeight))}}$.fn.extend(bookContainer,{resizeBackGroundImg:function(){d.width(windowWidth);d.height(windowHeight)}})},initBackground=function(a,b,c,d,e,f,h){var j=$("
      "), k=$("
      "),m=$(""),q=e,n=f,l=function(a,b,c){var d=c*Math.PI/180,c=Math.abs(b*Math.sin(d))+Math.abs(a*Math.cos(d)),a=Math.abs(b*Math.cos(d))+Math.abs(a*Math.sin(d));return Point(c,a)},d=d%360;j.css({position:"absolute",left:"0px",top:"0px",width:q+"px",height:n+"px","z-index":-1});k.css({position:"absolute","z-index":0});1==browserType?k.css({"background-image":"-webkit-linear-gradient("+d+"deg, "+b+", "+c+")",width:q+"px",height:n+"px"}):2==browserType?k.css({"background-image":"-moz-linear-gradient("+ d+"deg, "+b+", "+c+")",width:q+"px",height:n+"px"}):4==browserType?k.css({"background-image":"-o-linear-gradient("+d+"deg, "+b+", "+c+")",width:q+"px",height:n+"px"}):3==browserType?(l(q,n,d),k.css({filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=1, EndColorStr="+c+", StartColorStr="+b+");",width:q+"px",height:n+"px"})):k.css({"background-image":"linear-gradient("+d+"deg, "+b+", "+c+")",width:q+"px",height:n+"px"});void 0!=h&&""!=h&&(m.attr({src:h}),m.load(function(){j.append(m);m.css({width:q+ "px",height:n+"px",position:"absolute","z-index":1})}));a.append(j);j.append(k);this.onResize=function(a,e){q=a;n=e;j.css({width:a+"px",height:e+"px"});m.css({width:a+"px",height:e+"px"});if(browserType==3){l(a,e,d);k.css({filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=1, EndColorStr="+c+", StartColorStr="+b+");",width:a+"px",height:e+"px"})}else k.css({width:a+"px",height:e+"px"})}};function autoFlip(){this.autoPlay=getBool("autoPlayAutoStart",!1)&&getBool("AutoPlayButtonVisible",!0);this.Duration=getInt("autoPlayDuration",3);this.loopCount=getInt("autoPlayLoopCount",1);this.loopNum=0;this.autoPlay?this.startTimer():this.timer=-1}autoFlip.prototype.startTimer=function(){var a=this;this.timer=window.setInterval(function(){a.onTimer()},1E3*this.Duration)};autoFlip.prototype.stopTimer=function(){-1!==this.timer&&(window.clearInterval(this.timer),this.timer=-1)}; autoFlip.prototype.resetTimer=function(){this.isPlaying()&&(this.stopTimer(),this.startTimer())}; autoFlip.prototype.onTimer=function(){0==bookType&&flipBook.currentPageIndex==totalPageCount||1==bookType&&$(singlePageBook).data().currentPageIndex==originTotalPageCount||2==bookType&&zoomBook.currentIndex==originTotalPageCount?(this.loopNum++,-1==this.loopCount||this.loopCount>this.loopNum?firstPageFun():(this.stop(),$("#autoPlayImg").attr("src",uiBaseURL+"autoPlay.png"),$("#autoPlay").attr("title",getLanguage("btnStopAutoFlip","Stop Auto Play")))):nextPageFun()}; autoFlip.prototype.start=function(){this.autoPlay=!0;this.startTimer()};autoFlip.prototype.stop=function(){this.autoPlay=!1;this.stopTimer()};autoFlip.prototype.isPlaying=function(){return this.autoPlay};var buttonType=function(){};buttonType.caption_button=0;buttonType.icon_button=1;buttonType.double_button=2;var buttonAlign=function(){};buttonAlign.icon_left=0;buttonAlign.icon_top=1;buttonAlign.icon_right=2;buttonAlign.icon_bottom=3; function button(a,b,c,d,e){this.background=$("
      ");this.caption="button1";this.iconURL="";this.mainColor="#888888";this.height=this.width=40;this.buttonType=a;this.config=c;this.iconBox=$("");this.needResize=e;this.asImgButton=d;this.create();$(b).append(this.background);$(this.background).asButton()} button.prototype.create=function(){var a=this;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()); if(this.buttonType!=buttonType.caption_button){this.iconURL=this.config.iconURL;var b=new Image;b.src=this.iconURL;b.onload=function(){if(b.complete==true){$(a.iconBox).attr("src",a.iconURL);a.background.append(a.iconBox);a.setPosition();a.asImgButton&&$(a.iconBox).asImageButton()}}}}; button.prototype.setPosition=function(){if(this.buttonType==buttonType.double_button){var a=this.captionBox.getWidth(),b=this.captionBox.getHeight(),c=this.iconBox.width(),d=this.iconBox.height();switch(this.config.align){case buttonAlign.icon_left:this.width=a+c+12;this.height=Math.max(d,b)+6;$(this.iconBox).css({top:(this.height-d)/2+"px",left:"4px"});$(this.captionBox).css({top:(this.height-b)/2+"px",right:"4px"});break;case buttonAlign.icon_top:this.width=Math.max(c,a)+6;this.height=b+d+8;$(this.iconBox).css({top:"2px", left:(this.width-c)/2+"px"});$(this.captionBox).css({bottom:"2px",left:(this.width-a)/2+"px"});break;case buttonAlign.icon_right:this.width=a+c+12;this.height=Math.max(d,b)+6;$(this.iconBox).css({top:(this.height-d)/2+"px",right:"4px"});$(this.captionBox).css({top:(this.height-b)/2+"px",left:"4px"});break;case buttonAlign.icon_bottom:this.width=Math.max(c,a)+6,this.height=b+d+8,$(this.iconBox).css({bottom:"2px",left:(this.width-c)/2+"px"}),$(this.captionBox).css({top:"2px",left:(this.width-a)/2+"px"})}}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.width=$(this.iconBox).width(),this.height=$(this.iconBox).height(),$(this.iconBox).css({top:"0px",left:"0px"}));if(this.needResize)this.onResize(40,50);else $(this.background).css({width:this.width+"px",height:this.height+"px"})}; button.prototype.onResize=function(a,b){$(this.background).css({width:a+"px",height:b+"px"});$(this.iconBox).css({position:"absolute",top:"10px",left:"3px"})};button.prototype.getWidth=function(){return this.width};button.prototype.getHeight=function(){return this.height};button.prototype.setCSS=function(a){$(this.background).css(a)};button.prototype.setButtonPosition=function(a,b,c){void 0==c&&(c=["left","top"]);this.background.css(c[0],a+"px");this.background.css(c[1],b+"px")}; button.prototype.setVisible=function(a){$(this.background).css({display:a?"block":"none"})};button.prototype.changeIcon=function(a){this.iconURL=a;var b=new Image,c=this;b.src=this.iconURL;b.onload=function(){!0==b.complete&&$(c.iconBox).attr("src",c.iconURL)};this.setPosition()};button.prototype.setColor=function(a){this.mainColor=a;$(this.background).css({"background-color":this.mainColor})};button.prototype.onMouseDown=function(a,b){this.background.bind(_event._down,function(c){b.call(a,c);return!1})}; button.prototype.onMouseUp=function(a,b){3==browserType?this.background.bind("click",function(c){b.call(a,c);return!1}):this.background.bind(_event._end,function(){b.call(a);return!1})};button.prototype.onMouseOver=function(a,b){this.background.bind(_event._move,function(){b.call(a);return!1})};button.prototype.onMouseOut=function(){};button.prototype.onMouseLeave=function(){};button.prototype.onMouseMove=function(){};button.prototype.remove=function(){this.background.remove()};var demoBar,initDemoBar=function(){var a=homePage;demoBar=$("
      ");demoBar.css({width:"305px",height:"70px",position:"absolute","background-color":"#cccccc",opacity:0.5,"z-index":10,"-moz-border-radius":"5px","-webkit-border-radius":"5px","border-radius":"5px"});var b=$("");b.css({position:"absolute",top:"10px",left:"5px"});var c=$("
      ");c.css({position:"absolute",top:"13px",left:"65px"});var d=$(""+productName+""),a=$(""+a+""); a.css({position:"absolute",top:"25px",left:"0px"});d.css({"font-size":"15px",color:"#333333"});bookContainer.append(demoBar);demoBar.append(c);c.append(d);c.append(a);$.fn.extend(demoBar,{setDemoPosition:function(){demoBar.css({top:(windowHeight-70)/2+"px",left:(windowWidth-305)/2+"px"})},loadImg:function(){b.load(function(){demoBar.append(b)});b.attr({src:uiBaseURL+"demo.png"})}});demoBar.loadImg();demoBar.setDemoPosition()};function initLeftOrRightButton(a,b){this.buttonBar=$("
      ");this.buttonIcon=$("");this.buttonBackColor;this.height=this.width=0;this.buttonBar.css({position:"absolute",left:b?"0px":"auto",right:b?"auto":"0px"});a.append(this.buttonBar);this.buttonBar.append(this.buttonIcon);var c=this;this.buttonIcon.attr("src",b?uiBaseURL+"previous_normal.png":uiBaseURL+"next_normal.png");this.buttonIcon.load(function(){0==userConfig.shortcutButtonWidth&&0==userConfig.shortcutButtonHeight?(c.width= this.width,c.height=this.height):0==userConfig.shortcutButtonWidth?(c.width=this.width*userConfig.shortcutButtonHeight/this.height,c.height=userConfig.shortcutButtonHeight):0==userConfig.shortcutButtonHeight?(c.width=userConfig.shortcutButtonWidth,c.height=this.height*userConfig.shortcutButtonWidth/this.width):(c.width=userConfig.shortcutButtonWidth,c.height=userConfig.shortcutButtonHeight);c.buttonBar.css({width:c.width+"px",height:c.height+"px",top:(windowHeight-c.height)/2+"px"});c.buttonIcon.css({width:c.width+ "px",height:c.height+"px"})});this.buttonIcon.asImageButton();this.buttonBar.bind(_event._end,function(){b?previousPageFun():nextPageFun()});this.buttonBar.bind(_event._down,function(){3==browserType?event.cancelBubble=!0:event.stopPropagation();event.preventDefault()})}initLeftOrRightButton.prototype.onResize=function(a,b){this.buttonBar.css({width:a+"px",height:b+"px"});this.buttonIcon.css({width:a+"px",height:b+"px"});this.width=a;this.height=b;this.setPosition()}; initLeftOrRightButton.prototype.setPosition=function(){this.buttonBar.css({top:(windowHeight-this.height)/2+"px"})}; function initLeftButton(a){this.buttonBar=$("
      ");this.buttonIcon=null;this.buttonBackColor;this.height=this.width=50;this.showing=!0;this.init();0==userConfig.shortcutButtonWidth&&0==userConfig.shortcutButtonHeight?(this.width=this.width,this.height=this.height):0==userConfig.shortcutButtonWidth?(this.width=this.width*userConfig.shortcutButtonHeight/this.height,this.height=userConfig.shortcutButtonHeight):0==userConfig.shortcutButtonHeight?(this.width=userConfig.shortcutButtonWidth,this.height= this.height*userConfig.shortcutButtonWidth/this.width):(this.width=userConfig.shortcutButtonWidth,this.height=userConfig.shortcutButtonHeight);a.append(this.buttonBar);this.buttonBar.append(this.buttonIcon);this.buttonBar.css({width:this.width+"px",height:this.height+"px",top:(windowHeight-this.height)/2+"px"});this.buttonIcon.css({width:this.width+"px",height:this.height+"px"});this.buttonIcon.asImageButton();this.buttonBar.bind(_event._down,function(){browserType==3?event.cancelBubble=true:event.stopPropagation(); event.preventDefault()})}initLeftButton.prototype.init=function(){this.buttonIcon=$(getImage(toolBarIconsURL[17]));this.width=this.buttonIcon[0].width;this.height=this.buttonIcon[0].height;this.buttonBar.css({position:"absolute",left:-this.width-10+"px",right:"auto"});this.buttonBar.bind(_event._end,function(){rightToLeft?nextPageFun():previousPageFun()})}; initLeftButton.prototype.onResize=function(a,b){this.buttonBar.css({width:a+"px",height:b+"px"});this.buttonIcon.css({width:a+"px",height:b+"px"});this.width=a;this.height=b;this.setPosition()};initLeftButton.prototype.setPosition=function(){this.buttonBar.css({top:(windowHeight-this.height)/2+"px"})};initLeftButton.prototype.show=function(){this.buttonBar.animate({left:0},500)};initLeftButton.prototype.setVisible=function(a){this.showing=a;this.buttonBar.css({display:a?"block":"none"})}; function initRightButton(a){initLeftButton.call(this,a)}$.extend(initRightButton.prototype,initLeftButton.prototype);initRightButton.prototype.init=function(){this.buttonIcon=$(getImage(toolBarIconsURL[19]));this.width=this.buttonIcon[0].width;this.height=this.buttonIcon[0].height;this.buttonBar.css({position:"absolute",right:-this.width-10+"px",left:"auto"});this.buttonBar.bind(_event._end,function(){rightToLeft?previousPageFun():nextPageFun()})}; initRightButton.prototype.show=function(){this.buttonBar.animate({right:0},500)};function bookShadow(a,b,c){this.backgroun=$("
      ");this.width=a;this.height=b;$(this.backgroun).css({position:"absolute",width:this.width+"px",height:this.height+"px","-webkit-box-shadow":"0 0 15px rgba(40, 0, 0, 0.7)"});$(c).append(this.backgroun)}bookShadow.prototype.onResize=function(a,b,c){this.width=c?2*a:a;this.height=b;$(this.backgroun).css({width:this.width+"px",height:this.height+"px"})};bookShadow.prototype.setPosition=function(a,b){$(this.backgroun).css({top:b+"px",left:a+"px"})}; bookShadow.prototype.showShadow=function(){$(this.backgroun).css({"-webkit-box-shadow":"0 0 15px rgba(40, 0, 0, 0.7)"})};bookShadow.prototype.hideShadow=function(){$(this.backgroun).css({"-webkit-box-shadow":"0 0 15px rgba(40, 0, 0, 0)"})};function searchElement(a,b,c){var d=$("
      "),e=getString("searchColor","#ffff00"),f=getInt("searchAlpha",0.3);d.css({top:a.top*c+"px",left:a.left*b+"px",width:b*a.width+"px",height:c*a.height+"px","background-color":e,opacity:f});$.fn.extend(d,{onResize:function(b,c){d.css({top:a.top*c+"px",left:a.left*b+"px",width:b*a.width+"px",height:c*a.height+"px"})}});return d};function searchItem(a,b,c,d){this.width=d;this.height=85;this.background=$("
      ");this.textField=new label(b,this.background);this.mainColor="#888888";this.pageIndex=a;$(this.background).css({"background-color":this.mainColor,width:this.width+"px",height:this.height+"px",position:"absolute",border:"1px solid #555555",overflow:"hidden",cursor:"pointer"});this.textField.onResize(this.Width-20,this.height-16);this.textField.setLabelPosition(10,8);this.isMouseMove=!1;this.downPoint=Point(0,0); var e=this;$(c).append(this.background);$(this.background).bind(_event._end,function(){isSearchDrag||gotoPageFun(e.pageIndex)});this.textField.setCaption("P."+a+": "+this.cutText(b,searchWord));this.textField.riseAWord(searchWord);this.textField.setFont("13.5px","#111111",null)}searchItem.prototype.onResize=function(a,b){this.width=a;this.height=b;$(this.background).css({width:a+"px",height:b+"px"});this.textField.onResize(a-20,b-16)}; searchItem.prototype.setPosition=function(a,b){$(this.background).css({top:b+"px",left:a+"px"})};searchItem.prototype.getWidth=function(){return this.width};searchItem.prototype.getHeight=function(){return this.height}; searchItem.prototype.cutText=function(a,b){if(120>a.length||""==b)return a;var c=a.length,d=a.toLowerCase().indexOf(b.toLowerCase()),e;60<=d?(e=Math.max(60<=c-d?d-60:c-120,0),e=".."+a.substring(e,d)):e=a.substring(0,d);c=60');this.formConfig=$.extend({width:this.width,height:this.height,mainColor:this.mainColor},a);this.create();$(b).append(this.background);this.visible=!1} form.prototype.create=function(){$(this).data();var a=this,b=colorDiv(this.formConfig.mainColor,50);this.titleBox=$('
      ');this.contentBox=$('
      ');this.background.append(this.titleBox);this.background.append(this.contentBox);this.background.css({"background-color":this.formConfig.mainColor,"-webkit-border-radius":"5px","-moz-border-radius":"5px","border-radius":"5px",width:this.formConfig.width+ "px",height:this.formConfig.height+"px","-webkit-box-shadow":"0 0 5px rgba(40, 0, 0, 0.5)"});this.titleBox.css({"background-color":b,"-webkit-border-radius":"5px","-moz-border-radius":"5px","border-radius":"5px",width:this.formConfig.width+"px",height:"35px"});this.contentBox.css({top:"35px",left:"0px",width:this.formConfig.width+"px",height:this.formConfig.height-35+"px"});this.initTitleBox();this.drapable=!1;this.formPositionY=this.formPositionX=this.mouseDownPointY=this.mouseDownPointX=0;$(this.titleBox).bind(_event._down, function(b){var d=a.titleBox[0];d.setCapture?d.setCapture():window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);b=isTouch?b.originalEvent.touches:[b];a.drapable=!0;a.mouseDownPointX=b[0].pageX;a.mouseDownPointY=b[0].pageY;a.formPositionX=$(a.titleBox).offset().left;a.formPositionY=$(a.titleBox).offset().top;return!1});$(this.titleBox).bind(_event._end,function(){var b=a.titleBox[0];b.releaseCapture?b.releaseCapture():window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);return a.drapable=!1});$(this.titleBox).bind(_event._move, function(b){b=isTouch?b.originalEvent.touches:[b];if(a.drapable){var d=b[0].pageX-a.mouseDownPointX,b=b[0].pageY-a.mouseDownPointY;$(a.background).css({left:a.formPositionX+d+"px",top:a.formPositionY+b+"px"})}return!1});$(this.titleBox).bind("mouseleave",function(){return a.drapable=!1});$(this.background).bind(_event._down,function(){3==browserType?event.cancelBubble=!0:event.stopPropagation()});$(this.background).bind(_event._move,function(){});$(this.background).bind(_event._end,function(){})}; form.prototype.initTitleBox=function(){$(this).data();this.captionBox=new label(this.formConfig.caption,this.titleBox);this.closeButton=new button(1,this.titleBox,{iconURL:this.formConfig.closeIconURL},!0);this.captionBox.setLabelPosition(5,(30-this.captionBox.getHeight())/2);this.closeButton.setButtonPosition(35,3,["right","top"]);this.closeButton.onMouseUp(this,this.closeForm)};form.prototype.getWidth=function(){return this.width}; form.prototype.setWidth=function(a){$(this).data();this.width=a;100>a&&(this.width=100);this.background.css({width:this.width+"px"});this.contentBox.css({width:this.width+"px"});this.titleBox.css({width:this.width+"px"})};form.prototype.getHeight=function(){return this.height};form.prototype.setHeight=function(a){$(this).data();this.height=a;100>=a&&(this.height=100);this.background.css({height:this.height+"px"});this.contentBox.css({height:this.height-this.titleBox.height()+"px"})}; form.prototype.onResize=function(a,b){this.setWidth(a);this.setHeight(b)};form.prototype.setColor=function(){};form.prototype.closeForm=function(){$(this.background).css({display:"none"})};form.prototype.setCaption=function(a){this.formConfig.caption=a;this.captionBox.setCaption(a)};var searchWord="",searchPageArr=[],isSearchDrag=!1; function searchForm(a,b){form.call(this,a,b);this.textField=$('');this.searchButton=new button(1,this.contentBox,{iconURL:uiBaseURL+"searchButton.png"});this.textField.css({top:"9px",left:"5px",width:"160px"});this.searchButton.setButtonPosition(190,5);this.searchItemsBox=$("
      ");this.searchScrollBox=$("
      ");this.lblSearchTotalItem=new label(" ",this.contentBox);this.lblSearchTotalItem.setFont("14px", "#000000",null);this.itemArr=[];this.contentBox.append(this.textField);this.contentBox.append(this.searchScrollBox);void 0==window.textForPages&&(window.textForPages=[]);this.searchScrollBox.css({position:"absolute",width:this.width-10+"px",height:this.height-95+"px","overflow-y":"auto",top:"55px",left:"5px"});this.lblSearchTotalItem.setLabelPosition(15,34);this.background.css({top:"0px",left:-(windowWidth/2+20)+"px","z-index":100,opacity:0.95});this.initEvent();this.captionBox.setFont("15px","#f0f0f0", null);this.captionBox.setCaption("Search");this.mouseDownY=-1;this.scrollMouseDown=!1}$.extend(searchForm.prototype,form.prototype); $.extend(searchForm.prototype,{initEvent:function(){this.titleBox.unbind(_event._down);this.titleBox.unbind(_event._move);this.titleBox.unbind(_event._end);var a=this;this.searchButton.onMouseUp(this,this.searchStart);this.textField.bind("keydown",function(b){13==b.keyCode&&a.searchStart()});this.contentBox.bind(_event._down,function(b){a.scrollMouseDown=!0;isSearchDrag=!1;b=isTouch?b.originalEvent.touches:[b];a.mouseDownY=b[0].pageY});this.contentBox.bind(_event._move,function(b){a.scrollMouseDown&& (b=isTouch?b.originalEvent.touches:[b],20a?100:a;this.height=100>b?100:b;this.background.css({width:this.width+"px", height:this.height+"px"});this.titleBox.css({width:this.width+"px"});this.contentBox.css({width:this.width+"px",height:this.height-$(this.titleBox).height()+"px"});this.searchItemsBox.css({width:this.width-10+"px",height:this.height-95+"px"});this.searchScrollBox.css({width:this.width-10+"px",height:this.height-95+"px"})},onResize:function(a,b){this.width=100>a?100:a;this.height=100>b?100:b;this.background.css({width:this.width+"px",height:this.height+"px",left:(this.isSearchShow?0:-this.width-20)+ "px"});this.titleBox.css({width:this.width+"px"});this.contentBox.css({width:this.width+"px",height:this.height-$(this.titleBox).height()+"px"});this.searchItemsBox.css({width:this.width-10+"px",height:this.height-95+"px"});this.searchScrollBox.css({width:this.width-10+"px",height:this.height-95+"px"});this.textField.css({width:this.width-90+"px"});this.searchButton.setButtonPosition(this.width-73,5);for(var c=0;ca&&this.background.css({left:a-320+"px"})},isSearchShow:!1});function bookMarkTab(a,b,c,d){this.fnShow=b;this.fnHide=c;this.maxWidth=d?d:300;this.config=$.extend({caption:"",color:"#888"},a);if(this.config.pageIndex&&!(""==this.config.caption||this.config.pageIndex>originTotalPageCount))this.bg=$("
      "),this.caption=new label(this.config.caption,this.bg),this.width=this.caption.getWidth()+30,this.width=this.width>this.maxWidth?this.maxWidth:this.width,this.height=60,this.hiding=this.showing=!1,this.bg.css({position:"absolute",width:this.width+"px", height:this.height+"px","background-color":this.config.color,"-webkit-border-radius":"6px","-moz-border-radius":"6px","-o-border-radius":"6px","-ms-border-radius":"6px","border-radius":"6px",border:"1px solid #000",cursor:"pointer"}),this.bg.append(this.caption),this.caption.setLabelPosition(5,8),this.initEvent()}bookMarkTab.prototype.resize=function(a,b){a>this.maxWidth&&(a=this.maxWidth);this.width=a;this.height=b;this.bg.css({width:a+"px",height:b+"px"})}; bookMarkTab.prototype.setPosition=function(a,b,c){c?this.bg.css({top:b+"px",right:a+"px",left:"auto"}):this.bg.css({top:b+"px",left:a+"px",right:"auto"})};bookMarkTab.prototype.show=function(){if(!this.showing){this.showing=!0;var a=this;this.bg.animate({top:0},150,function(){a.showing=!1})}};bookMarkTab.prototype.hide=function(){if(!this.hiding){this.hiding=!0;var a=this;this.bg.animate({top:30},150,function(){a.hiding=!1})}}; bookMarkTab.prototype.setMaxWidth=function(a){this.maxWidth=a;this.resize(this.width,this.height)};bookMarkTab.prototype.getWidth=function(){return this.width};bookMarkTab.prototype.initEvent=function(){var a=this;this.bg.bind("mouseover",function(){a.show()});this.bg.bind("mouseleave",function(){a.hide()});this.bg.bind(_event._down,function(){gotoPageFun(a.config.pageIndex)})};function tabBox(a){this.tabArray=[];this.bg=$("
      ");this.width=400;this.height=60;this.tipBoxHeight=this.tipBoxWidth=70;this.bg.css({position:"absolute",width:this.width+"px",height:this.height+"px",overflow:"hidden","z-index":20});a.append(this.bg)}tabBox.prototype.resize=function(a,b,c){this.width=a;this.height=b;this.bg.css({width:this.width+"px",height:this.height+"px"});this.setTabPosition(c)};tabBox.prototype.setPosition=function(a,b){this.bg.css({left:a+"px",top:b+"px"})}; tabBox.prototype.rotate=function(a){a=rotate(a);this.bg.css({"-webkit-transform-origin":"0% 0%","-moz-transform-origin":"0% 0%","-ms-transform-origin":"0% 0%","-o-transform-origin":"0% 0%","-webkit-transform":a,"-moz-transform":a,"-ms-transform":a,"-o-transform":a})};tabBox.prototype.show=function(){this.bg.css({display:"block"})};tabBox.prototype.hide=function(){this.bg.css({display:"none"})};tabBox.prototype.setItem=function(a){this.tabArray=a||[];this.setTabPosition()}; tabBox.prototype.initItem=function(a){for(var b=0;b");this.tipImg=$("");this.tipLabel=new label("page 1",this.tipBox);a.append(this.tipBox);this.tipBox.append(this.tipImg);this.tipBoxHeight=this.tipBoxWidth=70;this.tipBox.css({width:this.tipBoxWidth+"px",height:this.tipBoxHeight+"px",position:"absolute",left:(windowWidth-this.tipBoxWidth)/2+"px",top:(windowHeight- this.tipBoxHeight)/2-200+"px",opacity:0,"z-index":10});this.tipImg.attr({src:""});this.tipLabel.setLabelPosition(5,this.tipBoxHeight-25);0!=bmtConfig.length&&(this.setPosition(),this.initItem())}initBookMarkTab.prototype.resize=function(a,b){this.leftBox.resize(a,b,!0);this.rightBox.resize(a,b,!1);this.setPosition()};initBookMarkTab.prototype.setPosition=function(){this.leftBox.setPosition(-60,flipBook.height);this.rightBox.setPosition(flipBook.width+60,0);this.leftBox.rotate(-90);this.rightBox.rotate(90)}; initBookMarkTab.prototype.initItem=function(){for(var a=0;a=a?this.leftTabArr.push(this.tabArray[b]):this.rightTabArr.push(this.tabArray[b]);else for(b=0;b=a?this.rightTabArr.push(this.tabArray[b]):this.leftTabArr.push(this.tabArray[b]);this.leftBox.tabArray=this.leftTabArr;this.rightBox.tabArray=this.rightTabArr;this.leftBox.initItem(!0); this.rightBox.initItem(!1)};initBookMarkTab.prototype.show=function(){this.leftBox.show();this.rightBox.show()};initBookMarkTab.prototype.hide=function(){this.leftBox.hide();this.rightBox.hide()};function shareButton(a,b){this.config=$.extend({iconURL:"",caption:"",link:""},b);this.bg=$("
      ");this.icon=$("");this.caption=new label(this.config.caption,this.bg);this.width=200;this.height=40;this.bg.css({position:"absolute",width:this.width+"px",height:this.height+"px","-webkit-border-radius":"6px","-moz-border-radius":"6px","-o-border-radius":"6px","-ms-border-radius":"6px","border-radius":"6px","background-color":"#666666"});this.icon.attr({src:this.config.iconURL});this.icon.css({position:"absolute", left:"5px",top:"-7px"});a.append(this.bg);this.bg.append(this.icon);this.caption.setLabelPosition(40,10);this.initEvent()}shareButton.prototype.onResize=function(a,b){this.bg.css({width:a+"px",height:b+"px"})};shareButton.prototype.initEvent=function(){this.bg.css({cursor:"pointer"});var a=this;this.bg.bind(_event._down,function(){window.open(a.config.link,"_blank")})};shareButton.prototype.setPosition=function(a,b){this.bg.css({left:a+"px",top:b+"px"})};function shareForm(a,b){form.call(this,a,b);this.visible=!1;this.itemArray=[];(this.isConfigItem=window.socialShareConfig)?this.addConfigItem():(this.addItem(),this.setButtonPos());this.background.css({left:-windowWidth/2-20+"px",overflow:"hidden"})}$.extend(shareForm.prototype,form.prototype); shareForm.prototype.addItem=function(){var a=window.location.href,b=window.document.title,c=window.location.pathname,c=c.substring(0,c.lastIndexOf("/"))+"/files/thumb/1.jpg",a="?&url="+a+"&title="+b+"&description="+bookDescription+"&screenshot="+c,b={iconURL:uiBaseURL+"facebook.png",caption:"Facebook",link:"http://api.addthis.com/oexchange/0.8/forward/facebook/offer"+a},c={iconURL:uiBaseURL+"google.png",caption:"Google+",link:"http://api.addthis.com/oexchange/0.8/forward/igoogle/offer"+a},d={iconURL:uiBaseURL+ "myspace.png",caption:"MySpace",link:"http://api.addthis.com/oexchange/0.8/forward/myspace/offer"+a},e={iconURL:uiBaseURL+"twitter.png",caption:"Twitter",link:"http://api.addthis.com/oexchange/0.8/forward/twitter/offer"+a},f={iconURL:uiBaseURL+"digg.png",caption:"Digg",link:"http://api.addthis.com/oexchange/0.8/forward/digg/offer"+a},h={iconURL:uiBaseURL+"more.png",caption:"More",link:"http://api.addthis.com/oexchange/0.8/offer"+a};this.emailButton=new shareButton(this.contentBox,{iconURL:uiBaseURL+ "email.png",caption:"Email",link:"http://api.addthis.com/oexchange/0.8/forward/email/offer"+a});this.fbButton=new shareButton(this.contentBox,b);this.ggButton=new shareButton(this.contentBox,c);this.msButton=new shareButton(this.contentBox,d);this.twButton=new shareButton(this.contentBox,e);this.diggButton=new shareButton(this.contentBox,f);this.moreButton=new shareButton(this.contentBox,h)}; shareForm.prototype.onResize=function(a,b){this.width=100>a?100:a;this.height=100>b?100:b;this.background.css({width:this.width+"px",height:this.height+"px",left:this.visible?"0px":-this.width-20+"px"});this.titleBox.css({width:this.width+"px"});this.contentBox.css({width:this.width+"px",height:this.height-this.titleBox.height()+"px"});if(this.isConfigItem)for(var c=0;c');this.contentBox=$('
      ');this.textField=new label(this.config.caption,this.contentBox);this.expandButton=new button(1,this.contentBox,{iconURL:uiBaseURL+"closed.png"},!1,!0);this.children=[];this.opened=this.hasChild=!1;this.totalHeight=0;this.textField.shortWord(25); this.isDrag=!1;this.expandButton.setVisible(!1);$(b).append(this.background);$(this.background).append(this.contentBox);this.expandButton.setButtonPosition(0,0);this.textField.setLabelPosition(38,10);$(this.contentBox).css({width:this.config.width-(12*(this.config.level-1)+30)+"px",height:this.config.height+"px",left:12*(this.config.level-1)+5+"px",cursor:"pointer"});$(this.background).css({width:this.config.width-25+"px",height:this.config.height+"px",left:"16px",top:"10px","background-color":this.config.backColor, "border-left":"1px solid #555555","border-right":"1px solid #555555","border-bottom":"1px solid #555555"});this.expandButton.onMouseUp(this,this.onExpand);$(this.contentBox).bind(_event._end,function(){isBookmarkDrag||gotoPageFun(c.config.page);$(c.background).css({"background-color":c.config.backColor})});$(this.contentBox).bind(_event._down,function(){var a=colorDiv(c.config.backColor,60);$(c.background).css({"background-color":a})});$(this.contentBox).bind("mouseleave",function(){$(c.background).css({"background-color":c.config.backColor})})} treeNode.prototype.setBorderTop=function(){$(this.background).css("border-top","1px solid #555555")};treeNode.prototype.setButtonVisible=function(a){this.expandButton.setVisible(a)};treeNode.prototype.setHasChildren=function(a){this.hasChild=a};treeNode.prototype.setVisible=function(a){$(this.background).css({display:a?"block":"none"})};treeNode.prototype.getIsExpand=function(){return this.opened};treeNode.prototype.setIsExpand=function(a){this.opened=a};treeNode.prototype.getBackground=function(){return this.background}; treeNode.prototype.getWidth=function(){return this.config.width};treeNode.prototype.getHeight=function(){return this.config.height};treeNode.prototype.setCaption=function(a){this.config.caption=a};treeNode.prototype.setColor=function(){};treeNode.prototype.setPosition=function(a,b,c){void 0==c&&(c=["left","top"]);$(this.background).css(c[0],a+"px");$(this.background).css(c[1],b+"px")}; treeNode.prototype.onResize=function(a,b){this.config.width=a;b&&(this.config.height=b);this.background.css({width:this.config.width+"px",height:this.config.height+"px"})};treeNode.prototype.getTotalHeight=function(){return this.totalHeight};treeNode.prototype.expand=function(){if(this.hasChild){this.expandButton.changeIcon(uiBaseURL+"opened.png");for(var a=0;a');this.scrollBox=$('
      ');this.scrollMouseDown=!1;this.mouseDownY=-1;this.showing=!1;this.itemArr=[];$(this.contentBox).append(this.scrollMask);$(this.scrollMask).append(this.scrollBox);this.captionBox.setFont("15px","#f0f0f0",null);this.captionBox.setCaption("Table of Content");this.initScrollEvent(); try{this.addContent(ols,!1)}catch(c){$("#btnBookmark").css({display:"none"}),bookmarkButtonEnable=!1}this.background.css({opacity:0.95,"z-index":99,top:"0px",left:-(windowWidth/2+20)+"px"});this.titleBox.unbind(_event._down);this.titleBox.unbind(_event._move);this.titleBox.unbind(_event._end)}$.extend(tableContent.prototype,form.prototype); tableContent.prototype.addContent=function(a,b,c){for(var d=0;da?100:a;this.height=100>b?100:b;this.showing||this.background.css({left:-(this.width+20)+"px"});this.background.css({width:this.width+"px",height:this.height+"px"});this.contentBox.css({width:this.width+"px",height:this.height-this.titleBox.height()+"px"});this.titleBox.css({width:this.width+"px"});$(this.scrollMask).css({width:this.width+"px",height:this.height-this.titleBox.height()+"px"});$(this.scrollBox).css({width:this.width+"px", height:this.height-this.titleBox.height()-15+"px"});for(var c=0;c");this.logoBar=$("
      ");this.buttonBar=$("
      ");this.btnLast=$("
      ");this.btnNext=$("
      ");this.btnPrevious=$("
      "); this.edtPageNumber=$("
      ");this.btnFirst=$("
      ");this.btnZoom=$("
      ");this.btnAutoPlay=$("
      ");this.btnThumb=$("
      ");this.btnShare= $("
      ");this.btnSearch=$("
      ");this.btnBookMark=$("
      ");this.btnDownload=$("
      ");this.btnSound=$("
      ");this.btnHome=$("
      ");this.btnChangeLanguage=$("
      "); a.append(this.toolBG);this.toolBG.append(this.logoBar);this.toolBG.append(this.buttonBar);this.buttonBar.append(this.btnLast);this.buttonBar.append(this.btnNext);this.buttonBar.append(this.edtPageNumber);this.buttonBar.append(this.btnPrevious);this.buttonBar.append(this.btnFirst);this.buttonBar.append(this.btnZoom);this.buttonBar.append(this.btnAutoPlay);this.buttonBar.append(this.btnThumb);this.buttonBar.append(this.btnShare);this.buttonBar.append(this.btnSearch);this.buttonBar.append(this.btnBookMark); this.buttonBar.append(this.btnDownload);this.buttonBar.append(this.btnSound);this.buttonBar.append(this.btnHome);this.buttonBar.append(this.btnChangeLanguage);this.toolBG.append(getImage(toolBarIconsURL[0]));this.btnLast.append(getImage(toolBarIconsURL[1])).asButton().attr("title",getLanguage("btnLastPage","Last"));this.btnNext.append(getImage(toolBarIconsURL[2])).asButton().attr("title",getLanguage("btnNextPage","Next"));this.btnPrevious.append(getImage(toolBarIconsURL[3])).asButton().attr("title", getLanguage("btnPrePage","Previous"));this.btnFirst.append(getImage(toolBarIconsURL[4])).asButton().attr("title",getLanguage("btnFirstPage","First"));this.btnZoom.append(getImage(toolBarIconsURL[5])).asButton().attr("title",getLanguage("btnZoomIn","Zoom In"));this.btnAutoPlay.append(getImage(toolBarIconsURL[7])).asButton().attr("title",getLanguage("btnAutoFlip","Auto Flip"));this.btnThumb.append(getImage(toolBarIconsURL[9])).asButton().attr("title",getLanguage("btnThumb","Thumbnails"));this.btnShare.append(getImage(toolBarIconsURL[10])).asButton().attr("title", getLanguage("btnSocialShare","Share"));this.btnSearch.append(getImage(toolBarIconsURL[11])).asButton().attr("title",getLanguage("btnSearch","Search"));this.btnBookMark.append(getImage(toolBarIconsURL[14])).asButton().attr("title",getLanguage("btnBookMark","Book Mark"));this.btnDownload.append(getImage(toolBarIconsURL[12])).asButton().attr("title",getLanguage("btnDownload","Download"));this.btnHome.append(getImage(toolBarIconsURL[13])).asButton().attr("title",getLanguage("btnLastPage","Last"));this.btnChangeLanguage.append($("")).asButton().attr("title",getLanguage("btnChangeLanguage","Change Language"));rightToLeft&&(this.btnFirst.attr({title:getLanguage("btnLastPage","Last")}),this.btnLast.attr({title:getLanguage("btnFirstPage","First")}),this.btnNext.attr({title:getLanguage("btnPrePage","Previous")}),this.btnPrevious.attr({title:getLanguage("btnNextPage","Next")}));getBool("autoPlayAutoStart",!1)&&(this.btnAutoPlay.empty().append(getImage(toolBarIconsURL[8])),this.btnAutoPlay.attr("title",getLanguage("btnStopAutoFlip", "Stop Auto Flip")));thumbnail=new thumbnailBar(tmpContainer);initLogoBar();userConfig.autoPlayButtonVisible||this.btnAutoPlay.css("display","none");zoomButtonEnable||this.btnZoom.css("display","none");thumbButtonEnable||this.btnThumb.css("display","none");shareButtonEnable||this.btnShare.css("display","none");searchButtonEnable||this.btnSearch.css("display","none");bookmarkButtonEnable||this.btnBookMark.css("display","none");userConfig.downloadButtonVisible||this.btnDownload.css({display:"none"}); userConfig.homeButtonVisible||this.btnHome.css({display:"none"});userConfig.languageButtonVisible||this.btnChangeLanguage.css({display:"none"});userConfig.languageButtonVisible&&(languageBar=new languageList(tmpContainer));this.initEvent()} loadToolBar.prototype.setButtonPosition=function(){var a=45,b=3,c=!1;600>window.innerWidth&&(c=!0,a=40);$(getImage(toolBarIconsURL[0])).css({width:windowWidth+"px",height:"42px"});c?this.btnLast.css({display:"none"}):(this.btnLast.css({display:"block"}),this.btnLast.css({right:b+"px"}),b+=a);this.btnNext.css({right:b+"px"});b+=a;c?this.edtPageNumber.css({display:"none"}):(this.edtPageNumber.css({display:"block"}),this.edtPageNumber.css({right:b-3+"px"}),b=b+this.edtPageNumber.width()+3);this.btnPrevious.css({right:b+ "px"});b+=a;c?this.btnFirst.css({display:"none"}):(this.btnFirst.css({display:"block"}),this.btnFirst.css({right:b+"px"}),b+=a);zoomButtonEnable&&(this.btnZoom.css({top:"2px",right:b+"px"}),b+=a);userConfig.autoPlayButtonVisible&&(this.btnAutoPlay.css({top:"2px",right:b+"px"}),b+=a);thumbButtonEnable&&(this.btnThumb.css({top:"2px",right:b+"px"}),b+=a);shareButtonEnable&&(this.btnShare.css({top:"2px",right:b+"px"}),b+=a);searchButtonEnable&&(this.btnSearch.css({top:"2px",right:b+"px"}),b+=a);bookmarkButtonEnable&& (this.btnBookMark.css({top:"2px",right:b+"px"}),b+=a);userConfig.downloadButtonVisible&&(this.btnDownload.css({top:"2px",right:b+"px"}),b+=a);userConfig.homeButtonVisible&&(this.btnHome.css({top:"2px",right:b+"px"}),b+=a);userConfig.languageButtonVisible&&(this.btnChangeLanguage.css({top:"2px",right:b+"px"}),null!=languageBar&&languageBar.setPosition(b-70,40,["right","bottom"]))}; loadToolBar.prototype.show=function(){var a=this;this.toolBG.animate({bottom:0,opacity:0.95},500,function(){a.visible=!0})};loadToolBar.prototype.hide=function(){var a=this;this.toolBG.animate({bottom:-50,opacity:0},300,function(){a.visible=!1})}; loadToolBar.prototype.initEvent=function(){var a=this;this.btnLast.bind(_event._end,function(){a.lastPage()});this.btnNext.bind(_event._end,function(){a.nextPage()});this.btnPrevious.bind(_event._end,function(){a.prePage()});this.btnFirst.bind(_event._end,function(){a.firstPage()});this.btnZoom.bind(_event._end,function(){2==bookType?(windowWidth=language.length?(userConfig.languageButtonVisible=!1,languageBar=null):(this.showing=!1,this.width=120,this.height=80,this.color="#808080",this.buttonArray=[],this.bg=$("
      "),this.bg.css({display:"none",position:"absolute",width:this.width+"px",height:this.height+"px","background-color":this.color,"-webkit-box-shadow":"0 0 5px rgba(40, 0, 0, 0.8)","-moz-box-shadow":"0 0 5px rgba(40, 0, 0, 0.5)","-o-box-shadow":"0 0 5px rgba(40, 0, 0, 0.5)","-ms-box-shadow":"0 0 5px rgba(40, 0, 0, 0.5)", "box-shadow":"0 0 5px rgba(40, 0, 0, 0.5)"}),a.append(this.bg),this.addButton())}languageList.prototype.setPosition=function(a,b,c){c||(c=["left","top"]);this.bg.css(c[0],a+"px");this.bg.css(c[1],b+"px")};languageList.prototype.addButton=function(){for(var a=0;a");this.width=110;this.height=25;this.color=c;this.bg.css({position:"absolute",width:this.width+"px",height:this.height+"px"});this.caption=b;this.captionLabel=new label(this.caption,this.bg);this.captionLabel.setLabelPosition(5,2);a.append(this.bg);this.initEvent()} languageButton.prototype.setPosition=function(a,b,c){c||(c=["left","top"]);this.bg.css(c[0],a+"px");this.bg.css(c[1],b+"px")};languageButton.prototype.resize=function(a,b){this.bg.css({width:a+"px",height:b+"px"})}; languageButton.prototype.initEvent=function(){var a=this;this.bg.bind(_event._down,function(){changeLanguage(a.caption);languageBar.hide();if(isTouch){var b=colorDiv(a.color,40);a.bg.css("background-color",b)}});this.bg.bind("mouseover",function(){var b=colorDiv(a.color,40);a.bg.css("background-color",b)});this.bg.bind("mouseleave",function(){a.bg.css("background-color",a.color)});this.bg.bind(_event._end,function(){isTouch&&a.bg.css("background-color",a.color)})};function thumbnailCell(a){this.background=$("
      ");this.img=$("");this.pageIndex=-1;this.width=130;this.height=170;this.pageTextField=new label(1,this.background);this.imgHeight=this.imgWidth=-1;$(a).append(this.background);$(this.background).css({position:"absolute",width:this.width+"px",height:this.height+"px"});$(this.img).css({position:"absolute"});this.pageTextField.setFont("12px","#f0f0f0",null);this.pageTextField.setLabelPosition((this.width-this.pageTextField.getWidth())/2, 0,["left","bottom"])}thumbnailCell.prototype.getPageIndex=function(){return this.pageIndex};thumbnailCell.prototype.getWidth=function(){return this.width};thumbnailCell.prototype.getHeight=function(){return this.height};thumbnailCell.prototype.setPosition=function(a,b,c){void 0==c&&(c=["left","top"]);$(this.background).css(c[0],a+"px");$(this.background).css(c[1],b+"px")};thumbnailCell.prototype.onResize=function(a,b){$(this.background).css({width:a+"px",height:b+"px"});this.onResizeImage(a,b)}; thumbnailCell.prototype.onResizeImage=function(){var a=getPageWidthHeight(this.width,this.height-20,zoomPageWidth,zoomPageHeight);this.imgWidth=a.x;this.imgHeight=a.y;$(this.img).css({width:a.x+"px",height:a.y+"px"});$(this.img).css({left:(this.width-a.x)/2+"px",top:(this.height-20-a.y)/2+4+"px"})}; thumbnailCell.prototype.setImgPosition=function(a){switch(a){case "l":$(this.img).css({left:"0px",right:"auto"});break;case "r":$(this.img).css({right:"0px",left:"auto"});break;case "c":$(this.img).css({left:(this.width-this.imgWidth)/2+"px",right:"auto"})}};thumbnailCell.prototype.setCaption=function(a){this.pageTextField.setCaption(a)}; thumbnailCell.prototype.fillImage=function(a){this.pageIndex=a;$(this.img).attr("src",getPageDir(a,"thumb"));$(this.background).append(this.img);this.onResizeImage(this.width,this.height);this.pageTextField.setCaption(a)};thumbnailCell.prototype.showBorder=function(){$(this.background).css({border:"1px solid #444444"})};thumbnailCell.prototype.hideBorder=function(){$(this.background)[0].style.border=""};thumbnailCell.prototype.getTextField=function(){return this.pageTextField}; thumbnailCell.prototype.hideTextField=function(){this.pageTextField.setCSS({display:"none"})};thumbnailCell.prototype.showTextField=function(){this.pageTextField.setCSS({display:"block"})};thumbnailCell.prototype.showCell=function(a){$(this.background).css({display:a?"block":"none"})};thumbnailCell.prototype.onMouseUp=function(a,b){var c=this;$(this.background).bind(_event._end,function(){b.call(a,c)})};thumbnailCell.prototype.highLight=function(a){$(this.background).css({"background-color":a})}; thumbnailCell.prototype.clearHighLight=function(){$(this.background).css({"background-color":""})};function thumbnailItem(a,b){this.background=$("
      ");this.itemB=new thumbnailCell(this.background);this.itemA=new thumbnailCell(this.background);this.width=260;this.height=170;this.isMerge=this.isDoublePage=!0;this.pageIndex=b;this.fillImage=!1;this.mainColor="#888888";this.textField=new label(b+"-"+(b+1),this.background);this.textField.setLabelPosition((this.width-this.textField.getWidth())/2,0,["left","bottom"]);this.textField.setFont("12px","#f0f0f0",null);$(a).append(this.background); $(this.background).css({position:"absolute",border:"1px solid #555555",width:this.width+"px",height:this.height+"px"});1!=b&&b!=totalPageCount?(this.itemA.setPosition(0,0),this.itemB.setPosition(0,0,["right","top"]),this.itemB.onMouseUp(this,this.onItemMouseUp)):(this.itemA.setPosition(0,0),this.itemB.showCell(!1),this.textField.setCSS({display:"none"}),this.setBorder(!1));this.itemA.onMouseUp(this,this.onItemMouseUp)}thumbnailItem.prototype.getWidth=function(){return this.width}; thumbnailItem.prototype.addImage=function(){this.fillImage||(this.itemA.fillImage(this.pageIndex),1!=this.pageIndex&&this.pageIndex!=totalPageCount&&this.itemB.fillImage(this.pageIndex+1),this.fillImage=!0)};thumbnailItem.prototype.setPosition=function(a,b,c){void 0==c&&(c=["left","top"]);$(this.background).css(c[0],a+"px");$(this.background).css(c[1],b+"px")};thumbnailItem.prototype.onResize=function(a,b){this.width=a;this.height=b;$(this.background).css({width:a+"px",height:b+"px"})}; thumbnailItem.prototype.resetItem=function(){};thumbnailItem.prototype.fission=function(){1==this.pageIndex||this.pageIndex==totalPageCount||(this.setBorder(!1),this.itemA.setImgPosition("c"),this.itemB.setImgPosition("c"),this.showTextField(!1),this.isMerge=!1,this.onResize(this.width+10,170))}; thumbnailItem.prototype.merge=function(){1==this.pageIndex||this.pageIndex==totalPageCount||(this.setBorder(!0),this.itemA.setImgPosition("r"),this.itemB.setImgPosition("l"),this.showTextField(!0),this.isMerge=!0,this.onResize(this.width,170))};thumbnailItem.prototype.showBorder=function(){$(this.background).css({border:"1px solid #444444"})};thumbnailItem.prototype.hideBorder=function(){$(this.background)[0].style.border=""}; thumbnailItem.prototype.showTextField=function(a){var b=a?"none":"block";this.textField.setCSS({display:a?"block":"none"});this.itemA.getTextField().setCSS({display:b});this.itemB.getTextField().setCSS({display:b})};thumbnailItem.prototype.setBorder=function(a){a?($(this.background).css({border:"1px solid #444444"}),this.itemA.hideBorder(),this.itemB.hideBorder()):($(this.background)[0].style.border="",this.itemA.showBorder(),this.itemB.showBorder())}; thumbnailItem.prototype.onItemMouseUp=function(a){isThumbDrag||(a=a.getPageIndex(),gotoPageFun(a))};thumbnailItem.prototype.highLight=function(a){var b=colorDiv(this.mainColor,50);this.isMerge?1==a||a==totalPageCount?this.itemA.highLight(b):$(this.background).css({"background-color":b}):a==this.pageIndex?this.itemA.highLight(b):this.itemB.highLight(b)};thumbnailItem.prototype.clearHighLight=function(){$(this.background).css({"background-color":""});this.itemA.clearHighLight();this.itemB.clearHighLight()};var isThumbDrag=!1; function thumbnailBar(a){this.background=$("
      ");this.contentBox=$("
      ");this.scrollBox=$("
      ");this.mouseDown=this.showing=!1;this.scrollBoxX=this.mouseDownX=-1;this.width=800;this.height=210;this.mainColor="#888888";this.thumbArray=[];this.lastMoveTime=this.lastMoveX=-1;this.mergeing=this.moveLeft=!1;$(this.contentBox).css({"-webkit-box-shadow":"0 0 5px rgba(40, 0, 0, 0.5)","-moz-box-shadow":"0 0 5px rgba(40, 0, 0, 0.5)","-o-box-shadow":"0 0 5px rgba(40, 0, 0, 0.5)", "box-shadow":"0 0 5px rgba(40, 0, 0, 0.5)"});this.background.css({height:this.height+"px",bottom:-(this.height+10)+"px"});this.contentBox.css({height:this.height-10+"px"});this.scrollBox.css({height:this.height-26+"px"});$(a).append(this.background);$(this.background).append(this.contentBox);$(this.contentBox).append(this.scrollBox);this.closeButton=new button(1,this.background,{iconURL:uiBaseURL+"close.png"},!0);this.closeButton.setButtonPosition(5,0,["right","top"]);this.addItem();this.initEvent(); this.setHighLight(1);this.currentCellIndex=1;this.fillNearByImages(0)}thumbnailBar.prototype.onResize=function(){var a=$(this.background).width(),b=$(this.scrollBox).width();if(a>b)$(this.scrollBox).css({left:(a-b)/2+"px"});else{var c=$(this.scrollBox).offset().left;0$(a.scrollBox).width()||(c=a.scrollBoxX-c,0b[0].pageX?!0:!1,a.lastMoveX=b[0].pageX,a.lastMoveTime=(new Date).getTime())}});$(this.contentBox).bind(_event._end,function(){a.mouseDown=!1;if(100>(new Date).getTime()-a.lastMoveTime&&-1!=a.lastMoveTime){var b=a.moveLeft?-30:30;a.tweener($(a.scrollBox).offset().left, b,10)}});$(this.contentBox).bind("mouseleave",function(){a.mouseDown=!1})}; thumbnailBar.prototype.setHighLight=function(a){this.currentCellIndex=a;var b=Math.floor(a/2);if(!(a>originTotalPageCount))if(this.thumbArray[b].highLight(a),$(this.background).width()>$(this.scrollBox).width())$(this.scrollBox).css({left:($(this.background).width()-$(this.scrollBox).width())/2+"px"});else{var a=$(this.scrollBox).offset().left,c=$(this.background).width(),d=(b-1)*(this.thumbArray[b].getWidth()+5)+75,b=this.thumbArray[b].getWidth();this.tweener(a,-(d+a-(c-b)/2)/6,6)}}; thumbnailBar.prototype.clearHighLight=function(){for(var a=0;a=c&&(window.clearInterval(j),h.fillNearByImages(e))},30)}; thumbnailBar.prototype.fillNearByImages=function(a){var b=Math.ceil(this.background.width()/65)+2;this.background.width()>this.scrollBox.width()?(a=0,b=originTotalPageCount+1):a=0==a?0:a==this.background.width()-this.scrollBox.width()?originTotalPageCount-b:this.currentCellIndex-Math.ceil(b/2);for(var a=Math.ceil(a/2),c,d=0;d"),d=pageEditor[a-1][b].action;void 0!=d.length&&(d=d[0]);var e=d.url;null!=e&&"www."==e.substr(0,4).toLowerCase()&&(e="http://"+e);var f;try{f=d.triggerEventType}catch(h){f=null}c.bind(_event._down,function(){var h=colorTo0x(pageEditor[a-1][b].downColor);c.css({"background-color":h,opacity:pageEditor[a-1][b].downAlpha});f==PageEditor.TriggerEventType.MouseDown&&(d.actionType==PageEditor.ActionType.GOTO_PAGE?gotoPageFun(d.pageIndex): d.actionType==PageEditor.ActionType.OPEN_URL&&window.open(e,d.linkTarget));3==browserType?event.cancelBubble=!0:event.stopPropagation()});c.bind("mouseover",function(){var h=colorTo0x(pageEditor[a-1][b].overColor);c.css({"background-color":h,opacity:pageEditor[a-1][b].overAlpha});f==PageEditor.TriggerEventType.MouseOver&&(d.actionType==PageEditor.ActionType.GOTO_PAGE?gotoPageFun(d.pageIndex):d.actionType==PageEditor.ActionType.OPEN_URL&&window.open(e,d.linkTarget))});c.bind(isTouch?_event._end:"mouseout", function(){var h=colorTo0x(pageEditor[a-1][b].outColor);c.css({"background-color":h,opacity:pageEditor[a-1][b].outAlpha});f==PageEditor.TriggerEventType.MouseOut&&(d.actionType==PageEditor.ActionType.GOTO_PAGE?gotoPageFun(d.pageIndex):d.actionType==PageEditor.ActionType.OPEN_URL&&window.open(e,d.linkTarget))});$.fn.extend(c,{onResize:function(d,e){var f=pageEditor[a-1][b].location;c.css({top:f.y*e+"px",left:f.x*d+"px",width:f.width*d+"px",height:f.height*e+"px"})}});return c} function initLink(a,b,c,d){this.link=$("
      ");this.config=$.extend({width:0.2,height:0.2,x:0.2,y:0.2,action:null},b);this.pw=c;this.ph=d;this.width=this.pw*this.config.width;this.height=this.ph*this.config.height;a.append(this.link);void 0==this.config.downColor?(this.config.downColor=getColor("LinkDownColor","#808080"),this.config.downAlpha=getInt("LinkAlpha",0.6),this.config.overColor=this.config.downColor,this.config.outColor=this.config.downColor,this.config.overAlpha= this.config.downAlpha/2,this.config.outAlpha=0):(this.config.downColor=colorTo0x(this.config.downColor),this.config.overColor=colorTo0x(this.config.overColor),this.config.outColor=colorTo0x(this.config.outColor));this.link.css({position:"absolute",top:this.config.y*this.ph+"px",left:this.config.x*this.pw+"px",width:this.width+"px",height:this.height+"px"});this.father=a;this.initEvt()} initLink.prototype.onResize=function(a,b){this.pw=a;this.ph=b;this.width=this.config.width*a;this.height=this.config.height*b;var c=this.config.y*b,d=this.config.x*a;this.link.css({width:this.width+"px",height:this.height+"px"});this.setPosition(d,c);if(null!=this.form)this.form.onResize(bookContainer.width(),bookContainer.height());if(null!=this.slide)this.slide.onResize(bookContainer.width(),bookContainer.height())};initLink.prototype.setPosition=function(a,b){this.link.css({left:a+"px",top:b+"px"})}; initLink.prototype.initEvt=function(){var a=this;this.flag=0;this.slide=this.form=null;this.linkURL;if(null!=a.config.action){try{void 0!=this.config.action.length&&(this.config.action=this.config.action[0]),this.linkURL=this.config.action.url}catch(b){}var c;null!=this.linkURL&&"www"==this.linkURL.substr(0,3).toLowerCase()&&(this.linkURL="http://"+this.linkURL);try{c=this.config.action.triggerEventType}catch(d){c=null}}this.link.bind(_event._down,function(){a.link.css({"background-color":a.config.downColor, opacity:a.config.downAlpha});c==PageEditor.TriggerEventType.MouseDown&&actionEvent.call(a);3==browserType?event.cancelBubble=!0:event.stopPropagation()});this.link.bind("mouseover",function(){a.link.css({"background-color":a.config.overColor,opacity:a.config.overAlpha});c==PageEditor.TriggerEventType.MouseOver&&actionEvent.call(a)});this.link.bind(isTouch?_event._end:"mouseout",function(){a.link.css({"background-color":a.config.outColor,opacity:a.config.outAlpha});c==PageEditor.TriggerEventType.MouseOut&& actionEvent.call(a)})};function thickness(a){var b=$("
      "),c=$("");b.append(c);$.fn.extend(b,{visible:!0,onResize:function(a,e){b.css({width:a,height:e});c.css({width:a,height:e})},setThicknessPosition:function(c,e){b.css({left:c,top:e,position:"absolute","z-index":a?8:9})},hideThickness:function(){b.css("display","none")},showThickness:function(){b.css("display","block")},setVisible:function(a){b.css({display:a?"block":"none"});b.visible=a}}); a&&c.css({"-webkit-transform":"scaleX(-1)","-moz-transform":"scaleX(-1)","-o-transform":"scaleX(-1)"});return b};var gradientColorA,gradientColorB,gradientColorAngle,backGroundImgURL,zoomButtonEnable=!0,thumbButtonEnable=!0,shareButtonEnable=!0,searchButtonEnable=!0,bookmarkButtonEnable=!0,windowWidth=0,windowHeight=0,toolBarColor,buttonColor,originTotalPageCount,totalPageCount,leftShadowWidth=50,rightShadowWidth=50,zoomPageWidth,zoomPageHeight,flipTime=600,isRegister=!1,bookDescription,bookTitle,showFlipButton,normalEventRadius=1E4,singleEventRadius=1E4,stopFlip=!1,flipping=!1,isTouch=isTouch(),bookContainer, tmpContainer,zoomBook,flipBook,toolBar,pageIndexTextField,topMargin,leftMargin,bottomMargin,rightMargin,bookType=BookType.normal_book,resizeBookAfterFlip=!1,frmSearch,frmShare,_rimFlip,flipAudio,backgroundAudio,auto_player,productName,homePage,_tipsBox,frmBookmark,thumbnail,oriPageIndex=1,googleID,hardPageEnable,uiBaseURL,browserType,rightToLeft=!1,isFlipPdf=!1,flaudio=0,flagspeak=0,hadBMT,selectedLanguage,languageBar=null,bgSound,backgroundObj,bmtBox,iconArray,toolBarIconsURL,ua=navigator.userAgent.toLowerCase(), device={};device.name=ua.match(/ipad/)?"ipad":ua.match(/ipod/)?"ipod":ua.match(/iphone/)?"iphone":ua.match(/android/)?"android":ua.match(/mac|win|linux/)?"pc":"other"; var userConfig={leftShadowWidth:30,leftShadowAlpha:1,rightShadowWidth:30,rightShadowAlpha:1,shortcutButtonHeight:370,shortcutButtonWidth:90,autoPlayButtonVisible:"true",downloadButtonVisible:"false",downloadURL:"",bgSoundButtonVisible:"yes",bgSoundAutoStart:"yes",bgSoundURL:"",homeButtonVisible:!0,homeURL:"",languageButtonVisible:!0},originWindow=Point(0,0),testLog=$("
      "),logStr=function(a){testLog[0].innerHTML=a}, singlePageBook,leftShortcutButton,rightShortcutButton,init=function(){if(compareov()){""==userConfig.bgSoundURL&&(userConfig.bgSoundButtonVisible=!1);_singleBook=$("#singleBook");pageIndexTextField=$("#currentPageIndexTextField");flipBook=rightToLeft?new rightToLeftNormalBook:new normalBook;flipBook.create(bookContainer);zoomBook=new initZoomBook(bookContainer);backgroundObj=new initBackground(tmpContainer,gradientColorA,gradientColorB,gradientColorAngle,windowWidth,windowHeight,backGroundImgURL); var a=$("");_singleBook=$("
      ");var b=$("
      "),c=$("
      "),d=$("
      ");bookContainer.append(a);a.append(_singleBook);_singleBook.append(b);_singleBook.append(c); _singleBook.append(d);singlePageBook=new singleBook;singlePageBook.Create();showFlipButton&&(leftShortcutButton=new initLeftButton(tmpContainer),rightShortcutButton=new initRightButton(tmpContainer));frmBookmark=new tableContent({caption:getLanguage("frmBookMark","Table of Content"),closeIconURL:uiBaseURL+"close.png"},tmpContainer);frmSearch=new searchForm({caption:getLanguage("frmSearch","Search"),closeIconURL:uiBaseURL+"close.png"},tmpContainer);frmShare=new shareForm({caption:getLanguage("frmShare", "Share"),closeIconURL:uiBaseURL+"close.png"},tmpContainer);_rimFlip=new rimFlip;1!=oriPageIndex&&_rimFlip.removeRimFlip();onStageResize();_tipsBox=new tipsBox("This is the last page",bookContainer);_tipsBox.setPosition((windowWidth-_tipsBox.getWidth())/2,100);auto_player=new autoFlip;bookType=windowWidth>=windowHeight?BookType.normal_book:BookType.single_book;isTouch?window.onorientationchange=function(){window.setTimeout(function(){onStageResize()},200)}:$(window).resize(function(){onStageResize()}); window.setTimeout(function(){flipBook.showCurrentYoutube()},1500);a=window.location.hash;if(""!=a&&3