window.addEvent('domready', function() {

/********************************************************

      C C C C      X     X   S S S  V           V
    C         C     X   X   S     S  V         V
   C    CCC    C     X X    S         V       V
  C    C        C     X      S S S     V     V
   C    CCC    C     X X          S     V   V
    C         C     X   X   S     S      V V
      C C C C      X     X   S S S        V
	  
 Created by Josh Reid for PGS Copyright 2009 
 
*********************************************************/
	
	// External Links: Target New Window (_blank)
	var extLinks = $$('a[rel="extLink"]','.extLink');
	extLinks.each(function(extLink, i) {
		
		extLink.target = '_blank';
		
	});
	
	// External Links: Target New Window (_blank)
	var iLinks = $$('.dashboard a','.iconButton');
	iLinks.each(function(lin, i) {
		
		if(lin.getChildren('.icon').length < 1) {
		 ic = new Element('span').addClass('icon').inject(lin,'inside');	
		}
		
	});
	
	var smoothlyScroll = new SmoothScroll({
		links: 'a.smoothly'
	});
	
	/*
	// TOOL TIPS - minimum a's to get: '#hlink a','#menu a'
	//store titles and text
		$$('a','.cursorScrollUp','.cursorScrollDown').each(function(el,index) {
			var elTitle = el.get('title');
			if(elTitle) {
				if(elTitle.indexOf('::')>0) {
					var content = elTitle.split('::');
					el.store('tip:title', content[0]);
					el.store('tip:text', content[1]);
				} else {
					el.store('tip:title', 'View');
					el.store('tip:text', elTitle);
				}
			} else {
				el.store('tip:title', 'View');
				el.store('tip:text', el.get('href'));
			}
		});
		//create the tooltips
		var tipz = new Tips(['a','.cursorScrollUp','.cursorScrollDown'],{
			className:'tool-tip',
			offsets: {'x':16,'y':8},
			hideDelay: 400,
			showDelay: 800
		});
		
		//customize
		tipz.addEvents({
			'show': function(tip) {
				tip.fade('in');
			},
			'hide': function(tip) {
				tip.fade('out');
			}
		});
	*/
	//call multiBox
	var initMultiBox = new multiBox({
		mbClass: '.mb',//class you need to add links that you want to trigger multiBox with (remember and update CSS files)
		container: $(document.body),//where to inject multiBox
		addOverlayIcon: true,//adds overlay icons to images within multibox links
		movieSize: {w:550, h:443}//default width/height of movie
	});
	
	//hide pesky aspnetForm input div
	var first=true;
	if($('aspnetForm')) {
		$('aspnetForm').getElements('div:first-child').each(function(d){
			if (first) {
				d.setStyle('display','none');
				first=false;
			}
		});
	}
															 
});
/* END DOM READY */
