Signin  Pricing  Examples  Support

Libraries > template.js

template.js - Search Live Website Code
It's like doing CTRL+F on millions of websites' source code



NerdyData is a search engine for source code. Search the source code of 200 million websites.


JAVASCRIPT FILE http://gameisover.gr/templates/gameisover/javascript/template.js

Function Explorer




Libraries on gameisover.gr


core.js

mootools-core.js

jquery.1.8.js

template.js



Explore More


5240904353.js

524492036.js

524801012.js

5248661398.js

template.js
				
/*
// "Keegot Template" for Joomla! 2.5.x - Version: 3.0
// Designed & Developed by Keegot.
// Copyright (c) 2010 - 2012 Keegot. All rights reserved.
// Released under the GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
// More info at http://www.keegot.com
*/

if ( typeof( jQuery ) != 'undefined' ) {
	(function($){
	    $(document).ready(function() {
	    	
	    	// Js Sniffing
	    	$('html').removeClass('no-js');
	    	
	    	// Os Sniffing
	    	if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
	    		$('html').addClass('mobile-device');
	    	}
	    	if(navigator.userAgent.indexOf('Mac') > 0){
	    		$('html').addClass('mac-os');
	    	}
	    	
	    	// Responders
	    	if($('body.respond').length){
		    	var $window = $('window'),
		    	breakPoint1=1360,
		    	breakPoint2=768,
		    	breakPoint3=480,
		    	timer=null,
		    	$nav = $('#header .menu'),
				$links = $nav.find('a'), 
				showing = 'nav',
				$select, 
				$option;
				
				
				if ($nav.length && $links.length) {
					$select = $('<select></select>');
					$option = $('<option>-- Navigation --</option>').appendTo($select);
					
					$links.each(function(){ 
						var $a = $(this); 
						$option.clone().attr('value', $a.attr('href')).text($a.text()).appendTo($select);
					});
					
					$select = $select.wrap('<div id="mobile-nav"/>').parent().delegate('select','change', function(){
						window.location = $(this).val(); 
					});
				}
		    	
		    	
		    	function setDisplay() {
					var width = $(window).width(),c;
					if ( width < breakPoint3 ) {
						c = 'phone-screen';
					} else if ( width > breakPoint3 && width < breakPoint2 ) {
						c = 'tablet-screen'; 
					} else if ( width > breakPoint2 && width < breakPoint1 ) {
						c ='desktop-screen'; 
					} else if ( width > breakPoint1 ) {
						c ='big-screen'; 
					}
					
					$('html').removeClass('phone-screen tablet-screen desktop-screen big-screen').addClass(c);
					
					if ($nav.length && $links.length) {
						if ( showing == 'nav' && width < breakPoint3){
							$nav.replaceWith($select);
							showing = 'select';
						} else if(showing == 'select' && width > breakPoint3){
							$select.replaceWith($nav);
							showing = 'nav';
						}
					}
				}
				
				setDisplay();
				$(window).resize(function() {
					if ( timer ) { window.clearTimeout(timer); }
					timer = window.setTimeout( setDisplay, 300 ); 
				});
			}
			
	    	// Tabs System
			if ($('.tabs').length) {
				$('.tabs div').hide();
				$('.tabs div:first').show();
				$('.tabs ul li:first').addClass('active');
				$('.tabs ul li a').click(function(){
					$('.tabs ul li').removeClass('active');
					$(this).parent().addClass('active');
					var currentTab = $(this).attr('href');
					$('.tabs div').hide();
					$(currentTab).show();
					return false;
				});
			}
			
			// Popup Messages
			$("#closeMessage").click( function() { 
				$('.message-cntnr').remove() 
			});
			
			// Suckerfish Menus
			$('.dropMenu li').hover( 
				function() {
					$(this).addClass('sfhover');
				},
				function () {
					$(this).removeClass("sfhover");
				}
			);
			
			
			var social_timer;
			
			if ($('.item-social').length) {
				
				var el_ement = $('.item-social');
				var el_height = 320;
				var window_height = $(window).height();
				var limit = $('#itemCommentsAnchor').offset().top - el_height;
				
				
				function setSocialPosition(){
					var el_position = el_ement.offset().top;
					var scroll = $(window).scrollTop();
					var el_state = el_position + el_height;
					var windowTop = $(window).scrollTop();
					
					if(window_height < el_height){
						$(el_ement).css({
		              		position: 'absolute',
					  		top: el_position
					  	});
					}else{
						if (limit < windowTop) {
			              var diff = limit + el_height;
			              $(el_ement).css({
			              	position: 'absolute',
						  	top: diff
			              });
			            }else{
				          $(el_ement).css({
				          	position: 'fixed',
			                top: 'auto'
			              });
			            }
		            }
					
				}
				
				
				$(window).on("resize scroll",function(e){
					if ( social_timer ) { window.clearTimeout(social_timer); }
						social_timer = window.setTimeout( setSocialPosition, 100 ); 
				});
			}
			
	
		});
	})(window.jQuery);
}



A B C D E F G H I J K L M N O P Q R S T U V W X Y Z