/*------------------------------------------------------
Site-wide JavaScript 

version:	1.1
author:		joe ardeeser
email:		info@jordancrown.com
website:	http://www.jordancrown.com
------------------------------------------------------*/



/* Load when the document is ready
------------------------------------------------------*/
$(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);
		});

  	// 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();
		});
	}
);


function cancelBubbling(e)
{
    if (!e) var e = window.event;
    e.cancelBubble = true;
    if (e.stopPropagation) e.stopPropagation();
}

/* Thinkbox Windows
------------------------------------------------------*/
// Closes the open thick box window
function close_tb_window( delay ) {
    if( delay > 0 ) {
			setTimeout( "tb_remove()", delay );
    } else {
			tb_remove();
    }
}


/* Edit Text */

// Global Vars
var edit_current_table = '';
var edit_current_id = '';
var edit_current_column = '';

function editText( table, id, column, value ) {
	edit_current_table = table;
	edit_current_id = id;
	edit_current_column = column;

	$('#text_value').html( value );
	$('#text_table').html( table );
	$('#text_id').html( id );
	$('#text_column').html( column );





	


}	

function v() {
}


function updatePage( str ) {
	window.location.href = window.location.pathname + '?' + str;
}



