	// prettyPhoto config
$(window).load(function(){

	// $('div.carousel').each(function(i){
	// 
	// 		var target = $(this);
	// 		var parent = target.parent();
	// 
	// 		var next = parent.find('.arrowNext');
	// 		var prev = parent.find('.arrowPrev');
	// 
	// 		var visible_ct = 3;
	// 		var scroll_ct = visible_ct;
	// 		var photo_ct = target.children('ul').children('li').size();
	// 		var circular_set = false;
	// 
	// 		target.jCarouselLite({
	// 			visible: visible_ct,
	// 			scroll: scroll_ct,
	// 			circular: circular_set,
	// 			btnNext: next,
	// 			btnPrev: prev
	// 		});
	// 
	// 		// Always disable previous button on load when circular is set to false
	// 		prev.addClass('disabled');
	// 
	// 		// If there is only one slide of photos (less than or equal to the visible count) disable the next arrow as well
	// 		if (photo_ct <= visible_ct)
	// 			next.addClass('disabled');
	// });

	$("a[rel^='prettyPhoto']").prettyPhoto({
			animationSpeed: 'fast', /* fast/slow/normal */
			theme: 'light_square',
			showTitle: true, /* true/false */
			counter_separator_label: ' of ', /* The separator for the gallery counter 1 "of" 2 */
			allowresize: true, /* true/false */
			markup: '<div class="pp_pic_holder"> \
						<div class="pp_top"> \
							<div class="pp_left"></div> \
							<div class="pp_middle"> \
								<div class="ppt"></div> \
								<div class="pp_top_close"><a class="pp_close" href="#">close</a></div> \
								<div class="pp_nav"> \
						            <a href="#" class="pp_arrow_previous">Previous</a> \
						            <p class="currentTextHolder">0/0</p> \
						            <a href="#" class="pp_arrow_next">Next</a> \
					            </div> \
							</div> \
							<div class="pp_right"></div> \
						</div> \
						<div class="pp_content_container"> \
							<div class="pp_left"> \
							<div class="pp_right"> \
								<div class="pp_content"> \
									<div class="pp_loaderIcon"></div> \
									<div class="pp_fade"> \
										<a href="#" class="pp_expand" title="Expand the image">Expand</a> \
										<div class="pp_hoverContainer"> \
											<a class="pp_next" href="#">next</a> \
											<a class="pp_previous" href="#">previous</a> \
										</div> \
										<div id="pp_full_res"></div> \
										<div class="pp_details clearfix"> \
										<p class="pp_description"></p> \
										</div> \
									</div> \
								</div> \
							</div> \
							</div> \
						</div> \
						<div class="pp_bottom"> \
							<div class="pp_left"></div> \
							<div class="pp_middle"></div> \
							<div class="pp_right"></div> \
						</div> \
					</div> \
					<div class="pp_overlay"></div> \
				'
	});
});

function CSSTable(parent_classname, child_classname, cols)
{
	var cols = cols;
	var pc = parent_classname;
	var cc = child_classname;
	var heights = new Array();
	var maxHeight = 0;
	var t = 0;
	var i = 1;
	var n = 0;

	$(cc).each(function(){
		t++;

		if (maxHeight < $(this).height())
			maxHeight = $(this).height();

		if (i == cols || t == $(pc+" > "+cc).size())
		{
			heights[n] = maxHeight;
			maxHeight = 0;
			i = 1;
			n++;
		}
		else
			i++;
	});

	i = 1;
	n = 0;

	$(cc).each(function(){

		$(this).height(heights[n]);

		if (i == cols)
		{
			i = 1;
			n++;
		}
		else
			i++;
	});		
}

