/*
 * common.js
 * スパム対策、ページスクロール
*/

/*スパム対策*/
<!--
function vspam(im,domain) {
  maddress = "mailto:" + im + "@" + domain;
  window.location.href = maddress;
}
// -->



/*jquery
-----------------------*/
/* $(function(){
	$('#subArea, #mainArea').flatHeights();
}); */


$(document).ready(function() {
	$('#pageTop').scrollFollow({
    speed: 600
	});
});


/*吹き出しアニメーション*/
function talkAnim(Target){
		$(Target).each(function(){
			$(this).hover(function(){
				$(this).find('.pop').stop().animate({'width':'160px','height':'115px'},{duration:'1000',easing:'easeOutBounce'});
			},function(){
				$(this).find('.pop').stop().animate({'width':'0','height':'0'},{duration:'1000',easing:'easeInOutBack'});
			});
		});
}

$(function(){
	/*バナースクロール*/
	function mycarousel_initCallback(carousel){
    	// Disable autoscrolling if the user clicks the prev or next button.
    	carousel.buttonNext.bind('click', function() {
        	carousel.startAuto(3);
    	});

    	carousel.buttonPrev.bind('click', function() {
        	carousel.startAuto(3);
    	});

    	// Pause autoscrolling if the user moves with the cursor over the clip.
    	carousel.clip.hover(function() {
        carousel.stopAuto();
    	}, function() {
        	carousel.startAuto();
    	});
	};
	
    $('#bannerArea').jcarousel({
		scroll:1,							
        auto: 3,
		wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});

/*ポップアップ:サンプル
----------------------*/
/*本番URL
function reserve()
{
   adWindow=window.open('http://●●●●/reseve.php','newWin','width=600,height=800,scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0');
}
*/
