$(function(){
	// rollover
	$('.imgover').each(function(){
		this.osrc = $(this).attr('src');
		this.rollover = new Image();
		this.rollover.src = this.osrc.replace(/(\.gif|\.jpg|\.png)/, "_o$1");
	}).hover(function(){
		$(this).attr('src',this.rollover.src);
	},function(){
		$(this).attr('src',this.osrc);
	});
	// scroll
	$('a[@href^=#]').click(function() {
		var $t = $(this.hash);
		$.scrollTo($t, 400);
		return false;
	});
	// init input text
	$("input.init").each(function() {
		$(this).val($(this).attr("title")).addClass("default");
	}).focus(function() {
		if ($(this).val() == $(this).attr("title")) {
			$(this).val("").removeClass("default");
		}
	}).blur(function() {
		if (!$(this).val().length) {
			$(this).val($(this).attr("title")).addClass("default");
		}
	}).parents("form").submit(function() {
		$(this).find("input.init").each(function() {
				if ($(this).val() == $(this).attr("title")) {
					$(this).val("");
				}
		});
	});
});

