var l = false; var d = document; var h = d.getElementsByTagName('head')[0]; var s = d.createElement('script'); if (typeof(jQuery) !== 'function') { s.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'; s.onload = s.onreadystatechange = function() { if (!l && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { window.$_ = jQuery.noConflict(); l = true; $_(document).ready(function() { _OHOV.init(); }); } } h.appendChild(s); } else { if (typeof(window.$_) == 'undefined') { window.$_ = jQuery; $_(document).ready(function() { _OHOV.init(); }); } } if (typeof(window.$_) == 'function') { $_(document).ready(function() { _OHOV.init(); }); } var _OHOV = { init: function() { var overlay = { html: '', css: { position: 'absolute', width: $_(window).width() + 'px', height: $_('body')[0].scrollHeight + 175 + 'px', zIndex: parseInt(_OHOV.get_nhz()) + 1, background: '#777 url(http://app.outdoorhub.com/test/claritin_overlay.png) repeat', left: '0px', top: '0px', cursor: 'pointer' } }; var bar = { html: '', css: { position: 'fixed', width: $_(window).width() + 'px', height: '75px', zIndex: parseInt(_OHOV.get_nhz()) + 2, background: '#206b01', left: '0px', bottom: '-75px', cursor: 'pointer' } } var dashboard = { html: '', css: { position: 'fixed', width: $_(window).width() + 'px', height: '164px', zIndex: parseInt(_OHOV.get_nhz()) + 3, background: 'url(http://app.outdoorhub.com/test/claritin_dashboard.png) no-repeat center 0', left: '0px', bottom: '-164px', cursor: 'pointer' } } //$_('body').append(overlay.html); $_('body').append(bar.html); $_('body').append(dashboard.html); $_('#_OHOV-overlay, #_OHOV-dashboard, #_OHOV-bar').bind('click', function() { window.open('http://www.claritin.com', '_blank'); }); //$_('#_OHOV-overlay').css(overlay.css).fadeTo(2000, 0.9).fadeOut(5000, function() { $_(this).remove() }); $_('body').fadeTo(0, 1, function() { $_('#_OHOV-bar').css(bar.css).fadeIn(1000).animate({ bottom: '0px' }, 500, 'swing'); $_('#_OHOV-dashboard').css(dashboard.css).fadeIn(1000).animate({ bottom: '0px' }, 500, 'swing'); $_('body').css({ marginBottom: '175px' }); }); $_(window).bind('resize', function() { $_('#_OHOV-bar, #_OHOV-dashboard').css({ width: $_(window).width() + 'px' }); }); }, get_nhz: function() { var nhz = 0; $_('*').each(function(i) { var z = $_(this).css('zIndex'); if (typeof(z) != 'undefined' && z != 'auto') { nhz = (parseInt(z) > nhz) ? z : nhz; } }); return parseInt(nhz) + 1; } };