PageSourceSearch

https://www.rekrute.com/assets/91d13da7/js/rubick_pres.js

js rekrute.com collected 2026-09-24 11:15:24 UTC 16,523 bytes, 456 lines download raw bytes

1var searchVisible = 0;
2var transparent = true;
3
4var transparentDemo = true;
5var fixedTop = false;
6
7var navbar_initialized = false;
8
9var big_image; 
10var scroll;
11var project_content;
12var $project;
13scroll = ( 2500 - $(window).width() ) / $(window).width();
14
15var $ScrollTop;
16var $ScrollBot;
17
18var pixels;
19
20var modal;
21var $project_content;
22
23var test = true;        
24
25var timerStart = Date.now();
26var delay;
27
28var no_of_elements = 0;
29var window_height;
30var window_width;
31
32var content_opacity = 0;
33var content_transition = 0;
34var no_touch_screen = false;
35
36var burger_menu;
37
38        
39$(document).ready(function(){
40    BrowserDetect.init();
41    
42    if(BrowserDetect.browser == 'Explorer' && BrowserDetect.version <= 9){
43        $('body').html(better_browser);   
44    }
45
46    window_width = $(window).width();
47    window_height = $(window).height();
48
49    burger_menu = $('nav').hasClass('navbar-burger') ? true : false;
50    
51    if (!Modernizr.touch){
52        $('body').addClass('no-touch');
53        no_touch_screen = true;
54    }
55    
56    rubik.initAnimationsCheck();
57    
58    // Init navigation toggle for small screens   
59    if(window_width < 979 || burger_menu){
60        rubik.initRightMenu();   
61    }
62
63    if(window_width < 979){
64        $('.over-area').each(function(){
65            var click = $(this).attr("onClick");
66            if(click == ''){
67                src = "rubik.showModal(this)";
68                $(this).attr("onClick", src);
69            }
70        });
71        
72        rubik.checkResponsiveImage();
73    } 
74    
75    
76    
77    if($('#contactUsMap').length != 0){
78        rubik.initGoogleMaps();   
79    }
80    
81    if($('.content-with-opacity').length != 0){
82        content_opacity = 1;
83    }
84
85});
86
87$(window).on('scroll',function(){
88   if(window_width > 980){
89        rubik.checkScrollForParallax();
90   }
91   
92   rubik.checkScrollForTransparentNavbar();    
93         
94});
95
96$(window).load(function(){
97    
98    //after the content is loaded we reinitialize all the waypoints for the animations
99    rubik.initAnimationsCheck();
100    
101});  
102
103//activate collapse right menu when the windows is resized 
104$(window).resize(function(){
105    if($(window).width() < 979){
106        rubik.initRightMenu();   
107    }
108    if($(window).width() > 979 && !burger_menu){
109        $('nav').removeClass('navbar-burger');
110        rubik.misc.navbar_menu_visible = 1;
111        navbar_initialized = false;
112    }
113});
114
115$('a[data-scroll="true"]').click(function(e){         
116    var scroll_target = $(this).data('id');
117    var scroll_trigger = $(this).data('scroll');
118    
119    if(scroll_trigger == true && scroll_target !== undefined){
120        e.preventDefault();
121        
122        $('html, body').animate({
123             scrollTop: $(scroll_target).offset().top - 50
124        }, 1000);
125    }
126                
127});
128
129    
130rubik = {
131    misc:{
132        navbar_menu_visible: 0
133    },
134    initAnimationsCheck: function(){
135        
136        $('[class*="add-animation"]').each(function(){
137           offset_diff = 30;
138           if($(this).hasClass('title')){
139               offset_diff = 110;
140           }
141           
142           var waypoints = $(this).waypoint(function(direction) {
143                if(direction == 'down'){
144                        $(this.element).addClass('animate');    
145                   } else {
146                       $(this.element).removeClass('animate');
147                   }
148                }, {
149                  offset: window_height - offset_diff
150           });
151        });
152  
153    },
154    initRightMenu: function(){  
155         if(!navbar_initialized){
156            $nav = $('nav');
157            $nav.addClass('navbar-burger');
158             
159            $navbar = $nav.find('.navbar-collapse').first().clone(true);
160            $navbar.css('min-height', window.screen.height);
161              
162            ul_content = '';
163             
164            $navbar.children('ul').each(function(){
165                content_buff = $(this).html();
166                ul_content = ul_content + content_buff;   
167            });
168             
169            ul_content = '<ul class="nav navbar-nav gw-nav gw-nav-list">' + ul_content + '</ul>';
170            $navbar.html(ul_content);
171             
172            $('body').append($navbar);
173                            
174            background_image = $navbar.data('nav-image');
175            if(background_image != undefined){
176                $navbar.css('background',"url('" + background_image 
176+ "')")
177                       .removeAttr('data-nav-image')
178                       .css('background-size',"cover")
179                       .addClass('has-image');                
180            }
181             
182            $toggle = $('.navbar-toggle');
183             
184            $navbar.find('a').removeClass('btn btn-round btn-default');
185            $navbar.find('button').removeClass('btn-round btn-fill btn-info btn-primary btn-success btn-danger btn-warning btn-neutral');
186            $navbar.find('button').addClass('btn-simple btn-block');
187
188            $link = $navbar.find('a');
189            
190            $link.click(function(e){
191                var scroll_target = $(this).data('id');
192                var scroll_trigger = $(this).data('scroll');
193                
194                if(scroll_trigger == true && scroll_target !== undefined){
195                    e.preventDefault();
196
197                    $('html, body').animate({
198                         scrollTop: $(scroll_target).offset().top - 50
199                    }, 1000);
200                }
201                
202             });
203
204            
205            $toggle.click(function (){    
206
207                if(rubik.misc.navbar_menu_visible == 1) {                    
208                    $('html').removeClass('nav-open'); 
209                    rubik.misc.navbar_menu_visible = 0;
210                    $('#bodyClick').remove();
211                     setTimeout(function(){
212                        $toggle.removeClass('toggled');
213                     }, 550);
214                
215                } else {
216                    setTimeout(function(){
217                        $toggle.addClass('toggled');
218                    }, 580);
219                    
220                    div = '<div id="bodyClick"></div>';
221                    $(div).appendTo("body").click(function() {
222                        $('html').removeClass('nav-open');
223                        rubik.misc.navbar_menu_visible = 0;
224                        $('#bodyClick').remove();
225                         setTimeout(function(){
226                            $toggle.removeClass('toggled');
227                         }, 550);
228                    });
229                   
230                    $('html').addClass('nav-open');
231                    rubik.misc.navbar_menu_visible = 1;
232                    
233                }
234            });
235            navbar_initialized = true;
236        }
237   
238    },
239
240    checkResponsiveImage: function(){
241        $('.section-header > div > img, .section-header video').each(function(){
242            var $image = $(this);
243            var src = $image.attr("responsive-src");
244    
245            if(!src){
246               src = $image.attr('src'); 
247            }
248    
249            div = '<div class="responsive-background" style="background-image:url(' + src + ')"/>';
250            $image.after(div);
251            $image.addClass('hidden-xs'); 
252        });
253    },  
254
255    checkScrollForTransparentNavbar: debounce(function() {
256                                    // > 560
257        	if($(document).scrollTop() < 0 ) {
258                if(transparent) {
259                    transparent = false;
260                    $('nav[role="navigation"]').removeClass('navbar-transparent');
261                }
262            } else {
263                if( !transparent ) {
264                    transparent = true;
265                    $('nav[role="navigation"]').addClass('navbar-transparent');
266                }
267            }
268    }, 17),
269    
270    checkScrollForParallax: debounce(function() {	
271
272        	no_of_elements = 0;
273        	$('.parallax').each(function() {
274        	    var $elem = $(this);
275        	    
276        	    if(isElementInViewport($elem)){
277                  var parent_top = $elem.offset().top;          
278                  var window_bottom = $(window).scrollTop();
279                  var $image = $elem.find('img')
280                              	  
281            	  oVal = ((window_bottom - parent_top) / 3);
282                  $image.css('transform','translate3d(0px, ' + oVal + 'px, 0px)');    
283        	    }
284            });
285    		
286    }, 6),
287    
288    checkScrollForContentTransitions: debounce(function() {
289         $('.content-with-opacity').each(function() {
290             var $content = $(this);
291             
292             if(isElementInViewport($content)){          
293                  var window_top = $(window).scrollTop();
294            	  opacityVal = 1 - (window_top / 230);
295                  
296                  if(opacityVal < 0){
297                      opacityVal = 0;
298                      return;
299                  } else {
300                    $content.css('opacity',opacityVal);    
301                  }
302                      
303        	    }            
304         });
305    }, 6),
306    
307    showModal: function(button){
308        var id = $(button).data('target');
309        var $project = $(button).closest('.project');
310        
311        var scrollTop = $(window).scrollTop();
312        var distanceTop = $project.offset().top;
313
314        var projectTop = distanceTop - scrollTop; 
315        var projectLeft = $project.offset().left;
316        var projectHeight = $project.innerHeight();
317        var projectWidth = $project.innerWidth();
318
319        modal = $('#' + id);
320
321        $(modal).css({
322         'top'  :    projectTop,
323         'left' :    projectLeft, 
324         'width' :   projectWidth,
325         'height' :  projectHeight,
326         'z-index'  : '1032'
327        });
328        
329        $(modal).addClass('has-background');
330        
331        setTimeout(function(){
332           $(modal).addClass('open');
333        },30);
334
335        setTimeout(function(){
336           $('body').addClass('noscroll');
337           $(modal).addClass('scroll');
338        },1000);
339    
340        $('.icon-close').click(function(){
341          $project_content = $(this).closest('.project-content');
342          $project_content.removeClass('open scroll');
343          
344          $('body').removeClass("noscroll");
345          //$('a').removeClass('no-opacity');
346            setTimeout(function(){
347                $project_content.removeClass('has-background');
348                setTimeout(function(){    
349                    $project_content.removeAttr('style');     
350                }, 450); 
351            },500);
352        });
353    },
354    
355    initGoogleMaps: function(){
356        var myLatlng = new google.maps.LatLng(44.433530, 26.093928);
357        
358        
359                
360        
361        var mapOptions = {
362          zoom: 14,
363          center: myLatlng,
364          scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
365          disableDefaultUI: true,
366          styles: [{"featureType":"administrative","elementType":"labels","stylers":[{"visibility":"on"},{"gamma":"1.82"}]},{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"gamma":"1.96"},{"lightness":"-9"}]},{"featureType":"administrative","elementType":"labels.text.stroke","stylers":[{"visibility":"off"}]},{"featureType":"landscape","elementType":"all","stylers":[{"visibility":"on"},{"lightness":"25"},{"gamma":"1.00"},{"saturation":"-100"}]},{"featureType":"poi.business","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi.park","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"hue":"#ffaa00"},{"saturation":"-43"},{"visibility":"on"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","elementType":"labels","stylers":[{"visibility":"simplified"},{"hue":"#ffaa00"},{"saturation":"-70"}]},{"featureType":"road.highway.controlled_access","elementType":"labels","stylers":[{"visibility":"on"}]},{"featureType":"road.arterial","elementType":"all","stylers":[{"visibility":"on"},{"saturation":"-100"},{"lightness":"30"}]},{"featureType":"road.local","elementType":"all","stylers":[{"saturation":"-100"},{"lightness":"40"},{"visibility":"off"}]},{"featureType":"transit.station.airport","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"gamma":"0.80"}]},{"featureType":"water","elementType":"all","stylers":[{"visibility":"off"}]}]
367        }
368        var map = new google.maps.Map(document.getElementById("contactUsMap"), mapOptions);
369        
370        var marker = new google.maps.Marker({
371            position: myLatlng,
372            title:"Hello World!"
373        });
374        
375        // To add the marker to the map, call setMap();
376        marker.setMap(map);
377    }
378
379}
380
381// Returns a function, that, as long as it continues to be invoked, will not
382// be triggered. The function will be called after it stops being called for
383// N milliseconds. If `immediate` is passed, trigger the function on the
384// leading edge, instead of the trailing.
385
386function debounce(func, wait, immediate) {
387	var timeout;
388	return function() {
389		var context = this, args = arguments;
390		clearTimeout(timeout);
391		timeout = setTimeout(function() {
392			timeout = null;
393			if (!immediate) func.apply(context, args);
394		}, wait);
395		if (immediate && !timeout) func.apply(context, args);
396	};
397};
398
399
400function isElementInViewport(elem) {
401    var $elem = $(elem);
402
403    // Get the scroll position of the page.
404    var scrollElem = ((navigator.userAgent.toLowerCase().indexOf('webkit') != -1) ? 'body' : 'html');
405    var viewportTop = $(scrollElem).scrollTop();
406    var viewportBottom = viewportTop + $(window).height();
407
408    // Get the position of the element on the page.
409    var elemTop = Math.round( $elem.offset().top );
410    var elemBottom = elemTop + $elem.height();
411
412    return ((elemTop < viewportBottom) && (elemBottom > viewportTop));
413}
414
415
416var BrowserDetect = {
417    init: function () {
418        this.browser = this.searchString(this.dataBrowser) || "Other";
419        this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "Unknown";
420    },
421    searchString: function (data) {
422        for (var i = 0; i < data.length; i++) {
423            var dataString = data[i].string;
424            this.versionSearchString = data[i].subString;
425
426            if (dataString.indexOf(data[i].subString) !== -1) {
427                return data[i].identity;
428            }
429        }
430    },
431    searchVersion: function (dataString) {
432        var index = dataString.indexOf(this.versionSearchString);
433        if (index === -1) {
434            return;
435        }
436
437        var rv = dataString.indexOf("rv:");
438        if (this.versionSearchString === "Trident" && rv !== -1) {
439            return parseFloat(dataString.substring(rv + 3));
440        } else {
441            return parseFloat(dataString.substring(index + this.versionSearchString.length + 1));
442        }
443    },
444
445    dataBrowser: [
446        {string: navigator.userAgent, subString: "Chrome", identity: "Chrome"},
447        {string: navigator.userAgent, subString: "MSIE", identity: "Explorer"},
448        {string: navigator.userAgent, subString: "Trident", identity: "Explorer"},
449        {string: navigator.userAgent, subString: "Firefox", identity: "Firefox"},
450        {string: navigator.userAgent, subString: "Safari", identity: "Safari"},
451        {string: navigator.userAgent, subString: "Opera", identity: "Opera"}
452    ]
453
454};
455
456var better_browser = '<div class="container"><div class="better-browser row"><div class="col-md-2"></div><div class="col-md-8"><h3>We are sorry but it looks like your Browser doesn\'t support our website Features. In order to get the full experience please download a new version of your favourite browser.</h3></div><div class="col-md-2"></div><br><div class="col-md-4"><a href="https://www.mozilla.org/ro/firefox/new/" class="btn btn-warning">Mozilla</a><br></div><div class="col-md-4"><a href="https://www.google.com/chrome/browser/desktop/index.html" class="btn ">Chrome</a><br></div><div class="col-md-4"><a href="http://windows.microsoft.com/en-us/internet-explorer/ie-11-worldwide-languages" class="btn">Internet Explorer</a><br></div><br><br><h4>Thank you!</h4></div></div>';

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.