$(document).ready(function() {
	
	$("a.download, a.releaseNote").click(function() {
		
		var url = "/libraries/driver/download.asp?duid="+$(this).attr("duid")+"&vendor="+escape($(this).attr("vendor"))+"&product="+escape($(this).attr("product"))+"&hclass="+escape($(this).attr("hclass"))+"&os="+escape($(this).attr("os"))+"&version="+escape($(this).attr("version"))+"&vendor_img="+escape($(this).attr("vendor_img"))+"&driverdate="+escape($(this).attr("driverdate"))
		var title = $(this).attr("title");

		$('<div><div class="titleBar"><div class="title">' + title + '</div><div class="closeButton"><a href="javascript:$.modal.close();">Close</a></div></div><iframe class="modal-iframe" frameBorder="0" src="' + url + '">&nbsp;</iframe></div>').modal({
			close: false
		});

		return false;

		
	});
	
	$("a.pitNote").click(function() {
		
		var RowId = $(this).attr("RowId");
		
		$("#PitNote_"+RowId).toggle();
		return false;

		
	});
	
	$("a.showAll").click(function() {
		
		var tableId = $(this).attr("tableId");
		
		$("#" + tableId + " tr.more").show();
		$("#" + tableId + " a.collapseAll").show();
		$(this).hide();
		
		return false;

		
	});
	$("a.collapseAll").click(function() {
		
		var tableId = $(this).attr("tableId");
		
		$("#" + tableId + " tr.more").hide();
		$("#" + tableId + " a.showAll").show();
		$(this).hide();
		
		return false;

		
	});
	
});
