/* Mailmask */
function noSpam(){if(document.getElementById){var at="@";var links=document.getElementsByTagName('a');for(var i=0;i<links.length;i++){var linkElem=links[i];if(linkElem.className=='escape'){var mail=linkElem.firstChild;var domain=linkElem.lastChild;mail.nextSibling.firstChild.innerHTML=at;linkElem.href="mailto:"+mail.data+at+domain.data;}}}}

(function ($, window, document, undefined) {
	
	$(document)
		.ready(function(){
			noSpam();
			$('body').removeClass('js-disabled').addClass('js-enabled');
		});
})(jQuery, window, document);


/* jQuery Calls */
jQuery(document).ready(function(){
	jQuery();
	jQuery('#slideshow').css({height: '313px'});
	jQuery('#slideshow').rhinoslider({
		controlsPrevNext: false,	
		controlsPlayPause: false,
		prevText: false,	//text for the prev-button
		nextText: false,	//text for the next-button
		playText: false,	//text for the play-button
		pauseText: false
	});
	jQuery('#newsletter-email').bind('click', inputChange);
	jQuery('#newsletter-email').bind('blur', inputChange);
	function inputChange(e){
	if(jQuery(this).val() == 'E-Mail Adresse'){
		jQuery(this).val('');
	}else if(jQuery(this).val() == ''){
		jQuery(this).val('E-Mail Adresse');
	}
}
	
});

jQuery(document).ready(function(){
	jQuery("#shop img").hover(function() {
	jQuery(this).stop().animate({"opacity": "1"}, "slow");
	},
	function() {
	jQuery(this).stop().animate({"opacity": "0.5"}, "slow");
	});
	jQuery("#news img").hover(function() {
	jQuery(this).stop().animate({"opacity": "1"}, "slow");
	},
	function() {
	jQuery(this).stop().animate({"opacity": "0.5"}, "slow");
	});
});

