Interface.search.light = {
    init: function() {
        form = SearchForm('index-search', {
            settings: {
                flashMap: {
                    selector: 'div#home-map-container'
                },

                autocomplete: {
                    width: 135
                }
            },

            toggleLabel: function(condition) {
                if (condition) {
                    $('span.per-month').css('display', 'inline');
                    $('span.price').css('display', 'none');
                } else {
                    $('span.per-month').css('display', 'none');
                    $('span.price').css('display', 'inline');
                }

                return false;
            },

            initGoalCheckbox: function() {
                goal = SearchFormClass.form.find('input[name=goal]');
                // Check first, if no goal is checked
                if (!goal.find(':checked').length) { goal.eq(0).click(); }
                if (goal.find(':checked').val()=='rent') {
                    $('span.per-month').css('display','inline');
                    $('span.price').css('display','none');
                }
                goal.unbind().bind('change',{}, function(){
                    return SearchFormClass.toggleLabel($(this).val()=='rent');
                });
            }
        });

        FlashMap.formId = 'index-search';

        // This block diffs
        Interface.search.check(15);
    }
};

