$(function () {

	$(".search .input-text input").focus(function(){
		var title = $(this).attr("title");
		var value = $(this).val();
		if (title === value){
			$(this).val("");
		}
	}).blur(function(){
		var title = $(this).attr("title");
		var value = $(this).val();
		if ((value === "") || (title === value)){
			$(this).val(title);
		}
	});
	
	$(".subscribe .input-text").focus(function(){
		var title = $(this).attr("title");
		var value = $(this).val();
		if (title === value){
			$(this).val("");
		}
	}).blur(function(){
		var title = $(this).attr("title");
		var value = $(this).val();
		if ((value === "") || (title === value)){
			$(this).val(title);
		}
	});

	$(".aside .nav li:has(ul)").each(function(){
		$('a', this).first().click(function(){;
			$(this).parentsUntil('.aside .nav').siblings().find('ul').slideUp();
			$(this).parentsUntil('ul').find('ul').first().slideToggle('normal');
			return false;
		});
	});
		
	$(".to-reg-form").click(function(){
		$("#reg-form").slideDown();
		$("#au-form").slideUp();
		return false;
	});
	$(".to-au-form").click(function(){
		$("#reg-form").slideUp();
		$("#au-form").slideDown();
        return false;
	});
	
	// $(".error .close").click(function(){
		// $(this).parent().hide();
	// });
	
	$("#booking-b .input-button #cancel").click(function(){
		$.colorbox.close();
	});
	
	$('ul.tabs').each(function() {
		$(this).find('li').each(function(i) {
			$(this).click(function(){
				$(this).addClass('active').siblings().removeClass('active')
				.parents('div.tabs-b').find('div.tabs-item').hide().end().find('div.tabs-item:eq('+i+')').fadeIn(150);
				return false;
			});
		});
	});
	
	$('.session a').each(function() {
		$(this).hover(function(){
			$(this).parent().find('.price').show();
		}, function(){
			$(this).parent().find('.price').hide();
		});
	});
   
    $('a[rel="light_box"]').lightBox({
        fixedNavigation:true
	});

});
