$(document).ready(function(){
    $('.captcha').click(function(){
        $(this).attr('src', 'tools/captcha.php?rand='+Math.random());
    });

    $('.input').click(function(){ $currVal = $(this).val(); $(this).val(''); }).blur(function(){ var $newVal  = $(this).val(); if( !$newVal || $newVal == $currVal){ $(this).val($currVal);}});

	
    //$("#widget-slide").scrollable({
    //    circular: true,
    //    onSeek: function(event, tabIndex){
    //        $('.slide-intro').html(slideIntro[this.getIndex()]);
    //    }
    //}).autoscroll(6000, { autoplay: true });

    $('.header-nav-home a').hover(
        function(){
            $(this).addClass('active');
        },
        function(){
            $(this).removeClass('active');
        }
    );
	
	$('#widget-slide').cycle({ 
		fx:     'fade', 
		timeout: 5000,
		pause: 1,
		before:  onBeforeCycle,
		next:   '.cycle-next', 
		prev:   '.cycle-prev' 
	});
	
	$('.content-cycle').cycle({ 
		fx:     'fade', 
		timeout: 6000,
		pause: 1,
		pager: '.content-cycle-navi'
	});
	
	$('#logos').cycle({ 
		fx:     'scrollUp', 
		timeout: 1000,
		pause: 2,
		next:   '.logodown', 
		prev:   '.logoup' 
	});
});

function onBeforeCycle() { 
    $('.slide-intro').html(this.title); 
}
