title: Parse time data from HTML using jQuery
body: <p>I've got a javascript widget on my page that outputs times for Sunrise and Sunset.  The following code is what gets output (assume that these times change every day).  I have <strong>no control</strong> over the output from the widget.</p>
  
  <pre><code>&lt;div id="sun_container"&gt;
      &lt;div class="details"&gt;
          Sunrise: &lt;strong&gt;7:00AM&lt;/strong&gt; |
          Sunset: &lt;strong&gt;4:30PM&lt;/strong&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Elsewhere on my page I have an image tag that looks like this:</p>
  
  <pre><code>&lt;div id="sun_button"&gt;
      &lt;img src="images/day.png"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to parse out the sunrise time and the sunset time and compare these against the current server time (which I can output via PHP if necessary).</p>
  
  <p>If the current server time <strong>is not</strong> between the sunrise and sunset times, then I want to change the image <code>src</code> to <code>"images/night.png"</code>.</p>
  
  <p>Any ideas on how I could do this?</p>
  
  <p><strong>EDIT:</strong> I'm now outputting the server time in the page <code>&lt;head&gt;</code> using:</p>
  
  <p><code>var server_time = "&lt;?=date("H:i:s", time())?&gt;";</code></p>
  
  <p>which outputs something like this: </p>
  
  <p><code>var server_time = "17:07:41";</code></p>