$( document ).ready( function(){
	$('.blink').focus(function(){
		if( $(this).attr('value') == $(this).attr('title') ) {
			$(this).attr({ 'value': '' });
		}
	}).blur(function(){	
		if( $(this).attr('value') == '' ) {
			$(this).attr({ 'value': $(this).attr('title') })
		}
	});
	
	function mycarousel_initCallback(carousel) {
	    // Disable autoscrolling if the user clicks the prev or next button.
	    carousel.buttonNext.bind('click', function() {
	        carousel.startAuto(0);
	    });
	
	    carousel.buttonPrev.bind('click', function() {
	        carousel.startAuto(0);
	    });
	
	    // Pause autoscrolling if the user moves with the cursor over the clip.
	    carousel.clip.hover(function() {
	        carousel.stopAuto();
	    }, function() {
	        carousel.startAuto();
	    });
	};
		
	$('.slides ul').jcarousel({
		auto: 2,
		scroll: 1, 
		wrap: "both",
		initCallback: mycarousel_initCallback
	});
	
	setTimeout(function() {
		$('.slides .jcarousel-next').live('click');
	}, 3000)
	
	$('.slides ul a').click(function(){
		var index = $(this).parent().parent().find('a').index(this);
		
		$('.big-images img').hide();
		$('.big-images img').eq(index).fadeIn();
		
	});
	
	
});