/*!
 * jQuery/jScript Several Functions
 * Copyright (c) 2010
 * Requires: jQuery/jScript
 */
  
	// jQ: show News/AutoFocus/Ancor
	  
//showNews
$(document).ready(function(){

	$(".btn-slide").click(function(){
		$("#panel").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

});

//showAutoFocus
$(document).ready(function(){
	//  Focus auto-focus fields
	$('.auto-focus:first').focus();
	
	//  Initialize auto-hint fields
	$('INPUT.auto-hint, TEXTAREA.auto-hint').focus(function(){
		if($(this).val() == $(this).attr('title')){ 
			$(this).val('');
			$(this).removeClass('auto-hint');
		}
	});
	
	$('INPUT.auto-hint, TEXTAREA.auto-hint').blur(function(){
		if($(this).val() == '' && $(this).attr('title') != ''){ 
			$(this).val($(this).attr('title'));
			$(this).addClass('auto-hint'); 
		}
	});
	
	$('INPUT.auto-hint, TEXTAREA.auto-hint').each(function(){
		if($(this).attr('title') == ''){ return; }
		if($(this).val() == ''){ $(this).val($(this).attr('title')); }
		else { $(this).removeClass('auto-hint'); } 
	});
});

//showAncor
$(document).ready(function() {
	$('.go').click(function() {
		  $('html,body').animate({scrollTop: $('#comeon').offset().top}, 1000);
	});

});

//slideHome
$(document).ready(function(){
 	$("#news ul").cycle({
		fx: 'fade',
		speed: 2500,
		timeout: 5000,
		prev : '#prev',
		next : '#next',
		pager : '#pager'
 	});
});
