	$(document).ready(function(){
		
		$('a[rel=external]').attr('target', '_blank');

		//horizontalmenu leugrojanak hovere
		$(".horizontalmenu_dropdown ul li").hover(function() { //handlerIn
		    Cufon.replace(this, {
		      color: '#000000'            
		    });
		  }, function() {  //handlerOut
		    Cufon.replace(this, {
		      color: '#ffffff'            
		    });
		  });
		//////////

		//naptar honapvalasztas leugroja
		$(".calendarDateSelectRows").hover(function() { //handlerIn
		    Cufon.replace(this, {
		      color: '#000000'            
		    });
		  }, function() {  //handlerOut
		    Cufon.replace(this, {
		      color: '#ffffff'            
		    });
		  });
		//////////

		//naptar havi felsorolas
		
    Cufon.replace('.showCalendarMonthsTitle', { color: '#6A205D' });
		
		$(".showCalendarMonthsTitle").hover(function() { //handlerIn
		    Cufon.replace(this, {
		      color: '#111111'
		    });
		  }, function() {  //handlerOut
		    Cufon.replace(this, {
		      color: '#6A205D'            
		    });
		  });
		//////////

		$('.eoselect').sSelect({ddMaxHeight: '300px'}); //{ddMaxHeight: '300px'}
		
		$('.footerContact').click(function(){
			$(this).val('');
			//$(this).removeClass('footerContact');
			//$(this).unbind('click');
			$(this).css('color', '#000000');
			//alert('asd');
			});
		
		//////////
		$('.contactFormText').click(function(){
			$(this).val('');
			//$(this).removeClass('footerContact');
			$(this).unbind('click');
			$(this).css('color', '#000000');
			//alert('asd');
			});

		$('.contactFormTextArea').click(function(){
			$(this).val('');
			//$(this).removeClass('footerContact');
			$(this).unbind('click');
			$(this).css('color', '#000000');
			//alert('asd');
			});

		$('.contactFormTextBan').click(function(){
			$(this).val('');
			//$(this).removeClass('footerContact');
			$(this).unbind('click');
			//$(this).css('color', '#000000');
			//alert('asd');
			});

		$('.contactFormTextAreaBan').click(function(){
			$(this).val('');
			//$(this).removeClass('footerContact');
			$(this).unbind('click');
			//$(this).css('color', '#000000');
			//alert('asd');
			});
		
		$('#headernewsletter').click(function(){
			$('#wrapper').append('<div style="dsiplay:none;" id="headernewsletterTemp">'+$(this).val()+'</div>');
			$(this).val('');
			});
		
		$('#headernewsletter').blur(function(){
			if($(this).val() == '')
				{
					var defaulttext = $('#headernewsletterTemp').html();
					$(this).val(defaulttext);
				}
			});

		$('#headersearch').click(function(){
			$('#wrapper').append('<div style="display:none;" id="headersearchTemp">'+$(this).val()+'</div>');
			$(this).val('');
			});

		$('#headersearch').blur(function(){
			if($(this).val() == '')
				{
					var defaulttext = $('#headersearchTemp').html();
					$(this).val(defaulttext);
				}
			});

		//////////
		
		var wrapperInnerHeight = $('#wrapper_inner').height();
		//alert(wrapperInnerHeight);
		wrapperInnerHeight = parseInt(wrapperInnerHeight);
		$('.defaultbox').css('min-height',(wrapperInnerHeight-3)+'px');
		
		//h3 atalakitasa
		var h3value = $('.contentblockseperate h3').html(function(i, val){

		//h3valueArray = val.split('</a>');
		//h3valueArray[1]
		h3valueNew = '<span class="eotvosh3plus">'+val+'</span>';
		//alert(h3valueNew);
		$(this).html(h3valueNew);

		});
		
		//h3 atalakitasa
		var h3value = $('.eotvosh3').html(function(i, val){


		h3valueArray = val;
		h3valueNew = '<span style="border:1px solid #41043d;background-image:url(data/eo/gfx/content-h3-bg.jpg);background-repeat:repeat-x;background-color:#41043d;padding:1px 10px 4px 21px;">'+h3valueArray+'</span>';
		//alert(h3valueNew);
		$(this).html(h3valueNew);

		});
		
		//periodicScroller('eotvos',600,5000);

	});
	
	function startProgramsCategory(textvalue)
		{
			docWidth = $(document).width();
			docHeight = $(document).height();
			$('#wrapper').append('<div style="width:100%;height:100%;position:absolute;top:0px;left:0px;background-color:#000000;opacity:0.4;filter:alpha(opacity=40);" id="popupContainer"></div>');
			$('#wrapper').append('<div style="width:500px;height:300px;position:absolute;top:200px;left:'+((docWidth-500)/2)+'px;background-color:#ffffff;" id="popupContent"></div>');
			//'+((docHeight-300)/2)+'

			$.ajax({
			  url: 'modules_extra/eo_programs/eo_programs_ajax_categories.php?textvalue=' + textvalue,
			  success: function(data) {
			    $('#popupContent').html(data);
			    //alert('Load was performed.');
			  }
			});

			//alert(textvalue);
		}
	
	function categoriesCheckbox()
		{
			
   		$('#text3').val('');
			$('.programsCategoriesCheckbox').attr('checked', function(i, val) {
				//alert(i);

			   if(val == true)
			   	{
			   		//alert(this.value);
			   		$('#text3').val($('#text3').val()+this.value+',');
			   		/*
			   		//alert(i);
			   		if(cbvalue > '')
			   			{
					   		$('#text3').val(i);
			   				//var cbvalue = cbvalue+','+i;
			   			}
			   		else
			   			{
			   				var cbvalue = i;
			   			}
			   		//alert();
			   		//var currenttextvalue = $('#categoriesAjax').val();
			   		*/
			   	}
			   		//$('#categoriesAjax').val(cbvalue);
			   		
			});

   		//$('#text3').val(cbvalue);
			
			return;

			 var checkboxes = document.getElementsByClassName("programsCategoriesCheckbox");
			 for (var i=0; i<checkboxes.length; i++) {
			   var cb = checkboxes[i];
			   var ischecked = $(cb).attr('checked');
			   //var cbvalue = 0;
			   if(ischecked == true)
			   	{
			   		if(cbvalue > '')
			   			{
			   				var cbvalue = cbvalue+','+$(cb).val();
			   			}
			   		else
			   			{
			   				var cbvalue = $(cb).val();
			   			}
			   		//alert();
			   		//var currenttextvalue = $('#categoriesAjax').val();
			   	}
			   		//$('#categoriesAjax').val(cbvalue);
			   		
			   		$('#text3').val(cbvalue);
			   		
			   /*
			   if (cb.getAttribute("value") &&
			       anchor.getAttribute("rel") == "external")
			     anchor.target = "_blank";
			     */
					//alert(cb.getAttribute("value"));
			 }


			//alert('asd');
			//programsCategoriesCheckbox
			//$('.programsCategoriesCheckbox').attr('checked', true);
		}

	function removePopup()
		{
	 		$('#popupContainer').remove();
	 		$('#popupContent').remove();
		}


	function setEoDropdown(thisDatas,menunumber)
		{
			var dropDownParentWidth = $(thisDatas).width();
			//$('#eo_dropdown_'+menunumber).animate({width:dropDownParentWidth+"px",height:"29px"}, 1000);
			$('#eo_dropdown_'+menunumber).css('width', (dropDownParentWidth+14)+'px');
			//$('#eo_dropdown_'+menunumber).css('height', '29px');
			$('#eo_dropdown_'+menunumber).css('border-bottom', '2px solid #161616');
			$('#eo_dropdown_'+menunumber).css('display', 'block');
			//alert();
		}

	function clearEoDropdown(menunumber)
		{
			$('#eo_dropdown_'+menunumber).css('display', 'none');
			//alert();
		}
	
	function setEoDropDownPlus(thisDatas,divId)
		{
			return;
			divWidth = $(thisDatas).width();
			divHeight = $(thisDatas).height();
			$('#'+divId).css('width',divWidth+'px');
			$('#'+divId).css('height',divHeight+'px');
		}

	function dropDownCalendarSelect()
		{
			$('.dropDownCalendarSelectOptions').css('display', 'block');
		}

	function loadCalendar(year,month,calendarValue)
		{
			//alert(year);
			$('.dropDownCalendarSelectOptions').css('display', 'none');
			//alert('asd');
			$('#calendarbox').css('position','relative');
			//var divcontent = '<img src="data/eo/gfx/progress-bar.gif" alt="" title="" />';
			var divcontent = 'BETÖLTÉS ...';
			$('#calendarbox').append('<div style="position:absolute;top:0px;left:0px;width:100%;height:100%;background-color:#000000;" class="opacity40p" id="opacityDivContainer"></div>');
			$('#calendarbox').append('<div style="position:absolute;top:0px;left:0px;width:100%;font-size:14px;font-weight:bold;text-align:center;padding:80px 0px 0px 0px;" id="opacityDivContent">'+divcontent+'</div>');

			$.ajax({
			  url: 'modules_extra/eo_calendar/eo_calendar_load_ajax.php?year=' + year + '&month=' + month,
			  success: function(data) {
			    $('#calendarAjaxContainer').html(data);
			    $('#opacityDivContainer').remove();
			    $('#opacityDivContent').remove();
					$('#calendarCurrentMonth').text(calendarValue);

			    Cufon.replace("#calendarCurrentMonth", { color: '#ffffff' });

			  }
			});
		}

	function footerContactSend(errorMessage)
		{
			return;
			$('.footerContact').val('');
			var textValue1 = $('#footerContactText1').val();
			var textValue2 = $('#footerContactText2').val();
			var textAreaValue = $('.footerContactTextArea').val();
			
			if(textValue1 == '' || textValue2 == '' || textAreaValue == '')
				{
					alert(errorMessage);
				}
			else
				{
					$("form").submit();
					//$('#footerContactSubmit').trigger('click');
				}
		}

