
$(document).ready(function(){
	jQuery(function($){$(".post_code").mask("99-999");});
	$('textarea.grippe:not(.processed)').TextAreaResizer();

	$('#newsletter_email').click( function (){ if( $( this ).val() == 'wpisz swój adres e-mail' ){ $( this ).val(""); }	});

	// podswietlenie wiersza w tabeli po najechaniu myszką
	$('table.school_list tr.element').mouseover( function(){ $( this ).addClass('onmouseover');	});
	$('table.school_list tr.element').mouseout( function(){ $( this ).removeClass('onmouseover'); });

	// block - wyszukiwarki
	$('#searchBlock').click( function(){ $('#searchBlockForm').slideToggle(); });


	// obsługa lewego menu
	$('div.menu_left div.menu_left2 div.list2').mouseover( function(){ $( this ).addClass('over');	});
	$('div.menu_left div.menu_left2 div.list2').mouseout( function(){ $( this ).removeClass('over'); });
	$('div.menu_left div.menu_left3 div.list3').mouseover( function(){ $( this ).addClass('over');	});
	$('div.menu_left div.menu_left3 div.list3').mouseout( function(){ $( this ).removeClass('over'); });
	$('div.menu_left div.menu_left2').css('display', 'none');
	$('div.menu_left div.menu_left3').css('display', 'none');
	$('div.menu_left div.list1').click( function(){ $('#id_menu_'+$( this ).attr('list') ).slideToggle(); });
	$('div.menu_left div.list2').click( function(){ $('#id_menu_'+$( this ).attr('list') ).slideToggle(); });


	$('#slide_holder').agile_carousel({
		alt_attributes: "Highly Customizable,JQuery UI Transition Types & Effects,Automated Setup",
		continue_timer_after_click: "no",
		first_slide_is_intro: "no",
		first_last_buttons: "no",
		hover_next_prev_buttons: "no",
		intro_timer_length: 0,
		intro_transtion: "fade",
		next_prev_buttons: "no",
		php_doc_location: "/make_slides.php",
		pause_button: "np",
		remove_content: "no",
		slide_buttons: "no",
		//slide_captions: "JQuery Carousel Plugin|Agile Slide Types|JQuery UI Effects Available|Agile Settings|Carousel That's Built to Order", // not used. Usind "custom_data" instead
		slide_directory: "_images/header",
		slide_doctype: "xhtml",
		//slide_links: ",,http://agilecarousel.com,http://agilecarousel.com,http://agilecarousel.com", // not used. Using "custom data" instead
		slide_number_display: "no",
		stop_rotate_on_hover: "no",
		target_attributes: "_self,_blank,_self",
		timer_length: "5000",
		transition_duration: 2000,
		transition_easing: "swing",
		transition_type: "fade",
		water_mark: "no"
	});



});

function addFavorite(){
	if( document.all ){
		javascript:window.external.addFavorite( 'http://www.oswiataniepubliczna.pl' , 'Oświata Niepubliczna');
	} else{
		alert('Wymagany Internet Explorer');
	}
}


