function mycarousel_initCallback(carousel)
{
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });

    // 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('#nonejs').css('display', 'none');
    jQuery('#mycarousel').css('display', 'block');

    jQuery('#mycarousel').html('<ul class="jcarousel-skin-opwoco"><li><p>Ihre Daten.<br/>Alle Geräte.<br/>Unsere Apps.</p><a href="mobile_apps.html" class="button">Mobile Apps von <span>opwoco</span></a><img src="img/teaser/die_ganze_welt_in_einer_hand.jpg" alt="Mobile App´s" /></li>   <li><p id="teaser_mobileapps">Technik muss nicht kompliziert sein. Sie muss überzeugen! </p><a href="mobile_apps.html" class="button">Mobile Apps von <span>opwoco</span></a><img src="img/teaser/mobileapps.jpg" alt="Mobile App´s" /></li>		<li><p id="teaser_schnittstellen">Automatisierte Datenverarbeitung durch Schnittstellen.</p><a href="schnittstellen.html" class="button">effiziente <span>Schnittstellen</span></a><img src="img/teaser/schnittstellen.jpg" alt="Schnittstellen verbinden." /></li><li><p id="teaser_fullservice">Alles aus<br/> einer Hand.</p><!--<a href="" class="button"><span>…</span> weitere Informationen</a>--><img src="img/teaser/fullservicedienstleistung.jpg" alt="Full Service Dienstleistungen" /></li></ul>');
    jQuery('.jcarousel-control').html('<a href="#">1</a><a href="#">2</a><a href="#">3</a><a href="#">4</a>');
    
    jQuery('#mycarousel ul').jcarousel({
        auto: 5,
        wrap: 'circular',
        scroll: 1,
        animation: 'slow',
        initCallback: mycarousel_initCallback
    });
});


