$(document).ready(
    function() {
		addTrackingPixel() ;
        setListenerFooter();
    });

var bCallAjax = true;

function setListenerFooter() {
    var sContentId = $('.content').attr('id');
    if (sContentId == 'contentHp')
        $('#footer').attr({ 'class': 'footer footerHp' });

    $('.lnkInternal').bind('click', function() {
        if (bCallAjax) {
            var sCurrentLinkLink = $(this).attr('href');
            var sCurrentLinkId = $(this).attr('id');
            $(this).attr({ 'href': 'javascript:;' });
            var sCurrentPopId = sCurrentLinkId.replace('lnkInternal_', '');
            if (sCurrentPopId != '') {
                sCurrentLinkLink = sCurrentLinkLink + "?getSectionContent=true";
                $('#' + sCurrentPopId + '_text').load(sCurrentLinkLink, function() {
                    $('#' + sCurrentPopId).css({ 'display': 'block' });
                });
            }
        }
    });
}

function closeLnkInternal(_object) {
    $('#' + _object).css({ 'display': 'none' });
}

function setListenerFooterOld() {
    $('.lnkInternal').bind('click', function() {
        if (bCallAjax) {
            var sCurrentLinkLink = '' + $(this).attr('href');
            var sCurrentLinkId = $(this).attr('id');
            $(this).attr({ 'href': 'javascript:;' });
            var sCurrentPopId = sCurrentLinkId.replace('lnkInternal_', '');
            if (sCurrentLinkLink == '') {
                $('#' + sCurrentPopId).css({ 'visibility': 'visible' });
            } else {
                var sCurrentPopContentId = 'boxScroll_' + sCurrentPopId;
                if (sCurrentPopId != '') {
                    $('#' + sCurrentPopContentId).load(sCurrentLinkLink, function() {
                        $('#' + sCurrentPopId).css({ 'visibility': 'visible' });
                    });
                }
            }
        }
    });
}
