﻿$().ready(function(){    
    if(jQuery.browser.msie == true)
    {        
        if(jQuery.browser.version < 7)
        {
            $("img.fixpng").ifixpng();
            
            $("ul.tablist li").hover(function(){
                $(this).css("background","white url(images/tabbg-on.jpg) no-repeat scroll 0 0");
                var a = $(this).find("a");
                a.css({color: "#2547A0", background: "transparent url(images/listtriangle-blue.gif) no-repeat scroll 0px 70%"});
            },function(){
                if($(this).hasClass("on") == false)
                {
                    $(this).css("background","#666666 url(images/tabbg.png) no-repeat scroll 0 0");
                    var a = $(this).find("a");
                    a.css({color: "white", background: "transparent url(images/listtriangle-white.gif) no-repeat scroll 0px 70%"});
                }
            });
        }
    }    
    else
    {
        $("#show-changeshowbox").fadeTo(1,0.85).hover(function(){$(this).fadeTo("normal",1);},function(){$(this).fadeTo("slow",0.85);});
    }
    
    $(".todayfm-turnonyet").fadeOut(1,function(){$(this).fadeIn(2000);});    
    
    $("#LNS ul li").click(function(){        
        window.location = $(this).find("a").attr("href");
    });
        
    $("div.show-content").each(function(){
        var link = $(this).find("a").attr("href");
        if(link != null && link.length > 0)
        {         
            this.Link = link;   
            $(this).click(function(){
                window.location = this.Link;
            });
            $(this).hover(function(){
                $(this).css("border-color","yellow");
                $(this).find("a").css("text-decoration","underline");
            },
            function(){
                $(this).css("border-color","white");
                $(this).find("a").css("text-decoration","none");
            });
        }
        else
        {
            $(this).css("cursor","default");
        }
    });   
    $("ul.tablist li").click(function(){
        window.location = $(this).find("a").attr("href");        
    });
    $("#divHighlightsPanel dd img").hover(function(){
        $(this).parent().parent().find("a").css("text-decoration","underline");
    },function(){
        $(this).parent().parent().find("a").css("text-decoration","none");
    });
    $(".photoGalleryListControl dd img").hover(function(){
        $(this).parent().parent().find("a").css("text-decoration","underline");
    },function(){
        $(this).parent().parent().find("a").css("text-decoration","none");
    });    
    $("#divHighlightsPanel dd img").click(function(){
        var link = $(this).parent().parent().find("a").attr("href");
        if(link != null && link.length > 0)
        {
            window.location = $(this).parent().parent().find("a").attr("href");
        }
    }); 
    $(".photoGalleryListControl dd img").click(function(){
        window.location = $(this).parent().parent().find("a").attr("href");        
    });  
});
