$(function() {//PAGELOAD
    //highlight tr
    $('#searchResultsTable tr:even').addClass('alt');
    $("#searchResultsTable tr").hover(
        function () {
            $(this).addClass("highlight");
        },
        function () {
            $(this).removeClass("highlight");
        }
        ).css({
        cursor: 'pointer'
    });//highlight tr
    //accordion
    /*	$('.accordion-simple .head').css({'cursor' : 'pointer'}).click(function() {
		//$(this).css({'cursor' : 'pointer'});								 
		$(this).next().toggle('med');
		return false;
	}).next().hide();//accordion*/
    $('.hoverable').hover(
        function() {
            $(this).addClass('ui-state-hover');
        },
        function() {
            $(this).removeClass('ui-state-hover').css({
                cursor: 'default'
            });
        }
        );
    // Tabs
    $('#tabs').tabs();
    // Clickable table rows
    //        alert ('Hello');


//    $("#searchResultsTable tr").click(function(){
//        //            alert($("#searchResultsTable tr td a").attr("href"));
//        // Find index of clicked table row:
//        var $cell_link = $("#searchResultsTable tr td a").attr("href");
//        //            alert($cell_link);
//        window.location = $cell_link;
//    });

    $('#searchResultsTable tr').click(function() {
        var href = $(this).find("a").attr("href");
        if(href) {
            window.location = href;
        }
    });

    /* This fixes a problem where Chrome does not honor the background
    * property of the select boxes, and rendered white text with a
    * white background */
    if ($.browser.safari) {
        if(/chrome/.test( navigator.userAgent.toLowerCase() )){
            $('#selectYear,#selectMake,#selectModel').css({
                'color': '#000'
            });
        }
    }

});//PAGELOAD


