$(document).ready(function(){

    $('#contact_form form').hide();
    $('#send_form').hide();
	$('.hidden').hide();

    $("#show_form").click(function() {
	    $('#contact_form form').slideDown();
	    $('#show_form').hide();
	    $('#send_form').show();
	return false;
    })

    
    //$(".showmorebtn").click(function() {
//	var id = $(this).parent().parent().attr('id');
	//$("#"+id).hide();
//	$("#s"+id).show();
//	return false;
//    })

    // Preload all rollovers
    $("#navigation img").each(function() {
	// Set the original src
	rollsrc = $(this).attr("src");
	rollON = rollsrc.replace(/.gif$/ig,"_over.gif");
	$("<img src='' alt='' />").attr("src", rollON);
	return false;
    });

    // Preload all rollovers
    $("#homebtn img").each(function() {
	// Set the original src
	rollsrc = $(this).attr("src");
	rollON = rollsrc.replace(/.gif$/ig,"_over.gif");
	$("<img src='' alt='' />").attr("src", rollON);
	return false;
    });

    // Navigation rollovers
    $("#navigation a").mouseover(function(){
	imgsrc = $(this).children("img").attr("src");
	matches = imgsrc.match(/_on/);

	// don't do the rollover if state is already ON
	if (!matches) {
	    imgsrcON = imgsrc.replace(/.png$/ig,"_on.png"); // strip off extension
	    $(this).children("img").attr("src", imgsrcON);
	}
	return false;
    });
    $("#navigation a").mouseout(function(){
	$(this).children("img").attr("src", imgsrc);
	return false;
    });

    // Navigation rollovers
    $("#homebtn a").mouseover(function(){
	imgsrc = $(this).children("img").attr("src");
	matches = imgsrc.match(/_on/);

	// don't do the rollover if state is already ON
	if (!matches) {
	    imgsrcON = imgsrc.replace(/.png$/ig,"_on.png"); // strip off extension
	    $(this).children("img").attr("src", imgsrcON);
	}
	return false;
    });
    $("#homebtn a").mouseout(function(){
	$(this).children("img").attr("src", imgsrc);
	return false;
    });

})

