$(document).ready(function(){
	
	//$('#akcios_termekek_siteset').load("/index.php?m=18328&content=1");
	$('#akcios_termekek_siteset').load("/index.php?m=18328&content=1", function() {
		$('#akcios_termekek_siteset ul').bxSlider({
			alignment: 'horizontal',        // 'horizontal', 'vertical' - direction in which slides will move
			controls: false,                 // determines if default 'next'/'prev' controls are displayed
			speed: 700,                     // amount of time slide transition lasts (in milliseconds)
			pager: false,                    // determines if a numeric pager is displayed
			margin: 5,                      // if 'horizontal', applies a right margin to each slide, if 'vertical' a
																			// bottom margin is applied. example: margin: 50
			next_text: '',              // text to be displayed for the 'next' control
			next_image: '',                 // image to be used for the 'next' control
			prev_text: '',              // text to be displayed for the 'prev' control
			prev_image: '',                 // image to be used for the 'prev' control
			auto: true,                    // determines if slides will move automatically
			pause: 3500,                    // time between each slide transition (auto mode only) 
			auto_direction: 'next',         // order in which slides will transition (auto mode only)
			auto_hover: true,               // determines if slideshow will pause while mouse is hovering over slideshow
			auto_controls: false,           // determines if 'start'/'stop' controls are displayed (auto mode only)
			ticker: true,                  // determines if slideshow will behave as a constant ticker
			ticker_controls: false,         // determines if 'start'/'stop' ticker controls are displayed (ticker mode only)
			ticker_direction: 'next',       // order in which slides will transition (ticker mode only)
			ticker_hover: true,             // determines if slideshow will pause while mouse is hovering over slideshow
			stop_text: 'stop',              // text to be displayed for the 'stop' control
			start_text: 'start',            // text to be displayed for the 'start' control
			wrapper_class: 'bxslider_wrap'  // class name to be used for the outer wrapper of the slideshow
		});
	});
	
	$('#right_banner').load("index.php?m=19056&content=1");
	$('#kedvencekhez').jFav();
	$('.hircim').corner("7px");
	$('.button').corner("20px");
	//pdfIcon();
	//loadMenu('html');
	//loadMenu2();
	//setMenuValue();
	//getMenuValue();
});

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
	else return 0;
  }
}
function pdfIcon() {
	var site=getQueryVariable('m');
	switch(site)
		{
			case '18202':
			$("#kozlemenyek a[href*=fajl.php]:contains('PDF')").addClass('pdf');
			break;
			default:
		}
}

function loadMenu2() {
		//alert($.cookie('menu'));
		var theMenu = $('#HTMLmenu').html();
		$('#header').html(theMenu);
}
function setMenuValue() {
	$.setCookie('menu', '1', {expires: 365})
}
function getMenuValue() {
	alert($.cookie('menu'));
}
function loadMenu(TYPE) {
	
	var COOKIE_NAME = 'menu';
	var options = { domain: 'gepeszunio.hu', path: '/', expires: 365, secure: 1 };
	var topmenu = $.cookie(COOKIE_NAME);
	
if (topmenu==null) {
		if (TYPE=='html') {
			topmenu = 1;
			$.setCookie(COOKIE_NAME, topmenu, options);
		} else {
			topmenu = 0;
			$.setCookie(COOKIE_NAME, topmenu, options);
		}
	}
	
	if (topmenu==0) {
		var theMenu = $('#FLASHmenu').html();
		$('#header').html(theMenu);
	}
	
	if (topmenu==1) {
		var theMenu = $('#HTMLmenu').html();
		$('#header').html(theMenu);
	}
}
/*function loadMenu(TYPE) {
	
	var COOKIE_NAME = 'menu';
	var options = { path: '/', expires: 365, secure: 1 };
	var topmenu = $.cookie(COOKIE_NAME);
	
	if (topmenu==null && TYPE==null) {
		$.cookie(COOKIE_NAME, 0, options);
	}
	if (TYPE=='flash') {
		$.cookie(COOKIE_NAME, 1, options);
	}
	
	
	if (topmenu==1) {
		var theMenu = $('#FLASHmenu').html();
		$('#header').html(theMenu);
	}
	if (topmenu==0) {
		var theMenu = $('#HTMLmenu').html();
		$('#header').html(theMenu);
	}
}*/
