jQuery(function($){ "use strict"; /* ============================================== Detect Mobile Devices =============================================== */ var detectmob = false; if(navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i)) { detectmob = true; } /* ============================================== Category Select Element =============================================== */ $('#filter-group').on('change',function(){ var url=$(this).val(); if(url){ window.location=url; } return false; }); /* ============================================== Masonry Layout =============================================== */ var items=$('.section-items').find('.h-product'); if(detectmob!=true){ $('.section-items').find('.products').imagesLoaded( function() { $('.section-items').find('.products').masonry({ columnWidth:'.h-product' }); }); $('.section-items').find('.h-product').hover(function(){ $(this).children('.quantity-buy').stop().fadeToggle(200); $(this).stop().toggleClass('items-scale'); }); }else{ $('.section-items').find('.quantity-buy').css('display','block'); } /* ============================================== Tabs =============================================== */ $('img.avatar').addClass('col-sm-2'); $('.comment-text').addClass('col-sm-10'); $('.profile-desc').find('img.avatar').removeClass('col-sm-2'); /* ============================================== Single Items =============================================== */ $('.items-single .woocommerce-main-image').find('img').removeAttr('width'); $('.items-single .woocommerce-main-image').find('img').removeAttr('height'); $('.items-single').find('.images').children('a').removeAttr('href'); /* ============================================== Review Form =============================================== */ $('.section-review').find('#author').attr('placeholder','Name *'); $('.section-review').find('#email').attr('placeholder','Email *'); $('.section-review').find('#comment').attr('placeholder','Review *'); $('.woocommerce .comment-reply-title').after('
'); /* ============================================== Related Products =============================================== */ $('.similar-product').find('.products').children('li').addClass('col-sm-6 col-md-3'); $('.similar-product').find('img').removeAttr('width'); $('.similar-product').find('img').removeAttr('height'); /* ============================================== Checkout Page =============================================== */ $('.col2-set').addClass('clearfix'); /* ============================================== Browser detection =============================================== */ if (navigator.userAgent.search("Firefox") >= 0) { $('.section-items').find('.h-product').css('outline','none'); } function yacht_remove_select(){ $('.woocommerce').find('select').css('background','none'); $('.input-text').css('line-height','5px'); } if(navigator.userAgent.match(/Trident\/7\./)) { yacht_remove_select(); } if (navigator.userAgent.search("MSIE") >= 0) { yacht_remove_select(); } });