/**
 * Shield jQuery plug-in.
 * @author Tibor Balogh
 */
(function($){
	var
		at = '&#'+'6'+'4;',
		sp = '//', h;

	$.fn.shield = function(){
		return this.each(function(){
			if (h = $(this.firstChild).html()){
				var
					items = h.split(sp);
					title = items[2]? items[2] : items[4]+at+items[5]+'.'+items[6];
				$(this).html(['<a href="',String.fromCharCode(109, 97, 105, 108, 116, 111, 58),items[3],String.fromCharCode(32,60),items[4],at,items[5],'.',items[6],String.fromCharCode(62,34,62),title,'</a>'].join(''));
			}
		});
	}
})(jQuery);

/**
 * Alapértelmezett JS könyvtár kinyerése.
 */
(function($){
	var
		basefile = 'jq.js',
		baseurl;

	$.getBaseUrl = function(jsfile){
		if (!baseurl || jsfile)
		{
			var js = jsfile || basefile;
			baseurl = $('script[src*="'+js+'"]:first').attr('src');
			baseurl = baseurl.substring(0, baseurl.indexOf(js));
		}
		return baseurl;
	};
})(jQuery);

/**
 * CSS fájl behúzása.
 */
(function($){
	$.addCSS = function(css){
		$('head').append('<link rel="stylesheet" type="text/css" href="'+css+'" media="screen" />');
	};
})(jQuery);



