﻿$.fn.Tour = function(options) {
    var defaults = {
        targeturl: "./season20078.xml",
        season: '2009/10',
        tournament: 'Wsyl League'
    }

    var opts = $.extend(defaults, options);
    var container = this;
    var _currentSeason;
    $(container).empty();

    $.ajax({
        type: "GET",
        url: opts.targeturl, //Requesting simple.xml
        dataType: "xml", //Make sure that you specify the type of file you expecting (XML)
        complete: function(data) {

            var tab = new Table(data, opts);
            var html = tab.Print();
   
            var cup = new Cup(data, opts);
            html += cup.Print();
            $(container).append(html);
        }
    });
};