
 
 (function($) {
	
	$.fn.easySlider_new_ciando = function(options){
	  
		// default configuration properties
		var defaults = {			
			prevId: 		'prevBtn_ciando',
			prevText: 		'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
			nextId: 		'nextBtn_ciando',	
			nextText: 		'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
			controlsShow:	true,
			controlsBefore:	'',
			controlsAfter:	'',	
			controlsFade:	true,
			firstId: 		'firstBtn',
			firstText: 		'First',
			firstShow:		false,
			lastId: 		'lastBtn',	
			lastText: 		'Last',
			lastShow:		false,				
			vertical:		true,
			speed: 			800,
			auto:			false,
			pause:			2000,
			continuous:		false, 
			numeric: 		false,
			numericId: 		'controls'
		}; 
		
		
		
		var options = $.extend(defaults, options);  
				
		this.each(function() {  
			var obj = $(this); 				
			var s = $("li", obj).length;
			var w = $("li", obj).width(); 
			var h = $("li", obj).height(); 
			var clickable = true;
			obj.width(w); 
			obj.height(h); 
			obj.css("overflow","hidden");
			var ts = s-1;
			var t = 0;
			$("ul", obj).css('width',s*w);			
			
			if(options.continuous){
				$("ul", obj).prepend($("ul li:last-child", obj).clone().css("margin-left","-"+ w +"px"));
				$("ul", obj).append($("ul li:nth-child(2)", obj).clone());
				$("ul", obj).css('width',(s+1)*w);
			};s				
			
			
			
			if(!options.vertical) $("li", obj).css('float','left');
								
			if(options.controlsShow){
				var html = options.controlsBefore;				
				if(options.numeric){
					html += '<ol id="'+ options.numericId +'"></ol>';
				} else {
					if(options.firstShow) html += '<span id="'+ options.firstId +'"><a href=\"javascript:void(0);\">'+ options.firstText +'</a></span>';
					html += ' <span id="'+ options.prevId +'" style=""><a id="bu" href=\"javascript:void(0);\">'+ options.prevText +'</a></span>';
					html += ' <span id="'+ options.nextId +'" style=""><a id="ba" href=\"javascript:void(0);\">'+ options.nextText +'</a></span>';
					if(options.lastShow) html += ' <span id="'+ options.lastId +'"><a href=\"javascript:void(0);\">'+ options.lastText +'</a></span>';				
				};
				
				html += options.controlsAfter;						
				$(obj).after(html);										
			};
			
			
			
			if(options.numeric){									
				for(var i=0;i<s;i++){						
					$(document.createElement("li"))
						.attr('id',options.numericId + (i+1))
						.html('<a rel='+ i +' href=\"javascript:void(0);\">'+ (i+1) +'</a>')
						.appendTo($("#"+ options.numericId))
						.click(function(){							
							animate($("a",$(this)).attr('rel'),true);
						}); 												
				};							
			} else {
				$("a","#"+options.nextId).click(function(){		
					animate("next",true);
					
				});
				$("a","#"+options.prevId).click(function(){		
					animate("prev",true);
					
				});	
				$("a","#"+options.firstId).click(function(){		
					animate("first",true);
				});				
				$("a","#"+options.lastId).click(function(){		
					animate("last",true);				
				});				
			};
			
			function setCurrent(){
				i = parseInt(i)+1;
				$("li", "#" + options.numericId).removeClass("current");
				$("li#" + options.numericId + i).addClass("current"); 
			};
			
			
			function adjust(){
				if(t>ts) t=0;		
				if(t<0) t=ts;	
				if(!options.vertical) {
					$("ul",obj).css("margin-left",(0));// t*w*-1 
				} else {
					$("ul",obj).css("margin-left",(0));// t*h*-1 
				}
				clickable = true;
				if(options.numeric) setCurrent(t);
			};
			
			
			
			if(s==1){
						$("a","#"+options.nextId).hide();
					};
			
		
		/* if(jc){
			var seite2 = '';
			var seite3 = '';
		} */
		//Walter der folgende Quellcode ist nicht für deine Augen bestimmt aber auf jeden Fall muss eine andere Lösung her, da diese fatal ist.
		if(jc==50 || jc==31 || jc==57 || jc==64 || jc==54){var seite3=1;};
		if(jc==14 || jc==10 || jc==386 || jc==245 || jc==12 || jc==318 || jc==200 || jc==5 || jc==219 || jc==833 || jc==815 || jc==4 || jc==403
			 || jc==27 || jc==22 || jc==299 || jc==16 || jc==21 || jc==40 || jc==44 || jc==41 || jc==61 || jc==997 || jc==35 || jc==46 || jc==30
			 || jc==52 || jc==979 || jc==59 || jc==43 || jc==55 || jc==1049 || jc==62 || jc==836 || jc==48 || jc==70 || jc==73 || jc==80 || jc==81
			 || jc==94  || jc==68 || jc==817 || jc==77 || jc==87 || jc==89 || jc==76 || jc==285 || jc==123 || jc==124 || jc==125 || jc==769 || jc==1202
    	 || jc==130 || jc==127 || jc==823 || jc==128 || jc==446 || jc==133 || jc==129 || jc==144 || jc==145 || jc==151 || jc==162 || jc==165
 			 || jc==146 || jc==150 || jc==821 || jc==158 || jc==147 || jc==212 || jc==164 || jc==374 || jc==198 || jc==201 || jc==809 || jc==173
			 || jc==264 || jc==199 || jc==172 || jc==179 || jc==191 || jc==178 || jc==186 || jc==233 || jc==376 || jc==384 || jc==811 || jc==235
			 || jc==406 || jc==14 || jc==10 || jc==386 || jc==245 || jc==12 || jc==318 || jc==200 || jc==5 || jc==219 || jc==833 || jc==815
			 || jc==4 || jc==403 || jc==27 || jc==22 || jc==299 || jc==16 || jc==21 || jc==126){var seite2=1;};
		
		if(typeof jc == "undefined") {	 
			
		} else {
						
			//seite3 Unterkategorien
			if(seite3==1){
				var p = -330;
				var t = 2;
				var ts = 2; 
				$("ul",obj).css("margin-top",(-330));
					$("a","#"+options.prevId).click(function(){		
						animate("prev",true);
					});
					
					$("a","#"+options.nextId).click(function(){		
						animate("next",true);
					});
			}
			
			//seite2 Unterkategorien
			if(seite2==1){
				var p = -165;
				var t = 1;
				var ts = 2; 
				$("ul",obj).css("margin-top",(-165));
					$("a","#"+options.prevId).click(function(){		
						animate("prev",true);
					});
					
					$("a","#"+options.nextId).click(function(){		
						animate("next",true);
					});
			}
		}
			 
			
			function animate(dir,clicked){
				if (clickable){
					clickable = false;
					var ot = t;				
					switch(dir){
						case "next":
							t = (ot>=ts) ? (options.continuous ? t+1 : ts) : t+1;						
							break; 
						case "prev":
							t = (t<=0) ? (options.continuous ? t-1 : 0) : t-1;
							break; 
						case "first":
							t = 0;
							break; 
						case "last":
							t = ts;
							break; 
						default:
							t = dir;
							break; 
					};	
					var diff = Math.abs(ot-t);
					var speed = diff*options.speed;						
					if(!options.vertical) {
						p = (t*w*-1);
						$("ul",obj).animate(
							{ marginLeft: p }, 
							{ queue:false, duration:speed, complete:adjust }
						);				
					} else {
						p = (t*h*-1);
						$("ul",obj).animate(
							{ marginTop: p }, 
							{ queue:false, duration:speed, complete:adjust }
							
						);					
					};
					
					if(!options.continuous && options.controlsFade){					
						if(t==ts){
							$("a","#"+options.nextId).hide();
							$("a","#"+options.lastId).hide();
						} else {
							$("a","#"+options.nextId).show();
							$("a","#"+options.lastId).show();					
						};
						if(t==0){
							$("a","#"+options.prevId).hide();
							$("a","#"+options.firstId).hide();
						} else {
							$("a","#"+options.prevId).show();
							$("a","#"+options.firstId).show();
						};					
					};				
					
					if(clicked) clearTimeout(timeout);
					if(options.auto && dir=="next" && !clicked){;
						timeout = setTimeout(function(){
							animate("next",false);
						},diff*options.speed+options.pause);
					};
			
				};
				
			};
			// init
			
			var timeout;
			if(options.auto){;
				timeout = setTimeout(function(){
					animate("next",false);
				},options.pause);
			};		
			
			if(options.numeric) setCurrent();
		
			if(!options.continuous && options.controlsFade){					
				$("a","#"+options.prevId).hide(); 
				$("a","#"+options.firstId).hide(); 				
			};				
			
			/*steuert das ein-und ausblenden der Pfeile*/
			if(jcookie_container==4){
				if(p==-165){
					$("a","#"+options.prevId).show();
					$("a","#"+options.nextId).hide();
				}
			}
			
			if(jcookie_container==5){
				if(p==-0){
					$("a","#"+options.prevId).hide();
					$("a","#"+options.nextId).show();
				}
				if(p==-165){
					$("a","#"+options.prevId).show();
					$("a","#"+options.nextId).show();
				}
				if(p==-330){
					$("a","#"+options.prevId).show();
					$("a","#"+options.nextId).hide();
				}
			}
			/**/
		});
	  
	};

})(jQuery);



 
/*original text vor Kategorieanpassung*/

