$(document).ready(function(){
    //target blank automatique
    $("a[href^='http://']").click(function(){
        if(typeof(uacct) != "undefined"){
             try {
                var pageTracker=_gat._getTracker(uacct);
                var act = this.href.match(/:\/\/(.[^/]+)/)[1];
                
                var id_bien = $("input#id_bien").val();
                if(($(this).attr("class"))=='banniere_pub'){
                    $.post("/index.php?module=annonce&action=ajax:OutboundPub", {url:act,id:$(this).attr("id")} );
                }else{
                    $.post("/index.php?module=annonce&action=ajax:Outbound", {url:act,id: id_bien} );
                }
                pageTracker._trackEvent('Outbound Links', act);
                setTimeout('window.open("'+this.href+'")', 100)
              }catch(err){}
              return false;
        }else{
            if(($(this).attr("class"))=='internal'){
                return true;
            }
            window.open(this.href);
            return false;
        }
    });

    $("#btnTopperAccount").click(function () {
        $(this).hide('fast');
        $("#account").toggle("fast");
    });
    $("#account span").click(function () {
        $(this).parents('#account').hide("fast");
        $("#btnTopperAccount").show('fast');
    });

    $("#newversion").colorbox({
        width:'670px',
        height:'450px',
        iframe:true
    });

});

