window.addEvent('domready', function() {

	if (typeof(ep3_current_step) == 'number'){
		if ($('menupath')){
			if($('ep3_place_step3')){
				$('ep3_place_step3').addEvent('click', function(e) {
									window.location.href ='index.php';
								});	
			}
			var tabm = $('menupath');
			
			if(tabm){
				var search = tabm.getElement('tbody tbody td');			
				search.addEvent('click', function(e) {
									window.location.href ='/';
								});	
			
				if(ep3_current_step == 2){
				var tabs = tabm.getElement('tbody').getChildren();
				
					tabs.each(function(tab) {
						if(tab.hasClass('color1bot')){
							var img = tab.getElement('img');	
							
								img.addEvent('click', function(e) {
									window.location.href ='/';
								});
						}
					});	
				}	
				
			}	
		}	
	}
});
window.addEvent('domready', function() {

	if(typeof(ep3_current_step) == 'number' && ep3_current_step == 1){
		if ($('moreCriteria')){
			$('moreCriteria').setProperty('style', 'display:none');			
			$('lessCriteriaLink').setProperty('style', 'display:none');
			$('moreCriteriaLink').setProperty('style', '');
		}		
		if ($('udogodnienia')){
			$('udogodnienia').setProperty('style', 'display:none');			
			$('udogodnieniaLinkClose').setProperty('style', 'display:none');
			$('udogodnieniaLink').setProperty('style', '');
		}	
	}

});



window.addEvent('domready', function() {
	var tmp = $('formHome').getElements('.light');
	tmp.each(function(t) {
		t.addEvent('click', function(e) {
				if (t.get('value') == 'wpisz tu swój adres email' || t.get('value') == 'pytanie'){
					t.setProperty('value', '');
				}
				
				if ($('formHome').getElements('input.light').get('value') == 'wpisz tu swój adres email'){
					$('formHome').getElements('input.light').setProperty('value', '');
				}
			});
	});
	

});
window.addEvent('domready', function() {
    var tabs = 'Tabs';
    if ($(tabs)) {    
        var tabSheet = new TabNavigation({
            sNavId: tabs,
            sActiveClassName: 'active',
            sDisplayNoneClassName: 'hide',
            bAddClassToParentElement: 0
        });
        tabSheet.init();
    }		
});

function showList(listOpis){
    var opis = $(listOpis);
    var opisLink = $('link_'+listOpis);
    if(opis.style.display != "block"){
        opis.style.display = "block";
        opisLink.innerHTML = "schowaj"
    }
    else{ 
        opis.style.display = "none";
        opisLink.innerHTML = "więcej"
    }
}

