var Unesco = {};
Unesco.main = {
	init: function(){
		this.prepareNews();	
		this.prepareContactForm();
	},
	prepareNews: function(){
		$( '.news-container' ).each( function(){
				$( this ).find( '.news-content' ).hide();
				$( this ).find( '.news-toggler' ).click( function(){
					if( $( this ).prev().is( ':hidden' ) ){
						$( this ).prev().prev().slideToggle( 300, function(){
							$( this ).next().slideToggle( 500 );											   
						} );
					}else{
						$( this ).prev().slideToggle( 500, function(){
							$( this ).prev().slideToggle( 300 );											   
						} );						
					}
				} );
		} );
	},
	prepareContactForm: function () {
        $('.contact-form').hide();
        $('.toggler').click(function () {
            $('.contact-form').toggle();
        });
    }
}
$( document ).ready( function(){
	Unesco.main.init();						  
} );
