define(function(require) {
	//加载JS库
	var $ = require('jquery');
	require('grid')($);
	require('dialog')($);
	require('uriTemplate')($);
	require('demoAssets/../../style/jquery-ui-1.8.14.custom.css');
	var IFA = require('util');
	$(function() {
		$("#edit").click(function() {
			var urlStrEdit = new $.Template($("#editUrl").val());
     		var urlParamEdit = {"vehicleId":$("#vehicleId").val()};
     		var editUrl = urlStrEdit.expand(urlParamEdit);
     		window.location.href = editUrl;
		});
		
		$("a[id^='image']").bind("click",function(){
			var url = new $.Template($("#searchImageUrl").val());
			var para={"imageName":$(this).attr("imageName"),"vehicleId":$(this).attr("vehicleId")};
			url = url.expand(para);
			window.showModalDialog(url);
			//window.location.href=url;
		});
	});
});