
327 S.C. 242 (1997)
489 S.E.2d 472
HAYNE FEDERAL CREDIT UNION, Appellant,
v.
Lynda Hutchins BAILEY, a/k/a Lynda Hutchins Smith, Harold E. Bailey, Karen Kristen Bailey, National Welders Supply Company, Inc., United States Fidelity and Guaranty Company, and Pennsylvania National Mutual Insurance Company, Respondents.
No. 24678.
Supreme Court of South Carolina.
Heard June 4, 1997.
Decided August 11, 1997.
*246 Charles E. Carpenter, Jr. and Deborah H. Sheffield, both of Richardson, Plowden, Carpenter & Robinson, P.A., Columbia; Jack W. Erter, Jr., of Lee, Wilson, and Erter, Sumter, for Appellant.
Linwood S. Evans, Jr., Sumter, for Respondents.
TOAL, Acting Chief Justice:
In this foreclosure action, Hayne Federal Credit Union ("Credit Union") appeals from the order of the special referee who held that Harold Bailey ("Father") owned the property in dispute by virtue of a resulting trust. We reverse and remand.

FACTUAL/PROCEDURAL BACKGROUND
Father contracted to purchase a house located on Pumpkin Lane in Sumter County. He had put down $25,000 in earnest money to make the purchase. The real estate agent involved *247 in the transaction indicated that Father had told her to prepare the contract identifying Father's son, William E. Bailey ("Son"), as the purchaser. The closing attorney testified that his primary contact was with Father. At the closing, which Son attended, Father produced a briefcase containing $73,000 in cash to pay off the balance on the house.
Although Father paid for the house, the deed was put in Son's name. The closing attorney testified that Father was buying the property and putting it in Son's name because of business problems. In his pleadings in the present case, Father declared that he instructed the closing attorney to place the title in Son's name "as an accommodation and for protection against the claims of potential lien and judgment creditors." At trial, he testified that "The real reason I put the house in my son's name was to keep my wife from getting it...." He further indicated that he had been advised not to have any houses in his own name in the event he remarried.
Father occupied the house. He paid the insurance and taxes on the property. Father testified that Son never helped him financially or physically with the house, nor did Son ever occupy the residence.
Son died in June 1987. Son's will devised all of his property to his wife Lynda Hutchins Bailey ("Lynda"). Father did not make a claim against Son's estate as to the Pumpkin Lane property.
In 1990, Lynda applied for a loan in the amount of $17,000 from Credit Union, where she was employed at the time. The loan was to be secured by the Pumpkin Lane property. Credit Union required an attorney to certify the title. Lynda's attorney did a title search and certified that the mortgage was a first lien on the property and that Lynda was the fee simple title owner. Credit Union approved the loan, and the mortgage was recorded in the Sumter County RMC office.
Sometime thereafter, Lynda filed for bankruptcy. Father filed a claim with Lynda's bankruptcy trustee, asserting ownership of the Pumpkin Hill property. In April 1994, this claim in bankruptcy court was settled for approximately $12,000. The settlement statement declared that "the Trustee will transfer the estate's interest in the real property by Trustee's deed, without warranties, to [Father] subject to a first mortgage *248 to Hayne Federal Credit Union of Spartanburg, South Carolina and Bailey will pay to the Trustee $11,000 [sic] lump sum." This settlement was approved by the bankruptcy court.
In August 1994, Credit Union commenced this foreclosure action. Father answered and counterclaimed, contending that he owned the Pumpkin Hill property by virtue of a resulting trust. The matter was referred to a special referee. The referee found that Father owned the property and canceled Credit Union's lien on the property. Credit Union has appealed and presents, among others, the following issues:
It argues that Father is not entitled to avoid Credit Union's lien on the property because:
1. A resulting trust was not created inasmuch as Father did not rebut the presumption that he made a gift by titling the property in Son's name.
2. A resulting trust was not created because Father placed title in Son's name to avoid creditors and/or to defraud his wife.
3. Father is by virtue of judicial estoppel precluded from claiming ownership of the property.

