$( document ).ready( function()
{
	$( 'ul#nav li a' ).each( function() {
		if( $( this ).attr( 'href' ) == current_url || $( this ).attr( 'href' ) == complete_url ) 
		{
			$( this ).parent().addClass( 'active' );
		}
	} );
	
	$( 'ul#leftmenu li a' ).each( function() {
		if( $( this ).attr( 'href' ) == current_url || $( this ).attr( 'href' ) == complete_url ) 
		{
			$( this ).parent().addClass( 'active' );
		}
	} );
	
	if( popup_question_ok )	{ alert( 'Thank you for your message' ); }
	
	$( '.zebra' ).zebra();
	
	/**
	 * A warning message appears everytime you click an object in the page which has
	 * a warning class attached to it
	 */
	$( '.warning' ).click( function()
	{
		if( ! confirm( 'Are you sure? This cannot be undone!' ) )
		{
			return false;
		}
		
		return true;
	});
	
	$('a.lightbox').lightBox( {
		imageLoading:			'/img/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
		imageBtnPrev:			'/img/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
		imageBtnNext:			'/img/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
		imageBtnClose:			'/img/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
		imageBlank:				'/img/lightbox-blank.gif',
	   } );
});

function openWindow( theURL, winName, features )
{
	window.open( theURL, winName, features );
}
