/* Scrollings aktivieren */
$(document).ready(function() {
	/* andere ScrollContainer hier initialisieren Beispiel: CSBfleXcroll('divID'); */
	CSBfleXcroll('verlagsSortimenteScroll');
	CSBfleXcroll('directSearchScroll');
});


/* Hover-Effekt für Produkt-Listen (Border-An-Aus-Effekt) */
$(document).ready(function() {
	setProductBorder();
});

function setProductBorder() {
	$("div.CategoryProductList div.productcontent").mouseover(function(){ 
		$(this).parents("..productbox").children(".productborder").css("background-color","#d3d9c9"); 
		
	});
	
	$("div.CategoryProductList div.productcontent").click(function(){ 
		window.location.href = $(this).children(".productimage").children(".imageshadow").children("#ProductLink").attr("href");
	});

	$("div.CategoryProductList div.productcontent").mouseout(function() 
		{ $(this).parents("..productbox").children(".productborder").css("background-color","white"); });
}


/* DirektSuche */
/*
var initFlexScroller = true;
$(document).ready(function() {
	$("#directSearchImage").click(function () {
		var src = $("#directSearchImage").attr('src');
		if(src == 'customGates/resources/binaries/de_DE/buttons/direct_search_down_2.gif')
		{
			$("#directSearchImage").attr('src', 'customGates/resources/binaries/de_DE/buttons/direct_search_up_2.gif'); 
			$("#directSearchBox").slideDown("fast");
			if(initFlexScroller)
			{
				CSBfleXcroll('directSearchScroll');
				initFlexScroller = false; 
			}
		}
		else
		{
			$("#directSearchBox").slideUp("fast", function () {
				$("#directSearchImage").attr('src', 'customGates/resources/binaries/de_DE/buttons/direct_search_down_2.gif');
				});
		}
  });
});
*/

/* PopUp-Fenster (z.B. fuer die AGB) */
function openPopup(url, width, heigt)
{
	if (width == "" || width == null)
		width = 900;

	if (heigt == "" || heigt == null)
		heigt = 640;

	window.open(url, 'Popup', 'width='+width+',height='+heigt+',location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,top=100,left=100');
} // function openPopup(url)

/* Beim Absenden eines Gutschein-Codes evtl. eingeblendete Fehlermeldung ausblenden */
function hideGutscheinCodeError()
{
	$('#GutscheinCodeError').css('display', 'none');
}

function addQuoteBorder()
{
	$('#QuoteBorderDiv').css('border', '2px solid #cccccc');
	$('#QuoteBorderDiv').css('padding', '0px');
	
}

function removeQuoteBorder()
{
	$('#QuoteBorderDiv').css('border', '');
	$('#QuoteBorderDiv').css('padding', '2px');
}

function toggleDirectSearch(toggle)
{
	if( toggle == 'hide' || $('#directSearch').css('display') != 'none' )
	{
		// ausblenden
		$('#directSearchToggleImage').attr('src', 'customGates/resources/binaries/universal/background/gn_seperator2.gif');
		$('#directSearchToggleArea').attr('title', 'Im Fach stöbern einblenden');
		$('#directSearch').css('display', 'none');
	}
	else if( toggle == 'show' || $('#directSearch').css('display') == 'none' ) 
	{
		// einblenden
		$('#directSearchToggleImage').attr('src', 'customGates/resources/binaries/universal/background/gn_seperator2_expanded.gif');
		$('#directSearchToggleArea').attr('title', 'Im Fach stöbern ausblenden');
		$('#directSearch').css('display', 'block');
	}
	
	
}