(function($){
	if (typeof($.fn.qtip) == "function") {
		$.fn.qtip.styles.tidiLight = {
			tip: 'topRight',
			border: {
				width: 0,
				radius: 5,
				color: '#e9e9e9'
			},
			background: '#e9e9e9',
			color: '#666666'
		}
	}
	$(document).ready(function(){
		if(typeof($.fn.reflect) == "function")
			$("[reflect]").each(function(){
				var self = $(this),
					rop = self.attr("reflect").split(":");
				if(rop){
					self.reflect({height:rop[0], opacity:rop[1]});	
				}else
					self.reflect();
			});
		if(typeof($.fn.qtip) == "function")
			$("[tip]").each(function(){
				var self = $(this)
				qto = self.attr("qto").split(":"),
				con = self.attr("tip");
				self.removeAttr("qto").qtip({ 
					content: con,
					style: { 
						name: qto[0]?qto[0]:"tidiLight",
						tip:qto[2]?qto[2]:'topRight'
					}, 
					position: {
				      corner: {
				         target: qto[1]?qto[1]:'bottomMiddle',
				         tooltip: qto[2]?qto[2]:'topRight'
				      }
				   }
				});
			})
	});
})(jQuery);

	


