var fontsized = '';

/* ========== COVER POPUP ========== */
function coverpopup()
{
	var src = $('.product_detail_left .product_cover .product_cover_1 img').attr('src');
	if (src)
	{
		$.post('../coverpopup.php',{src:src},function(data)
		{
			if (data == 'NEIN')
			{
				alert('Das gewünschte Cover existiert leider nicht in dieser Größe');
			}
			else
			{
				$('body').append('<div id="overlay">&nbsp;</div>\n<div id="coverpopup"><a id="closepopup" href="javascript:closecoverpopup();">Ansicht schließen</a></div>');
				$('#coverpopup').prepend(data);
				$('#coverpopup').css('left','50%');
				$('#coverpopup').css('margin-left','-'+$('#coverpopup').width()/2+'px');
				$('#overlay').attr('style','opacity:0.75;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";filter: alpha(opacity=75);');
				$('#coverpopup').fadeIn();
				$('#overlay').fadeIn();
				$('#overlay').width($('body').width()+'px');
				$('#overlay').height($('body').height()+20+'px');
			}
		});
	}	
}

function closecoverpopup()
{
	$('#coverpopup').fadeOut();
	$('#overlay').fadeOut();
	setTimeout("$('#overlay').remove();",'500')
	setTimeout("$('#coverpopup').remove();",'500')
}

/* ========== FONTSIZER ========== */

function fontsize()
{
	fontsized = $.cookie('fontsized');
	if (fontsized == null)
	{
		fontsized = 'false';
	}
	if (fontsized == 'false')
	{
		$('#content').css({'font-size':'14px','line-height':'16px'});
		fontsized = 'true';
	}
	else
	{
		$('#content').css({'font-size':'12px','line-height':'14px'});
		fontsized = 'false';
	}
	$.cookie('fontsized', fontsized, { path: '/', expires: 1 });
}


$(document).ready(function(){
	
	/* ========== FONTSIZER ========== */
	fontsized = $.cookie('fontsized');
	if (fontsized == null)
	{
		fontsized = 'false';
	}
	if (fontsized == 'true')
	{
		$('#content').css({'font-size':'14px','line-height':'16px'});
	}
				
});



