	$(function(){    	
			$('#second_layout').corner({
			  tl: { radius: 10 },
			  tr: { radius: 10 },
			  bl: { radius: 10 },
			  br: { radius: 10 },
			  antiAlias: true,
			  autoPad: true,
			  validTags: ["div"] });			
              
            if($("#vote-button").length) {
                $("#vote-button").click(
                    function(){
                        var votes = [];
                        $('.vote-line:checked').each(
                            function(){
                                votes.push($(this).val());
                            }
                        )
                        
                        if(votes.length){
                            $(this).attr("disabled", "disabled");
                            lang = window.location.pathname.match(/^\/en/) ? '/en' : '';
                            $.post(lang + '/vote/add/'+$('#vote-id').val()+'/', {votes: votes.join(",")}, 
                                function(data){
                                    $("#vote-form").remove();
                                    $("<div></div>").attr("id","vote-form").html(data).appendTo("#vote-container");
                                }
                            )
                        }
                    }
                )
            }
	}
);
