var abc = 0; //Declaring and defining global increement variable

$(document).ready(function() {

//To add new input file field dynamically, on click of "Add More Files" button below function will be executed
    $('#add_more').click(function() {

		$('#filediv').append('<br><div class="row"><div class="col-lg-6"><input name="file[]" type="file" id="file"/></div><div class="col-lg-6"><select name="type[]" id="type" class="form-control" required><option value="">Type</option><option value="customers">Our Customers</option><option value="trading-associates">Trading Associates</option></select></div></div> ');
        /*$(this).before($("<div/>", {id: 'filediv'}).fadeIn('slow').append(
                $("<input/>", {name: 'file[]', type: 'file', id: 'file'}),
                $("<br/><br/>")
                ));*/
    });


    $('#upload').click(function(e) {
        var name = $(":file").val();
        if (!name)
        {
            alert("First Image Must Be Selected");
            e.preventDefault();
        }
    });
});