eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(1($){$.x.O=1(c){5 d={P:\'r\'};5 e=$.Q(d,c);2.j("R").g(1(i){5 b=$(2);3(b.4("6").k>0){b.4("a").l(1(){b.4("6").r(y)});b.4("6").g(1(){5 a=$(2);3(a.4("6").k>0){a.4("a").l(1(){a.4("6").r(y)})}})}});2.j("a").g(1(){3($(2).7(\'8\')&&$(2).7(\'8\')!=\'\'){$(2).l(1(){s({h:9,f:$(2).7(\'8\'),t:\'z\',m:9});A B})}});$("#S 6").j("a").g(1(){3($(2).7(\'8\')&&$(2).7(\'8\')!=\'\'){$(2).l(1(){s({h:9,f:$(2).7(\'8\'),t:\'z\',m:9});A B})}})};$.x.C=1(){2.g(1(){5 a=$(2).T();$(2).u(1(){a.U(\'u\')},1(){a.V(\'u\')})})}})(W);1 s(b){3(D!=b.f){3(b.h){5 c=$(\'#\'+b.t);3(!b.m)E();3(b.n)b.n.h=9;X b.n={h:9,d:F.Y(Z*F.10())};$.11(\'12/\'+b.f+(b.f==\'13\'?\'.14\':\'.G\'),b.n,1(a){3(a.k>0){c.G(a);c.o();3(!b.m)H();$(".15-16 p.v").C();$(\'#17\').18()}})}}D=b.f}1 E(){3($("I").j(\'#q\').k==0){$("I").J("<p K=\\"q\\" 19=\\"1a\\"/>").J("<p K=\'w\'><v 1b=\'/v/1c.1d\' /></p>");$(\'#q\').o();$(\'#w\').o()}}1 H(){$("#w").L();$(\'#q\').L()}1 1e(a){$(\'#M\'+N).1f();$(\'#M\'+a).o();N=a}',62,78,'|function|this|if|children|var|ul|attr|rel|true||||||page|each|ajax||find|length|click|noshadow|params|show|div|TB_overlay|slideToggle|loadDiv|destination|hover|img|TB_load|fn|100|mainContent|return|false|takeProductHover|lastLoaded|showShadow|Math|html|hideShadow|body|append|id|remove|megye_|lastMegye|setLinks|toggleAction|extend|li|footer|parent|addClass|removeClass|jQuery|else|round|10000|random|get|pages|viszonteladok|php|highlighted|product|terkep|media|class|TB_overlayBG|src|loadingAnimation|gif|ShowViszonteladok|hide'.split('|'),0,{}));

(function($) {
	$.fn.setLinks = function(options) {
		var defaults = {
			toggleAction:'slideToggle'
		};
		var opts = $.extend(defaults, options);
		
		this.find("li").each(function(i) {
			var me = $(this);

			if (me.children("ul").length > 0){
				me.children("a").click(function(){
					me.children("ul").slideToggle(100);
					return false;
				});
				me.children("ul").each(function(){
					var child = $(this);
					if (child.children("ul").length > 0) {
						child.children("a").click(function(){
							child.children("ul").slideToggle(100);
							return false;
						});
					}
				});
			}
		});
		//add click's action
		this.find("a[rel!=link]").each(function() {
			$(this).click(function(){
				var hash = this.href;
				hash = hash.replace(/^.*#/, '');
				$.historyLoad(hash);
				return false;
			})
		});
	};
})(jQuery);

function pageload(hash) {
	if(hash) {
		loadDiv({ajax:true, page:hash, destination:'mainContent', noshadow:true});
	} else {
		loadDiv({ajax:true, page:'magunkrol', destination:'mainContent', noshadow:true});
	}
}

/*
 * jQuery history plugin
 *
 * Copyright (c) 2006 Taku Sano (Mikage Sawatari)
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Modified by Lincoln Cooper to add Safari support and only call the callback once during initialization
 * for msie when no initial hash supplied.
 */

jQuery.extend({
	historyCurrentHash: undefined,
	
	historyCallback: undefined,
	
	historyInit: function(callback){
		jQuery.historyCallback = callback;
		var current_hash = location.hash;
		
		jQuery.historyCurrentHash = current_hash;
		if(jQuery.browser.msie) {
			// To stop the callback firing twice during initilization if no hash present
			if (jQuery.historyCurrentHash == '') {
			jQuery.historyCurrentHash = '#';
		}
		
			// add hidden iframe for IE
			$("body").prepend('<iframe id="jQuery_history" style="display: none;"></iframe>');
			var ihistory = $("#jQuery_history")[0];
			var iframe = ihistory.contentWindow.document;
			iframe.open();
			iframe.close();
			iframe.location.hash = current_hash;
		}
		else if ($.browser.safari) {
			// etablish back/forward stacks
			jQuery.historyBackStack = [];
			jQuery.historyBackStack.length = history.length;
			jQuery.historyForwardStack = [];
			
			jQuery.isFirst = true;
		}
		jQuery.historyCallback(current_hash.replace(/^#/, ''));
		setInterval(jQuery.historyCheck, 100);
	},
	
	historyAddHistory: function(hash) {
		// This makes the looping function do something
		jQuery.historyBackStack.push(hash);
		
		jQuery.historyForwardStack.length = 0; // clear forwardStack (true click occured)
		this.isFirst = true;
	},
	
	historyCheck: function(){
		if(jQuery.browser.msie) {
			// On IE, check for location.hash of iframe
			var ihistory = $("#jQuery_history")[0];
			var iframe = ihistory.contentDocument || ihistory.contentWindow.document;
			var current_hash = iframe.location.hash;
			if(current_hash != jQuery.historyCurrentHash) {
			
				location.hash = current_hash;
				jQuery.historyCurrentHash = current_hash;
				jQuery.historyCallback(current_hash.replace(/^#/, ''));
				
			}
		} else if ($.browser.safari) {
			if (!jQuery.dontCheck) {
				var historyDelta = history.length - jQuery.historyBackStack.length;
				
				if (historyDelta) { // back or forward button has been pushed
					jQuery.isFirst = false;
					if (historyDelta < 0) { // back button has been pushed
						// move items to forward stack
						for (var i = 0; i < Math.abs(historyDelta); i++) jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop());
					} else { // forward button has been pushed
						// move items to back stack
						for (var i = 0; i < historyDelta; i++) jQuery.historyBackStack.push(jQuery.historyForwardStack.shift());
					}
					var cachedHash = jQuery.historyBackStack[jQuery.historyBackStack.length - 1];
					if (cachedHash != undefined) {
						jQuery.historyCurrentHash = location.hash;
						jQuery.historyCallback(cachedHash);
					}
				} else if (jQuery.historyBackStack[jQuery.historyBackStack.length - 1] == undefined && !jQuery.isFirst) {
					// back button has been pushed to beginning and URL already pointed to hash (e.g. a bookmark)
					// document.URL doesn't change in Safari
					if (document.URL.indexOf('#') >= 0) {
						jQuery.historyCallback(document.URL.split('#')[1]);
					} else {
						var current_hash = location.hash;
						jQuery.historyCallback('');
					}
					jQuery.isFirst = true;
				}
			}
		} else {
			// otherwise, check for location.hash
			var current_hash = location.hash;
			if(current_hash != jQuery.historyCurrentHash) {
				jQuery.historyCurrentHash = current_hash;
				jQuery.historyCallback(current_hash.replace(/^#/, ''));
			}
		}
	},
	historyLoad: function(hash){
		var newhash;
		
		if (jQuery.browser.safari) {
			newhash = hash;
		}
		else {
			newhash = '#' + hash;
			location.hash = newhash;
		}
		jQuery.historyCurrentHash = newhash;
		
		if(jQuery.browser.msie) {
			var ihistory = $("#jQuery_history")[0];
			var iframe = ihistory.contentWindow.document;
			iframe.open();
			iframe.close();
			iframe.location.hash = newhash;
			jQuery.historyCallback(hash);
		}
		else if (jQuery.browser.safari) {
			jQuery.dontCheck = true;
			// Manually keep track of the history values for Safari
			this.historyAddHistory(hash);
			
			// Wait a while before allowing checking so that Safari has time to update the "history" object
			// correctly (otherwise the check loop would detect a false change in hash).
			var fn = function() {jQuery.dontCheck = false;};
			window.setTimeout(fn, 200);
			jQuery.historyCallback(hash);
			// N.B. "location.hash=" must be the last line of code for Safari as execution stops afterwards.
			//      By explicitly using the "location.hash" command (instead of using a variable set to "location.hash") the
			//      URL in the browser and the "history" object are both updated correctly.
			location.hash = newhash;
		}
		else {
		  jQuery.historyCallback(hash);
		}
	}
});
