PageSourceSearch

https://heliandco.com/Instances/Front/Content/Framework/Scripts/fl…?886b177e7b45b6e3c3c03fe85c92e3da

js heliandco.com collected 2026-10-06 20:20:45 UTC 4,534 bytes, 213 lines download raw bytes

1scrollSwitch = function (offset, className)
2{
3	'use strict';
4
5	var self= $('body'),
6		scroll = '';
7
8	$(window).scroll(function()
9	{
10		scroll = $(window).scrollTop();
11		if (scroll >= offset && !self.hasClass(className)) 
12		{
13			self.addClass(className);
14		}
15		else if (scroll < offset && self.hasClass(className))
16		{
17			self.removeClass(className);
18		}
19	});
20}
21
22
23
24$.fn.thumbCenterImage = function () {
25    'use strict';
26
27    var global = $(this);
28
29    $(this).each(function () {
30    	var self = $(this),
31    		url = self.attr('src');
32
33    	self.wrap('<div class="img" style="background-image: url(\'' + url + '\')"></div>');
34    	self.hide();
35
36    });
37
38}
39
40jQuery.cachedScript = function( url, options ) {
41 
42  // Allow user to set any option except for dataType, cache, and url
43  options = $.extend( options || {}, {
44    dataType: "script",
45    cache: true,
46    url: url
47  });
48 
49  // Use $.ajax() since it is more flexible than $.getScript
50  // Return the jqXHR object so we can chain callbacks
51  return jQuery.ajax( options );
52};
53
54
55var modulesMap = {
56	SalesStep1Ctrl : 'flexocms.salesCtrl',
57	OneStepCheckoutCtrl : 'flexocms.salesCtrl'
58}
59
60
61function moduleLoader(module, callback)
62{
63	try {
64		callback();
65	}
66	catch(e) 
67	{
68		$.cachedScript( syn.application_path + '/Instances/Front/Content/Framework/Scripts/'+modulesMap[module]+'.js' ).done(function( script, textStatus ) {
69          callback();
70        });
71	}
72}
73
74$.fn.beautifullLists = function()
75  {
76    $(this).each(function()
77    {
78      var $self = $(this),
79        $items = $self.find('.item');
80
81      function apply()
82      {
83        var groups = new Array(),
84            offset = 0,
85            lineLenght = 0;
86            i = -1;
87
88        $items.each(function()
89        {
90          var $self = $(this),
91              thisOffset = $self.offset().top;
92
93          if (thisOffset != offset && i <= 0 || groups[i].length <= groups[0].length) {
94            groups[++i] = new ItemsGroup();
95            if (groups[i - 1]) {
96              groups[i - 1].calcHeight();
97            };
98          }
99
100          groups[i].addItem($self);
101
102          if (thisOffset != offset)
103          {
104            offset = thisOffset;
105          }        
106        });
107
108        console.log(groups);
109      }
110
111      apply();
112
113     $(window).smartresize(function()
114      {
115        apply();
116      });
117
118    });
119
120    return this;
121  }
122
123  /* centerInParent
124den n.pirotte @synchrone
125dependency : jQuery*/
126
127;(function()
128{
129  'use strict';
130
131  console.log('ok');
132
133  $.fn.centerInParent = function()
134  {
135    this.each(function()
136    {
137      var 
138        $self = $(this),
139        $parent = $self.closest('.banner');
140
141      repos($self, calcOffset($self, $parent));
142
143      $(window).smartresize(function(){
144        repos($self, calcOffset($self, $parent));
145      });
146
147      return this;
148    });
149
150    return this;
151  }
152
153  function calcOffset($element, $parent)
154  {
155    var element = $('.flexslider .flex-active-slide .text'),
156        elementHeight = 261,
157        parentHeight = $parent.innerHeight();
158
159    console.log(parentHeight);
160
161    return parentHeight*0.5 - elementHeight*0.5;
162  }
163
164  function repos($element, offset)
165  {
166    $element.css('top', offset + 'px' );
167    return $element;
168  }
169
170})();
171
172
173;(function($,sr){
174
175  // debouncing function from John Hann
176  // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
177  var debounce = function (func, threshold, execAsap) {
178      var timeout;
179
180      return function debounced () {
181          var obj = this, args = arguments;
182          function delayed () {
183              if (!execAsap)
184                  func.apply(obj, args);
185              timeout = null;
186          };
187
188          if (timeout)
189              clearTimeout(timeout);
190          else if (execAsap)
191              func.apply(obj, args);
192
193          timeout = setTimeout(delayed, threshold || 100);
194      };
195  }
196  // smartresize 
197  jQuery.fn[sr] = function(fn){  return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
198
199})(jQuery,'smartresize');
200
201
202
203// generate a guid
204
205function generateUUID(){
206    var d = new Date().getTime();
207    var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
208        var r = (d + Math.random()*16)%16 | 0;
209        d = Math.floor(d/16);
210        return (c=='x' ? r : (r&0x7|0x8)).toString(16);
211    });
212    return uuid;
213};

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.