$(".tohide").hide();

$('a.delete').each(function(i, element) {
	$(element).click(function(event) {
		event.preventDefault();
		event.stopPropagation();
		yesno = confirm($('#trans_delete_confirm').html());
		if(yesno)
			window.location = element.href;
	});
});

$(document).ready(function() {
	$('select').each(function(i, el) {
		if(el.options.length == 1) {
			var value = document.createElement('span');
			value.innerHTML = el.options[0].innerHTML;
			var repl = $(document.createElement('input'))
				.attr({
					'type': 'hidden',
					'name': el.name,
					'value': el.options[0].value});
			$(el).after(value).replaceWith(repl);
		}
	});
	$('form').submit(function(event) {
		$('.text_after_submit').show();
		$('.text_after_submit.blink').blink();
	});
});
