$(document).ready(function() {
	//gallerie
	$('.loopedSlider').loopedSlider();
	
	//jmp3
	// custom options
	$(".mp3").jmp3({
		showfilename: "false",
		backcolor: "CCCCCC",
		forecolor: "656551",
		width: 120,
		showdownload: "true"
	});
	
	$(".zooming").each(function () {
		var what=$(this).attr("href");
		var description=$(this).children("img").attr("title");
		if (description!="") {
			beschreibung="<div class='zoom_description'>"+description+"</div>";
		}else {beschreibung="";}
		var this_name=what.replace("#","");
		var arr=this_name.split("-");
		var titel=arr[0];
		var suffix=arr[1];
		$(this).after("<div id='"+this_name+"' style='display: none;'><img src='uploads/img/600-"+titel+"."+suffix+"'/>"+beschreibung+"</div>");
	});
	
	//zoom
	$('.zooming').fancyZoom({scaleImg: true, closeOnClick: true});
	$('#medium_box_link').fancyZoom({width:400, height:300});
	$('#large_box_link').fancyZoom();
	$('#flash_box_link').fancyZoom();
	
	// jQuery SmoothScroll
	$('a[href*=#]').click(function() {
		// duration in ms
		var duration=500;

		// easing values: swing | linear
		var easing='swing';


		// get parameters
		var hash=this.hash;
		var target=$(hash).offset().top;

		// animate to target and set the hash to the window.location after the animation
		$("html:not(:animated),body:not(:animated)").animate({ scrollTop: target }, duration, easing, function() { location.hash=hash; });

		// cancel default click action
		return false;
	});
});