$( document ).ready( function(){




	/* ENHANCE BUTTONS */
	var sp = function( c ){ return $( document.createElement('span') ).addClass( c ); };
	var cl = "c1,c2,c3,c4,s1,s2,s3,s4".split(',');
	$('.button').each(function(b, be){
		$(this).removeClass('button').wrap( sp('vortexButton').addClass( this.className ) )[0].className = '';
		for( var s = 0; s < cl.length; s++ ) sp( cl[ s ] ).insertAfter(this);
		if( $(this).attr('href') ) $(this).parent().click(function(){
			var a = $(this).children('a');
			if( a.length > 0 && a.attr('href') ) window.location = a.attr('href');
		});
	});
	delete sp, cl;



	/* INITIALIZE FORMS */
	$('form').vortexInitForm();



});
