var $j = jQuery.noConflict();

$j(document).ready(function(){
	
	var initContentTop = $j('.content').css("top");
	var initContentLeft = $j('.content').css("left");
	var initContentRight = $j('.content').css("right");
	var initBackgroundLeft = $j('.background').css("left");
	var initOverflowRight = $j('.overflow').css("right");
	
	var overflowOn = false;
	
	$j('.background').css('left','-200%').show();
	$j('.background').animate({left: initBackgroundLeft}, 1000, 'easeInOutExpo');
		
	$j('.overflow-toggle').click(function (){
		
		if (!overflowOn){
			overflowOn = true;
		
			$j('.content').animate({right: '-50%'}, 1000, 'easeInOutExpo');
			$j('.background').animate({left: '-50%'}, 1000, 'easeInOutExpo');
			$j('.overflow').animate({right: '10%'}, 1000, 'easeInOutExpo');
			
		} else {
			overflowOn = false;
			
			$j('.content').animate({right: initContentRight}, 1000, 'easeInOutExpo');
			$j('.background').animate({left: initBackgroundLeft}, 1000, 'easeInOutExpo');
			$j('.overflow').animate({right: initOverflowRight}, 1000, 'easeInOutExpo');
		}
		
	});
	
		
	$j(window).resize( function () {
	});
	
	
});
