YOGA EVERYDAY KEEPS
THE DOCTOR AWAY
Guide to Yoga Studios, Classes, Ashrams & Retreat Centers in the USA!
Browse by Category
Featured Yoga Centers

Testimonials
/* Location suggestion schema
var = { type: "city", name: "Belfast" } */
var gdasac_selected = ''; var gdasac_li_type = ''; var gdasac_categories = []; var gdasac_listings = []; var gdasac_do_not_close = false; var gdasac_doing_search = 0; var gdasac_is_search = false; var gdasac_keyup_timeout = null; var gdasac_suggestions_with = '';
jQuery(function($) { // init gdas_ac_init('.gd_search_text');
if ($('.gd_search_text').length) { $('.gd_search_text').each(function() { if ( ! $(this).parent().find(".gdas-search-suggestions").length) { jQuery(this).after("
"); } }); }
// 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); }); jQuery(gdasac_selected).parent().find("ul.gdasac-category").empty().append(html); }, 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();
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(gdasac_selected).parent().find("ul.gdasac-listing").empty().append(html); }, error: function (xhr, textStatus, errorThrown) { console.log(errorThrown); } }); }else{ jQuery(gdasac_selected).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 mr-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 += '
'; }else if($type=='listing'){ output += '
'; }else{ output += '
'; } }
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 += ''; }else if($type=='listing'){ if($data.area){$data.region = $data.area;} output += '
'; }
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 } }