title: JS Conditional Layout
body: <p>How can I use JavaScript to display one of two different layouts based on a JS conditional?</p>
  
  <p>For example, I am using the uStream API to check if a particular channel is live. If it is, then I want one layout to be displayed, if it's not live then another layout would be displayed.</p>
  
  <p>Might look a little like this:</p>
  
  <pre><code>function decideLayout(responseJson){
      var response = jQuery.parseJSON(responseJson);
  
      if(response.results == "live")
      {
          SHOW LIVE LAYOUT
      } else {
          SHOW OTHER LAYOUT 
      }
  }
  </code></pre>
  
  <p>EDIT: The only part of the site that needs to be dynamic is below the header. Maybe I could use php includes inside the conditional?</p>