// initialise plugins
$(document).ready(function(){
	
	// jQuery autoAlign
	$("#fsb").autoColumn(50, ".widget-container");
	$("#fsb").autoHeight(".widget-container");
	
	$(".columns").autoColumn(33, ".column");
	$(".columns").autoHeight(".column");
	
	$(".sh_rec_prj_wrap").autoColumn(24, ".sh_rec_prj_item");
	$(".sh_rec_prj_wrap").autoHeight(".sh_rec_prj_item");
	
	$(".sh_lat_posts_wrap").autoColumn(24, ".sh_lat_posts_item");
	$(".sh_lat_posts_wrap").autoHeight(".sh_lat_posts_item");
	
	$(".columns2").autoColumn(33, ".column");
	$(".columns2").autoHeight(".column");
	
	$(".columns3").autoColumn(33, ".column");
	$(".columns3").autoHeight(".column");
	
	$(".columns4").autoColumn(33, ".column");
	$(".columns4").autoHeight(".column");
	
	$(".columns5").autoColumn(33, ".column");
	$(".columns5").autoHeight(".column");
	
	$(".columns6").autoColumn(33, ".column");
	$(".columns6").autoHeight(".column");
	
	$(".columns7").autoColumn(33, ".column");
	$(".columns7").autoHeight(".column");
	
	$(".columns8").autoColumn(33, ".column");
	$(".columns8").autoHeight(".column");
	
	$(".columns9").autoColumn(33, ".column");
	$(".columns9").autoHeight(".column");
	
	$(".columns10").autoColumn(33, ".column");
	$(".columns10").autoHeight(".column");
	
	$(".columns11").autoColumn(33, ".column");
	$(".columns11").autoHeight(".column");
	
	$(".columns12").autoColumn(33, ".column");
	$(".columns12").autoHeight(".column");
	
	$(".columns13").autoColumn(33, ".column");
	$(".columns13").autoHeight(".column");
	
	$(".columns14").autoColumn(33, ".column");
	$(".columns14").autoHeight(".column");
	
	$(".columns15").autoColumn(33, ".column");
	$(".columns15").autoHeight(".column");


	// jQuery Watermark Plugin
	$('input[name="s"]').each(function() {
		$(this).Watermark("Ange sökord");
	});
	
		$("#nivo-slider").nivoSlider({
			effect:'fade', // Specify sets like: 'fold,fade,sliceDown'
			slices: 25, // For slice animations
			boxCols: 8, // For box animations
			boxRows: 4, // For box animations
			animSpeed: 700, // Slide transition speed
			pauseTime: 8000, // How long each slide will show
			startSlide: 0, // Set starting Slide (0 index)
			directionNav: true, // Next & Prev navigation
			directionNavHide: true, // Only show on hover
			controlNav: true, // 1,2,3... navigation
			keyboardNav: true, // Use left & right arrows
			pauseOnHover: true, // Stop animation while hovering
			manualAdvance: false, // Force manual transitions
			captionOpacity: 0.8, // Universal caption opacity
			prevText: 'Prev',
			nextText: 'Next'
		});

/* --- DropDown Menu Plugin --- */
ddsmoothmenu.init({
	mainmenuid: "menu", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

// jquery quicksand
	function reloadPrettyPhoto() {
		$(".pp_pic_holder").remove();
		$(".pp_overlay").remove();
		$(".ppt").remove();
		// edit it with your initialization
		$('a[rel^="prettyPhoto"]').prettyPhoto({
			animationSpeed: 'normal', /* fast/slow/normal */
			opacity: 0.50, /* Value between 0 and 1 */
			showTitle: false, /* true/false */
			allowresize: true, /* true/false */
			counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
			theme: 'facebook' /* light_rounded / dark_rounded / light_square / dark_square / facebook */
		});
	}
});
