/*TO DO:
- thumbnail transition
- future: DOMMatrix v. WebKitCSSMatrix
https://stackoverflow.com/questions/5603615/get-the-scale-value-of-an-element
*/
$(function(){
if($('body').hasClass('webapp-instructions')) return;
var beenDragged=!1;
var svgns = ' xmlns="http://www.w3.org/2000/svg"',
icons = { toc:{title:'Go to Table of Contents', enabled:viewOpts.toc, action:function(){nav.to(viewOpts.toc)}, html:''},
thumbs:{title:'Toggle page thumbnails', action:function(){togglePageThumbs()}, enabled:viewOpts.thumbs, html:''}, id:'opt-thumbs-btn',
zoomin:{title:'Zoom in', enabled:viewOpts.zoom, id:'opt-zoom-in-btn', 'class':'hideFS',
action:function(){zoom('in');}, html:''},
zoomout:{title:'Zoom out', enabled:viewOpts.zoom, id:'opt-zoom-out-btn', 'class':'hideFS',
action:function(){zoom('out');},
html:''},
fullscreen:{title:'Toggle fullscreen', enabled:viewOpts.fs && fullscreenEnabled(), id:'opt-fs-btn',
action:function(){toggleFullScreen();}, html:''},
pdf:{title:'Download PDF version', enabled:viewOpts.pdf,
action:function(e){if(window.trackButtonClick){window.trackButtonClick(e);} window.open(viewOpts.pdf,isIOS?'_self':'_blank');},html:''},
in5:{title:'Built with in5', enabled:viewOpts.footer, action:function(e){ window.open($('#in5footer a').attr('href'),'_blank'); },html:'',init:function(){ $('#in5footer').hide(); } }
};
var $vbar = $('
').css('background-color',viewOpts.bg).addClass(getContrast(viewOpts.bg));
var $vwrap = $('