/*
 * Ex: Javascript improves in the speed on IE only.
 * update: 2007-10-11
 * info: http://d.hatena.ne.jp/amachang/20071010/1192012056
 * 
 */

/*@cc_on _d=document;eval('var document=_d')@*/





/*
 * Ex: Smooth Scroll To Page's Top.
 * update: 2009-4-26
 * info: http://d.hatena.ne.jp/dayflower/20081007/1223358033
 * 
 */

jQuery(function () {
	$('#toTop').click(function(){
        $(this).blur();
        $('html,body').animate({ scrollTop: 0 }, 'slow');
        return false;
    });
});





/*
 * Ex: allows the user to extend the textarea element/area within the web page whenever they feel.
 * update: 1/21,2009
 * info: http://plugins.jquery.com/project/TextAreaResizer
 * 
 */

jQuery(function() {
	if ($('textarea').length) {
		$('textarea:not(.processed)').TextAreaResizer();
	};
});





/*
 * Ex: Images Slider.
 * update: 2009-3-28
 * info: http://www.reindel.com/accessible_news_slider/
 * file: jquery.accessible-news-slider.js
 * 
 */

jQuery(function(){
	$("#controlPanel").accessNews({
		headline : "人気観光地",
		speed : "slow",
		slideBy : 2
	});
});

jQuery(function(){
	$("#otherPlan").accessNews({
		headline : "おすすめ観光地",
		speed : "slow",
		slideBy : 2
	});
});





/*
 * Ex: Image Swicher.
 * update: 2009-3-28
 * info: http://www.hieu.co.uk/ImageSwitch/
 * file: Groject.ImageSwitch.js
 * 
 */

jQuery(function(){
	$("#tmbArea li a").live('click',function(){
		$("#bigImage").ImageSwitch({
			Type: $(this).attr("class"),
			NewImage: $(this).attr("rel")
		});
		return false;
	});
});





/*
 * Ex: jQuery Fancy Zoom.
 * update: 2009-3-28
 * info: http://www.dfc-e.com/metiers/multimedia/opensource/jquery-fancyzoom/
 * file: jquery.fancyzoom.js
 * 
 */

jQuery(function(){
	$('.fancyzoom').fancyzoom({
		imgDir      : "http://kariyushi-taxi.com/skins/2009/css/img/fancyzoom/",
		Speed       : 600,
		showoverlay : true,
		overlayColor: "#6AA0F7",
		overlay     : 0.3
	});
});





/*
 * Ex: (Mail Form) appears explain text, this is original.
 * update: 2009-4-2
 * 
 */


jQuery(function(){
	$('input:text').focus(function(){
		$(this).nextAll('p').slideDown();
	});
	$('input:text').blur(function(){
		$(this).nextAll('p').slideUp();
	});
});





/*
 * Ex: (Mail Form) check box hilighter, this is original.
 * update: 2009-4-2
 * 
 */


jQuery(function(){
	$('#spotLine label,#inquiryArea label').hover(
		function() {
		    $(this).parent().css('background','#FFF297');
		},
		function() {
		    $(this).parent().css('background','#fff');
		}
	);
});





/*
 * Ex: (FAQ) toggle Answer parts.
 * update: 2009-4-29
 * 
 */


jQuery(function(){
	$('#qaArea dd').css('display','none');
	$('#qaArea dt').click(function(){
		$(this).next('dd').slideToggle('slow');
	});
});





/*
 * Ex: (Top Page's Image) fade in-out background image, and preload.
 * update: 2009-5-1
 * info: http://rewish.org/javascript/jquery_bg_switcher
 * file: jquery.bgSwitcher.js
 * 
 */


jQuery(function(){
	$('#topimage1').fadeTo(2000, 0,
	function(){
		$('#switchArea').bgSwitcher({
			bgImages : [
				'skins/2009/images/toppage_01.jpg',
				'skins/2009/images/toppage_02.jpg',
				'skins/2009/images/toppage_03.jpg',
				'skins/2009/images/toppage_04.jpg',
				'skins/2009/images/toppage_05.jpg'
			],
			fadeOut  : true,
			startNum : 2,
			interval : 3500
		});
	});
});





/* this is the test code.

jQuery(function(){
	invalid_domains = {
	  'hotmai.co.jp' : 'hotmail.co.jp',
	  'hotmai.com' : 'hotmail.com',
	  'hotmail.co' : 'hotmail.com',
	  'yaho.com' : 'yahoo.com',
	  'yaho.co.jp' : 'yahoo.co.jp',
	  'gmai.com' : 'gmail.com',
	  'gmailcom' : 'gmail.com'
	}

	$('#mailLine input').validmail({
	  invalid_domains : invalid_domains,
	  output: '#mailError'
	});
});



*/
