$user = JFactory::getUser();
if ($user->get('guest') == 1 or $user->usertype == 'Registered') {
$headerstuff = $this->getHeadData();
$tmp = array();
foreach ($headerstuff['scripts'] as $path=>$type) {
if ( !preg_match('#media/system/js#i', $path, $ar) ) $tmp[$path] = $type;
}
$headerstuff['scripts'] = $tmp;
$this->setHeadData($headerstuff);
}
?>