function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

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

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 2,
        animation: 'slow',
        wrap: 'last',
        scroll: 1,
        visible: 3,
        initCallback: null
    });
});

/*
$(function() {
    var offset = $("#scrollwindow").offset();
    var topPadding = 30;
    $(window).scroll(function() {
        if ($(window).scrollTop() > offset.top) {
            $("#scrollwindow").stop().animate({
                marginTop: $(window).scrollTop() - offset.top + topPadding
            });
        } else {
            $("#scrollwindow").stop().animate({
                marginTop: 0
            });
        };
    });
});
*/

jQuery.fn.extend({
scrollTo : function(speed, easing) {
<!-- hashの取得が出来なければ、処理を中断 -->
if(!$(this)[0].hash || $(this)[0].hash == "#") {
return false;
}
return this.each(function() {
var targetOffset = $($(this)[0].hash).offset().top;
$('html,body').animate({scrollTop: targetOffset}, speed, easing);
});
}
});

$(document).ready(function(){
$('a[href*=#]').click(function() {
$(this).scrollTo(1000);
return false;
});
});

$(document).ready(function() {
$('#slider').coinslider({
width: 320, //width of slider panel
height: 170, //height of slider panel
spw: 6, //squares per width
sph: 3, //squares per height
effect: 'random', // random, swirl, rain, straight
delay: 6000, // delay between images in ms
sDelay: 60, // delay beetwen squares in ms
opacity: 0.8, // opacity of title and navigation
titleSpeed: 500, // speed of title appereance in ms
navigation: false, // prev next and buttons
links : true, // show images as links
hoverPause: false // pause on hover
});
});
