var var_counter = 10;
var var_timer = setInterval('start_counter()',1000);
function start_counter()
{
	if (var_counter > 0) {
		var_counter--;
		$("#counter").html(var_counter);
	} else {
		$(".cestitka .close").click();
		clearInterval(var_timer);
	}
}


$(document).ready(function(){
	//var x = setTimeout ('$(".cestitka .close").click()', 15000 );

	$(".cestitka .close").click(function(){
	  $(this).parents(".cestitka").animate({ opacity: "hide" }, "slow");
	});
	
	$(".cestitka .pauza").click(function(){
	 clearInterval(var_timer);
	});


});

var query = new Object();
	window.location.search.replace(
	new RegExp( "([^?=&]+)(=([^&]*))?", 'g' ),
		function( $0, $1, $2, $3 ){
			query[ $1 ] = $3;
		}
	);
	easing = query['e'] || 'Circ';
	
	function loadEasing(e) {
		location.href = location.pathname+'?e='+e;
	}
	
	function setEasing(e) {
		loadLamps(e);
	}
 
// for dynamic easing changes		
	function loadLamps(easing) {
		jQuery('#lavaLampBasicImage').lavaLamp({
			fx: 'easeIn'+easing,
			speed: 800
		});
 
		jQuery('#lavaLampVariableImage').lavaLamp({
			fx: 'easeOut'+easing,
			speed: 800,
			linum: 1
		});
 
		jQuery('#lavaLampFun').lavaLamp({
			fx: 'easeInOut'+easing,
			speed: 1400
		});
 
		jQuery('#lavaLampBorderOnly').lavaLamp({
			fx: 'easeInOut'+easing,
			speed: 1000
		});
 
		jQuery('#lavaLampVertical').lavaLamp({
			fx: 'easeOut'+easing,
			speed: 1000,
			click: function() {return false;}
		});
	}
// jquery initialize:
	jQuery(function() {
		loadLamps(easing);
		
		jQuery('select#easing option[value='+easing+']').attr('selected','selected');
		jQuery('.easingLabel').text(easing);
	});
	
	     


Shadowbox.loadSkin('classic', 'http://frama.ba/images/shadowbox/skin'); // use the "classic" skin
Shadowbox.loadLanguage('en', 'http://frama.ba/images/shadowbox/lang'); // use the English language
Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], 'http://frama.ba/images/shadowbox/player'); // use img and qt players

window.onload = function(){
 
    Shadowbox.init();
 
    /**
     * Note: The following function call is not necessary in your own project.
     * It is only used here to set up the demonstrations on this page.
     */
   
 
};


/*EASY NEWS SLIDER*/

jQuery(document).ready(function(){
var newsoption1 = {
  firstname: "mynews",
  secondname: "showhere",
  thirdname:"news_display",
  fourthname:"news_button",
  disablenewscount:false,
   newsspeed:'5000',
   effectis:'0'
}
jQuery.init_news(newsoption1);
 
 
var myoffset=jQuery('#news_button').offset();
 
//var mytop=myoffset.top-1;
 
 
}); 

if (document.documentElement && typeof document.documentElement.style.maxHeight=="undefined")
alert("Da bi ste korektno vidjeli sadržaj web stranice morate instalirati Internet Explorer 7+,\nMozilla Firefox 1.5+ ili neki treći savremeni web preglednik")