$return = call_user_func_array(array($realClass, $method), $args);
                return isset($return) ? $return : $this;
            } else {
                throw new Exception("Method '{$method}' doesnt exist");
            }
        }
    }
}
/**
 * Shortcut to phpQuery::pq($arg1, $context)
 * Chainable.
 *
 * @see phpQuery::pq()
 * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
 * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
 * @package phpQuery
 */
function pq($arg1, $context = null)
{
    $args = func_get_args();
    return call_user_func_array(array('phpQuery', 'pq'), $args);
}
// add plugins dir and Zend framework to include path
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/phpQuery/' . PATH_SEPARATOR . dirname(__FILE__) . '/phpQuery/plugins/');
// why ? no __call nor __get for statics in php...
// XXX __callStatic will be available in PHP 5.3
phpQuery::$plugins = new phpQueryPlugins();
// include bootstrap file (personal library config)
if (file_exists(dirname(__FILE__) . '/phpQuery/bootstrap.php')) {
    require_once dirname(__FILE__) . '/phpQuery/bootstrap.php';
}