function css() {

	/* go on for IE in generall */
	if($.browser.msie){
		
		/* take care IE 6 only */
		if($.browser.version <= 6) {
		
		}

		$('#page').prepend('<span class="x"></span>');

		$('#f-nav').corners({sufix:1});				
		$('#content').corners({sufix:2});				
	}

	$('a.cloud, img.cloud').cloud();

	
}

$(document).ready(css);

jQuery.fn.corners = function(option) {
	option = jQuery.extend({
		tl: 1,
		tr: 1,
		bl: 1,
		br: 1,
		sufix: 1
	}, option);	
	
	return this.each(function(i){	
		path = '/image/';
		
		if(option.tl)
			$(this).append('<img src="'+path+'img-cor-'+option.sufix+'-NW.png" class="corner corner-nw" />');
		if(option.tr)
			$(this).append('<img src="'+path+'img-cor-'+option.sufix+'-NE.png" class="corner corner-ne" />');
		if(option.bl)
			$(this).append('<img src="'+path+'img-cor-'+option.sufix+'-SW.png" class="corner corner-sw" />');		
		if(option.br)
			$(this).append('<img src="'+path+'img-cor-'+option.sufix+'-SE.png" class="corner corner-se" />');
	}); // each
};

jQuery.fn.extend({
	cloud: function() {
		$('body').prepend('<div id="cloud"></div>');
		$(this).mouseover(function(e){
		
			cloudClass = $(this).attr('rel');
			/*
			if($(this).is('.cloud')){
				cloudTitle = $(this).text() || $(this).children().attr('alt');
				cloudTitle = '<strong>'+cloudTitle+'</strong>';
			}
			if($(this).is('.overcloud')){
				cloudTitle = $(this).children('.cloud-desc').text();			
				cloudTitle = '<strong>'+cloudTitle+'</strong>';
			}
			if($(this).is('.clearcloud')){ cloudTitle = ''; }
			*/
			cloudText = $(this).attr('title');
			
			$('#cloud').addClass(cloudClass).html('<p>'+cloudText+'</p>');
			$(this).attr('title','');
			
		});
		$(this).mousemove(function(e){
			var x, y;
			try { x = e.pageX-20; y = e.pageY-30; } // FF
			catch(e) { x = event.clientX-20; y = event.clientY-40; } // IE
		
			y = y+40+'px';
			x = x+40+'px';
			$('#cloud').css({ display: 'block', top: y, left: x})
		});
		
		$(this).mouseout(function(e){ 
			$('#cloud').removeClass().css({ display: 'none'}); 
			cloudText = $('#cloud p').text();
			$(this).attr('title',cloudText);
		});	
	} // cloud()
});	