/* v 3.17 author http://codecanyon.net/user/creativeinteractivemedia/portfolio?ref=creativeinteractivemedia */ var FLIPBOOK=FLIPBOOK||{};!function(y,M,L,a){y.fn.flipBook=function(e){return new FLIPBOOK.Main(e,this)},y.fn.swipeBook=function(e){return e.viewMode="swipe",new FLIPBOOK.Main(e,this)},y.fn.flipBook.options={name:"",pages:[],tableOfContent:[],tableOfContentCloseOnClick:!0,thumbsCloseOnClick:!0,deeplinkingEnabled:!1,deeplinkingPrefix:"",assets:{preloader:"images/preloader.jpg",overlay:"images/overlay.png",flipMp3:"mp3/turnPage.mp3",spinner:"images/spinner.gif"},pdfUrl:null,pdfBrowserViewerIfMobile:!1,pdfBrowserViewerIfIE:!1,pdfBrowserViewerFullscreen:!0,pdfBrowserViewerFullscreenTarget:"_blank",pdfPageScale:1,pdfOutline:!0,rangeChunkSize:64,htmlLayer:!0,rightToLeft:!1,startPage:0,sound:!0,backgroundColor:"rgb(81, 85, 88)",backgroundImage:"",backgroundPattern:"",backgroundTransparent:!1,thumbSize:130,loadAllPages:!1,loadPagesF:2,loadPagesB:1,autoplayOnStart:!1,autoplayInterval:3e3,autoplayLoop:!0,skin:"light",layout:"1",menuOverBook:!1,menuFloating:!1,menuBackground:"",menuShadow:"",menuMargin:0,menuPadding:0,menuTransparent:!1,menu2OverBook:!0,menu2Floating:!1,menu2Background:"",menu2Shadow:"",menu2Margin:0,menu2Padding:0,menu2Transparent:!0,skinColor:"",skinBackground:"",btnColor:"",btnBackground:"none",btnSize:14,btnRadius:2,btnMargin:2,btnShadow:"",btnTextShadow:"",btnBorder:"",btnColorHover:"",btnBackgroundHover:"",sideBtnColor:"#FFF",sideBtnBackground:"#00000033",sideBtnSize:30,sideBtnRadius:0,sideBtnMargin:0,sideBtnPaddingV:5,sideBtnPaddingH:0,sideBtnShadow:"",sideBtnTextShadow:"",sideBtnBorder:"",sideBtnColorHover:"#FFF",sideBtnBackgroundHover:"#00000066",floatingBtnColor:"#EEE",floatingBtnBackground:"#00000044",floatingBtnSize:null,floatingBtnRadius:null,floatingBtnMargin:null,floatingBtnShadow:"",floatingBtnTextShadow:"",floatingBtnBorder:"",floatingBtnColorHover:"",floatingBtnBackgroundHover:"",btnOrder:["currentPage","btnFirst","btnPrev","btnNext","btnLast","btnZoomIn","btnZoomOut","btnRotateLeft","btnRotateRight","btnAutoplay","btnSearch","btnSelect","btnBookmark","btnToc","btnThumbs","btnShare","btnPrint","btnDownloadPages","btnDownloadPdf","btnSound","btnExpand","btnClose"],currentPage:{enabled:!0,title:"Current page",vAlign:"top",hAlign:"left",marginH:0,marginV:0,color:"",background:""},btnFirst:{enabled:!1,title:"First page",icon:"fa-angle-double-left",icon2:"first_page"},btnPrev:{enabled:!0,title:"Previous page",icon:"fa-angle-left",icon2:"chevron_left"},btnNext:{enabled:!0,title:"Next page",icon:"fa-angle-right",icon2:"chevron_right"},btnLast:{enabled:!1,title:"Last page",icon:"fa-angle-double-right",icon2:"last_page"},btnZoomIn:{enabled:!0,title:"Zoom in",icon:"fa-plus",icon2:"zoom_in"},btnZoomOut:{enabled:!0,title:"Zoom out",icon:"fa-minus",icon2:"zoom_out"},btnRotateLeft:{enabled:!1,title:"Rotate left",icon:"fas fa-undo"},btnRotateRight:{enabled:!1,title:"Rotate right",icon:"fas fa-redo"},btnAutoplay:{enabled:!0,title:"Autoplay",icon:"fa-play",icon2:"play_arrow",iconAlt:"fa-pause",iconAlt2:"pause"},btnSearch:{enabled:!1,title:"Search",icon:"fas fa-search",icon2:"search"},btnSelect:{enabled:!0,title:"Select tool",icon:"fas fa-i-cursor",icon2:"text_format"},btnBookmark:{enabled:!0,title:"Bookmark",icon:"fas fa-bookmark",icon2:"bookmark"},btnToc:{enabled:!0,title:"Table of Contents",icon:"fa-list-ol",icon2:"toc"},btnThumbs:{enabled:!0,title:"Pages",icon:"fa-th-large",icon2:"view_module"},btnShare:{enabled:!0,title:"Share",icon:"fa-link",icon2:"share",hideOnMobile:!0},btnPrint:{enabled:!0,title:"Print",icon:"fa-print",icon2:"print",hideOnMobile:!0},btnDownloadPages:{enabled:!0,title:"Download pages",icon:"fa-download",icon2:"file_download",url:"images/pages.zip",name:"allPages.zip"},btnDownloadPdf:{forceDownload:!1,enabled:!0,title:"Download PDF",icon:"fa-file",icon2:"picture_as_pdf",url:null,openInNewWindow:!0,name:"allPages.pdf"},btnSound:{enabled:!0,title:"Volume",icon:"fa-volume-up",iconAlt:"fa-volume-off",icon2:"volume_up",iconAlt2:"volume_mute",hideOnMobile:!0},btnExpand:{enabled:!0,title:"Toggle fullscreen",icon:"fa-expand",icon2:"fullscreen",iconAlt:"fa-compress",iconAlt2:"fullscreen_exit"},btnClose:{title:"Close",icon:"fa-times",icon2:"close",hAlign:"right",vAlign:"top",size:20},btnShareIfMobile:!1,btnSoundIfMobile:!1,btnPrintIfMobile:!1,sideNavigationButtons:!0,hideMenu:!1,twitter:{enabled:!0,url:null,description:null},facebook:{enabled:!0,load_sdk:!0,url:null,app_id:null,title:null,caption:null,description:null,image:null},pinterest:{enabled:!0,url:null,image:null,description:null},email:{enabled:!0,title:null,description:null,url:null},pdf:{annotationLayer:!1},pageTextureSize:2048,pageTextureSizeSmall:1500,pageTextureSizeMobile:null,pageTextureSizeMobileSmall:1024,viewMode:"webgl",singlePageMode:!1,singlePageModeIfMobile:!1,zoomMin:.95,zoomMax2:null,zoomSize:null,zoomStep:2,zoomTime:300,zoomReset:!1,zoomResetTime:300,wheelDisabledNotFullscreen:!1,arrowsDisabledNotFullscreen:!1,arrowsAlwaysEnabledForNavigation:!1,touchSwipeEnabled:!0,responsiveView:!0,responsiveViewTreshold:768,minPixelRatio:1,pageFlipDuration:1,contentOnStart:!1,thumbnailsOnStart:!1,searchOnStart:!1,sideMenuOverBook:!0,sideMenuOverMenu:!1,sideMenuOverMenu2:!0,sideMenuPosition:"left",lightBox:!1,lightBoxOpened:!1,lightBoxFullscreen:!1,lightboxCloseOnClick:!1,lightboxResetOnOpen:!0,lightboxBackground:null,lightboxBackgroundColor:null,lightboxBackgroundPattern:null,lightboxBackgroundImage:null,lightboxStartPage:null,lightboxMarginV:"0",lightboxMarginH:"0",lightboxCSS:"",lightboxPreload:!1,lightboxShowMenu:!1,lightboxCloseOnBack:!0,disableImageResize:!0,pan:0,panMax:10,panMax2:2,panMin:-10,panMin2:-2,tilt:0,tiltMax:0,tiltMax2:0,tiltMin:-20,tiltMin2:-5,rotateCameraOnMouseMove:!1,rotateCameraOnMouseDrag:!0,lights:!0,lightColor:16777215,lightPositionX:0,lightPositionZ:1400,lightPositionY:350,lightIntensity:.6,shadows:!0,shadowMapSize:1024,shadowOpacity:.2,shadowDistance:15,pageRoughness:1,pageMetalness:0,pageHardness:2,coverHardness:2,pageSegmentsW:5,pageSegmentsH:1,pageMiddleShadowSize:2,pageMiddleShadowColorL:"#999999",pageMiddleShadowColorR:"#777777",antialias:!1,preloaderText:"",fillPreloader:{enabled:!1,imgEmpty:"images/logo_light.png",imgFull:"images/logo_dark.png"},logoImg:"",logoUrl:"",logoCSS:"position:absolute;",logoHideOnMobile:!1,printMenu:!0,downloadMenu:!0,cover:!0,backCover:!0,textLayer:!0,googleAnalyticsTrackingCode:null,minimumAndroidVersion:6,linkColor:"rgba(255, 255, 0, .05)",linkColorHover:"rgba(255, 255, 0, .2)",rightClickEnabled:!0,strings:{print:"Print",printLeftPage:"Print left page",printRightPage:"Print right page",printCurrentPage:"Print current page",printAllPages:"Print all pages",download:"Download",downloadLeftPage:"Download left page",downloadRightPage:"Download right page",downloadCurrentPage:"Download current page",downloadAllPages:"Download all pages",bookmarks:"Bookmarks",bookmarkLeftPage:"Bookmark left page",bookmarkRightPage:"Bookmark right page",bookmarkCurrentPage:"Bookmark current page",search:"Search",findInDocument:"Find in document",pagesFoundContaining:"pages found containing",thumbnails:"Thumbnails",tableOfContent:"Table of Contents",share:"Share",pressEscToClose:"Press ESC to close",password:"Password"},mobile:{shadows:!1}},FLIPBOOK.Main=function(e,t){var n=this;this.elem=t,this.$elem=y(t),this.$body=y("body"),this.body=this.$body[0],this.$window=y(M),this.bodyHasVerticalScrollbar=function(){return n.body.scrollHeight>M.innerHeight},this.isZoomed=function(){return 1').width("100%").height("100%").attr("data",S.pdfUrl).appendTo(n.$elem)}function x(){var e,t,o;n.disposed||(e=M.location.hash,(o=t=n.getPageFromHash())<1?t=1:n.numPages&&t>n.numPages&&(t=n.numPages),t&&(t=S.rightToLeft&&S.pages&&S.pages.length?S.pages.length-t+1:t,n.started?n.Book&&(n.lightbox&&!FLIPBOOK.lightboxOpened&&(n.lightbox.openLightbox(),n.lightboxStart()),n.goToPage(t,-1==e.indexOf("flip"))):(S.startPage=o,S.lightBox&&(O(),S.lightBoxFullscreen&&setTimeout(function(){n.toggleExpand()},100)))))}function O(){var t;S.fillPreloader.enabled?(n.$fillPreloader=y("
").addClass("flipbook-fillPreloader"),(t=new Image).src=S.fillPreloader.imgEmpty,t.onload=function(){var e=new Image;e.src=S.fillPreloader.imgFull,e.onload=function(){y(t).appendTo(n.$fillPreloader),n.$fillPreloaderImg=y(e).appendTo(n.$fillPreloader),n.$fillPreloader.appendTo(n.wrapper),T()}}):T()}function T(){n.initialized||(n.id=Date.now(),n.addPageItems(),S.pdfMode?n.initPdf():n.initJpg(),n.setLoadingProgress(.1),n.lightbox&&n.options.lightboxShowMenu&&n.createMenu(),n.initialized=!0)}this.strings=S.strings,S.pageShininess=S.pageShininess/2,this.s=0,S.googleAnalyticsTrackingCode&&(this.gaCode=S.googleAnalyticsTrackingCode,M.ga||(g=L,f="script",b="ga",(u=M).GoogleAnalyticsObject=b,u.ga=u.ga||function(){(u.ga.q=u.ga.q||[]).push(arguments)},u.ga.l=+new Date,m=g.createElement(f),k=g.getElementsByTagName(f)[0],m.async=1,m.src="https://www.google-analytics.com/analytics.js",k.parentNode.insertBefore(m,k)),ga("create",this.gaCode,"auto")),S.isMobile&&(S.singlePageMode=!!S.singlePageModeIfMobile||S.singlePageMode,S.viewModeMobile&&(S.viewMode=S.viewModeMobile),S.pageTextureSizeMobile&&(S.pageTextureSize=S.pageTextureSizeMobile),S.pageTextureSizeMobileSmall&&(S.pageTextureSizeSmall=S.pageTextureSizeMobileSmall),S.touchSwipeEnabled=!0),"3dSinglePage"==S.viewMode&&(S.singlePageMode=!0),"2dSinglePage"==S.viewMode&&(S.singlePageMode=!0,S.viewMode="2d"),S.singlePageMode&&("2d"!=S.viewMode&&"swipe"!=S.viewMode&&(S.viewMode="3d"),S.rightToLeft&&(S.viewMode="swipe")),S.singlePageMode&&"3d"==S.viewMode&&(S.rightToLeft=!1),"simple"==S.viewMode&&(S.viewMode="3d",S.instantFlip=!0),S.sideMenuPosition=S.rightToLeft?"right":"left","webgl"==S.viewMode&&(!this.hasWebGl||parseFloat(!!(w=(v=(v||navigator.userAgent).toLowerCase()).match(/android\s([0-9\.]*)/))&&w[1])
'):S.lightBox?this.preloader=y(".flipbook-preloader"):this.preloader=y('
'),y(".flipbook-loading-text").text(S.preloaderText),this.setLoadingProgress(0),!S.deeplinkingPrefix&&S.deeplinking&&S.deeplinking.prefix&&(S.deeplinkingPrefix=S.deeplinking.prefix),S.deeplinkingEnabled=S.deeplinkingPrefix||S.deeplinkingEnabled||S.deeplinking&&S.deeplinking.enabled,S.deeplinkingEnabled&&(x(),y(M).bind("hashchange",function(e){x()})),this.dispose=function(){this.disposed=!0},S.main=this,(P={_events:{},on:function(e,t){this._events[e]||(this._events[e]=[]),this._events[e].push(t)},off:function(e,t){var o;!this._events[e]||-1<(o=this._events[e].indexOf(t))&&this._events[e].splice(o,1)},trigger:function(e){if(this._events[e]){var t=0,o=this._events[e].length;if(o)for(;t')),"undefined"==typeof IScroll){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.iscrollSrc])return void n.loadScript(FLIPBOOK.iscrollSrc,n.createBook);if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.iscrollSrc])return void setTimeout(function(){n.createBook()},100)}if(this.options.searchOnStart&&(this.options.btnSearch.enabled=!0),this.options.btnSearch.enabled){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.markSrc])return void n.loadScript(FLIPBOOK.markSrc,n.createBook);if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.markSrc])return void setTimeout(function(){n.createBook()},100)}if(n.setLoadingProgress(.9),"webgl"==n.options.viewMode){if("undefined"==typeof THREE){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.threejsSrc])return void n.loadScript(FLIPBOOK.threejsSrc,n.createBook);if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.threejsSrc])return void setTimeout(function(){n.createBook()},100)}if(void 0===FLIPBOOK.BookWebGL){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.flipbookWebGlSrc])return void n.loadScript(FLIPBOOK.flipbookWebGlSrc,n.createBook);if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.flipbookWebGlSrc])return void setTimeout(function(){n.createBook()},100)}}else if("swipe"==n.options.viewMode){if(void 0===FLIPBOOK.BookSwipe){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.flipBookSwipeSrc])return void n.loadScript(FLIPBOOK.flipBookSwipeSrc,n.createBook);if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.flipBookSwipeSrc])return void setTimeout(function(){n.createBook()},100)}}else if(void 0===FLIPBOOK.Book3){if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.flipbookBook3Src])return void n.loadScript(FLIPBOOK.flipbookBook3Src,n.createBook);if(!FLIPBOOK.scriptsAdded[FLIPBOOK.flipbookBook3Src])return void setTimeout(function(){n.createBook()},100)}if(this.setLoadingProgress(1),this.initEasing(),n.options.doublePage&&2')[0]}"webgl"==n.options.viewMode?((e=n.options).scroll=n.scroll,(e.parent=n).Book=new FLIPBOOK.BookWebGL(n.book[0],t,e),n.webglMode=!0,n.initSwipe(),d()):"swipe"==n.options.viewMode?(n.Book=new FLIPBOOK.BookSwipe(n.book[0],n.bookLayer[0],t,o),n.initSwipe()):("2d"!=n.options.viewMode&&(n.options.viewMode="3d"),n.Book=new FLIPBOOK.Book3(n.book[0],t,o),n.initSwipe(),n.webglMode=!1,d()),this.resize(),n.Book.enable(),n.book.hide().fadeIn("slow"),this.tocCreated=!1,this.createMenu(),this.onZoom(this.options.zoom),1==this.options.pages.length&&(this.rightToLeft=!1),FLIPBOOK.books=FLIPBOOK.books||{},FLIPBOOK.books[n.id]=n.Book;var h=y(n.Book);h.bind("loadPagesFromPdf",function(e,t,o,i){n.loadPagesFromPdf(t,o,i)}),h.bind("turnPageComplete",function(e){n.turnPageComplete()}),h.bind("initEasing",function(e){n.initEasing()}),h.bind("playFlipSound",function(e){n.playFlipSound()}),h.bind("closeLightbox",function(e){n.closeLightbox()}),h.bind("updateCurrentPage",function(e){n.updateCurrentPage()}),this.createLogo(),this.onBookCreated()},addPageItems:function(){var e=this.options.pages;this.id;for(var t in e){var o=e[t];if(o.htmlContent=o.htmlContent||"",o.items)for(var i in o.items){var n,s=o.items[i];switch(s.type){case"iframe":a='',o.htmlContent+=a;break;case"image":a='',o.htmlContent+=a;break;case"link":a=y("").addClass("flipbook-page-item").width(s.width).height(s.height).css({top:s.y+"px",left:s.x+"px",background:this.options.linkColor}).attr("onmouseover",'this.style.background="'+this.options.linkColorHover+'"').attr("onmouseout",'this.style.background="'+this.options.linkColor+'"'),s.url?a.attr("href",s.url).attr("target","_blank"):s.page&&(n="#"+this.options.deeplinkingPrefix+s.page,s.flip&&(n+="flip"),a.attr("href",n)),o.htmlContent+=a[0].outerHTML;break;case"video":var a=y("
").appendTo(this.bookLayer).css("position","absolute").css("width","200px").css("height","200px").css("margin-top","-100px").css("background","#f00").css("right","0").css("top","200px").bind("touchend click",function(e){e.stopPropagation(),e.preventDefault(),t.nextPage()})},playFlipSound:function(){var e=this;this.options.sound&&this.Book.enabled&&void 0!==this.flipsound.play&&(this.flipsound.currentTime=0,setTimeout(function(){try{e.flipsound.play()}catch(e){}},100))},onMouseWheel:function(e){if("wheelDeltaX"in e)wheelDeltaX=e.wheelDeltaX/12,wheelDeltaY=e.wheelDeltaY/12;else if("wheelDelta"in e)wheelDeltaX=wheelDeltaY=e.wheelDelta/12;else{if(!("detail"in e))return;wheelDeltaX=wheelDeltaY=3*-e.detail}0this.options.zoomMax&&(this.zoom=this.options.zoomMax),this.options.zoomMax2&&this.zoom>this.options.zoomMax2&&(this.zoom=this.options.zoomMax2),this.model.zoom=this.zoom,this.Book.zoomTo(this.zoom,t,i,n),this.onZoom(this.zoom)},zoomOut:function(e){var t,o=this.zoom/this.options.zoomStep;o<1&&1this.options.zoomSize&&(o=this.options.zoomSize/this.bookLayer.height()),this.zoom!=o&&(this.zoom=o,t=this.options.zoomTime,this.zoomTo(this.zoom,t,e))},nextPage:function(){this.Book&&this.Book.nextPage()},prevPage:function(){this.Book&&this.Book.prevPage()},firstPage:function(){this.goToPage(1)},lastPage:function(){this.goToPage(this.options.pages.length)},goToPage:function(e,t){e<1?e=1:e>this.options.numPages&&!this.options.rightToLeft&&(e=this.options.numPages),this.Book&&this.Book.goToPage(e,t)},moveBook:function(e){this.Book&&this.Book.move&&this.Book.move(e)},onZoom:function(e){this.zoom=e,this.enableButton(this.btnZoomIn,ethis.options.zoomMin),this.enableSwipe(e<=1),this.model.zoom=e},enableSwipe:function(e){this.swipeEnabled=e},createCurrentPage:function(){var o=this,i=this.options,e="flipbook-currentPageHolder ",t="top"==i.currentPage.vAlign?"left"==i.currentPage.hAlign?this.menuTL:"right"==i.currentPage.hAlign?this.menuTR:this.menuTC:"left"==i.currentPage.hAlign?this.menuBL:"right"==i.currentPage.hAlign?this.menuBR:this.menuBC,n="top"==i.currentPage.vAlign&&i.menu2Transparent||"top"!=i.currentPage.vAlign&&i.menuTransparent,s=n?i.floatingBtnBackground:"",a=n?i.floatingBtnColor:i.btnColor,r=n?i.floatingBtnTextShadow:"",l=n?i.floatingBtnRadius:i.btnRadius,d=(n?i.floatingBtnMargin:i.btnMargin,y("
").appendTo(t));d.css("margin",i.currentPage.marginV+"px "+i.currentPage.marginH+"px"),n||(e+="skin-color "),d.addClass(e).css({color:a,background:s,"text-shadow":r,"border-radius":l+"px"}),i.currentPage.order&&d.css("order",i.currentPage.order),this.currentPageHolder=d,this.currentPage=y(L.createElement("div")).addClass("flipbook-currentPageNumber").appendTo(d);var h=y("
").appendTo(d).submit(function(e){var t=(t=parseInt(o.currentPageInput.val()))>i.pages.length?i.pages.length:t;return o.options.rightToLeft&&(t=i.pages.length-t+1),o.goToPage(t),o.currentPageInput.trigger("blur"),!1});this.currentPageInput=y('').addClass("flipbook-currentPageInput").css({margin:i.currentPage.marginV+"px "+i.currentPage.marginH+"px",color:a}).appendTo(h).val("").focus(function(){o.currentPageInput.val(""),o.currentPage.addClass("flipbook-color-transparent")}).blur(function(){o.currentPageInput.val(""),o.currentPage.removeClass("flipbook-color-transparent")}),n||this.currentPageInput.addClass("skin-color")},createMenuHeader:function(e,t,o){var i=this,n=y("
").addClass("flipbook-menu-header skin-clor flipbook-font").appendTo(e),t=y("").text(t).addClass("flipbook-menu-title skin-color").appendTo(n),s=y("").appendTo(n).addClass("flipbook-btn-close").bind("touchend click",function(e){e.stopPropagation(),e.preventDefault(),i.closeMenus()});this.createIcon(this.options.btnClose,null,!0).appendTo(s)},createToc:function(){var i=this,e=this.options.tableOfContent;if(e&&e.length||!this.pdfService||this.pdfService.outlineLoaded){if(this.tocHolder=y("
").addClass("flipbook-tocHolder flipbook-side-menu skin-color-bg").appendTo(this.wrapper).css(this.options.sideMenuPosition,"0").hide(),this.createMenuHeader(this.tocHolder,this.strings.tableOfContent,this.toggleToc),this.toc=y("
").addClass("flipbook-toc").appendTo(this.tocHolder),this.tocScroller=y("
").addClass("flipbook-toc-scroller").appendTo(this.toc),this.tocScroll=new FLIPBOOK.IScroll(i.toc[0],{bounce:!1,mouseWheel:!0,scrollbars:!0,interactiveScrollbars:!0}),e&&0").attr("aria-hidden","true").appendTo(a).addClass("fa fa-chevron-"+(o?"left":"right")+" skin-color").hide(),l=y("").attr("aria-hidden","true").appendTo(a).addClass("fa fa-chevron-down skin-color").hide();if(y(L.createElement("span")).appendTo(s).addClass("title").text(i.title).css("width",String(170-10*s.level)+"px"),y(L.createElement("span")).appendTo(s).width("25px").css("display","inline-block").css("text-align","right").text(i.page),i.items&&i.items.length){s.items=[];for(var d=0;d').appendTo(this.wrapper),e=y('').appendTo(this.printMenu),t=y('').appendTo(e),this.createMenuHeader(t,this.strings.print,this.togglePrintMenu),y('
'+this.strings.printCurrentPage+"
").appendTo(t).bind("touchend click",function(e){o.printPage(o.cPage[0],this)}),y('
'+this.strings.printLeftPage+"
").appendTo(this.printMenu).appendTo(t).bind("touchend click",function(e){o.printPage(o.cPage[0],this)}),y('
'+this.strings.printRightPage+"
").appendTo(this.printMenu).appendTo(t).bind("touchend click",function(e){o.printPage(o.cPage[1],this)}),y('
'+this.strings.printAllPages+"
").appendTo(t).bind("touchend click",function(e){o.togglePrintWindow()}),this.closeMenus(),this.printMenuShowing=!0,this.initColors(),this.updateCurrentPage())},toggleDownloadMenu:function(){var e,t,i=this;this.dlMenu?this.dlMenuShowing?(this.dlMenu.hide(),this.dlMenuShowing=!1):(this.dlMenu.show(),this.closeMenus(),this.dlMenuShowing=!0,this.updateCurrentPage()):(this.dlMenu=y('
').appendTo(this.wrapper),e=y('').appendTo(this.dlMenu),t=y('').appendTo(e),this.createMenuHeader(t,this.strings.download,this.toggleDownloadMenu),y('
'+this.strings.downloadCurrentPage+"
").appendTo(t).bind("touchend click",function(e){i.downloadPage(i.cPage[0],this)}),y('
'+this.strings.downloadLeftPage+"
").appendTo(t).bind("touchend click",function(e){i.downloadPage(i.cPage[0],this)}),y('
'+this.strings.downloadRightPage+"
").appendTo(t).bind("touchend click",function(e){i.downloadPage(i.cPage[1],this)}),y('
'+this.strings.downloadAllPages+"
").appendTo(t).bind("touchend click",function(e){var t=L.createElement("a");t.href=i.options.btnDownloadPages.url;var o=t.href.split("/").pop().split("#")[0].split("?")[0];t.download=o,t.dispatchEvent(new MouseEvent("click"))}),this.closeMenus(),this.dlMenuShowing=!0,this.initColors(),this.updateCurrentPage())},toggleShareMenu:function(){var e,t,o,i;this.shareMenu?this.shareMenuShowing?(this.shareMenu.hide(),this.shareMenuShowing=!1):(this.shareMenu.show(),this.closeMenus(),this.shareMenuShowing=!0):(this.shareMenu=y('
').appendTo(this.wrapper),e=y('').appendTo(this.shareMenu),t=y('').appendTo(e),this.createMenuHeader(t,this.options.strings.share,this.toggleShareMenu),o=y('').appendTo(t),i=this.options,this.share=new Share(o[0],{networks:{twitter:i.twitter,facebook:i.facebook,pinterest:i.pinterest,email:i.email}}),this.closeMenus(),this.shareMenuShowing=!0,this.initColors())},bookmarkPage:function(e){var t=this.getBookmarkedPages();t.indexOf(String(e))<0&&t.push(e),this.setBookmarkedPages(t),this.thumbs.showBookmarkedThumbs(),this.bookmarkShowing||this.toggleBookmark()},removeBookmark:function(e){var t=this.getBookmarkedPages();-1",i+="",i+="Print canvas",i+="",i+='',i+="",i+="",(n=M.open("","Print","height=1600,width=800")).document.open(),n.document.write(i),n.document.close(),n.document.addEventListener("load",function(){n.focus(),n.print(),n.document.close(),n.close()},!0)):(s=this).loadPage(e,this.options.pageTextureSize,function(){s.printPage(e)})},downloadPage:function(e){var t,o,i,n,s;this.options.pages[e]&&this.options.pages[e].download?t=this.options.pages[e].download:this.options.pages[e]&&this.options.pages[e].src?t=this.options.pages[e].src:this.options.pages[e]&&this.options.pages[e].canvas&&this.options.pages[e].canvas[this.options.pageTextureSize]&&(o=L.createElement("canvas"),i=this.options.pageWidth/this.options.pageHeight,o.width=this.options.pageTextureSize*i,o.height=this.options.pageTextureSize,o.getContext("2d").drawImage(this.options.pages[e].canvas[this.options.pageTextureSize],0,0),t=o.toDataURL("image/jpeg",.5)),t?((n=L.createElement("a")).href=t,n.download="page"+String(e+1),L.body.appendChild(n),n.click(),L.body.removeChild(n)):(s=this).loadPage(e,this.options.pageTextureSize,function(){s.downloadPage(e)})},printPdf:function(e){var t;this.options.isMobile?M.open(e,"_blank","directories=0,titlebar=0,toolbar=0,location=0,status=0,menubar=0").onload=function(){this.document.body.children[0].style.display="none",this.print()}:(t=this._printIframe,this._printIframe||(t=this._printIframe=L.createElement("iframe"),L.body.appendChild(t),t.style.display="none",t.onload=function(){setTimeout(function(){t.focus(),t.contentWindow.print()},1)}),t.src=e)},togglePrintWindow:function(e){var n=this;function t(){link="about:blank";var e=M.open(link,"_new");e.document.open();for(var t="",o=0;o\n');var i="\n\nTemporary Printing Window\n