document.observe('dom:loaded', function() {
	$$('.pt-image-right').each(function(el) {
		new Tip(el.down('.pt-target'), el.down('.pt-popup'), {
			hook: { tip: 'bottomLeft', target: 'topRight' },
			offset: { x: -25, y: -100 },
			hideOn: { element: 'body', event: 'click' },
			images: '/fileadmin/template/images/prototip/styles/default/',
			javascript: '',
			hideAfter: .500,
			hideOthers: true,
			border: 0,
			radius: 0,
			delay: 0,
			width: 200,
closeButton: true
		});

		el.down('.pt-target').observe('prototip:shown', function() {
			document.onclick = Tips.hideAll;
		}); 
	});

	$$('.pt-image-left').each(function(el) {
		new Tip(el.down('.pt-target'), el.down('.pt-popup'), {
			hook: { tip: 'bottomRight', target: 'topLeft' },
			offset: { x: 25, y: -100 },
			hideOn: { element: 'body', event: 'click' },
			images: '/fileadmin/template/images/prototip/styles/default/',
			javascript: '',
			hideAfter: .500,
			hideOthers: true,
			border: 0,
			radius: 0,
			delay: 0,
			width: 200,
closeButton: true
		});

		el.down('.pt-target').observe('prototip:shown', function() {
			document.onclick = Tips.hideAll;
		}); 
	});

	$$('.mr-karma-wrap').each(function(el) {
		new Tip(el.down('.mr-karma-source'), el.down('.mr-karma-target'), {
			hook: { tip: 'topLeft', target: 'topRight' },
			offset: { x: 40, y: -80},
			hideOn: { element: 'body', event: 'click' },
			hideAfter: 0.5,
			hideOthers: true,
			border: 0,
			radius: 0,
			delay: 0,
			width: 480,
			height: 270
		});
		
		el.down('..mr-karma-target').observe('prototip:shown', function() {
			document.onclick = Tips.hideAll; console.log(el);
		}); 
	});
});

