(function($) {
$.fn.ppForms = function() {
	return this.each(function() {

	});

};
$.fn.ppFormsSkipHiddenFields = function() {
	var fields = this;
	var lastItem = null;
	function checkIsVisible(){
		// this == input
		var i = $.inArray(this, fields);
		if(i != -1) {
			if($(this).parents('p.addressData').hasClass('inv')){
				if(lastItem == fields[i + 1]){
					lastItem = this;
					fields[i - 1].focus();
				} else {
					fields[i + 1].focus();
				}
			} else {
				lastItem = this;
			}
		}
	}
	return this.each(function() {
		$(this).focus(checkIsVisible);
	});

};
})(jQuery);
