$(document).ready(

    function() 
    {
		$("#advancedSearchButton").click(
            function()
            {
                $("#advancedSearch").toggle();
                return false;
            }
        );
        
        $('.submit input').addClass(
            "ui-button ui-state-default ui-corner-all"
        ).hover(
			function()
            { 
				$(this).addClass("ui-state-hover"); 
			},
			function()
            { 
				$(this).removeClass("ui-state-hover"); 
			}
		).mousedown(
            function()
            {
                $(this).addClass("ui-state-active"); 
            }
        ).mouseup(
            function()
            {
				$(this).removeClass("ui-state-active");
            }
        );

        $('#PropertyFlatCostMin, #PropertyFlatCostMax').selectToUISlider({
            labels: 10,
            labelSrc: "text"
        });
        $('#PropertyFlatCostMax').next().css('padding', '0px');
        $('#PropertyFlatCostMax').next('.ui-widget').css('font-size', '0.8em');
        $('#PropertyFlatCostMax').next().children('div.ui-slider-range.ui-widget-header').css('height', 'auto');
        $('#PropertyFlatCostMax').next().css('margin-top', '0.8em');		
		
		$('#PropertyTypeMin, #PropertyTypeMax').selectToUISlider({
            labels: 9
        });
		$('#PropertyTypeMax').next().css('padding', '0px');
        $('#PropertyTypeMax').next('.ui-widget').css('font-size', '0.8em');
        $('#PropertyTypeMax').next().children('div.ui-slider-range.ui-widget-header').css('height', 'auto');
        $('#PropertyTypeMax').next().css('margin-top', '0.8em');
        
        $('#PropertyFloorMin, #PropertyFloorMax').selectToUISlider({
            labels: 6,
            labelSrc: "text"
        });
		$('#PropertyFloorMax').next().css('padding', '0px');
        $('#PropertyFloorMax').next('.ui-widget').css('font-size', '0.8em');
        $('#PropertyFloorMax').next().children('div.ui-slider-range.ui-widget-header').css('height', 'auto');
        $('#PropertyFloorMax').next().css('margin-top', '0.8em');
        
		$('#PropertyBuiltupAreaMin, #PropertyBuiltupAreaMax').selectToUISlider({
            labels: 6
        });
		$('#PropertyBuiltupAreaMax').next().css('padding', '0px');
        $('#PropertyBuiltupAreaMax').next('.ui-widget').css('font-size', '0.8em');
        $('#PropertyBuiltupAreaMax').next().children('div.ui-slider-range.ui-widget-header').css('height', 'auto');
        $('#PropertyBuiltupAreaMax').next().css('margin-top', '0.8em');        
        
        $('.ui-slider-label').css('position', 'static');
        $('.ui-slider-label:visible').css('display', 'inline');
    }
);