$().ready(function()
            {
              $("#suggest_event_estado").change(function()
              {
              $('#suggest_event_municipio').html('<option value="sda">Procurando :::::::</option>');
              $.post('/buscamunicipios',
              { estado : $(this).val() },
              function(resposta){
              $('#suggest_event_municipio').html(resposta);
              }
              );
              }
            );
              $("#widget_estado").change(function()
              {
                $('#widget_text').val('<script type="text/javascript" src="http://open-events.appspot.com/widget/' +$(this).val() + '&quot;&gt;&lt;/script&gt;&lt;style type=&quot;text/css&quot;&gt;\n.open_events_state{}\n.openevents_list{list-style:none;}\n\na.open_events_link {\ncolor:#4D87C7;\ntext-decoration:none;\nfont-size:11px;\n}\na.open_events_link:focus, a.open_events_link:hover, a.open_events_link:active {\ncolor:#182E7A;\ntext-decoration:underline;\n}\n\na.open_events_backlink{\ncolor:#294E7C;\ntext-decoration:none;\nfont-size:11px;\n}\na.open_events_backlink:focus, a.open_events_backlink:hover, a.open_events_backlink:active {\ncolor:#7EB4F9;\ntext-decoration:underline;\n}\n\n&lt;/style&gt;')
              }
              );
            });

function addInfo() {
var id = document.getElementById("id").value;
$("#dynamic").append("<div id='row" + id + "'><label for='txt" + id + "'>Informações adicionais</label><textarea rows='15' cols='70' name='txt[]' id='txt" + id + "'></textarea><a href='#' onClick='removeFormField(\"#row" + id + "\"); return false;'>Remove</a><br class=\"limpa\"></div>");

$('#row' + id).highlightFade({
speed:1000
});

id = (id - 1) + 2;
document.getElementById("id").value = id;
}


function removeFormField(id) {
$(id).remove();
}

$(function(){$('a[href][rel*=external]').each(function(i){this.target = "_blank";});})
