 
$(document).ready(function(){

	
});


function select(bd, _id){
	$("#main_content").empty();
	if (bd == ""){
		bd="bd";
	}
	
		$('#main_content').show("slow");
		up_menu('#main');
		$.ajax({
			type: "GET",
			url: "bd/"+bd+".xml",
			dataType: "xml",
			success: function(xml) {
				$(xml).find('post').each(function(){
					var id = $(this).attr('id');
					if( id == _id ){
						var title = $(this).attr('title');
						var author = $(this).attr('author');
						var date = $(this).attr('date');
						var image = $(this).attr('image');
						var width = $(this).attr('width');
						var height = $(this).attr('height');
						var text = $(this).attr('text');
	 					
						var content =  '<article class="main_article"><header class="sub_title text_shadow">'+title+'</header><span class="box" ><p class="avatar"><img src="'+ image +'" width="'+ width +'" height="'+ height +'" height="'+ author +'" /></p><p class="info"> By '+ author +' '+date+'</p></span><p class="justify">'+text+'</p></article>';
						$("#main_content").append(content);
					}				
				});
			}
		});

		return false ;
}	

function up_menu(name){
	$(name).removeClass('main').addClass('up_main');
	
}
	
