(function($){
	$(document).ready(function($) {
		var $validator = $("#settingsForm").validate({
	        highlight: function (input) {
	             $(input).parents('.form-group').addClass('has-error');
	        },
	        unhighlight: function (input) {
	            $(input).parents('.form-group').removeClass('has-error');
	        },
	        errorPlacement: function (error, element) {
	            $(element).parents('.form-group').append(error);
	        }
		});
		$validator.showErrors(settingsError);  
		$('input[name="sitelogodark"][type="file"],input[name="sitelogolight"][type="file"]').change(function(){
			$('#'+$(this).attr('for')).val(this.files.length?this.files[0].name:'');
			$(this).parent().find('span').text(this.files.length?'Change':'Choose File');
		});
		if(success){
			swal("Successfull!", "Settings saved successfully!", "success");
		}
	});
}(jQuery));