﻿jQuery().ready(function () {
	jQuery.ajaxSetup({
		type: "POST",
		contentType: "application/json; charset=utf-8",
		data: "{}",
		dataFilter: function (data) {
			var msg;
			if (typeof (JSON) !== 'undefined' && typeof (JSON.parse) === 'function') msg = JSON.parse(data);
			else msg = eval('(' + data + ')');
			if (msg.hasOwnProperty('d')) return msg.d;
			else return msg;
		},
		dataType: "json"
	});
});
jQuery(document).ready(function () {
	jQuery("input.hoverButton").hover(
			function () {
				hoverSrc = jQuery(this).attr("src").replace(/^(.+)(\.[a-zA-Z]+)$/, "$1_Hover$2");
				preloadImg = new Image();
				preloadImg.src = hoverSrc;
				jQuery(this).attr("src", hoverSrc);
			},
			function () {
				jQuery(this).attr("src", jQuery(this).attr("src").replace(/\_Hover/, ""));
			}
		)
}
)
