
	$(function() {

		$('#main h1').each(function() {

			t = $(this).text().substr(0,1).toLowerCase();
			t1 = $(this).text().substr(0,2).toLowerCase();
			t2 = $(this).text().substr(1);
			
			if (t == "č") { t = "c1" };
			if (t == "ć") { t = "c2" };
			if (t1 == "dž") { t = "d1" };
			if (t == "đ") { t = "d2" };
			if (t1 == "lj") { t = "lj" };
			if (t1 == "nj") { t = "nj" };
			if (t == "š") { t = "s1" };
			if (t == "ž") { t = "z1" };
	
			$(this).text(t2).prepend('<img src="images/ui/letters/' + t + '.gif" />');
	
		});
			
		$('.faq li > a').click(function() {
			ov = false;
			o = $(this).next('div');
			if(o.is(':visible')) ov = true;
			$('.faq li > div').hide(200);
			if(!ov) $(this).next('div').show(200); 
			return false;
		});
		
		$('.a_more_link').click(function() {
			$(this).next('.not').toggle(200); return false;
		});
		
		$('.a_intro p:last-child').css('padding','0');
		
		$("#treeview").treeview({
			animated: "fast",
			collapsed: true,
			persist: "cookie"
		});
			
		$('.treeview a').attr('target','_blank').css('font-weight','normal');
		
		$('.html p:last-child').css('padding-bottom','0');
		
		$('#db_table tr:odd').addClass('odd');
		$('#db_table tr:first td').addClass('first');
		$('#i_table tr th:first-child, #i_table tr td:first-child').addClass('first');
		
		B = (function x(){})[-5]=='x'?'FF3':(function x(){})[-6]=='x'?'FF2':/a/[-1]=='a'?'FF':'\v'=='v'?'IE':/a/.__proto__=='//'?'Safari':/s/.test(/a/.toString)?'Chrome':/^function \(/.test([].sort)?'Opera':'Unknown';
		
		if ( B == 'FF2' ) $('.database .db_type, .database .db_type span, #main .article .a_time p, #content #main .article .a_title, #main .article h2, .article .a_more_link, .article .a_more_link span, #main p.ab a, #main .database .db_podrucja a').css('display','-moz-inline-box');
		
	}); 