$(function() {
	if($('div#slider1').text()) {
			jQuery("div#slider1").codaSlider();
	}
	$('#accordion .accord_pitanje').click(function(){
		$('#accordion div.accord_prikav').slideUp('normal');
		var tekst = $(this).next();
		tekst.slideDown('normal');
		return false;
		
	});
	
	if ($('#accordion .accord_pitanje').length) {
		if(window.location.hash) {
		hash = window.location.hash.substring(1);
		dt = $('#accordion .accord_pitanje[rel="'+hash+'"]');
		dt.trigger('click');
		var p = dt.position();
		window.scrollTo(0,p.top);
		} else 
			setTimeout("$('#accordion .accord_prikav:first').slideDown()",1000);
	}
	
	$("#grad").change(function(){
        $.ajax({
         type: "POST",
         url: "/ajax/novi-nalog",
         data: "grad=" + $(this).attr("value") +"",
         success: function(html){
           $("#ulica").html(html);
         }
       });              
    }); 
	
});

/*stepcarousel.setup({
	galleryid: 'mygallery', //id of carousel DIV
	beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
	panelclass: 'panel', //class of panel DIVs each holding content
	autostep: {enable:true, moveby:1, pause:3000},
	panelbehavior: {speed:500, wraparound:false, persist:true},
	defaultbuttons: {enable: true, moveby: 1, leftnav: ['/images/site/index/left.png', -8, 90], rightnav: ['/images/site/index/right.png', -17, 90]},
	statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
	contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
});*/
