function visible( element ) {
		// check if one of the parents (until it's position parent) is invisible
		// prevent that elements in static area are always checked as invisible

		// list all items until the offsetParent item (with jQuery >1.6 you can use parentsUntil)
		var oOffsetParent = jQuery(element).offsetParent();
		var bOffsetParentFound = false;
		var $refs = jQuery(element).parents().filter(function() {
			if (this === oOffsetParent) {
				bOffsetParentFound = true;
			}
			return bOffsetParentFound;
		});

		// check for at least one item to be visible
		return !jQuery(element).add($refs).filter(function() {
			return jQuery.css( this, "visibility" ) === "hidden" || jQuery.expr.pseudos.hidden( this );
		}).length;
	}
/*!
	 * The following functions are taken from jQuery UI 1.8.17 but modified
	 *
	 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
	 * Dual licensed under the MIT or GPL Version 2 licenses.
	 * http://jquery.org/license
	 *
	 * http://docs.jquery.com/UI
	 */
The following functions are taken from jQuery UI 1.8.17 but modified
Copyright 2011, AUTHORS.txt
Dual licensed under the MIT or GPL Version 2 licenses.


The following functions are taken from jQuery UI 1 . 8 . 17 but modified Copyright 2011 AUTHORS . txt Dual licensed under the MIT or GPL Version 2 licenses .
function visible( element ) {
		var oOffsetParent = jQuery(element).offsetParent();
		var bOffsetParentFound = false;
		var $refs = jQuery(element).parents().filter(function() {
			if (this === oOffsetParent) {
				bOffsetParentFound = true;
			}
			return bOffsetParentFound;
		});
		return !jQuery(element).add($refs).filter(function() {
			return jQuery.css( this, "visibility" ) === "hidden" || jQuery.expr.pseudos.hidden( this );
		}).length;
	}
function visible ( element ) { var oOffsetParent = jQuery ( element ) . offsetParent ( ) ; var bOffsetParentFound = false ; var $refs = jQuery ( element ) . parents ( ) . filter ( function ( ) { if ( this === oOffsetParent ) { bOffsetParentFound = true ; } return bOffsetParentFound ; } ) ; return ! jQuery ( element ) . add ( $refs ) . filter ( function ( ) { return jQuery . css ( this , "visibility" ) === "hidden" || jQuery . expr . pseudos . hidden ( this ) ; } ) . length ; }
The following functions are taken from jQuery UI 1.8.17 but modified
 Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 Dual licensed under the MIT or GPL Version 2 licenses.
The following functions are taken from jQuery UI 1 . 8 . 17 but modified Copyright 2011 AUTHORS . txt ( http : // jqueryui . com / about ) Dual licensed under the MIT or GPL Version 2 licenses .
// check if one of the parents (until it's position parent) is invisible // prevent that elements in static area are always checked as invisible // list all items until the offsetParent item (with jQuery >1.6 you can use parentsUntil) // check for at least one item to be visible