$(document).ready(function(){
    
    // Click to call
    $(".clicktocall form").live('submit', function(){
        var $div = $(this).parent();
        $div.css('background-position', '99% 2px'); // show loader anim
        var id = $("input[name^=clicktocall]").attr('name');
        
        matches = id.match(/clicktocall([0-9]+)/);
        id = matches[1];
        
        $.post(clicktocallUrl, $(this).serialize()+"&id="+id, function(response){
            $div.css('background-position', '99% -20px'); // remove loader anim
            $div.html($(response).html());
        });
        
        return false;
    });
    
});
