(function($) {
$(document).ready(function() {

	var $Layout = $('#Layout');
	var $LayoutInner = $('#LayoutInner');

	function moonglow(event) {
		$('#Moon')
			.css('top', '80px')
			.show()
			.animate(
				{ opacity : 1, top : '9px' },
				{ duration : 2000 },
				'easeInOut'
			);
		$('#Moonglow')
			.css('width', '379px')
//			.css('left', '608px')
			.show()
			.animate(
				{ opacity : 1, width : '479px' },
				{ duration : 1900 },
				'easeInOut'
			);
	}

	function HeaderDance() {
		$('#Star1')
			.css('opacity', 0)
			.animate(
				{ opacity : 0 },
				{ duration : 2300 }
			)
			.animate(
				{ opacity : 1, top : '22px' },
				{ duration : 1300, easing : 'easeOutElastic' }
			);
		$('#Star2')
			.css('opacity', 0)
			.animate(
				{ opacity : 0, top : '-15px' },
				{ duration : 2700 }
			)
			.animate(
				{ opacity : 1, top : '5px' },
				{ duration : 1900, easing : 'easeOutElastic' }
			);
		$('#Star3')
			.css('opacity', 0)
			.animate(
				{ opacity : 0, top : '-24px' },
				{ duration : 1500 }
			)
			.animate(
				{ opacity : 1, top : '4px' },
				{ duration : 2200, easing : 'easeOutElastic' }
			);
		$('#Moon')
			.css('opacity', 0)
			.animate(
				{ opacity : 1, top : '9px' },
				{ duration : 3000 },
				'easeInOut'
			);
//		$('#KustomFord').show().animate(
//			{ opacity : 1 },
//			3000,
//			'',
//			moonglow
//		);
	}

	HeaderDance();

/*
	$('#Navigation a').click(function(){
		var height = $Layout.height();
		var href = $(this).attr('href');

		if (href == '/') {
			href = '/home/';
		}

		if ( $Layout.is(':visible') ) {
			$Layout.animate(
				{ height: 30 },
				{	duration: 500,
					complete: function () {
						$LayoutInner.hide();
						$LayoutInner.load(
							href + "popUp",
							function(){
								$LayoutInner.show();
								$Layout.animate(
									{ height : $LayoutInner.height() },
									{ duration: 500 }
								);
							}
						);
					}
				}
			);
		} else {
			$LayoutInner
				.show()
				.animate(
					{ height : height },
					{ duration: 500 }
				);
		}

		return false;
	});
*/

});
})(jQuery);
