/**
 * "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework
 *
 * (en) Workaround for Webkit browser to fix focus problems when using skiplinks
 * (de) Workaround für Webkit-Browser, um den Focus zu korrigieren, bei Verwendung von Skiplinks
 *
 * @note			inspired by Paul Ratcliffe's article 
 *					http://www.communis.co.uk/blog/2009-06-02-skip-links-chrome-safari-and-added-wai-aria
 *
 * @copyright       Copyright 2005-2009, Dirk Jesse
 * @license         CC-A 2.0 (http://creativecommons.org/licenses/by/2.0/),
 *                  YAML-C (http://www.yaml.de/en/license/license-conditions.html)
 * @link            http://www.yaml.de
 * @package         yaml
 * @version         3.2
 * @revision        $Revision: 430 $
 * @lastmodified    $Date: 2009-10-27 21:15:57 +0100 (Di, 27. Okt 2009) $
 */
 
if(navigator.userAgent.toLowerCase().indexOf('webkit') > -1) {
	if (document.getElementsByClassName !== undefined) {
		var sl = document.getElementsByClassName('skip');
		for (var i=0,l=sl.length;i<l;i++) {
			var t = sl[i].href.substr(skiplinks[i].href.indexOf('#')+1), tE = document.getElementById(t);
			tE.href='#'+t; tE.setAttribute("tabindex","0"); sl[i].setAttribute("onclick", "document.getElementById('"+t+"').focus();");
		}
	}	
}