//Sorting Plugins
function load_sorting_plugins(){
    jQuery.fn.dataTableExt.oSort['usdate-asc']  = function(a,b) {
        var usDatea = $(a).text().replace(' ','').split('/');
        var usDateb = $(b).text().replace(' ','').split('/');

        var x = (usDatea[2] + usDatea[0] + usDatea[1]) * 1;
        var y = (usDateb[2] + usDateb[0] + usDateb[1]) * 1;

        return ((x < y) ? -1 : ((x > y) ?  1 : 0));
    };

    jQuery.fn.dataTableExt.oSort['usdate-desc'] = function(a,b) {
        var usDatea = $(a).text().replace(' ','').split('/');
        var usDateb = $(b).text().replace(' ','').split('/');

        var x = (usDatea[2] + usDatea[0] + usDatea[1]) * 1;
        var y = (usDateb[2] + usDateb[0] + usDateb[1]) * 1;

        return ((x < y) ? 1 : ((x > y) ?  -1 : 0));
    };

    jQuery.fn.dataTableExt.oSort['ot-st-asc']  = function(a,b) {
        var usDatea = $(a).text().replace(' ','').replace('-','.');
        var usDateb = $(b).text().replace(' ','').replace('-','.');

        var x = parseFloat(usDatea);
        var y = parseFloat(usDateb);

        return ((x < y) ? -1 : ((x > y) ?  1 : 0));
    };

    jQuery.fn.dataTableExt.oSort['ot-st-desc'] = function(a,b) {
        var usDatea = $(a).text().replace(' ','').replace('-','.');
        var usDateb = $(b).text().replace(' ','').replace('-','.');

        var x = parseFloat(usDatea);
        var y = parseFloat(usDateb);

        return ((x < y) ? 1 : ((x > y) ?  -1 : 0));
    };

    jQuery.fn.dataTableExt.oSort['text-asc']  = function(a,b) {
        var usDatea = $.trim($(a).text());
        var usDateb = $.trim($(b).text());

        var x = usDatea;
        var y = usDateb;

        return ((x < y) ? -1 : ((x > y) ?  1 : 0));
    };

    jQuery.fn.dataTableExt.oSort['text-desc'] = function(a,b) {
    var usDatea = $.trim($(a).text());
    var usDateb = $.trim($(b).text());

    var x = usDatea;
    var y = usDateb;

    return ((x < y) ? 1 : ((x > y) ?  -1 : 0));
};
}