https://www.high-endrolex.com/12https://www.high-endrolex.com/12var api_pane; $(document).ready(function(){ // $('.evSetScroll').scrollbar(); // $('.prodSetScroll').scrollbar(); //$('#prListBox').scrollbars(); var pane=$('#prListBox') pane.jScrollPane(); api_pane = pane.data('jsp'); var ckMb=isMobile(); if(ckMb==0){ $(".selstyle").msDropDown({mainCSS:'customS'}).data("custom"); $(".selstyle_cont").msDropDown({mainCSS:'customS_cont'}).data("custom"); $(".selstyle_st").msDropDown({mainCSS:'customS_st'}).data("custom_st"); $(".selstyle_news").msDropDown({mainCSS:'customS_news'}).data("custom"); $(".selstyle_cont2").msDropDown({mainCSS:'customS_cont2'}).data("customS_cont2"); }else{ $(".selstyle").attr('style','width:100%'); $(".selstyle_cont").attr('style','width:100%;height:40px;'); $(".selstyle_st").attr('style','width:100%;'); $(".selstyle_news").attr('style','width:100%;'); $(".selstyle_cont2").attr('style','width:100%;height:40px;'); $(".ctHd_Area").attr('style','display:none;'); $("#viewStorePP").attr('style','display:none;'); } //$(".ingredients_cereals").equalHeights(); }); (function($) { $.fn.equalHeights = function(minHeight, maxHeight) { tallest = (minHeight) ? minHeight : 0; this.each(function() { if($(this).height() > tallest) { tallest = $(this).height(); } }); if((maxHeight) && tallest > maxHeight) tallest = maxHeight; return this.each(function() { $(this).height(tallest).css("overflow","auto"); }); } })(jQuery); function isMobile(){ if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { var is_mob=1; }else{ var is_mob=0; } return is_mob; } //mainMenu $('.dropdown').removeClass('selsubM'); $('.dropdown').removeClass('menuSel'); $(document).on("mouseover",".dropdown ",function(){ var rel = $(this).attr('rel'); if(rel=='2') { $('.dropdown').removeClass('menuSel'); $('.dropdown').addClass('selsubM'); } else if(rel!=='2') { $('.dropdown').removeClass('selsubM'); $('.dropdown').removeClass('menuSel'); $('#mainMenu_'+rel).addClass('menuSel'); } }); (function($){ $(document).ready(function(){ $('.dropdown-toggle').on('click', function(event) { window.location.href=$(this).attr('href'); return true; alert('ok'); event.preventDefault(); event.stopPropagation(); $(this).parent().siblings().removeClass('open'); $(this).parent().toggleClass('open'); }); $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { event.preventDefault(); event.stopPropagation(); $(this).parent().siblings().removeClass('open'); $(this).parent().toggleClass('open'); }); }); })(jQuery); var nextSlide=1; $(document).ready(function(){ $('#carousel-example-generic').carousel({interval:40000}); $('#carousel-example-generic2').carousel({interval:false}); $('#carousel-example-generic').on('slide.bs.carousel', function (obj) { var nextSlide=new Number(obj.relatedObject.attr('rel')); if(nextSlide==0){ $('#carousel-example-generic2').carousel(0); }else if(nextSlide==1){ $('#carousel-example-generic2').carousel(1); }else if(nextSlide==2){ $('#carousel-example-generic2').carousel(2); }else if(nextSlide==3){ $('#carousel-example-generic2').carousel(3); }else if(nextSlide==4){ $('#carousel-example-generic2').carousel(4); }else if(nextSlide==5){ $('#carousel-example-generic2').carousel(5); }else if(nextSlide==6){ $('#carousel-example-generic2').carousel(6); }else if(nextSlide==7){ $('#carousel-example-generic2').carousel(7); }else if(nextSlide==8){ $('#carousel-example-generic2').carousel(8); }else if(nextSlide==9){ $('#carousel-example-generic2').carousel(9); }else if(nextSlide==10){ $('#carousel-example-generic2').carousel(10); } }) }); //change language ////////////////////////////////////////////////////////////////////////////////// $(document).on("click",".lgTop ",function(){ if ($('#langTp').hasClass('lgTop_sel')) { $('#OrderByOrd').slideUp('fast'); $('#langTp').removeClass('lgTop_sel'); $('#v1').removeClass('lgOpenTop'); }else{ $('#OrderByOrd').slideDown(); $('#langTp').addClass('lgTop_sel'); $('#v1').addClass('lgOpenTop'); } }); function setOrderByOrdValue(v){ //alert('set2'); $('#OrderByOrd').css('display','none'); $('#v1').innerHTML=v; $('#vIm').attr('src',$(this).attr('src')); window.location.reload(true); } ////////////////////////////////////////////////////////////////////////////////////////////// /*$(document).on("click",".prAb1",function(){ if($(this).hasClass('prDetCat')){ var ckT=1; }else{ var ckT=0; } var tId=$(this).attr('id'); var tRId=$(this).attr('rel'); if($(this).hasClass('home_products_sel')){ $(this).removeClass('home_products_sel'); }else{ $(this).addClass('home_products_sel'); } checkProd(ckT); return false; }); function checkProd(ckT){ //ckT---0 ---------prod list (home) //ckT---1 ---------prod detail ct='#'; $(".vpCt").each(function(){ var v=$(this).attr("rel").split("#"); var s=0; var tId=$(this).attr("id"); var pId=$(this).attr("id").split("_"); if (v[1]) { for(var i=0;i (1)){ if(!$('#setMenuLogoSt').hasClass('ct_menuSMV')){ $('#setMenuLogoSt').addClass('ct_menuSMV'); } }else{ $('#setMenuLogoSt').removeClass('ct_menuSMV'); } } } function setFixedMenuOld(){ if($(".hasSubMenu").length){ var ht=$('.hdTxtArea').height(); var hd=$('.headerArea').height(); if ($(window).scrollTop() > (ht+hd+22)){ $(".hasSubMenu").css({ "position":"fixed", "z-index":"10", "top": "0px" }); $(".areaPanettone").css({"margin-top":"55px"}); $(".header_det").addClass('header_detFixed'); if(!$("#submenuLogo").length){ $(".hasSubMenu").prepend('') } }else{ $(".hasSubMenu").css({ "position":"static" }); $(".areaPanettone").css({"margin-top":"0px"}); $(".header_det").removeClass('header_detFixed'); $("#submenuLogo").remove(); } }else{ var ht=$('.hdTxtArea').height(); var hd=$('.headerArea').height(); if ($(window).scrollTop() > (hd-110)){ $(".menu").css({ "position":"fixed", "z-index":"500", "top": "73px", "margin-top": "-1px" }); $(".header_det").addClass('header_detFixed'); /*if(!$("#submenuLogo").length){ $(".menu").prepend('') }*/ }else{ $(".menu").css({ "position":"relative", "margin-top": "0px", "top": "0px" }); //$(".areaPanettone").css({"margin-top":"0px"}); $(".header_det").removeClass('header_detFixed'); //$("#submenuLogo").remove(); } } } /*$(document).ready(function() { var pM=$('.prodMenuTop').height()-20; $(".lineSm").height(pM); });*/ /********************************************************************/ function makeSlideZoom(){ //return if($(window).width()<975){ $(".previewSlideContentC").each(function(){ var vv=$(window).width(); var v=$(this).width(); $(this).parent().css('background-size','auto 100%'); if(v>vv){ var r=vv/v; $(this).css({"transform": "scale("+r+")","transform-origin": "left top 0"}); var pv=new Number($(this).parent().attr("slideHeight")); $(this).parent().css("height",pv*r); console.log($(this).attr("id")+"="+v+"-"+r); }else{ $(this).css({"transform": "scale(1)"}) var pv=new Number($(this).parent().attr("slideHeight")); $(this).parent().css("height",pv); } }) } } $(document).ready(function(){ setTimeout(function() { setContentHeightCookie(); setMobileMenuSize(); }, 100); $(".slideRowManaged").each(function(){ $(this).attr("slideHeight",$(this).height()) }); makeSlideZoom(); if ($('.mainProdDet').length) { var lPd=$('.products_search').position().left; //$('.mainProdDet').css('margin-left',lPd+'px'); } }); $(window).resize(function(){ setContentHeightCookie(); setMobileMenuSize(); makeSlideZoom(); if ($('.mainProdDet').length) { var lPd=$('.products_search').position().left; //$('.mainProdDet').css('margin-left',lPd+'px'); } if($(window).width()>2000){ $('.setCoverBg').css('background-size',"cover"); }else{ $('.setCoverBg').each(function(){ if($(this).hasClass('slideRowManaged')){ $(this).css('background-size',"cover"); }else{ $(this).css('background-size',"cover"); } }); //$('.setCoverBg').css('background-size',"initial"); } }); /*********************************************CHECKFORM LOGIN*********************************************************/ function checkLoginForm(formid){ var formOk=1; var formFOk=1; $("#"+formid).find('.reqVal').each(function(){ if($(this).is(":visible")){ if($(this).val()==''){ $(this).addClass('requiredInp'); $('#errorTextMs').html("Required fields"); formOk=0; formFOk=0; }else{ $(this).removeClass('requiredInp'); } } }); if(formFOk==1){ if( !isValidEmailAddress( $('#email_'+formid).val() ) ) { $('#email_'+formid).addClass('requiredInp'); $('#errorTextMs').html("This email address is not correct"); formOk=0; } } if(formOk==1){ var emailLog=$('#email_'+formid).val(); var passLog=$('#password_'+formid).val(); $.get(nicoli_site_path+'/clubCheck.php?checkTp=login&emailLog='+emailLog+'&passLog='+passLog, function(data) { if(data=='ok'){ $('#'+formid).submit(); }else{ if(data=='logEr'){ $('#email_'+formid).addClass('requiredInp'); $('#password_'+formid).addClass('requiredInp'); $('#errorTextMs').html("Username or password is incorrect"); } if(data=='noUser'){ $('#email_'+formid).addClass('requiredInp'); $('#errorTextMs').html("Please verify! You never subscribed to our newsletter"); } formOk=0; $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); return false; } }); }else{ $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); return false; } } /*********************************************CHECKFORM REGISTER*********************************************************/ function checkRegisterForm(formid){ var formOk=1; var formFOk=1; $("#"+formid).find('.reqVal').each(function(){ if($(this).is(":visible")){ if($(this).val()==''){ $(this).addClass('requiredInp'); $('#errorTextMs').html("Required fields"); formOk=0; formFOk=0; }else{ $(this).removeClass('requiredInp'); } } }); if(formFOk==1){ if($('#reg_password_'+formid).val()!=$('#reg_password_c_'+formid).val()) { $('#reg_password_c_'+formid).addClass('requiredInp'); $('#errorTextMs').html("Please confirm your password"); formOk=0; } if( !isValidEmailAddress( $('#reg_email_'+formid).val() ) ) { $('#reg_email_'+formid).addClass('requiredInp'); $('#errorTextMs').html("This email address is not correct"); formOk=0; } } if(formOk==1){ var emailReg=$('#reg_email_'+formid).val(); $.get(nicoli_site_path+'/clubCheck.php?checkTp=register&emailLog='+emailReg, function(data) { if(data=='ok'){ $.get( nicoli_site_path+"/ajax_captcha.php?code="+$("#reg_captcha").val(), function( data ) { if(data=='ok'){ $('#'+formid).submit(); }else{ $('#reg_captcha').addClass('requiredInp'); $('#errorTextMs').html("Required fields"); } }); }else{ $('#reg_email_'+formid).addClass('requiredInp'); $('#errorTextMs').html("Please verify! You already subscribed to our newsletter"); $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); return false; } }); }else{ $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); return false; } } /*********************************************CHECKFORM ACCOUNT*********************************************************/ function checkAccountForm(formid){ var formOk=1; var formFOk=1; $("#"+formid).find('.reqVal').each(function(){ if($(this).is(":visible")){ if($(this).val()==''){ $(this).addClass('requiredInp'); $('#errorTextMs').html("Required fields"); formOk=0; formFOk=0; }else{ $(this).removeClass('requiredInp'); } } }); if(!$('#upPwAcc').is(":checked")){ if($('#reg_password_'+formid).val()!=$('#reg_password_c_'+formid).val()) { $('#reg_password_c_'+formid).addClass('requiredInp'); $('#errorTextMs').html("Please confirm your password"); formOk=0; } if($('#reg_password_'+formid).val()=='') { $('#reg_password_'+formid).addClass('requiredInp'); $('#errorTextMs').html("Required fields"); formOk=0; }if($('#reg_password_c_'+formid).val()=='') { $('#reg_password_c_'+formid).addClass('requiredInp'); $('#errorTextMs').html("Required fields"); formOk=0; } } if(formOk==1){ $('#'+formid).submit(); }else{ $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); return false; } } /*********************************************RESET PASSWORD*********************************************************/ $(document).on('click','.resetBt',function(){ if($('#rsPw').hasClass('resPW')){ $('#rsPw').removeClass('resPW'); $('#rsPw').slideUp(); }else{ $('#rsPw').addClass('resPW'); $('#rsPw').slideDown(); } }); function checkResetPw(){ var formOk=1; if($('#reset_email').val()=='') { $('#reset_email').addClass('requiredInp'); $('#errorTextMs').html("Required fields"); formOk=0; } if( !isValidEmailAddress( $('#reset_email').val() ) ) { $('#reset_email').addClass('requiredInp'); $('#errorTextMs').html("This email address is not correct"); formOk=0; } if(formOk==1){ var emailRes=$('#reset_email').val(); var setLangId=$('#setLangId').val(); $.get(nicoli_site_path+'/clubCheck.php?checkTp=reset&emailLog='+emailRes, function(data) { if(data=='ok'){ $.get(nicoli_site_path+'/resetPw.php?lang_id='+setLangId+'&emailPw='+emailRes, function(dataRw) { if(dataRw=='ok'){ $('#rsPw').removeClass('resPW'); $('#rsPw').slideUp(); $('#resetMs').html("
We sent your credentials to the email address
"); }else{ $('#errorTextMs').html("Be patient! Please try again later"); $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); return false; } }); }else{ $('#reset_email').addClass('requiredInp'); $('#errorTextMs').html("Please verify! You never subscribed to our newsletter"); $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); return false; } }); }else{ $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); return false; } } /*********************************************CHECKFORM NEWSLETTER*********************************************************/ function checkNewsletterForm(formid){ var formOk=1; if( !isValidEmailAddress( $('#email_'+formid).val() ) ) { $('#email_'+formid).addClass('requiredInp'); $('#errorTextMs').html("This email address is not correct"); formOk=0; } $("#"+formid).find('.reqVal').each(function(){ if($(this).is(":visible")){ if($(this).val()=='' || ($(this).attr('type') === 'checkbox' && !$(this).is(':checked'))){ $(this).addClass('requiredInp'); //$('#errorTextMs').html("Required fields"); $('#errorTextMs').html("Required fields"); formOk=0; }else{ $(this).removeClass('requiredInp'); } } }); if(formOk==1){ $('#nwForm2').submit(); } } $(document).on('click','#captchaVerify',function(){ if($("#captcha-form").val()){ $.ajax({ url: nicoli_site_path+'/ajax_captcha.php?code='+$("#captcha-form").val(), success: function(data){ if(data=='ok'){ $("#"+$("#parentForm").val()).append(''); $("#"+$("#parentForm").val()).submit(); $('.captchaClose').click(); }else{ $("#captcha-form").val(''); $("#captcha-form").addClass('requiredInp'); $('#errorTextMs').html("Required fields"); $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); } } }); }else{ $("#captcha-form").addClass('requiredInp'); $('#errorTextMs').html("Required fields"); $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); } return false; }) $(document).on('click','.captchaClose',function(){ $('.captcha_lightBoxPopup').animate({width:'1px',height:'1px',marginTop:'0px',marginLeft:'0px'},{ duration: 500, queue: false },function(){ $('.captcha_lightBoxPopup').css('display','none'); }); $('#captcha_lightBoxOverlayAC').animate({width:'1px',height:'1px',top:'50%',left:'50%'},{ duration: 500, queue: false },function(){ $('#captcha_lightBoxOverlayAC').remove(); }); return false; }) $(document).ready(function(){ $("#viewStorePP").hover(function(){ $('.ct_punti_open').animate({ width: "320px" }, {queue: false}); }, function() { $('.ct_punti_open').animate({ width: "0px" }, {queue: false}); }); }); $(document).on("click",".viewShareBt ",function(){ if ($('#shareArea').hasClass('dspNone')) { $('#shareArea').removeClass('dspNone'); }else{ $('#shareArea').addClass('dspNone'); } }); $(document).on("click",".viewShareButt",function(){ var currentId = $(this).attr('rel'); var pp=$('#offSh_'+currentId).position(); console.log(pp.top); shareId = '#shareArea_'+currentId; if ($(shareId).hasClass('dspNone')) { $('.shareOffArea').addClass('dspNone'); $(shareId).removeClass('dspNone'); //$('#shareArea_'+currentId).css('top',pp.top+27); //$('#shareArea_'+currentId).css('left',pp.left-10); }else{ $(shareId).addClass('dspNone'); } }); /*********************************************CHECKFORM MAP FILTER*********************************************************/ function checkMapFilter(){ var formOk=1; /*if ($('#filter_province').val()=='0'){ $('#provSetReq').addClass('reqlabel'); $('#errorTextMs').html("Filter by Province or State to find Vitabella's product near you"); formOk=0; }*/ if ($('#filter_nazione').val()=='0'){ $('#nazioneSetReq').addClass('reqlabel'); $('#errorTextMs').html("Filter by Province or State to find Vitabella's product near you"); formOk=0; } if(formOk==1){ //$('#provSetReq').removeClass('reqlabel'); $('#nazioneSetReq').removeClass('reqlabel'); showMapPoints(); }else{ $('.errorBoxArea').show("slow"); $(".errorBoxArea").delay(2500).hide("slow"); return false; } } /***************************************category slider*/ $(document).on("mouseenter",".catColumnHome",function(){ var v=690-$(this).width(); if($(this).data('pos')<$(".catColumnHome").length/3){ $(".rowCatHome").animate({left:'10px'},{ duration: 500, queue: false }) }else{ if($(this).data('pos')>($(".catColumnHome").length/3)*2){ $(".rowCatHome").animate({left:'-'+v+'px'},{ duration: 500, queue: false }) }else{ $(".rowCatHome").animate({left:'-300px'},{ duration: 500, queue: false }) } } $('.inactivecatColumnHome').css('display','block'); $(this).find('.inactivecatColumnHome').css('display','none'); $(".catColumnHome").animate({width:catColumnHomeWidth+'%',paddingLeft:'0px',paddingRight:'0px'},{ duration: 500, queue: false }); $(this).animate({width:'700px',paddingLeft:'150px',paddingRight:'150px'},{ duration: 500, queue: false }) }); $(document).on("mouseleave",".catColumnHome",function(){ $('.inactivecatColumnHome').css('display','none'); $(".rowCatHome").animate({left:'10px'},{ duration: 500, queue: false }) $(".catColumnHome").animate({width:catColumnHomeWidth+'%',paddingLeft:'0px',paddingRight:'0px'},{ duration: 500, queue: false }); }); $(document).ready(function(){ var catColumnCatWidthTop=100/$("#prodCatMenuTop").find('.catColumnCat').length; //$("#prodCatMenuTop").find('.catColumnCat').css('width',catColumnCatWidthTop+'%'); $("#prodCatMenuTop").find('.li_ColumnCat').css('width',catColumnCatWidthTop+'%'); }); /******************************************************************************/ $(document).on("click",".contactTabBt",function(){ var tid=$(this).attr('id'); var dr=$(this).attr('data-rel'); if($(this).hasClass('cTabBt_sel')){ $(this).removeClass('cTabBt_sel'); $(this).removeClass('cTabBt_unSel'); $('.ct_'+tid).hide(); $('#frmAreaST').hide(); $('.contactType'+dr).val(''); $('#setCType').val('0'); }else{ $('.contactTabBt').removeClass('cTabBt_sel'); $('.contactTabBt').removeClass('cTabBt_unSel'); $('.cTabBtContent').hide(); $('.contactTabBt').addClass('cTabBt_unSel'); $(this).addClass('cTabBt_sel'); $('.ct_'+tid).show(); $('#frmAreaST').show(); $('.contactType'+dr).val(dr); $('#setCType').val(dr); } }); function setContentHeightCookie(){ if(!$('.cookies').hasClass('hideCookie')){ var ch=$('.cookies').height()+10; $('.headerAreaNotFixed').css('margin-top',ch+'px'); } } function setMobileMenuSize(){ var ww=$(window).width(); if(!$('.cookies').hasClass('hideCookie')){ var ch=$('#cookies').height(); }else{ var ch=0; } var sh=20; var wh=$(window).height()-$('.menuNewArea').height()-ch-sh; if(ww<='768'){ $('.navbar-collapse').css('max-height',wh+'px'); } }