$(document).ready(function(){
		$("a.clickme").click(function(){
			// TEMPORARY GET HEIGHT 
			var contentHeight = $("#lightbox-panel").height();
			contentHeight = contentHeight+200;
			contentHeight = contentHeight+"px";
						
			//alert(contentHeight);
			$("#lightbox").height(contentHeight);
			$("#lightbox, #lightbox-panel").fadeIn(300);
			
			/*
			This would be ideal, but can't be done thanks to HTML integration time limitations.
			var idName = $(this).attr('id');
			var popText = '#' + idName + '_popup .inner_content';
			
			$('#delivery_information_popup').html($(popText).html());
			*/
			
			if($(this).attr('id') == 'delivery-info') {
				$('#delivery_information_popup .inner_content').html($('#delivery_popup .inner_content').html());	
				
			} 
			if($(this).attr('id') == 'prod-terms') {
				$('#delivery_information_popup .inner_content').html($('#product_terms_popup .inner_content').html());			

			}
			if($(this).attr('id') == 'refunds-returns') {
				$('#delivery_information_popup .inner_content').html($('#refunds_returns_popup .inner_content').html());	

			}

			
		});	
		$("#close-panel").click(function(){
			$("#lightbox, #lightbox-panel").fadeOut(300);
		});
		$('#lightbox').click(function(){
			$("#lightbox, #lightbox-panel").fadeOut(300);
		});
	});	
