// JavaScript Document

$(document).ready(function(){
	$("#inline_fancy").fancybox(); 
	$(".inline_fancy").fancybox(); 
	$("#fancy_iframe").fancybox({
		'frameWidth': 1000,
		'frameHeight': 720,
		'hideOnContentClick': false,
		'padding': 0
	}); 
	$('.images_more').hide('fast');
	$(".images_display").fancybox();
	prepareInputFields();
	
	$("#newsname").attr("value","mail_name");
	$("#newshtml").attr("value","1");
});

function showImages(element_show,element_hide) {
	$(element_show).toggle('slow');
	if(element_hide !="") { $(element_hide).toggle('slow'); }
}

function prepareInputFields() {
	$('input[type=text]:not(.no-auto-clear)').each(function(){
		var startText = $(this).val();
		$(this).bind('focus', function(){

			if (!($(this).hasClass("not"))){
				startText = $(this).val();

				$(this).val('');
			}
		});

		$(this).bind('blur', function(){

			if (!($(this).hasClass("not"))){
				if($(this).val() == '') {
					$(this).val( startText );
				}
			}
		});
	});
}