jQuery(document).ready( function () {

		//Audio

	jQuery(".gallery").find("div.play").toggle(
		function() {
			audioelement	=	jQuery(this).find("audio").get(0);
			audioelement.currentTime=0;
			audioelement.play();
			jQuery(this)
				.css({"background-image":"url(http://greencore-events.de/wp-content/themes/events/images/buttons/stop.png)"})
		},
		function() {
			audioelement.pause();
			jQuery(this)
				.css({"background-image":"url(http://greencore-events.de/wp-content/themes/events/images/buttons/play.png)"})
		}
	);


	//Sitemap Toggle
	
	jQuery("a#sitemap_toggle").toggle(function() {
	
		jQuery("ul#menu").stop().animate({
			height: "214px",
			marginTop: "-223px"
		},800);
		
		jQuery(this).find("img").replaceWith("<img src='http://greencore-events.de/wp-content/themes/events/images/menu/toggle_down.png' alt='Sitemap Toggle' />");
		jQuery("a#schatten_link").find("img").replaceWith("<img src='http://greencore-events.de/wp-content/themes/events/images/menu/schatten_down.png' alt='Schatten' />")
		
	}, function() {

		jQuery("ul#menu").stop().animate({
			height: "43px",
			marginTop: "-52px"
		},400);

		jQuery(this).find("img").replaceWith("<img src='http://greencore-events.de/wp-content/themes/events/images/menu/toggle_up.png' alt='Sitemap Toggle' />");
		jQuery("a#schatten_link").find("img").replaceWith("<img src='http://greencore-events.de/wp-content/themes/events/images/menu/schatten_up.png' alt='Schatten' />")

	});	
	
	
	//Menu Button Hover
	
	jQuery("#menu a[id!='schatten_link']").find("img").hover(function() {
	
		jQuery(this).css({"background-color": "rgba(255, 255, 255,0.7)"});

		jQuery(this).stop().delay(31).stop().animate({
			backgroundColor: "rgba(255, 255, 255, 0.4)"
		}, 100);
		
		jQuery(this).stop().delay(132).stop().animate({
			backgroundColor: "rgba(255, 255, 255, 0.2)"
		}, 300)
	}, function() {
	
		jQuery(this).stop().animate({
			backgroundColor: "rgba(1,1,1,0.65)"
		}, 500);
			
		jQuery(this).stop().delay(501).stop().animate({
			backgroundColor: "rgba(1,1,1,0)"
		}, 1000)
	
	});
	
	
	//Logo Button Hover
	
	jQuery("div#logodj div#punkte").find("a").hover(function() {
	
		jQuery(this).removeClass('notactive');
		
		jQuery("div#punkte").find('.notactive img').stop().animate({
		
			opacity	:	0.5
		
		},400)
	
	},	function() {
		
		jQuery("div#punkte").find('.notactive img').stop().animate({
		
			opacity	:	1
		
		},800)
		
		jQuery(this).addClass('notactive');
	
	});
	
	
	//Referenzen Toggle
	
	jQuery("div#page div.post div.content div.entry div.innerbox small").toggle(function() {
	
		innerbox_ul = jQuery(this).parent().find("ul");
	
		jQuery(innerbox_ul).css({"height" : "100%"});
			
			var innerbox_height = jQuery(innerbox_ul).height();
			
		jQuery(innerbox_ul).css({"height" : "66px"});
	
		jQuery(innerbox_ul).stop().animate({
			height: innerbox_height
		},800);
		
		jQuery(this).css({"background":"url('wp-content/themes/events/images/buttons/pfeil_up.png') left center no-repeat"});
		
	}, function() {

		jQuery(innerbox_ul).stop().animate({
			height: "66px"
		},400);
		
		jQuery(this).css({"background":"url('wp-content/themes/events/images/buttons/pfeil_down.png') left center no-repeat"});

	});	
	
	
	
	//Contact
		jQuery('input[type!=submit]').each(function(){
            var wert = jQuery(this).val();
            jQuery(this).focus(function(){
                    if (jQuery(this).val() == wert) {
                        jQuery(this).val('')
                    }
                })
                .blur(function(){
                    if (jQuery.trim(jQuery(this).val()) == '') {
                        jQuery(this).val(wert)
                    }
                })
        });
	
	    jQuery(function() {
        try {
            if (typeof _wpcf7 == 'undefined' || _wpcf7 === null)
                _wpcf7 = {};

            _wpcf7 = jQuery.extend({ cached: 0 }, _wpcf7);

            jQuery('div.wpcf7 > form').ajaxForm({
                beforeSubmit: function(formData, jqForm, options) {
                    jqForm.wpcf7ClearResponseOutput();
                    return true;
                },
                beforeSerialize: function(jqForm, options) {
                    jqForm.find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
                        jQuery(n).val('');
                    });
                    return true;
                },
                data: { '_wpcf7_is_ajax_call': 1 },
                dataType: 'json',
                success: function(data) {
                    var ro = jQuery(data.into).find('div.wpcf7-response-output');
                    jQuery(data.into).wpcf7ClearResponseOutput();

                    if (data.invalids) {
                        jQuery.each(data.invalids, function(i, n) {
                            jQuery(data.into).find(n.into).wpcf7NotValidTip(n.message);
                        });
                        ro.addClass('wpcf7-validation-errors');
                    }

                    if (data.captcha)
                        jQuery(data.into).wpcf7RefillCaptcha(data.captcha);

                    if (data.quiz)
                        jQuery(data.into).wpcf7RefillQuiz(data.quiz);

                    if (1 == data.spam)
                        ro.addClass('wpcf7-spam-blocked');

                    if (1 == data.mailSent) {
                        jQuery(data.into).find('form').resetForm().clearForm();
                        ro.addClass('wpcf7-mail-sent-ok');
                        
                        jQuery(".wpcf7-submit").css({	"background"	:	"#81974B"	}).attr("value", "Gesendet");

                        if (data.onSentOk)
                            jQuery.each(data.onSentOk, function(i, n) { eval(n) });
                    } else {
                        ro.addClass('wpcf7-mail-sent-ng');
                    }

                    if (data.onSubmit)
                        jQuery.each(data.onSubmit, function(i, n) { eval(n) });

                    jQuery(data.into).find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
                        jQuery(n).val(jQuery(n).attr('title'));
                    });

                    ro.append(data.message).slideDown('fast');
                }
            });

            jQuery('div.wpcf7 > form').each(function(i, n) {
                if (_wpcf7.cached)
                    jQuery(n).wpcf7OnloadRefill();

                jQuery(n).wpcf7ToggleSubmit();

                jQuery(n).find('.wpcf7-acceptance').click(function() {
                    jQuery(n).wpcf7ToggleSubmit();
                });

                jQuery(n).find('.wpcf7-exclusive-checkbox').each(function(i, n) {
                    jQuery(n).find('input:checkbox').click(function() {
                        jQuery(n).find('input:checkbox').not(this).removeAttr('checked');
                    });
                });

                jQuery(n).find('.wpcf7-use-title-as-watermark').each(function(i, n) {
                    var input = jQuery(n);
                    input.val(input.attr('title'));
                    input.addClass('watermark');

                    input.focus(function() {
                        if (jQuery(this).hasClass('watermark'))
                            jQuery(this).val('').removeClass('watermark');
                    });

                    input.blur(function() {
                        if ('' == jQuery(this).val())
                            jQuery(this).val(jQuery(this).attr('title')).addClass('watermark');
                    });
                });
            });

        } catch (e) {
        }
    });

    jQuery.fn.wpcf7ToggleSubmit = function() {
        return this.each(function() {
            var form = jQuery(this);
            if (this.tagName.toLowerCase() != 'form')
                form = jQuery(this).find('form').first();

            if (form.hasClass('wpcf7-acceptance-as-validation'))
                return;

            var submit = form.find('input:submit');
            if (! submit.length) return;

            var acceptances = form.find('input:checkbox.wpcf7-acceptance');
            if (! acceptances.length) return;

            submit.removeAttr('disabled');
            acceptances.each(function(i, n) {
                n = jQuery(n);
                if (n.hasClass('wpcf7-invert') && n.is(':checked')
                || ! n.hasClass('wpcf7-invert') && ! n.is(':checked'))
                    submit.attr('disabled', 'disabled');
            });
        });
    };

    jQuery.fn.wpcf7NotValidTip = function(message) {
        return this.each(function() {
            jQuery('input, textarea',this).addClass('wrongval').css({'background-color' : '#F2C2C2'});
            jQuery('.wrongval').focus(function() {
                jQuery(this).css({'background-color' : '#FBFBFB'});
            });
            jQuery('p.wpcf7-error').css({'background-color' : '#F2C2C2', 'padding' : '5px', 'margin' : '0 10px'}).append(message + '<br />');
        });
        
    };

    jQuery.fn.wpcf7OnloadRefill = function() {
        return this.each(function() {
            var url = jQuery(this).attr('action');
            if (0 < url.indexOf('#'))
                url = url.substr(0, url.indexOf('#'));

            var id = jQuery(this).find('input[name="_wpcf7"]').val();
            var unitTag = jQuery(this).find('input[name="_wpcf7_unit_tag"]').val();

            jQuery.getJSON(url,
                { _wpcf7_is_ajax_call: 1, _wpcf7: id },
                function(data) {
                    if (data && data.captcha)
                        jQuery('#' + unitTag).wpcf7RefillCaptcha(data.captcha);

                    if (data && data.quiz)
                        jQuery('#' + unitTag).wpcf7RefillQuiz(data.quiz);
                }
            );
        });
    };

    jQuery.fn.wpcf7RefillQuiz = function(quiz) {
        return this.each(function() {
            var form = jQuery(this);

            jQuery.each(quiz, function(i, n) {
                form.find(':input[name="' + i + '"]').clearFields();
                form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[0]);
                form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[1]);
            });
        });
    };

    jQuery.fn.wpcf7ClearResponseOutput = function() {
        return this.each(function() {
            jQuery(this).find('div.wpcf7-response-output').hide().empty().removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked');
        });
    };
	
	
	
	
	//Load next Rezension
		jQuery("#next-rez")
			.click( function() {

					newrezension();
				
				}

			);

	
	
	//Category Sortieren
	url	=	document.location.toString();
	
	
	
	if (	url.match('#')	)	{
	
		var wanted_cat = url.split('#')[1];
		
		jQuery(".sub_cat_jquery li").css({	"background-color"	:	"#666"	});
			
		jQuery(".sub_cat_jquery").find('a[href="#'+wanted_cat+'"]').parent().css({	"background-color"	:	"#A6C94E"	});
				
		jQuery(".post").attr("rel", "");
				
		jQuery("."+wanted_cat).attr("rel", "visible");
				
				
		jQuery("#page .post[rel='visible']").show()
			.stop()
			.animate({	opacity	:	1	},	600)
				
		jQuery(".post[rel!='visible']")
			.stop()
			.animate({	opacity	:	0	},	600,	function() {
					jQuery(".post[rel!='visible']").hide()
				
				});
	
	}
	
	jQuery("ul#menu li.topmenu ul.sub-menu a")
		.click(
			
			function(e) {
			
				jQuery(".sub_cat_jquery li").css({	"background-color"	:	"#666"	});
				
				var	wanted_cat	=	jQuery(this).attr("href").split("#")[1];
			
				jQuery(".sub_cat_jquery").find('a[href="#'+wanted_cat+'"]').parent().css({	"background-color"	:	"#A6C94E"	});
				
				jQuery(".post").attr("rel", "");
				
				jQuery("."+wanted_cat).attr("rel", "visible");
				
				
				jQuery("#page .post[rel='visible']").show()
					.stop()
					.animate({	opacity	:	1	},	600)
				
				jQuery(".post[rel!='visible']")
					.stop()
					.animate({	opacity	:	0	},	600,	function() {
							jQuery(".post[rel!='visible']").hide()
						
						});
				
			
			}

		)

	
	jQuery(".sub_cat_jquery li a")
		.click(
			
			function(e) {
			
				jQuery(".sub_cat_jquery li").css({	"background-color"	:	"#666"	});
			
				jQuery(this).parent().css({	"background-color"	:	"#A6C94E"	});
				
				jQuery(".post").attr("rel", "");
				
				var	wanted_cat	=	jQuery(this).attr("href").split("#")[1];
				
				jQuery("."+wanted_cat).attr("rel", "visible");
				
				
				jQuery("#page .post[rel='visible']").show()
					.stop()
					.animate({	opacity	:	1	},	600)
				
				jQuery(".post[rel!='visible']")
					.stop()
					.animate({	opacity	:	0	},	600,	function() {
							jQuery(".post[rel!='visible']").hide()
						
						});
				
			
			}

		)
		jQuery(".sub_cat li a").hover(function() {
	
				jQuery(this).css({"background-color": "rgba(255, 255, 255,0.7)"});
		
				jQuery(this).stop().delay(31).stop().animate({
					backgroundColor: "rgba(255, 255, 255, 0.4)"
				}, 100);
			
				jQuery(this).stop().delay(132).stop().animate({
					backgroundColor: "rgba(255, 255, 255, 0.2)"
				}, 300)
			}, function() {
	
				jQuery(this).stop().animate({
					backgroundColor: "rgba(1,1,1,0.65)"
				}, 500);
				
				jQuery(this).stop().delay(501).stop().animate({
					backgroundColor: "rgba(1,1,1,0)"
				}, 1000)
	
			}
		);
	
	
	//Thumbnail

	jQuery(".thumbnail .gallery").hover(function() {
	


			thumbnail = jQuery(this).parent().find(".attachment-medium");
			
			jQuery(this).css({"height" : "100%"});
			
				gallery_height = jQuery(this).height();
				
			jQuery(this).css({"height" : "180px"});
	
			if(gallery_height > 200) {			

			jQuery(thumbnail).stop().animate({
				marginTop: "-263px"
			},400);
		
			jQuery(this).stop().animate({
				height: gallery_height+263
			},400)
			
		}
		
		},function() {
	
	
			jQuery(thumbnail).stop().animate({
				marginTop: "0"
			},800);
		
			jQuery(this).stop().animate({
				height: "180px"
			},800)

	});


	
});




	function newrezension() {
	
		jQuery("#wrap")
			.animate({	opacity	:	0	},	800	)
			.load("http://greencore-events.de/?cat=3 #inner", function() {	

						jQuery(this).animate({	opacity	:	1	},	600);
						
					}
										
				);
	
	}

	
	
	
	
	
	jQuery(window).load( function() {

		if (navigator.appCodeName != "Microsoft Internet Explorer") {
	
			jQuery("#shape8")
				.animate({
				
					marginTop	: "187px",
					marginLeft	: "262px",
					rotate		: "16deg"
	
				},	2000	,	function() {

								//Starte Rotation
									rotate_platte();
							
								//Steuerung moeglich machen
									
									if ( $.browser.webkit ) {
										startabledj();
									}

						}
				);

		}
	
	});
	
	
	
	
		
	
	function rotate_platte() {

		jQuery("#shape6")
			.stop()
			.animate({
				rotate	: 	"+=50000deg"
			}, 900000, "linear");
			
		jQuery("#shape4")
			.stop()
			.animate({
				rotate	: 	"+=50000deg"
			}, 900000, "linear");
		
	}
	
	
	
	
		
	
	function startabledj() {
	
		//Button wird angezeigt
			jQuery("#bethedj")
				.css({		"opacity"	:	"0"	})
				.show()
				.animate({	opacity		:	1	},	800);
			
			
			
			
		//Setup Sounds
			mySound		=	new buzz.sound(
							"http://greencore-events.de/wp-content/themes/events/js/sounds/bass_canon",
							{	formats: ["mp3", "ogg"]	}
							);
		
		
		
			

		//Wenn der Button geklickt wird
			jQuery("#bethedj")
				.click(	function() {
				
					//Alles Stoppen
						jQuery("#shape6, #shape4")
							.stop(true, false);
		
					
					//Platte mit Greencore Logo
						jQuery("#shape6")
							.replaceWith('<img id="shape6" class="shape" src="http://greencore-events.de/wp-content/themes/events/images/center/logo/greencore_platte.png" />');
			
			
					//Be the DJ ausblenden
						jQuery("#bethedj, #shape1, #shape2, #shape7, #punkte, #pushthebutton")
							.animate({	opacity	:	0	},	400)
							.hide();
				
				
					//neu anordnen
						jQuery("#shape3")
							.animate({
								height	:	"445px",
								margin	:	"0"
							},	400);
				
						jQuery("#shape4, #shape5")
							.stop()
							.animate({
								height		:	"231px",
								marginTop	:	"166px",
								marginLeft	:	"118px"
							},	400);
					
						jQuery("#shape8")
							.animate({
								rotate		:	"0deg",
								height		:	"218px",
								marginTop	:	"155px",
								marginLeft	:	"330px"
							},	400)
							.css({	"z-index"	:	"10"	});

						jQuery("#shape6")
							.stop()
							.animate({
								height		:	"231px",
								marginTop	:	"166px",
								marginLeft	:	"118px"
							},	400, function() {
								jQuery(this).animate({
										rotate	: 	"+=50000deg"
									}, 900000, "linear");
							});
				
				
				
					//Sound laden und wenn fertig Platte anordnen und freischalten
					
						jQuery(document).load(	"http://greencore-events.de/wp-content/themes/events/js/sounds/drop.mp3",	function() {

							jQuery(document).load(	"http://greencore-events.de/wp-content/themes/events/js/sounds/bass_canon.mp3",
												function() {
					
													startdj();
							
													jQuery("#shape6")
														.stop()
														.animate({
															height		:	"231px",
															marginTop	:	"166px",
															marginLeft	:	"118px",
															rotate		:	"0deg"
														},	400);
					
												}
							);
	
	
						
						});
			
			})
	
	
	}
	
	
	
	
	
	function startdj() {
	
		//Variablen deklarierien
			platte_rotation		=	0;
			rotatestate			=	0;
			clicking			=	false;
			mausposition_start	=	0;
			clicking			=	false;
			
			
		
		jQuery("#shape8")
			.mousedown(function(e) {
			
							e.preventDefault();
							
							
							clicking	=	true;
							
		
							//Automatisches wandern von Arm unterbrechen
								jQuery("#shape8")
									.stop(true, false);
									
							
							//Sound pausieren
								mySound.play().pause();
								
								
							//padding hinzufügen
								margin_Top	=	(parseInt(jQuery(this).css("margin-top")))-100;
								margin_Left	=	(parseInt(jQuery(this).css("margin-left")))-100;
								
								jQuery("#shape8")
									.css({	"padding"		:	"100px",
											"margin-top"	:	margin_Top,
											"margin-left"	:	margin_Left
									
									});
									
				
      						mausposition_start	=	e.pageX;
      			
			}).mousemove(function(e) {
			
			
						if (	clicking	) {
						
			
							e.preventDefault();
							
					
							mausposition_aktuell	=	e.pageX;
							maus					=	rotatestate+(mausposition_start - mausposition_aktuell)*0.4;
							margin_Top				=	Math.round(55-(maus*0.2));
							margin_Left				=	Math.round(230-(maus*0.6));
							rotatedeg				=	"rotate(+" + maus + "deg)";

										
							if (	2<Math.round(maus)	&&	Math.round(maus)<39	){
							
				
								jQuery("#shape8")
									.css({
										"-webkit-transform"	:	rotatedeg,
										"margin-top"		:	margin_Top,
										"margin-left"		:	margin_Left
									});
									
									
							}
							
					
						}
						
			
			}).mouseup(function() {
			
							
							rotatestate	=	Math.round(maus);
							
							
							clicking	=	false;
							
							
							//padding entfernen
								margin_Top	=	(parseInt(jQuery(this).css("margin-top")))+100;
								margin_Left	=	(parseInt(jQuery(this).css("margin-left")))+100;
	
								jQuery("#shape8")
									.css({	"padding"		:	"0",
											"margin-top"	:	margin_Top,
											"margin-left"	:	margin_Left
									
									});
									
									
							//Automatisches ausrichten von Arm
							//abchecken ob der Arm auf der Platte ist oder nicht
								if (	rotatestate	>=	15	&&	rotatestate	<	20	) {
		
		
									rotate_platte();
									
									
									jQuery("#shape8")
										.animate({
											rotate		:	"17deg",
											marginTop	:	"152px",
											marginLeft	:	"320px"
										},	600,	function() {
									
									
														//Arm darf wieder weiter wandern
															rotatestate	=	17;
															wandernderarm();
															
												
														//Sound
															mySound.setTime(1).play();
															
									
										});
								
								} else if ( rotatestate	<	15 	) {
								
									
									jQuery("#shape8")
										.animate({
											rotate		:	"0deg",
											marginTop	:	"155px",
											marginLeft	:	"330px"
										},	600);
										
									
									rotatestate = 0
									
							
								} else if (	rotatestate	>=	20	&&	rotatestate	<	40	) {
								
								
									rotate_platte();
									
							
									var duration	=	mySound.getDuration()/22*(rotatestate-17);
									
								
									mySound.setTime(duration).play();

									
									//Arm darf wieder weiter wandern
										rotatestate	=	rotatestate;
										wandernderarm();
							
							
								} else if ( rotatestate	>=	40	) {
								
									rotatestate	=	39;
									
									rotate_platte();
									
							
									var duration	=	mySound.getDuration()/22*(rotatestate-17);
									
								
									mySound.setTime(duration).play();

									
									//Arm darf wieder weiter wandern
										wandernderarm();
								
								}
								
			
			});
			
			
			
			
			
		//Scratchen und Pausieren
			jQuery("#shape6")
				.mousedown(function(e) {
							
							clicking	=	true;
							
							i =	1;
			
							e.preventDefault();
							
							//Rotation unterbrechen
								jQuery("#shape6, #shape8")
									.stop(true, false);
							
							
							//aktuelles styling von Platte
								platte_rotation	=	parseInt(jQuery(this).rotate());
							
							//padding hinzufügen
								jQuery("#shape6")
									.css({	"padding"		:	"500px",
											"margin-top"	:	"-334px",
											"margin-left"	:	"-382px"
									
									});
				
      						mausposition_start		=	e.pageY;
      						mausposition_aktuell2	=	mausposition_start;
      			
			}).mousemove(function(e) {
			
						if (	clicking	) {
			
							e.preventDefault();
							
							activemouse	=	window.setInterval(changeit(e), 500);
				
							function changeit (e) {
											
												if	( i % 2 === 0 ) {
													mausposition_aktuell2	=	e.pageY;
													speedfactor				=	(mausposition_aktuell3-mausposition_aktuell2)/4;
												} else {
													mausposition_aktuell3	=	e.pageY;
													speedfactor				=	(mausposition_aktuell2-mausposition_aktuell3)/4;
												}
												
											
												mausposition_aktuell	=	e.pageY;
												maus					=	platte_rotation-(mausposition_aktuell - mausposition_start);
												rotatedeg				=	"rotate(" + Math.round(maus) + "deg)";
											
				
												jQuery("#shape6")
													.css({
														"-webkit-transform"	:	rotatedeg
													});
												
												mySound.setSpeed(speedfactor);
												
												//jQuery("#page").append(speedfactor +" | ");
											
											
												i++;

								}
							
							
						}
							
			
			}).mouseup(function(e) {
							
							window.clearInterval(activemouse);
							
							clicking	=	false;
							
							//padding entfernen
								jQuery("#shape6")
									.css({	"padding"		:	"0",
											"margin-top"	:	"166px",
											"margin-left"	:	"118px"
									
									});
								
							mausposition_aktuell	=	e.pageY;
							
							mySound.setSpeed(1);
								
							if (	mausposition_start	==	mausposition_aktuell	) {
								jQuery("#shape6, #shape4")
									.stop(true, false);
									
								//Pause Sound
								mySound.pause()
								
								wandernd	=	false;
								
							} else {
								rotate_platte();
								
								if (	wandernd	) {
									rotatestate = rotatestate;
									wandernderarm();
									mySound.play()
								}
								
								
															
							}
			
			});
	}


	function wandernderarm() {
	
				wandernd				=	true;
			var duration				=	mySound.getDuration()/22*1000/2;
				margin_Top				=	Math.round(155-(rotatestate*0.15));
				margin_Left				=	Math.round(330-(rotatestate*0.6));
			
				jQuery("#shape8")
					.animate({

						rotate		: 	rotatestate + "deg",
						marginTop	:	margin_Top,
						marginLeft	:	margin_Left
			
					},	duration,	function() {
					
							if ( rotatestate < 40 ) {

								rotatestate	=	rotatestate+1;
									
								window.setTimeout(function() {
	    							wandernderarm();
								}, duration); 
								
							} else {
							
								jQuery("#shape8")
									.animate({
										rotate		:	"0deg",
										marginTop	:	"155px",
										marginLeft	:	"330px"
									},	2000);
							
								rotatestate = 0;
								
								mySound.pause();
							
							}
							
						}
					);


	}
