var $;
var jQuery;
function initTracking($a) {
    $ = $a;
    jQuery = $a;
    try {
        if (typeof initGridScansAdv === 'function')
            initGridScansAdv($);
    } catch (e) { }

    $('.container').height('70px');
    if ($('#IdConsignment').length > 0) {

        //  $('.trackingright').height($('.trackingleft').height() - 30);
        // initTrackingTab();

        //  $('#map').transvirtualmap("resize");
        loadTrackingTab();
    } else if ($('#ConNumberEntry').length > 0) {
        $('.submitSearch').click(function () {
            window.location = '/Track/' + $('#TvNumber').val() + '/' + $('#ConNumberEntry').val();
        })
        $('#ConNumberEntry').keypress(function (e) {
            if (e.which == 13) {
                window.location = '/Track/' + $('#TvNumber').val() + '/' + $('#ConNumberEntry').val();
            }
        });
    }



    jQuery.cachedScript = function (url, options) {

        // Allow user to set any option except for dataType, cache, and url
        options = $.extend(options || {}, {
            dataType: "script",
            cache: true,
            url: url
        });

        // Use $.ajax() since it is more flexible than $.getScript
        // Return the jqXHR object so we can chain callbacks
        return jQuery.ajax(options);
    };
}

function initChildRowPanel(gridName, identifier, panel) {
    if (gridName == "GridScansAdv") {
       // hookLastScan(panel);
    }
}