﻿$(function() {
	$("img.context-tooltip").each(function() {
		var a = $(this);
		a.qtip({
			content: {
				text: String.format('<img class="throbber" src="{0}/assets/images/spinner.gif" alt="Loading..." />', getApplicationURL()),
				url: String.format("{0}/ContextHelpLinkResource.aspx?ResourceKey=" + a.next("span").html(), getApplicationURL()),
				title: {
					text: a.attr("title"),
					button: "Close"
				}
			},
			position: {
				corner: {
					target: "bottomMiddle",
					tooltip: "topMiddle"
				},
				adjust: {
					screen: true
				}
			},
			show: {
				when: "click",
				solo: true
			},
			hide: "unfocus",
			style: {
				tip: true,
				padding:0,
                background: '#ffffff',
                color: 'black',
				border: {
					width: 0,
					radius: 4
				},
				name: "light",
				width: 570
			}
		})
	})
});
