if (typeof UnrulyDomReady === "undefined") {
	UnrulyDomReady = (function() {

		// Is the DOM ready to be used? Set to true once it occurs.
		var isReady = false;
	
		// A counter to track how many items to wait for before
		// the ready event fires. See #6781
		var readyWait = 1;
		
		var readyList;
	
		// The DOM ready check for Internet Explorer
		var doScrollCheck = function() {
			if ( isReady ) {
				return;
			}
		
			try {
				// If IE is used, use the trick by Diego Perini
				// http://javascript.nwbox.com/IEContentLoaded/
				document.documentElement.doScroll("left");
			} catch(e) {
				setTimeout( doScrollCheck, 1 );
				return;
			}
		
			// and execute any waiting functions
			ready();
		};
		
		// Handle when the DOM is ready
		var ready = function( wait ) {
			// Either a released hold or an DOMready/load event and not yet ready
			if ( (wait === true && !--readyWait) || (wait !== true && !isReady) ) {
				// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
				if ( !document.body ) {
					return setTimeout( ready, 1 );
				}
	
				// Remember that the DOM is ready
				isReady = true;
	
				// If a normal DOM Ready event fired, decrement, and wait if need be
				if ( wait !== true && --readyWait > 0 ) {
					return;
				}
	
				var len = readyList.length;
				for (var i = 0 ; i < len; i++) {
					try {
						var handler = readyList.pop();
						handler();
					} catch (e){
						if (typeof DEBUG !== 'undefined' && DEBUG && typeof console !== 'undefined' && typeof console.log === 'function') {
							//alert('executing method failed ' + handler );
						}
					}
				}
			}
		};
		
		// Cleanup functions for the document ready method
		if ( document.addEventListener ) {
			var DOMContentLoaded = function() {
				document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
				ready();
			};

		} else if ( document.attachEvent ) {
			var DOMContentLoaded = function() {
				// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
				if ( document.readyState === "complete" ) {
					document.detachEvent( "onreadystatechange", DOMContentLoaded );
					ready();
				}
			};
		}
		
		var bindReady = function() {
			if ( readyList ) {
				return;
			}
	
			readyList = [];
	
			// Catch cases where $(document).ready() is called after the
			// browser event has already occurred.
			if ( document.readyState === "complete" ) {
				// Handle it asynchronously to allow scripts the opportunity to delay ready
				return setTimeout( ready, 1 );
			}
	
			// Mozilla, Opera and webkit nightlies currently support this event
			if ( document.addEventListener ) {
				// Use the handy event callback
				document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
	
				// A fallback to window.onload, that will always work
				window.addEventListener( "load", ready, false );
	
			// If IE event model is used
			} else if ( document.attachEvent ) {
				// ensure firing before onload,
				// maybe late but safe also for iframes
				document.attachEvent( "onreadystatechange", DOMContentLoaded );
	
				// A fallback to window.onload, that will always work
				window.attachEvent( "onload", ready );
	
				// If IE and not a frame
				// continually check to see if the document is ready
				var toplevel = false;
	
				try {
					toplevel = window.frameElement == null;
				} catch(e) {}
	
				if ( document.documentElement.doScroll && toplevel ) {
					doScrollCheck();
				}
			}
		};
		
		var domready = {
			ready : function( fn ) {
				// Attach the listeners
				bindReady();

				// Add the callback
				readyList.push( fn );

				return domready;
			}
		};
		
		return domready;
	
	})();
}

