Categories

Blogroll

    May
    15
    Hello world!

    Welcome to GeoDirectory Demo Sites. This is your firstYou only live once and you have to stop and reverse the deterioration of cartilage and there are many problems which can cause pain while having intercourse. cialis 10mg It contains allicin and it increases blood flow to the sexual organ causes http://www.cerritosmedicalcenter.com/pid-6048 discount viagra usa erectile […]

    Read This Post

    Jan
    16
    Fieldwork brewery in Berkeley, CA

    Aug
    8
    Made in Oakland – “Sorry to Bother You” and “Blindspotting” at California Theater in Berkeley

    Jun
    30
    What does “Made in Berkeley” Mean?

    May
    3
    From the Claremont Hotel

    "); } }); } // on CPT change jQuery("body").on("geodir_setup_search_form", function(){ gdas_ac_init('.gd_search_text'); }); }); function gdas_ac_init($field){ jQuery($field).on("focusin", function(){ gdasac_selected = this; gdas_ac_focus_in(this); }).on("focusout", function(){ gdasac_selected = ''; gdas_ac_focus_out(this); }); // window resize tasks jQuery(window).on("resize",function(){ gdas_ac_resize_suggestions(); }); } function gdas_ac_focus_in($input){ var $suggestions = jQuery($input).parent().find(".gdas-search-suggestions"), gdas_fire = false; if ($suggestions.length) { gdas_fire = true } else { jQuery($input).after(""); gdas_fire = true; } /* Fire search */ if (gdas_fire && !$suggestions.hasClass('gdasac-focused')) { $suggestions.addClass('gdasac-focused'); gdas_ac_init_suggestions($input); if ( gdasac_suggestions_with != 'posts' ) { gdas_ac_categories($input); } } // resize gdas_ac_resize_suggestions(); // set if is search near if(jQuery('.gdlm-location-suggestions:visible').prev().hasClass('snear')){ gdasac_is_search = true; }else{ gdasac_is_search = false; } } function gdas_ac_focus_out($input){ setTimeout(function() { if (!gdasac_do_not_close) { } },200); } /** * Get the current post_type categories as suggestions. * */ function gdas_ac_categories(el){ $input = jQuery(gdasac_selected); var post_type = jQuery($input).parent().parent().find("input[name='stype']").val(); var post_type_slug = jQuery($input).closest('.geodir-search').find("input[name='stype']").data("slug"); if(!post_type_slug) { post_type_slug = jQuery($input).closest('.geodir-search').find(".search_by_post").find(':selected').data("slug"); } if (typeof post_type_slug == 'undefined') { post_type_slug = jQuery(".search_by_post").find(':selected').data("slug"); } var search = jQuery($input).val(); if (typeof search == 'undefined') { search = ''; } request_url = geodir_params.api_url + "" + post_type_slug+"/categories/?orderby=count&order=desc&search="+search+"&per_page="+geodir_search_params.autocompleter_max_results; if (geodir_search_params.autocompleter_filter_location && el && jQuery(el).closest('form.geodir-listing-search').length) { $form = jQuery(el).closest('form.geodir-listing-search'); lname = jQuery('.geodir-location-search-type', $form).prop('name'); lval = jQuery('.geodir-location-search-type', $form).val(); if (lval && (lname == 'country' || lname == 'region' || lname == 'city' || lname == 'neighbourhood')) { request_url += '&' + lname + '=' + lval; } } jQuery.ajax({ type: "GET", url: request_url, success: function (data) { gdasac_categories = data;gdasac_doing_search--; html = ''; gdasac_li_type = 'category'; jQuery.each(gdasac_categories, function (index, value) { html = html + gdas_ac_create_li('category', value); }); var gdasCe = gdasac_selected ? gdasac_selected : el; jQuery(gdasCe).parent().find("ul.gdasac-category").empty().append(html); if(html && gdasac_selected && !jQuery(el).closest('form.geodir-listing-search').find('.gdas-search-suggestions').is(':visible')){try{jQuery(gdasCe).dropdown('show');}catch(err){console.log(err.message);}} }, error: function (xhr, textStatus, errorThrown) { console.log(errorThrown); } }); } /** * Get the current post_type categories as suggestions. * */ function gdas_ac_listings(el){ $input = jQuery(gdasac_selected); var post_type = jQuery($input).parent().parent().find("input[name='stype']").val(); var post_type_slug = jQuery($input).closest('.geodir-search').find("input[name='stype']").data("slug"); if(!post_type_slug) { post_type_slug = jQuery($input).closest('.geodir-search').find(".search_by_post").find(':selected').data("slug"); } var search = jQuery($input).val(), gdasLe = gdasac_selected ? gdasac_selected : el; if(search && search.length >= geodir_search_params.autocomplete_min_chars){ request_url = geodir_params.api_url + "" + post_type_slug+"/?search="+search+"&per_page="+geodir_search_params.autocompleter_max_results; if (geodir_search_params.autocompleter_filter_location && el && jQuery(el).closest('form.geodir-listing-search').length) { $form = jQuery(el).closest('form.geodir-listing-search'); lname = jQuery('.geodir-location-search-type', $form).prop('name'); lval = jQuery('.geodir-location-search-type', $form).val(); if (lval && (lname == 'country' || lname == 'region' || lname == 'city' || lname == 'neighbourhood')) { request_url += '&' + lname + '=' + lval; } } jQuery.ajax({ type: "GET", url: request_url, success: function (data) { gdasac_listings = data;gdasac_doing_search--; html = ''; gdasac_li_type = 'listing'; jQuery.each(gdasac_listings, function (index, value) { html = html + gdas_ac_create_li('listing', value); }); jQuery(gdasLe).parent().find("ul.gdasac-listing").empty().append(html); if(html && gdasac_selected && !jQuery(el).closest('form.geodir-listing-search').find('.gdas-search-suggestions').is(':visible')){try{jQuery(gdasLe).dropdown('show');}catch(err){console.log(err.message);}} }, error: function (xhr, textStatus, errorThrown) { console.log(errorThrown); } }); }else{ jQuery(gdasLe).parent().find("ul.gdasac-listing").empty(); } } /** * set the max height for the suggestion div so to never scroll past the bottom of the page. */ function gdas_ac_resize_suggestions(){ setTimeout(function(){ if(jQuery('.gd-suggestions-dropdown:visible').length){ var offset = jQuery('.gd-suggestions-dropdown:visible').offset().top; var windowHeight = jQuery( window ).height(); var maxHeight = windowHeight - ( offset - jQuery(window).scrollTop() ); if(jQuery('.gd-suggestions-dropdown:visible').prev().hasClass('gd_search_text')){ jQuery('.gd-suggestions-dropdown:visible').css('max-height',windowHeight - 40); }else{ jQuery('.gd-suggestions-dropdown:visible').css('max-height',maxHeight); } } }, 50); } function gdas_ac_init_suggestions($input){ setTimeout(function(){ gdas_ac_resize_suggestions(); }, 250); jQuery($input).on("keyup", function (e) { gdasac_doing_search = 3;// city, region, country if(gdasac_keyup_timeout != null) clearTimeout(gdasac_keyup_timeout); gdasac_keyup_timeout = setTimeout(function(){ gdas_ac_maybe_fire_suggestions($input); },500); }); } function gdas_ac_maybe_fire_suggestions(el){ gdasac_keyup_timeout = null; if ( gdasac_suggestions_with != 'terms' ) { gdas_ac_listings(el); } if ( gdasac_suggestions_with != 'posts' ) { gdas_ac_categories(el); } } function gdas_ac_create_li($type,$data){ var output = ''; var history = ''; var $delete = ''; var $common_class = 'list-group-item-action c-pointer p-0 m-0 d-flex justify-content-start align-items-center text-muted'; var $common_class_icon = ' d-flex align-items-center justify-content-center p-0 m-0 me-2'; var $common_class_title = 'dropdown-header h6 p-2 m-0 bg-light'; var $icon_size = 'height:38px;width:38px;'; if(gdasac_li_type != ''){ if($type=='category'){ output += '
  • Categories
  • '; }else if($type=='listing'){ output += '
  • Listings
  • '; }else{ output += '
  • '+$type.charAt(0).toUpperCase() + $type.slice(1)+'
  • '; } } gdasac_li_type = ''; if($data.history){ history = ' '; $delete = ' '; }else if($type == 'category' && $data.fa_icon){ var icon_color = $data.fa_icon_color ? '#fff' : ''; history = ' '; }else if($type == 'category'){ history = ' '; }else if($type == 'listing' && $data.featured_image.thumbnail){ history = ' '; }else{ history = ' '; } if($type=='category'){ if($data.area){$data.city = $data.area;} output += '
  • '+history+''+ $data.name + ''+$delete+'
  • '; }else if($type=='listing'){ if($data.area){$data.region = $data.area;} output += '
  • '+history+''+ $data.title.rendered + ''+$delete+'
  • '; } return output; } function gdasac_click_action($type,$url){ if($type=='category'){ // add location /*if(geodir_search_params.autocompleter_filter_location) { var current_location = geodir_params.location_url; $location_string = current_location.replace(geodir_params.location_base_url, ""); $url += $url.endsWith("/") ? "" : "/"; $url += $location_string; }*/ window.location = $url }else if($type=='listing'){ window.location = $url } }