$.fn.rss_parse = function(settings) {

	settings = jQuery.extend({
		// Configuration related to overlay
		url: 'shared/inc/news.php?site=site_gshs&element=web',
		id : this,
		count:	1
	},settings);
	
	$.ajax({
		type: "GET",
		url: settings.url,
		dataType: "xml",
		success: parseXml
	});
	
	function parseXml(xml) {
		var i = 1;			
		$(xml).find("channel").each(function() {
			$(settings.id).append("<h2>"+$(this).find("title:first").text()+"</h2>");
			$(xml).find("item").each(function() {
				$(settings.id).append("<h3>"+$(this).find("title").text()+"</h3><p>"+$(this).find("description").text().substring(0,250)+"...<a href='"+$(this).find("link").text()+"' target='_blank'>more</a></p>");
				if (i >= settings.count) { return false; }
				i++;
			});
		});
	};	
};
function check_notifications(db) { 
	$.post('ajax/shared/submits.php',{'notifications':db},
		function(notifications) { 
			$('.notifications').html(notifications);
		}
	);
} 
function active_tab(tab_id) {
	$(tab_id).addClass('active');
}
function reSize() {
	var oBody	=	ifrm.document.body;
	var oFrame	=	document.all("ifrm");
	oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight - oBody.clientHeight) + 400;
	if (oBody.clientHeight < 3) {
		oFrame.style.height = 1000;
	}			
}
function click_count(link,email) {
	$.ajax({
		type: "GET",
		url: "shared/inc/click_count.php?link="+link+"&email="+email,
		dataType: "text/xml"
	});
}
function confirm_diag(msg) {
	if (confirm (msg))
		return true
	else
		return false
}
