// -*- coding:utf-8 -*-

$(document).ready( function(){	
		
		// RESERVED AREA
		$('.reserved-area').click( function(event) {
			event.preventDefault();
		});		
		
		// MENU handlers
		$('#navigation .has-children ul').hide();		
		
		/*$('#navigation .has-children .has-child').click(function(event) {
			event.preventDefault();
		});*/

		$('#navigation .has-children').hover(function() {
											$(this).find('ul').stop(true, true);									 		
									 		$(this).find('ul').fadeIn(200);
									 		$(this).find('.menu-children-top').stop(true, true);
									 		$(this).find('.menu-children-top').fadeIn(200);
									 		$(this).find('.has-child').css('color', '#0b0b0b');
									 }, function() {
									 		$(this).find('ul').stop(true, true);
									 		$(this).find('ul').fadeOut(200);
									 		$(this).find('.menu-children-top').stop(true, true);
											$(this).find('.menu-children-top').fadeOut(200);
									 		$(this).find('.has-child').css('color', '#2bbae1');
									 });
		
		$('#navigation .has-children li').mouseover(function() {
			$(this).find('a').css('color', '#0b0b0b');
		});
		
		$('#navigation .has-children li').mouseout(function() {
			$(this).find('a').css('color', 'white');
		});
		
		if ($('#container').height() < $(window).height() - 35) {
			$('#footer').css('position', 'absolute')
				.css('bottom', '0px');
		}
		
		$('#footer-navigation a:not(:last-child)').append(' |');
		
		label_inputs($('#newsletter-form'), 'Email');	
		
});

function label_inputs(el, value) {
    el.find('input:text, textarea').not('.rich-text').each(function() {
        $(this).example(value, {className: 'discreet'});
        // $(this).attr('title', '');
    });
}


/*$(window).resize( function() {
	if ($('#container').height() < $(window).height() - 35) {
			$('#footer').css('position', 'absolute')
				.css('bottom', '0px');
		}
});*/
