function WindInfoMoney_OnLoad()
	WindInfoMoneySmall:SetAllPoints(WindInfoMoney);
	WindInfoMoney:RegisterEvent("VARIABLES_LOADED");
	MoneyFrame_Update("WindInfoMoneySmall", MoneyTypeInfo["PLAYER"].UpdateFunc());
	if (WindInfoMoney_NeedReload()) then WindTimer["WindInfoMoney"] = 4; end
end

function WindInfoMoney_NeedReload()
	if (WindInfoMoneySmallGoldButton
		and WindInfoMoneySmallSilverButton
		and tonumber(WindInfoMoneySmallCopperButtonText:GetText()) > 0 ) then
		return false;
	else return true; end
end

function WindInfoMoney_loop()
	MoneyFrame_Update("WindInfoMoneySmall", MoneyTypeInfo["PLAYER"].UpdateFunc());
	if (WindInfoMoney_NeedReload()) then WindTimer["WindInfoMoney"] = 4;
	else WindTimer["WindInfoMoney"] = nil; end
end

function WindInfoMoney_OnEvent()
	if (event == "VARIABLES_LOADED") then
		WindInfoMoney_initConfig();
		WindInfoMoney_setPoint();
		WindInfoMoney_setScale();
		WindInfoMoney_setSize();
		WindInfoMoney_setView();
		WindInfoMoney_setMouse();
	end
end

function WindInfoMoney_initConfig()
	if (not WindInfoMoneyConfig) then WindInfoMoneyConfig = WindInfoDefault["Money"]; end
end

function WindInfoMoney_setPoint()
	WindCommon_setPoint(WindInfoMoney, WindInfoMoneyConfig[1], "WindInfo", WindInfoMoneyConfig[1], WindInfoMoneyConfig[2], WindInfoMoneyConfig[3]);
end

function WindInfoMoney_setScale()
	WindInfoMoney:SetScale(WindInfoMoneyConfig[4]);
end

function WindInfoMoney_setSize()
	WindCommon_setSize(WindInfoMoney, WindInfoMoneyConfig[5], WindInfoMoneyConfig[6]);
end

function WindInfoMoney_setView()
	if (WindInfoMoneyConfig[7]) then WindInfoMoney:Show();
	else WindInfoMoney:Hide(); end
end

function WindInfoMoney_setMouse()
	if (WindInfoMoneyConfig[8]) then WindInfoMoney:Show();
	else WindInfoMoney:Hide(); end
end