/**
*	Copyright 2010, Thomas Klokosch <thomas.klokosch@me.com>
*/

$(document).ready(function(){
	
	// blur links
	$('a').click(function() { this.blur(); });
	
});



/*
*	Helper functions
*/
function basename (path, suffixLength) {
    // Returns the filename component of the path  
    // 
    // version: 1006.1915
    // discuss at: http://phpjs.org/functions/basename
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Ash Searle (http://hexmen.com/blog/)
    // +   improved by: Lincoln Ramsay
    // +   improved by: djmix
    // *     example 1: basename('/www/site/home.htm', '.htm');
    // *     returns 1: 'home'
    // *     example 2: basename('ecra.php?p=1');
    // *     returns 2: 'ecra.php?p=1'
    var b = path.replace(/^.*[\/\\]/g, '');
    
    if (typeof(suffixLength) == 'number') {
        b = b.substr(0, b.length-suffixLength);
    }
    
    return b;
}
