$(document).ready(function() {

  $('input[type=image], img.hover').each( function(){ 
        // Preload
        var x = new Image();
        x.src = this.src.substring(0, this.src.length - 5) + "2.jpg";

        // Mouseover
        $(this).mouseover( function(){ 
            this.src = this.src.substring(0, this.src.length - 5) + "2.jpg"; 
        });

        // Mouseout
        $(this).mouseout( function(){
            if (this.src.substring( (this.src.length - 5) , (this.src.length) ) == "2.jpg" ) { 
                this.src = this.src.substring(0, this.src.length - 5) + "1.jpg"; 
            }
        });
        if ($('body#index').length > 0) {
            $('.prePopulate').example(function() { return $(this).attr('title')}, {className: 'fade'});
        }
    });

    $('a[rel=external]').each(function(){
        $(this).click(function(){
            window.open($(this).attr('href'));
            return false;
        });
    });
    
    $("#keyword").focus(function() {
        if ($(this).val() == "Quick find")
        {
            $(this).val("");
        }
    });
    
    $("#keyword").blur(function() {
        if ($(this).val() == "")
        {
            $(this).val("Quick find");
        }
    });
});
