
$(document).ready(function(){

    $( '#btn_list_link' ).click( function( e ){ $('#pre_search_list').fadeToggle();spottago.event.kill( e ); } );
    $( '#list_close' ).click( function( e ){ $('#pre_search_list').fadeToggle();spottago.event.kill( e ); } );

    $( '#btn_more_opts').click( function( e ){
        var btn_text = $('#more_opts_text');
        $('#plus').html( ( btn_text.html() == 'More Options' ) ? '-' : '+' );
        btn_text.html( ( btn_text.html() == 'More Options' ) ? 'Less Options' : 'More Options' );
        var adv_opts = $('#adv_options');
        var new_height = ( adv_opts.height() > 150 ) ? 0 : 165;
        $('#adv_options').animate( { height: new_height }, 600 );
    } );

    var sl_config = {
        toggle_ids: [ 'btn_list_link' ],
        max_zindex: 100,
        size:{ width:767, height:580 },
        get_content: function(){ return $( '#search_list_content' ).html(); }
    };
    var search_list = new PopupEclipse( sl_config );

    var lic_config = {
        form: 'search_form',
        keyword: 'area'
    };
    var lic = new LocationInputController( lic_config );
  
    var listing_previewer_config = {
        container_id: "widget"
    };

    var listing_previewer = new ListingPreviewer( listing_previewer_config );

//    FB.init( "9eb36f6080d3a2ae140c49764f983341", "/facebook/connect/xd_receiver.htm" ); 
});

