$(document).ready(function(){
	$(".jq-hide").hide();
	$(".jq-show").show();
	$(".rimova").remove();

	$('option.remove-me').remove();

	$(".autocomplete-off").attr('autocomplete', 'off');

	$("form.search :text").focus(function(){
		val = $(this).val();
		if(val == "upišite pojam") $(this).val("");
	});
	$("form.search :text").blur(function(){
		val = $(this).val();
		if(val.length < 1) $(this).val("upišite pojam");
	});

	$("form.search :text").trigger("blur");

/*
	$("a.login").click(function(){
		$("#loginbox").toggle();
		if($('#loginbox').is(':visible')) $("#loginbox input:text:first:visible").focus();
		return false;
	});
	$("a.cpanel").click(function(){
		$("#cpanel").toggle();
		$(".t-spacer").toggle();
		return false;
	});
*/

	$('a[rel=external]').click(function(){
		window.open(this.href);
		return false;
	});

	$('#messages div').click(function(){
		$(this).fadeOut('fast');
	});

	$('a.del').click(function(){
		return confirm('Da li ste sigurni?');
	});

	/* // IE se buni da ovo nije valid .js - rekao bi da se .js fajlovi ne procesiraju kroz php...
<?php if (!isset($nofocus)):?>
	$('#content form input[type=text]:first').focus();
<?php endif;?>
	*/

	$('input[type=password]').attr('autocomplete', 'off');

	/*
	if( $('#itempic img').length > 0 ){
		var ip_w = $('#itempic img').width();
		var ip_h = $('#itempic img').height();
		$('#itempic').width( ip_w );
		$('#itempic').height( ip_h );
	}
	*/
});

