Shadowbox.loadSkin('shadowbox', '/style/');
$(window).load(function(){
var options = {
overlayColor: '#A5A8B5',
overlayOpacity: '0.5'
};
window.onload =Shadowbox.init(options);
});

$(document).ready(function() {
	//Mouse Over and Out
	$(".meta_a img").hover(
		function () {
			$(this).attr("src", $(this).parent("a").attr("rel_up"));

		},
		function () {
			$(this).attr("src", $(this).parent("a").attr("rel_do"));

		}
	);
	//Mouse Over and Out
	$(".meta_ul img").hover(
		function () {

			$(this).attr("src", $(this).parent("a").attr("rel_up"));

		},
		function () {
			$(this).attr("src", $(this).parent("a").attr("rel_do"));

		}
	);

	//Navigation >> Produkte Template
	//Mouse Over and Out
	$("#nav_bar img").hover(
		function () {
			$(this).attr("src", $(this).parent("a").attr("rel_up"));

		},
		function () {
			$(this).attr("src", $(this).parent("a").attr("rel_do"));

		}
	);
	//Mouse Over and Out
	$("#nav_bar img").hover(
		function () {

			$(this).attr("src", $(this).parent("a").attr("rel_up"));

		},
		function () {
			$(this).attr("src", $(this).parent("a").attr("rel_do"));

		}
	);


////////////////////////////////////////////////////////////////////////////

    //drucken
    $("#drucken").click(function () {

    	window.print();
    });

    //bookmark
    $("#bookmark").click(function () {

		var url = $(this).attr("rel_url");
		var title = $(this).attr("rel_title");

		if (window.sidebar) { // Mozilla Firefox
			window.sidebar.addPanel(title, url,"");
		} else if( window.external ) { // IE Favorite
			window.external.AddFavorite(url, title);
		} else if(window.opera) { // Opera 7+
			var elem = document.createElement('a');
		    elem.setAttribute('href',url);
		    elem.setAttribute('title',title);
		    elem.setAttribute('rel','sidebar');
		    elem.click();
		} else {
			alert('Ihr Browser unterstützt diese Aktion leider nicht. Bitte fügen Sie diese Seite manuell zu Ihren Favoriten hinzu.');
		}

    });


	// Captcha
	$("#captcha").click(function(){
		var random = Math.floor(Math.random()*25600);

		$("#captcha img").attr("src", "/captcha/image.php?new_captcha=true&" + random);

	});

	//Prüfung ob alle Pflichtfelder ausgefüllt sind.
	$(".validate").validate();


});
