window.addEvent('domready', function() {
				
//Niftycube

Nifty("div.box","big");	
Nifty("div.error","big");
Nifty("div.success","big");
						
			
//Tips
var yabbaTip = new Tips($$('.yabbaTip'));						
		
		
//SmoothScroll
	new SmoothScroll({ duration: 1000 });
});



/*
Class: SmoothScroll
	Auto targets all the anchors in a page and display a smooth scrolling effect upon clicking them.
	Inherits methods, properties, options and events from <Fx.Scroll>.

Note:
	SmoothScroll requires an XHTML doctype.

Arguments:
	options - the Fx.Scroll options (see: <Fx.Scroll>) plus links, a collection of elements you want your smoothscroll on. Defaults to document.links.

Example:
	>new SmoothScroll();
*/

var SmoothScroll = Fx.Scroll.extend({
	initialize: function(options){
		this.parent(window, options);
		this.links = (this.options.links) ? $$(this.options.links) : $$(document.links);
		var location = window.location.href.match(/^[^#]*/)[0] + '#';
		this.links.each(function(link){
			if (link.href.indexOf(location) != 0) return;
			var anchor = link.href.substr(location.length);
			if (anchor && $(anchor)) this.useLink(link, anchor);
		}, this);
		if (!window.webkit419) this.addEvent('onComplete', function(){
			window.location.hash = this.anchor;
		});
	},

	useLink: function(link, anchor){
		link.addEvent('click', function(event){
			this.anchor = anchor;
			this.toElement(anchor);
			event.stop();
		}.bindWithEvent(this));
	},
	
	toElement: function( el ){
		var parent = this.element.getPosition(this.options.overflown);
		var target = $(el).getPosition(this.options.overflown);
		return this.scrollTo( 0, target.y - parent.y );
	}
});


/*
Class: PopWindow
	Provides additional functionaility to the standard window.open() function
*/

var PopWindow = new Class
({
	/*
	Constructor: initialize
		Instantiate a new instance of this object
		
	Arguments:
		url - The URL for the contents of the window.
		title - Title to be assigned to the window
		width - Initial width of the window
		height - Initial height of the window
		features - Custom features for the window
		
	Example:
		>var myPop = new PopWindow( 'http://www.google.com', 'MyTitle', 500, 500, 'scrollbars=1, status=1' );
		>myPop.Open();
	*/
	initialize: function( url, title, width, height, features ){
		if( width == 0 ) width = screen.width;
		if( height == 0 ) height = screen.height;
		
		this.Url = url;
		this.Title = title;
		this.Width = width;
		this.Height = height;
		
		this.Left = ( screen.width - width ) / 2;
		this.Top = ( screen.height - height ) / 2;
		
		this.Features = ( features + "" ).length > 0 ? features + ',' : '';
		this.Features += 'left=' + this.Left + ', top=' + this.Top + ', status = 1';
	},
	
	/*
	Method: Open
		Open the window
	*/
	Open: function(){
		this.Window = Window.open( 
			this.Url, 
			this.Title, 
			this.Features + ( ( this.Features != '' ) ? ',':'' ) + 'width=' + this.Width + ',height=' + this.Height 
			);
	    this.Window.focus();
	},
	
	/*
	Method: Close
		Closes the window
	*/
	Close: function(){
		this.Window.close();
	}
});


// autoTab

<!-- Original:  Cyanide_7 (leo7278@hotmail.com) -->
<!-- Web Site:  http://www7.ewebcity.com/cyanide7 -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode; 
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}
//  End -->

//External links
function setExternalLinks() {
if ( !document.getElementsByTagName ) {
return null;
 }
var anchors = document.getElementsByTagName( "a" );
for ( var i = 0; i < anchors.length; i++ ) {
var anchor = anchors[i];
if ( anchor.getAttribute( "href" ) &&
anchor.getAttribute( "rel" ) == "external" ) {
anchor.setAttribute( "target", "_blank" );
          }
       }
    }
	
window.onload = setExternalLinks;