// automatische MouseOvers, this = DOM object $(this) = jQuery object
function initMouseOvers() {
    $("IMG.MOImg").each(function (i) {
        var img = this;

        var extensionIndex = img.src.lastIndexOf('.');
        var path = img.src.substr(0, extensionIndex);
        var extension = img.src.substring(extensionIndex, img.src.length);

        // preload MOimgs
        var MO = new Image();
        MO.src = path + '.over' + extension;
        
        $(this).mouseover(function() {
            img.src = MO.src;
            }
        );

        $(this).mouseout(function() {
            img.src = path + extension;
            }
        );
    });
}

$(document).ready(function() {
	initMouseOvers();
	
    // product slides
    $("IMG.slide").mouseover(function() {
        $("#projectimg").attr("src", this.src);
        return false;
    });
    
    $("SELECT#color").change(function() {
        if ($(this).val()==0) { return false; } ;
    	this.form.submit();
        return false;
    });
    
    $("#keyword").focus(function() {
        $(this).val('');
    });
});