var site_url = 'http://www.kratschmer.com/'


$(document).ready(
	function()
	{
		$('.small-box.open-me').hover(
			function()
			{
				$(this).children('.content').stop().animate({
					height:'237px'
				}, 200);
			},
			function()
			{
				$(this).children('.content').stop().animate({
					height:'100px'
				}, 200);
			}
		);
		$('#second-nav').animate({
				top:'0px'
			}, 500,
			function()
			{
				$(this).css('z-index', '20')
			}
		);
		
		/*
		$('a.ajax-this').live('click',
			function()
			{
				var href = $(this).attr('href');
				var target = $(this).attr('data-target');
				window.location.hash = target;
				$('#second-nav ul li').removeClass('selected');
				$('#second-nav ul li a[data-target="' + target + '"]').parent().addClass('selected');
				return false;
			}
		);
		
		$('a.signup').live('click',
			function()
			{
				window.location.hash = $(this).attr('href');
				$('#second-nav ul li').removeClass('selected');
				return false;
			}
		);
		
		$(window).bind('hashchange', uri_change);
		$(window).trigger('hashchange');
		*/
	}
);
function uri_change()
{
	var $new_content;
	
	var $old_content;
	
	console.log(window.location);
	
	var href = site_url + window.location.hash.substring(1);
	
	
	
	
	if(window.location.hash != '')
	{
		$.get(href,
			function(data)
			{
				$new_content = $(data).find('#main-box #content').children();
				$new_content.css('opacity', '0');
				$('#main-box #content').children().animate({
						opacity:'0'
					},250,
					function()
					{
						$('#main-box #content').empty();
						$('#main-box #content').append($new_content);
						$('#main-box #content').children().animate({
								opacity:'1'
							},250
						);
					}
				);
			}
		);
	}
	else
	{
		
	}
	return false;

}

