/*	
	init.js
	===============================================================
	Panoramica
	_______________________________________________________________
*/

	glow.ready(
						 
		function() 
		{	
			var template_id = glow.dom.get('body').attr('id');
			
			move_footer();
			
			// enhance_accessibility_panel();
			
			if ((section_id == 4) && (depth == 3))
			{
				make_frames_clickable();
			}
			
			activate_faux_links(); // after make_frames_clickable()				
			
			if ( glow.dom.get('#soundcloud-player').length > 0 )		
			{		
				embed_soundcloud_player();
				
				//glow.dom.get('.tracklisting .play button').each()
				//	function()
				//	{
				//		var _this = glow.dom.get(this);	
				//		
				//		// TODO: http://wiki.github.com/soundcloud/Widget-JS-API/
				//	}
				//);
				
			}
			
			if ((theme_id > 0) && ( glow.dom.get('#related').length > 0 ) )
			{	
				// edit request url to test fllback error msg
				request_theme_image_details('/_includes/phpFlickr-2.2.0/panoramica/theme-image.php?known_id=' + theme_id);			
			}		
			
			if ( glow.dom.get('body').attr('id') == 't-contact' )
			{
				remove_spam_trap();				
			}

			glow.events.addListener(window, 'resize', 
				function() 
				{
					move_footer();
				}
			);	
		}
	);