function getContent(arg) {
$.historyLoad(arg);
}

function pageload(hash) {
		if(hash)	{
			window.scrollTo(0,0);
			$("#loader").fadeIn('fast');
			$("#tmp").fadeOut("fast",function() {
			$("#tmp").load('get.php?p='+hash,function() {
			$("#loader").fadeOut('fast',function() {
			$("#tmp").fadeIn("fast");
			initAjaxLinks();
			initforms();
			if (hash == 'elerhetosegek')
			{
				ginitialize();
			}

			});
			});
			});
					}

	else	{
			document.getElementById("tmp").style.display = "block";
			}

						}


function initAjaxLinks() {
			$("#tmp a[@rel='a']").click(function(){
				var temphash = this.href;
				hashit(temphash);
				$.historyLoad(hash);
				return false;
			});
		}

function initforms() { 
			$("form[@name='ajax_form']").ajaxForm({ 
				target: '#tmp', 
				success: function() { 
					$('#tmp').fadeIn('fast'); 
				} 
			}); 
		};

$(document).ready(function(){
			$.historyInit(pageload);
			$("a[@rel='a']").click(function(){
				var temphash = this.href;
				hashit(temphash);
				$.historyLoad(hash);
				return false;
			});
		});

// other functions

function show_message(html)
	{
		$.blockUI({ message: (html) }); 
	}

function hide_message()
	{
		$.unblockUI();
	}

function popload(mit)
	{
		$.get(mit,function(html){show_message(html);});
	}


function slideload(mit,hova) {
		$.get(mit,function(html) 
		{	
			$('#'+hova).html(html);
			$('#'+hova).slideDown('slow');	
		});
	} 

function slideloadback(hova) {
			$('#'+hova).slideUp('slow');
//			location.reload(); 
	} 


function noekezet(str)
{
var accent=new Array("í","Í","ö","Ö","ü","Ü","ó","Ó","ő","Ő","ú","Ú","á","Á","é","É","ű","Ű"," ",";","\"","/");
var deaccent=new Array("i","I","o","O","u","U","o","O","o","O","u","U","a","A","e","E","u","U","_","_","-","-");
return str_replace(accent,deaccent,str);
}

