= javascript_include_tag "site_validator"
div style="width:50%"
  = render "clients/site_validator", site_type: params[:site_type] || 'url'
= stylesheet_link_tag "client/site_validator"
<br />
= select_tag "site_type", options_for_select(Utils::SITE_TYPES, params[:site_type] || 'url')

javascript:
  var initialized = false;
  $(document).on('JAMKAZAM_READY', function(e, data) {
      setTimeout(function() {
        window.site_validator = new JK.SiteValidator('#{params[:site_type] || 'url'}');
        site_validator.init();
        $('#validate_input_'+'#{params[:site_type] || 'url'}').val('jonathankolyer');
      }, 1)
  });
  $('#site_type').change(function(){ 
    location.href = 'site_validate?site_type='+$(this).val();
  });
