$(document)
.ready(function(){
	var moreInfoDiv = $('#moreInfoDiv');
	var wrapDiv = $('.wrap');
	var bgDiv = $('#bg');
	$('#moreInfo')
	.click(function(){
		
		
		if( moreInfoDiv.data("opened") != "yes" ){
			moreInfoDiv.data("opened", "yes")
			/*
			.stop()
			.animate({top:0},100);*/
			
			bgDiv
			.stop()
			.animate({top:400},1500,'easeInOutExpo');
			/*wrapDiv
			.stop()
			.animate({paddingTop:555},100);*/
			
		}
		else{
			moreInfoDiv.data("opened", "no")
			/*.stop()
			.animate({top:-400},100);
			*/
			bgDiv
			.stop()
			.animate({top:0},1500,'easeOutBounce');
			/*wrapDiv
			.stop()
			.animate({paddingTop:155},100);*/
			
		};
		
		return false;
	});
	
	$('a.thecode, a.example')
	.click(function(){
		var o = $(this).metadata();
		window.open(this.href,$(this).attr('title'),'height='+o.h+',width='+o.w+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,copyhistory=0,resizable=yes')
		return false;
	});
});
