<style type="text/css">
.foreword{margin:20px 0 40px 0; text-align:center;font-size:16px; font-family:"Tw Cen MT", "Arial Unicode MS", "TM Pedestal"}
.text{ text-align:center;margin:20px 10px 20px 10px;font-size:16px; font-family:"Tw Cen MT", "Arial Unicode MS", "TM Pedestal"}
.text a{ text-decoration:none;}
.login{height:170px;color:#000;}
.login table{border:1px solid #a4a4a4;background-color:#cccccc;padding:10px;font:15px "Tw Cen MT", "Arial Unicode MS", "TM Pedestal";}

.restids {
    text-align: center;
    padding-top:15%;
    background: none repeat scroll 0px 0px transparent;
    height: 100% !important;
    left: 0px;
    min-height: 100% !important;
    position: fixed !important;
    top: 0px;
    width: 100% !important;
    z-index: 3;color:#000;margin-left:7.5%;}
</style>

<div class="foreword">We are sorry to see you go but we understand. Enter your email to unsubscribe.</div>


<div class="login">

<form name="" action="" method="post" id="christmasform" _lpchecked="1">
    <input type="hidden" name="project" value="unsubscribe">

    <table width="250" cellpadding="0" cellspacing="3" style="margin:0 auto;">
       <tbody>
         <tr>
           <td><table width="310" cellpadding="0" cellspacing="3" style="margin:0 auto;">
             <tbody>
               <tr>
                 <td width="91" height="40"><strong>E-Mail:</strong></td>
                 <td width="168"><input id="customer_emails" type="text" name="email" value="" style="background:#fff;"></td>
                </tr>
               <tr>
                    <td colspan="2" style="text-align:left;">&nbsp;</td>
               </tr>
               <tr>
                 <td colspan="2" height="40" style="text-align:right;padding:5px 20px 0 0 ;"><input type="submit" id="from_submit_button" value="submit" name="submit"></td>
               </tr>
             </tbody>
            </table></td>
         </tr>
      </tbody>
    </table>
</form>
</div>

<div class="text">
<p>If you get any more questions, please write uns via email <a href="mailto:[email protected]">[email protected]</a>.</p>
</div>

      
      
<div class="restids" style="display:none;">
    <div style="width: 370px;background: #ffffff;margin-top: 10%;margin-left: auto;margin-right: auto;border:3px solid #1b59a7;padding: 15px;">
      <p style="text-align:left;">You have been unsubscribed.<br />
        You&rsquo;ve unsubscribed Gamesdeal newsletter successfully!</p>
<p>&nbsp;</p>
        <button onclick="javascript:jQuery('.restids').hide();" style="border: 1px solid #666;padding:5px 10px;">Close</button>
    </div>
</div>


<script type="text/javascript">
//<![CDATA[
    jQuery( document ).ready(function( $ ) {
        $("#christmasform").submit(function() {
 var email = $('#customer_emails').val();
        if(!email.match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)){
            alert("Wrong Email!!!");
            return false;
        }

        $('#from_submit_button').attr('disabled', 'disabled');
            var url = "christmas/index/unsubscribe/";
            $.ajax({
                type: "POST",
                url: url,
                data: $("#christmasform").serialize(),
                dataType: "json",
                success: function (data) {
                    if(data.result == 0)
                    {
                           alert(data.message);
                           $('#from_submit_button').attr('disabled', false);
                    }
                    else
                    {
                        jQuery('.restids').show();         
                    }           
                },
                error: function (error) {

                }
            });

            return false;
        });
    });
// ]]>    
</script>