// Element Fx //

$(document).ready(function(){




/*////////////// DJ Pool Cover ausrichten //////////////////*/


Rr = $('#Promos_Container').children().length;

if(Rr>4 && Rr!=4 && Rr!=8&&Rr!=12&&Rr!=16 && Rr!=20 && Rr!=24 && Rr!=28 && Rr!=32 && Rr!=36 && Rr!=40 && Rr!=44 && Rr!=48 && Rr!=52 && Rr!=56 && Rr!=60){
Rr = Rr/4;Rr++;
}else{Rr = Rr/4;}


$('#Promos_Container').css("height",((175*Math.round(Rr))+12));



/*/////////  Login   //////////////*/


	$('#DP_Login_Form').submit(function() {
										
						var vailduser=false;
						
						$('#Login_btn_DP').val("loading...");
																				
						$.post("cms/Objects/DJPool/Check_Login.php",{			
							   
							  LoginName:$('#login_name').val(),
							  LoginPW:$('#login_pass').val()
							   
							   },function(data){
								   
								  // alert(data);
								  
								 if(data.search("succeeded") != -1){
									// alert("go on");
									
									vailduser = true;
									 $('#answere_Info').html("");
									 
									 $('#Login_btn_DP').val("Login");

									 document.Uptunes_DJPool_Login.submit();
									
									 }
									 
								 if(data.search("wrong_passw") != -1){
									 $('#answere_Info').html("<p style='color:#F00; font-weight:900'>Wrong Password.</p>");
									$('#Login_btn_DP').val("Login");

												}
									 
								if(data.search("user_not_found") != -1){
									 $('#answere_Info').html("<p style='color:#F00; font-weight:900'>User not found.</p>");
									 $('#Login_btn_DP').val("Login");
 
											   }
									 
									 
								//$('#answere_Info').html(data);
					
								//window.open("settings.php","_self");

							//$('#answere_box').html(data);
						});
						
		if(vailduser == true){ 
			return true;
			}
			else
			{return false;
			}

	});
	
	
/*///// Logout ////*/


$('#Logout_btn_DP').click(function(){
				
  				$('#DJPool_Menu').fadeOut('fast', function() {
				 window.open("index.php?get=me_out",target='_self');
  					});
				});





////////////////////////
/*///// Lost PW ////*/
////////////////////////



$('#Send_Lost_PW').click(function() {
										
						var vailduser=false;
						
						$('#Send_Lost_PW').val("sende...");
																				
						$.post("cms/Objects/DJPool/Send_New_PW.php",{			
							   
							  LostPW_Email:$('#LostPW_Email').val()
							   
							   },function(data){
								   
								  // alert(data);
								  
								 if(data.search("succeeded") != -1){
									// alert("go on");
									
									vailduser = true;
									
									 $('#answere_LostPW').html("<p style='color:green; font-weight:900'>Deine Anfrage wurde entgegen genommen. Du erhälst in kürze eine Email mit deinem neuen Passwort.</p>");
									 $('#DJPool_Login_PWLost').css('height','220px');

									 
									 $('#Send_Lost_PW').val("Senden");
									 
									// alert(data);
									
									 }
									 
								 if(data.search("user_not_found") != -1){
									 $('#answere_LostPW').html("<p style='color:#F00; font-weight:900'>Diese Adresse ist uns nicht bekannt, bitte wende dich an <br/><a href='&#x6d;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;%70%6F%6F%6C%40%75%70%74%75%6E%65%73%2E%64%65 'title='&#x45;&#x2d;&#x4d;&#x61;&#x69;&#x6c;'>&#x70;&#x6f;&#x6f;&#x6c;&#x40;&#x75;&#x70;&#x74;&#x75;&#x6e;&#x65;&#x73;&#x2e;&#x64;&#x65;</a>.</p>");
									 
									$('#Send_Lost_PW').val("Senden");

												}
									 
									 
								//$('#answere_Info').html(data);
					
								//window.open("settings.php","_self");

							//$('#answere_box').html(data);
						});
						
		if(vailduser == true){ 
			return true;
			}
			else
			{return false;
			}

	});
	

	

/*//////////////////////////////////*/
/*/////////  Profil   //////////////*/
/*//////////////////////////////////*/



////// set Profil - Personal /////////

	var Profil_personal_open = false;

	$('#set_Profil_personal').click(function(){ open_Profile_Personal(400);})
	
	function open_Profile_Personal(speed) {
  		$('#Profil_personal_form').slideToggle(speed, function() {
   	 	// Animation complete.
		
		if(Profil_personal_open){
		$('#set_Profil_personal #new_news_entry_btn').attr('src','css/WebElements/dropup_ic_20x20.png');
		Profil_personal_open = false;
		}else{
		$('#set_Profil_personal #new_news_entry_btn').attr('src','css/WebElements/dropdown_ic_20x20.png');
		Profil_personal_open = true;
}
  	});
	}
	//open_Profile_Personal(0);
		
	$('#save_Profil_personal').click(function(){
					
					
			$('#save_Profil_personal').html("saving...");
			$('#save_Profil_personal').animate({opacity: 0.3}, {easing:'easeOutBack',duration:500});	

			
			
			$.post("cms/Objects/DJPool/update_user_Profil.php",{
				   User_id: $('#hidden_User_id').val(),
				   firstname:$('#firstname').val(),
				   street:$('#street').val(),				   
				   lastname:$('#lastname').val(),
				   zip_code:$('#zip_code').val(),
				   artistname:$('#artistname').val(),
				   city:$('#city').val(),
				   birthday:$('#birthday').val(),
				   country:$('#country').val(),
				   email:$('#email').val(),
				   website:$('#website').val()
				   },function(data){
								
		//	$('#Profil_personal_form #answere_box').html("<img height=20 src='cms/css/Web_Elements/succsessfull_saved.png' style='float:left;' />");
			//alert(""+data);
			
			$('#save_Profil_personal').html("Einstellungen speichen");
			$('#save_Profil_personal').animate({opacity: 1}, {easing:'easeOutBack',duration:500});	

			});
		
		});
		
		


////// set Profil - Password /////////

	var Profil_Password_open = false;

	$('#set_Profil_Password').click(function(){ open_Profile_Password(400);})
	
	function open_Profile_Password(speed) {
		
  		$('#Profil_Password_form').slideToggle(speed, function() {
   	 	// Animation complete.
		
		if(Profil_Password_open){
		$('#set_Profil_Password #new_news_entry_btn').attr('src','css/WebElements/dropup_ic_20x20.png');
		Profil_Password_open = false;
		}else{
		$('#set_Profil_Password #new_news_entry_btn').attr('src','css/WebElements/dropdown_ic_20x20.png');
		Profil_Password_open = true;
}
  	});
	}
		open_Profile_Password(0);
		


		
	$('#save_Profil_Password').click(function(){
		
	var newPassword = $('#new_password1').val();
		
	  if(newPassword.length > 5){
		
		if($('#new_password1').val() == $('#new_password2').val()){
										   
			$('#save_Profil_Password').html("saving...");	
			$('#save_Profil_Password').animate({opacity: 0.3}, {easing:'easeOutBack',duration:500});
																	
			$('#Profil_Password_form #answere_box').html("saving...");
			
			$.post("cms/Objects/DJPool/update_user_Profil.php",{
				
					User_id: $('#hidden_User_id').val(),

				   userName:$('#email').val(),
			   	   old_password:$('#old_password').val(),
				   new_password1:$('#new_password1').val()
				   				   
				   },function(data){
					   
					  
					if(data.search("Passwort_wrong") != -1){
 
						alert("Aktuelles Passwort konnte nicht gefunden werden.");
						
					}
					
					if(data.search("User_wrong") != -1){
 
						alert("Aktuelles Passwort konnte nicht gefunden werden.");
						
					}
					   																												
			$('#save_Profil_Password').animate({opacity: 1}, {easing:'easeOutBack',duration:500});	
			
			$('#save_Profil_Password').html("Einstellungen speichen");	
			
			});
			
		}else{
		alert('Passwörter stimmen nicht über ein.');	
		}
		
	  }else{
	alert('Passwort muss aus mindestens 5 Zeichen bestehen.');	
	 }
		
	});
		
	


////// set Profil - Clubs /////////

	var Profil_clubs_open = false;

	$('#set_Profil_Clubs').click(function(){ open_Profile_Clubs(400);})
	
	function open_Profile_Clubs(speed) {
		
  		$('#Profil_Clubs_form').slideToggle(speed, function() {
   	 	// Animation complete.
		
		if(Profil_clubs_open){
		$('#set_Profil_Clubs #new_news_entry_btn').attr('src','css/WebElements/dropup_ic_20x20.png');
		Profil_clubs_open = false;
		}else{
		$('#set_Profil_Clubs #new_news_entry_btn').attr('src','css/WebElements/dropdown_ic_20x20.png');
		Profil_clubs_open = true;
}
  	});
	}
		open_Profile_Clubs(0);
		
	$('#save_Profil_Clubs').click(function(){
										   
			$('#save_Profil_Clubs').html("saving...");	
			$('#save_Profil_Clubs').animate({opacity: 0.3}, {easing:'easeOutBack',duration:500});
																	
			$('#Profil_Clubs_form #answere_box').html("saving...");
			
			$.post("cms/Objects/DJPool/update_user_Profil.php",{
				   
				   clubname1:$('#clubname1').val(),
				   frequ1:$('#frequ1').val(),
				   clubdestination1:$('#clubdestination1').val(),
				   
				   clubname2:$('#clubname2').val(),
				   frequ2:$('#frequ2').val(),
				   clubdestination2:$('#clubdestination2').val(),
				   
				   clubname3:$('#clubname3').val(),
				   frequ3:$('#frequ3').val(),
				   clubdestination3:$('#clubdestination3').val()
				   
				   },function(data){
					   																												
			$('#save_Profil_Clubs').animate({opacity: 1}, {easing:'easeOutBack',duration:500});	
			
			$('#save_Profil_Clubs').html("Einstellungen speichen");	
			
			});
		
		});
		
		
		
////// set Profil - Booking /////////

	var Profil_Booking_open = false;

	$('#set_Profil_Booking').click(function(){ open_Profile_Booking(400);})
	
	function open_Profile_Booking(speed) {
		
  		$('#Profil_Booking_form').slideToggle(speed, function() {
   	 	// Animation complete.
		
		if(Profil_Booking_open){
		$('#set_Profil_Booking #new_news_entry_btn').attr('src','css/WebElements/dropup_ic_20x20.png');
		Profil_Booking_open = false;
		}else{
		$('#set_Profil_Booking #new_news_entry_btn').attr('src','css/WebElements/dropdown_ic_20x20.png');
		Profil_Booking_open = true;
}
  	});
	}
		open_Profile_Booking(0);
		
	$('#save_Profil_Booking').click(function(){
																	
			$('#save_Profil_Booking').html("saving...");	
			$('#save_Profil_Booking').animate({opacity: 0.3}, {easing:'easeOutBack',duration:500});
			
			$.post("cms/Objects/DJPool/update_user_Profil.php",{
				   	User_id: $('#hidden_User_id').val(),
				   agentur:$('#agentur').val(),
				   booking_rate:$('#booking_rate').val()
				   
				   },function(data){
																															
			$('#save_Profil_Booking').animate({opacity: 1}, {easing:'easeOutBack',duration:500});	
			
			$('#save_Profil_Booking').html("Einstellungen speichen");	

	
			});
		
		});
		
		
		
		
////// set Profil - Charts /////////

	var Profil_Charts_open = false;

	$('#set_Profil_Charts').click(function(){ open_Profile_Charts(400);})
	
	function open_Profile_Charts(speed) {
		
  		$('#Profil_Charts_form').slideToggle(speed, function() {
   	 	// Animation complete.
		
		if(Profil_Charts_open){
		$('#set_Profil_Charts #new_news_entry_btn').attr('src','css/WebElements/dropup_ic_20x20.png');
		Profil_Charts_open = false;
		}else{
		$('#set_Profil_Charts #new_news_entry_btn').attr('src','css/WebElements/dropdown_ic_20x20.png');
		Profil_Charts_open = true;
}
  	});
	}
		open_Profile_Charts(0);
		
	$('#save_Profil_Charts').click(function(){
											
			if($('#odc:checked').val() == "on"){
			var odc = 1;}else{var odc = 0;}
			
			if($('#ddp:checked').val() == "on"){
			var ddp = 1;}else{var ddp = 0;}
			
			if($('#ddc:checked').val() == "on"){
			var ddc = 1;}else{var ddc = 0;}
			
			if($('#ddjc:checked').val() == "on"){
			var ddjc = 1;}else{var ddjc = 0;}
			
			$('#save_Profil_Charts').html("saving...");	
			$('#save_Profil_Charts').animate({opacity: 0.3}, {easing:'easeOutBack',duration:500});	
			
			
			$.post("cms/Objects/DJPool/update_user_Profil.php",{
			   	User_id: $('#hidden_User_id').val(),
				   odc:odc,
				    ddp:ddp,
					 ddc:ddc,
					  ddjc:ddjc
				   },function(data){
			
			$('#save_Profil_Charts').animate({opacity: 1}, {easing:'easeOutBack',duration:500});	
			
			$('#save_Profil_Charts').html("Einstellungen speichen");	

		
			});
		
		});
	
	
	
	
////// set Profil - Pools /////////

	var Profil_Pools_open = false;

	$('#set_Profil_Pools').click(function(){ open_Profile_Pools(400);})
	
	function open_Profile_Pools(speed) {
		
  		$('#Profil_Pools_form').slideToggle(speed, function() {
   	 	// Animation complete.
		
		if(Profil_Pools_open){
		$('#set_Profil_Pools #new_news_entry_btn').attr('src','css/WebElements/dropup_ic_20x20.png');
		Profil_Pools_open = false;
		}else{
		$('#set_Profil_Pools #new_news_entry_btn').attr('src','css/WebElements/dropdown_ic_20x20.png');
		Profil_Pools_open = true;
}
  	});
	}
		open_Profile_Pools(0);
		
	$('#save_Profil_Pools').click(function(){
	
			$('#save_Profil_Pools').html("saving...");	
			$('#save_Profil_Pools').animate({opacity: 0.3}, {easing:'easeOutBack',duration:500});				
			
			if($('#dj_prop:checked').val() == "on"){
			var dj_prop = 1;}else{var dj_prop = 0;}
			
			if($('#andrew_spencer:checked').val() == "on"){
			var andrew_spencer = 1;}else{var andrew_spencer = 0;}
			
			if($('#pool_position:checked').val() == "on"){
			var pool_position = 1;}else{var pool_position = 0;}
			
			if($('#m_promotion:checked').val() == "on"){
			var m_promotion = 1;}else{var m_promotion = 0;}
			
			if($('#plattenmann:checked').val() == "on"){
			var plattenmann = 1;}else{var plattenmann = 0;}
			
			
			$.post("cms/Objects/DJPool/update_user_Profil.php",{
				   	User_id: $('#hidden_User_id').val(),
				   dj_prop:dj_prop,
				   andrew_spencer:andrew_spencer,
				   pool_position:pool_position,
				   m_promotion:m_promotion,
				   plattenmann:plattenmann				   
				   
				   },function(data){
					   
					   
			$('#save_Profil_Pools').animate({opacity: 1}, {easing:'easeOutBack',duration:500});	
			$('#save_Profil_Pools').html("Einstellungen speichen");																							


			});
		
		});
	
	
////// set Profil - Styles /////////

	var Profil_Styles_open = false;

	$('#set_Profil_Styles').click(function(){ open_Profile_Styles(400);})
	
	function open_Profile_Styles(speed) {
		
  		$('#Profil_Styles_form').slideToggle(speed, function() {
   	 	// Animation complete.
		
		if(Profil_Styles_open){
		$('#set_Profil_Styles #new_news_entry_btn').attr('src','css/WebElements/dropup_ic_20x20.png');
		Profil_Styles_open = false;
		}else{
		$('#set_Profil_Styles #new_news_entry_btn').attr('src','css/WebElements/dropdown_ic_20x20.png');
		Profil_Styles_open = true;
}
  	});
	}
		open_Profile_Styles(0);
		
	$('#save_Profil_Styles').click(function(){
																	
		$('#save_Profil_Styles').html("saving...");	
		$('#save_Profil_Styles').animate({opacity: 0.3}, {easing:'easeOutBack',duration:500});		
		
			if($('#chart_house:checked').val() == "on"){
			var chart_house = 1;}else{var chart_house = 0;}
			
			if($('#hands_up:checked').val() == "on"){
			var hands_up = 1;}else{var hands_up = 0;}
			
			if($('#club_house:checked').val() == "on"){
			var club_house = 1;}else{var club_house = 0;}
			
			if($('#black:checked').val() == "on"){
			var black = 1;}else{var black = 0;}
			
			
			$.post("cms/Objects/DJPool/update_user_Profil.php",{
				   	User_id: $('#hidden_User_id').val(),
				   chart_house:chart_house,
				   hands_up:hands_up,
				   club_house:club_house,
				   black:black
				   
				   },function(data){
																												
			$('#save_Profil_Styles').animate({opacity: 1}, {easing:'easeOutBack',duration:500});	
			$('#save_Profil_Styles').html("Einstellungen speichen");	
	
			});
		
		});
	
	



//////////////////////////////////////////////////////////////////////////////
////////////////// Feedback  StarFading  Personal    /////////
//////////////////////////////////////////////////////////////////////////////////////////



for(var i=1;i<6;i++){
		var ElementID = "#Feedback_personal .outline .star_area .star"+i;
		$(ElementID).css("opacity","0");
				}
								
								
for(var i=1;i<6;i++){
		var ElementID = "#Feedback_public .outline .star_area .star"+i;
		$(ElementID).css("opacity","0");
		}
										
										


var Personal_Stars_selectet = 0;
var MouseOverPersonal = false;

	function show_Mouse_Effect(stars){
		
	//	alert(stars);
		
								if(stars==1){
								
								for(var i=2;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
				
										}
									
								$('#Feedback_personal .outline .star_area .star1').css("opacity","1");
																
								}
								
								if(stars==2){
								
								for(var i=3;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<3;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
								
								}
								
								
								if(stars==3){
								
								for(var i=4;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<4;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
								
								}
								
								
								if(stars==4){
								
								for(var i=5;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<5;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
								
								}
								
								if(stars==5){
									
								for(var i=1;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
								
								}
		
		};
		
		
	$('#Feedback_personal .star1').mouseover(function(){show_Mouse_Effect(1);});
	$('#Feedback_personal .star2').mouseover(function(){show_Mouse_Effect(2);});
	$('#Feedback_personal .star3').mouseover(function(){show_Mouse_Effect(3);});
	$('#Feedback_personal .star4').mouseover(function(){show_Mouse_Effect(4);});
	$('#Feedback_personal .star5').mouseover(function(){show_Mouse_Effect(5);});
	
	
	$('#Feedback_personal .outline').mouseout(function(){
					
													   
					if(Personal_Stars_selectet == 0){
													 
								 for(var i=1;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
									}
								//$('#Feedback_personal .outline .star_area .star1').css("opacity","1");
					}
					
					
					if(Personal_Stars_selectet == 1){
													 
								 for(var i=2;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
									}
								$('#Feedback_personal .outline .star_area .star1').css("opacity","1");
					}
					
					if(Personal_Stars_selectet == 2){
													 
								 for(var i=3;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<3;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
					}
					
					
					if(Personal_Stars_selectet == 3){
													 
								 for(var i=4;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<4;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
					}
					
					
					if(Personal_Stars_selectet == 4){
													 
								 for(var i=5;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<5;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
					}
					
					
					if(Personal_Stars_selectet == 5){
													 
								 for(var i=6;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<6;i++){
										var ElementID = "#Feedback_personal .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
					}
					
								
			});
	
	$('#Feedback_personal .star1').click(function(){Personal_Stars_selectet = 1;});
	$('#Feedback_personal .star2').click(function(){Personal_Stars_selectet = 2;});
	$('#Feedback_personal .star3').click(function(){Personal_Stars_selectet = 3;});
	$('#Feedback_personal .star4').click(function(){Personal_Stars_selectet = 4;});
	$('#Feedback_personal .star5').click(function(){Personal_Stars_selectet = 5;});
	
	


////// Fading Public Stars  ////////////



var Public_Stars_selectet = 0;

	function show_Mouse_Effect_Public(stars){
		
	//	alert(stars);
		
								if(stars==1){
								
								for(var i=2;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
				
										}
									
								$('#Feedback_public .outline .star_area .star1').css("opacity","1");
								
								}
								
								if(stars==2){
								
								for(var i=3;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<3;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
								
								}
								
								
								if(stars==3){
								
								for(var i=4;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<4;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
								
								}
								
								
								if(stars==4){
								
								for(var i=5;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<5;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
								
								}
								
								if(stars==5){
									
								for(var i=1;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
								
								}
		
		};
		
		
	$('#Feedback_public .star1').mouseover(function(){show_Mouse_Effect_Public(1);});
	$('#Feedback_public .star2').mouseover(function(){show_Mouse_Effect_Public(2);});
	$('#Feedback_public .star3').mouseover(function(){show_Mouse_Effect_Public(3);});
	$('#Feedback_public .star4').mouseover(function(){show_Mouse_Effect_Public(4);});
	$('#Feedback_public .star5').mouseover(function(){show_Mouse_Effect_Public(5);});
	
	
	$('#Feedback_public .outline').mouseout(function(){
					
													   
					if(Public_Stars_selectet == 0){
													 
								 for(var i=1;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
									}
								//$('#Feedback_public .outline .star_area .star1').css("opacity","1");
					}
					
					
					if(Public_Stars_selectet == 1){
													 
								 for(var i=2;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
									}
								$('#Feedback_public .outline .star_area .star1').css("opacity","1");
					}
					
					if(Public_Stars_selectet == 2){
													 
								 for(var i=3;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<3;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
					}
					
					
					if(Public_Stars_selectet == 3){
													 
								 for(var i=4;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<4;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
					}
					
					
					if(Public_Stars_selectet == 4){
													 
								 for(var i=5;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<5;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
					}
					
					
					if(Public_Stars_selectet == 5){
													 
								 for(var i=6;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","0");
										}
									
								for(var i=1;i<6;i++){
										var ElementID = "#Feedback_public .outline .star_area .star"+i;
										$(ElementID).css("opacity","1");
										}
					}
					
								
			});
	
	$('#Feedback_public .star1').click(function(){Public_Stars_selectet = 1;});
	$('#Feedback_public .star2').click(function(){Public_Stars_selectet = 2;});
	$('#Feedback_public .star3').click(function(){Public_Stars_selectet = 3;});
	$('#Feedback_public .star4').click(function(){Public_Stars_selectet = 4;});
	$('#Feedback_public .star5').click(function(){Public_Stars_selectet = 5;});
	
	
//////////// Senden des Feedbacks  //////////


$('#sendFeedback').click(function(){
								  
							//	  alert($('#comment').val());
							
				if(Personal_Stars_selectet!=0 && Public_Stars_selectet!=0){
							
					$('#sendFeedback').html("sende");
					$('#sendFeedback').animate({opacity: 0.5}, {easing:'easeOutBack',duration:500});	

								  
					var Bestmix = $('#bestmix:checked').val();
					var comment = $('#comment').val();
					var PromoID = $('#PromoID').val();
					var Username = $('#Username').val();
					var UserID = $('#UserID').val();
								  
						 $.post("cms/Objects/DJPool/sendFeedback.php",{
						  
						   Personal_Stars_selectet:Personal_Stars_selectet,
						   Public_Stars_selectet:Public_Stars_selectet,
						   comment:comment,
						   Bestmix:Bestmix,
						   PromoID:PromoID,
						   Username:Username,
						   UserID:UserID
				   
						   },function(data){
						
					//	if(data.search("erfolgrech") != -1){
							
							$('#Promo_Feedback').html("<h3> Feedback</h3><br /><p id='feedback_thx'>Vielen Dank!</p> ");
							
							/*}else{
							
							$('#sendFeedback').html("Feedback senden ");
							$('#sendFeedback').animate({opacity: 1}, {easing:'easeOutBack',duration:500});
							
							alert(data);

							
							}
							*/
	
						});	 
					}else{alert("Du musst uns schon die Publikumsresonanz und deine Meinung mitteilen.");}
			  });
	
	

//// end dom ready

});


