/* ********************************************************************************* * Aspen JavaScript support Library * * Author: WeaverTheme - www.weavertheme.com * @version 1.0 * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html * @author Bruce Wampler * * Notes - this library requires jQuery to be loaded * this library was cobbled together over a long period of time, so it contains a * bit of a jumble of straight JavaScript and jQuery calls. So it goes. It works. * * ************************************************************************************* */ /* --------- Weaver iFrame fixer */ function atw_fixVideo(myframe,vert) { var iframeW = myframe.clientWidth; myframe.height= (iframeW * vert) + 5; } function atw_winWidth() { var myWidth = 0; if( typeof( window.innerWidth ) == 'number' ) { myWidth = window.innerWidth; //Non-IE } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { myWidth = document.documentElement.clientWidth; //IE 6+ in 'standards compliant mode' } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { myWidth = document.body.clientWidth; //IE 4 compatible } /* document.innerWidth does not work the same on all devices, partly depending on how "viewport" is set. This breaks things when switching to Full View in smart mode. So we will manually override the width when we are in FUll View mode which can be determined by the value of the viewport meta tag. */ var metas = document.getElementsByTagName('meta'); var i; for (i=0; i