/* 
 (function($) {
	
	$.fn.easySlider_ciando = function(options){
	  
		// default configuration properties
		var defaults = {			
			prevId: 		'prevBtn_ciando',
			prevText: 		'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
			nextId: 		'nextBtn_ciando',	
			nextText: 		'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
			controlsShow:	true,
			controlsBefore:	'',
			controlsAfter:	'',	
			controlsFade:	true,
			firstId: 		'firstBtn',
			firstText: 		'First',
			firstShow:		false,
			lastId: 		'lastBtn',	
			lastText: 		'Last',
			lastShow:		false,				
			vertical:		true,
			speed: 			800,
			auto:			false,
			pause:			2000,
			continuous:		false, 
			numeric: 		false,
			numericId: 		'controls'
		}; 
		
		
		
		var options = $.extend(defaults, options);  
				
		this.each(function() {  
			var obj = $(this); 				
			var s = $("li", obj).length;
			var w = $("li", obj).width(); 
			var h = $("li", obj).height(); 
			var clickable = true;
			obj.width(w); 
			obj.height(h); 
			obj.css("overflow","hidden");
			var ts = s-1;
			var t = 0;
			$("ul", obj).css('width',s*w);			
			
			if(options.continuous){
				$("ul", obj).prepend($("ul li:last-child", obj).clone().css("margin-left","-"+ w +"px"));
				$("ul", obj).append($("ul li:nth-child(2)", obj).clone());
				$("ul", obj).css('width',(s+1)*w);
			};s				
			
			
			
			if(!options.vertical) $("li", obj).css('float','left');
								
			if(options.controlsShow){
				var html = options.controlsBefore;				
				if(options.numeric){
					html += '<ol id="'+ options.numericId +'"></ol>';
				} else {
					if(options.firstShow) html += '<span id="'+ options.firstId +'"><a href=\"javascript:void(0);\">'+ options.firstText +'</a></span>';
					html += ' <span id="'+ options.prevId +'" style=""><a id="bu" href=\"javascript:void(0);\">'+ options.prevText +'</a></span>';
					html += ' <span id="'+ options.nextId +'" style=""><a id="ba" href=\"javascript:void(0);\">'+ options.nextText +'</a></span>';
					if(options.lastShow) html += ' <span id="'+ options.lastId +'"><a href=\"javascript:void(0);\">'+ options.lastText +'</a></span>';				
				};
				
				html += options.controlsAfter;						
				$(obj).after(html);										
			};
			
			
			
			
			
			
			if(jcookie){
				var t = jcookie_t; //alert('t');
				var ts = jcookie_ts; //alert('ts');
			}
			
			
			// if(jc){
			//	var jcookie_cat = $.cookie('jc');
			//	 alert(jcookie_cat);
			//	$.cookie('jc' , 'jc');
			// alert(jc); 
			//} 
			// if(jcookie_kat2){
			//	alert(jcookie_kat2);
			//} 
			
			// alert(jc); 
			//$.cookie('jc' , 'jc');
			// alert(jc);
			
			if(typeof jc != "undefined") {
			 if(jc==70){
				$.cookie('jcookie' , -165, {expires: 30, path: '/'}); alert('70');
				$.cookie('jc' , 'jc', {expires: 30, path: '/'}); alert('7');
				$.cookie('jcookie_ts' , ts, {expires: 30, path: '/'});alert('n3');
				}

				if(jc==50){
				$.cookie('jcookie' , -330, {expires: 30, path: '/'}); alert('70');
				$.cookie('jc' , jc, {expires: 30, path: '/'}); alert('7');
				$.cookie('jcookie_t' , t, {expires: 30, path: '/'}); alert('n2');
				$.cookie('jcookie_ts' , ts, {expires: 30, path: '/'});alert('n3');
				} 
			}
			
			
			if(options.numeric){									
				for(var i=0;i<s;i++){						
					$(document.createElement("li"))
						.attr('id',options.numericId + (i+1))
						.html('<a rel='+ i +' href=\"javascript:void(0);\">'+ (i+1) +'</a>')
						.appendTo($("#"+ options.numericId))
						.click(function(){							
							animate($("a",$(this)).attr('rel'),true);
						}); 												
				};							
			} else {
				$("a","#"+options.nextId).click(function(){		
					animate("next",true);
					var jcookie = $.cookie('jcookie');
					var jcookie_t = $.cookie('jcookie_t');
					var jcookie_ts = $.cookie('jcookie_ts');
					if(jcookie!=-165){
					$.cookie('jcookie' , p, {expires: 30, path: '/'}); alert('n1');
					$.cookie('jcookie_t' , t, {expires: 30, path: '/'}); alert('n2');
					$.cookie('jcookie_ts' , ts, {expires: 30, path: '/'});alert('n3');
					} else {
									$.cookie('jcookie' , -165, {expires: 30, path: '/'}); alert('n11');
									$.cookie('jcookie_t' , t, {expires: 30, path: '/'}); alert('n22');
									$.cookie('jcookie_ts' , ts, {expires: 30, path: '/'});alert('n33');
					}
				});
				$("a","#"+options.prevId).click(function(){		
					animate("prev",true);
					var jcookie = $.cookie('jcookie');
				  var jcookie_t = $.cookie('jcookie_t');
				  var jcookie_ts = $.cookie('jcookie_ts');
				
					if(jcookie==-165) {
						$.cookie('jcookie' , 0, {expires: 30, path: '/'}); alert('p1');
						$.cookie('jcookie_t' , t, {expires: 30, path: '/'}); alert('p2');
						$.cookie('jcookie_ts' , ts, {expires: 30, path: '/'});alert('p3');
					}
					if(jcookie==-330) {
						$.cookie('jcookie' , -165, {expires: 30, path: '/'}); alert('p1');
						$.cookie('jcookie_t' , t, {expires: 30, path: '/'}); alert('p2');
						$.cookie('jcookie_ts' , ts, {expires: 30, path: '/'});alert('p3');
					}
				});	
				$("a","#"+options.firstId).click(function(){		
					animate("first",true);
				});				
				$("a","#"+options.lastId).click(function(){		
					animate("last",true);				
				});				
			};
			
			function setCurrent(){
				i = parseInt(i)+1;
				$("li", "#" + options.numericId).removeClass("current");
				$("li#" + options.numericId + i).addClass("current"); alert("asdas");
			};
			
			
			function adjust(){
				if(t>ts) t=0;		
				if(t<0) t=ts;	
				if(!options.vertical) {
					$("ul",obj).css("margin-left",(0));// t*w*-1 
				} else {
					$("ul",obj).css("margin-left",(0));// t*h*-1 
				}
				clickable = true;
				if(options.numeric) setCurrent(t);
			};
			
			
			
			if(s==1){
						$("a","#"+options.nextId).hide();
					};
			
			  
			if(jcookie){
					//alert(jc); 
					if(jcookie_t){var t = jcookie_t;}
					if(jcookie_ts){var ts = jcookie_ts;}
					
						//if(jcookie==0) { alert('0'); $("ul",obj).css("margin-top",(0));}
					
					if(jcookie_container==4){
						//alert(jcookie_container);
						if(jcookie==0) {
							//alert("nullnb");
							$("ul",obj).css("margin-top",(0));
							$("a","#"+options.prevId).click(function(){		
								animate("prev",true);
							});
							
							$("a","#"+options.nextId).click(function(){		
								animate("next",true);
							});
						}
						
						if(jcookie==-165) {
							
							$("ul",obj).css("margin-top",(-165));
							$("a","#"+options.prevId).click(function(){		
								animate("prev",true);
							});
							
							$("a","#"+options.nextId).click(function(){		
								animate("next",true);
							});
						}
					}
						
					if(jcookie_container==5){
						if(jcookie==-165) {
							alert('165a');
							$("ul",obj).css("margin-top",(-165));
							$("a","#"+options.prevId).click(function(){		
								animate("prev",true);
							});
							
							$("a","#"+options.nextId).click(function(){		
								animate("next",true);
							});
						}
						
						
						if(jcookie==-330) { alert('330a');  $("ul",obj).css("margin-top",(-330)); $$('bu').style.display = "block";}
					}
					
					clickable = true;
					if(options.numeric) setCurrent(t);
				
				

 					function animate(dir,clicked){
					if (clickable){
						clickable = false;
						var ot = t;				
						switch(dir){
							case "next":
								t = (ot>=ts) ? (options.continuous ? t+1 : ts) : t+1;						
								break; 
							case "prev":
								t = (t<=0) ? (options.continuous ? t-1 : 0) : t-1;
								break; 
							case "first":
								t = 0;
								break; 
							case "last":
								t = ts;
								break; 
							default:
								t = dir;
								break; 
						};	
						var diff = Math.abs(ot-t);
						var speed = diff*options.speed;						
						if(!options.vertical) {
							p = (t*w*-1);
							$("ul",obj).animate(
								{ marginLeft: p }, 
								{ queue:false, duration:speed, complete:adjust }
							);				
						} else {
							p = (t*h*-1);
							$("ul",obj).animate(
								{ marginTop: p }, 
								{ queue:false, duration:speed, complete:adjust }
								
							);					
						};
						
						if(!options.continuous && options.controlsFade){					
							if(t==ts){
								$("a","#"+options.nextId).hide();//alert('hide');
								$("a","#"+options.lastId).hide();//alert('hide');
							} else {
								$("a","#"+options.nextId).show();//alert('3');
								$("a","#"+options.lastId).show();	//alert('4');				
							};
							if(t==0){
								$("a","#"+options.prevId).hide();//alert('hide');
								$("a","#"+options.firstId).hide();//alert('hide');
							} else {
								$("a","#"+options.prevId).show();//alert('7');
								$("a","#"+options.firstId).show();//alert('8');
							};					
						};				
						
						if(clicked) clearTimeout(timeout);
						if(options.auto && dir=="next" && !clicked){;
							timeout = setTimeout(function(){
								animate("next",false);
							},diff*options.speed+options.pause);
						};
				
					};
					
				};
				
 			}; 
			
			
			function animate(dir,clicked){
				if (clickable){
					clickable = false;
					var ot = t;				
					switch(dir){
						case "next":
							t = (ot>=ts) ? (options.continuous ? t+1 : ts) : t+1;						
							break; 
						case "prev":
							t = (t<=0) ? (options.continuous ? t-1 : 0) : t-1;
							break; 
						case "first":
							t = 0;
							break; 
						case "last":
							t = ts;
							break; 
						default:
							t = dir;
							break; 
					};	
					var diff = Math.abs(ot-t);
					var speed = diff*options.speed;						
					if(!options.vertical) {
						p = (t*w*-1);
						$("ul",obj).animate(
							{ marginLeft: p }, 
							{ queue:false, duration:speed, complete:adjust }
						);				
					} else {
						p = (t*h*-1);
						$("ul",obj).animate(
							{ marginTop: p }, 
							{ queue:false, duration:speed, complete:adjust }
							
						);					
					};
					
					if(!options.continuous && options.controlsFade){					
						if(t==ts){
							$("a","#"+options.nextId).hide();
							$("a","#"+options.lastId).hide();
						} else {
							$("a","#"+options.nextId).show();
							$("a","#"+options.lastId).show();					
						};
						if(t==0){
							$("a","#"+options.prevId).hide();
							$("a","#"+options.firstId).hide();
						} else {
							$("a","#"+options.prevId).show();
							$("a","#"+options.firstId).show();
						};					
					};				
					
					if(clicked) clearTimeout(timeout);
					if(options.auto && dir=="next" && !clicked){;
						timeout = setTimeout(function(){
							animate("next",false);
						},diff*options.speed+options.pause);
					};
			
				};
				
			};
			// init
			var timeout;
			if(options.auto){;
				timeout = setTimeout(function(){
					animate("next",false);
				},options.pause);
			};		
			
			if(options.numeric) setCurrent();
		
			if(!options.continuous && options.controlsFade){					
				$("a","#"+options.prevId).hide(); 
				$("a","#"+options.firstId).hide(); 				
			};				
			
		});
	  
		if(jcookie){
			if(jcookie_container==4){
				if(jcookie==-165){
				$("a","#"+options.prevId).show();//alert('prev');
				$("a","#"+options.nextId).hide();//alert('hide');
				}
			}

			if(jcookie_container==5){
				if(jcookie==-165){
				$("a","#"+options.prevId).show();//alert('prev');
				$("a","#"+options.nextId).show();//alert('hide');
				}
				
				if(jcookie==-330){
				$("a","#"+options.prevId).show();//alert('prev');
				$("a","#"+options.nextId).hide();//alert('hide');
				}
			}
		}
	};

})(jQuery);



 */
