/*  
    Global scripts for Marketplace
    ------------------------------------------------------
    is jQuery dependent 
*/

$(function(){
  
  // Load a new market when one is selected
  $('#market').change(function() {
  
    // Initialize & set variables
    var protocol = window.location.protocol + '//';
    var host     = window.location.host;
    var path     = '/marketplace/' + $(this).val();
    
    // Load the chosen market’s URL
    window.location.assign(protocol + host + path);
    
    // Disable the other search inputs while the new page
    // loads. The search box will be focused on the new page.
    $('#welcome input').attr('disabled','disabled');
    
  })// END load new market
  
});