PageSourceSearch

https://pcmania.bg/wp-content/themes/crystalskull/js/global.js?ver=7.1.2

js pcmania.bg collected 2026-10-02 06:16:57 UTC 9,458 bytes, 281 lines download raw bytes

1/******************** Woocommerce ***********************/
2function shopping_cart_dropdown() {
3    !jQuery(".widget_shopping_cart .widget_shopping_cart_content .cart_list .empty").length && jQuery(".widget_shopping_cart .widget_shopping_cart_content .cart_list").length > 0 && jQuery(".cart-menu-wrap").addClass("has_products")
4}
5
6function shopping_cart_dropdown_show(t) {
7    clearTimeout(timeout), !jQuery(".widget_shopping_cart .widget_shopping_cart_content .cart_list .empty").length && jQuery(".widget_shopping_cart .widget_shopping_cart_content .cart_list").length > 0 && "undefined" != typeof t.type && (jQuery(".container .cart-menu-wrap").hasClass("has_products") ? jQuery(".container .cart-notification").is(":visible") ? jQuery(".container .cart-notification").show() : jQuery(".container .cart-notification").fadeIn(400) : setTimeout(function() {
8        jQuery(".container .cart-notification").fadeIn(400)
9    }, 400), timeout = setTimeout(hideCart, 2700))
10}
11
12function hideCart() {
13    jQuery(".container .cart-notification").stop(!0, !0).fadeOut()
14}
15
16jQuery.noConflict(), jQuery(document).ready(function() {
17    "use strict";
18    var t = jQuery(".comment-body .comment-reply-link");
19    t.addClass("button-small")
20}),
21
22jQuery.browser = {};
23(function () {
24    jQuery.browser.msie = false;
25    jQuery.browser.version = 0;
26    if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
27        jQuery.browser.msie = true;
28        jQuery.browser.version = RegExp.$1;
29    }
30})();
31
32/******************** Menu ***********************/
33jQuery(document).ready(function() {
34    "use strict";
35    var t = jQuery("ul.sub-menu");
36    t.parent().addClass("dropdown"), t.addClass("dropdown-menu");
37    var e = jQuery("dropdown-menu.children");
38    e.parent().addClass("dropdown"), e.addClass("dropdown-menu");
39    var r = jQuery("dropdown-menu.children");
40    r.parent().addClass("dropdown");
41    var o = jQuery(".menu ul");
42    o.parent().addClass("dropdown");
43    var i = jQuery(".dropdown .dropdown-menu");
44    i.removeClass("children");
45    var n = jQuery(".dropdown > a br");
46    n.before('<b class="caret"></b>'), r.hover(function() {
47        jQuery(this).parent().addClass("active")
48    }, function() {
49        jQuery(this).parent().removeClass("active")
50    }), t.hover(function() {
51        jQuery(this).parent().addClass("active")
52    }, function() {
53        jQuery(this).parent().removeClass("active")
54    });
55    var a = jQuery(".menu ul");
56    a.addClass("nav"), e.removeClass("nav")
57})
58
59jQuery.noConflict(), jQuery(function() {
60    "use strict";
61    jQuery("[data-toggle=tooltip]").tooltip()
62}),
63
64jQuery.noConflict();
65var wgtitle = jQuery(".widget .title-wrapper");
66wgtitle.each(function() {
67    "use strict";
68    var t = jQuery('.widget ul li .bbp-forum-title[href*="topic"]'),
69        e = jQuery('.widget ul li .bbp-forum-title:not([href*="topic"])');
70    t.prepend('<i class="fas fa-comment"></i>'), e.prepend('<i class="fas fa-comments"></i>');
71    var r = jQuery('.footer_widget ul li .bbp-forum-title[href*="topic"]'),
72        o = jQuery('.footer_widget ul li .bbp-forum-title:not([href*="topic"])');
73    r.prepend('<i class="fas fa-comment"></i>'), o.prepend('<i class="fas fa-comments"></i>')
74});
75
76
77var bbip = jQuery(".bbp-author-ip");
78bbip.remove();
79
80/******************** Web ticker ***********************/
81var ticker = jQuery("#webticker");
82ticker.webTicker();
83
84/******************** Tabs ***********************/
85 jQuery(document).ready(function() {
86    "use strict";
87    var t = jQuery(".tab-inner");
88    if (0 !== t.length) {
89        var e = jQuery('.tab-inner a[href="#tab-1"]').parent().index();
90        t.tabs().tabs("option", "active", e)
91    }
92})
93
94/******************** Contact form ***********************/
95jQuery(document).ready(function(t) {
96    "use strict";
97    var e = t("#contactForm");
98    e.validate();
99});
100
101/******************** Search form ***********************/
102var src = jQuery("#sform i.fa");
103var src_input = jQuery("#sform input[type=search]");
104var src_all = jQuery("#sform input[type=search], #sform i.fa");
105src_all.click(function() {
106src_input.css('width', '130px');
107src_input.css('color', '#000');
108src_input.css('padding-left', '32px');
109src_input.css('border', '0px');
110src_input.css('cursor', 'auto');
111src_input.css('background-color', '#202126');
112});
113
114jQuery('#sform').bind( "clickoutside", function(event){
115src_input.css('width', '3px');
116src_input.css('padding', '9px 18px 8px 18px');
117src_input.css('border', '0px solid transparent');
118src_input.css('cursor', 'pointer');
119src_input.css('background-color', '');
120src_input.val('');
121});
122
123
124/******************** Isotope blog ***********************/
125var blog = jQuery(".page-template-tmp-blog-isotope, .archive");
126if(blog.length != 0){
127// Modified Isotope methods for gutters in masonry
128
129jQuery.Isotope.prototype._getMasonryGutterColumns = function() {
130	var gutter = this.options.masonry && this.options.masonry.gutterWidth || 0;
131	containerWidth = this.element.width();
132
133	this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth ||
134	// Or use the size of the first item
135	this.jQueryfilteredAtoms.outerWidth(true) ||
136	// If there's no items, use size of container
137	containerWidth;
138
139	this.masonry.columnWidth += gutter;
140
141	this.masonry.cols = Math.floor((containerWidth + gutter) / this.masonry.columnWidth);
142	this.masonry.cols = Math.max(this.masonry.cols, 1);
143};
144
145jQuery.Isotope.prototype._masonryReset = function() {
146	// Layout-specific props
147	this.masonry = {};
148	// FIXME shouldn't have to call this again
149	this._getMasonryGutterColumns();
150	var i = this.masonry.cols;
151	this.masonry.colYs = [];
152	while (i--) {
153		this.masonry.colYs.push(0);
154	}
155};
156
157jQuery.Isotope.prototype._masonryResizeChanged = function() {
158	var prevSegments = this.masonry.cols;
159	// Update cols/rows
160	this._getMasonryGutterColumns();
161	// Return if updated cols/rows is not equal to previous
162	return (this.masonry.cols !== prevSegments);
163};
164// modified Isotope methods for gutters in masonry
165if(jQuery.isFunction(jQuery.fn.imagesLoaded)){
166
167	//isotope
168	var containerblog = jQuery('.isoblog');
169
170	containerblog.imagesLoaded( function(){
171	// initialize Isotope
172	containerblog.isotope({
173		// options...
174		layoutMode : 'masonry',
175		resizable: false, // disable normal resizing
176		// set columnWidth to a percentage of container width
177		masonry: {
178			columnWidth: (containerblog.width() - 40) / 3,
179			gutterWidth: 20
180		}
181	});
182	});
183
184	// start new block
185	jQuery('.cat a').click(function(){
186		var selector = jQuery(this).attr('href');
187		containerblog.isotope({ filter: selector });
188		return false;
189	});
190	// end new block
191
192	// update columnWidth on window resize
193	jQuery(window).smartresize(function(){
194		//console.log(container.width());
195		// set the widths on resize
196		setWidthsBlog();
197		containerblog.isotope({
198			// update columnWidth to a percentage of container width
199			masonry: {
200				columnWidth: getUnitWidthBlog(),
201				gutterWidth: 20
202			}
203		});
204	}).resize();
205
206
207/*  Isotope utility GetUnitWidth
208    ========================================================================== */
209function getUnitWidthBlog() {
210	var width;
211	if (containerblog.width() <= 320) {
212		//console.log("320");
213		width = Math.floor((containerblog.width() - 20)  / 1);
214	} else if (containerblog.width() >= 321 && containerblog.width() <= 480) {
215		//console.log("321 - 480");
216		width = Math.floor((containerblog.width() - 20)  / 1);
217	} else if (containerblog.width() >= 481 && containerblog.width() <= 662) {
218		//console.log("481 - 768");
219		width = Math.floor((containerblog.width() - 20) / 1);
220	} else if (containerblog.width() >= 663 && containerblog.width() <= 768) {
221		//console.log("663 - 768");
222		width = Math.floor((containerblog.width() - 20)  / 2);
223	} else if (containerblog.width() >= 769 && containerblog.width() <= 979) {
224		//console.log("769 - 979");
225		width = Math.floor((containerblog.width() - 40)  / 3);
226	} else if (containerblog.width() >= 980 && containerblog.width() <= 1200) {
227		//console.log("980 - 1200");
228		width = Math.floor((containerblog.width() - 40)  / 3);
229	} else if (containerblog.width() >= 1201 && containerblog.width() <= 1600) {
230		//console.log("1201 - 1600");
231		width = Math.floor((containerblog.width() - 20)  / 5);
232	} else if (containerblog.width() >= 1601 && containerblog.width() <= 1824) {
233		//console.log("1601 - 1824");
234		width = Math.floor((containerblog.width() - 20)  / 8);
235	} else if (containerblog.width() >= 1825) {
236		//console.log("1825");
237		width = Math.floor((containerblog.width() - 20)  / 10);
238	}
239	return width;
240}
241
242
243/*  Isotope utility SetWidths
244    ========================================================================== */
245function setWidthsBlog() {
246	var unitWidth = getUnitWidthBlog() - 0;
247	containerblog.children(":not(.width2)").css({
248		width: unitWidth
249	});
250
251	if (containerblog.width() >= 321 && containerblog.width() <= 480) {
252		 //console.log("eccoci 321");
253		containerblog.children(".width2").css({
254			width: unitWidth * 1
255		});
256		containerblog.children(".width4").css({
257			width: unitWidth * 2
258		});
259		containerblog.children(".width6").css({
260			width: unitWidth * 3
261		});
262	}
263	if (containerblog.width() >= 481) {
264		 //console.log("480");
265		containerblog.children(".width6").css({
266			width: unitWidth * 4
267		});
268		containerblog.children(".width4").css({
269			width: unitWidth * 3
270		});
271		containerblog.children(".width2").css({
272			width: unitWidth * 2
273		});
274	} else {
275		containerblog.children(".width2").css({
276			width: unitWidth
277		});
278	}
279}
280
281}}

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.