var search_query_default_text = 'Search';
var count = 1;

jQuery(document).ready(function() {
	// Show some text in the search box
	jQuery(".searchform-query").focus(function() { $(this).val(''); });
	jQuery(".searchform-query").blur(function() { $(this).val(search_query_default_text); });

	jQuery("#scrollup").click(function(){
		var top_value;
		top_value = parseInt(jQuery("#block").css("top"), 10);
		if(top_value != 0) {		
			jQuery("#block").animate({ 
				top : "+=20px"
			}, 200 );
		}
	});
	jQuery("#scrolldown").click(function(){
		var block_height;
		var height_value;
		block_height = jQuery("#block").height();
		block_height = block_height + 20;
		height_value = count++ * 20 + 580;
			
		if(height_value <= block_height) { 	
			jQuery("#block").animate({ 
				top : "-=20px"
			}, 200 );
			return false;
		}
	});
	
	jQuery(".contact_submit").mouseover(function () {
    jQuery(this).css("text-decoration","underline");
  });

  jQuery(".contact_submit").mouseout(function () {
    jQuery(this).css("text-decoration","none");
  });
	
	jQuery(".contact_clear").mouseover(function () {
    jQuery(this).css("text-decoration","underline");
  });

  jQuery(".contact_clear").mouseout(function () {
    jQuery(this).css("text-decoration","none");
  });
	
	jQuery(".contact_clear").click(function () {
		jQuery("#name").val('');
		jQuery("#mail").val('');
		jQuery("#subject").val('');
		jQuery("#message").val('');
		return false;
	});
});
