/*------------------------------------------------------
Site-wide JavaScript 

version:	1.1
author:		joe ardeeser
email:		info@jordancrown.com
website:	http://www.jordancrown.com
------------------------------------------------------*/

jQuery.noConflict();


/* Load when the document is ready
------------------------------------------------------*/
jQuery(document).ready(

	function($) { 
  	// Add the additional structure to the box divs
		$("div.box").wrap(
			'<div class="box_outer">' + 
			'<div class="bd">' + 
			'<div class="c">' + 
			'<div class="s">' + 
			'</div>' + 
			'</div>' + 
			'</div>' + 
			'</div>' 
		);

		$('div.box_outer').prepend(
			'<div class="hd">' +
			'<div class="c"></div>' +
			'</div>'
		).append(
			'<div class="ft">' +
			'<div class="c"></div>' +
			'</div>'
		);

		$('div.box_outer').each( function(i, o) {
			var classes = $(o).find('.box').attr('class');
			$(o).addClass(classes);

			// Remove the classes from the inner box
			$(o).find('.box:first').attr('class', '');
		});

  	// Add the additional structure to the buttons 
		$('.button').wrapInner( '<span class="wrap"><span></span></span>' );

		// Make the buttons go back to their normal state (IE)
		$('.button').click( function() {
			$(this).blur();
		});
	}
);

