!function(t,e,n,o){if(!n)throw ReferenceError("Dependence jQuery not found.");var i=t,s="FlipBookPlugins",a={},r=function(t){void 0===t&&(t="unkown");var e=a[t];return e||(e=0),a[t]=++e,t+"_"+e};n.audioFadeIn=function(t){return n.fadeSound(t,!1)},n.audioFadeOut=function(t){return n.fadeSound(t,!0)},n.fadeSound=function(t,e){var o=e?0:n.data(t,"volume"),i=n.data(t,"animation");i&&i.stop(!1,!1);var s=t.volume;return i=n({a:0}).animate({a:1},{start:function(){e||t.play()},complete:function(){e&&t.pause()},duration:2e3,step:function(e){t.volume=(o-s)*e+s}}),n.data(t,"animation",i),i};var d=function(){function t(){this.__hash_code__=t.hashCode++}return t.prototype.hashCode=function(){return this.__hash_code__},t.hashCode=1,t}(),p=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);n.prototype=e.prototype,t.prototype=new n},c=function(t){function e(){t.apply(this,arguments)}return p(e,t),e.get=function(t){return e.map[t]},e.register=function(t,n){e.map[t]=n},e.map={},e}(d),l=function(t){function e(e){t.call(this),this.options=e,this.__guid__=r("component"),this.loadList=[],this.visible=!0,this.audioAutoPlay=!1,this.node=n("
").appendTo(e.container).css(e.style),this.addLoadItem("audio",this.createAudio);var o=this.options.audio;o&&(this.audioAutoPlay=o.autoplay)}return p(e,t),e.prototype.onload=function(){},e.prototype.resize=function(){},e.prototype.enter=function(){var t=this;this.node.fadeTo(1e3,this.options.opacity,function(){t.start()})},e.prototype._show=function(){},e.prototype._hide=function(){},e.prototype.start=function(){var t=this.options.audio;if(t&&t.src){var e=this.audio;this.audioAutoPlay&&this.visible&&(this.audioAutoPlay=!1,e.play())}},e.prototype.addLoadItem=function(t,e){this.loadList.push({id:t,cb:e})},e.prototype.load=function(){var t=this,e=this.loadList;n.each(e,function(n,o){o.cb.apply(t,[function(){if(!t.destroyed){var n=e.indexOf(o);n>=0&&(e.splice(n,1),0===e.length&&(t.onloadTimeout=setTimeout(function(){t.onload()},1e3)))}}])})},e.prototype.createAudio=function(t){var e=this.options.audio;if(e&&e.src){var o=new Audio;o.volume=e.volume||1,n.data(o,"volume",o.volume),n(o).one("canplay error",function(){t()}).appendTo(this.node.parent()),o.src=e.src,o.load(),this.audio=o}else setTimeout(t)},e.prototype.show=function(){this.visible||(this.visible=!0,this.node.show(),this.audioAutoPlay&&this.audio&&this.audio.play(),this._show())},e.prototype.hide=function(){this.visible&&(this.visible=!1,this.node.hide(),this.audio&&this.audio.pause(),this._hide())},e.prototype.onDestroy=function(){},e.prototype.destroy=function(){this.onloadTimeout&&clearTimeout(this.onloadTimeout),this.onDestroy(),this.destroyed=!0,this.node.remove()},e.addMenuIcon=function(t,e){(this.menulist=n.extend([],this.menulist)).push({name:t,handler:e})},e.menulist=[],e}(d);l.addMenuIcon("Delete",function(t){var e=this;n(t).click(function(){e.destroy()})}),l.addMenuIcon("Move",function(t){n(t).addClass("dragable")}),l.addMenuIcon("Audio",function(t){var e=this,o=n(t),i=this.options.audio;this.audio;if(i&&i.src){var s="menu__audio--muted",a="menu__audio--sound";i.autoplay?o.data("paused",!1).addClass(a):o.data("paused",!0).addClass(s);var r;o.on("click",function(){var t=e.audio,i=o.data("paused");t.ended&&(t.currentTime=0),r&&r.stop(!1,!1),i?(t.currentTime?r=n.audioFadeIn(t):(t.volume=1,t.play()),o.data("paused",!1).addClass(a).removeClass(s)):(r=n.audioFadeOut(t),o.data("paused",!0).addClass(s).removeClass(a))})}else o.remove()});var u=function(o){function i(e){o.call(this),this.config=e,this.components=[];for(var i,a,r,d,p,l,u=e.plugins,h=(this.components,n(e.container)),f=0;i=u[f++];)i=this.transform(i),p=n("
").addClass(s).appendTo(h),p.css(i.position),p.css("zIndex",e.zIndex),i.container=p,a=c.get(i.type),r=new a(i),d=this.createComponentMenu(a.menulist,r),l=n("
").addClass("loading").html("
"),p.append(d),p.append(l),this.loadComponent(p,r,l);this.dragable(h),n(t).resize(this.resizeHandler=this.resize.bind(this)),this.stopPropagationHandler=function(t){t.preventDefault()},h.on("mousedown dbclick","img",this.stopPropagationHandler),h.on("mousedown dbclick",".menu",this.stopPropagationHandler)}return p(i,o),i.prototype.transform=function(t){var e=t.style;t.position={width:e.width,height:e.height,left:e.left,top:e.top},delete e.width,delete e.height,delete e.left,delete e.top;var n=t.opacity;return n||0==n||(t.opacity=1),t},i.prototype.createComponentMenu=function(t,e){var o=this,i=n("
    ").addClass("menu"),s=t.length;return n.each(t,function(t,n){var a=o.newIcon(n.name,s-t);i.append(a),n.handler&&n.handler.apply(e,[a])}),i},i.prototype.newIcon=function(t,e){var o='";return n(o)[0]},i.prototype.loadComponent=function(t,e,n){var o=this;return e.load(),e.onload=function(){e.onload=null,n.fadeOut(function(){n.remove(),e.enter()})},e.onDestroy=function(){e.onDestroy=null,t.remove(),o.removeComponent(e)},this.components.push(e),this.components},i.prototype.removeComponent=function(t){var e=this.components,n=e.indexOf(t);return e.splice(n,1),0===e.length&&this.destroy(),e},i.prototype.resize=function(){var t=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){n.each(t.components,function(t,e){e.resize()})},100)},i.prototype.dragable=function(t){var o,i,a,r,d,p,c,l,u,h=n(n("#bookContainer")[0]||e),f=0,v=0,m=5,y=n("
    ").addClass("dragCover"),g=!1;t.on("touchstart mousedown",".dragable",this.dragDownHandler=function(t){l=!0;var e=t.originalEvent.changeTouches;f=e?e[0].clientX:t.pageX,v=e?e[0].clientY:t.pageY,p=n(t.currentTarget),t.preventDefault()}),h.on("touchmove mousemove",this.dragMoveHandler=function(e){if(l){var h=e.originalEvent.changeTouches,w=h?h[0].clientX:e.pageX,_=h?h[0].clientY:e.pageY,C=w-f,k=_-v;(C*C>m*m||k*k>m*m)&&(d=!0,g||(g=!0,u=p.data("dragable"),c=n(p.parents("."+s)[0]||p),u&&u.start?u.start(f,v):(o=c[0].offsetLeft,i=c[0].offsetTop,a=t.width(),r=t.height()),u&&u.cover===!1||y.appendTo(c)),u&&u.move?u.move(C,k):c.css({left:(o+C)/a*100+"%",top:(i+k)/r*100+"%"}))}}),h.on("touchend touchcancel mouseup",this.dragEndHandler=function(t){l=!1,d&&(u&&u.end&&u.end(t),g=!1,y.remove(),d=!1)})},i.prototype.undragable=function(){var t=n(this.config.container),o=n(n("#bookContainer")[0]||e);n(t).off("mousedown dbclick",this.stopPropagationHandler).off("mousedown touchstart",this.dragDownHandler),o.off("mousemove touchmove",this.dragMoveHandler),o.off("mouseup touchend touchcancel",this.dragEndHandler),this.stopPropagationHandler=null,this.dragDownHandler=null,this.dragMoveHandler=null,this.dragEndHandler=null},i.prototype.show=function(){for(var t,e=0,n=this.components;t=n[e++];)t.show()},i.prototype.hide=function(){for(var t,e=0,n=this.components;t=n[e++];)t.hide()},i.prototype.destroy=function(){for(var e,o=0,i=this.components;e=i[o++];)e.destroy();this.components=null,this.undragable(),n(t).off("resize",this.resizeHandler),this.resizeHandler=null},i}(d);i[s]=u;var h=function(t){function o(e){t.call(this),this.options=e,this.node=n("
    ").addClass("fbvp").css({width:e.width,height:e.height,left:e.left,top:e.top}),this.init()}return p(o,t),o.prototype.init=function(){var t=this,o=this.node,i=this.createElementByPrefix("fbvp")("div"),s=this.createElementByPrefix("")("div"),a=i("prompt"),r=i("video-container"),d=this.video=e.createElement("video"),p=n(d).click(function(){d.duration&&(d.paused?(a.removeClass("stop").addClass("play"),d.play()):(a.removeClass("play").addClass("stop"),d.pause()),a.stop(!0,!0).css({opacity:1,transform:"none"}).show().fadeOut({duration:400,step:function(t){n(this).css("transform","scale("+(1+(1-t)/3)+")")}}))});r.append(d).appendTo(this.node);var c=i("loading").html("
    "),l=i("error").text("An error occurred, please try again later."),u=i("gradient--bottom").appendTo(o),r=i("controls-container"),h=i("play-pause-button").addClass("play").on("click",function(){d.paused&&d.duration?d.play():d.pause()});h.appendTo(r),p.on("play",function(){h.removeClass("play").addClass("stop")}).on("pause",function(){h.removeClass("stop").addClass("play")});var f,v=i("volume-controls"),m=i("volume-button").addClass("unmuted").click(function(){d.muted=!d.muted}),y=i("volume-bar").mousedown(function(t){var e=t.originalEvent.changeTouches,o=e?e[0].clientX:t.pageX,i=(o-n(this).offset().left)/50;0>i&&(i=0),i>1&&(i=1),d.volume=i}).addClass("dragable").data("dragable",{cover:!1,start:function(){f=d.volume,y.css("width",53)},end:function(){f=null,y.css("width","")},move:function(t){var e=f+t/50;0>e&&(e=0),e>1&&(e=1),d.volume=e}}),g=(s("bg").appendTo(y),s("fg").appendTo(y)),w=s("cursor").appendTo(y);v.append(m).append(y).appendTo(r);var _,C,k=i("time").appendTo(r),b=n("").addClass("current").appendTo(k).text("00:00"),T=(n("").addClass("separator").appendTo(k).text(" / "),n("").addClass("total").appendTo(k).text("00:00")),x=(i("fullscreen").appendTo(r).click(function(){d.requestFullscreen?d.requestFullscreen():d.mozRequestFullScreen?d.mozRequestFullScreen():d.webkitRequestFullscreen&&d.webkitRequestFullscreen()}),null),I=i("progress-container").mousedown(function(t){var e=d.duration;if(e){null===x&&(x=d.paused),d.pause();var o=t.originalEvent.changeTouches,i=o?o[0].clientX:t.pageX;_=n(this).width();var s=(i-n(this).offset().left)/_*e;0>s&&(s=0),s>e&&(s=e),d.currentTime=s,z.css("width",s/e*100+"%"),H.css("left",s/e*100+"%")}}).mouseup(function(){x===!1&&d.play(),x=null}).addClass("dragable").data("dragable",{cover:!1,start:function(){C=d.currentTime,E.css("transform","scaleY(1)"),H.css("transform","scale(1)")},end:function(){C=null,E.css("transform",""),H.css("transform",""),x===!1&&d.play(),x=null},move:function(t){var e=d.duration;if(e){var n=C+t/_*e;0>n&&(n=0),n>e&&(n=e),d.currentTime=n,z.css("width",n/e*100+"%"),H.css("left",n/e*100+"%")}}}),E=(i("progress-padding").appendTo(I),i("progress-bar").appendTo(I)),z=(s("bg").appendTo(E),s("fg").appendTo(E)),H=s("cursor").appendTo(E);o.append(c).append(l).append(a).append(I).append(r),p.on("canplay",function(){c.hide()}),p.on("waiting",function(){c.show()}),p.on("error",function(){c.hide(),l.show()});var A,L=u.add(r).add(I);p.on("pause",function(){A&&clearTimeout(A),L.stop(!0,!0).fadeIn()}),o.hover(function(){A&&clearTimeout(A),L.stop(!0,!0).fadeIn()},function(){d.paused||(A=setTimeout(function(){A=null,L.stop(!0,!0).fadeOut()},1500))}),p.one("canplay",function(){t.options.autoplay&&(d.play(),d.paused||(A=setTimeout(function(){L.stop(!0,!0).fadeOut()},1500))),t.onload()}),p.on("volumechange",function(){var t=d.muted?0:d.volume,e=50*t;g.css("width",e),w.css("left",e),0===t?m.removeClass("unmuted").addClass("muted"):m.removeClass("muted").addClass("unmuted")});var S=function(t){var e=~~(t/3600),n=~~(t%3600/60),o=~~(t%60),i=[n>10?n:"0"+n,o>10?o:"0"+o];return e>0&&i.push(e),i.join(":")};p.on("durationchange",function(){var t=d.duration;t&&(T.text(S(t)),b.text(S(0)))}),p.on("timeupdate",function(){var t=d.currentTime;b.text(S(d.currentTime));var e=d.duration,n=t/e*100+"%";z.css("width",n),H.css("left",n)})},o.prototype.load=function(){n(this.video).attr("src",this.options.src)},o.prototype.onload=function(){},o.prototype.createElementByPrefix=function(t){return t=t?t+"__":"",function(o){var i=e.createElement(o);return function(e){var o=n(i.cloneNode(!1));if(e){var s=e.split(" ").map(function(e){return t+e}).join(" ");o.addClass(s)}return o}}},o.prototype.destroy=function(){this.video.removeAttribute("src")},o}(d),f=function(t){function e(e){t.call(this,e),this.node.addClass("embed");var o=n("
    ").addClass("embed__wrap").appendTo(this.node);/^((?!chrome).)*safari/i.test(navigator.userAgent)&&o.css({webkitOverflowScrolling:"touch",overflow:"scroll"})}return p(e,t),e.prototype.start=function(){t.prototype.start.call(this),this.init()},e.prototype.init=function(){var t=this.options.embedCode;if(t.match(/facebook/gi))this.node.html(t);else{var e=n("