Signin  Pricing  Examples  Support

Libraries > 548.js

548.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://tabcpermit.com/template/template06/js/548.js


Libraries on tabcpermit.com


DD_belatedPNG_0.0.8a-min.js

head-scripts.js

jquery-1.8.2.min.js

jquery.equalheights.min.js

jquery.foobar.2.1.min.js

jquery.magicnav.min.js

jquery.maskedinput.min.js

jquery.metadata.min.js

jquery.prettyPhoto.min.js

jquery.qtip.min.js

jquery.sliderTabs.min.js

jquery.validate.additional-methods.min.js

jquery.validate.min.js

jquery.waypoints.min.js

modernizr.min.js



Explore More


backtotop.js

custommenu.js

jquery.fancybox.js

flexslider.js

548.js
				
$(document).ready(function(){ 
	// **************************************//
	// **************************************//
	// JQUERY PLUGINS
	// **************************************//
	// **************************************//
	
	// **************************************//
	// prettyPhoto
	// **************************************//
	$("a[rel^='pretty-photo-video']").prettyPhoto({
		animation_speed: 'normal', /* fast/slow/normal */
		slideshow: 5000, /* false OR interval time in ms */
		autoplay_slideshow: false, /* true/false */
		opacity: 0.80, /* Value between 0 and 1 */
		allow_resize: false, /* Resize the photos bigger than viewport. true/false */
		default_width: 500,
		default_height: 344,
		counter_separator_label: ' of ', /* The separator for the gallery counter 1 "of" 2 */
		horizontal_padding: 20, /* The padding on each side of the picture */
		hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
		wmode: 'opaque', /* Set the flash wmode attribute */
		autoplay: true, /* Automatically start videos: True/False */
		modal: false, /* If set to true, only the close button will close the window */
		deeplinking: false, /* Allow prettyPhoto to update the url to enable deeplinking. */
		overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
		keyboard_shortcuts: false, /* Set to false if you open forms inside prettyPhoto */
		social_tools: '<div class="pp_social"><div class="twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="https://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&href='+location.href+'&amp;layout=button_count&amp;show_faces=false&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div></div>' /* html or false to disable */
	});
	
	
	// **************************************//
	// equalHeights
	// **************************************//
	$(window).resize(function() {
    	if ($(window).width() > 480) {
			$("div[rel^='equal-height']").equalHeights(5);
		}
	});
	
	
	// **************************************//
	// magicNav
	// **************************************//
	$.MagicNav(
		$('.magic-nav-links'),
		$('#content-magic-nav h2'),
		{
			titles: 'title',
			offset:-$('.head-container').outerHeight()
		}
	);
	
	$('.main-content').scrollTop($('.head-container').outerHeight());
	
	
	// **************************************//
	// waypoints - back to top
	// **************************************//
	$.waypoints.settings.scrollThrottle = 30;
	
	$('.wrapper').waypoint(function(event, direction) {
		$('.top').toggleClass('hidden',direction === "up");
	},
	{offset: '-20%'});
	
	
	// **************************************//
	// sliderTabs
	// **************************************//
	$('.tabbed-feature').sliderTabs({
		position:'bottom',
		tabHeight:95,
		height:420,
		width:1050,
		classes: {
			panel:'panel',
			panelsContainer:'panel-container',
			tab:'tab', // <li>
			tabActive:'tab-active', // <li>
			tabsList:'tab-container' // <ul>
		},
		tabArrows:false
	});
	
	$('.slider-feature').sliderTabs({
		tabs:false,
		height:380,
		width:1050,
		classes: {
			panel:'panel',
			panelsContainer:'panel-container'
		},
		tabArrows:false,
		indicators:true,
		panelArrows:true
	});
	
	$('.slider-feature-single').sliderTabs({
		tabs:false,
		height:360,
		width:1050,
		classes: {
			panel:'panel',
			panelsContainer:'panel-container'
		},
		tabArrows:false,
		indicators:false,
		panelArrows:false
	});
	
	
	// **************************************//
	// qTip
	// **************************************//
	
	// small tooltip
	$('a[class*="small-tip"][rel]').each(function(){
		$(this).qtip({
			content: {
				text: $(this).attr('rel'),
				title: {
					text: $(this).attr('title'),
					button: true
				}
			},
			position: {
				effect: false,
				my: 'top center',
				at: 'bottom center'
			},
			show: {
				event: 'click mouseenter',
				solo: true
			},
			hide: 'unfocus mouseleave',
			style: {
				classes: 'small-tip-balloon ui-tooltip-rounded ui-tooltip-light ui-tooltip-shadow ui-tooltip-bootstrap'
			}
		})
		
		.click(function(event) {
			event.preventDefault();
		})
	});
	
	// small popup
	$('a[class*="small-bubble"][rel]').each(function(){
		$(this).qtip({
			content: {
				text: $("#"+$(this).attr('rel')).html(),
				title: {
					text: $(this).attr('title'),
					button: true
				}
			},
			position: {
				effect: false,
				my: 'center center',
				at: 'center center',
				target:$(window)
			},
			show: {
				event: 'click',
				solo: true
			},
			hide: 'unfocus',
			style: {
				classes: 'small-tip-balloon ui-tooltip-rounded ui-tooltip-light ui-tooltip-shadow ui-tooltip-bootstrap'
			}
		})
		
		.click(function(event) {
			event.preventDefault();
		})
	});
	
	// general popup
	$('a[class*="popup"][rel]').each(function(){
		$(this).qtip({
			content: {
				text: 'Loading...',
				ajax: {
					url: $(this).attr('rel')
				},
				title: {
					text: $(this).attr('title'),
					button: true
				}
			},
			position: {
				my: 'top center',
				at: 'top center',
				target:$(window),
				effect: false
			},
			show: {
				event: 'click',
				solo: true
			},
			hide: 'unfocus',
			style: {
				classes: 'ui-tooltip-rounded ui-tooltip-light ui-tooltip-shadow ui-tooltip-bootstrap'
			}
		})
		
		.click(function(event) {
			event.preventDefault();
		})
	});
	
	// modal popup - billing
	$('a[class*="modalPopup"]').each(function(){
		$(this).qtip({
			content: {
				text: 'Loading...',
				ajax: {
					url: $(this).attr('rel')
				},
				title: {
					text: $(this).attr('title'),
					button: false
				}
			},
			position: {
				my: 'top center',
				at: 'top center',
				target:$(window),
				effect: false
			},
			show: {
				event: 'click',
				solo: true,
				modal: {
					on: true,
					blur: false, escape: false
				}
			},
			hide: {
				event: 'click',
				target: $('#close')
			},
			style: {
				classes: 'ui-tooltip-rounded ui-tooltip-light ui-tooltip-shadow ui-tooltip-bootstrap'
			}
		})
		
		.click(function(event) {
			event.preventDefault();
		})
	});
	
	// autopopup
	$('div[class*="autoPopup"]').each(function(){
		$(this).qtip({
			content: {
				text: $('#portalMessage'),
				title: {
					text: $(this).attr('title'),
					button: true
				}
			},
			position: {
				my: 'top center',
				at: 'top center',
				target:$(window),
				effect: false
			},
			show: {
				ready: true,
				solo: true
			},
			hide: 'unfocus',
			style: {
				classes: 'ui-tooltip-rounded ui-tooltip-light ui-tooltip-shadow ui-tooltip-bootstrap'
			}
		})
		
		.click(function(event) {
			event.preventDefault();
		})
	});
	
	// autopopupPage
	$('div[class*="autoPopupPage"]').each(function(){
		$(this).qtip({
			content: {
				text: 'Loading...',
				ajax: {
					url: $(this).attr('rel')
				},
				title: {
					text: $(this).attr('title'),
					button: true
				}
			},
			position: {
				my: 'top center',
				at: 'top center',
				target:$(window),
				effect: false
			},
			show: {
				ready: true,
				solo: true
			},
			hide: 'unfocus',
			style: {
				classes: 'ui-tooltip-rounded ui-tooltip-light ui-tooltip-shadow ui-tooltip-bootstrap'
			}
		})
		
		.click(function(event) {
			event.preventDefault();
		})
	});
	
	// autopopupPage2 - delivery
	$('div[class*="autoPopupPage2"]').each(function(){
		$(this).qtip({
			content: {
				text: 'Loading...',
				ajax: {
					url: $(this).attr('rel')
				},
				title: {
					text: $(this).attr('title'),
					button: false
				}
			},
			position: {
				my: 'top center',
				at: 'top center',
				target:$(window),
				effect: false
			},
			show: {
				ready: true,
				solo: true,
				modal: {
					on: true,
					blur: false, escape: false
				}
			},
			hide: {
				event: 'click',
				target: $('#no-delivery')
			},
			style: {
				classes: 'ui-tooltip-rounded ui-tooltip-light ui-tooltip-shadow ui-tooltip-bootstrap'
			}
		})
		
		.click(function(event) {
			event.preventDefault();
		})
	});
	
	// view tooltip
	$('a[class*=viewBalloon][rel]').each(function(){
		$(this).qtip({
			content: {
				text: 'Loading...',
				ajax: {url: $(this).attr('rel')},
				title: {
					text: $(this).attr('title'),
					button: true
				}
			},
			position: {
				my: 'center',
				at: 'center',
				effect: false,
				target:$(window)
			},
			show: {
				event: 'click',
				solo: true
			},
			hide: 'unfocus',
			style: {
				classes: 'viewTipBalloon ui-tooltip-rounded ui-tooltip-light ui-tooltip-shadow ui-tooltip-bootstrap'
			}
		})
		
		.click(function(event) { event.preventDefault(); });
	})
	
	$('a[class*=viewModal][rel]').each(function(){
		$(this).qtip({
			content: {
				text: 'Loading...',
				ajax: {url: $(this).attr('rel')},
				title: {
					text: $(this).attr('title'),
					button: true
				}
			},
			position: {
				my: 'center',
				at: 'center',
				target:$(window),
				effect: false,
				viewport: $(window)
			},
			show: {
				event: 'click',
				solo: true
			},
			hide: false,
			style: {
				classes: 'viewTipBalloon ui-tooltip-rounded ui-tooltip-light',
				tip: false
			}
		})
		
		.click(function(event) { event.preventDefault(); });
	})
	
	// iFrame form
	$('a[class=i-frame-form][rel]').each(function(){
		var iFrameID = $(this).attr('name');
		
		$(this).qtip({
			id: 'qTip_' + $(this).attr('name'),
			content: {
				text: '<iframe src="'+$(this).attr('rel')+'" height="500px" width="800px" frameborder="0" id="'+$(this).attr('name')+'" class="qTipIFrame"></iframe>',
				title: {
					text: $(this).attr('title'),
					button: true
				}
			},
			position: {
				my: 'top center',
				at: 'top center',
				target:$(window),
				effect: false
			},
			show: {
				event: 'click',
				solo: true
			},
			hide: false,
			style: {
				classes: 'iframe-form ui-tooltip-rounded ui-tooltip-light ui-tooltip-shadow ui-tooltip-bootstrap',
				tip: false
			},
			events: {
				hide: function(event,api) {
					$('#'+iFrameID).attr('src',$('#'+iFrameID).attr('src')); //reload form
				}
			}
		})
		
		.click(function(event) { event.preventDefault(); });
	});
	
	
	// **************************************//
	// validate
	// **************************************//
	
	// RegEx
	jQuery.validator.addMethod("regex", function(value, element, param) {
		if (this.optional(element)) {
			return true;
		}
		if (typeof param === 'string') {
			param = new RegExp('^(?:' + param + ')$');
		}
		return param.test(value);
	}, "Invalid format.");
	
	// US phone number - leading "1" optional, area code required, optional parenthesis, space or "-" accepted as separator //
	jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
		phone_number = phone_number.replace(/\s+/g, "");
		return this.optional(element) || phone_number.length > 9 &&
			phone_number.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
	}, "Please specify a valid phone number");
	
	// US zip code
	jQuery.validator.addMethod("zipcodeUS", function(value, element) {
		return this.optional(element) || /\d{5}-\d{4}$|^\d{5}$/.test(value)
	}, "The specified US ZIP Code is invalid");
	
	// support form
	$('#support-form').validate({
		success:'correct-field',
		errorClass:'form-error',
		onkeyup:false,
		errorElement:'span',
		highlight: function(element, errorClass) {
			$(element).css({ borderColor: '#dd0000' });
			$(element.form).find("span[for=" + element.id + "]").removeClass('correct-field');
		},
		unhighlight: function(element, errorClass) {
			$(element).css({ borderColor: '#547599' });
		},
		submitHandler: function(form) {
			if ($(form).valid()) 
				form.submit(); 
				return false;
		}
	});
	
	//corporate account form
	$('#corporate-information-request').validate({
		success:'correct-field',
		errorClass:'form-error',
		onkeyup:false,
		errorElement:'span',
		highlight: function(element, errorClass) {
			$(element).css({ borderColor: '#dd0000' });
			$(element.form).find("span[for=" + element.id + "]").removeClass('correct-field');
		},
		unhighlight: function(element, errorClass) {
			$(element).css({ borderColor: '#547599' });
		},
		submitHandler: function(form) {
			if ($(form).valid()) 
				form.submit(); 
				return false;
		}
	});
	
	//prepaid code form
	$('#prepaid-code-request').validate({
		success:'correct-field',
		errorClass:'form-error',
		onkeyup:false,
		errorElement:'span',
		highlight: function(element, errorClass) {
			$(element).css({ borderColor: '#dd0000' });
			$(element.form).find("span[for=" + element.id + "]").removeClass('correct-field');
		},
		unhighlight: function(element, errorClass) {
			$(element).css({ borderColor: '#547599' });
		},
		submitHandler: function(form) {
			if ($(form).valid()) 
				form.submit(); 
				return false;
		}
	});
	
	// login form
	$('#login-form').validate({
		success:'correct-field',
		errorClass:'form-error',
		onkeyup:false,
		errorElement:'span',
		highlight: function(element, errorClass) {
			$(element).css({ borderColor: '#dd0000' });
			$(element.form).find("span[for=" + element.id + "]").removeClass('correct-field');
		},
		unhighlight: function(element, errorClass) {
			$(element).css({ borderColor: '#547599' });
		},
		submitHandler: function(form) {
			if ($(form).valid()) 
				form.submit(); 
				return false;
		}
	});
	
	// registration form
	$('#registration-form').validate({
		success:'correct-field',
		errorClass:'form-error',
		onkeyup:false,
		errorElement:'span',
		highlight: function(element, errorClass) {
			$(element).css({ borderColor: '#dd0000' });
			$(element.form).find("span[for=" + element.id + "]").removeClass('correct-field');
		},
		unhighlight: function(element, errorClass) {
			$(element).css({ borderColor: '#547599' });
		},
		submitHandler: function(form) {
			if ($(form).valid()) 
				form.submit(); 
				return false;
		}
	});
	
	
	

	// **************************************//
	// **************************************//
	// CUSTOM FUNCTIONS
	// **************************************//
	// **************************************//
	$(function(){
		// **************************************//
		// DISPLAY
		// **************************************//
		
		// accordions
		$('.accordion dd').hide();
		
		
		// add link icons
		$("a[icon='modal']").addClass("modal-icon");		
		$("a[icon='modal']").hover(
			function(){
				$(this).toggleClass("modal-icon-hover");
			}
		);
		
		$("a[icon='newWindow'],a[target='_blank'][icon!='noIcon']").addClass("new-window-icon");
		$("a[icon='newWindow'],a[target='_blank'][icon!='noIcon']").hover(
		  function(){
			$(this).toggleClass("new-window-icon-hover");
			}
		);
		
		
		// show sliders
		$(".feature").show();
		
		
		// **************************************//
		// CLICK FUNCTIONS
		// **************************************//
		
		// back to top click
		$('.top').click(function() {
			$("html, body").animate(
				{scrollTop:0},
				1000,
				function (x, t, b, c, d) {
					if ((t/=d/2) < 1) return c/2*t*t + b;
					return -c/2 * ((--t)*(t-2) - 1) + b;
				}
			);
		});
		
		
		// accordions click
		var accordionCheck = $('#vtab');
		
		if (accordionCheck.length) {
			$('.accordion dt a').click(function(){
				$('.accordion dd').slideUp();
				$('.accordion dt a').removeClass('selected');
				$('.accordion dt').removeClass('selected');
				
				$(this).parent().next().slideDown();
				$(this).addClass('selected');
				
				$(this).parent().addClass('selected');
				return false;
			});
			
			// in-content accordions
			var $inContentItems = $('#vtab.in-content>ul>li');
			
			$inContentItems.click(function() {
				var index = $inContentItems.index($(this));
				$('#vtab-items>div').hide().eq(index).show();
				
				$inContentItems.removeClass('selected green-button');
				$inContentItems.addClass('gray-button');
				
				$(this).addClass('selected green-button');
				$(this).removeClass('gray-button');
			}).eq(0).click();
			
			// sidebar/main content accordions
			var accordionsSidebarCheck = $('.sidebar-vtab');
		
			if (accordionsSidebarCheck.length) {
				var $sideBarItems = $('#vtab.sidebar-vtab>li');
				
				//$('#vtab-items').css('minHeight',$('.sticky-sidebar').outerHeight() - 20 + 'px');
				
				$sideBarItems.click(function() {
					var index = $sideBarItems.index($(this));
					
					if ($(window).width() > 480) {
						$('#vtab-items>div').hide().eq(index).show();
					};
					
					$sideBarItems.removeClass('selected');
					$(this).addClass('selected');
			   }).eq(0).click();
			}
		}
		
		
		// **************************************//
		// SCROLL FUNCTIONS
		// **************************************//
		
		// sticky sidebar
		var stickySidebarCheck = $('.sticky-sidebar');
		
		if (stickySidebarCheck.length) {
			var topMeasure = $('.sticky-sidebar').offset().top - parseFloat($('.sticky-sidebar').css('marginTop').replace(/auto/, 0));
			var footTop = $('.footer-container').offset().top - parseFloat($('.footer-container').css('marginTop').replace(/auto/, 0));
		
			var maxY = footTop - $('.sticky-sidebar').outerHeight() - $('.head-container').outerHeight();
		
			$(window).scroll(function(evt) {
				var y = $(this).scrollTop() + $('.head-container').outerHeight();
				
				if (y > topMeasure) {
					if (y < maxY) {
						$('.sticky-sidebar').addClass('fixed').removeAttr('style');
					} else {
						$('.sticky-sidebar').removeClass('fixed').css({
							position: 'absolute',
							top: (footTop - $('.sticky-sidebar').outerHeight() - $('.head-container').outerHeight() - 10) + 'px'
						});
					}
				} else {
					$('.sticky-sidebar').removeClass('fixed');
				}
			});
		}
		
		
		// sidebar highlight
		var magicNavCheck = $('#content-magic-nav');
		
		if (magicNavCheck.length) {
			$sections = $('#content-magic-nav h2');  // all content sections
			$navs = $('.magic-nav-links li');  // all nav sections
			
			var highlight = 50;
			
			// get array of all top values + padding
			topsArray = $sections.map(function(){
				return $(this).position().top - highlight; 
			}).get(), topsArray.push(document.height);
			
			// number of sections
			len = topsArray.length;
			currentIndex = 0;
			
			getCurrent = function(top) {
				for(i = 0; i < len; i++) {
					if(top > topsArray[i] && top < topsArray[i+1]) {
						return i;
					}
				}
			};
			
			$(window).scroll(function(e) {
				var scrollTop = $(this).scrollTop();
				checkIndex = getCurrent(scrollTop);
				
				if(checkIndex !== currentIndex) {
					currentIndex = checkIndex;
					$navs.eq(currentIndex).addClass('active').siblings('.active').removeClass('active');
				}
			});
		}
	});
});


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