$(function(){
    $("a.daily_draw").click(function(){

        //$(this).parents(".daily_draw_pre").hide();
        if ( $("div#codeplace").hasClass("loggedin") ) {
            $("div.code_confirm").show();
            $("span.show").hide();
            $("span.hide").show();
            $("div.code").addClass('code_clicked');
            $("div#codeplace").show();
            new_win = window.open($("a",$("span.hide")).attr("href"),'_blank','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
            if (new_win) {new_win.blur();}
        }
        $.post("/index.php?section=ajax&action=dpbutton", {}, function(data){
            $("a.daily_draw").parents(".daily_draw_pre").html(data);
        });
        //$(".daily_prize_post").show();

        //$(".code_confirm",$(this).parents(".type-voucher-code")).show();
        //$(".code",$(this).parents(".type-voucher-code")).addClass('code_clicked');

        //$(".show",$(this).parents(".type-voucher-code")).hide();
        //$(".hide",$(this).parents(".type-voucher-code")).show();

        //new_win = window.open($(this).attr("href"),'_blank','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
        //if (new_win) {new_win.blur();}
        //return false;

    });

 });
 /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



