$(document).ready(function() {
    /* equal cell heights */
    /*	var tallest_cell = 0;
    $(".property").each(function(){
    current_cell_height = $(this).height();
    if (current_cell_height > tallest_cell) {
    tallest_cell = current_cell_height;
    }
    });
    $(".property").height(tallest_cell);
    */

    /* color sale status */
    $(".property-secondary .status strong").each(function() {
        var status = $(this).text();
        if (status == "Available" | status == "available") {
            $(this).addClass("for-sale");
        }
        if (status == "Sold") {
            $(this).addClass("sold");
        }

        if (status == "Available for Presale") {
            $(this).addClass("presale");
        }

        if (status == "Pending") {
            $(this).addClass("pending");
        }

        if (status == "Price Reduced") {
            $(this).addClass("price-reduced");
        }

        if (status == "Special Incentive") {
            $(this).addClass("special-incentive");
        }
        
    });

    /* kill empty images */

    /*old version*/
    /*$(".property-secondary img").each(function(){
    var image_src = $(this).attr("src");
    if (image_src == location.hostname + "../images/uploaded/posts/default.htm") {
    $(this).remove();
    }*/

    $(".property-secondary img").each(function() {
        var image_src = $(this).attr("src");
        var univ_path = location.hostname + "../images/uploaded/posts/default.htm";
        if (image_src == univ_path) {
            $(this).remove();
        }
    });
});
