// KScripte - http://www.kristijan-solutions.com/

$j(window).resize(function(){ // ----- KAD SE PROZOR POVECAVA/SMANJUJE IZVRSI OVO -----

// podesavanje pokretljivosti stranice tj. fiksiranog menija u zavisnosti od visine stranice i toga da li je u pitanju IE6

	if (typeof isRunningIE6OrBelow == "undefined") { // if not IE6
		
		var bodyh = $j("body").height();
		
		if (bodyh < 585) {
			
			$j("#meni").css("position", "absolute");
			$j("#meniIgrb").css( {height: 585} );
			$j("#meniIgrb").css("position", "absolute");
			
			}
		if (bodyh >= 585) {
			  
			$j("#meni").css("position", "fixed");
			$j("#meniIgrb").css( {height: bodyh} );
			$j("#meniIgrb").css("position", "fixed");
			
			}
		  
		}
	   // else { alert("Im the annoying IE6"); } // if is IE6

// ----- KRAJ

// Centriranje sadrzaja preko sirine TD-a za rezolucije vece od 1550px u sirini
	var bodyw = $j("body").width();
	if (bodyw > 1550) { $j('#TableCell').width('53%'); } else { $j('#TableCell').width('60%');  }

});

$j(window).load(function(){ // ----- KAD SE STRANICA UCITA IZVRSI OVO -----

// podesavanje pokretljivosti stranice tj. fiksiranog menija u zavisnosti od visine stranice i toga da li je u pitanju IE6

	if (typeof isRunningIE6OrBelow == "undefined") { // if not IE6
		
		var bodyh = $j("body").height();
		
		if (bodyh < 585) {
			
			$j("#meni").css("position", "absolute");
			$j("#meniIgrb").css( {height: 585} );
			$j("#meniIgrb").css("position", "absolute");
			
			}
		if (bodyh >= 585) {
			  
			$j("#meni").css("position", "fixed");
			$j("#meniIgrb").css( {height: bodyh} );
			$j("#meniIgrb").css("position", "fixed");
			
			}
		  
		}
	   else { $j("#meni").css("display", "none"); $j('#IE6').show("slow"); } // if is IE6

// ----- KRAJ

// Centriranje sadrzaja preko sirine TD-a za rezolucije vece od 1550px u sirini
	var bodyw = $j("body").width();
	if (bodyw > 1550) { $j('#TableCell').width('53%'); } else { $j('#TableCell').width('60%');  }

// prettyPhoto jQuery Lightbox settings and initialization

	if (typeof isRunningIE6OrBelow == "undefined") { // ako nije IE6 (Internet Explorer 6)
		
		$j("#SadrzajStr a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});
		
	}
	
// ----- KRAJ
});

function IskljuciMe() { $j('#IE6').hide("slow"); }

function goPage(newURL) {
// This function is called from the pop-up menus to transfer to a different page. Ignore the value returned is a null string

   	if (newURL != "") {
// skip the menu dividers and reset the menu selection to default
   		if (newURL == "-" ) {
			resetMenu();
			
		} else {  
// send page to designated URL		 	
   			document.location.href = newURL;
   		}
   	}
}

