﻿function disableEnterKey(e) {
	var key;
	if (window.event)
		key = window.event.keyCode; //IE
	else
		key = e.which; //firefox     

	return (key != 13);
}

function validateMe(frm) {
	if (frm.search.value.length == 0) {
		return false;
	}
}

(function ($) {
	$.fn.customFadeIn = function (speed, callback) {
		$(this).fadeIn(speed, function () {
			if (jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if (callback != undefined)
				callback();
		});
	};
	$.fn.customFadeOut = function (speed, callback) {
		$(this).fadeOut(speed, function () {
			if (jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if (callback != undefined)
				callback();
		});
	};
})(jQuery);


$().ready(function () {
	$('#dialog').jqm({ modal: true, onShow: function (h) {
		h.w.customFadeIn(888, function () {
			//no more fiddling with attributes here
		});
	}, onHide: function (h) {
		h.o.remove(); h.w.customFadeOut(888, function () {
			//no more fiddling with attributes here
		});
	}
	});
	$('#dialog2').jqm({ modal: true, trigger: 'a#feedbacktrigger', onShow: function (h) {
		h.w.customFadeIn(888, function () {
			//no more fiddling with attributes here
		});
	}, onHide: function (h) {
		h.o.remove(); h.w.customFadeOut(888, function () {
			//no more fiddling with attributes here
		});
	}
	});
});

