$(function () {

	//TEXT-REPLACEMENT LOGINFORM
	$("#loginarea input.username, #loginarea input.password").focus(function() {
		var defvalue=this.defaultValue;
		if(this.value==defvalue) {
			this.value="";
		}
	}).blur(function() {
		if(this.value=="") {
			this.value = this.defaultValue;
		}
		if(this.value==" ") {
			this.value = this.defaultValue;
		}
	});
			
	//ROLLOVER LOGINFORM BUTTON
	$("#loginarea input.submit").mouseover(function() {
		$(this).attr("src","fileadmin/templates/messychurch_v1/images/login-form-submit-ro.png");
	}).mouseout(function() {
		$(this).attr("src","fileadmin/templates/messychurch_v1/images/login-form-submit.png");
	});		

	//ROLLOVER "FIND MC TAET PAA DIG 
	$("#logo span a img").mouseover(function() {
		$(this).attr("src","fileadmin/templates/messychurch_v1/images/find-mc-ro.png");
	}).mouseout(function() {
		$(this).attr("src","fileadmin/templates/messychurch_v1/images/find-mc.png");
	});

	//ROLLOVER PAA TOPMENU
	$("#topMenu img").mouseover(function() {
		var sti = $(this).attr("src");
		var nysti = sti.replace(".", "-ro.");
		$(this).attr("src",nysti);
	}).mouseout(function() {
		var sti = $(this).attr("src");
		var glsti = sti.replace("-ro.", ".");
		$(this).attr("src",glsti);	
	});
	
	//ROLLOVER PAA SUBMENU
	$("#subMenu li").mouseover(function() {
		$(this).addClass("ro");
	}).mouseout(function() {
		$(this).removeClass("ro");
	}).click(function() {
		var link = $(this).find("a").attr("href");
		parent.location=link;
	});
	
	//BUND ROLLOVER
	$("#footer a img").mouseover(function() {
		$(this).attr("src","fileadmin/templates/messychurch_v1/images/footer-ro.png");
	}).mouseout(function() {
		$(this).attr("src","fileadmin/templates/messychurch_v1/images/footer.png");
	});
	$("#typofree a img").mouseover(function() {
		$(this).attr("src","fileadmin/templates/messychurch_v1/images/typofree-ro.png");
	}).mouseout(function() {
		$(this).attr("src","fileadmin/templates/messychurch_v1/images/typofree.png");
	});
	
	
	//$("#content form input[type='submit']").parents("div.item").remove();
	//$("fieldset").append('<input type="image" class="submit" src="fileadmin/templates/messychurch_v1/images/bestil.png" name="formtype_mail" id="mailformformtype_mail" value="Bestil" />');

	//$("#content input.submit").mouseover(function() {
	//	$(this).attr("src","fileadmin/templates/messychurch_v1/images/bestil_ro.png");
	//}).mouseout(function() {
	//	$(this).attr("src","fileadmin/templates/messychurch_v1/images/bestil.png");
	//});
			
});

Cufon.replace('#content h1', { fontFamily: 'Changing' });