// ColorBox v1.3.18 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
// Copyright (c) 2011 Jack Moore - jack@colorpowered.com
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
(function(a,b,c){function Y(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function Z(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function $(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function _(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function ba(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bb(b,c){a.event.trigger(b),c&&c.call(P)}function bc(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(Q<y.length-1||K.loop)a=setTimeout(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function bd(b){if(!U){P=b,ba(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1));if(!S){S=T=!0,r.show();if(K.returnFocus)try{P.blur(),a(P).one(l,function(){try{this.focus()}catch(a){}})}catch(c){}q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=$(K.initialWidth,"x"),K.h=$(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),bb(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()}W.load(!0)}}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"Bild {current} von {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=a.browser.msie&&!a.support.opacity,o=n&&a.browser.version<7,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X="div";W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},W.init();if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}return c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(g)}),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&bd(f[0]),f},W.init=function(){if(!r){if(!a("body")[0]){a(W.init);return}z=a(c),r=Y(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}),q=Y(X,"Overlay",o?"position:absolute":"").hide(),s=Y(X,"Wrapper"),t=Y(X,"Content").append(A=Y(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Y(X,"LoadingOverlay").add(Y(X,"LoadingGraphic")),D=Y(X,"Title"),E=Y(X,"Current"),G=Y(X,"Next"),H=Y(X,"Previous"),F=Y(X,"Slideshow").bind(h,bc),I=Y(X,"Close")),s.append(Y(X).append(Y(X,"TopLeft"),u=Y(X,"TopCenter"),Y(X,"TopRight")),Y(X,!1,"clear:left").append(v=Y(X,"MiddleLeft"),t,w=Y(X,"MiddleRight")),Y(X,!1,"clear:left").append(Y(X,"BottomLeft"),x=Y(X,"BottomCenter"),Y(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Y(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(q,r.append(s,B)),L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}).hide(),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),J=G.add(H).add(E).add(F),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))})}},W.remove=function(){r.add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g)},W.position=function(a,b){function g(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,C[0].style.height=C[1].style.height=t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset();z.unbind("resize."+f),r.css({top:-99999,left:-99999}),K.fixed&&!o?r.css({position:"fixed"}):(c=z.scrollTop(),d=z.scrollLeft(),r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-$(K.right,"x"),0):K.left!==!1?d+=$(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-$(K.bottom,"y"),0):K.top!==!1?c+=$(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){g(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",b&&b(),setTimeout(function(){z.bind("resize."+f,W.position)},1)},step:function(){g(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=$(a.width,"x")-O-M),a.innerWidth&&(K.w=$(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=$(a.height,"y")-N-L),a.innerHeight&&(K.h=$(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w,K.w}function h(){return K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h,K.h}if(!S)return;var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Y(X,"LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function q(){n&&r[0].style.removeAttribute("filter")}var b,c,g=y.length,h,i="frameBorder",k="allowTransparency",l,o,p;if(!S)return;l=function(){clearTimeout(V),C.hide(),bb(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show();if(g>1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||Q<g-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),K.slideshow&&F.show();if(K.preloading){b=[Z(-1),Z(1)];while(c=y[b.pop()])o=a.data(c,e).href||c.href,a.isFunction(o)&&(o=o.call(c)),_(o)&&(p=new Image,p.src=o)}}else J.hide();K.iframe?(h=Y("iframe")[0],i in h&&(h[i]=0),k in h&&(h[k]="true"),h.name=f+ +(new Date),K.fastIframe?l():a(h).one("load",l),h.src=K.href,K.scrolling||(h.scrolling="no"),a(h).addClass(f+"Iframe").appendTo(A).one(m,function(){h.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,q):q()},K.transition==="fade"?r.fadeTo(d,0,function(){W.position(0,c)}):W.position(d,c)},W.load=function(b){var c,d,e=W.prep;T=!0,R=!1,P=y[Q],b||ba(),bb(m),bb(i,K.onLoad),K.h=K.height?$(K.height,"y")-N-L:K.innerHeight&&$(K.innerHeight,"y"),K.w=K.width?$(K.width,"x")-O-M:K.innerWidth&&$(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=$(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=$(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,V=setTimeout(function(){C.show()},100),K.inline?(Y(X).hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):_(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Y(X,"Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(Q<y.length-1||K.loop)&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Y(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(Q<y.length-1||K.loop)&&(Q=Z(1),W.load())},W.prev=function(){!T&&y[1]&&(Q||K.loop)&&(Q=Z(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bb(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),bb(m),A.remove(),setTimeout(function(){U=!1,bb(l,K.onClosed)},1)}))},W.element=function(){return a(P)},W.settings=d,a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),bd(this))}),W.init()})(jQuery,document,this);

/* jQuery Calls */
$(document).ready(function(){
	/* Colorbox */
	$("a[rel='lightbox[1]']").colorbox({maxHeight:"90%",opacity:.6, photo:true});
	$("a[rel='lightbox']").colorbox({maxHeight:"90%",opacity:.6, photo:true});
	$("li.guestbook a, .guestbookOpen").colorbox({iframe:true, innerWidth:660, innerHeight:800, height:800, width:660});	
	$("li.panorama a").colorbox({iframe:true, innerWidth:660, innerHeight:300, height:300, width:660});

});



/**
  * Rhinoslider 0.8
  * (C) Copyright Sebastian Pontow, Rene Maas
  * http://www.rhinoslider.com/
  * http://www.rhinoslider.com/license/
  * support@rhinoslider.com
  */
(function($){
	/**
	  * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
	  * Copyright (c) 2008 George McGinley Smith
	  * All rights reserved.
	  */
	jQuery.extend( jQuery.easing,{
		def: 'out',
		out: function (a, b, c, d, e) {
			return -d*(b/=e)*(b-2)+c;
		},
		kick: function (a, b, c, d, e) {
			if ((b/=e/2) < 1){
				return d/2 * Math.pow(2, 10 * (b - 1)) + c;
			}
			return d/2 * (-Math.pow(2, -10 * --b) + 2) + c;
		},
		shuffle: function (a, b, c, d, e) {
			if ((b/=e/2) < 1){
				return d/2*b*b*b*b*b + c;
			}
			return d/2*((b-=2)*b*b*b*b + 2) + c;
		}
	});
	
	var rhinoSlider = function(element,opts){
		var
			settings = jQuery.extend({},jQuery.fn.rhinoslider.defaults, opts),
			
			vars = {
				isPlaying: false,
				intervalAutoPlay: false,
				active: '',
				next: '',
				container: '',
				items: '',
				buttons: [],
				prefix: 'rhino-'
			},
			
			$slider = $(element)
		;
		
		settings.controlsPrevNext = Boolean(settings.controlsPrevNext);
		settings.controlsPlayPause = Boolean(settings.controlsPlayPause);
		settings.controlsThumbs = Boolean(settings.controlsThumbs);
		settings.pauseOnHover = Boolean(settings.pauseOnHover);
		settings.slideStay = Boolean(settings.slideStay);
		settings.autoPlay = Boolean(settings.autoPlay);
		settings.showTime = parseInt(settings.showTime,10);
		settings.effectTime = parseInt(settings.effectTime,10);
		settings.controlFadeTime = parseInt(settings.controlFadeTime,10);
		settings.captionsFadeTime = parseInt(settings.captionsFadeTime,10);
		tmpShiftValue = settings.shiftValue;
		tmpParts = settings.parts;
		settings.shiftValue = [];
		settings.parts = [];
		//if shuffle-effect has x and y shift or parts
		if(settings.effect.indexOf('shuffle') >= 0 || settings.effect.indexOf('explode') >= 0){
			var shiftValue = String(tmpShiftValue);
			if(shiftValue.indexOf(',') >= 0){
				var tmp = shiftValue.split(',');
				settings.shiftValue.x = tmp[0];
				settings.shiftValue.y = tmp[1];
			}else{
				settings.shiftValue.x = parseInt(tmpShiftValue,10);
				settings.shiftValue.y = parseInt(tmpShiftValue,10);
			}
			var parts = String(tmpParts);
			if(parts.indexOf(',') >= 0){
				var tmp = parts.split(',');
				settings.parts.x = tmp[0];
				settings.parts.y = tmp[1];
			}else{
				settings.parts.x = parseInt(tmpParts,10);
				settings.parts.y = parseInt(tmpParts,10);
			}
		}else{
			settings.shiftValue.x = parseInt(tmpShiftValue,10);
			settings.shiftValue.y = parseInt(tmpShiftValue,10);
			settings.parts.x = parseInt(tmpParts,10);
			settings.parts.y = parseInt(tmpParts,10);
		}
		
		$slider.data('slider:vars', vars);
		$slider.wrap('<div class="'+vars.prefix+'container">');
		vars.container = $slider.parent('.'+vars.prefix+'container');
		vars.container.style = $slider.style;
		vars.isPlaying = settings.autoPlay;
		
		//the string, which will contain the button-html-code
		var buttons = '';
		
		//add prev/next-buttons
		if(settings.controlsPrevNext){
			buttons = '<span class="'+vars.prefix+'prev '+vars.prefix+'btn">' + settings.prevText + '</span><span class="'+vars.prefix+'next '+vars.prefix+'btn">' + settings.nextText + '</span>';
			vars.container.append(buttons);

			vars.buttons.prev = $('.'+vars.prefix+'prev', vars.container);
			vars.buttons.next = $('.'+vars.prefix+'next', vars.container);
			
			//add functionality to the "next"-button
			vars.buttons.prev.click( function(){
				prev($slider, settings);
				
				//stop autoplay, if set
				if(settings.autoPlay){
					pause();
				}
			});
			
			//add functionality to the "next"-button
			vars.buttons.next.click( function(){
				next($slider, settings);
				
				//stop autoplay, if set
				if(settings.autoPlay){
					pause();
				}
			});
		}
		
		//add play/pause-button
		if(settings.controlsPlayPause){
			buttons = settings.autoPlay ? '<span class="'+vars.prefix+'toggle '+vars.prefix+'pause '+vars.prefix+'btn">' + settings.pauseText + '</span>' : '<span class="'+vars.prefix+'toggle '+vars.prefix+'play '+vars.prefix+'btn">' + settings.playText + '</span>';
			vars.container.append(buttons);

			vars.buttons.play = $('.'+vars.prefix+'toggle', vars.container);
			
			//add functionality
			vars.buttons.play.click( function(){
				//self-explaining
				if(vars.isPlaying === false){
					play();
				}else{
					pause();
				}
			});
		}
		
		//style
		$('.'+vars.prefix+'btn', vars.container)
			.css({
				position: 'absolute',
				display: 'block',
				cursor:'pointer'
			});
		vars.container.css('position','relative');

		//get content-elements and set css-reset for positioning
		vars.items = $slider.children('li');
		vars.items.first().addClass(vars.prefix+'active');
		//"free" the slideshow element
		var tmpWidth = $slider.css('width');
		var tmpHeight = $slider.css('height');
		$slider
			.css({
				top: 'auto',
				left: 'auto',
				position: 'relative'
			 });
			
		vars.items
			.css({
				margin: 0,
				width: tmpWidth,
				height: tmpHeight,
				position: 'absolute',
				top: 0,
				left: 0,
				zIndex: 0,
				overflow: 'hidden'
			});
		
		//generate navigation
		if(settings.controlsThumbs){
			var navi = '<ul class="'+vars.prefix+'thumbs">';
			vars.items.each(function(i){
				var $item = $(this);
				var id = vars.prefix+'item'+i;
				$item.attr('id',id);
				navi = navi + '<li><a href="#'+id+'" class="'+vars.prefix+'thumb"></a></li>';
			});
			navi = navi + '</ul>';
			vars.container.append(navi);
			
			vars.navigation = $('.'+vars.prefix+'thumbs', vars.container);
			vars.buttons.thumbs = $('.'+vars.prefix+'thumb', vars.navigation);
			vars.buttons.thumbs.click( function(){
				var itemID = $(this).attr('href');
				next($slider, settings, $(itemID));
	
				//stop autoplay, if set
				if(settings.autoPlay){
					pause();
				}
			});
		}
		
		//add captions
		if(settings.showCaptions === 'hover' || settings.showCaptions === 'always'){
			vars.items.each(function(){
				var $item = $(this);
				if($item.children('.'+vars.prefix+'caption').length == 0){
					if($item.children('img').length > 0){
						$item.append('<div class="'+vars.prefix+'caption">'+$item.children('img:first').attr('title')+'</div>');
					}
				}
			});
			
			if(settings.showCaptions === 'hover'){
				$('.'+vars.prefix+'caption').hide();
				vars.container
					.mouseenter(function(){
						vars.active.children('.'+vars.prefix+'caption').stop(true, true).fadeTo(settings.captionFadeTime,settings.captionsOpacity);
					})
					.mouseleave(function(){
						vars.active.children('.'+vars.prefix+'caption').delay(200).fadeOut(settings.captionFadeTime);
					});
			}else if(settings.showCaptions === 'always'){
				$('.'+vars.prefix+'caption').fadeTo(0,settings.captionsOpacity);
			}
		}
		
		vars.active = $('.'+vars.prefix+'active', $slider);

		//set special settings for each effect
		switch(settings.effect){
			case 'fade':
				//opacity so the elements in the back don't shine through while the effect is running
				vars.items.css({
					//opacity so the elements in the back don't shine through while the effect is running
					opacity: 0
				});
				vars.active.css({opacity: 1});
				break;
			//same settings for both
			case 'kick':
			case 'transfer':
				vars.items.css({
					//opacity so the elements in the back don't shine through while the effect is running
					opacity: 0,
					overflow: 'hidden'
				});
				vars.active.css({opacity: 1});
				break;
			case 'shuffle':
			case 'explode':
				vars.items.css({
					overflow:'visible'
				});
				break;
		}
		
		vars.active.css({zIndex: 1});
		
		if(settings.autoPlay){
			vars.intervalAutoPlay = setInterval(function(){
				next($slider, settings);
			},settings.showTime);
		} else {
			vars.intervalAutoPlay = false;
		}
		
		//if pause on hover
		if(settings.pauseOnHover){
			//play/pause function cannot be used for they trigger the isPlaying variable
			$slider
				.mouseenter(function(){
					if(vars.isPlaying){
						clearInterval(vars.intervalAutoPlay);
						if(settings.controlsPlayPause){
							vars.buttons.play
								.text(settings.playText)
								.removeClass(vars.prefix+'pause')
								.addClass(vars.prefix+'play');
						}
					}
				})
				.mouseleave(function(){
					if(vars.isPlaying){
						vars.intervalAutoPlay = setInterval(function(){
							next($slider, settings);
						},settings.showTime);

						if(settings.controlsPlayPause){
							vars.buttons.play
								.text(settings.pauseText)
								.removeClass(vars.prefix+'play').addClass(vars.prefix+'pause');}
					}
				});
		}
		
		//hide/show controls on hover or never
		if(settings.showControls === 'hover' || settings.showControls === 'never'){
			var allControls = $('.'+vars.prefix+'btn');
			allControls.hide();
			
			if(settings.showControls === 'hover'){
				vars.container
					.mouseenter(function(){
						allControls.stop(true, true).fadeIn(settings.controlFadeTime);
					})
					.mouseleave(function(){
						allControls.delay(200).fadeOut(settings.controlFadeTime);
					});
			}
		}
		
		//pause the autoplay and change the bg-image of the button to "play"
		var pause = function(){
			clearInterval(vars.intervalAutoPlay);
			vars.isPlaying = false;
			if(settings.controlsPlayPause){
				vars.buttons.play
					.text(settings.playText)
					.removeClass(vars.prefix+'pause')
					.addClass(vars.prefix+'play');
			}
		},
		
		//start/resume the autoplay and change the bg-image of the button to "pause"
		play = function(){
			vars.intervalAutoPlay = setInterval(function(){
				next($slider, settings);
			},settings.showTime);
			vars.isPlaying = true;
			if(settings.controlsPlayPause){
				vars.buttons.play
					.text(settings.pauseText)
					.removeClass(vars.prefix+'play')
					.addClass(vars.prefix+'pause');
				}
		},
		
		prev = function($slider, settings){
			var vars = $slider.data('slider:vars');
			//if some effect is already running, don't stack up another one
			if($('li:animated, li .'+vars.prefix+'partContainer:animated', vars.container).length > 0){
				return false;
			}
			
			//hide captions
			if(settings.showCaptions !== 'never'){
				$('.'+vars.prefix+'caption').stop(true,true).hide();
			}

			//check, if the active element is the first, so we can set the last element to be the "next"-element
			if(vars.items.first().hasClass(vars.prefix+'active')){
				vars.next = vars.items.last();
			} else {
				vars.next = vars.active.prev();
			}
			switch(settings.effect){
				case 'none':
					fade($slider, settings, false);
					break;
				case 'fade':
					fade($slider, settings, true);
					break;
				case 'slide':
					slide($slider, settings, settings.slidePrevDirection, settings.slideStay, false);
					break;
				case 'kick':
					slide($slider, settings, settings.slidePrevDirection, false, true);
					break;
				case 'transfer':
					transfer($slider, settings, settings.slidePrevDirection, settings.slideStay);
					break;
				case 'shuffle':
					shuffle($slider, settings, settings.slideStay, false);
					break;
				case 'explode':
					shuffle($slider, settings, settings.slideStay, true);
					break;
			}
		},
		
		next = function($slider, settings, $next){
			var vars = $slider.data('slider:vars');
			//if some effect is already running, don't stack up another one
			if($('li:animated, li .'+vars.prefix+'partContainer:animated', vars.container).length > 0){
				return false;
			}
			
			//hide captions
			if(settings.showCaptions !== 'never'){
				$('.'+vars.prefix+'caption').stop(true,true).hide();
			}

			//check, if the active element is the last, so we can set the first element to be the "next"-element
			if(!$next){
				if(vars.items.last().hasClass(vars.prefix+'active')){
					vars.next = vars.items.first();
				} else {
					vars.next = vars.active.next();
				}
			}else{
				vars.next = $next;
			}
						
			//choose the effect and start it
			switch(settings.effect){
				case 'none':
					fade($slider, settings, false);
					break;
				case 'fade':
					fade($slider, settings, true);
					break;
				case 'slide':
					slide($slider, settings, settings.slideNextDirection, settings.slideStay, false);
					break;
				case 'kick':
					slide($slider, settings, settings.slideNextDirection, false, true);
					break;
				case 'transfer':
					transfer($slider, settings, settings.slideNextDirection, settings.slideStay);
					break;
				case 'shuffle':
					shuffle($slider, settings, settings.slideStay, false);
					break;
				case 'explode':
					shuffle($slider, settings, settings.slideStay, true);
					break;
			}
		},
		
		//function to reset elements and style after an effect
		resetElements = function($slider, settings){
			var vars = $slider.data('slider:vars');
			//set the active-element on the same z-index as the rest and reset css
			vars.next
				//add the active-class
				.addClass(vars.prefix+'active')
				//and put  it above the others
				.css({
					zIndex:1,
					top: 0,
					left: 0,
					width: '100%',
					height:'100%',
					margin:0
				});
			vars.active
				.css({
					zIndex:0,
					top: 0,
					left: 0,
					margin:0
				})
				//and remove its active class
				.removeClass(vars.prefix+'active');
			
			//make the "next"-element the new active-element
			vars.active = vars.next;
			
			//show captions
			if(settings.showCaptions !== 'never'){
				vars.active.children('.'+vars.prefix+'caption').stop(true,true).fadeTo(settings.captionsFadeTime,settings.captionsOpacity);
			}

			settings.nextCallback();
		},
		
		//effect "fade"
		fade = function($slider, settings, animate){
			var vars = $slider.data('slider:vars');
			
			//set next on top of the others and hide it
			if(animate){
				vars.next
					.css({
						zIndex:2
					})
					//then fade it in - fade with animate-> fade didnt do it...
					.animate({
						opacity: 1
					},settings.effectTime,function(){
							//and reset the rest
							resetElements($slider, settings);
						});
				vars.active
					.animate({
						opacity: 0
					},settings.effectTime);
			} else {
				vars.next
					.css({
						zIndex: 2,
						display: 'block'
					});
				vars.active.hide(0,function(){
					resetElements($slider, settings);
				});
			}
		},
		
		//slide-effect contains kick
		slide = function($slider, settings ,direction, stay, fade){
			var vars = $slider.data('slider:vars');
			var values = [];
			if(fade){
				//if effect is kick, set additional values for fade and slide animation
				values.opacity = 0;
				values.delay = settings.effectTime/2;
				values.activeEffectTime = settings.effectTime/2;
				values.easing = 'out';
				values.nextEasing = 'kick';
				settings.shiftValue.x = settings.shiftValue.x < 0 ? settings.shiftValue.x * -1 : settings.shiftValue.x;
			}else{
				// else set standard values
				values.opacity = 1;
				values.delay = 0;
				values.activeEffectTime = settings.effectTime;
				//if showtime is 0, content is sliding permanently so linear is the way to go
				values.easing = settings.showTime === 0 ? 'linear' : 'out';
				values.nextEasing = settings.showTime === 0 ? 'linear' : 'out';
				$slider.css({overflow: 'hidden'});
			}
			
			//check, in which direction the content will be moved
			switch(direction){
				case 'toTop':
					values.top = fade ? -settings.shiftValue.x : -vars.container.height();
					values.left = 0;
					values.nextTop = fade ? settings.shiftValue.x : -values.top;
					values.nextLeft = 0;
					break;
				case 'toBottom':
					values.top = fade ? settings.shiftValu.xe : vars.container.height();
					values.left = 0;
					values.nextTop = fade ? -settings.shiftValue.x : -values.top;
					values.nextLeft = 0;
					break;
				case 'toRight':
					values.top = 0;
					values.left = fade ? settings.shiftValue.x : vars.container.width();
					values.nextTop = 0;
					values.nextLeft = fade ? -settings.shiftValue.x : -values.left;
					break;
				case 'toLeft':
					values.top = 0;
					values.left = fade ? -settings.shiftValue.x : -vars.container.width();
					values.nextTop = 0;
					values.nextLeft = fade ? settings.shiftValue.x : -values.left;
					break;
			}
			
			//put the "next"-element on top of the others and show/hide it, depending on the effect
			vars.next
				.css({
					zIndex: 2,
					opacity: values.opacity
				});
				
			//if stay is true, the active-element will not move
			if(stay === false){
				vars.active
					.css({
						top: 0,
						left: 0
					})
					//delay is for kick, so it seems as if the "next"-element kicks the activ-element away
					.delay(values.delay)
					.animate({
						top: values.top,
						left: values.left,
						opacity: values.opacity
					},values.activeEffectTime,values.easing);	//easing is variable because kick seems more "realistic" if it's not too linear
			}
			vars.next
				//position "next"-element depending on the direction
				.css({
					top: values.nextTop,
					left: values.nextLeft
				})
				.animate({
					top: 0,
					left: 0,
					opacity: 1
				},settings.effectTime,values.nextEasing,function(){
					//reset element-positions
					resetElements($slider, settings);
				});
		},
		
		//prepare elements for shuffle effect
		preShuffle = function($slider, settings, $li){
			var vars = $slider.data('slider:vars');
			$li.html('<div class="'+vars.prefix+'partContainer">'+$li.html()+'</div>');
			var part = $li.html();
			var width = $slider.width();
			var height = $slider.height();
			for(i=1;i<(settings.parts.x*settings.parts.y);i++){
				$li.html($li.html()+part);
			}
			var $parts = $li.children('.'+vars.prefix+'partContainer');
			var partValues = [];
			partValues.width = $li.width()/settings.parts.x;
			partValues.height = $li.height()/settings.parts.y;
			$parts
				.each(function(i){
					var $this = $(this);
					partValues.top = ((i-(i%settings.parts.x))/settings.parts.x)*partValues.height;
					partValues.left = (i%settings.parts.x)*partValues.width;
					partValues.marginTop = -partValues.top;
					partValues.marginLeft = -partValues.left;
					$this
						.css({
							top:partValues.top,
							left:partValues.left,
							width:partValues.width,
							height:partValues.height,
							position:'absolute',
							overflow:'hidden'
						})
						.html('<div class="'+vars.prefix+'part">'+$this.html()+'</div>');
					$this.children('.'+vars.prefix+'part')
						.css({
							marginTop:partValues.marginTop,
							marginLeft:partValues.marginLeft,
							width:width,
							height:height,
							background:$li.css('background-image')+' '+$li.parent().css('background-color')
						});
			});
			return $parts;
		},
		
		//calc amount of parts
		calcParts = function(parts,c){
			if(parts.x * parts.y > 36){
				if(c){
					if(parts.x > 1){
						parts.x--;
					}else{
						parts.y--;
					}
					c = false;
				}else{
					if(parts.y > 1){
						parts.y--;
					}else{
						parts.x--;
					}
					c = true;
				}
				return calcParts(parts,c);
			}
			return parts;
		},
		
		//effect "shuffle"
		shuffle = function($slider, settings, stay, explode){
			settings.parts.x = settings.parts.x < 1 ? 1 : settings.parts.x;
			settings.parts.y = settings.parts.y < 1 ? 1 : settings.parts.y;
			settings.parts = calcParts(settings.parts,true);
			settings.shiftValue.x = settings.shiftValue.x < 0 ? settings.shiftValue.x * -1 : settings.shiftValue.x;
			settings.shiftValue.y = settings.shiftValue.y < 0 ? settings.shiftValue.y * -1 : settings.shiftValue.y;
			var vars = $slider.data('slider:vars');
			var activeContent = vars.active.html();
			var nextContent = vars.next.html();
			var width = $slider.width();
			var height = $slider.height();
			var $activeParts = preShuffle($slider, settings, vars.active);
			var $nextParts = preShuffle($slider, settings, vars.next);
			var activeBackgroundImage = vars.active.css('background-image');
			var activeBackgroundColor = vars.active.css('background-color');
			var nextBackgroundImage = vars.next.css('background-image');
			var nextBackgroundColor = vars.next.css('background-color');
			vars.active.css({
				backgroundImage: 'none',
				backgroundColor: 'none'
			});
			vars.next.css({
				backgroundImage: 'none',
				backgroundColor: 'none',
				zIndex: 2
			});
			var partValues = [];
			partValues.width = vars.next.width()/settings.parts.x;
			partValues.height = vars.next.height()/settings.parts.y;
			if(stay === false){
				$activeParts.each(function(i){
					$this = $(this);
					var newLeft, newTop;
					if(explode){
						var position = [];
						position.top = $this.position().top;
						position.bottom = $this.parent().height()-$this.position().top-$this.height();
						position.left = $this.position().left;
						position.right = $this.parent().width()-$this.position().left-$this.width();
						
						var rndX = parseInt(Math.random()*settings.shiftValue.x,10);
						var rndY = parseInt(Math.random()*settings.shiftValue.y,10);
						newLeft = position.right <= position.left ? (position.right == position.left ? rndX/2 : rndX) : -rndX;
						newTop = position.bottom <= position.top ? (position.top == (position.bottom-1) ? rndY/2 : rndY) : -rndY;
					}else{
						newLeft = (Math.random()*(settings.shiftValue.x*2)-settings.shiftValue.x);
						newTop = (Math.random()*(settings.shiftValue.y*2)-settings.shiftValue.y);
					}
					$this
						.animate({
							top: '+='+newTop,
							left: '+='+newLeft,
							opacity: 0
							},settings.effectTime,'linear');
				});
			}
			$nextParts.each(function(i){
				$this = $(this);
				partValues.top = ((i-(i%settings.parts.x))/settings.parts.x)*partValues.height;
				partValues.left = (i%settings.parts.x)*partValues.width;
				var newLeft, newTop;
				if(explode){
					var position = [];
					position.top = $this.position().top;
					position.bottom = $this.parent().height()-$this.position().top-$this.height();
					position.left = $this.position().left;
					position.right = $this.parent().width()-$this.position().left-$this.width();
					
					var rndX = parseInt(Math.random()*settings.shiftValue.x,10);
					var rndY = parseInt(Math.random()*settings.shiftValue.y,10);
					newLeft = position.right <= position.left ? (position.right == position.left ? rndX/2 : rndX) : -rndX;
					newTop = position.bottom <= position.top ? (position.top == (position.bottom-1) ? rndY/2 : rndY) : -rndY;
					newLeft = partValues.left+newLeft;
					newTop = partValues.top+newTop;
				}else{
					newLeft = partValues.left+(Math.random()*(settings.shiftValue.x*2)-settings.shiftValue.x);
					newTop = partValues.top+(Math.random()*(settings.shiftValue.y*2)-settings.shiftValue.y);
				}
				
				$this
					.css({
						top: newTop,
						left: newLeft,
						opacity: 0
					})
					.animate({
						top: partValues.top,
						left: partValues.left,
						opacity: 1
						},settings.effectTime,'linear',function(){
								if(i==$activeParts.length-1){
									vars.active.html(activeContent);
									vars.next.html(nextContent);
									vars.active.css({
										backgroundImage: activeBackgroundImage,
										backgroundColor: activeBackgroundColor
									});
									vars.next.css({
										backgroundImage: nextBackgroundImage,
										backgroundColor: nextBackgroundColor
									});
									resetElements($slider, settings);
								}
							});
			});
		},
		
		transfer = function($slider, settings,direction, stay){
			var vars = $slider.data('slider:vars');
			var values = [];
			//check, in which direction the content will be moved
			switch(direction){
				case 'toTop':
					values.top = -settings.shiftValue.y;
					values.left = '50%';
					values.nextTop = $slider.height()+settings.shiftValue.y;
					values.nextLeft = '50%';
					break;
				case 'toBottom':
					values.top = $slider.height()+settings.shiftValue.y;
					values.left = '50%';
					values.nextTop = -settings.shiftValue.y;
					values.nextLeft = '50%';
					break;
				case 'toRight':
					values.top = '50%';
					values.left = $slider.width()+settings.shiftValue;
					values.nextTop = '50%';
					values.nextLeft = -settings.shiftValue.x;
					break;
				case 'toLeft':
					values.top = '50%';
					values.left = -settings.shiftValue.x;
					values.nextTop = '50%';
					values.nextLeft = $slider.width()+settings.shiftValue.x;
					break;
			}
			vars.next.children().wrapAll('<div id="'+vars.prefix+'nextContainer />');
			$nextContainer = $('#'+vars.prefix+'nextContainer', vars.next);
			
			$nextContainer.css({
				width: $slider.width(),
				height: $slider.height(),
				position: 'absolute',
				top: '50%',
				left: '50%',
				margin: '-'+parseInt($slider.height()/2,10)+'px 0 0 -'+parseInt($slider.width()/2,10)+'px'
			});
				
			
			vars.active.children().wrapAll('<div id="'+vars.prefix+'nextContainer />');
			$activeContainer = $('#'+vars.prefix+'nextContainer', vars.active);
			
			$activeContainer.css({
				width: $slider.width(),
				height: $slider.height(),
				position: 'absolute',
				top: '50%',
				left: '50%',
				margin: '-'+parseInt($slider.height()/2,10)+'px 0 0 -'+parseInt($slider.width()/2,10)+'px'
			});
			
			if(stay == false){
				vars.active
					.css({
						width: '100%',
						height: '100%',
						top: 0,
						left: 0
					})
					.animate({
						width: 0,
						height: 0,
						top: values.top,
						left: values.left,
						opacity: 0
					},settings.effectTime);
			}
			
			vars.next
				.css({
					opacity: 0,
					zIndex: 2,
					width: 0,
					height: 0,
					top: values.nextTop,
					left: values.nextLeft
				})
				.animate({
					width: '100%',
					height: '100%',
					top: 0,
					left: 0,
					opacity: 1
				},settings.effectTime,function(){
					$activeContainer.children().unwrap();
					$nextContainer.children().unwrap();
					resetElements($slider, settings);
			});
		}
	;
	};
	
	jQuery.fn.rhinoslider = function(opts){
		
		return this.each(function(){
			var element = $(this);
			if(element.data('rhinoslider')){
				return element.data('rhinoslider');
			}
			var rhinoslider = new rhinoSlider(this, opts);
			element.data('rhinoslider', rhinoslider);
		});
	};
	
	jQuery.fn.rhinoslider.defaults = {
		effect: 'shuffle',	//which effect to blend content
		controlsPrevNext: true,	//show/hide prev/next-controls
		controlsPlayPause: true,	//show/hide play/pause-controls
		controlsThumbs: true,	//show/hide thumbs for direct access
		pauseOnHover: true,	//pause on mouse-over
		slideStay: true,	//if the active content should be animated too - depending on effect slide
		caption: false,	//show/hide image-title
		autoPlay: true,	//start slideshow automatically on init
		showTime: 4500,	//time, the content is visible before next content will be blend in - depends on autoPlay
		effectTime: 800,	//time, the effect will last
		shiftValue: '150,0',	//width, the animation for moving the content needs, can be comma-seperated string (x,y) or int if both are the same
		parts: '6,4',	//amount of parts per line for explode effect
		showControls: 'always',	//show controls: hover, always, never
		controlFadeTime: 650, //duration for fading controls
		slidePrevDirection: 'toLeft',	//the direction, the prev-button triggers - depending on effect slide
		slideNextDirection: 'toRight',	//the direction, the next-button triggers - depending on effect slide
		prevText: 'prev',	//text for the prev-button
		nextText: 'next',	//text for the next-button
		playText: 'play',	//text for the play-button
		pauseText: 'pause', //text for the pause-button
		nextCallback: function(){}	//the function, which is started after the blending-effect
	};
	
})(jQuery);
