$(document).ready(function() {
    $('#clientLogos .slideshow').cycle({
        fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });

    $("#footer-logos li").hover(function() {
        $("#footer-logos li").not(this).stop().fadeTo('normal', 0.4); //edited line
    }, function() {
        $("#footer-logos li").stop().fadeTo('normal', 1);
    });



    //When page loads...
    $(".tab_content").hide(); //Hide all content
    $("ul.tabs li:first").addClass("active").show(); //Activate first tab
    $(".tab_content:first").show(); //Show first tab content

    //On Click Event
    $("ul.tabs li").click(function() {

        $("ul.tabs li").removeClass("active"); //Remove any "active" class
        $(this).addClass("active"); //Add "active" class to selected tab
        $(".tab_content").hide(); //Hide all tab content

        var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
        $(activeTab).fadeIn(); //Fade in the active ID content
        return false;
    });


    $(".priceNum").each(function() {
        var i = parseFloat($(this).html());
        if (isNaN(i)) { i = 0.00; }
        var minus = '';
        if (i < 0) { minus = '-'; }
        i = Math.abs(i);
        i = parseInt((i + .005) * 100);
        i = i / 100;
        s = new String(i);
        if (s.indexOf('.') < 0) { s += '.00'; }
        if (s.indexOf('.') == (s.length - 2)) { s += '0'; }
        s = minus + s;
        $(this).html(s).removeClass("hidden");
    });

    $("#courseDates div.ViewDates").click(function() {
        //$(this).slideToggle("fast");
        $(this).parent().find('ul').slideToggle("fast");
        $(this).toggleClass("selected");
    });

    $("#smartSearch input.AutoComplete").attr("value", "Enter course name or keywords here");

    /////////////////////////////////////////////////////////////////
    //$("#smartSearch input.AutoComplete").addClass("inactive");
    var default_values = new Array();
    $("#smartSearch input.AutoComplete").focus(function() {
        if (!default_values[this.id]) {
            default_values[this.id] = this.value;
        }
        if (this.value == default_values[this.id]) {
            this.value = '';
            $(this).toggleClass("inactive");
        }
        $(this).blur(function() {
            if (this.value == '') {
                $(this).toggleClass("inactive");
                this.value = default_values[this.id];
            }
        });
    });
    ////////////////////////////////////////////////////


    
    ///////////////////////////////////////
});
//////////////
//$get rid of empty divs
$("#wideCol:empty").remove();


/*Manoj Javascript Here.....*/
//look for an img tag with the id=processing and toggles the gif.
function ShowIcon() { var e = document.getElementById("processing"); e.style.visibility = 'visible' }
function HideIcon() { var e = document.getElementById("processing"); e.style.visibility = 'hidden' }

