// $(document).ready(function(){
// 	$("#mainlevel").superfish({
// 		animation : { opacity:"show", height:"show" }
// 	});
// });

/*$(document).ready(function(){
	$("#mainlevel a dok ne sredim nista").click(function(){
		var amp = '&';
		var link = $(this).attr('href')
		if( link.search(/\?/) < 0 ){
			amp = '?';
		}
		link = link.replace(/index\.php/, 'index2.php');
		link += amp + 'qnl&no_html=1';
		$('#borivoje').load(link);
		//		window.location.search = 'aaaa';//$(this).attr('href');
		return false;
	});
});*/

function pokazi(){
	$('.modulelogin #loginFormHolder').show();
	$('.modulelogin').css('background','url(templates/stambeno/images/senka_modul.gif) bottom left no-repeat');
}
function skloni(){
	$('.modulelogin #loginFormHolder').hide();
	$('.modulelogin').css('background','none');
}

function pokazi_news(){
	$('.modulenews #newsFormHolder').show();
	$('.modulenews').css('background','url(templates/stambeno/images/senka_modul_desno.gif) bottom right no-repeat');
}
function skloni_news(){
	$('.modulenews #newsFormHolder').hide();
	$('.modulenews').css('background','none');
}

$(document).ready(function(){

					  //	$('#content .one_thumb').corner();
					  //	$('#content .photos .thickbox').corner();
	skloni();
	//	skloni_news();
	$('.modulelogin h3').hover(function() {
		pokazi();
	}, function() {
	});


	$('.modulelogin').hover(function() {

	}, function() {
			if( $('#mod_login_password').val() == ''  && $('#mod_login_username').val() == '' ){
				skloni();
			}
	});

	// $('.modulenews h3').hover(function() {
	// 	pokazi_news();
	// }, function() {
	// });


	$('.modulenews').hover(function() {

	}, function() {
			if( $('.modulenews input[name=name]').val() == '' && $('.modulenews input[name=email]').val() == '' ){
				//skloni_news();
			}
	});
});

$(document).ready(function(){
	$('a').click(function(){
		$(this).blur();
	});
});

$(document).ready(function(){
	$('#adresar h3 a').click(function(){
		$('#adresar .forma').toggle();
		return false;
	});
	$('#adresar form').submit(function(){
		var w = $('#findword').val();
		if( w.length < 3 ){
			alert('Unesite duzu rec');
			return false;
		}
		var a = $('#pravaakcija').val()+'&word='+w;
		$('#adresar .rezultat').load(a);
		return false;
	});
});
/*$(document).ready(function(){
		$('.stranaeasygallery .commentsForm h3').click(function(){
				$('.stranaeasygallery .commentsForm form').toggle();
				return false;
			});
	});*/

$(document).ready(function(){
				$('.strana11content .tree a').addClass('thickbox');
				$('.strana11content .tree a').attr('rel', 'galerija');
				return false;
	});
$(document).ready( function() {
		$('.mosmsgmodule').click(function(){$('.mosmsgmodule').hide()});
		setTimeout("$('.mosmsgmodule').hide()", 3000);
		//Examples of how to assign the ColorBox event to elements
		if( $('.stranaglasanje').length < 1 ){
			$("a.thickbox").colorbox({'current':''});
		}



	});
		$(document).ready(function() {   
				$('.sluzbahitneHolder a, .odrzavanjeHolder a, .callcentarHolder a').show();
				if( $('#topBaneriHolder').length > 0 ){
			$('#topBaneriHolder').innerfade({   
	speed: 'slow',   
				timeout: '6000',   
				type: 'sequence',   
				containerheight: '248px'  
     });  
	 $('#topBaneriHolder').show();
				}
 });  


String.prototype.trim = function () {
    return this.replace(/^\s*/, "").replace(/\s*$/, "");
}

