1 2 3"use strict"; 4 5/* Custom Classes Funtions */ 6function renameUiClasses(){ 7 var classes = [ 8 "ui-accordion", 9 "ui-accordion-header", "ui-accordion-header-active", "ui-corner-top", "ui-accordion-icons", 10 "ui-accordion-header-icon", "ui-icon", "ui-icon-triangle-1-s", "ui-icon-triangle-1-e", "ui-accordion-content-active", "ui-accordion-content", 11 "ui-tabs", "ui-widget", "ui-tabs-vertical", "ui-tabs-horizontal", 12 "ui-tabs-nav", "ui-helper-reset", "ui-helper-clearfix", "ui-widget-header", "ui-corner-all", 13 /*"ui-state-default",*/ "ui-tabs-active", /*"ui-state-active",*/ "ui-corner-left", /*"ui-tabs-anchor",*/ 14 "ui-tabs-panel", "ui-widget-content", "ui-corner-bottom", "ui-corner-all" 15 ]; 16 jQuery.each(classes, function(k, v){ 17 var nClass = v.replace("ui-", "ait-"); 18 jQuery(".elm-toggles-main ."+v).removeClass(v).addClass(nClass); 19 }); 20} 21 22function removeUnwantedClasses(){ 23 if(isResponsive(1024)){ 24 if(jQuery("body").hasClass("preloading-enabled")){ 25 jQuery("body").removeClass("preloading-enabled"); 26 } 27 } 28} 29/* Custom Classes Funtions */ 30 31/* Plugins Init Functions */ 32function initWPGallery(){ 33 jQuery(".gallery").each(function(){ 34 var rel = jQuery(this).attr('id'); 35 jQuery(this).find('.gallery-item').each(function(){ 36 var link = jQuery(this).find('a'); 37 link.attr('rel', rel); 38 link.colorbox({rel: rel}); 39 }); 40 }); 41} 42 43function initColorbox(){ 44 jQuery('a:not(.disable-default-colorbox)[href*=".jpg"],a:not(.disable-default-colorbox)[href*=".jpeg"],a:not(.disable-default-colorbox)[href*=".png"],a:not(.disable-default-colorbox)[href*=".gif"]').each(function(){ 45 //jQuery('a[href*=".jpg"],a[href*=".jpeg"],a[href*=".png"],a[href*=".gif"]').each(function(){ 46 if(typeof jQuery(this).attr('data-rel') === "undefined" || jQuery(this).attr('data-rel') === false || typeof jQuery(this).attr('rel') === "undefined" || jQuery(this).attr('rel') === false){ 47 if(!isMobile() || jQuery(this).parent().hasClass("woocommerce-product-gallery__image")){ 48 jQuery(this).colorbox({ 49 maxWidth: "95%", 50 maxHeight: "95%", 51 onOpen: true, 52 onClosed: true, 53 }); 54 } else { 55 jQuery(this).on('click', function(e){e.preventDefault();}) 56 /*jQuery(this).colorbox({ 57 maxWidth: "150%", 58 maxHeight: "150%", 59 onOpen: true, 60 onClosed: true, 61 });*/ 62 } 63 } 64 }); 65} 66 67function initRatings(){ 68 jQuery('.item-rating').raty({ 69 font : true, 70 readOnly : true, 71 halfShow : true, 72 starHalf : 'fa-star-half-o', 73 starOff : 'fa-star-o', 74 starOn : 'fa-star', 75 score : function(){ 76 return ((5*jQuery(this).attr('data-rating'))/100); 77 } 78 }); 79} 80 81function initInfieldLabels(){ 82 jQuery('.comment-form label').inFieldLabels(); 83} 84 85function initSelectBox(){ 86 jQuery('.selectbox').selectbox(); 87 88 var selectId; 89 var oldStyle; 90 if(jQuery('body').hasClass('woocommerce-page')){ 91 // wocommerce pages 92 // get all selects except the ones in the content 93 jQuery('select:not(.default-disabled)').not('#content select:not(.default-disabled)').selectbox({ 94 onOpen: function(inst){ 95 selectId = inst.settings.classHolder+"_"+inst.uid; 96 jQuery("#"+selectId).attr('style', 'z-index: 100 !important'); 97 }, 98 onClose: function(inst){ 99 jQuery("#"+selectId).delay(100).queue(function(next){ 100 jQuery(this).removeAttr("style"); 101 next(); 102 }); 103 } 104 }); 105 106 jQuery('#content .woocommerce-tabs select#rating').selectbox({ 107 onOpen: function(inst){ 108 selectId = inst.settings.classHolder+"_"+inst.uid; 109 jQuery("#"+selectId).attr('style', 'z-index: 100 !important'); 110 }, 111 onClose: function(inst){ 112 jQuery("#"+selectId).delay(100).queue(function(next){ 113 jQuery(this).removeAttr("style"); 114 next(); 115 }); 116 } 117 }); 118 } else { 119 // all other pages 120 jQuery('select:not(.default-disabled)').selectbox({ 121 onOpen: function(inst){ 122 selectId = inst.settings.classHolder+"_"+inst.uid; 123 jQuery("#"+selectId).attr('style', 'z-index: 100 !important'); 124 }, 125 onClose: function(inst){ 126 jQuery("#"+selectId).delay(100).queue(function(next){ 127 jQuery(this).removeAttr("style"); 128 next(); 129 }); 130 } 131 }); 132 } 133} 134 135function notificationClose(){ 136 jQuery('.ait-sc-notification a.close').click(function(e){ 137 e.preventDefault(); 138 jQuery(this).parent().fadeOut('slow'); 139 }); 140} 141/* Plugins Init Functions */
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.