/*//////////////////////////////
// Variables
//////////////////////////////*/

/*//////////////////////////////
// Functions
//////////////////////////////*/

/*//////////////////////////////
// jQuery init
//////////////////////////////*/
jQuery(document).ready(function(){
	var navi = jQuery(".gallery .navi");
	/* Determains the amount of <a>-tags there are inside .navi */
	var naviLength = navi.find("a").length;
	/* Appends a new <a>-tag inside the .navi HTML element. */
	for(var i = 1; i < naviLength; i++){
		navi.append("<a href=\"#\">"+i+"</a>");
	}
	/*	Triggers the scrollable slideshow depending on how many items there are inside .items.
		If there is only one image, the slideshow is diabled or not triggerd at all. */
	var items = jQuery(".gallery .slideShow .items .item");
	if(items.length > 1){
		jQuery(".gallery .slideShow").scrollable({ circular: true, size: 1, mousewheel: false }).navigator().autoscroll({ interval:7000, steps: 1 });
	}
	
});
