$(function() {
    $("#content-pane").jScrollPane();

    $("#debug1").hide();
    $("#debug2").hide();
    $("#debug3").hide();

    $("select").change(
    function() {
      $("#debug1").show();
      $("#debug1").html("<h3 id='dl'><a target='_blank' href='http://static.thundervote.com/posters/8.5x11/" + this.value + ".pdf'>Download Your " + this.options[this.selectedIndex].text + " Poster</a></h3>");
    });

    $("select").change(
    function() {
      $("#debug2").show();
      $("#debug2").html("<h3 id='dl'><a target='_blank' href='http://static.thundervote.com/posters/11x17/" + this.value + ".pdf'>Download Your " + this.options[this.selectedIndex].text + " Poster</a></h3>");
    });

    $("select").change(
    function() {
      $("#debug3").show();
      $("#debug3").html("<h3 id='dl'><a target='_blank' href='http://static.thundervote.com/posters/TILE/" + this.value + ".pdf'>Download Your " + this.options[this.selectedIndex].text + " Poster</a></h3>");
    });

    $('#statebox1').click(function() { 
        $.blockUI({ message: $('#question1'), css: { 
	  width: '400px',
	  backgroundColor: '#BEE2F0',
	  border: '3px solid #fff' } }); 
    }); 

    $('#statebox2').click(function() { 
        $.blockUI({ message: $('#question2'), css: {
          width: '400px',
          backgroundColor: '#BEE2F0',
          border: '3px solid #fff' } }); 
    }); 

    $('#statebox3').click(function() { 
        $.blockUI({ message: $('#question3'), css: {
          width: '400px',
          backgroundColor: '#BEE2F0',
          border: '3px solid #fff' } }); 
    }); 

    $('#cancel1').click(function() {
      $.unblockUI();
      return false;
    });

    $('#cancel2').click(function() {
      $.unblockUI();
      return false;
    });

    $('#cancel3').click(function() {
      $.unblockUI();
      return false;
    });

    $('h3#dl').click(function() {
      $.unblockUI();
      return false;
    });

    $('#random').click(function() {
      $.unblockUI();
      return false;
    });
 
}); 
 
