$(document).ready(function(){

// $("#floating-menu > ul > li > a, .left-box span, .right-box span, #other-news > h1, #other-events > h1, #announcements > h1, #statistics > h1, #other-news .tabs, #other-events .tabs, #announcements .tabs, .docs .tabs, .archive, .stylized-time > span, .short-article time > span, #full-article time > span, .docs .extra, #featured-gallery > h1, #map > h1, #full-article h1, .article-no-date > h1, #full-article aside > span, #full-article aside h2, #article-body h1,#article-body h2,#article-body h3,#article-body h4,#article-body h5,#article-body h6, .archive-link, #map-extras, .pagination a, .current-month > span, #latest-news .tabs > li > a, #weather .temperature, .short-article h1, #menu li > a, #calendar > h2, #featured-gallery > h2 > a").ieffembedfix();

$("ul.subnav").removeClass("hover")
$("#main-nav > ul > li > span").parent().hover(function(){
$(this).find("ul.subnav").stop(true,true).fadeIn(400)
},function(){
$(this).find("ul.subnav").stop(true,true).fadeOut(200)
})
$("#floating-menu li a").removeClass("hover")
$("#floating-menu li a").hover(function(){
$(this).find("span").stop(true,true).fadeIn(50)
},function(){
$(this).find("span").stop(true,true).fadeOut(50)
})
})
$("#latest-news ul.tabs").tabs("#latest-news div.panes > div",{
tabs: 'li',
effect: 'fade',
fadeOutSpeed: 1000,
event:'mouseover',
rotate: true
}).slideshow({
autoplay: true,
interval: 5000
})
$("#other-news ul.tabs").tabs("#other-news div.panes > div",{
})
$("#other-events ul.tabs").tabs("#other-events div.panes > div")
$("#announcements ul.tabs").tabs("#announcements div.panes > div")
$("#tabbox1 ul.tabs").tabs("#tabbox1 div.panes > div",{effect: 'fade'})
$("#tabbox2 ul.tabs").tabs("#tabbox2 div.panes > div",{effect: 'fade'})
$(window).scroll(function(){
var visina
if($('body').attr('class')=='shorter-header'){
visina=241
}else{
visina=518}
if($(this).scrollTop()>visina){
 var ttop = $(this).scrollTop();
$("#floating-menu").stop().animate({"top":(ttop-visina+40)+"px"}, 500);
//$("#floating-menu").css({"position": "fixed","top": "11px"})
}else{
$("#floating-menu").stop().animate({"top":"47px"}, 500);}
//$("#floating-menu").css({"position": "absolute","top": "47px"})}
})
$(function(){
$("#other-news .scrollable").scrollable({ mousewheel: true }).navigator()
$("#menu .scrollable").scrollable({ mousewheel: true }).navigator()
})

$("a.trigger[title]").tooltip({
position: "bottom left",
offset: [-20,0],
tipClass: 'tooltip fixed',
layout: '<div><span class="arrow"></span></div>',
effect: 'fade'
})
$("#floating-menu").css({"position": "absolute"});


