Signin  Pricing  Examples  Support

Libraries > _base-javascript.js

_base-javascript.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://tabcorp.com.au/assets/js/_base-javascript.js

Function Explorer







Libraries on tabcorp.com.au


dd_belatedpng.js

jquery-1.5.2.min.js

modernizr-1.7.min.js

selectivizr.js

_plugins.js

swfobject.js



Explore More


mustache.js

www.js

main.min.js

tacticbindlinks.js

_base-javascript.js
				
;
function RandomId(){
	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
	var string_length = 30;
	var randomstring = "";
	for (var i=0; i<string_length; i++) {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	}
	return randomstring;
};

function OpenShareRegistry()
{
	window.open("investor-centre_shareholder-centre_share-registry-login.aspx", 'ShareRegistry', 'width=920, height=680');
};

$(function(){
		   
	var def_flashvars = {
		//name1: "value"
	};
	var def_params = {
		wmode: "transparent",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		menu: "false",
		quality: "high"
	
	};
	var def_attributes = {
		//class: "class_attr"
	};
    swfobject.embedSWF("flash/tabcorp.swf", "flash_tabcorp", "100%", "290", "9.0.0", "expressInstall.swf", {}, def_params, {});
    /*swfobject.embedSWF("flash/tab_promo.swf", "flash_tab_promo", "180", "81", "9.0.0", "expressInstall.swf", {}, def_params, {});*/
    swfobject.embedSWF("flash/brand_scroller.swf", "flash_brand_scroller", "546", "100", "7", "expressInstall.swf", {}, def_params, {});
	
	$("html.careers_front a[href*='careers_find-a-career-with-tabcorp.aspx']").parent("li").addClass("active");
	
	$("a[href*='investor-centre_shareholder-centre_share-registry-login.aspx'], a[href*='investor_holder_login.aspx']").addClass("ignore_newwin").click(function(ev){
		ev.preventDefault();
		OpenShareRegistry();
	});
	
	$(".sidebar .performance ul a[href]").addClass("ignore_newwin").click(function(ev){
		ev.preventDefault();
		window.open(this.href, 'PerformanceGraph', 'width=900, height=650, resizable=yes, scrollbars=0');
	});
	
	$(".listing04b ul a[href], #recent_webcasts a[href]").addClass("ignore_newwin").click(function(ev){
		ev.preventDefault();
		window.open(this.href, RandomId(), 'resizable=yes, width=1000, height=650');
	});
	
	$("a[href*='careers_existing-applicant-login.aspx']").addClass("ignore_newwin").click(function(ev){
		ev.preventDefault();
		window.open(this.href, 'ExisAppLogin', 'width=710,height=500,directories=no,channelmode=no,location=no,menubar=no,resizable=yes,toolbar=no');
	});
	
	$("a[href='#top']").click(function(ev){
		ev.preventDefault();
		$("html, body").animate({ scrollTop: 0, scrollLeft: 0 }, 500);
	});
	
	$("a[href^='http://'], a[href^='https://'], a[target='_blank']").not("a[href*='tabcorp.com.au'], a.ignore_newwin").click(function(ev){
		ev.preventDefault();
		window.open(this.href, RandomId());
	});
	
	if ($("#brands_listing").length>0)
	{
		BrandsInit();
	}
	
	if ($(".sitemap").length>0)
	{
		SplitSitemapUl();
	}

});

function SplitSitemapUl()
{
	var nonExternalNumber = $(".sitemap > ul > li:not(.external)").length;
	var splitNumber = Math.floor(nonExternalNumber/2);
	var $theRest = $(".sitemap > ul > li:gt("+splitNumber+")");
	$('<ul/>').append($theRest).appendTo(".sitemap");
}

function BrandsSizing()
{
	$("#brands_listing > ul > li").each(function(){
		var $item = $(this);
		var $h2 = $(this).children("h2");
		var $ii = $(this).children(".item_info");
		var $height_top = $(this).children(".item_info").children(".img_cols_left").outerHeight();
		var $height_btm = $(this).children(".item_info").children("ul").outerHeight();
		
		$item.removeClass("active");
		$ii.css("height","auto").each(function(){
			$.data(this, 'state1', $height_top);
			$.data(this, 'state2', $height_top + $height_btm);
		});
		
		$ii.each(function(){
			$(this).stop(true,false).animate({ height: $.data($(this)[0], 'state1') }, 0);
		});
	});
};
function BrandsInit()
{
	$("#brands_listing").addClass("brands_activated");
	
	var BrandsWidthOld = $("#brands_listing").width();
	var BrandsWidthNew = $("#brands_listing").width();

	BrandsSizing();
	$(window).load(function(){
		BrandsSizing();
	});
	$(window).resize(function(){
		BrandsWidthOld = $("#brands_listing").width();
		if (BrandsWidthOld != BrandsWidthNew)
		{
			BrandsSizing();
		}
		BrandsWidthNew = BrandsWidthOld;
	});
	
	$("#brands_listing > ul > li").each(function(){
		var $item = $(this);
		var $h2 = $(this).children("h2");
		var $ii = $(this).children(".item_info");
		
		$h2.click(function(ev){
			if ($item.hasClass("active"))
			{
				$item.removeClass("active");
				$("#brands_listing .item_info").each(function(){
					$(this).stop(true,false).animate({ height: $.data($(this)[0], 'state1') }, 400);
				});
			}
			else
			{
				$("#brands_listing .item_info").not($ii).stop(true,false).animate({ height: 0 }, 400);
				$("#brands_listing > ul > li.active").removeClass("active");
				
				$item.addClass("active");
				$ii.stop(true,false).animate({ height: $.data($ii[0], 'state2') }, 400);
			}
		});
		$h2[0].onselectstart = function(){ return false; };
	});
};


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