// JavaScript Document
hs.graphicsDir = '/ms/j/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.captionEval = 'this.thumb.title';
	
$(function(ready){
	var images = $(".photo_icon");
	$.each(images,function(p){
		var imgSrc = $(this).attr("href");
		imgSrc = imgSrc.replace("thumbs/","thumbs/thumb_");
		var imgID = $(this).attr("id");
		imgID = imgID.replace("photo","");
		$(this).before('<div class="thumb" id="thumb'+imgID+'" style="display:none;"><img src="'+imgSrc+'" alt="" /></div>');
		
		$(this).hover(
			function(i){
				$("#thumb"+imgID).show();
			},
			function(o){
				$("#thumb"+imgID).hide();
			}
		);
	});
	
	$("#inventory a.highslide").click(function(c){
		return hs.expand(this);
	});
	
	var rows = $("#inventory tbody tr");
	$.each(rows,function(r){
		$(this).click(function(c){
			var url = $(this).find("td:last a").attr("href");
			window.location = url;
			return false;
		});
		
		$(this).hover(
			function(i){
				$(this).addClass('row_hover');
			},
			function(o){
				$(this).removeClass('row_hover');
			}
		);
	});

});
