$(document).ready(function(){
    if($.browser.msie && $.browser.version == "6.0"){
        applyDOMRules();
    }
});


function applyDOMRules(){
    $('#navBarListOne').mouseover(function(){
        $('#subMenu1').css({display: 'block'});
        $(this).css({ backgroundImage : "url(images/navigation/ieOverOne_bg.png)", backgroundRepeat:"no-repeat"});
        $('#navBarListOne a').css({color:'#FFF'});
        $('#navBarListOne').css({borderRight:"medium none", borderLeft:"medium none"})
    }).mouseout(function(){
        $('#subMenu1').css({display: 'none'});
        $('#navBarListOne').css({borderRight:"solid #ccc 1px", borderLeft:"solid #ccc 1px;"})
        
        if($(this).hasClass('active')){
            $(this).css({ backgroundImage : "url(images/navigation/selected_bg.png)", backgroundRepeat:"repeat-x"});
            $('#navBarListOne a').css({color:'#990000'});
        }else{
           $(this).css({ backgroundImage : "none", backgroundRepeat:"no-repeat"});
           $('#navBarListOne a').css({color:'#555'});
        }
    });
    
    $('#navBarListTwo').mouseover(function(){
        $('#subMenu2').css({display: 'block'});
        $(this).css({ backgroundImage : "url(images/navigation/ieOverTwo_bg.png)", backgroundRepeat:"no-repeat"});
        $('#navBarListTwo a').css({color:'#FFF'});
        $('#navBarListTwo').css({borderRight:"medium none"})
    }).mouseout(function(){
        $('#subMenu2').css({display: 'none'});
        $('#navBarListTwo').css({borderRight:"solid #ccc 1px"})
        if($(this).hasClass('active')){
            $(this).css({ backgroundImage : "url(images/navigation/selected_bg.png)", backgroundRepeat:"repeat-x"});
            $('#navBarListTwo a').css({color:'#990000'});
        }else{
           $(this).css({ backgroundImage : "none", backgroundRepeat:"no-repeat"});
           $('#navBarListTwo a').css({color:'#555'});
        }
    });
    
    $('#navBarListThree').mouseover(function(){
        $('#subMenu3').css({display: 'block'});
        $(this).css({ backgroundImage : "url(images/navigation/ieOverThree_bg.png)", backgroundRepeat:"no-repeat"});
        $('#navBarListThree a').css({color:'#FFF'});
        $('#navBarListThree').css({borderRight:"medium none"})
    }).mouseout(function(){
        $('#subMenu3').css({display: 'none'});
        $('#navBarListThree').css({borderRight:"solid #ccc 1px"})
        if($(this).hasClass('active')){
            $(this).css({ backgroundImage : "url(images/navigation/selected_bg.png)", backgroundRepeat:"repeat-x"});
            $('#navBarListThree a').css({color:'#990000'});
        }else{
           $(this).css({ backgroundImage : "none", backgroundRepeat:"no-repeat"});
           $('#navBarListThree a').css({color:'#555'});
        }
    });
}
