// JavaScript Document

// +++ update_27 ---

$(document).ready(function(){
							   
	//IE z-Index Fix
	$(function() { 
		$('.scrollerBox, #colorSelect, div.overlay').bgiframe(); 
	});
	
	// Overlay + Rating
	
	// --- update_56 ---
	// Print Overlay beim Checkout-Success
	$("a[rel='#print_order']").overlay({ 
		expose: '#000', 
		oneInstance: true, 
		onLoad: function() { 
			print();
		} 
	}); 
	// --- update_56 ---

	// Funktion für das Overlay mit externem Content
	$("a[rel='#load-overlay']").overlay({ 
		expose: '#000', 
		oneInstance: true, 
		onBeforeLoad: function() { 
	
				// grab wrapper element inside content 
				var wrap = this.getContent().find("div.wrap"); 
	
				// load the page specified in the trigger 
				wrap.load(this.getTrigger().attr("href")); 
		} 
	}); 
			 
	$("a[rel]").each(function() {
		if (this.rel != 'nofollow')
		{					
			$(this).overlay({expose: '#000', oneInstance: true, top: "center"});	
		}
	});

	
	// nicht schließen
	// Submit-Funktion
	/*$('div.overlay form').submit(function(){
		$("a[rel]").each(function() { 
	$(this).overlay().close(); 
	});
		return false;
	});
	*/	

	// +++ update_46 +++
	closeOverlay = function() { 
		$("a[rel]").each(function() {
			if (this.rel != 'nofollow')
			{					
				$(this).overlay().close(); 
			}
		});
	};
	// --- update_46 ---

});
