/**
 * tooltips
 */
 
 /**
  * tooltips (error boxes) for label-tags, if they have a class named 'error'
  * required:
  * + jquery.js
  * + jquery.qtip.js
  */
  
$(document).ready(function(){
$("label[class*='error'][title]")
	.qtip({
		style:
		{
			title:
			{
				'background-color':'#D91E36',
				'color':'white',
				'padding':'2px 2px 2px 10px'
			},
			tip:
			{
				corner: 'rightBottom',
				size:
				{
					x:10,
					y:10
				}
			},
			'color':'#D91E36',
			'background-color':'white',
			border:
			{
			   width: 1,
			   color: '#D91E36'
			}
		},
		position:
		{
			/*target: 'mouse',*/
      		corner: {target: 'rightTop', tooltip: 'rightBottom'},
      		adjust: {x: -10, y: 0}
		},
		show:
		{
			delay:0
		},
		content:
		{
			title:{text:'Fehler'}
		}
	})
	.mouseover(function(){
		$(this).css('cursor', 'help');
	});
});



$(document).ready(function(){

$("ul.fileList li[title], a.tooltip[title]")
	.each(function(){
		$(this)
			.qtip({
				style:
				{
					title:
					{
						'background-color':'white',
						'background':'url(../img/b_fragezeichen.gif) no-repeat 2px 2px',
						'color':'#0088CC',
						'padding':'2px 2px 2px 18px',
						'border-bottom':'1px dotted #7F9DB9'
					},
					tip:
					{
						'color':'#0088CC',
						corner: 'bottomLeft',
						size:
						{
							x:10,
							y:10
						}
					},
					'color':'#333333',
					'background-color':'white',
					border:
					{
					   width: 1,
					   color: '#7F9DB9'
					}
				},
				position:
				{
					target: 'mouse',
		      		corner: {target: 'bottomLeft', tooltip: 'bottomLeft'},
		      		adjust: {x: 15, y: 5}
				},
				show:
				{
					delay:0
				},
				content:
				{
					title: $(this).attr('title').split('\n',2)[0],
					text: $(this).attr('title').split('\n',2)[1]
			    }
			})
			.attr("title","")
	})
});

