﻿/*
 *
 */
// dojo FAIL, jQuery FTW!!!!!!
jQuery(document).ready(function($) {
    
    // Use jQuery to get the HTML file
    $.get('/water_saving_tips.aspx', {
        preventCache: new Date().getTime()
    }, function(data, textStatus) {
        
        // Select the <dd> elements
        var collection = $('dd.random2', data);
        
        // Generate a random collection index
        var idx = Math.floor(Math.random() * collection.length);
        
        // Populate "randomDisplay" with the random element's contents
        $('#randomFact').html(collection.eq(idx).html());
    }, 'html');
});