$(function(){
    $('.block-header').click(function(){
    	idelem = $(this).attr('id');
        idelemdiv = idelem.replace('h-', 'c-');
        $('#'+idelemdiv).slideToggle("fast");        
    });
});

$(document).ready( function()
{
	$("#q").focus(function()
        {
        	if (this.value == 'Suchbegriff eingeben') this.value ='';
		});

        $("#q").blur(function()
        {
        	if (this.value == '') this.value ='Suchbegriff eingeben';
		});	
});

 function UnCryptMailto( s )
    {
        var n = 0;
        var r = "";
        for( var i = 0; i < s.length; i++)
        {
            n = s.charCodeAt( i );
            if( n >= 8364 )
            {
                n = 128;
            }
            r += String.fromCharCode( n - 1 );
        }
        return r;
    }

    function linkTo_UnCryptMailto( s )
    {
        location.href=UnCryptMailto( s );
    }

function changePageContent(_page) {     
     
     $("#box-content").load(_page + "#box-content");
  }

function submitOrder() {
if ($("#AGB").is(":checked")) {
	document.forms.customerData.submit();
} else {
	alert("Bitte akzteptieren Sie unsere AGB");
}

}

$(document).ready(function() {

$("#fancy").fancybox({
				'padding'			: 0,
				'autoScale'			: true,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'width'				: '752',
				'height'			: '639',
				'type'				: 'swf',
				'swf'			: {
			    'wmode'				: 'transparent',
				'allowfullscreen'	: 'true'
			}
			});
	});

