var isMobile = false;
if(screen.width < 500 ||
	navigator.userAgent.match(/Android/i) ||
	navigator.userAgent.match(/webOS/i) ||
	navigator.userAgent.match(/iPhone/i) ||
	navigator.userAgent.match(/iPod/i) ) {
	isMobile = false;
}
$(function(){
	($('.gallerypics').length == 1 ? $('#npnav').hide() : null);
	if(!isMobile){
		$('ul.gallerypics li a').colorbox({
			rel:'group1',
			width:$(window).height()/100*75,
			height:"75%",
			slideshow:true,
			slideshowSpeed:4000,
			scrolling:false,
			returnFocus:false,
			current: "Bild {current} von {total}",
			slideshowStart: "starte Slideshow",
			slideshowStop: "stoppe Slideshow"
		});
	}

	if( $('#npnav').length > 0 ){
		$("#main").cycle({
			timeout: 0,
			fx: 'fade',
			prev: '#galleryprev',
			next: '#gallerynext'
		});
	}
});
