$(document).ready(function() {
	$('a.popover').click(function() {
		// Gets rel attribute from the clicked link							
		var popupid = $(this).attr('rel');
				 
		$('#' + popupid).fadeIn();
 
		// append div with id fade into the bottom of body tag
		// and we allready styled it in our CSS
		$('body').append('<div id="fade"></div>');
		$('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn();
		
		// Now define one more function which is used to fadeout the 
		// fade layer and popup window as soon as we click on fade layer
		$('#fade').click(function() {
			$('#fade , #MacProducts , #iOSProducts').fadeOut()
			return false;
		});
	});
});

