$(document).ready(function(){
	
	/*$("#chained").scrollable({circular: true, mousewheel: true}).navigator().autoscroll({
		interval: 12000		
	});*/
	
	$('#mycarousel').jcarousel({
		scroll: 1,
		auto: 5,
		wrap: 'circular',
		initCallback: mycarousel_initCallback
	});	
});


//////////////////////////////////// jqCarousel

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();
    });
};



//////////////////////////////////// HighSlide

hs.graphicsDir = '/inc/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.showCredits = false;
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.fadeInOut = true;
//hs.allowMultipleInstances = false;
hs.numberOfImagesToPreload = 0;

// Add the controlbar
if(typeof(hsgroups) == "undefined" || hsgroups.length == 0){hsgroups = 'hsgal';}else{hsgroups.push('hsgal');}

hs.addSlideshow({
	//slideshowGroup: 'hsgroup1',
	//slideshowGroup: ['group1','group2','group3','group4'],
	slideshowGroup: hsgroups,
	interval: 5000,
	repeat: false,
	useControls: true,
	fixedControls: 'fit',
	overlayOptions: {
		opacity: .75,
		position: 'bottom center',
		hideOnMouseOut: true
	}/*,
		thumbstrip: {
			position: 'above',
			mode: 'horizontal',
			relativeTo: 'expander'
		}*/
});



//////////////////////////////////// onClick

function clickother(objID)
{
   document.getElementById(objID).onclick();
}


