$(document).ready(function(){
	
	try {
		
		var ml = $('#menu ul');
		var fa = $('#floatads');
		
		

		if (ml.size()) {
			ml.tabs("#menu div.subitems > ol, #menu div.subitems > form", {
				event: 'mouseover',
				initialIndex: 0,
				onClick: function(e,i){
					ml.find('li a').removeClass('active');
					ml.find('li:eq('+ i +') a').addClass('active');
				}
			});
		}
		
		if (fa.size()) {
			fp = false;
			fa.hover(function(){
				if (!fp) {
					fa.html('<a href="#"><img src="../img/ad/adfull.gif" width="980" height="360" alt="banner" /></a>').animate({height:'360px'});
					fp = true;
				}
			},function(){
				if (fp) {
					fa.animate({height:'60px'}).html('<a href="#"><img src="../img/ad/adnew.gif" width="980" height="60" alt="banner" /></a>');
					fp = false;
				}
			});
		}
		
		var swf_wt = $('#bar div.weather');
		
		if (swf_wt.size()) {
			swf_wt.flashembed({
			    src: 'img/swf/tempo.swf',
			    version: [6,0],
			    expressInstall: 'img/swf/expressinstall.swf',
			    wmode: 'transparent'
			});
		}
		
	} catch (e) {
		alert(e.name + ": " + e.message);
	}
	
});
