﻿$(document).ready(function(){
    if (($.browser.msie) && ($.browser.version.substr(0,1)=='6'))
    {
    $('.btnSearch').hover(
        function() {
            $(this).css('background','url(/images/btn_search_go_on.png) no-repeat 0 0');
            $(this).css('color','#000');
        },
        function() {
            $(this).css('background','url(/images/btn_search_go.png) no-repeat 0 0');
            $(this).css('color','#fff');
        }
    );
    
    $('.header .news .latestnews').hover(
        function() {
            $(this).css('background','url(/images/latest_news_bg_on.png) no-repeat 0 0');
            $(this).find('a').css('color','#000');
        },
        function() {
            $(this).css('background','url(/images/latest_news_bg.png) no-repeat 0 0');
            $(this).find('a').css('color','#fff');
        }
    );
    
    $('.topnav ul li').hover(
        function(){
            if (($(this).attr('class')=='featured') || ($(this).attr('class')=='featuredon'))
            {
                $(this).css('background','url(/images/topnav/left_hover_sp.png) no-repeat left 0');
                $(this).find('a').css('background','url(/images/topnav/right_hover_sp.png) no-repeat right 0');
                $(this).find('a').css('color','#0b2a55');
            }
            else
            {               
                $(this).css('background','url(/images/topnav/left_hover.png) no-repeat left 0');
                $(this).find('a').css('background','url(/images/topnav/right_hover.png) no-repeat right 0');
                $(this).find('a').css('color','#0b2a55');
            }
        },
        function(){
            if (($(this).attr('class')=='featured'))
            {
                $(this).css('background','url(/images/topnav/left_off_sp.png) no-repeat left 0');
                $(this).find('a').css('background','url(/images/topnav/right_off_sp.png) no-repeat right 0');
                $(this).find('a').css('color','#fff');
            }
            else if (($(this).attr('class').indexOf('featuredon')!=-1))
            {
                $(this).css('background','url(/images/topnav/left_on_sp.png) no-repeat left 0');
                $(this).find('a').css('background','url(/images/topnav/right_on_sp.png) no-repeat right 0');
                $(this).find('a').css('color','#fff');
            }
            else if (($(this).attr('class')=='on sfHover') || ($(this).attr('class')=='on'))
            {  
                $(this).css('background','url(/images/topnav/left_on.png)');
                $(this).find('a').css('background','url(/images/topnav/right_on.png) no-repeat right 0');
                $(this).find('a').css('color','#fff');
            }
            else
            {  
                $(this).css('background','url(/images/topnav/left_off.png)');
                $(this).find('a').css('background','url(/images/topnav/right_off.png) no-repeat right 0');
                $(this).find('a').css('color','#fff');
            }
        }
    );
  }
});
