/*
_,     .  __   ,__,   _   ,    ,_   _  __,   //  ,____,      ,____,   _,_-/- .  _,_ ,__,      ,_    .  __  -/-      ,_   _   ,  
 (_/__/__(_/__/ / (__(/__/_)__/ (__(/_(_/(__(/__/ / / (_   _/ / / (__(_/_/__/__(_/_/ / (_    _/_)__/__(_,__/__(_/__/ (__(/__/_)_
         _/_                                                                                 /                                  
        (/  
*/
// Form Mail
	$(document).ready(function() {
		function send(){
	
		$(".box_error").hide();
		$(".box_success").hide();
	
		var name 		= $("#txtname").val();
		var email 		= $("#txtemail").val();
		var subject 	= $("#txtsubject").val();
		var message 	= $("#txtmessage").val();
		
		$.get("mail.php", { name: name, email: email, subject: subject, message: message },
		  function(response){
			if(response.state == 500){
				$(".box_error .description ul").html(response.data);
				$(".box_error").jnotice({openNow: true, 
									closeClickElement: ".close_error",
									position: "top", 
									animation:"slide",
									autoClose: 5000,
									animationSpeed: 400});
							
			}else{
				$(".box_success").jnotice({openNow: true, 
									closeClickElement: ".close_success",
									position: "top", 
									animation:"slide",
									autoClose: 5000,
									animationSpeed: 400});
				$('#messageform')[0].reset();
			}
		  }, "json");

		}
		$('#btnsend').click(function(){
			send();
		});
		$('.box_error').css('opacity', 0.8); 
		$('.box_success').css('opacity', 0.8); 
	});
	
// CMS Login	
	$().ready(function() {

		$(".login_notice").jnotice({openClickElement: ".action1",
									closeClickElement: ".action2, .button_red", 
									position: "top", 
									animation:"slide", 
									animationSpeed: 400});
		
		$('.login_notice').css('opacity', 0.8);
		
	});
