PageSourceSearch

https://medispatechnology.ru/bitrix/templates/dresscodeV2/js/functions.js

js medispatechnology.ru collected 2026-09-28 22:53:34 UTC 3,109 bytes, 124 lines download raw bytes

1var $ = jQuery.noConflict();
2
3var SPATECHNOLOGY = SPATECHNOLOGY || {};
4
5(function($){
6
7	// USE STRICT
8	"use strict";
9
10	SPATECHNOLOGY.initialize = {
11
12		modal: function(){
13
14			if( !$().magnificPopup ) {
15				console.log('modal: Magnific Popup not Defined.');
16				return true;
17			}
18
19			var $modal = $('.modal-on-load:not(.customjs)');
20			if( $modal.length > 0 ) {
21				$modal.each( function(){
22					var element				= $(this),
23						elementTarget		= element.attr('data-target'),
24						elementTargetValue	= elementTarget.split('#')[1],
25						elementDelay		= element.attr('data-delay'),
26						elementTimeout		= element.attr('data-timeout'),
27						elementAnimateIn	= element.attr('data-animate-in'),
28						elementAnimateOut	= element.attr('data-animate-out');
29
30					if( !element.hasClass('enable-cookie') ) { Cookies.remove( elementTargetValue ); }
31
32					if( element.hasClass('enable-cookie') ) {
33						var elementCookie = Cookies.get( elementTargetValue );
34
35						if( typeof elementCookie !== 'undefined' && elementCookie == '0' ) {
36							return true;
37						}
38					}
39
40					if( !elementDelay ) {
41						elementDelay = 1500;
42					} else {
43						elementDelay = Number(elementDelay) + 1500;
44					}
45
46					var t = setTimeout(function() {
47						$.magnificPopup.open({
48							items: { src: elementTarget },
49							type: 'inline',
50							mainClass: 'mfp-no-margins mfp-fade',
51							closeBtnInside: true,
52							fixedContentPos: true,
53							removalDelay: 500,
54							callbacks: {
55								open: function(){
56									if( elementAnimateIn != '' ) {
57										$(elementTarget).addClass( elementAnimateIn + ' animated' );
58									}
59								},
60								beforeClose: function(){
61									if( elementAnimateOut != '' ) {
62										$(elementTarget).removeClass( elementAnimateIn ).addClass( elementAnimateOut );
63									}
64								},
65								afterClose: function() {
66									if( elementAnimateIn != '' || elementAnimateOut != '' ) {
67										$(elementTarget).removeClass( elementAnimateIn + ' ' + elementAnimateOut + ' animated' );
68									}
69									if( element.hasClass('enable-cookie') ) {
70										Cookies.set( elementTargetValue, '0' );
71									}
72								}
73							}
74						}, 0);
75					}, Number(elementDelay) );
76
77					if( elementTimeout != '' ) {
78						var to = setTimeout(function() {
79							$.magnificPopup.close();
80						}, Number(elementDelay) + Number(elementTimeout) );
81					}
82				});
83			}
84		
85		}
86
87	};
88
89	SPATECHNOLOGY.documentOnLoad = {
90
91		init: function(){
92			SPATECHNOLOGY.initialize.modal();
93		}
94
95	};
96
97	var $window = $(window);
98
99	$window.on( 'load', SPATECHNOLOGY.documentOnLoad.init );
100
101})(jQuery);
102
103function fbqAddToBasket(id) {
104	$.ajax({
105		url: '/ajax/productData.php',
106		method: 'post',
107		dataType: 'json',
108		data: {ID: id},
109		success: function(data){
110			console.log(data);
111			if (data && data.ID) {
112				fbq('track', 'AddToCart', {
113					content_type: 'product',
114					content_ids: [data.ID],
115					content_name: data.NAME,
116					content_category: data.CATALOG_NAME,
117					value: data.PRICE["RESULT_PRICE"]["DISCOUNT_PRICE"],
118					currency: data.PRICE["RESULT_PRICE"]["CURRENCY"]
119				});
120			}
121		}
122	});
123	return false;
124}

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.