jQuery.fsize = function(d_size){
	var fsize = $.cookie('fsize');
	var size;
	if(fsize){
		$('#wrapper').css('font-size',fsize);
		size = fsize;
		if(size=='15px'){
		$('.font_m img').attr("src", '/images/header/btn_fontM.gif');
		$('.font_l img').attr("src", '/images/header/btn_fontL_over.gif');
		}
		//alert(size);
	}else{
		if(d_size){
			$('#wrapper').css('font-size',d_size);
		}else{
			$('#wrapper').css('font-size','13px');
		}
	}
	$('.font_s').click(function(){
		$('#wrapper').css('font-size','10px');
		$.cookie('fsize','10px', {expires: 365, path: '/'});
		size = '10px';
		//alert(size);
		return false;
	});
	$('.font_m').click(function(){
		$('#wrapper').css('font-size','13px');
		$('.font_m img').attr("src", '/images/header/btn_fontM_over.gif');
		$('.font_l img').attr("src", '/images/header/btn_fontL.gif');
		$.cookie('fsize','13px', {expires: 365, path: '/'});
		size = '13px';
		//alert(size);
		return false;
	});
	$('.font_l').click(function(){
		$('#wrapper').css('font-size','15px');
		$('.font_m img').attr("src", '/images/header/btn_fontM.gif');
		$('.font_l img').attr("src", '/images/header/btn_fontL_over.gif');
		$.cookie('fsize','15px', {expires: 365, path: '/'});
		size = '15px';
		//alert(size);
		return false;
	});
	$("a[href$='.pdf']").addPdfIcon("after");
	$("a span.link").addLinkIcon("after");
	$("a[href^='http']").addTarget();
};
$.fn.extend(
{
	addPdfIcon: function(param)
	{
		var pdfElem = $(this);
		if(param == "after")
		{
			pdfElem.not(".noIcon").after("<span class='linkPDF'>&nbsp;</span>");
		}
		else if (param == "before")
		{
			pdfElem.not(".noIcon").before("<span class='pdfBefore'>&nbsp;</span>");
		}
		pdfElem.click(function()
		{
			this.target = "_blank";
		});
	}
});
$.fn.extend(
{
	addLinkIcon: function(param)
	{
		var linkElem = $(this);
		if(param == "after")
		{
			linkElem.not(".noIcon").after("<span class='linkEX'>&nbsp;</span>");
		}
		else if (param == "before")
		{
			linkElem.not(".noIcon").before("<span class='pdfBefore'>&nbsp;</span>");
		}
		linkElem.click(function()
		{
			this.target = "_blank";
		});
	}
});
$.fn.extend(
{
	addTarget: function(param)
	{
		var targetElem = $(this);
		targetElem.click(function()
		{
			this.target = "_blank";
		});
	}
});