var parentOpen="(";var parentClose=")";$('a[href*=#]').click(function(event){$('html, body').animate({scrollTop:$($.attr(this,'href')).offset().top},500);event.preventDefault();});$(document).ready(function(){$('.button[data-slide="aromas"]').attr("data-slide","que-hacemos");$("#btnAromas").colorbox({inline:true,href:"#aromas .art-post",width:"95%",height:"80%",onComplete:function(){$(this).colorbox.resize();}});$("#btnBiblioteca").colorbox({inline:true,href:"#biblioteca .art-post",width:"95%",height:"80%",onComplete:function(){$(this).colorbox.resize();}});var isiPad=navigator.userAgent.match(/iPhone/i)!=null;if(isiPad){$(".imgHome").addClass("iPad");}});$(document).ready(function(){$(window).scroll(function(){var scroll=$(window).scrollTop();if(scroll>=500){$(".logo3RealesFijo").addClass("visible");} else{$(".logo3RealesFijo").removeClass("visible");}});});jQuery(document).ready(function(){var isOpen=false;jQuery("#miniCart").hover(function(){if(!isOpen) jQuery("#miniCartDiv").not(":animated").slideDown('500').css('display','block');isOpen=true;},function(){jQuery("#miniCartDiv").slideUp('500');isOpen=false;});});$(document).ready(function(){$("#id_orden").on("change",function(){updateOrder();});});function updateOrder(){newUrl=updateQueryStringParameter(location.href,"pagina",'1');newUrl=updateQueryStringParameter(newUrl,"orden",$("#id_orden").val());location.href=newUrl;} $(document).ready(function(){jQuery(".modoCuadricula").click(function(){$(".productUL").removeClass("product_box_listado");localStorage.setItem("modoListado","cuadricula");});jQuery(".modoListado").click(function(){$(".productUL").addClass("product_box_listado");localStorage.setItem("modoListado","product_box_listado");});if(localStorage.getItem("modoListado")=='product_box_listado') $(".productUL").addClass("product_box_listado");else if(localStorage.getItem("modoListado")!=null) $(".productUL").removeClass("product_box_listado");});$(document).ready(function(){$("#menuSlide").height($(document).height());});$(document).ready(function(){$("body").click(function(){if($("#menuSlide").css("right")=='0px') $("#menuSlide").css("right",'-363px');});$(".arrow, #menuSlide").click(function(){if($("#menuSlide").css("right")=='0px') $("#menuSlide").css("right",'-363px');else $("#menuSlide").css("right",'0px');});});window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);} gtag('js',new Date());gtag('config','UA-3938643-34');jQuery("#div_descripcion div,#div_descripcion p,#div_descripcion span,#div_descripcion a").not(".button").css({'color':'','font-size':'','text-indent':'','background-color':'transparent'});jQuery("#div_descripcion img").css({'max-width':'700px'});jQuery(document).ready(function(){jQuery("img:not(.pixelCode)").error(function(){event.preventDefault();jQuery(this).attr("title",jQuery(this).attr("src"));jQuery(this).attr("src","/cacheimg?zc=2&w=400&h=400&src=images/no-picture.png");jQuery(this).css({"width":"100%","opacity":"0.2"});});jQuery(".vlightbox1:not(.noColorbox)").colorbox({rel:'vlightbox1',maxWidth:'100%',maxHeight:'100%',slideshow:true,slideshowSpeed:600,slideshowStart:"Continuar",slideshowStop:"Parar",current:"{current} de {total}"});jQuery('a[href$=".jpg"], a[href$=".jpeg"], a[href$=".gif"], a[href$=".png"], a[href$=".JPG"], a[href$=".JPEG"], a[href$=".GIF"], a[href$=".PNG"]').not(".noColorbox").colorbox({maxWidth:'100%',maxHeight:'100%',slideshow:true,slideshowSpeed:6000});jQuery("a[href^='http']").not("[href*='"+location.host+"']").attr('target','_blank');if($(".readmore").length){$('').insertAfter($(".readmore"));$('.readmore').toggleClass("readmore__content__close");$('.readmore').css("height",$('.readmore').data("height"));jQuery(".readmore__toggle").click(function(){$(this).prev().toggleClass("readmore__content__close");if($(this).prev().hasClass("readmore__content__close")){$(this).text("Leer más...");$(this).prev().css("height",$('.readmore').data("height"));}else{$(this).text("Leer menos...");$(this).prev().css("height","initial");}});}});jQuery(document).ready(function(){jQuery('#shareme, .shareme').sharrre({share:{facebook:true,twitter:true,googlePlus:false,pinterest:false},buttons:{googlePlus:{url:'http://3reales.com/categoria-raiz',size:'medium',lang:'es-ES',annotation:''},facebook:{url:'http://3reales.com/categoria-raiz',action:'like',layout:'button_count',width:'',send:'false',faces:'false',colorscheme:'',font:'',lang:'es_ES'},twitter:{url:'http://3reales.com/categoria-raiz',count:'horizontal',via:'factinet_es',hashtags:'',related:'',lang:'es'},pinterest:{url:'http://3reales.com/categoria-raiz',media:'https://www.factinet.com/uploads/grupos/de05892751c5ce20c80c0700f27026bb_image_123650291__1_.jpg',description:'Grupo activo que lidera la recuperación de la variedad listán prieto en españa referente internacional y especializados en su localización y certificación.',layout:'horizontal'}},enableHover:false,enableCounter:false,enableTracking:true});$('a[href*="#"]:not([href="#"])').click(function(event){if(typeof($($.attr(this,'href')).offset())!='undefined'){event.preventDefault();$('html, body').animate({scrollTop:$($.attr(this,'href')).offset().top-($(".capaFija").is(":visible")*-100)-100},500);}});});