(function(){ var ns = __namespace( "Astro.Blog.Layout.ErrorPages" ); /** @type {System.Cycle} */ var Cycle = __import( "System.Cycle" ); /** @type {Dandelion} */ var Dand = __import( "Dandelion" ); /** @type {Astro.Bootstrap} */ var Bootstrap = __import( "Astro.Bootstrap" ); /** @type {Astro.Blog} */ var config = __import( "Astro.Blog.Config" ); /** @type {Astro.Blog.Mechanism.CharacterCloud} */ var CharacterCloud = __import( "Astro.Mechanism.CharacterCloud" ); /** @type {Astro.Blog.Mechanism.Parallax} */ var Parallax = __import( "Astro.Mechanism.Parallax" ); var init = function () { var errorcode = config.get( "ErrorCode" ); var currentRoom = Dand.id( 'p' + errorcode ); var parent = currentRoom.parentNode; var rooms = parent.childNodes; var l = rooms.length; var rm; // far from observer; var cloudRange_1 = { lowerLimit: 0, upperLimit: 250, leftLimit: -10, rightLimit: 110 }; var cloudRange_2 = { lowerLimit: 0, upperLimit: 150, leftLimit: -10, rightLimit: 110 }; var cloudRange_3 = { lowerLimit: 0, upperLimit: 200, leftLimit: -10, rightLimit: 110 }; // close; var cloudRange_4 = { lowerLimit: 0, upperLimit: 100, leftLimit: -10, rightLimit: 110 }; var cCloudSymbol; switch ( errorcode ) { case 401: cCloudSymbol = "!"; break; case 403: cCloudSymbol = "\u00D7 Forbidden"; break; default: cCloudSymbol = "Page not found"; } Parallax.cssSlide( Dand.wrap(), 0, cloudRange_1 ); Parallax.cssSlide( Dand.wrap(), 0, cloudRange_2 ); Parallax.cssSlide( Dand.wrap(), 0, cloudRange_3 ); Parallax.cssSlide( Dand.wrap(), 0, cloudRange_4 ); var parallax_container = Dand.id( 'p' + errorcode ); parallax_container.appendChild( Parallax.cssSlide( CharacterCloud.create( cCloudSymbol, "p_charCloud t" + errorcode, 20, cloudRange_1 ), 1, cloudRange_1 ) ); parallax_container.appendChild( Parallax.cssSlide( CharacterCloud.create( cCloudSymbol, "p_charCloud t" + errorcode, 20, cloudRange_2 ), 1, cloudRange_2 ) ); parallax_container.appendChild( Parallax.cssSlide( CharacterCloud.create( cCloudSymbol, "p_charCloud t" + errorcode, 20, cloudRange_3 ), 1, cloudRange_3 ) ); parallax_container.appendChild( Parallax.cssSlide( CharacterCloud.create( cCloudSymbol, "p_charCloud t" + errorcode, 20, cloudRange_4 ), 1, cloudRange_4 ) ); for( var r = 0, i = 0; r < l; r ++ ) { rm = rooms[r]; if( rm.nodeType == 1 ) { if( rm == currentRoom ) { parent.style.top = ( -i * 100 ) + "%"; // Parallax Scrolling! Cycle.next( function() { Parallax.verticalSlideTo(i) } ); break; } i ++; } } }; Bootstrap.regInit( init ); })();