<script type="text/javascript"><!-- [et_pb_line_break_holder] --> jQuery(document).ready(function() {<!-- [et_pb_line_break_holder] --> console.log('document ready');<!-- [et_pb_line_break_holder] --> var post_type_to_icon = {product: 'local_grocery_store', page : 'pageview', post: 'info_outline', salesman: 'face'};<!-- [et_pb_line_break_holder] --> /*<!-- [et_pb_line_break_holder] --> var data;<!-- [et_pb_line_break_holder] --> jQuery.ajax({<!-- [et_pb_line_break_holder] --> url: 'https://www.sshoreca.is/wp-json/search/v2/all_posts/',<!-- [et_pb_line_break_holder] --> }).done(function(response) {<!-- [et_pb_line_break_holder] --> function format(post) {<!-- [et_pb_line_break_holder] --> if(post.guid == undefined) {<!-- [et_pb_line_break_holder] --> return '<a href="https://www.sshoreca.is?s='+post.text+'">'+post.text+'</a>';<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if(post.text.length > 45) {<!-- [et_pb_line_break_holder] --> return '<a class="search_link" href="'+post.guid+'"><i class="material-icons left">'+post_type_to_icon[post.type]+'</i>'+post.text.substr(0,50)+'...'+'</a>';<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> return '<a class="search_link" href="'+post.guid+'"><i class="material-icons left">'+post_type_to_icon[post.type]+'</i>'+post.text+'</a>';<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> data = [];<!-- [et_pb_line_break_holder] --> for(var i = 0; i < response.post_count; i++) {<!-- [et_pb_line_break_holder] --> var current_post = response.posts[i];<!-- [et_pb_line_break_holder] --> data.push({<!-- [et_pb_line_break_holder] --> id: current_post.ID,<!-- [et_pb_line_break_holder] --> text: current_post.post_title,<!-- [et_pb_line_break_holder] --> type: current_post.post_type,<!-- [et_pb_line_break_holder] --> guid: 'https://www.sshoreca.is?p='+current_post.ID,<!-- [et_pb_line_break_holder] --> })<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> */<!-- [et_pb_line_break_holder] --> //console.log('response', response);<!-- [et_pb_line_break_holder] --> //console.log('attaching');<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> function format(post) {<!-- [et_pb_line_break_holder] --> if(post.guid == undefined) {<!-- [et_pb_line_break_holder] --> return '<a href="https://www.sshoreca.is?s='+post.text+'">'+post.text+'</a>';<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if(post.post_title.length > 45) {<!-- [et_pb_line_break_holder] --> return '<a class="search_link" href="'+post.guid+'"><i class="material-icons left">'+post_type_to_icon[post.post_type]+'</i>'+post.post_title.substr(0,50)+'...'+'</a>';<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> return '<a class="search_link" href="https://www.sshoreca.is?p='+post.ID+'"><i class="material-icons left">'+post_type_to_icon[post.post_type]+'</i>'+post.post_title+'</a>';<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> var url = 'https://www.sshoreca.is/wp-json/search/v2/all_posts/1211';<!-- [et_pb_line_break_holder] --> var select2 = jQuery('#dropdown_search').select2({<!-- [et_pb_line_break_holder] --> //data: data,<!-- [et_pb_line_break_holder] --> tags: true,<!-- [et_pb_line_break_holder] --> placeholder: 'Vöruleit...',<!-- [et_pb_line_break_holder] --> templateResult: format,<!-- [et_pb_line_break_holder] --> multiple: true,<!-- [et_pb_line_break_holder] --> templateSelection: format,<!-- [et_pb_line_break_holder] --> escapeMarkup: function(m) {<!-- [et_pb_line_break_holder] --> return m;<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> ajax: {<!-- [et_pb_line_break_holder] --> url: url,<!-- [et_pb_line_break_holder] --> dataType: 'json',<!-- [et_pb_line_break_holder] --> delay: 250,<!-- [et_pb_line_break_holder] --> type: 'GET',<!-- [et_pb_line_break_holder] --> data: function(params) {<!-- [et_pb_line_break_holder] --> console.log('params', params);<!-- [et_pb_line_break_holder] --> return {<!-- [et_pb_line_break_holder] --> q: params.term,<!-- [et_pb_line_break_holder] --> page_limit: params.page,<!-- [et_pb_line_break_holder] --> };<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> processResults: function(data, params) {<!-- [et_pb_line_break_holder] --> console.log('data',data);<!-- [et_pb_line_break_holder] --> params.page = params.page || 1;<!-- [et_pb_line_break_holder] --> return {<!-- [et_pb_line_break_holder] --> results: data.posts,<!-- [et_pb_line_break_holder] --> pagination: {<!-- [et_pb_line_break_holder] --> more: (params.page * 50) < data.length<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> };<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> minimumInputLength: 1,<!-- [et_pb_line_break_holder] --> language: {<!-- [et_pb_line_break_holder] --> noResults: function(){<!-- [et_pb_line_break_holder] --> return "Engar niðurstöður fundust <a href='#' class='btn btn-danger'>Leita samt</a>";<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> inputTooShort: function(args) {<!-- [et_pb_line_break_holder] --> // args.minimum is the minimum required length<!-- [et_pb_line_break_holder] --> // args.input is the user-typed text<!-- [et_pb_line_break_holder] --> return "Skrifaðu til að byrja leit.";<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> inputTooLong: function(args) {<!-- [et_pb_line_break_holder] --> // args.maximum is the maximum allowed length<!-- [et_pb_line_break_holder] --> // args.input is the user-typed text<!-- [et_pb_line_break_holder] --> return "Leitarorð of langt";<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> errorLoading: function() {<!-- [et_pb_line_break_holder] --> return "Ekkert fannst";<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> loadingMore: function() {<!-- [et_pb_line_break_holder] --> return "Sæki fleiri niðurstöður";<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> searching: function() {<!-- [et_pb_line_break_holder] --> return "Leita...";<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> maximumSelected: function(args) {<!-- [et_pb_line_break_holder] --> // args.maximum is the maximum number of items the user may select<!-- [et_pb_line_break_holder] --> return "Villa við leit";<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> },<!-- [et_pb_line_break_holder] --> });<!-- [et_pb_line_break_holder] --> jQuery('#dropdown_search').on("select2:select", function(e) {<!-- [et_pb_line_break_holder] --> var selected_element = jQuery(e.currentTarget);<!-- [et_pb_line_break_holder] --> var select_val = selected_element.val();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> var selected_option = jQuery('#dropdown_search option[value="' + select_val + '"]')<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> console.log(select2.select2('data'));<!-- [et_pb_line_break_holder] --> var selected_href = select2.select2('data')[0].guid;<!-- [et_pb_line_break_holder] --> console.log(selected_href);<!-- [et_pb_line_break_holder] --> if(typeof selected_href == 'undefined') selected_href = 'https://www.sshoreca.is?s='+selected_option.val();<!-- [et_pb_line_break_holder] --> window.location = selected_href;<!-- [et_pb_line_break_holder] --> });<!-- [et_pb_line_break_holder] --> jQuery('select2-search-field > input.select2-input').on('input', function(e) {<!-- [et_pb_line_break_holder] --> //if(e.keyCode === 13)<!-- [et_pb_line_break_holder] --> //window.location = 'https://www.sshoreca.is?s='+jQuery(this).val();<!-- [et_pb_line_break_holder] --> });<!-- [et_pb_line_break_holder] --> //});<!-- [et_pb_line_break_holder] --> jQuery(document).on('click', '.search_link', function() {<!-- [et_pb_line_break_holder] --> window.location = jQuery(this).attr('href');<!-- [et_pb_line_break_holder] --> });<!-- [et_pb_line_break_holder] --> });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> #dropdown_search {<!-- [et_pb_line_break_holder] --> border-radius: 0px;<!-- [et_pb_line_break_holder] --> width: 60%;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-container--default .select2-selection--multiple {<!-- [et_pb_line_break_holder] --> border-radius: 0px;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-container--default .select2-results__option--highlighted[aria-selected] {<!-- [et_pb_line_break_holder] --> background-color: #fff !important;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-results__option {<!-- [et_pb_line_break_holder] --> pointer-events: none;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-results__option a {<!-- [et_pb_line_break_holder] --> pointer-events: all;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-selection__choice {<!-- [et_pb_line_break_holder] --> display: none;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> form > .select2-container {<!-- [et_pb_line_break_holder] --> width: 80% !important;<!-- [et_pb_line_break_holder] --> height: 40px;<!-- [et_pb_line_break_holder] --> position: absolute;<!-- [et_pb_line_break_holder] --> top: 0;<!-- [et_pb_line_break_holder] --> bottom: 0;<!-- [et_pb_line_break_holder] --> margin: auto;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-container {<!-- [et_pb_line_break_holder] --> z-index: 2;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-container input {<!-- [et_pb_line_break_holder] --> width: 80% !important;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-selection {<!-- [et_pb_line_break_holder] --> height: 40px;<!-- [et_pb_line_break_holder] --> border-left: none !important;<!-- [et_pb_line_break_holder] --> border-right: none !important;<!-- [et_pb_line_break_holder] --> border-top: none !important;<!-- [et_pb_line_break_holder] --> border-bottom: 1px solid #bbb !important;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2 input,<!-- [et_pb_line_break_holder] --> .select2 input::-webkit-input-placeholder {<!-- [et_pb_line_break_holder] --> font-size: 20px;<!-- [et_pb_line_break_holder] --> line-height: 3;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-results a {<!-- [et_pb_line_break_holder] --> color: #000 !important;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-dropdown--below {<!-- [et_pb_line_break_holder] --> width: 350px !important;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-container--default {<!-- [et_pb_line_break_holder] --> width: 100% !important;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> @media(min-width: 500px) {<!-- [et_pb_line_break_holder] --> .select2-container--default {<!-- [et_pb_line_break_holder] --> width: 50% !important;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> @media(min-width: 500px) {<!-- [et_pb_line_break_holder] --> .select2-container--default {<!-- [et_pb_line_break_holder] --> width: 100% !important;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .woocommerce .select2-results__options, .woocommerce .select2-dropdown--below {<!-- [et_pb_line_break_holder] --> max-width: 215px;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> .select2-selection__rendered {<!-- [et_pb_line_break_holder] --> background: url(https://www.sshoreca.is/wp-content/themes/Divi-child/images/if_icon-111-search_314807.png) !important;<!-- [et_pb_line_break_holder] --> background-repeat: no-repeat !important;<!-- [et_pb_line_break_holder] --> background-position-x: 100% !important;<!-- [et_pb_line_break_holder] --> background-position-y: 0px !important;<!-- [et_pb_line_break_holder] --> background-size: 40px 40px !important;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --></script><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->
No Results Found
The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.