PageSourceSearch

https://espritgames.ru/wp-content/themes/espritgames/js/mobile_only.js?ver=20231031_1&osdk_ver=20260922_1

js espritgames.ru collected 2026-10-01 14:11:59 UTC 34,376 bytes, 984 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function(){
2	setTimeout(function() { 
3		jQuery("body").addClass("fullload");
4	}, 1000);
5});
6
7
8
9( function( $ ) {
10	$("body").attr("data-lwch", $(window).width());
11	$(window).on( "orientationchange", function(event) {
12		//$("body").fadeOut(1);
13		setTimeout(function() { 
14			var lvch = $("body").data("lwch");
15			if($(window).width() < 961 && lvch > 960){
16				location.reload();
17				//console.log("111111");
18			}
19			if($(window).width() > 960 && lvch < 961){
20				location.reload();
21				//console.log("222222");
22			}
23			//console.log($(window).width());
24		}, 400);
25	});
26
27	var userDevice = [
28	  {device: 'Android', platform: /Android/},
29	  {device: 'iPhone', platform: /iPhone/},
30	  {device: 'iPad', platform: /iPad/},
31	  {device: 'Symbian', platform: /Symbian/},
32	  {device: 'Windows Phone', platform: /Windows Phone/},
33	  {device: 'Tablet OS', platform: /Tablet OS/},
34	  {device: 'Linux', platform: /Linux/},
35	  {device: 'Windows', platform: /Windows NT/},
36	  {device: 'Macintosh', platform: /Macintosh/}
37	];
38
39	var platform = navigator.userAgent;
40
41	function getPlatform(){
42		var shw_hide = 0;
43		for (var i in userDevice) {
44			if (userDevice[i].platform.test(platform)){
45				if(userDevice[i].device == "iPad" || userDevice[i].device == "iPhone" || userDevice[i].device == "Macintosh") {
46					shw_hide = shw_hide + 1;
47				}
48			}
49		}
50		if (shw_hide > 0){
51			$(".outer_stores").each(function(){
52				$(this).addClass("shwios");
53			});
54			$("#main").addClass("iosfnt");
55		}else{
56			$(".outer_stores").each(function(){
57				$(this).removeClass("shwios");
58			});
59			$("#main").removeClass("iosfnt");
60		}
61		if (shw_hide > 0){
62			//console.log("^%&^%@&%$");
63		}
64	}
65	function scl_about(){
66        var ww = $(window).width();
67        var page_w = 1080;
68        if (ww <= 1080) {
69            var scl = ww/page_w;
70            var bh = $("#main").height();
71            $("#main").attr("style","position: relative; overflow-x: hidden; transform-origin: 0 0;width: "+page_w+"px;max-width: "+page_w+"px;min-width: "+page_w+"px;-moz-transform: scale("+scl+");-ms-transform: scale("+scl+");-webkit-transform: scale("+scl+");-o-transform: scale("+scl+");transform: scale("+scl+");");
72            var hh = bh*scl;
73            $("#page").height(hh);
74        }else{
75            $("#main").removeAttr("style");
76            $("#page").removeAttr("style");
77        }
78    }
79	function scl_w(){
80        var ww = $(window).width();
81        var page_w = 1080;
82        if (ww <= 1080) {
83            var scl = ww/page_w;
84            var bh = $("#espritauthwidget_main").height();
85            $("#espritauthwidget_main").attr("style","position: relative; overflow-x: hidden; transform-origin: 0 0;width: "+page_w+"px;max-width: "+page_w+"px;min-width: "+page_w+"px;-moz-transform: scale("+scl+");-ms-transform: scale("+scl+");-webkit-transform: scale("+scl+");-o-transform: scale("+scl+");transform: scale("+scl+");");
86            var hh = bh*scl;
87            $("#primary").height(hh);
88        }else{
89            $("#espritauthwidget_main").attr("style", "width: 628px; height: 780px; position: relative;");
90        }
91    }
92    function scl_blcks_tomax(){
93    	var ww = $(window).width();
94    	var bh = $("#frontpage-games").height();
95
96    	if (ww >= 600){
97    		ww = 600;
98    	}
99    	var frontpagegames = page_w + "px;";
100 		frontpagegames = "100vw";
101        var page_w = 374;
102        var scl = ww/page_w;
103        //console.log(scl);
104        var hh = (bh*scl)+42;
105        if ($(window).width() >= 320 && $(window).width() <= 960) {
106        	$("#frontpage-games").parent(".textwidget").attr("style","height: "+hh+"px; overflow: hidden;");
107        	$("#frontpage-games").attr("style","position: relative; overflow: hidden; transform-origin: center 0;width: "+frontpagegames+";max-width: "+frontpagegames+";min-width: "+frontpagegames+";-moz-transform: scale("+scl+");-ms-transform: scale("+scl+");-webkit-transform: scale("+scl+");-o-transform: scale("+scl+");transform: scale("+scl+");");
108        	// overflow-x: hidden;
109        }else{
110        	$("#frontpage-games").removeAttr("style");
111        	$("#frontpage-games").parent(".textwidget").removeAttr("style");
112        }
113    }
114
115    function scl_blcks_tomin(){
116    	var ww = $(window).width();  
117    	var header_main = $(".header-main").height();
118
119        var page_w = 1080;
120        var scl = ww/page_w;
121        //console.log(scl);
122        if (ww <= 1080) {
123        	/*
124        	var extmenubtn_l = 1080 - 148;
125        	var umith = 148;
126        	var umittf = 60;
127
128        	var umith = umith*scl;
129        	var umittf = umittf*scl;
130        	var extmenubtn_l = extmenubtn_l*scl;
131
132        	$("#masthead").find(".ubermenu").find(".ubermenu-item").each(function(){
133        		$(this).attr("style","height: "+umith+"px;");
134        		$(this).find(".ubermenu-target").attr("style","font-size: "+umittf+"px;");
135
136        	});
137        	*/
138
139        	//$("body").find(".extmenubtn").attr("style","left: "+extmenubtn_l+"px;");
140        	//$("body").find(".extmenubtn").attr("style","transform-origin: 0 0;-moz-transform: scale("+scl+");-ms-transform: scale("+scl+");-webkit-transform: scale("+scl+");-o-transform: scale("+scl+");transform: scale("+scl+");");
141       		//$(".header-main").attr("style","width: 100%; height: "+hh+"px;");
142       		
143        }else{
144        	/*
145        	//$("body").find(".extmenubtn").removeAttr("style");
146        	$("#masthead").find(".ubermenu").find(".ubermenu-item").each(function(){
147        		$(this).removeAttr("style");
148        		$(this).find(".ubermenu-target").removeAttr("style");
149        	});
150        	*/
151        }
152    }
153
154    function overthis_size(){
155    	getPlatform();
156
157    	var overthis = $("#frontpage-games").find(".overthis");
158    	if ($(overthis).length > 0){
159
160
161
162				var ww = $(window).width(); 
163				var wh = $(window).height(); 
164				if (ww >= 600){
165					ww = 600;
166				}
167				
168				//var wh_scl = (wh/(ww/374)) - ($(".header-main").height()/1.4);
169				var wh_scl = $(window).height() - $(".header-main").height();
170				wh_scl = wh_scl/(ww/374);
171				//sub_outer = sub_outer*($(window).height()/1024);
172
173				
174				var scl_scr = ww/1080;
175				scl_scr = scl_scr*148;
176				
177
178				$(overthis).attr("style", "height: "+wh_scl+"px; min-height: "+wh_scl+"px;");
179
180				//setTimeout(function() { 
181					var scl = $(window).width()/374;
182					var outer_stores_h = $(overthis).find(".outer_stores").height();
183					var crct = 24;
184					if (ww >= 620){
185			        	//var outer_stores_scl = 620/ww;
186			        	//$(overthis).find(".outer_stores").attr("style","transform-origin: center bottom;-moz-transform: scale("+outer_stores_scl+");-ms-transform: scale("+outer_stores_scl+");-webkit-transform: scale("+outer_stores_scl+");-o-transform: scale("+outer_stores_scl+");transform: scale("+outer_stores_scl+");");
187			       		//outer_stores_h = outer_stores_h*outer_stores_scl;
188			       		//crct = 0;
189			        }
190					var sub_outer = wh_scl - crct - outer_stores_h;
191					$(overthis).find(".sub_outer").attr("style", "height: "+sub_outer+"px;");
192				//}, 400);
193
194				//var scl = jQuery(window).width()/374;
195				//console.log(jQuery(".overthis").find(".outer_stores").height()*scl);
196				//console.log(jQuery(".overthis").find(".outer_stores").height()*scl);
197
198
199
200				$("#frontpage-games").addClass("onegame");
201				//console.log($(overthis).offset().top);
202				//$("#frontpage-games").parent(".textwidget").attr("style","height: "+wh+"px; overflow: hidden;");
203				setTimeout(function() { 
204					$('html, body').animate({scrollTop: $(overthis).offset().top - $(".header-main").height()},2);
205				}, 200);
206				
207				//$('html, body').animate({scrollTop: $(overthis).offset().top-scl_scr},2);
208				$('html').addClass("hold");
209
210				//setTimeout(function() {
211				//}, 600);
212
213
214    	}
215    }
216    
217
218	function mob_to_mob(){
219		if ($(window).width() <= 960) {
220			$("#frontpage-games").find(".hover_name").each(function(){
221				if ($(this).text().length >= 18) {
222					$(this).addClass("hover_name_long");
223				}
224			});
225			/* отключение ссылок */
226			/*
227			$("#frontpage-games").find(".ttl_link").each(function(){
228				$(this).removeAttr("href");
229			});
230			$("#frontpage-games").find(".hover_name").each(function(){
231				$(this).attr("data-href",$(this).attr("href"));
232				$(this).removeAttr("href");
233			});
234			*/
235			/* отключение ссылок */
236
237			//overthis_size();
238
239			/* переход внутрь карточки */
240			/*
241			$("#frontpage-games").find(".ttl_link").click(function(){
242
243				var overthis = $(this).parent("li");
244				$("html").addClass("owg");
245				$("body").addClass("owg");
246				$("body").addClass("backarrow");
247				$(overthis).addClass("slds3");
248				$(overthis).addClass("overthis");
249				setTimeout(function() { 
250					$(overthis).removeClass("slds3");
251					$("html").removeClass("owg");
252					$("body").removeClass("owg");
253				}, 800);
254
255				setTimeout(function() { 
256					$(overthis).find(".ardown").addClass("harwdn");
257				}, 4000);
258
259				overthis_size();
260
261			});
262
263
264			$("#frontpage-games").find(".hover_name").click(function(){
265				//console.log("#!##!!##!");
266				var overthis = $(this).parents("li");
267				$("html").addClass("owg");
268				$("body").addClass("owg");
269				$("body").addClass("backarrow");
270				$(overthis).addClass("slds3");
271				$(overthis).addClass("overthis");
272				setTimeout(function() { 
273					$(overthis).removeClass("slds3");
274					$("html").removeClass("owg");
275					$("body").removeClass("owg");
276				}, 800);
277
278				setTimeout(function() { 
279					$(overthis).find(".ardown").addClass("harwdn");
280				}, 4000);
281
282				overthis_size();
283
284			});
285			*/
286			/* переход внутрь карточки */
287
288			//$(".g_back_btn").click(function(){
289				//$(".backarrow").find("#main").find(".overthis").find(".ttl_link").click();
290			//});
291
292			function backarrow(){
293				if (!$("body").hasClass("home-page")){
294					history.back();
295				}
296
297				var ww = $(window).width(); 
298				var scl_scr = ww/1080;
299				scl_scr = scl_scr*148;
300
301				var overthis = $("#main").find("#frontpage-games").find(".overthis");
302				//var overthis = $(this).parent("li");
303
304				$(overthis).addClass("slds3");
305				$("html").addClass("owg");
306				$("body").addClass("owg");
307				$(overthis).removeClass("overthis");
308				$(overthis).removeAttr("style");
309				$(overthis).find(".sub_outer").removeAttr("style");
310				$(overthis).find(".outer_stores").removeAttr("style");
311				$(overthis).find(".ardown").removeClass("harwdn");
312				$("#frontpage-games").removeClass("onegame");
313				$('html, body').animate({scrollTop: $(overthis).offset().top-scl_scr},2);
314				$('html').removeClass("hold");
315				scl_blcks_tomax();
316				setTimeout(function() { 
317					$(overthis).removeClass("slds3");
318					$("html").removeClass("owg");
319					$("body").removeClass("owg");
320				}, 100);
321
322			}
323
324			$("#frontpage-games").find(".toback").click(function(){
325				backarrow();
326			});
327
328			$("#g_back_btn").click(function(){
329				$("body").removeClass("backarrow");
330				backarrow();
331			});
332
333			var languages_footer = $('#languages_footer')[0].outerHTML;
334			$('#languages_footer').remove();
335			$("#masthead").find(".header-main").append(languages_footer);
336			
337			/*var languages_footer = $(".ubermenu").find(".lang_menu_top").find("#languages_footer").html();
338			$(".ubermenu").find(".lang_menu_top").find("#languages_footer").addClass("nshw");
339			$("#masthead").find(".header-main").append("<div id='languages_footer'>"+languages_footer+"</div>");*/
340
341			$("#masthead").find(".header-main").find("#languages_footer").click(function(){
342				if ($(this).hasClass("act")) {
343					$(this).removeClass("act");
344				}else{
345					$(this).addClass("act");
346				}
347			});
348			
349			//$("#activity-stream").find(".activity-avatar").find(".avatar").attr("src");
350			//if ($(".miniavatar")) {}
351			//$("#activity-stream").find(".activity-content").find(".activity-header").prepend("<img src='"+rep_ava+"' class='miniavatar' width='50' height='50'>");
352		}else{
353			var languages_footer = $('#languages_footer')[0].outerHTML;
354			$('#languages_footer').remove();
355			$("#masthead").find(".header-main").find(".lang_menu_top").append(languages_footer);
356
357		}
358	}
359	function miniavatar(){
360		//var rep_ava = $("#item-header-cover-image").find("#item-header-avatar").find(".avatar").attr("src");	
361		$("#activity-stream").find(".activity-item").each(function(){
362			var rep_ava = $(this).find(".activity-avatar").find(".avatar").attr("src");
363			if($(this).find(".activity-content").find(".activity-header").find(".miniavatar").length == "0"){
364				$(this).find(".activity-content").find(".activity-header").prepend("<img class='miniavatar' src='"+rep_ava+"' width='50' height='50'>");
365			}
366		});
367	}
368	function profilemenu(){
369		var outerprofilemenu = $('.outerprofilemenu')[0].outerHTML;
370		$('.outerprofilemenu').remove();
371		$(".header-main").find(".ubermenu").prepend(outerprofilemenu);
372		var extmenubtn = $(".extmenubtn").width();
373		if (extmenubtn <= 50){
374			extmenubtn = 64;
375		}
376
377			var extcss_test = "-";
378			/*
379			if (extcss == "extcss"){
380				//extcss_test = "-";
381			}else{
382				//extcss_test = "+";
383			}*/
384
385		$(".header-main").find('.outerprofilemenu').attr("style","width: calc(100% - "+extmenubtn+"px);padding-left: "+extmenubtn+"px;");
386		//$(".header-main").find('.outerprofilemenu').next(".ubermenu-nav").attr("style", "padding-left: "+extmenubtn+"px;");
387		$(".header-main").find('.outerprofilemenu').next(".ubermenu-nav").attr("style", "width: calc(100% "+extcss_test+" "+extmenubtn+"px);");
388		
389		var picprofile = (extmenubtn*2)+extmenubtn/2;
390		$(".header-main").find('.outerprofilemenu').find('.picprofile').attr("style","width: "+picprofile+"px; height:"+picprofile+"px; margin-top: "+extmenubtn+"px;");
391
392		if ($(window).width() <= 960) {
393			$('.outerprofilemenu').removeClass("nshw");
394		}else{
395			if (!$('.outerprofilemenu').hasClass("nshw")) {
396				$('.outerprofilemenu').addClass("nshw");
397			}
398		}
399		if ($("body").hasClass("bbpress") && $("#buddypress").find("#item-header-content").find(".user-nicename").length >= 0){
400			var unname = $("#content").find("h1.entry-title").text();
401			$("#buddypress").find("#item-header-content").find(".user-nicename").html(unname);
402			$("#xprofile-personal-li").find("#user-xprofile").text("Изменить профиль");
403		}
404	}
405	function menuhover_big(){
406		if ($(window).width() >= 961) {
407			$("body").mouseover(function(event){
408				var languages_footer = event.target;
409				//console.log(languages_footer);
410				if ($(languages_footer).attr("id") == "languages_footer" || $(languages_footer).parents("div").attr("id") == "languages_footer"){
411					$("body").find("#languages_footer").find(".that_l").each(function(){
412						if(!$(this).hasClass("act")){
413							$(this).addClass("act");
414						}					
415					});
416					if(!$("body").find("#languages_footer").find(".now_l").hasClass("act")){
417						$("body").find("#languages_footer").find(".now_l").addClass("act");
418					}
419				}else{
420					$("body").find("#languages_footer").find(".that_l").each(function(){
421						$(this).removeClass("act");
422					});
423					$("body").find("#languages_footer").find(".now_l").removeClass("act");
424				}
425
426			});
427		}else{
428			$("body").click(function(){
429				$("body").find("#languages_footer").find(".that_l").each(function(){
430					$(this).removeClass("act");
431				});
432				$("body").find("#languages_footer").find(".now_l").removeClass("act");
433			});
434		}
435	}
436	function game_btn_menu(){
437		if ($(window).width() <= 960) {
438			$("#menu-item-6312").find("#invader-games-list").attr("href","/");
439		}else{
440			$("#menu-item-6312").find("#invader-games-list").removeAttr("href");
441		}
442    }
443    function scl_bbpress(){
444        var ww = $(window).width();
445        var page_w = 600;
446        if (ww <= 960) {
447        	if ($("#buddypress").length >= "0" && $("body").hasClass("buddypress")) {
448
449	            //$("head").find("meta[name=viewport]").attr("content","width="+ww+", initial-scale=1");
450	            var scl = ww/page_w;
451	            var buddypress_h = $("#buddypress").height();
452
453	            $("#buddypress").attr("style","overflow-x: hidden; transform-origin:0px 0px;width: "+page_w+"px;max-width: "+page_w+"px;min-width: "+page_w+"px;-moz-transform: scale("+scl+");-ms-transform: scale("+scl+");-webkit-transform: scale("+scl+");-o-transform: scale("+scl+");transform: scale("+scl+");");
454	            $("#content").find(".entry-content").height(buddypress_h*scl);
455
456
457	            var bpupgs_nav = $(".bbp-user-page").find("#buddypress").find("#item-nav");
458	            var bpupgs_tabs = $(".bbp-user-page").find("#buddypress").find("#item-body").find(".item-list-tabs");
459	            if ($(bpupgs_nav).length != "undefined"){
460	            	$("#content").find(".entry-content")
461	            	//var bpupgs_nav_h = $(bpupgs_nav).height();
462	            	if ($(".bbp-user-page").find("#buddypress").find(".outer_pers_nav").length == "0") {
463	            		$(bpupgs_nav).wrap("<div class='outer_pers_nav'></div>");
464	            	}
465	            	//$(".outer_pers_nav").height(bpupgs_nav_h*scl);
466		            //$(bpupgs_nav).attr("style","overflow-x: hidden; transform-origin:0px 0px;width: "+page_w+"px;max-width: "+page_w+"px;min-width: "+page_w+"px;-moz-transform: scale("+scl+");-ms-transform: scale("+scl+");-webkit-transform: scale("+scl+");-o-transform: scale("+scl+");transform: scale("+scl+");");
467		            
468		            //var bpupgs_tabs_h = $(bpupgs_tabs).height();
469		            if ($(".bbp-user-page").find("#buddypress").find(".outer_pers_tabs").length == "0") {
470	            		$(bpupgs_tabs).wrap("<div class='outer_pers_tabs'></div>");
471	            	}
472		            //$(".outer_pers_tabs").height(bpupgs_tabs_h*scl);
473		            //$(bpupgs_tabs).attr("style","overflow-x: hidden;transform-origin:0px 0;width: "+page_w+"px;max-width: "+page_w+"px;min-width: "+page_w+"px;-moz-transform: scale("+scl+");-ms-transform: scale("+scl+");-webkit-transform: scale("+scl+");-o-transform: scale("+scl+");transform: scale("+scl+");");
474		        }
475
476        	}
477        }else{
478            //$("#page").removeAttr("style");
479            //$("#content").removeAttr("style");
480        }
481    }
482    function scl_menu_els(){
483    	var ww = $(window).width();
484        var page_w = 600;
485        if (ww <= page_w){
486        	var mescl = ww/page_w;
487        	var ttlhght = 75*mescl;
488        	$("#languages_footer").attr("style","transform-origin:right 0px;-moz-transform: scale("+mescl+");-ms-transform: scale("+mescl+");-webkit-transform: scale("+mescl+");-o-transform: scale("+mescl+");transform: scale("+mescl+");");
489        	$(".header-main").attr("style", "height: "+ttlhght+"px;");
490        	$(".site-header").attr("style", "min-height: "+ttlhght+"px;");
491        	$(".extmenubtn").attr("style","transform-origin:left 0px;-moz-transform: scale("+mescl+");-ms-transform: scale("+mescl+");-webkit-transform: scale("+mescl+");-o-transform: scale("+mescl+");transform: scale("+mescl+");");
492        	if($("body").hasClass("buddypress")){
493        		$("#masthead").find(".close_profl").attr("style","transform-origin:right 0px;-moz-transform: scale("+mescl+");-ms-transform: scale("+mescl+");-webkit-transform: scale("+mescl+");-o-transform: scale("+mescl+");transform: scale("+mescl+");");
494        	}
495        }else{
496        	$(".extmenubtn").removeAttr("style");
497        	$("#languages_footer").removeAttr("style");
498        	$(".header-main").removeAttr("style");
499        	$(".ubermenu-skin-black-silver").find(".fa").removeAttr("style");
500        	if($("body").hasClass("buddypress")){
501        		$("#masthead").find(".close_profl").removeAttr("style");
502        	}
503        }
504    }
505    function apkurls_check(){
506    	setTimeout(function(){
507			var and_apk = 0;
508			for (var i in userDevice) {
509				if (userDevice[i].platform.test(platform)){
510					if(userDevice[i].device == "Android") {
511						and_apk = and_apk + 1;
512					}
513				}
514			}
515			if (and_apk > 0){
516		    	$("body").find("a").each(function(){
517		    		if (typeof $(this).attr("href") !== 'undefined'){
518			    		if ($(this).attr("href").indexOf(".apk") !== -1){
519			    			//console.log("333333333333");
520			    			$(this).addClass("apkinstall");
521			    			//$(this).attr("download","");
522			    			$(this).removeAttr("target");
523			    			//if (exturl == "exturl"){
524			    				$(this).attr("data-exthref", $(this).attr("href"));
525			    				$(this).removeAttr("href");
526			    				$(this).removeAttr("download");
527			    			//}
528			    		}
529			    	}
530		    	});
531			}
532    	}, 2200);
533
534    		$("body").click(function( event ) {
535    			var get_params = location.search.slice(1).split('&');
536				var exturl = '';
537				for (var i = 0; i < get_params.length; i++) {
538					var param = get_params[i].split('=');
539					exturl = param[0];
540					//console.log(param[0] + ": " + param[1]);
541				}
542				if (exturl == "exturl"){
543					//console.log("11111111111111");
544					if ($(event.target).hasClass("apkinstall") && typeof $(event.target).attr("data-exthref") !== 'undefined'){
545						//window.open($(event.target).attr("data-exthref"), '_self');
546						if (window.open($(event.target).attr("data-exthref"), '_self')) {
547							//console.log("?!?!?!?!?!?!");
548						}
549					}
550				}else{
551					//console.log("2222222222222");
552					if ($(event.target).hasClass("apkinstall") && typeof $(event.target).attr("data-exthref") !== 'undefined'){
553	    				window.location.href = $(event.target).attr("data-exthref");
554	    				setTimeout(function(){
555	    					//console.log("?!?!?!?!?!?!");
556		    				window.location.href = "https://espritgames.ru/apkinstaller/";
557		    			}, 4000);
558	    			}
559				}
560				//console.log(event.target);
561			});
562			/*
563	    	$("body").find(".apkinstall").click(function(){
564	    		console.log("00000000000000");
565	    		window.open($(this).attr("data-exthref"), "_blank");
566	    		//window.location.href = $(this).attr("data-exthref");
567	    		//window.open("https://espritgames.ru/apkinstaller/", "_blank");
568	    	});
569    		*/
570    }
571    function divineark(){
572    	if ($(window).width() <= 960) {
573    		if ($("body").find(".divineark_pre").length <= 0) {
574    			$("body").prepend("<div class='divineark_pre'><a href='https://espritgames.ru/divineark/promo/main/?esc=site_ru_frontpage_catalog'></a></div>");
575    		}
576	        var scl = $(window).width()/600;
577    		if ($(window).width() <= 600) {
578				$("body").find(".divineark_pre").attr("style","transform-origin: center 0;-moz-transform: scale("+scl+");-ms-transform: scale("+scl+");-webkit-transform: scale("+scl+");-o-transform: scale("+scl+");transform: scale("+scl+");");
579    		}else{
580    			$("body").find(".divineark_pre").attr("style"," ");
581    		}    		
582    		$(window).on("scroll", function() {
583    			if ($(window).scrollTop() >= 400){
584    				$("body").find(".divineark_pre").addClass("shw");
585    			}else{
586    				$("body").find(".divineark_pre").removeClass("shw");
587    			}
588    		});
589    	}else{
590    		$("body").find(".divineark_pre").remove();
591    	}
592    }
593	$(document).ready(function(){
594		divineark();
595		if ($(window).width() <= 960) {
596			setTimeout(function() { 
597				if (!$("body").hasClass("home-page")){
598					$("body").addClass("backarrow");
599				}
600			}, 2600);
601
602			$("body").prepend("<a class='extmenubtn'><span></span><span></span><span></span></a>");
603			$("body").find(".extmenubtn").click(function(){
604				if ($("body").hasClass("slidemenu")){
605					$("#masthead").find(".ubermenu-responsive-default").addClass("ubermenu-responsive-collapse");
606					$("body").removeClass("slidemenu");
607				}else{
608					$("#masthead").find(".ubermenu-responsive-default").removeClass("ubermenu-responsive-collapse");
609					$("body").addClass("slidemenu");
610				}
611			});
612			/*
613			$("body").click(function( event ) {
614				console.log(event.target);
615				console.log("?!?!?!?!?!?!");
616			});
617			*/
618			if($("body").hasClass("buddypress")){
619				$(".header-main").prepend("<a class='close_profl' href='"+$(".site-header").find("a").attr("href")+"'></a>");
620			}
621			getPlatform();
622			setTimeout(function() { 
623				game_btn_menu();
624			}, 600);
625			scl_blcks_tomin();
626			scl_blcks_tomax();
627			mob_to_mob();
628			scl_w();
629			profilemenu();
630			menuhover_big();
631			scl_bbpress();
632			scl_menu_els();
633
634			miniavatar();
635
636			
637			$(".load-more").click(function(){
638				setTimeout(function(){
639					miniavatar();
640				}, 2000);
641			});
642			if($("body").hasClass("bbpress")){
643				setInterval(function(){
644					miniavatar();
645	 			}, 1200);
646			}
647			
648			if($("body").hasClass("page-id-1215796")){
649				//$("meta[name='viewport']").attr("content", "width=1044");
650				scl_about();
651				$("html").attr("style", "width: 100%; min-width: 100%;");
652				$("body").attr("style", "width: 100%; min-width: 100%;");
653			}
654			apkurls_check();
655			/*
656			setTimeout(function() { 
657				$("#page").find(".header-main").find(".ubermenu-responsive-toggle").addClass("openmenu");
658				// добавить поверх кнопку
659				$("#page").find(".header-main").find(".openmenu").click(function( event ){
660					//console.log(event.target);
661					//console.log("?!?!?!?!?!?!");
662				});
663				$("body").click(function( event ) {
664					console.log(event.target);
665					console.log("?!?!?!?!?!?!");
666				});
667			}, 200);
668
669			
670			$("body").click(function( event ) {
671				console.log(event.target);
672				console.log("?!?!?!?!?!?!");
673			});
674			$("body").click(function(){ // find(".ubermenu-responsive-toggle")
675				if(!$("#page").hasClass("shwng")){
676					$("#page").addClass("shwng");
677				}else{
678					$("#page").removeClass("shwng");
679				}			
680			});
681			*/
682		}
683
684	});
685	$(window).resize(function() {
686		if ($(window).width() <= 960) {
687			//scl_blcks_tomin();
688			scl_blcks_tomax();
689	       	mob_to_mob();
690	       	scl_w();
691	       	setTimeout(function() { 
692	       		profilemenu();
693	       	}, 600);
694	       	menuhover_big();
695	       	scl_bbpress();
696	       	scl_menu_els();
697
698	       	overthis_size();
699       }
700       divineark();
701    });
702
703
704
705	/*
706	var scrls = 0;
707	var m_scrls = 0;
708	
709	
710	$(window).scroll(function() {
711		scrls = scrls + 1;
712		if (scrls>= 36) {
713			scrls = 36;
714		}
715		$("#frontpage-games").find("li").each(function(){
716			var lislds = $(this);
717			if (!$("#frontpage-games").hasClass("onegame")){
718				if(!$(lislds).hasClass("half")){
719					//$(lislds).addClass("slds1");
720					$(lislds).attr("style", "margin-top: "+scrls+"px");
721				}else{
722					//$(lislds).addClass("slds2");
723					$(this).attr("style", "margin-top: "+scrls*0.01+"px");
724				}				
725			}
726		});
727		clearTimeout($.data(this, 'scrollTimer'));
728		$.data(this, 'scrollTimer', setTimeout(function() {
729			$("#frontpage-games").find("li").each(function(){
730				//$(this).removeClass("slds1");
731				$(this).attr("style", "margin-top: 0px");
732				//$(this).removeClass("slds2");
733				$(this).attr("style", "margin-top: "+scrls*0.01+"px");
734			});
735		}, 600));
736	});
737	*/
738
739	/*
740	var scrls = 0;
741	$(window).scroll(function() {
742		scrls = scrls + 1;
743	});
744	document.addEventListener('touchmove', function(){
745		//if (scrls > 0){
746			//console.log(scrls);
747			$("#frontpage-games").find("li").each(function(){
748				var lislds = $(this);
749				if (!$("#frontpage-games").hasClass("onegame")){
750					if(!$(lislds).hasClass("half")){
751						$(lislds).addClass("slds1");
752					}else{
753						$(lislds).addClass("slds2");
754					}				
755				}
756			});
757			//scrls = 0;
758		//}
759	});
760	document.addEventListener('touchend', function(){
761		$("#frontpage-games").find("li").each(function(){
762			$(this).removeClass("slds1");
763			$(this).removeClass("slds2");
764		});
765		setTimeout(function() { 
766			$("#frontpage-games").find("li").each(function(){
767				$(this).removeClass("slds1");
768				$(this).removeClass("slds2");
769			});
770	    }, 200);
771	});
772	*/
773
774
775
776    
777        //$(document).scroll(function(){
778        
779        document.addEventListener('touchmove', function(){
780        	$("#frontpage-games").find("li").each(function(){
781        		var slds_game = $(this);
782            	checkPosition(slds_game);
783            });
784        });
785        
786
787    $(document).ready(function(){
788        // после загрузки страницы сразу проверяем
789        //checkPosition();
790
791        // проверка при ресайзе страницы
792        $(window).resize(function(){
793            //checkPosition();
794
795        });
796    });
797    // функция проверки полной видимости элемента
798    function checkPosition(slds_game){
799
800    	
801    	var scrollPos = 0;
802		$(window).scroll(function(){
803		   	var st = $(this).scrollTop();
804		   	if (st > scrollPos){
805		   		//console.log("down");
806		   	}else{
807		   		//console.log("up");
808		   	}
809		   scrollPos = st;
810		});
811		
812
813        // координаты дива
814        var div_position = $(slds_game).offset();
815        // отступ сверху
816        var div_top = div_position.top;
817        // отступ слева
818        var div_left = div_position.left;
819        // ширина
820        var div_width = $(slds_game).width();
821        // высота
822        var div_height = $(slds_game).height();
823
824        // проскроллено сверху 
825        var top_scroll = $(document).scrollTop();
826        // проскроллено слева
827        var left_scroll = $(document).scrollLeft();
828        // ширина видимой страницы
829        var screen_width = $(window).width();
830        // высота видимой страницы
831        var screen_height = $(window).height();
832
833        // координаты углов видимой области
834        var see_x1 = left_scroll;
835        var see_x2 = screen_width + left_scroll;
836        var see_y1 = top_scroll;
837        var see_y2 = screen_height + top_scroll;
838
839        // координаты углов искомого элемента
840        var div_x1 = div_left;
841        var div_x2 = div_left + div_height;
842        var div_y1 = div_top;
843        var div_y2 = div_top + div_width;
844
845        // проверка - виден див полностью или нет
846        if( div_x1 >= see_x1 && div_x2 <= see_x2 && div_y1 >= see_y1 && div_y2 <= see_y2 ){
847        	if (!$(slds_game).hasClass("half") && !$(slds_game).hasClass("full")){
848  
849          		$(slds_game).removeClass("prefull");
850        		$(slds_game).removeClass("nexfull");
851        		$(slds_game).addClass("full");
852        		if (!$(slds_game).prev().hasClass("half") && !$(slds_game).prev().hasClass("prefull")){
853        			$(slds_game).prev().addClass("prefull");
854        		}
855        		if (!$(slds_game).next().hasClass("half") && !$(slds_game).next().hasClass("nexfull")){
856        			$(slds_game).next().addClass("nexfull");
857        		}
858        		setTimeout(function() { 
859        			$(slds_game).next().removeClass("nexfull");
860        			$(slds_game).removeClass("full");
861        			$(slds_game).prev().removeClass("prefull");
862        		}, 400);
863        	}        	
864        	//console.log("1111111");
865        }else{
866        	$(slds_game).removeClass("full");
867        	//console.log("2222");
868        }
869    }
870
871	/*
872	$(document).ready(function() {
873		setTimeout(function() { 
874			jQuery("body").addClass("fullload");
875		}, 2400);
876	});
877	*/
878
879/*
880
881	document.addEventListener('touchstart', function(){
882		var scrls = 0;
883		var m_scrls = 0;
884	    $(window).scroll(function() {
885
886	    	scrls = scrls + 1;
887	    	if (scrls>= 36) {
888	    		scrls = 36;
889	    	}
890	    	//console.log(scrls*0.6);
891	    	m_scrls = scrls;
892	        $("#frontpage-games").find("li").each(function(){
893				var lislds = $(this);
894				if (!$("#frontpage-games").hasClass("onegame")){
895					if(!$(lislds).hasClass("half")){
896						$(this).attr("style", "margin-top: "+scrls+"px");
897					}else{
898						$(this).attr("style", "margin-top: "+scrls*0.01+"px");
899					}
900				}
901			});
902	        clearTimeout( $.data( this, "scrollCheck" ) );
903	        $.data( this, "scrollCheck", setTimeout(function() {
904	        	scrls = 0;
905	        	m_scrls = 0;
906	            $("#frontpage-games").find("li").each(function(){
907	            	$(this).attr("style", "margin-top: 0px");
908	            	$(this).animate({
909					    marginTop: "0px" 
910				  }, 10, function() {
911				    // Animation complete.
912				  });
913				});
914	        }, 180) );
915
916	    });
917   	});
918*/
919
920
921	/*
922	document.addEventListener('touchstart', function(){
923		var scrls = 0;
924		var m_scrls = 0;
925        $( window ).scroll(function() {
926        	scrls = scrls + 1;
927        	if (scrls>= 28) {
928        		scrls = 28;
929        	}
930        	//console.log(scrls*0.6);
931        	m_scrls = scrls;
932            $("#frontpage-games").find("li").each(function(){
933				var lislds = $(this);
934				if (!$("#frontpage-games").hasClass("onegame")){
935					if(!$(lislds).hasClass("half")){
936						$(this).attr("style", "margin-top: "+scrls+"px");
937					}else{
938						$(this).attr("style", "margin-top: "+scrls*0.2+"px");
939					}
940				}
941			});
942        });
943	});
944	document.addEventListener('touchend', function(){
945		$("#frontpage-games").find("li").each(function(){
946        	$(this).attr("style", "margin-top: 0px");
947		});
948		setTimeout(function() { 
949			$("#frontpage-games").find("li").each(function(){
950	        	$(this).attr("style", "margin-top: 0px");
951			});
952		}, 200);
953	});
954	*/
955
956} )( jQuery ); 
957
958
959
960
961/*
962
963  function wheel(event) {
964      var delta = 0;
965      if (event.wheelDelta) {(delta = event.wheelDelta / 120);}
966      else if (event.detail) {(delta = -event.detail / 3);}
967
968      handle(delta);
969      if (event.preventDefault) {(event.preventDefault());}
970      event.returnValue = false;
971  }
972
973  function handle(delta) {
974      var time = 1000;
975      var distance = 200;
976
977      $('html, body').stop().animate({
978          scrollTop: $(window).scrollTop() - (distance * delta)
979      }, time );
980  }
981
982  if (window.addEventListener) {window.addEventListener('DOMMouseScroll', wheel, false);}
983    window.onmousewheel = document.onmousewheel = wheel;
984*/

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.