/*
Title:      
Author:		
Updated:    
*/

$(document).ready(function() {

    var time = 150;

    // Tooltip show/hide
    $('#siteNav .radonaway').hover(
		function() { // over
		    $('#tooltip1').show();
		    $('.radonaway .logo').addClass('hover');
		},
		function() { // out
		    $('#tooltip1').hide();
		    $('.radonaway .logo').removeClass('hover');
		}
	);

    $('#siteNav .accustar').hover(
		function() { // over
		    $('#tooltip2').show();
		    $('.accustar .logo').addClass('hover');
		},
		function() { // out
		    $('#tooltip2').hide();
		    $('.accustar .logo').removeClass('hover');
		}
	);


    // Dropdown navigation bad browser fix
    sfHover = function() {
        var sfEls = $("#mainNav li");
        for (var i = 0; i < sfEls.length; i++) {
            sfEls[i].onmouseover = function() {
                this.className += " sfhover";
            }
            sfEls[i].onmouseout = function() {
                this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
            }
        }
    }
    if (window.attachEvent) window.attachEvent("onload", sfHover);


    // add even row coloring and left align first cell
    $("table.dataTable tr:odd").addClass("even");
    $("table.addFirst td:first-child, table.addFirst th:first-child").addClass("first");

    $('#results input').focus(function() {
        val = $(this).val();
        if (val == 'Serial #' || val == 'Zip Code' || val == 'Username' || val == 'Password') $(this).val('');
    });

    $('#results input').blur(function() {
        val = $(this).val();
        alt = $(this).attr('alt');
        if (val == '') $(this).val(alt);
    });

});

