jQuery(function(){ OsiTelecom._init(); });

var OsiTelecom = {
	_init: function() {
		try{
			OsiTelecom._png_fix();
			OsiTelecom._nav();
			OsiTelecom._tabs();
			
			document.onclick = OsiTelecom._close_item;
			
		}catch(e){
			var initial_e = e;
			try     {console.log('Error: ' + initial_e.description);}
			catch(e){alert('Error: ' + initial_e.description);}
		}
	},
	
	_png_fix: function(){
		if(!/msie [^6]\.0/i.test(navigator.userAgent) && /msie 6\.0/i.test(navigator.userAgent)){
		   $('h1 a, .bt_rss').addClass('pngfix');
		   DD_belatedPNG.fix('img, .pngfix');
		};
	},
	
	_nav: function(){
		$('#header ol li:has(ul) a').not($('#header ol li.open')).click(function(){
			if($(this).parent().find('ul').size()!=0){
				$('#header ol li ul').slideUp(300);
				$(this).parent().find('ul').slideDown(300);
				return false;
			}else{
				return true;
			};
		});
	},
	
	_close_item: function(e){
		var ev = e || window.event, target = ev.target;
		$('#header ol li:has(ul)').each(function(){
			if(target!=$(this).find('a')){
				$('#header ol li ul').slideUp(300);
			};
		});
	},
	
	_tabs: function(){
		$('#abas li').each(function(i){
			$('#content_abas div:eq(0)').show();
			$(this).find('a').click(function(){
				$(this).parent().parent().find('li a').removeClass('selected').end().end().end().addClass('selected');
				$('#content_abas div').hide().eq(i).show();
				return false;
			});
		});
	}
};





















