if (typeof BIITSI === 'undefined') {
    var BIITSI = {};
}

if (self.location.hostname == 'localhost') {
    var TIETOKANTA_URL = "http://localhost:3000";
}
else {
    var TIETOKANTA_URL = "http://tietokanta2.biitsi.fi";
}

var TIETOKANTA_URL = "http://tietokanta2.biitsi.fi";

function loadProTourIframe() {
    $("#pro-tour-iframe-container").append('<iframe src="http://www.facebook.com/plugins/likebox.php?id=124870914212661&amp;width=290&amp;connections=10&amp;stream=true&amp;header=false&amp;height=300" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:290px; height:300px; background:#fff;" allowtransparency="true"></iframe>');
}

function loadAreenaIframe() {
    $("#areena-iframe-container").append('<iframe src="http://www.facebook.com/plugins/likebox.php?id=219582616872&amp;width=290&amp;connections=10&amp;stream=true&amp;header=false&amp;height=300" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:290px; height:300px; background:#fff;" allowtransparency="true"></iframe>');
}

function loadBiitsiTourIframe() {
    $("#biitsi-tour-iframe-container").append('<iframe src="http://www.facebook.com/plugins/likebox.php?id=122569877778478&amp;width=290&amp;connections=10&amp;stream=true&amp;header=false&amp;height=300" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:290px; height:300px; background:#fff;" allowtransparency="true"></iframe>');
}

$(function() {

    /*
     BIITSI.FindNews = function() {
     $.getJSON(TIETOKANTA_URL + '/news/latest.json?callback=?', function(data) {
     $("#newsTemplate").tmpl(data).appendTo("#news");
     $("#news-box").show();
     });
     };

     BIITSI.NewsHandler = function() {
     $("#news a").live('click', function() {
     var content = $(this).next(".news-content").text();
     $("#news-dialog").html(content);
     $("#news-dialog").dialog('option', 'title', $(this).text());
     $("#news-dialog").dialog('open');
     return false;
     });

     $("#news-dialog").dialog({ autoOpen: false,modal: true,width:600,buttons: {
     Sulje: function() {
     $(this).dialog("close");
     }
     }})
     };


     BIITSI.FindTournaments = function() {
     $.getJSON(TIETOKANTA_URL + '/tournaments/next.json?callback=?', function(data) {
     $("#tournamentsTemplate").tmpl(data).appendTo("#tournaments");
     $("#tournament-box .ajax-loader").hide();
     });
     };

     BIITSI.FindNews();
     BIITSI.NewsHandler();
     BIITSI.FindTournaments();
     */
});
