// JavaScript Document

var makeHomepage = {
	
	init : function()
	{
		$$('a.ig_lgbluelink').each(function(a){ a.remove(); });
		
		$('make_homepage').onclick = function()
		{
			//alert($('not_homepage'));
			$('not_homepage').hide();
			new Effect.Appear( 'is_homepage', {duration:0.4} );
			makeHomepage.setCookie(1);
			return false;
		}
		
		$('unmake_homepage').onclick = function()
		{
			$('is_homepage').hide();
			new Effect.Appear( 'not_homepage', {duration:0.4} );
			makeHomepage.setCookie(0);
			return false;
		}
		
		/*new Tip(makeHomepage.what_is_this, 'By checking the "Make this my Nicolet Bank homepage" link, NicoletBank.com saves your preference in a cookie on your computer. Next time you visit NicoletBank.com, we\'ll check the cookie and forward you to the section you selected.', {
			title: 'What is this?',
			style: 'thevault',
			stem: 'topRight',
			hook: { target: 'bottomRight', tip: 'topRight', mouse: false }
		});*/
	},
	
	setCookie:function(val)
	{
		var expiredays = 60;
		var exdate=new Date();
		exdate.setDate(exdate.getDate()+expiredays);
		document.cookie="vault_homepage =" +escape(val)+((expiredays==null) ? "" : "; host=.nicoletbank.com; path=/; expires="+exdate.toGMTString());
	}
	
}

Event.observe(window, 'load', makeHomepage.init);