(function() {
     var W_H_Ratio = 2.24;
     var maxWidth = 1245;
     var maxHeight = maxWidth * W_H_Ratio;

	var unrulyResize = function(e) {
	   var parentFlash = document.getElementById('unrulyParentFlash');
	   if (parentFlash) {
	      var parent = parentFlash.parentElement || parentFlash.parentNode;
	      newWidth = parent.clientWidth || parent.offsetWidth;
	      //if (newWidth < maxWidth) {
                 parentFlash.setAttribute("width", newWidth + 'px');
		 parentFlash.setAttribute('height', (newWidth * W_H_Ratio + 'px'));
              //}
	   }

	   var fallbackFlash = document.getElementById('unrulyFallbackFlash');
	   if (fallbackFlash) {
	      var fallback = fallbackFlash.parentElement || fallbackFlash.parentNode;
	      newWidth = newWidth || fallback.clientWidth || fallback.offsetWidth;

	      //if (newWidth < maxWidth) {
                 fallbackFlash.setAttribute("width", newWidth + 'px');
		 fallbackFlash.setAttribute('height', (newWidth * W_H_Ratio + 'px'));
	      //}
	   } 
        };  
     
     // INIT TIME BRANCH + ENCAPSULATE ME!
     if (window.addEventListener) { 
        window.addEventListener('resize', unrulyResize, false);
     } else if (window.attachEvent) {
        window.attachEvent('onresize', unrulyResize); 
     } else {
        window.onresize = unrulyResize;
     }

     document.write('<object id="unrulyParentFlash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="2800px">')
     document.write('   <param name="movie" value="http://video.unrulymedia.com/Infographic_ViralSpiral2011.swf" />')
     document.write('	<param NAME="bgcolor" VALUE="#000000" />')
     document.write('	<param NAME="allowscriptaccess" VALUE="always" />')
     document.write('    <param name="salign" value="t" />')
     document.write('   <!--[if !IE]>-->')
     document.write('   <object id="unrulyFallbackFlash" type="application/x-shockwave-flash" data="http://video.unrulymedia.com/Infographic_ViralSpiral2011.swf"  bgcolor="#000000" width="100%" height="2800px">')
     document.write('    <param name="salign" value="t" />')
     document.write('	<param NAME="allowscriptaccess" VALUE="always" />')
     document.write('   <!--<![endif]-->')

     document.write('<img id="unrulyFallbackImage" src="http://video.unrulymedia.com/ViralSpiral2011_Web_Mobile.jpg" width="1176" height="2800" border="0" usemap="#Map" alt="Viral Spiral" />');
     document.write('<map name="Map" id="Map"><area shape="circle" coords="443,2165,15" href="http://viralvideochart.unrulymedia.com/youtube/Dove_-_Evolution_Commercial_(higher_quality)?id=hibyAJOSW8U" /><area shape="circle" coords="499,2218,24" href="http://viralvideochart.unrulymedia.com/youtube/The_worlds_funniest_commercial?id=aoRD1wmvwUc" /><area shape="circle" coords="568,2167,24" href="http://viralvideochart.unrulymedia.com/youtube/Banned_Commercial_-_Condoms?id=nojWJ6-XmeQ" /><area shape="circle" coords="520,2100,18" href="http://viralvideochart.unrulymedia.com/youtube/Funny_Orbit_Gum_Commercial?id=WEJJUGJZxpU" /><area shape="circle" coords="450,2094,18" href="http://viralvideochart.unrulymedia.com/youtube/Phil_Collins_&quot;Gorilla_Drummer&quot;_Cadbury_Ad_(Dairy_Milk)?id=Wy52yueBX_s" /><area shape="circle" coords="391,2123,20" href="http://viralvideochart.unrulymedia.com/youtube/Very_Funny_Pepsi_Commercial?id=40DykbPa4Lc" /><area shape="circle" coords="389,2242,20" href="http://viralvideochart.unrulymedia.com/youtube/Extraordinary_Pantene_Commercial?id=Um9KsrH377A" /><area shape="circle" coords="475,2289,22" href="http://viralvideochart.unrulymedia.com/youtube/Test_Your_Awareness%3A_Do_The_Test?id=Ahg6qcgoay4" /><area shape="circle" coords="634,2254,60" href="http://viralvideochart.unrulymedia.com/youtube/NEW_Heineken_Commercial_-_verry_funny?id=S1ZZreXEqSY" /><area shape="circle" coords="662,2076,40" href="http://viralvideochart.unrulymedia.com/youtube/Piano_stairs__-_TheFunTheory.com_-_Rolighetsteorin.se?id=2lXh2n0aPyw" /><area shape="circle" coords="564,2000,39" href="http://viralvideochart.unrulymedia.com/youtube/KEN_BLOCK_GYMKHANA_TWO_THE_INFOMERCIAL?id=HQ7R_buZPSo" /><area shape="circle" coords="433,1977,49" href="http://viralvideochart.unrulymedia.com/youtube/Inspired_Bicycles_-_Danny_MacAskill_April_2009?id=Z19zFlPah-o" /><area shape="circle" coords="236,2057,121" href="http://viralvideochart.unrulymedia.com/youtube/Evian_Roller_Babies_international_version?id=XQcVllWpwGs" /><area shape="circle" coords="186,2314,86" href="http://viralvideochart.unrulymedia.com/youtube/Old_Spice_The_Man_Your_Man_Could_Smell_Like?id=owGykVbfgUE" /><area shape="circle" coords="332,2449,99" href="http://viralvideochart.unrulymedia.com/youtube/9_11_Bud_Commercial_-_AIRED_ONLY_ONCE?id=J3eQmzw6n3k" /><area shape="circle" coords="546,2461,96" href="http://viralvideochart.unrulymedia.com/youtube/SWAGGER_WAGON?id=ql-N3F1FhW4" /><area shape="circle" coords="757,2408,103" href="http://viralvideochart.unrulymedia.com/youtube/Ken_Block\'s_Gymkhana_THREE,_Part_2%3B_Ultimate_Playground%3B_l\'Autodrome,_France?id=4TshFWSsrn8" /><area shape="circle" coords="930,2212,136" href="http://viralvideochart.unrulymedia.com/youtube/NIKE_ESCRIBE_EL_FUTURO__VERSI&amp;Oacute%3BN_COMPLETA?id=YopWjw7KPN4" /><area shape="circle" coords="825,1858,161" href="http://viralvideochart.unrulymedia.com/youtube/Party_Rock_Anthem-Kia_Soul_Hamster_Commercial_%5BHD%5D%3A_Party_Rock_Anthem');

document.write('-LMFAO-_MTV_VMA%27s?id=4zJWA3Vo6TU" /><area shape="circle" coords="527,1616,184" href="http://viralvideochart.unrulymedia.com/youtube/The_T-Mobile_Royal_Wedding?id=Kav0FEhtLug" /><area shape="circle" coords="310,1249,197" href="http://viralvideochart.unrulymedia.com/youtube/T-Mobile_Angry_Birds_Live?id=jzIBZQkj6SY" /><area shape="circle" coords="377,807,221" href="http://viralvideochart.unrulymedia.com/youtube/DC_SHOES:_KEN_BLOCK\'S_GYMKHANA_FOUR%3B_THE_HOLLYWOOD_MEGAMERCIAL?id=btViXvIDsi0" />');
     document.write('<area shape="circle" coords="818,568,231" href="http://viralvideochart.unrulymedia.com/youtube/The_Force:_Volkswagen_Commercial?id=R55e-uHQna0" />');
     document.write(' </map>');

     document.write('   <!--[if !IE]>-->')
     document.write('   </object>')
     document.write('   <!--<![endif]-->')
     document.write(' </object>')

     UnrulyDomReady.ready(unrulyResize);
})();

