function select_card(card_id){
    $('.card_container').css('border', '2px solid white');
    $('#card').val(card_id);
}

function go_inviter(){

    var text_lenghth = $('textarea').val().length;

    if(text_lenghth>= 2){
        $('#error_wording').hide();



    $.post(base_url + 'game/add_game', {
        text : $('textarea').val(),
        id: $('#card').val(),
        stream : $('#stream').attr('checked')
    },
    function(data){
        $('#inviter').show();
        $('#card_wording').hide();
        //$('.main_container').css('padding', '0px');
        setup_fbml();
    });
}
else{
    $('#error_wording').show();
}

}

function invite_friends(){
    $('#inviter').show();
    $('#gamers').hide();
}

function go_create_game(){
    top.location.href = canvas_url+'game/create';
}

function go_invite_friends(){
    top.location.href = canvas_url+'invite';
}

function go_current_games(){
    top.location.href = canvas_url+'game/current_games';
}

function setup_fbml(){
    setInterval(function(){
        $('.fb_ltr').css('width', '710px')
    }, 1000);

}

function redirect(url){
    top.location.href = ""+canvas_url+url+"";
}

function go_profile(uid){
    top.location.href = "http://www.facebook.com/profile.php?id="+uid+"";;
}


function publish(msg){
    FB.ui({
                method: 'stream.publish',
                message :msg,
                action_links: [{
                                text: 'See th cards',
                                href: 'http://apps.facebook.com/card_stories/'
                              }]
          });
}






_______________________________________________
Hackit Bar mailing list - [email protected]

Wiki:  http://community.hackit.cx/
List:  http://community.hackit.cx/ml/
Forum: http://community.hackit.cx/forum/
Ideas: http://community.hackit.cx/ideas/
IRC:   irc://irc.freenode.net/#politis

Reply via email to