/*PROMJENA SLIKE GLAVNE LEFT*/
function promjena(slika,naslov,podnaslov,alink,novaklasa) {
	document.getElementById('glavnavijest_left').style.background=slika;
	document.getElementById('glavnavijest_left_naslov').innerHTML =naslov;
	document.getElementById('glavnavijest_left_podnaslov').innerHTML =podnaslov;
	document.getElementById('glavna_vijest_link').href =alink;
	document.getElementById('glavnavijest_left').getElementsByTagName('div').item(0).className=novaklasa;

	};
	
/*function test_promjena(slika) {
	document.getElementById('glavnavijest_left').style.background=slika;
	};*/

function selektuj(meni) {
	document.getElementById(meni).className='hover';
	};
	
	
/* H4 ACCORDION */
 $(document).ready(function(){
$("div.adresar h4").next("blockquote").hide();
$("div.adresar h4:first").next("blockquote").show();
	$("div.adresar h4").click(function(){
		$(this).next("blockquote").slideToggle("fast")
		.siblings("blockquote:visible").slideUp("fast");
		$(this).toggleClass("active");
		$(this).siblings("h4").removeClass("active");
		
	});

});
 
/* H4 ACCORDION2 */
 $(document).ready(function(){
$("div.adresar2 h4").next("blockquote").hide();
$("div.adresar2 h4:first").next("blockquote").show();
	$("div.adresar2 h4").click(function(){
		$(this).next("blockquote").slideToggle("fast")
		.siblings("blockquote:visible").slideUp("fast");
		$(this).toggleClass("active");
		$(this).siblings("h4").removeClass("active");
		
	});

});
 
 
 /* H4 ACCORDION3 */
 $(document).ready(function(){
$("div.adresar3 h4").next("blockquote").hide();
$("div.adresar3 h4:first").next("blockquote").show();
	$("div.adresar3 h4").click(function(){
		$(this).next("blockquote").slideToggle("fast")
		.siblings("blockquote:visible").slideUp("fast");
		$(this).toggleClass("active");
		$(this).siblings("h4").removeClass("active");
		
	});

});
 
  /* H4 ACCORDION4 */
 $(document).ready(function(){
$("div.adresar4 h4").next("blockquote").hide();
$("div.adresar4 h4:first").next("blockquote").show();
	$("div.adresar4 h4").click(function(){
		$(this).next("blockquote").slideToggle("fast")
		.siblings("blockquote:visible").slideUp("fast");
		$(this).toggleClass("active");
		$(this).siblings("h4").removeClass("active");
		
	});

});
 
   /* H4 ACCORDION5 */
 $(document).ready(function(){
$("div.adresar5 h4").next("blockquote").hide();
	$("div.adresar5 h4").click(function(){
		$(this).next("blockquote").slideToggle("fast")
		.siblings("blockquote:visible").slideUp("fast");
		$(this).toggleClass("active");
		$(this).siblings("h4").removeClass("active");
		
	});

});
  
 
// FOTOGALERIJA
$(document).ready(function() {
 $(".jCarouselLite").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
		visible: 4
    })
	 $("#gallery").css('visibility','visible');
 });


var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		
		html += '\n</HE' + 'AD>\n<BODY>\n';
		
		var printReadyElem = document.getElementById("printReady");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the printReady section in the HTML");
			return;
		}
			
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}

function promjeni_visual(def_layer, def_state)
{	
	
			if (document.all) { 
				eval( "document.all." + def_layer + ".style.display = def_state"); 
			} 
			if (document.layers) { 
				document.layers[def_layer].display = def_state; 
			} 
			if (document.getElementById &&!document.all) { 
				hza = document.getElementById(def_layer); 
				hza.style.display = def_state; 
			} 			
}

function txt_brojac(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else 
document.getElementById('charcount').innerHTML=maxlimit - field.value.length;
}




 

