$(document).ready(function () {
    var continentId = getParameterByName("continentId");
    var groupId = getParameterByName("groupId");
    var cupId = getParameterByName("cupId");
    var redirect = getParameterByName("goto");
    if (continentId) {
        app.CurrentView = new app.CompetitionsView({ continentId: continentId, redirect: redirect });
    }else if (cupId) {
        app.CurrentView = new app.CompetitionsView({ cupId: cupId, cupName: getParameterByName("cupName"), groupId:  getParameterByName("groupId"), redirect: redirect});
    } else if (groupId) {
        app.CurrentView = new app.CompetitionsView({ groupId: groupId, groupName: getParameterByName("groupName"), redirect: redirect });
    } else {
        app.CurrentView = new app.CompetitionsView({ redirect: redirect });
    }
});