LAW/ANALYSIS
A mortgage foreclosure is an action in equity. Collier v. Green, 244 S.C. 367, 137 S.E.2d 277 (1964). Our scope of review of a case heard by a master who enters a final judgment is to determine facts in accordance with our own view of the preponderance of the evidence. See Tiger, Inc. v. Fisher Agro, Inc., 301 S.C. 229, 391 S.E.2d 538 (1989).

A. RESULTING TRUST: PRESUMPTION OF GIFT
Credit Union argues that a resulting trust was not created because Father did not rebut the presumption that he made a gift by titling the property in Son's name. We disagree.
Equity devised the theory of resulting trust to effectuate the intent of the parties in certain situations where one party pays for property, in whole or in part, that for a different reason is titled in the name of another. McDowell v. *249 South Carolina Dep't of Social Servs., 296 S.C. 89, 370 S.E.2d 878 (Ct.App.1987). The general rule is that when real estate is conveyed to one person and the consideration paid by another, it is presumed that the party who pays the purchase money intended a benefit to himself, and accordingly a resulting trust is raised in his behalf. Caulk v. Caulk, 211 S.C. 57, 43 S.E.2d 600 (1947). The presumption, however, may not be in accord with the truth. It may be rebutted and the actual intention shown by parol evidence. Larisey v. Larisey, 93 S.C. 450, 77 S.E. 129 (1913).
But when the conveyance is taken to a spouse or child, or to any other person for whom the purchaser is under legal obligation to provide, no such presumption attaches. On the contrary, the presumption in such a case is that the purchase was designated as a gift or advancement to the person to whom the conveyance is made. Lollis v. Lollis, 291 S.C. 525, 354 S.E.2d 559 (1987). This presumption, however, is one of fact and not of law and may be rebutted by parol evidence or circumstances showing a contrary intention. Legendre v. South Carolina Tax Comm'n, 215 S.C. 514, 56 S.E.2d 336 (1949).
Father argues that the presumption of a gift where the conveyance is to a child, as here, does not apply when the child is an emancipated adult. We disagree. Rather, we concur with the view expressed in Scott on Trusts, which declares that "Where a parent purchases property in the name of his child, a gift is presumed even though the child is an adult to whom the parent owes no duty of support." 5 William F. Fratcher, Scott on Trusts § 442 at 183 (4th ed.1989). Therefore, in the present case, the presumption of a gift in favor of Son exists. Nevertheless, Father may rebut the presumption by showing a contrary intention.
We find that Father has presented clear and convincing evidence that the conveyance was not intended as a gift, but that he intended to benefit himself. Father handled the entire transaction in purchasing the property. He dealt directly with the real estate agent and the closing attorney. He occupied the house after the purchase. He paid the insurance and the taxes on the property. Son just showed up for the closing. There was no evidence Son actually occupied the premises or *250 that he ever helped Father financially or physically with the house. Accordingly, Father has rebutted any presumption of a gift to Son.

B. RESULTING TRUST: DEFRAUDING CREDITORS AND WIFE
Credit Union argues that Father cannot establish a resulting trust because he placed title in Son's name to defraud creditors or his wife. We agree.
Fraud can defeat a resulting trust, as was implied in Elrod v. Cochran, 59 S.C. 467, 472, 38 S.E. 122, 124 (1901)("The testimony does not show that Sue Cochran intended to place any of her husband's property out of the reach of his creditors, but to prevent them from unlawfully intermeddling with her property.... There was, therefore, no fraud on her part....")(emphasis in original). This is consistent with holdings from other jurisdictions: "It has been held in numerous cases that where A purchases property and takes title in the name of B for the purpose of defrauding his creditors, A cannot enforce a resulting trust." 5 Scott on Trusts § 444, at 199.
Father's own pleadings and testimony establish that he had placed the property in Son's name in order that creditors and his wife would not be able to reach it. In his answer, Father declares that he instructed the closing attorney to place the title in Son's name "as an accommodation and for protection against the claims of potential lien and judgment creditors." At trial, he testified that he "didn't want [his] wife to get a hold of that property." Under such circumstances, this Court finds that the resulting trust is negated by Father's fraudulent actions.
Father contends that Credit Union's argument is unpreserved because it failed to affirmatively plead the defense of fraud. We conclude, under the facts and procedural posture of this case, that Credit Union was not required to plead the defense. Credit Union commenced a foreclosure action. Father answered and counterclaimed, asserting a resulting trust. The existence of the resulting trust could be rebutted by a showing of fraud on the part of Father. Thus, Father could only make out a resulting trust if he did not engage in fraudulent acts in effecting the trust. The well-known *251 maxim, "He who seeks equity must do equity," is applicable here. Cf. Taff v. Smith, 114 S.C. 306, 103 S.E. 551 (1920). Accordingly, Credit Union was not required to affirmatively plead the defense of fraud.

