// JavaScript Document
j=jQuery.noConflict();

j(document).ready(function() {
	
	startIt();
	j("div#vertical_container").accordion({
			
			header: '.accordion_toggle',
			active: false,
			autoheight: false,
			alwaysOpen: false
			
		});
	
	function startIt() {
		
		setTimeout(function() {j('#background').fadeIn()},1000);	
		j('html, body').animate({scrollTop:0});
		setTimeout(function() {
		j('html, body').animate({scrollTop:350});		
		},2000);
		
		
		
		
	}
	
	j('a').click(function(e) {
		
		j('html, body').animate({scrollTop:0},'slow');
		j('#background').fadeOut(function() {
			//j('#background').html('');
			setTimeout(function(){
				//j('#background').html(document.getElementById('fauxBG').innerHTML);
				//alert(document.getElementById('fauxBG').innerHTML);
			},500);	
		});
		
		setTimeout(function() {
			
			j('html, body').animate({scrollTop:450});
			
			j('#background').fadeIn();	
				
		},2000);
	});
	
	
});

function imgClick(e){
	
	j('html, body').animate({scrollTop:0});
	j('#background').fadeOut(function() {
			j('#background').html('');
			setTimeout(function(){
				j('#background').html("<img src='"+e+"'/>");
				//alert(document.getElementById('fauxBG').innerHTML);
			},500);	
		});
	setTimeout(function() {
		j('html, body').animate({scrollTop:100});
		j('#background').fadeIn();		
		},1000);	
}

