
$(document).ready(function() {
    // Add color to tables
    $(".ImmTS_Default").each(function() {
        $("tr:first", this).addClass("tableHeader");
        $("th", this).addClass("tableHeader"); }
);


    // Hide border on tabs


    $(".on").prev().addClass("hideBorder");






    $(".jshide").attr("style", "display:none;");

    $('.fSearch').attr("value", "Search");

    $('.fSearch').focus(function() {
        if (this.value == 'Search') {
            this.value = ' '
        }
    });

    $('.fSearch').blur(function() {
        if (this.value == '') {
            this.value = 'Search'
        }
    });


    // search form button rollover
    $(".searchButton").hover(function() {
        $(this).attr("src", "/images/search-btn-on.gif");
    }, function() {
        $(this).attr("src", "/images/search-btn.gif");
    });

    // search form button (large) rollover project detail
    $("#pd-search").hover(function() {
        $(this).attr("src", "/images/pd-search-on.gif");
    }, function() {
        $(this).attr("src", "/images/pd-search.gif");
    });

    // search form button (small) rollover project detail
    $("#pf-submit-button").hover(function() {
        $(this).attr("src", "/images/search-btn-on.gif");
    }, function() {
        $(this).attr("src", "/images/dl-search-btn.gif");
    });

    // search form button (large) rollover project detail
    $("#dl-goBtn").hover(function() {
        $(this).attr("src", "/images/Downloads_roll.jpg");
    }, function() {
        $(this).attr("src", "/images/dl-go.gif");
    });

    $(".dlSubmit").hover(function() {
        $(this).attr("src", "/images/search-btn-on.gif");
    }, function() {
        $(this).attr("src", "/images/dl-search-btn.gif");
    });

    //expertise keyword search
    $(".dlSubmitExp").hover(function() {
        $(this).attr("src", "/images/search-roll-large.jpg");
    }, function() {
        $(this).attr("src", "/images/exp-search-btn.gif");
    });

    // search form button (large) rollover news listing
    $(".newsSearchBtn").hover(function() {
        $(this).attr("src", "/images/newsBtn-on.gif");
    }, function() {
        $(this).attr("src", "/images/newsBtn.gif");
    });

    // search form button (small) rollover news listing
    $(".newsSubmit").hover(function() {
        $(this).attr("src", "/images/search-btn-on.gif");
    }, function() {
        $(this).attr("src", "/images/dl-search-btn.gif");
    });

    //#detect if chrome
    var is_chrome = /chrome/.test(navigator.userAgent.toLowerCase());
    if (is_chrome) $("html").addClass("chrome-fix");


    // Alternate table row colours
    $(".ImmTS_CaptiaSymonds tr:even").addClass("evenRow");
    $(".ImmTS_CaptiaSymonds tr:odd").addClass("altRow");
});

