"); if(!isGBR) { elt.append(submenu); ul.append(elt); } else { ul.removeClass("search-grid-results") ul.addClass("search-grid-no-results") ul.css("display", "flex"); } currentCategory = item.type; } else if ( item.type == 'product') { var elt = $j(`
"); elt.append(submenu); ul.append(elt); //temporary fix to expand the product search results area for GBR since we turned off the display name search results. if (isGBR){ ul.removeClass("search-grid-results") ul.addClass("search-grid-no-results") ul.css("display", "flex"); } currentCategory = item.type; } } submenuUl = ul.find("."+item.type+" ul"); if (item.type == 'no-results') { ul.removeClass("search-grid-results") ul.addClass("search-grid-no-results") ul.css("display", "flex"); let li = prepareNotFoundMessage(item); li.attr('name', item.name); li.attr('value', item.name); ul.append(li); return false; } li = suggestion < maxResults ? that._renderItem(submenuUl, item ) : $j('
'); li.attr( "aria-label", item.type + " : " + item.type ); if (item.type == 'display_name') { suggestion++; highlightCriteria = item.criteria.split(/\s+/); let div = li.find("div"); div.addClass("search-result-text kibble-typography paragraph kibble-font-size-400 kibble-font-weight-600"); $j.each(highlightCriteria,function(k,term) { div.highlight(term, "body"); }); li.click(() => { $j("#searchCriteria").val(item.data); $j("#searchForm").submit(); }); } else if ( item.type == 'product' ) { li = that._renderItemData(submenuUl, item ); count++; let shouldShow = productsVisible(); if(count == shouldShow + 1) { prepareViewAllButton(li).appendTo('.li-products'); } if (count <= shouldShow) { let thumbnail = prepareThumbnail(item); li.append(thumbnail) } } }); } }); } /** * It provides the quantity of products should display depending the screen size media. * @returns {quantity} of products that should display. */ let productsVisible = () => { if($j(window).innerWidth() >= 650 && $j(window).innerWidth() <= 900) { return 6; } else if($j(window).innerWidth() >= 900 && $j(window).innerWidth() <= 1200){ if ($j(window).innerHeight() <= 950){ return 2; } else { return 4; } } else if($j(window).innerWidth() >= 1200){ if ($j(window).innerHeight() <= 950){ return 4; } else { return 6; } }else { return 0; } } /** * It prepares a element to see the button 'View All' on search component. * @param element to prepare. * @returns { element} with styles and behaviours. */ let prepareViewAllButton = (li) => { li.addClass('ui-autocomplete-category view-all-products-search'); li.html('View All'); li.click(() => { $j("#searchForm").submit(); }); li.css("cursor", "pointer"); return li; } /** * It prepares a thumbnail of a product item. * @param item whit a product information * @returns { element} with image, description, price and * redirect to product detail. */ let prepareThumbnail = (item) => { let divContainer = $j('
', { click: () => location.replace(itemUrl + item.id), class: 'search-product-container' }); let img = $j(' ', { src: item.img, class: 'search-product-image', onerror:`javascript:this.src='/images/ecom/na150x150.gif'` }); let description = $j('
', { html: item.name, class: 'search-product-description' }); let price = $j('
', { html: lang.currencyRange(item.price), class: 'search-product-price' }); divContainer.append(img, description, price); return divContainer; } /** * It prepares a elemanet
with Not found message. * @param item whit message information. * @returns { element} Not found message. */ let prepareNotFoundMessage = (item) => { let li = $j(' ', { class: 'ui-autocomplete-not-results', 'aria-label': item.type + " : " + item.type }); li.on('click', function(event) { event.preventDefault(); $j("#searchForm").submit(); }); li.addClass('ui-autocomplete-not-results'); li.attr('aria-label', item.type + " : " + item.type); let div = $j('', { class: 'ui-autocomplete-not-results' }); let noResultsTitle = $j('', { class: 'ui-autocomplete-not-results-title', html: item.title + ' "' + item.term + '" ' }); let noResultsSubtitle = $j('', { class: 'ui-autocomplete-not-results-subtitle', html: item.subtitle }); div.append(noResultsTitle, noResultsSubtitle); li.append(div) return li; } var searchButtonClicked = function(event) { event.preventDefault(); $j("#searchForm").submit(); } var sortOrder = "&sort=score desc"; var handleMobileBindings = function(mobile) { var searchForm = $j("#searchForm").detach(); if (mobile) { searchForm.appendTo("#mobile-search"); $j("#searchCriteria").removeClass("gSearch"); $j("#searchCriteria").catcomplete('widget').off('mouseenter'); $j("#hierarchyFilter").hide(); $j("#searchButton").on('mousedown', function(e) { searchButtonClicked(e); }); $j("#company_logo a, .m-acc-link").click(function() { event.preventDefault(); }); var loc = ecomController.getLocation(); var filterLocs = ["search","category"]; var showFilter = filterLocs.indexOf(loc)!=-1; $j("#mobileFiltersButton").html("Filters"); } else { searchForm.appendTo("#desktop-search"); $j("#searchCriteria").addClass("gSearch"); $j("#searchCriteria").catcomplete( {width: $j("#searchCriteria").width()}); $j("#hierarchyFilter").show(); $j("#mobileFiltersButton").hide(); $j("#facet-column").show(); $j("#company_logo,#content_container").show(); } ecomController.refreshAdSlots(mobile); } let updatePlaceholder = function() { if ($j(window).innerWidth() > 901 && $j(window).innerWidth() <= 950) { $j("#searchCriteria").attr("placeholder","Search"); } else { $j("#searchCriteria").attr("placeholder","Search"); } } /** * It takes the control over width size of the search bar component {.ui-autocomplete}. * @returns if windows width size is less than 1000 px hidde the search bar component {.ui-autocomplete}. * Otherwise adjust search bar component according to the input search terms {#searchCriteria}. */ $j(window).resize(function() { let position = $j("#kb-search-bar-content").offset(); let width = $j("#kb-search-bar-content").width(); let windows = $j(window).width(); let properties = { left: position.left, top: position.top, width: width }; if (windows <= 1000) { $j(".ui-autocomplete").css({ display: 'none' }) updatePlaceholder(); } }); $j(document).ready(function() { initAutoCompleteRenderer(); $j("#searchForm").submit(function(event) { event.preventDefault(); var c = $j("#searchCriteria"); var hc= $j("#categorySearchCriteria").val(); if (!isEmpty(hc) && hc.length>0) { var url = hdUrl + "?hierarchy="+buildHierarchy(hc)+sortOrder; location.replace(url); return; } c.val(c.val().replace("#","")); if (c.val().length>0) { var hf = $j("#hierarchyFilter"); var hierarchyFilter = hf.val(); var url = hdUrl + "?s="+encodeURIComponent(c.val())+"&hierarchy="+hierarchyFilter+sortOrder+"&pre=true"; location.replace(url); } }); $j("#searchButton").click(searchButtonClicked); var searchDefs = { source: function(request, response) { lastType = null; ecomController.searchSolr(request, response); }, max: isMobile ? 5 : 10, response: function (event, ui) { const suggestions = ui.content.filter(suggestion => suggestion.type == 'display_name'); const products = ui.content.filter(item => item.type == 'product'); let shouldReturnProducts = isMobile ? false : products.length == 0; if (suggestions.length == 0 || shouldReturnProducts) { let noResults = { label: "no-results", data: "no-results", type: "no-results", title: "Search", term: ui.content[0].label, subtitle: "", value: "" }; ui.content.length = 0; ui.content.push(noResults); } else if (suggestions.length == 0) { let noResultsSuggestions = { type: "no-results-suggestions", }; ui.content.push(noResultsSuggestions); } else if (products) { let noResultsProducts = { type: "no-results-products", }; ui.content.push(noResultsProducts); } }, minLength: 1, focus: function(event,ui) { if (ui.item === undefined) { return; } switch (ui.item.type) { case "category_name": event.preventDefault(); $j("#categorySearchCriteria").val(ui.item.data); $j("#searchCriteria").val(ui.item.label); break; default: $j("#categorySearchCriteria").val(''); break; } }, open: function() { let searchBar = document.querySelector('.kb-search-bar').getBoundingClientRect() const dropdownResults = $j('.ui-autocomplete') dropdownResults.css('width',($j('.kb-search-bar').width())); } } $j("#searchCriteria").catcomplete(searchDefs); updatePlaceholder(); handleMobileBindings(checkMobileTablet()); }); //
Home Surface Creek Veterinary Center welcomes you to our website!
We understand the special role your pet plays in your family and are dedicated to becoming your partner in your pet's health care. We treat your pet as we would our own. Our goal is to practice the highest quality medicine and surgery with compassion and an emphasis on client education.
Our entire healthcare team is committed to providing personal attention to the unique concerns of each individual pet owner. Thank you for taking the time to read about our veterinary practice and the services we offer. We welcome your comments and suggestions.Please contact us at(970)856-4474 for all your pet health care needs.
Surface Creek Veterinary Center in Cedaredge,CO is a full service animal hospital. It is our commitment to provide quality veterinary care throughout the life of your pet. We also offer mobile services and some in house procedures for your farm animals. Our services and facilities are designed to assist in routine preventive care for young, healthy pets; early detection and treatment of disease as your pet ages; and complete medical and surgical care as necessary during his or her lifetime.
Article information
Author : Melvina Ondricka
Last Updated : 2024-07-02T18:00:05+07:00
Views : 6198
Rating : 4.8 / 5 (68 voted)
Reviews : 91% of readers found this page helpful
Author information
Name : Melvina Ondricka
Birthday : 2000-12-23
Address : Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498
Phone : +636383657021
Job : Dynamic Government Specialist
Hobby : Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball
Introduction : My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.