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

Mxm.ListSorter = {

    init : function () {

    },

    redirectTo : function (url) {
        window.location.href = url;
    },

    urlBySortChoice : function () {
        var sortSelect = $('sort-by-select');
        var sortUrls   = $('sort-by-url');

        if (sortSelect.options[sortSelect.selectedIndex].value !== '') {

            var urlToGoto  = sortUrls.options[sortSelect.selectedIndex-1].text;

            this.redirectTo(urlToGoto);
        }
    }
};
