﻿$(document).ready(function() {
	$("input[type='text']").focus(function() {
		if (this.value == this.defaultValue) this.value = "";
	});
	$("input[type='text']").blur(function() {
		if (this.value == "") this.value = (this.defaultValue ? this.defaultValue : "");
	});

	$("#inEnglish").OpacityFix(0.7);

	$(".eng").click(function() {
		if ($("#inEnglish").css("display") == "none") {
			$("#inEnglish, .OpFixNew").slideDown();
		} else {
		$("#inEnglish, .OpFixNew").slideUp();
		}
	}); 

	$("#EngClose").click(function() { $("#inEnglish, .OpFixNew").slideUp(); });

});


function switchCollection(elColl, elShow) {
	subLength = elColl.length;
	$("body div").each(function() {
		if ($(this).attr("id").substring(0, subLength) == elColl && $(this).attr("id") != elShow) {
			$(this).fadeOut();
		}
	});
	timerId = setInterval(function() {
		$("#" + elShow).fadeIn();
		clearInterval(timerId);
	}, 500);
}