﻿var flashvars = { name1: "hello", name2: "world" };
var params = { menu: "false", wmode: "transparent" };
var attributes = { id: "flashLoaded", name: "flashLoaded" };

swfobject.embedSWF("/Content/Flash/jhr_logo.swf", "logor", "320", "110", "9.0.0", "/Content/Flash/expressInstall.swf", flashvars, params, attributes);
Cufon.replace('h1', { fontFamily: 'hutcheson' });
Cufon.replace('.cfn', { fontFamily: 'hutcheson' });
Cufon.replace('h2', { fontFamily: 'hutcheson' });
//Cufon.replace('h4', { fontFamily: 'hutcheson' });
// initialise plugins
jQuery(function () {
    jQuery('ul.sf-menu').supersubs({
        minWidth: 12,   // minimum width of sub-menus in em units 
        maxWidth: 15,   // maximum width of sub-menus in em units 
        extraWidth: 1     // extra width can ensure lines don't sometimes turn over 
        // due to slight rounding differences and font-family 
    }).superfish({
        delay: 500,
        animation: { opacity: 'show', height: 'show' },
        speed: 'fast',
        autoArrows: true,
        dropShadows: false
    });
});
// ready
// watermark js
$(document).ready(function () {
    $(".btn").button();

    $('.watermark').each(function () {
        $(this).watermark('subdued', $(this).attr('title'));
    });
    //alert($(".pagers > a").length);
    var minprice = $("#minprice").val();
    if (minprice == "") {
        minprice = 120000;
        //$("#minprice").val(minprice);
    }
    var maxprice = $("#maxprice").val();
    if (maxprice == "") {
        maxprice = 900000;
        //$("#maxprice").val(maxprice);
    } else {
        $("#pricespan").html('$' + Comma(minprice) + ' - $' + Comma(maxprice));
    }
    $("#priceSlider").slider({
        range: true,
        min: 20000,
        max: 1000000,
        values: [minprice, maxprice],
        step: 10000,
        slide: function (event, ui) {
            $("#minprice").val(ui.values[0]);
            $("#maxprice").val(ui.values[1]);
            if (ui.values[1] == 1000000) {
                $("#pricespan").html('$' + Comma(ui.values[0]) + ' - $' + Comma(ui.values[1]) + "+");
            } else {
                $("#pricespan").html('$' + Comma(ui.values[0]) + ' - $' + Comma(ui.values[1]));
            }
        }
    });
    //$("#pricespan").html('$' + Comma($("#priceSlider").slider("values", 0)) + ' - $' + Comma($("#priceSlider").slider("values", 1)));
});
