// Smileys direkt in das Textfeld
function add(code) {
	document.guestbook.text.value += " " + code + " ";
}
	
// Popup für Musikinfos
function popup(url) {
	fenster = window.open(url, "html/musikinfo.php", "width=600,height=500,status=no,scrollbars=no,resizable=no");
	fenster.focus();
}
	
// Bei Focus auf Eingabefeld verschwindet der Eintrag
function valuechange(text, weg) {
	if(weg.value == text) {
		weg.value = "";
	} else if(weg.value == "") {
		weg.value = text;
	}
}
	
// Informiert den User wenn er einen veralteten Browser besitzt
var $buoop = {} 
$buoop.ol = window.onload; 
window.onload=function(){ 
if ($buoop.ol) $buoop.ol(); 
	var e = document.createElement("script"); 
	e.setAttribute("type", "text/javascript"); 
	e.setAttribute("src", "http://browser-update.org/update.js"); 
	document.body.appendChild(e); 
} 
	
// Ersatz für targat="_blank"
function ct(obj) {
	obj.target = '_blank';
}
	
// Analytics
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-18465842-1']);
_gaq.push(['_trackPageview']);

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

// Sliderfunktion
$(document).ready(function(){	
		$("#slider").easySlider();
});	

// Lightbox
$(function(){
	$.Lightbox.construct({
		"show_linkback":	false,
		"show_helper_text": false,
		"show_info": true,
		"download_link": false,
		"text": {
			// For translating
			"image":		"Bild",
			"of":			"von",
			"close":		"[Fenster schlie&szlig;en]",
			"closeInfo":	"You can also click anywhere outside the image to close.",
			"download":		"Download.",
			"help": {
				"close":	"Click to close",
				"interact":	"Hover to interact"
			},
			"about": {
				"text": 	"jQuery Lightbox Plugin (balupton edition)",
				"title":	"Licenced under the GNU Affero General Public License.",
				"link":		"http://www.balupton.com/projects/jquery-lightbox"
			}
		}
	});
});
