var propID ='1';

$(document).ready(function()
    {
        $(this).attr('checked', 'false');
        $('#comercial').hide();

        $('#FRcheck').change( function ()
        {
            if( $(this).attr('checked') )
            {
                $('#comercial').slideToggle("slow");
            }
            else
            {
                $('#comercial').slideToggle("slow");
            }
        });

        /*
        if($('#innerSearch'))
        {
            $('#Ffilter a:eq(1)').bind('click', function()
            {
                $('#innerSearch').parent().slideToggle("slow");
                $('.filter').fadeTo("slow", 0);
                $('.filter').hide(250);
            });
        }
        */
        if($('#detalle_contactar'))
        {
            $('#detalle_contactar').hide();
            var cssObj = {
                width: "467px",
                height: "200px",
                position : "absolute",
                left: "3px",
                top: "3px",
                background: "#000000",
                "padding-top": "150px",
                "text-align": "center"
            }
            $('#preload img').css("border","none");
            $('#preload').css(cssObj);
            $('#contactar_propiedad a').bind('click', function()
            {
                $('#detalle_contactar').slideToggle("slow");
            });
        }
        
        if($('#image'))
        {
            $('#preload').hide(0, 0);
            $('#image').bind('load', function ()
            {
               $('#preload').fadeTo(0, 0);
               $('.descripcionProp').text($('#desc_'+propID).val());
            });
        }         
    });

    function reloadImage(path, id, base)
   {
        propID = id;
        $('#image').attr("src", path);

        $('ul img').removeClass("selected");
        $('#img_' + id + ' a img').addClass("selected");
       
        $('#preload').show();
        $('#preload').fadeTo(0, 0.5);
   }