$(function()
{
	clear_station();
	clear_area();
	clear_keyword();
	
	$("#txt_station").focus(function(){ if ($(this).val() == "駅名") $(this).val(""); });
	$("#txt_area").focus(function()   { if ($(this).val() == "地域名") $(this).val(""); });
	$("#txt_keyword").focus(function(){ if ($(this).val() == "フリーワード") $(this).val(""); });
	$("#txt_station").blur(function() { if ($(this).val() == "") clear_station(); });
	$("#txt_area").blur(function()    { if ($(this).val() == "") clear_area();    });
	$("#txt_keyword").blur(function() { if ($(this).val() == "") clear_keyword(); });

	t = setTimeout(init_news, 3000 );

	$('#recommends-list').scrollShow({
		view:'#recommends-view',
		itemSize:{
			height:'auto',
			width:'auto'
		},	
		elements:'img.dmy',
		content:'#recommends-images',
		wrappers:'simple',
		navigators:'a.arrow',
		navigationMode:'sr',
		circular:true,
		start:0
	});
	
	$('#newcommer-list').scrollShow({
		view:'#newcommer-view',
		itemSize:{
			height:'auto',
			width:'auto'
		},
		elements:'img.dmy',
		content:'#newcommer-images',
		wrappers:'simple',
		navigators:'a.arrow',
		navigationMode:'sr',
		circular:true,
		start:0
	});



/*

	$("#newsticker").show(0);


	$.easing.backout = function(x, t, b, c, d)
	{
		var s=1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	};

	$('#recommends-list').scrollShow(
	{
		elements:'div.container',
		itemSize:{ "height" : 120, "width" : 141 },
		view:'.view',
		content:'.items',
		easing:'backout',
		wrappers:'link,crop',
		navigators:'img[id]',
		circular:true,
		start:0
	});

	$('#newcommer-list').scrollShow(
	{
		elements:'div.container',
		itemSize:{ "height" : 90, "width" : 80 },
		view:'.view',
		content:'.items',
		easing:'backout',
		wrappers:'link,crop',
		navigators:'img[id]',
		circular:true,
		start:0
	});
	
	$("#newsticker").liScroll({travelocity: 0.03});

*/
});

function clear_station()
{
	$("#txt_station").attr("value", "駅名");
	$("#txt_station").attr("style", "color: #666666");
}

function clear_area()
{
	$("#txt_area").attr("value", "地域名");
	$("#txt_area").attr("style", "color: #666666");
}

function clear_keyword()
{
	$("#txt_keyword").attr("value", "フリーワード");
	$("#txt_keyword").attr("style", "color: #666666");
}

function init_news()
{
	$("#keyword").show(0);
	$('#topics').innerfade({
		animationtype: 'fade',
		speed: 750,
		timeout: 5000,
		type: 'sequence',
		containerheight: '15px'
	});
}