$(function() {


    $('#date_arrived_display').datepicker({
	showButtonPanel: true,
	dateFormat: 'd M yy',
	altFormat: 'yy-mm-dd',
	altField: '#date_arrived'
    });

    $("#importFields").hide();


    


    $("#shipmentType").change(function() {

	var shipmentTypeID = getShipmentTypeID();
	
	if(shipmentTypeID == 1) {
	     $("#importFields").show();
	}

	
	
    });

    


    function getShipmentTypeID() {
	var id;
	$("#shipmentType :selected").each(function(i, selected) {
	    id = this.value;
	});
	return id;
    }


});