C. JUDICIAL ESTOPPEL
Credit Union argues that Father is precluded from claiming ownership of the property because he swore in a prior divorce proceeding that he had no legal interest in the property and that Son owned the property. Credit Union urges the court to apply the doctrine of judicial estoppel.
Judicial estoppel precludes a party from adopting a position in conflict with one earlier taken in the same or related litigation. See Colleton Reg. Hosp. v. MRS Med. Rev. Systs., 866 F.Supp. 896 (D.S.C.1994). The purpose or function of the doctrine is to protect the integrity of the judicial process or the integrity of courts rather than to protect litigants from allegedly improper or deceitful conduct by their adversaries. 31 C.J.S. Estoppel & Waiver § 139, at 593 (1996). Judicial estoppel generally applies only to inconsistent statements of fact. Cannon v. H.K Porter Co., 705 F.Supp. 288 (E.D.Va.1989). Although some courts have held to the contrary, the doctrine does not apply to conclusions of law or assertions of legal theories. See United States v. Siegel, 472 F.Supp. 440 (N.D.Ill.1979).
Our research of South Carolina case law has not revealed an explicit discussion of judicial estoppel; however, there are opinions alluding to the doctrine. For example, Boykin v. Prioleau, 255 S.C. 437, 179 S.E.2d 599 (1971) intimated that the doctrine exists in this state: "The defense of judicial estoppel has not been raised, and the facts appearing here would not support it." Id. at 441, 179 S.E.2d at 601; see also Zimmerman v. Central Union Bank, 194 S.C. 518, 532, 8 S.E.2d 359, 365 (1940)("[W]here a party assumes a certain position in a legal proceeding, and succeeds in maintaining that position, he may not thereafter, simply because his interests have changed, assume a contrary position.").
We now explicitly adopt the doctrine of judicial estoppel as it relates to matters of fact (not law). In order for the judicial process to function properly, litigants must approach *252 it in a truthful manner. Although parties may vigorously assert their version of the facts, they may not misrepresent those facts in order to gain advantage in the process. The doctrine thus punishes those who take the truth-seeking function of the system lightly. When a party has formally asserted a certain version of the facts in litigation, he cannot later change those facts when the initial version no longer suits him. It is certainly conceivable that parties may want to present novel legal theories, which may require changing one's previous legal theory.[1] However, the truth-seeking function of the judicial process is undermined if parties are allowed to change positions as to the facts of the case, unless compelled by newly-discovered evidence. The present case offers a vivid illustration.
In 1988, Father's wife filed for divorce. The petition made reference to "the marital dwelling at 111 Pumpkin Lane." In his answer, Father stated he "has no legal interest" in the Pumpkin Lane property and that "The said property is owned by William E. Bailey, son of the Respondent, who allows his father to reside there." When questioned in the present action about the divorce pleadings, Father admitted that he lied under oath in order to protect his interest. Under the doctrine of judicial estoppel, because Father previously claimed that Son owned the property, but now claims he owns the property, then Father would be estopped from asserting the latter claim.
Accordingly, we are compelled to reverse this matter. Because of the disposition of the above issues, it is unnecessary for us to reach the other issues appealed.

CONCLUSION
For the foregoing reasons, the order of the special referee canceling Credit Union's lien is REVERSED, and the matter is REMANDED to proceed with foreclosure of the property to satisfy the lien.
*253 WALLER and BURNETT, JJ., and GEORGE T. GREGORY, Jr. and THOMAS J. ERVIN, Acting Associate Justices, concur.
NOTES
[1]  The discussion here is not intended to suggest an alteration of our rules of preservation.
