dataParse: function (selector)
{
var inputs = $(selector).length;
var data = {};
for (var i = 0; i < inputs; i++)
{
var obj = $(selector).eq(i);
var name = $(obj).attr('name');
if(obj.val() !== ""){
data[name] = obj.val();
} else {
if(obj.attr('value') === undefined){
data[name] = obj.text();
} else {
data[name] = obj.attr('value');
}
}
}
return data;
}