/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function XHRClickNPut(container, linkContainer){
    
    container_id = container;
    linkContainer_id = linkContainer;
    
    if($(container_id).length == 0 || $(linkContainer_id).length == 0)
        return;
    
    this.onLinkClick = onLinkClick
    
    /* Evento lançado quando há um clique nos links de um post*/
    $(linkContainer_id).bind('click', this.onLinkClick);
}
 
function onLinkClick(event){
        
        var link = event.target;
        
        var url = $(link).attr('href');
        
        $.get(url,function(response){
            $(container_id).html(response);
        });
        event.preventDefault();
}
