jQuery(document).ready(function($) {
	
	//prevent default on links with # as href
	$('body a[href=#]').click(function(event) { event.preventDefault(); });
	
	//ticker
	$('.ticker ul').liScroll();
	
	//set border to content height
	$('#content .content').each(function() {
		var sh = $('#sidebar').innerHeight();	//sidebar height
		
		//make sure content is atleast as tall as the sidebar
		if(sh > $(this).innerHeight()) { $(this).height(sh); }
		
		//get content height
		var h = $(this).innerHeight();
		
		//set border height to that of content
		//$(this).find('#border-left, #border-right').height(h-215);
		$(this).find('#border-left, #border-right').css('min-height', h-215);
	});
	
	//set sidebar min height
	$('#sidebar').css('min-height', $('#content').height());
	$('#sidebar #lizard').css('bottom', '0');
			
	//login form
	$('#sidebar .login form').each(function() {
		var form = $(this);
		
		form.find('input[type=text], input[type=password]').each(function() {
			var d = $(this).val();
			
			$(this).focus(function() {
				if($(this).val() == d) { $(this).val(''); }
			});
			
			$(this).blur(function() {
				if($(this).val() == "") { $(this).val(d); }
			});
			
		});
		
		form.find('.x-send').click(function(e) {
			form.submit();
		});
		
	});
	
	$('#shopp ul.views').hide();
	
});

