$(document).ready(function(){
	$('.blink').focus(function () {
			if ($(this).val() == $(this).attr('title')) {
				$(this).val('');
			}
		})
	$('.blink').blur(function () {
		if ($(this).val() == '') {
			$(this).val($(this).attr('title'));
		}
	})
	
	
	
	$('#sidebar .bottom').css({'height': $('#posts').height() + 'px'});
	
	
	$('.v1 #slider ul li').hover(
		function(){
			$(this).addClass('hover');
			$(this).find('.caption').show();
			$(this).css({'border-color':'#ea7513'});
			$(this).find('.bg').css({'height': $(this).height()+'px'});
		},
		function(){
			$(this).removeClass('hover');
			$(this).find('.caption').hide();
			$(this).css({'border-color':'#fff'});
		}
	);
	$('.v2 #slider ul li').hover(
		function(){
			$(this).addClass('hover');
			$(this).find('.bg').css({'height': $(this).height()+'px'});
			$(this).find('.entry').stop().animate({'height':'190px'},200, function(){				
				$(this).find('.caption').show();
				$(this).parents('li').css({'border-color':'#ea7513'});
			});
		},
		function(){
			$(this).removeClass('hover');
			$(this).find('.entry').stop().animate({'height':'140px'},200, function(){				
				$(this).find('.caption').hide();
				$(this).parents('li').css({'border-color':'#fff'});
			});
		}
	);
	
	
	$("#slider ul").jcarousel({
		scroll: 1,
		wrap: 'both',
		auto: 7,
		initCallback: mycarousel_initCallback,
		buttonNextHTML: null,
		buttonPrevHTML: null
    });
	
});

function mycarousel_initCallback(carousel) {
	$('#slider .slider-controls .next').bind('click', function() {
		carousel.next();
		return false;
	});
	
	$('#slider .slider-controls .prev').bind('click', function() {
		carousel.prev();
		return false;
	});
};

