$.preLoadImages(new Array("lib/img/bg_tile_OVER.png"));
$(document).ready(function() {
						   $(".gallery").each(function() {
													   if($(this).find(".summary").text().length >225) {
														   $(this).find(".summary").text(function(i,t) {
																						   return t.slice(0,220)+"...";
																						   });
													   }
													   if(!($.browser.msie && parseInt($.browser.version)<7)) {
														   var src=($(this).attr("id").split("_")[0] == "video")?"lib/img/video_overlay.png":"lib/img/overlay.png";
														   $(this).append('<img class="overlay" src="'+src+'" />');
														   $("div.gallery img.overlay").each(function () {
																									   var place = $(this).parent().position();
																									   $(this).css({top:place.top+8,left:place.left});
																									   });
													   }
													   });
						   $(".gallery").hover(function () {
														 $(this).css({backgroundImage:"url(lib/img/bg_tile_OVER.png)",borderColor:"#ffd013"});
													},
												function () {
														 $(this).css({backgroundImage:"url(lib/img/bg_tile.png)",borderColor:"#4375a5"});
													});
						   $("#content-left a").each(function () {
															   var temp = $(this).attr("href");
															   $(this).attr("href",temp+"&ref=ajax");
															   });
						   $("#content-left a").colorbox({},function() {
																	 $('ul.lb-gallery li:first').addClass("active");
																	 $('ul.lb-gallery').galleria({history:false,insert:"#lb-img"});
																	 });
						   $(window).resize( function() {
														$("div.gallery img.overlay").css("left",$("div.gallery img:first").position().left);
														});
						   });
