function mycarousel_initCallback(carousel) {

    jQuery('#mycarousel-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('#mycarousel-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
};


$(document).ready(function(){ 
	
		// Provides a smooth scroll to internal anchor links
	$(function(){
    $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' +  this.hash.slice(1) + ']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                return false;
    }}});
	});
	

	if($.browser.msie && $.browser.version == 6) {
	}
	
	else {
		// JCarousel
	  $('#mycarousel').jcarousel({
	      auto: 6,
	      scroll: 3,
	      animation: 2000,
	      wrap: 'circular',
	      initCallback: mycarousel_initCallback,
	
	      
	      // This tells jCarousel NOT to autobuild prev/next buttons
	      buttonNextHTML: null,
	      buttonPrevHTML: null
	
	  });
	}	

	// FancyBox	
	$("a.zoom").fancybox();
});