$(document).ready(function(){
	setGui();
});


/**
 * A function that triggers when all html elements have drawn
 * @return void
 */
function setGui() {
	  $(document).find('td').each(function(){
	        if ($(this).attr('class') != null) {
	        	//sets the attributes for cells which are specifies the default style
	            if ($(this).attr('class') == 'inputsTdS') {
	                if ($(this).parent('tr').parent('tbody').parent('table').attr('style') != null) {
	                    if ($(this).parent('tr').parent('tbody').parent('table').attr('style').indexOf('box') == -1) {
	                        $(this).parent('tr').parent('tbody').parent('table').addClass('inputs_tables_version_1');
	                        $(this).addClass('inputs_cells_overflow');
	                    }
	                }
	                else {
	                    $(this).parent('tr').parent('tbody').parent('table').addClass('inputs_tables_version_1');
	                    $(this).addClass('inputs_cells_overflow');
	                }

	            }
	        }

	        //checks whether the given id is exists
	        if ($(this).attr('id') != null) {
	            if ($(this).attr('id') == 'inputsTdS') {
	                if ($(this).parent('tr').parent('tbody').parent('table').attr('style') != null) {
	                    if ($(this).parent('tr').parent('tbody').parent('table').attr('style').indexOf('box') == -1) {
	                        $(this).parent('tr').parent('tbody').parent('table').addClass('inputs_tables_version_1');
	                        $(this).addClass('inputs_cells_overflow');
	                    }
	                }
	                else {
	                    $(this).parent('tr').parent('tbody').parent('table').addClass('inputs_tables_version_1');
	                    $(this).addClass('inputs_cells_overflow');
	                }
	            }
	        }
	    });
}

